-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 835f63a..f088bef 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -220,13 +220,13 @@ VMemo::VMemo( QWidget *parent, const char *_name ) | |||
220 | 220 | ||
221 | myChannel = new QCopChannel( "QPE/VMemo", this ); | 221 | myChannel = new QCopChannel( "QPE/VMemo", this ); |
222 | connect( myChannel, SIGNAL(received(const QCString&,const QByteArray&)), | 222 | connect( myChannel, SIGNAL(received(const QCString&,const QByteArray&)), |
223 | this, SLOT(receive(const QCString&,const QByteArray&)) ); | 223 | this, SLOT(receive(const QCString&,const QByteArray&)) ); |
224 | 224 | ||
225 | if( toggleKey != -1 ) { | 225 | if( toggleKey != -1 ) { |
226 | qDebug("Register key %d", toggleKey); | 226 | odebug << "Register key " << toggleKey << "" << oendl; |
227 | QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)"); | 227 | QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)"); |
228 | // e << 4096; // Key_Escape | 228 | // e << 4096; // Key_Escape |
229 | // e << Key_F5; //4148 | 229 | // e << Key_F5; //4148 |
230 | e << toggleKey; | 230 | e << toggleKey; |
231 | e << QString("QPE/VMemo"); | 231 | e << QString("QPE/VMemo"); |
232 | e << QString("toggleRecord()"); | 232 | e << QString("toggleRecord()"); |
@@ -473,14 +473,14 @@ int VMemo::openWAV(const char *filename) { | |||
473 | wh.sample_fq = speed; | 473 | wh.sample_fq = speed; |
474 | wh.byte_p_sec = speed * channels * resolution/8; | 474 | wh.byte_p_sec = speed * channels * resolution/8; |
475 | wh.byte_p_spl = channels * (resolution / 8); | 475 | wh.byte_p_spl = channels * (resolution / 8); |
476 | wh.bit_p_spl = resolution; | 476 | wh.bit_p_spl = resolution; |
477 | wh.data_chunk = DATA; | 477 | wh.data_chunk = DATA; |
478 | wh.data_length= 0; | 478 | wh.data_length= 0; |
479 | // qDebug("Write header channels %d, speed %d, b/s %d, blockalign %d, bitrate %d" | 479 | // odebug << "Write header channels " << wh.modus << ", speed " << wh.sample_fq << ", b/s " |
480 | // , wh.modus, wh.sample_fq, wh.byte_p_sec, wh.byte_p_spl, wh.bit_p_spl ); | 480 | // << wh.byte_p_sec << ", blockalign " << wh.byte_p_spl << ", bitrate " << wh.bit_p_spl << oendl; |
481 | write (wav, &wh, sizeof(WaveHeader)); | 481 | write (wav, &wh, sizeof(WaveHeader)); |
482 | 482 | ||
483 | return 1; | 483 | return 1; |
484 | } | 484 | } |
485 | 485 | ||
486 | bool VMemo::record() { | 486 | bool VMemo::record() { |
@@ -556,14 +556,13 @@ bool VMemo::record() { | |||
556 | // printf("%d\r", length); | 556 | // printf("%d\r", length); |
557 | // fflush(stdout); | 557 | // fflush(stdout); |
558 | qApp->processEvents(); | 558 | qApp->processEvents(); |
559 | } | 559 | } |
560 | } | 560 | } |
561 | } | 561 | } |
562 | // qDebug("file has length of %d lasting %d seconds", | 562 | // odebug << "file has length of " << length << " lasting " << (( length / speed) / channels) / 2 ) << " seconds" << oendl; |
563 | // length, (( length / speed) / channels) / 2 ); | ||
564 | 563 | ||
565 | value = length + 36; | 564 | value = length + 36; |
566 | 565 | ||
567 | lseek(wav, 4, SEEK_SET); | 566 | lseek(wav, 4, SEEK_SET); |
568 | write(wav, &value, 4); | 567 | write(wav, &value, 4); |
569 | lseek(wav, 40, SEEK_SET); | 568 | lseek(wav, 40, SEEK_SET); |