-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 118fcde..e14d532 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -10,4 +10,5 @@ | |||
10 | ** | 10 | ** |
11 | ************************************************************************************/ | 11 | ************************************************************************************/ |
12 | // copyright 2002 Jeremy Cowgar <jc@cowgar.com> | ||
12 | /* | 13 | /* |
13 | * $Id$ | 14 | * $Id$ |
@@ -255,8 +256,8 @@ void VMemo::mousePressEvent( QMouseEvent *me ) | |||
255 | mousePressEvent and mouseReleaseEvent with a NULL parameter. | 256 | mousePressEvent and mouseReleaseEvent with a NULL parameter. |
256 | */ | 257 | */ |
257 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 258 | // #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) |
258 | if (!systemZaurus ) | 259 | // if (!systemZaurus ) |
259 | return; | 260 | // return; |
260 | #endif | 261 | // #endif |
261 | 262 | ||
262 | Config config( "Sound" ); | 263 | Config config( "Sound" ); |
@@ -437,5 +438,4 @@ void VMemo::record(void) | |||
437 | while(recording) { | 438 | while(recording) { |
438 | result = read(dsp, sound, 512); // 8192 | 439 | result = read(dsp, sound, 512); // 8192 |
439 | qApp->processEvents(); | ||
440 | int j=0; | 440 | int j=0; |
441 | if(systemZaurus) { | 441 | if(systemZaurus) { |
@@ -443,5 +443,4 @@ void VMemo::record(void) | |||
443 | monoBuffer[i] = sound[i]; | 443 | monoBuffer[i] = sound[i]; |
444 | } | 444 | } |
445 | qApp->processEvents(); | ||
446 | length+=write(wav, monoBuffer, result); | 445 | length+=write(wav, monoBuffer, result); |
447 | } else { //ipaq /stereo inputs | 446 | } else { //ipaq /stereo inputs |
@@ -450,9 +449,8 @@ void VMemo::record(void) | |||
450 | j++; | 449 | j++; |
451 | } | 450 | } |
452 | qApp->processEvents(); | ||
453 | length+=write(wav, monoBuffer, result/2); | 451 | length+=write(wav, monoBuffer, result/2); |
454 | } | 452 | } |
455 | printf("%d\r",length); | 453 | // printf("%d\r",length); |
456 | fflush(stdout); | 454 | // fflush(stdout); |
457 | } | 455 | } |
458 | } else { //AFMT_U8 | 456 | } else { //AFMT_U8 |
@@ -461,5 +459,4 @@ void VMemo::record(void) | |||
461 | while(recording) { | 459 | while(recording) { |
462 | result = read(dsp, sound, 512); // 8192 | 460 | result = read(dsp, sound, 512); // 8192 |
463 | qApp->processEvents(); | ||
464 | int j=0; | 461 | int j=0; |
465 | if(systemZaurus) { | 462 | if(systemZaurus) { |
@@ -467,5 +464,4 @@ void VMemo::record(void) | |||
467 | monoBuffer[i] = sound[i]; | 464 | monoBuffer[i] = sound[i]; |
468 | } | 465 | } |
469 | qApp->processEvents(); | ||
470 | length+=write(wav, monoBuffer, result); | 466 | length+=write(wav, monoBuffer, result); |
471 | } else { //ipaq /stereo inputs | 467 | } else { //ipaq /stereo inputs |
@@ -474,12 +470,9 @@ void VMemo::record(void) | |||
474 | j++; | 470 | j++; |
475 | } | 471 | } |
476 | qApp->processEvents(); | ||
477 | length+=write(wav, monoBuffer, result/2); | 472 | length+=write(wav, monoBuffer, result/2); |
478 | } | 473 | } |
479 | length += result; | 474 | length += result; |
480 | printf("%d\r",length); | 475 | // printf("%d\r",length); |
481 | fflush(stdout); | 476 | // fflush(stdout); |
482 | |||
483 | qApp->processEvents(); | ||
484 | } | 477 | } |
485 | 478 | ||
@@ -493,6 +486,4 @@ void VMemo::record(void) | |||
493 | while(recording) { | 486 | while(recording) { |
494 | result = read(dsp, sound, 512); // 8192 | 487 | result = read(dsp, sound, 512); // 8192 |
495 | qApp->processEvents(); | ||
496 | |||
497 | write(wav, sound, result); | 488 | write(wav, sound, result); |
498 | length += result; | 489 | length += result; |
@@ -500,6 +491,6 @@ void VMemo::record(void) | |||
500 | qApp->processEvents(); | 491 | qApp->processEvents(); |
501 | } | 492 | } |
502 | printf("%d\r",length); | 493 | // printf("%d\r",length); |
503 | fflush(stdout); | 494 | // fflush(stdout); |
504 | // qDebug("file has length of %d lasting %d seconds", | 495 | // qDebug("file has length of %d lasting %d seconds", |
505 | // length, (( length / speed) / channels) / 2 ); | 496 | // length, (( length / speed) / channels) / 2 ); |