author | llornkcor <llornkcor> | 2002-06-23 14:43:54 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-23 14:43:54 (UTC) |
commit | 6382b7352205a71557bd87b4f43d7f19f7f3330e (patch) (side-by-side diff) | |
tree | 16097c620467a774336a717dba4b4f316e6208c4 | |
parent | 8672a04720e7421e7f41bbf49364bcc1df910bb2 (diff) | |
download | opie-6382b7352205a71557bd87b4f43d7f19f7f3330e.zip opie-6382b7352205a71557bd87b4f43d7f19f7f3330e.tar.gz opie-6382b7352205a71557bd87b4f43d7f19f7f3330e.tar.bz2 |
took out unreachable code
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 4278f46..cfa07b4 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -432,144 +432,127 @@ int VMemo::openWAV(const char *filename) wh.sub_chunk = FMT; wh.sc_len = 16; wh.format = PCM_CODE; wh.modus = channels; wh.sample_fq = speed; wh.byte_p_sec = speed * channels * resolution/8; wh.byte_p_spl = channels * (resolution / 8); wh.bit_p_spl = resolution; wh.data_chunk = DATA; wh.data_length= 0; // qDebug("Write header channels %d, speed %d, b/s %d, blockalign %d, bitrate %d" // , wh.modus, wh.sample_fq, wh.byte_p_sec, wh.byte_p_spl, wh.bit_p_spl ); write (wav, &wh, sizeof(WaveHeader)); return 1; } void VMemo::record(void) { int length=0, result, value; QString msg; msg.sprintf("Recording format %d", format); qDebug(msg); if(systemZaurus) { msg.sprintf("Recording format zaurus"); qDebug(msg); signed short sound[512], monoBuffer[512]; if(format==AFMT_S16_LE) { while(recording) { result = read(dsp, sound, 512); // 8192 int j=0; // if(systemZaurus) { for (int i = 0; i < result; i++) { //since Z is mono do normally monoBuffer[i] = sound[i]; } length+=write(wav, monoBuffer, result); if(length<0) recording=false; - // } else { //ipaq /stereo inputs - - // for (int i = 0; i < result; i+=2) { // monoBuffer[j] = sound[i]; // // monoBuffer[j] = (sound[i]+sound[i+1])/2; // j++; // } - - // length+=write(wav, monoBuffer, result); - // if(length<0) - // recording=false; - // // length+=write(wav, monoBuffer, result/2); - // } qApp->processEvents(); // printf("%d\r",length); // fflush(stdout); } } else { //AFMT_U8 // 8bit unsigned unsigned short sound[512], monoBuffer[512]; while(recording) { result = read(dsp, sound, 512); // 8192 int j=0; // if(systemZaurus) { for (int i = 0; i < result; i++) { //since Z is mono do normally monoBuffer[i] = sound[i]; } length+=write(wav, monoBuffer, result); - // } else { //ipaq /stereo inputs - // for (int i = 0; i < result; i+=2) { // monoBuffer[j] = (sound[i]+sound[i+1])/2; // j++; // } - // length+=write(wav, monoBuffer, result/2); - - // if(length<0) - // recording=false; - - // } length += result; // printf("%d\r",length); // fflush(stdout); } qApp->processEvents(); } } else { // 16 bit only capabilities msg.sprintf("Recording format other"); qDebug(msg); signed short sound[512], monoBuffer[512]; while(recording) { result = read(dsp, sound, 512); // 8192 write(wav, sound, result); length += result; if(length<0) { recording=false; perror("dev/dsp's is a lookin' messy"); QMessageBox::message("Vmemo"," Done1 recording\n"+ fileName); } // printf("%d\r",length); // fflush(stdout); qApp->processEvents(); } // qDebug("file has length of %d lasting %d seconds", // length, (( length / speed) / channels) / 2 ); // medialplayer states wrong length in secs } //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<// value = length+36; lseek(wav, 4, SEEK_SET); write(wav, &value, 4); lseek(wav, 40, SEEK_SET); write(wav, &length, 4); track.close(); |