Diffstat (limited to 'noncore/multimedia/opierec/wavFile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opierec/wavFile.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp index b177c91..987fa32 100644 --- a/noncore/multimedia/opierec/wavFile.cpp +++ b/noncore/multimedia/opierec/wavFile.cpp @@ -146,29 +146,29 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) { (*hdr).nBlockAlign = wavChannels*( wavResolution/8); //block align (*hdr).bitsPerSample = wavResolution; //bits per sample 8, or 16 strncpy((*hdr).dataID, "data", 4); write( fd,hdr, sizeof(*hdr)); -// qDebug("writing header: bitrate%d, samplerate %d, channels %d", -// wavResolution, wavSampleRate, wavChannels); + qDebug("writing header: bitrate%d, samplerate %d, channels %d", + wavResolution, wavSampleRate, wavChannels); return true; } bool WavFile::adjustHeaders(int fd, int total) { lseek(fd, 4, SEEK_SET); int i = total + 36; write( fd, &i, sizeof(i)); lseek( fd, 40, SEEK_SET); write( fd, &total, sizeof(total)); -// qDebug("adjusting header %d", total); + qDebug("adjusting header %d", total); return true; } int WavFile::parseWavHeader(int fd) { -// qDebug("Parsing wav header"); + qDebug("Parsing wav header"); char string[4]; int found; short fmt; unsigned short ch, bitrate; unsigned long samplerrate, longdata; @@ -291,16 +291,21 @@ return wavFormat; int WavFile::getResolution() { return wavResolution; } int WavFile::getSampleRate() { -return wavSampleRate; + return wavSampleRate; } int WavFile::getNumberSamples() { -return wavNumberSamples; + return wavNumberSamples; } bool WavFile::isTempFile() { return useTmpFile; } + +int WavFile::getChannels() { + + return wavChannels; +} |