summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index e25a1ab..10a947e 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -456,49 +456,49 @@ void VMemo::record(void)
456 msg.sprintf("Recording format zaurus"); 456 msg.sprintf("Recording format zaurus");
457 qDebug(msg); 457 qDebug(msg);
458 signed short sound[512], monoBuffer[512]; 458 signed short sound[512], monoBuffer[512];
459 459
460 if(format==AFMT_S16_LE) { 460 if(format==AFMT_S16_LE) {
461 461
462 while(recording) { 462 while(recording) {
463 463
464 result = read(dsp, sound, 512); // 8192 464 result = read(dsp, sound, 512); // 8192
465 int j=0; 465 int j=0;
466 466
467 if(systemZaurus) { 467 if(systemZaurus) {
468 for (int i = 0; i < result; i++) { //since Z is mono do normally 468 for (int i = 0; i < result; i++) { //since Z is mono do normally
469 monoBuffer[i] = sound[i]; 469 monoBuffer[i] = sound[i];
470 } 470 }
471 471
472 length+=write(wav, monoBuffer, result); 472 length+=write(wav, monoBuffer, result);
473 if(length<0) 473 if(length<0)
474 recording=false; 474 recording=false;
475 475
476 } else { //ipaq /stereo inputs 476 } else { //ipaq /stereo inputs
477 477
478 478
479 for (int i = 0; i < result; i+=2) { 479 for (int i = 0; i < result; i+=2) {
480/ monoBuffer[j] = sound[i]; 480 monoBuffer[j] = sound[i];
481 // monoBuffer[j] = (sound[i]+sound[i+1])/2; 481 // monoBuffer[j] = (sound[i]+sound[i+1])/2;
482 482
483 j++; 483 j++;
484 } 484 }
485 485
486 length+=write(wav, monoBuffer, result); 486 length+=write(wav, monoBuffer, result);
487 if(length<0) 487 if(length<0)
488 recording=false; 488 recording=false;
489 // length+=write(wav, monoBuffer, result/2); 489 // length+=write(wav, monoBuffer, result/2);
490 } 490 }
491 qApp->processEvents(); 491 qApp->processEvents();
492// printf("%d\r",length); 492// printf("%d\r",length);
493// fflush(stdout); 493// fflush(stdout);
494 } 494 }
495 495
496} else { //AFMT_U8 496} else { //AFMT_U8
497 // 8bit unsigned 497 // 8bit unsigned
498 unsigned short sound[512], monoBuffer[512]; 498 unsigned short sound[512], monoBuffer[512];
499 while(recording) { 499 while(recording) {
500 result = read(dsp, sound, 512); // 8192 500 result = read(dsp, sound, 512); // 8192
501 int j=0; 501 int j=0;
502 502
503 if(systemZaurus) { 503 if(systemZaurus) {
504 504