Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to recreate a wav file after manipulating its sample values which i have stored in an array (of short). I get no error in my code but the audio quality is not good. The output sounds similar to the original voice but is a very hoarse sound. Can anybody suggest me what could be the possible reason for this hoarseness?
Posted
Updated 26-Aug-12 3:17am
v2
Comments
Kenneth Haugland 26-Aug-12 9:19am    
Is the sound cutoff (meaning the values in the file get peaks and bottoms at the maximum and minimum storage), how is the recording, did you filter it etc...
Zoltán Zörgő 26-Aug-12 9:24am    
Look at the waveform with an editor, like Audacity. If you used short's, that means you assumed that the original file had 8 bit sampling. Was this assumption correct?
sai krishna 6-Mar-13 4:27am    
Hello,
I have two .wav files.How can I subtract one sound from the other.
Please do reply.......

Don't forget, that a WAVE file is a simple RIFF container and you'll need to know the exact codec which was used to encode the WAV-file. Assuming you chose a RIFF WAVE with simple PCM codec, which you should identify using the file header of your WAVE file, you have to know the sample rate, the channels used and as already mentioned the resolution of your WAVE. All this information could be got from the WAVE file header. I assume that you're having a 16Bit WAVE file and read shorts (8-Bits) so you're doing your modifications or whatever to the low and high bytes which is probably in most cases a very bad idea. There is a lot of information regarding the WAVE file format. Use google to find it.

Possibly this could be a good start.
 
Share this answer
 
Comments
sai krishna 6-Mar-13 4:27am    
Hello,
I have two .wav files.How can I subtract one sound from the other.
Please do reply.......
You can use ready-made libraries. Start here: C# WAV file class, audio mixing, and some light audio manipulation[^], but NAudio[^] or BASS API[^] are also a good starting points.
 
Share this answer
 
Comments
sai krishna 6-Mar-13 4:27am    
Hello,
I have two .wav files.How can I subtract one sound from the other.
Please do reply.......
Zoltán Zörgő 6-Mar-13 8:18am    
First define the waveform subtraction in mathematical terms.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900