author | ar <ar> | 2004-05-12 20:25:15 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-12 20:25:15 (UTC) |
commit | 4b9dcabe79d0d3e73d638981ea045c4969bf21fc (patch) (unidiff) | |
tree | a29198fb88fee4fbdceba3acec7457fdc31668f8 /noncore/multimedia/opierec/wavFile.cpp | |
parent | 00efb6af5ff15e43913f91fcc5c33805233c7e91 (diff) | |
download | opie-4b9dcabe79d0d3e73d638981ea045c4969bf21fc.zip opie-4b9dcabe79d0d3e73d638981ea045c4969bf21fc.tar.gz opie-4b9dcabe79d0d3e73d638981ea045c4969bf21fc.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'noncore/multimedia/opierec/wavFile.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opierec/wavFile.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp index 7e9b50f..fc0130c 100644 --- a/noncore/multimedia/opierec/wavFile.cpp +++ b/noncore/multimedia/opierec/wavFile.cpp | |||
@@ -151,10 +151,11 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) { | |||
151 | 151 | ||
152 | strncpy((*hdr).dataID, "data", 4); | 152 | strncpy((*hdr).dataID, "data", 4); |
153 | 153 | ||
154 | write( fd,hdr, sizeof(*hdr)); | 154 | write( fd,hdr, sizeof(*hdr)); |
155 | qDebug("writing header: bitrate%d, samplerate %d, channels %d", | 155 | odebug << "writing header: bitrate " << wavResolution |
156 | wavResolution, wavSampleRate, wavChannels); | 156 | << ", samplerate " << wavSampleRate |
157 | << ", channels " << wavChannels << oendl; | ||
157 | return true; | 158 | return true; |
158 | } | 159 | } |
159 | 160 | ||
160 | bool WavFile::adjustHeaders(int fd, int total) { | 161 | bool WavFile::adjustHeaders(int fd, int total) { |
@@ -211,10 +212,9 @@ int WavFile::parseWavHeader(int fd) { | |||
211 | odebug << "Could not read format chunk.\n" << oendl; | 212 | odebug << "Could not read format chunk.\n" << oendl; |
212 | return -1; | 213 | return -1; |
213 | } | 214 | } |
214 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { | 215 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { |
215 | qDebug("Wave file contains unknown format." | 216 | odebug << "Wave file contains unknown format. Unable to continue.\n" << oendl; |
216 | " Unable to continue.\n"); | ||
217 | return -1; | 217 | return -1; |
218 | } | 218 | } |
219 | wavFormat = fmt; | 219 | wavFormat = fmt; |
220 | // compressionFormat=fmt; | 220 | // compressionFormat=fmt; |
@@ -265,10 +265,12 @@ int WavFile::parseWavHeader(int fd) { | |||
265 | odebug << "Could not read from sound file.\n" << oendl; | 265 | odebug << "Could not read from sound file.\n" << oendl; |
266 | return -1; | 266 | return -1; |
267 | } else { | 267 | } else { |
268 | wavNumberSamples = longdata; | 268 | wavNumberSamples = longdata; |
269 | qDebug("file has length of %d \nlasting %d seconds", (int)longdata, | 269 | odebug << "file hase length of " << (int)longdata << "\n" |
270 | (int)(( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)) ); | 270 | << "lasting " |
271 | << (int)(( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)) | ||
272 | << " seconds" << oendl; | ||
271 | // wavSeconds = (( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)); | 273 | // wavSeconds = (( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)); |
272 | 274 | ||
273 | return longdata; | 275 | return longdata; |
274 | } | 276 | } |