Speakers and raw audio

Hey, I'm playing around with raw audio right now, producing chirps and tones and that sort of thing, but I read that sending data that puts the speaker to full charge and leaving it there for any amount of time could damage the speakers.

Now, you have the option to use signed and unsigned values, so what actually constitutes an off value in both?

Is off in an unsigned variable 0 or half-way to maximum value of the variable type?
Last edited on
There are questions of different types here. Lets start with the computer-related part.

Using signed integers, a value of zero represents "off".

Using unsigned integers, the halfway-point represents "off". If the value can be in the range 0 to 65535, then 32768 would be the "off" level.

Some of the other questions relate to the way that audio amplifiers and loudspeakers handle sound. The concept of "off" in this context is represented by a signal which is unchanging, and "on" is represented by a signal which is oscillating. Thus the ways of thinking about things is different.

A steady signal of say 65535 in digital audio terms would represent a maximum possible value. But in terms of audio, it represents a DC (direct current) or in effect an infinitely low frequency, below the threshold of audibility. Most amplifiers and loudspeakers would respond with a loud thump as the signal was switched on, but if it remained at that level, the loudspeaker and amplifier would tend to settle back to zero, because they are designed for AC, not DC signals.

If terms of possible damage to loudspeakers, you need to bear in mind that they are designed to handle typical music or spoken sounds, which contain a mixture of many different frequencies, distributed across the range. But when generating digital signals, it's possible to very easily generate such things as square waves, which contain a great number of higher frequency harmonic content, and can easily blow the delicate tweeters, which don't normally encounter such power levels, or similarly, it is possible to generate continuous tones at a fixed frequency, which again can subject the loudspeaker to unexpected levels of power concentrated in a narrow range, which could be harmful.

The main advice I'd give is to keep the volume fairly low, especially with any sounds which seem particularly harsh or ear-piercing - though the higher frequencies may tend to be inaudible to humans but may still overload a loudspeaker.

Edit: very low frequencies may also be a cause for concern, as they may not sound very loud to the ear, but could cause massive excursions of a loudspeaker cone. Prolonged use at high levels may be more than ordinary home audio equipment can handle.
Last edited on
Thank you Chervil, I'm just going to reiterate the point about what actually damages speakers to make sure I got it right;

A constant value sent to a speaker is not likely to harm the speaker (it's similar to sending an off value). What can harm the speaker is a solid, unchanging tone, and waves that are not sine-wave in nature (Waves that have a cliff-like jump in amplitude).

Thanks again.
Last edited on
Yes, that's roughly what I said. Of course, I made some simplifications and assumptions.

You might try googling for views from other people on what causes loudspeaker damage - example:
http://www.ovnilab.com/articles/clipping.shtml


https://www.images2.co.uk/Sound_Equipment/resources_loudspeakers_explained_blowing_a_speaker.html



Last edited on
Topic archived. No new replies allowed.