-rw-r--r-- | noncore/multimedia/opierec/wavFile.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp index fc0130c..360b884 100644 --- a/noncore/multimedia/opierec/wavFile.cpp +++ b/noncore/multimedia/opierec/wavFile.cpp | |||
@@ -154,5 +154,3 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) { | |||
154 | write( fd,hdr, sizeof(*hdr)); | 154 | write( fd,hdr, sizeof(*hdr)); |
155 | odebug << "writing header: bitrate " << wavResolution | 155 | odebug << "writing header: bitrate " << wavResolution << ", samplerate " << wavSampleRate << ", channels " << wavChannels << oendl; |
156 | << ", samplerate " << wavSampleRate | ||
157 | << ", channels " << wavChannels << oendl; | ||
158 | return true; | 156 | return true; |
@@ -179,3 +177,3 @@ int WavFile::parseWavHeader(int fd) { | |||
179 | if (read(fd, string, 4) < 4) { | 177 | if (read(fd, string, 4) < 4) { |
180 | odebug << " Could not read from sound file.\n" << oendl; | 178 | odebug << " Could not read from sound file." << oendl; |
181 | return -1; | 179 | return -1; |
@@ -183,3 +181,3 @@ int WavFile::parseWavHeader(int fd) { | |||
183 | if (strncmp(string, "RIFF", 4)) { | 181 | if (strncmp(string, "RIFF", 4)) { |
184 | odebug << " not a valid WAV file.\n" << oendl; | 182 | odebug << " not a valid WAV file." << oendl; |
185 | return -1; | 183 | return -1; |
@@ -188,3 +186,3 @@ int WavFile::parseWavHeader(int fd) { | |||
188 | if (read(fd, string, 4) < 4) { | 186 | if (read(fd, string, 4) < 4) { |
189 | odebug << "Could not read from sound file.\n" << oendl; | 187 | odebug << "Could not read from sound file." << oendl; |
190 | return -1; | 188 | return -1; |
@@ -192,3 +190,3 @@ int WavFile::parseWavHeader(int fd) { | |||
192 | if (strncmp(string, "WAVE", 4)) { | 190 | if (strncmp(string, "WAVE", 4)) { |
193 | odebug << "not a valid WAV file.\n" << oendl; | 191 | odebug << "not a valid WAV file." << oendl; |
194 | return -1; | 192 | return -1; |
@@ -199,3 +197,3 @@ int WavFile::parseWavHeader(int fd) { | |||
199 | if (read(fd, string, 4) < 4) { | 197 | if (read(fd, string, 4) < 4) { |
200 | odebug << "Could not read from sound file.\n" << oendl; | 198 | odebug << "Could not read from sound file." << oendl; |
201 | return -1; | 199 | return -1; |
@@ -204,3 +202,3 @@ int WavFile::parseWavHeader(int fd) { | |||
204 | if (read(fd, &longdata, 4) < 4) { | 202 | if (read(fd, &longdata, 4) < 4) { |
205 | odebug << "Could not read from sound file.\n" << oendl; | 203 | odebug << "Could not read from sound file." << oendl; |
206 | return -1; | 204 | return -1; |
@@ -211,3 +209,3 @@ int WavFile::parseWavHeader(int fd) { | |||
211 | if (read(fd, &fmt, 2) < 2) { | 209 | if (read(fd, &fmt, 2) < 2) { |
212 | odebug << "Could not read format chunk.\n" << oendl; | 210 | odebug << "Could not read format chunk." << oendl; |
213 | return -1; | 211 | return -1; |
@@ -215,3 +213,3 @@ int WavFile::parseWavHeader(int fd) { | |||
215 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { | 213 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { |
216 | odebug << "Wave file contains unknown format. Unable to continue.\n" << oendl; | 214 | odebug << "Wave file contains unknown format. Unable to continue." << oendl; |
217 | return -1; | 215 | return -1; |
@@ -222,3 +220,3 @@ int WavFile::parseWavHeader(int fd) { | |||
222 | if (read(fd, &ch, 2) < 2) { | 220 | if (read(fd, &ch, 2) < 2) { |
223 | odebug << "Could not read format chunk.\n" << oendl; | 221 | odebug << "Could not read format chunk." << oendl; |
224 | return -1; | 222 | return -1; |
@@ -229,3 +227,3 @@ int WavFile::parseWavHeader(int fd) { | |||
229 | if (read(fd, &samplerrate, 4) < 4) { | 227 | if (read(fd, &samplerrate, 4) < 4) { |
230 | odebug << "Could not read from format chunk.\n" << oendl; | 228 | odebug << "Could not read from format chunk." << oendl; |
231 | return -1; | 229 | return -1; |
@@ -238,3 +236,3 @@ int WavFile::parseWavHeader(int fd) { | |||
238 | if (read(fd, &bitrate, 2) < 2) { | 236 | if (read(fd, &bitrate, 2) < 2) { |
239 | odebug << "Could not read format chunk.\n" << oendl; | 237 | odebug << "Could not read format chunk." << oendl; |
240 | return -1; | 238 | return -1; |
@@ -251,3 +249,3 @@ int WavFile::parseWavHeader(int fd) { | |||
251 | if (read(fd, string, 4) < 4) { | 249 | if (read(fd, string, 4) < 4) { |
252 | odebug << "Could not read from sound file.\n" << oendl; | 250 | odebug << "Could not read from sound file." << oendl; |
253 | return -1; | 251 | return -1; |
@@ -257,3 +255,3 @@ int WavFile::parseWavHeader(int fd) { | |||
257 | if (read(fd, &longdata, 4)<4) { | 255 | if (read(fd, &longdata, 4)<4) { |
258 | odebug << "Could not read from sound file.\n" << oendl; | 256 | odebug << "Could not read from sound file." << oendl; |
259 | return -1; | 257 | return -1; |
@@ -264,3 +262,3 @@ int WavFile::parseWavHeader(int fd) { | |||
264 | if (read(fd, &longdata, 4) < 4) { | 262 | if (read(fd, &longdata, 4) < 4) { |
265 | odebug << "Could not read from sound file.\n" << oendl; | 263 | odebug << "Could not read from sound file." << oendl; |
266 | return -1; | 264 | return -1; |
@@ -268,3 +266,3 @@ int WavFile::parseWavHeader(int fd) { | |||
268 | wavNumberSamples = longdata; | 266 | wavNumberSamples = longdata; |
269 | odebug << "file hase length of " << (int)longdata << "\n" | 267 | odebug << "file hase length of " << (int)longdata << "" |
270 | << "lasting " | 268 | << "lasting " |