-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 58 |
1 files changed, 35 insertions, 23 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 10a947e..b29ee62 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -411,2 +411,4 @@ int VMemo::openDSP() | |||
411 | 411 | ||
412 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; //mute | ||
413 | |||
412 | return 1; | 414 | return 1; |
@@ -461,2 +463,4 @@ void VMemo::record(void) | |||
461 | 463 | ||
464 | |||
465 | |||
462 | while(recording) { | 466 | while(recording) { |
@@ -466,3 +470,3 @@ void VMemo::record(void) | |||
466 | 470 | ||
467 | if(systemZaurus) { | 471 | // if(systemZaurus) { |
468 | for (int i = 0; i < result; i++) { //since Z is mono do normally | 472 | for (int i = 0; i < result; i++) { //since Z is mono do normally |
@@ -475,17 +479,17 @@ void VMemo::record(void) | |||
475 | 479 | ||
476 | } else { //ipaq /stereo inputs | 480 | // } else { //ipaq /stereo inputs |
477 | 481 | ||
478 | 482 | ||
479 | for (int i = 0; i < result; i+=2) { | 483 | // for (int i = 0; i < result; i+=2) { |
480 | monoBuffer[j] = sound[i]; | 484 | // monoBuffer[j] = sound[i]; |
481 | // monoBuffer[j] = (sound[i]+sound[i+1])/2; | 485 | // // monoBuffer[j] = (sound[i]+sound[i+1])/2; |
482 | 486 | ||
483 | j++; | 487 | // j++; |
484 | } | 488 | // } |
485 | 489 | ||
486 | length+=write(wav, monoBuffer, result); | 490 | // length+=write(wav, monoBuffer, result); |
487 | if(length<0) | 491 | // if(length<0) |
488 | recording=false; | 492 | // recording=false; |
489 | // length+=write(wav, monoBuffer, result/2); | 493 | // // length+=write(wav, monoBuffer, result/2); |
490 | } | 494 | // } |
491 | qApp->processEvents(); | 495 | qApp->processEvents(); |
@@ -502,3 +506,3 @@ void VMemo::record(void) | |||
502 | 506 | ||
503 | if(systemZaurus) { | 507 | // if(systemZaurus) { |
504 | 508 | ||
@@ -510,15 +514,15 @@ void VMemo::record(void) | |||
510 | 514 | ||
511 | } else { //ipaq /stereo inputs | 515 | // } else { //ipaq /stereo inputs |
512 | 516 | ||
513 | for (int i = 0; i < result; i+=2) { | 517 | // for (int i = 0; i < result; i+=2) { |
514 | monoBuffer[j] = (sound[i]+sound[i+1])/2; | 518 | // monoBuffer[j] = (sound[i]+sound[i+1])/2; |
515 | j++; | 519 | // j++; |
516 | } | 520 | // } |
517 | 521 | ||
518 | length+=write(wav, monoBuffer, result/2); | 522 | // length+=write(wav, monoBuffer, result/2); |
519 | 523 | ||
520 | if(length<0) | 524 | // if(length<0) |
521 | recording=false; | 525 | // recording=false; |
522 | 526 | ||
523 | } | 527 | // } |
524 | length += result; | 528 | length += result; |
@@ -531,3 +535,4 @@ void VMemo::record(void) | |||
531 | 535 | ||
532 | } else { // this is specific for ipaqs that do not have 8 bit capabilities | 536 | } else { // 16 bit only capabilities |
537 | |||
533 | 538 | ||
@@ -581,2 +586,9 @@ void VMemo::record(void) | |||
581 | QSound::play(Resource::findSound("vmemoe")); | 586 | QSound::play(Resource::findSound("vmemoe")); |
587 | |||
588 | Config cfg("qpe"); | ||
589 | cfg.setGroup("Volume"); | ||
590 | QString foo = cfg.readEntry("Mute","TRUE"); | ||
591 | if(foo.find("TRUE",0,TRUE) != -1) | ||
592 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; //mute | ||
593 | |||
582 | } | 594 | } |