author | llornkcor <llornkcor> | 2004-07-02 21:28:14 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-07-02 21:28:14 (UTC) |
commit | e46eb5eb8bb8a0a34dbc7f4749ff62633261aba0 (patch) (side-by-side diff) | |
tree | 0f18b7d34ee6208b18afc45837098c4e11cc5ed5 | |
parent | 558c37f440baa57213d40639992bd29eaed1e12f (diff) | |
download | opie-e46eb5eb8bb8a0a34dbc7f4749ff62633261aba0.zip opie-e46eb5eb8bb8a0a34dbc7f4749ff62633261aba0.tar.gz opie-e46eb5eb8bb8a0a34dbc7f4749ff62633261aba0.tar.bz2 |
fix
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index b80b378..e747a19 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -237,5 +237,6 @@ VMemo::VMemo( QWidget *parent, const char *_name ) usingIcon = FALSE; // if( vmCfg.readNumEntry("hideIcon",0) == 1) -// hide(); + if (!usingIcon) + hide(); recording = FALSE; // } @@ -376,5 +377,5 @@ bool VMemo::startRecording() { void VMemo::stopRecording() { - show(); +// show(); odebug << "Stopped recording" << oendl; recording = FALSE; @@ -489,12 +490,17 @@ bool VMemo::record() { int result = 0; int value = 0; + QString msg; msg.sprintf("Recording format %d", format); odebug << msg << oendl; + Config config("Vmemo"); config.setGroup("Record"); int sRate = config.readNumEntry("SizeLimit", 30); - if(sRate > 0) + odebug << "VMEMO rate" << sRate << oendl; + + if(sRate > 0) { t_timer->start( sRate * 1000+1000, TRUE); + } msg.sprintf("Recording format other"); @@ -508,6 +514,8 @@ bool VMemo::record() { char abuf[bufsize / 2]; short sbuf[bufsize]; - + odebug << "ready to record"<< oendl; if(useADPCM) { + odebug << "usr ADPCM" << oendl; + while(recording) { result = ::read(dsp, sbuf, bufsize); // adpcm read @@ -530,9 +538,10 @@ bool VMemo::record() { return FALSE; } - // printf("%d\r", length); - // fflush(stdout); + printf("%d\r", length); + fflush(stdout); qApp->processEvents(); } } else { + odebug << "use regular wav" << oendl; while(recording) { result = ::read(dsp, sound, bufsize); // read @@ -543,4 +552,5 @@ bool VMemo::record() { break; return FALSE; + } bytesWritten = ::write(wav, sound, result); // write @@ -558,7 +568,7 @@ bool VMemo::record() { qApp->processEvents(); } +// odebug << "result is " << result << oendl; } - } - // odebug << "file has length of " << length << " lasting " << (( length / speed) / channels) / 2 ) << " seconds" << oendl; + odebug << "file has length of " << length << " lasting " << (( length / speed) / channels) / 2 << " seconds" << oendl; value = length + 36; |