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 | |||
@@ -149,8 +149,8 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) { | |||
149 | strncpy((*hdr).dataID, "data", 4); | 149 | strncpy((*hdr).dataID, "data", 4); |
150 | 150 | ||
151 | write( fd,hdr, sizeof(*hdr)); | 151 | write( fd,hdr, sizeof(*hdr)); |
152 | // qDebug("writing header: bitrate%d, samplerate %d, channels %d", | 152 | qDebug("writing header: bitrate%d, samplerate %d, channels %d", |
153 | // wavResolution, wavSampleRate, wavChannels); | 153 | wavResolution, wavSampleRate, wavChannels); |
154 | return true; | 154 | return true; |
155 | } | 155 | } |
156 | 156 | ||
@@ -160,12 +160,12 @@ bool WavFile::adjustHeaders(int fd, int total) { | |||
160 | write( fd, &i, sizeof(i)); | 160 | write( fd, &i, sizeof(i)); |
161 | lseek( fd, 40, SEEK_SET); | 161 | lseek( fd, 40, SEEK_SET); |
162 | write( fd, &total, sizeof(total)); | 162 | write( fd, &total, sizeof(total)); |
163 | // qDebug("adjusting header %d", total); | 163 | qDebug("adjusting header %d", total); |
164 | return true; | 164 | return true; |
165 | } | 165 | } |
166 | 166 | ||
167 | int WavFile::parseWavHeader(int fd) { | 167 | int WavFile::parseWavHeader(int fd) { |
168 | // qDebug("Parsing wav header"); | 168 | qDebug("Parsing wav header"); |
169 | char string[4]; | 169 | char string[4]; |
170 | int found; | 170 | int found; |
171 | short fmt; | 171 | short fmt; |
@@ -294,13 +294,18 @@ return wavResolution; | |||
294 | } | 294 | } |
295 | 295 | ||
296 | int WavFile::getSampleRate() { | 296 | int WavFile::getSampleRate() { |
297 | return wavSampleRate; | 297 | return wavSampleRate; |
298 | } | 298 | } |
299 | 299 | ||
300 | int WavFile::getNumberSamples() { | 300 | int WavFile::getNumberSamples() { |
301 | return wavNumberSamples; | 301 | return wavNumberSamples; |
302 | } | 302 | } |
303 | 303 | ||
304 | bool WavFile::isTempFile() { | 304 | bool WavFile::isTempFile() { |
305 | return useTmpFile; | 305 | return useTmpFile; |
306 | } | 306 | } |
307 | |||
308 | int WavFile::getChannels() { | ||
309 | |||
310 | return wavChannels; | ||
311 | } | ||