author | jeremy <jeremy> | 2002-02-16 03:38:51 (UTC) |
---|---|---|
committer | jeremy <jeremy> | 2002-02-16 03:38:51 (UTC) |
commit | f866bbd2fd77f07cff04a702eb52e59fcc0013b7 (patch) (side-by-side diff) | |
tree | f5a3dbb1577c77e9a5cc8efa5d66b1b103989e0a | |
parent | f8744f9a9a59f7968ddbac66c927ba8da358f223 (diff) | |
download | opie-f866bbd2fd77f07cff04a702eb52e59fcc0013b7.zip opie-f866bbd2fd77f07cff04a702eb52e59fcc0013b7.tar.gz opie-f866bbd2fd77f07cff04a702eb52e59fcc0013b7.tar.bz2 |
Left a debug message box in the code. Opps. That was removed ("Recording
Done")
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 006e0ba..aa23ba7 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -338,66 +338,66 @@ int VMemo::openWAV(const char *filename) 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; //, i; char sound[512]; //, leftBuffer[256], rightBuffer[256]; qWarning("VMemo::record()"); while(recording) { result = read(dsp, sound, 512); // 8192 qApp->processEvents(); /* attempt to write only one channel...didnt work. for (i = 0; i < result; i++) { leftBuffer[i] = sound[2*i]; rightBuffer[i] = sound[2*i+1]; } */ qApp->processEvents(); /* needed to only write one channel. comment out above "write/length" code. write(wav, leftBuffer, result / 2); length += result/2; */ write(wav, sound, result); length += result; qApp->processEvents(); } qWarning("VMemo::record() -> Done recording"); qWarning("VMemo::record() -> Closing dsp"); value = length+36; lseek(wav, 4, SEEK_SET); write(wav, &value, 4); lseek(wav, 40, SEEK_SET); write(wav, &length, 4); track.close(); if( ioctl( dsp, SNDCTL_DSP_RESET,0) == -1) perror("ioctl(\"SNDCTL_DSP_RESET\")"); ::close(dsp); qWarning("VMemo::record() -> playing done recording sound"); QSound::play(Resource::findSound("vmemoe")); qWarning("VMemo::record() -> terminating"); - QMessageBox::information(0, "VMemo", "Recording Done", 1); + //QMessageBox::information(0, "VMemo", "Recording Done", 1); } |