author | llornkcor <llornkcor> | 2002-06-23 13:46:45 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-23 13:46:45 (UTC) |
commit | 6563867791664113808d1b287510ca52b5f840e0 (patch) (side-by-side diff) | |
tree | 643d1a90c0df95095b721b2f4c50af6627eec1a1 | |
parent | f9c5bf03ae5a89ef5cda69e37cc2732f4e4f2808 (diff) | |
download | opie-6563867791664113808d1b287510ca52b5f840e0.zip opie-6563867791664113808d1b287510ca52b5f840e0.tar.gz opie-6563867791664113808d1b287510ca52b5f840e0.tar.bz2 |
automute and unmute
-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() + QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; //mute + return 1; @@ -461,2 +463,4 @@ void VMemo::record(void) + + while(recording) { @@ -466,3 +470,3 @@ void VMemo::record(void) - if(systemZaurus) { + // if(systemZaurus) { for (int i = 0; i < result; i++) { //since Z is mono do normally @@ -475,17 +479,17 @@ void VMemo::record(void) - } else { //ipaq /stereo inputs + // } else { //ipaq /stereo inputs - for (int i = 0; i < result; i+=2) { - monoBuffer[j] = sound[i]; - // monoBuffer[j] = (sound[i]+sound[i+1])/2; + // for (int i = 0; i < result; i+=2) { + // monoBuffer[j] = sound[i]; + // // monoBuffer[j] = (sound[i]+sound[i+1])/2; - j++; - } + // j++; + // } - length+=write(wav, monoBuffer, result); - if(length<0) - recording=false; - // length+=write(wav, monoBuffer, result/2); - } + // length+=write(wav, monoBuffer, result); + // if(length<0) + // recording=false; + // // length+=write(wav, monoBuffer, result/2); + // } qApp->processEvents(); @@ -502,3 +506,3 @@ void VMemo::record(void) - if(systemZaurus) { + // if(systemZaurus) { @@ -510,15 +514,15 @@ void VMemo::record(void) - } else { //ipaq /stereo inputs + // } else { //ipaq /stereo inputs - for (int i = 0; i < result; i+=2) { - monoBuffer[j] = (sound[i]+sound[i+1])/2; - j++; - } + // for (int i = 0; i < result; i+=2) { + // monoBuffer[j] = (sound[i]+sound[i+1])/2; + // j++; + // } - length+=write(wav, monoBuffer, result/2); + // length+=write(wav, monoBuffer, result/2); - if(length<0) - recording=false; + // if(length<0) + // recording=false; - } + // } length += result; @@ -531,3 +535,4 @@ void VMemo::record(void) - } else { // this is specific for ipaqs that do not have 8 bit capabilities + } else { // 16 bit only capabilities + @@ -581,2 +586,9 @@ void VMemo::record(void) QSound::play(Resource::findSound("vmemoe")); + + Config cfg("qpe"); + cfg.setGroup("Volume"); + QString foo = cfg.readEntry("Mute","TRUE"); + if(foo.find("TRUE",0,TRUE) != -1) + QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; //mute + } |