Archived

This topic is now archived and is closed to further replies.

Wave Conversions

This topic is 6033 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok I''m writing a few functions to convert between diffrent bits per sample/samples per second/channels for wave files... I''ve run into a problem... I''m having problems when it comes to switching between diffrent bits per sample... the end result of it is what kinda sounds like the original file with alot of white noise mixed in... to convert between them I''ve been shifting the samples 8 bits one way or another depending on what is needed... this is the only thing I can think of it being... the other conversions don''t give the slightest bit of noise but this one its almost implosable to here the original wave... anyone got a clue about what is going on?

Share this post


Link to post
Share on other sites
It could be aliasing error from the bit shifts...
Try linear interpolation and if that helps then try cubic splines...

Or your code might be crap, I always seems to have backwards/triangle wave time problems when I work with bit streams...

Magmai Kai Holmlor
- The disgruntled & disillusioned


Edited by - Magmai Kai Holmlor on June 5, 2001 9:13:32 PM

Share this post


Link to post
Share on other sites
OK, here''s the deal: bits per sample should be easy to do, but the problem is that 8-bit wave files are stored in a completely different manner than 16-bit wave files. I don''t know who''s responsible, but there you have it. 16-bit wave files use signed shorts (i.e. 0V output is 0), and 8-bit wave files use unsigned bytes (0V output is 127 or 128, forget which). So if you account for that, shifting should be the answer.

However, resampling is going to be a problem. Upsampling is probably fine, but downsampling requires you to filter out data above the new sampling frequency, otherwise high-frequency data will alias into your baseband.

Share this post


Link to post
Share on other sites