summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opierec/wavFile.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opierec/wavFile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opierec/wavFile.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp
index b53c416..a0423f0 100644
--- a/noncore/multimedia/opierec/wavFile.cpp
+++ b/noncore/multimedia/opierec/wavFile.cpp
@@ -154,3 +154,3 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) {
154 write( fd,hdr, sizeof(*hdr)); 154 write( fd,hdr, sizeof(*hdr));
155 owarn << "writing header: bitrate " << wavResolution << ", samplerate " << wavSampleRate << ", channels " << wavChannels << oendl; 155// owarn << "writing header: bitrate " << wavResolution << ", samplerate " << wavSampleRate << ", channels " << wavChannels << oendl;
156 return true; 156 return true;
@@ -164,3 +164,3 @@ bool WavFile::adjustHeaders(int fd, int total) {
164 write( fd, &total, sizeof(total)); 164 write( fd, &total, sizeof(total));
165 owarn << "adjusting header " << total << "" << oendl; 165// owarn << "adjusting header " << total << "" << oendl;
166 return true; 166 return true;
@@ -169,3 +169,3 @@ bool WavFile::adjustHeaders(int fd, int total) {
169int WavFile::parseWavHeader(int fd) { 169int WavFile::parseWavHeader(int fd) {
170 owarn << "Parsing wav header" << oendl; 170// owarn << "Parsing wav header" << oendl;
171 char string[4]; 171 char string[4];
@@ -177,3 +177,3 @@ int WavFile::parseWavHeader(int fd) {
177 if (read(fd, string, 4) < 4) { 177 if (read(fd, string, 4) < 4) {
178 owarn << " Could not read from sound file." << oendl; 178// owarn << " Could not read from sound file." << oendl;
179 return -1; 179 return -1;
@@ -181,3 +181,3 @@ int WavFile::parseWavHeader(int fd) {
181 if (strncmp(string, "RIFF", 4)) { 181 if (strncmp(string, "RIFF", 4)) {
182 owarn << " not a valid WAV file." << oendl; 182// owarn << " not a valid WAV file." << oendl;
183 return -1; 183 return -1;
@@ -186,3 +186,3 @@ int WavFile::parseWavHeader(int fd) {
186 if (read(fd, string, 4) < 4) { 186 if (read(fd, string, 4) < 4) {
187 owarn << "Could not read from sound file." << oendl; 187// owarn << "Could not read from sound file." << oendl;
188 return -1; 188 return -1;
@@ -190,3 +190,3 @@ int WavFile::parseWavHeader(int fd) {
190 if (strncmp(string, "WAVE", 4)) { 190 if (strncmp(string, "WAVE", 4)) {
191 owarn << "not a valid WAV file." << oendl; 191// owarn << "not a valid WAV file." << oendl;
192 return -1; 192 return -1;
@@ -197,3 +197,3 @@ int WavFile::parseWavHeader(int fd) {
197 if (read(fd, string, 4) < 4) { 197 if (read(fd, string, 4) < 4) {
198 owarn << "Could not read from sound file." << oendl; 198// owarn << "Could not read from sound file." << oendl;
199 return -1; 199 return -1;
@@ -202,3 +202,3 @@ int WavFile::parseWavHeader(int fd) {
202 if (read(fd, &longdata, 4) < 4) { 202 if (read(fd, &longdata, 4) < 4) {
203 owarn << "Could not read from sound file." << oendl; 203// owarn << "Could not read from sound file." << oendl;
204 return -1; 204 return -1;
@@ -209,3 +209,3 @@ int WavFile::parseWavHeader(int fd) {
209 if (read(fd, &fmt, 2) < 2) { 209 if (read(fd, &fmt, 2) < 2) {
210 owarn << "Could not read format chunk." << oendl; 210// owarn << "Could not read format chunk." << oendl;
211 return -1; 211 return -1;
@@ -213,3 +213,3 @@ int WavFile::parseWavHeader(int fd) {
213 if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { 213 if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) {
214 owarn << "Wave file contains unknown format. Unable to continue." << oendl; 214// owarn << "Wave file contains unknown format. Unable to continue." << oendl;
215 return -1; 215 return -1;
@@ -218,5 +218,5 @@ int WavFile::parseWavHeader(int fd) {
218 // compressionFormat=fmt; 218 // compressionFormat=fmt;
219 owarn << "compressionFormat is " << fmt << "" << oendl; 219// owarn << "compressionFormat is " << fmt << "" << oendl;
220 if (read(fd, &ch, 2) < 2) { 220 if (read(fd, &ch, 2) < 2) {
221 owarn << "Could not read format chunk." << oendl; 221// owarn << "Could not read format chunk." << oendl;
222 return -1; 222 return -1;
@@ -224,6 +224,6 @@ int WavFile::parseWavHeader(int fd) {
224 wavChannels = ch; 224 wavChannels = ch;
225 owarn << "File has " << ch << " channels" << oendl; 225// owarn << "File has " << ch << " channels" << oendl;
226 } 226 }
227 if (read(fd, &samplerrate, 4) < 4) { 227 if (read(fd, &samplerrate, 4) < 4) {
228 owarn << "Could not read from format chunk." << oendl; 228// owarn << "Could not read from format chunk." << oendl;
229 return -1; 229 return -1;
@@ -232,3 +232,3 @@ int WavFile::parseWavHeader(int fd) {
232 // sampleRate = samplerrate; 232 // sampleRate = samplerrate;
233 owarn << "File has samplerate of " << (int) samplerrate << "" << oendl; 233// owarn << "File has samplerate of " << (int) samplerrate << "" << oendl;
234 } 234 }
@@ -236,3 +236,3 @@ int WavFile::parseWavHeader(int fd) {
236 if (read(fd, &bitrate, 2) < 2) { 236 if (read(fd, &bitrate, 2) < 2) {
237 owarn << "Could not read format chunk." << oendl; 237// owarn << "Could not read format chunk." << oendl;
238 return -1; 238 return -1;
@@ -241,3 +241,3 @@ int WavFile::parseWavHeader(int fd) {
241 // resolution = bitrate; 241 // resolution = bitrate;
242 owarn << "File has bitrate of " << bitrate << "" << oendl; 242// owarn << "File has bitrate of " << bitrate << "" << oendl;
243 } 243 }