Clicking sound in audio files

Started by
6 comments, last by Hollower 14 years, 5 months ago
Hi, I am using audiere (though I assume this shouldn't matter) which is a light weight API for playing sound files. My issue is: there is often a clicking sound when I mute or unmute sound files while they are playing, or if I stop sound files when they are not finished playing normally. This actually happens in any sound player I know of. If I am playing a sound file and repeatedly mute/unmute it (say in Windows Media Player), I get a clicking sound. I want to avoid this because I am using sounds can be played for anywhere between 0.5 seconds to 3 seconds - all the same file (the file itself is roughly 11 seconds long). Any help will be appreciated!
Advertisement
I've noticed that new versions of Winamp avoid this clicking effect by not stopping an audio file suddenly. Instead they fade out the volume over a fraction of a second, and then stop the playback.
Well, clicking noises usually occur when you have very low buffer settings set.
Good examples are music programs, lower buffers usually give you faster responses, like when you press a key on a keyboard, but too low and yu can get skips because of buffer underruns.
Higher buffer settings eliminate clicking, but they also introduce a delay.
I have never used that API, and I don't know if there are OS specific global settings for that, but maybe your soundcard has driver options for that?
Thats quite genius! I considered this, but wasn't sure if it would work properly, I'll definitely build a fade in/out wrapper around playing :)
Alright, this pretty much worked, but there is still a some what scratchy staticy sound (very light). This also happens when I rapidly fade the same sound in windows media player. Is that probably a bad sound card or something?
I don't know the audio terminology but it has to do with the alignment of the waveform. You know that 0 dB center line? If the last sample of the wave doesn't end on that line there will be a click. The larger the dB difference the louder the click will be. For a looping wave you want the last sample to match with the first or again there will be a click relative to the difference in amplitude.

edit: okay I see this was about playing sound files not making them. oh well, food for thought.
Well that might be somewhat consistent with this. I am not too sure, but it does seem that sounds vary in strength. This is incredibly frustrating because its minor enough that sometimes it plays tricks on me, thinking it's gone, but its always still there! :(
I think I found the technical term I was looking for: DC offset removal
Looks like a simple high-pass filter may help.

This topic is closed to new replies.

Advertisement