In this case, VLC just uses the Windows APIs (DirectSound), and sends signed integers of 16bits (s16) to the Windows Kernel.
VLC allows amplification of the INPUT above the sound that was decoded. This is just like replay gain, broken codecs, badly recorded files or post-amplification and can lead to saturation.
But this is exactly the same if you put your mp3 file through Audacity and increase it and play with WMP, or if you put a DirectShow filter that amplifies the volume after your codec output.
For example, for a long time, VLC ac3 and mp3 codecs were too low (-6dB) compared to the reference output.
At worse, this will reduce the dynamics and saturate a lot, but this is not going to break your hardware.
VLC does not (and cannot) modify the OUTPUT volume to destroy the speakers. VLC is a Software using the OFFICIAL platforms APIs.
The issue here is that Dell sound cards output power (that can be approached by a factor of the quadratic of the amplitude) that Dell speakers cannot handle. Simply said, the sound card outputs at max 10W, and the speakers only can take 6W in, and neither their BIOS or drivers block this.
And as VLC is present on a lot of machines, it's simple to blame VLC. "Correlation does not mean causation" is something that seems too complex for cheap Dell support...
Maybe Dell should advise against playing Metal music and should only allow Céline Dion music, because Metal saturates more...
EDIT: more details...
PS: they even provide a BIOS update for the fix... So, of course, VLC was the issue... http://www.dell.com/support/troubleshooting/us/en/04/KCS/Kcs...
>VLC does not, and cannot modify the OUTPUT volume to destroy the speakers.
That would be remarkable.
>And as VLC is present on a lot of machines, it's simple to blame VLC. "Correlation does not mean causation" is something that seems too complex for cheap Dell support...
It sounds like a #BOFH excuse.
The problem is it's too easy to set the volume above 100%. I've done so with the mouse wheel. And I now have a $2000 out-of-warranty laptop with blown speakers.
Fixes could include:
* Not remember settings above 100% between sessions unless an advanced option is checked that warns the user.
* Require a double click on volume slider to go above 100%.
VLC's high volume is a wonderful feature when you're listening to DTS or AAC movies encoded with the volume too low. It's just too easy to be accidentally abused.
Your computer was defective, and Dell is refusing to comply with the warranty. It's impossible for VLC to harm the speakers on a computer that is not defective.
Ok, I like it being hard to set volume bigger than 100% at mplayer, it'll probably be a nice feature at VLC. But that's only because I don't like clipping, not because of any hardware issue.
That makes a lot more sense than force software to not do something it can and should do "just in case Dell failed at their job".
You can view PCM sample amplitude as telling the sound card how much power to apply to the circuit driving the speaker. A large amplitude means the speaker cone should move a lot, and small amplitude means it should stay nearly at rest.
So that means that the sound card has to interpret each of the signed 16-bit values and determine what kind of electrical signal it should output to the speakers to get the desired effect (sound). A sample with the highest signed 16-bit value (32,767) tells the sound card to produce its most powerful signal.
Now, in a laptop, the sound card and speakers are chosen by the manufacturer. Different sound cards can produce varying amounts of output power, and different speakers can handle varying amounts of input power. Obviously the speakers need to be chosen such that the sound card cannot produce more power than the speakers are rated to handle. (It sounds like Dell made a design error here.)
If the sound card and speaker choice is such that the speakers cannot handle the sound card's output power, then any audio software that produces signed 16 bit samples above some threshold (let's say 32,000) could damage the speakers.
So what audio software could produce such large amplitudes? ANY SOFTWARE AT ALL. Not just VLC. I could create a .wav file that was just a bunch of loud noise with amplitudes above 32,000, and it would destroy your speakers.
In fact, most well-mixed sound files will have at least one sample at the maximum amplitude. This is called normalization -- to provide the highest fidelity sound, you want to use the entire dynamic range of the PCM sound format, and thus ideally the loudest bit of the track should be exactly at 32,767. Lots of modern music uses a technique called compression ("dynamic compression," not to be confused with data compression) to make good use of the full dynamic range of PCM, which results in LOTS of samples at or near the maximum level.
On a correctly designed audio system, this is great! You get to hear audio with the fullest dynamic range that your equipment can produce. If your system has been designed incorrectly, though, you'll blow out your speakers. But that could happen due to ANY SOFTWARE AT ALL, not just VLC.
If you really want to buy crappy Dell hardware and not blow out the incorrectly designed audio system, you should permanently decrease your global Windows volume level. That will put a hard cap on the PCM amplitude levels sent to the sound card, and thus will cap how much power is sent to the speakers.
Blame Dell. VLC has exactly nothing to do with your problems. The "volume above 100%" feature is not dangerous on a properly designed audio system (like 99.99% of computers out there).
Of course, Dell could include analogue filtering circuitry to filter out the excess power in inaudible frequencies if they wanted to.
It likely isn't necessary as it is probably built into the output amplifier. I have no clue what audio amplifier dell used but here is an example of a typical headphone amplifier IC http://www.ti.com/lit/ds/symlink/lm4881.pdf
If you look on page 9 of the datasheet you'll see its frequency response. The attenuation is > -20dB past 15kHz at best. You aren't going to get much of a square wave above 1.5 kHz, and probably not below if you look at the response of the speaker.
Anyway if you don't like it remembering the last audio level, go to Tools > Preferences > Audio, check the "Always reset audio start level to" box, and set it to 100%. Voila!
Clipping sucks. VLC shouldn't remember these options unless the user changes an optional setting.
$ git clone git://git.videolan.org/vlc.git
$ cd vlc
$ ack-grep -r resetVolumeCheckbox ./
$ emacs modules/gui/qt4/components/simple_preferences.cpp
$ git format-patch -o patches origin
$ git send-email --to email@example.com patches
I would suggest VLC disables this feature for new installs and move it to an easily discoverable preference.
Or if they really care enough to allow their users to boost the volume levels of quiet movies to replace the gain multiplication with a proper dynamic range compressor activated when the volume goes above 100%.
Dell would have to set an upper limit on the wave superposition, or set a top frequency.
Windows Media Player, Firefox, iTunes, ...
VLC makes it easier (you can boost a quiet song or movie until it fills the OS-defined dynamic range) but a loud song in any other piece of music playing software would have the same effect. Depending on the genres of music you listen to, it's not uncommon to come across songs that have been boosted until they clip.
As for hiding the option in preferences, volume boosting is one of VLC's key value propositions to laypeople (in my experience). Making it undiscoverable would be a disaster. Maybe add a 1-off warning dialog for users on Dell computers?
None of these drive the signal to digital clipping.
But it's not just the total AC power that matters, it's also the power density that matters. So for example a sine has a very high power density (in fact if you do the math, the power density for a pure sine is infinite). This is turn means, that whatever resonances the system has, that overlap with the frequency of the sine, they will get excited and can resonate toward mechanical breakdown (damaged speaker). A low power density signal, like noise, where the total output power is spread over the whole spectrum (or the spectral response of the system in question) and below the maximum rated power of the speaker is much less likely to do damage.
Now we have to look at clipping. Analog clipping is not just some random noise, it's in fact a harmonic distortion. And as such it can redistribute the power in the spectrum. And digital clipping actually causes an integer overflow, which in fact adds further power to the signal.
But it goes further: The output of a DAC is a voltage. A voltage by itself does not carry power, you need an amplifier to do that. So the first step after the DAC and after the reconstruction filter (which also acts as a DC block) is a transimpedance amplifier that turns the voltage into a power signal; what this means is, that for a signal of a certain power that's going into a certain load it gives rise to a specific RMS voltage on the load terminals. In audio the reference power level is usually 0dB(m), i.e. 1mW – on the typical load impedance of 1kOhm this corresponds to a RMS voltage of 1V at the load (and higher voltage at higher impedance, lower voltage on lower impedance loads).
In a perfect amplifier the impedance is independent from the input signal and its output load. In a real amplifier though the impedance can vary depending on the signal and the output load. And the impedance usually also depends on the frequency of the signal.The effect is, that an amplifier introduces further harmonic distortions, if the signal puts too much power onto its input. If this happens in the preamplifier stage this can drive an output stage outside the specifications of the connected loads.
You see, because distortion happens mostly if you drive an amplifier close to it's maximum capabilities the usual approach is to design the amplifier some comfortable margin to the needs for the connected load; typically you use a margin around 6dB, so for a 6W load you'd choose a 12W amplifier, so that no matter what input signal the amp gets, the total harmonic distortion stays within safe limits. To protect the load you then choose the amplification factor so, that for a reference power input signal the output power is lower than or equal to the power for which the load is rated.
Now say, you're a cheapskate engineer, maybe with little analogue electronic design experience. So you see your speakers have a maximum rating of 6W. So you do a parametric search and come up with amplifier ICs from the usual suspects (Maxim, TI, ST); they're rated a 5W, 10W, 15W...; obviously cannot drive those 6W speakers at maximum power (it will badly distort), but 10W should do the trick, right?
Well, now, because you forgot the total harmonic distortion: Which means that if you raise the input signal power by 6dB (i.e. double the power) the output of an amplifier may rise well over 6dB. So lets say you had first a signal output power of 2.5W for a -6dB(FS) signal, then you raise it to 0dB(FS) (which would be your volume slider in the control applet at 100%), theoretically the output signal should now be 5W. But because of the underrated amplifier the output distorts and the actual power going into the load rises well above their maximum 6W rating.
TL:DR; Dell did mess up their amplifier design, but not by overrating the amplifier, but by underrating it. If they had chosen a properly rated with margin (so that THD stays low) amplifier and chosen the gain so that a 0dB(m) line signal would have produced 6W output power (about 15dB gain) the speakers would have been safe.
"Be aware that just having Youtube in your browser history is enough to deny your warranty."
Porting it to Web Audio API is left as an exercise for the reader.
This is why distorting the amplifiers (especially digital clipping) is so much worse for speakers than overpowering the speakers. This is a very well known fact in audio circles.
Playing metal at full volume is not as damaging as playing anything intensely digitally clipped at full volume.
Yes, Dell is putting on shitty speakers on their laptops, (what else is new), but VLC should be amplifying the output using level-limiting (hard-limiting), which would effectively bring all the quiet parts to be just as loud as the loud parts, instead of just digitally clipping the output.
>Playing metal at full volume is not as damaging as playing anything intensely digitally clipped at full volume.
The output of the amplifier really ought to be bandwidth limited either as a natural consequence of the components used or explicitly with a filter. It is silly to spend power on things that can't be heard.
(Just the left 1/2 of the graph for this example)
The integral of the sine waveform with a peak value of 1, on the interval 0 x < pi, is :
The integral of the square wave on the same interval is = pi
So the ratio increase in average voltage at the speaker (comparing the sine to the square) is pi/2 = 1.57. The increase in speaker power is (pi/2)^2 = 2.46.
> 1.41 x
Yes, for a voltage of x, but remember that the speaker is a resistance, for which the power varies as x^2/r (Ohm's law: p = e^2/r), So the original claim is correct.
You shouldn't be able to blow up your speakers if your amp, speakers and limiters are setup correctly.
After all, if you're busting out £20k on a set of decent speakers, you don't want to burn them out because your idiot producer "turned it up to 11"
That's compression, not hard-limiting. Hard limiting would leave the quiet parts quiet relative to the loud parts. It would only crush them if they were not enough dynamics in the first place.
Maybe if your speakers are very quiet and crappy and you have to get every control to 100% (hardware, system, vlc) in order to hear anything - maybe in this case it will.
Hard clipping is very noticeable for the listener so not many people will set it to the maximum if they have choice.
Anyway, you can protect from this either in hardware or in the driver.
The easiest way to solve this is use stronger materials for the speaker construction. This does, yes, affect the quality of the sound, which is already somewhere between catastrophic and abysmal on a laptop. The frequency response is likely to be worse, on a set of speakers that already has a frequency response that makes them quite useless for music.
You can also do it in electronics, as measuring the power delivered to speakers is not exactly rocket science. The response time wouldn't be great, but it's continuously shredding the speakers with square signals that damages them, not a couple of pulses every once in a while. You can also detect heavy slopes. You can even detect heavy slopes in software.
But no, seriously, this is a problem that can be solved. The mere fact that a lot of manufacturers manage to come up with speakers that don't break should be a testimony to this. I have (granted, desktop) speakers that have gone through a decade of heavy metal, grindcore and fucking SIDs and MODs, on bad ALSA drivers that I could barely get to work for years. They're fine. This is just Dell selling cheap shit.
I have no idea how things go in the laptop market, so I can't say there's one I approve of in particular. The fact that the ones on the laptops are crap can, however, be assessed quite easily by ear :).
I'm no expert but maybe it's actually possible to create speaker that doesn't go bad.
(I could code the protection into the sound driver in half a day probably)
Of course it is, but nobody wants to do that; it's not profitable. * sigh * .
I sometimes wonder how difficult would it be to create, say, a brand of kettles with lifetime warranty, designed to last 50+ years instead of 50+ weeks the ones we have do. How hard would it be to sell them and to what ends would the competition go to stop you from killing their market?
We've given up trying to buy "good" coffee makers. We just buy something cheap that's on sale and throw it away when it breaks. There should be the equivalent of "Gresham's Law" for consumer goods (the bad eliminates the good). But I don't know the name of that. Perhaps "China's Law" would be appropriate.
Nor make a cup-a-soup, pot/instant noodles, pre-boil water for cooking veg, hot water bottle, etc.
Of course it doesn't taste nearly as good as pouring hot water from a kettle onto a teabag, but it's so fast and convenient.
And I don't think anyone in the USA buys loose tea. It's all teabags here (i.e. probably 99% of the market).
Modern kettles boil in about 2 minutes anyway. So I don't really see them as any more inconvenient than using the microwave. The real inconvenience is having to get up to switch the device on; what I really want is a networked kettle so I can boil it from the comfort of my seat hehe
* Some no loger turn off automatically, tho
And you don't think a kettle burning its way through your kitchen is a fail !
Is this claim actually true?
My understanding is that if you take a waveform and clip it, the resulting waveform actually carries less energy (think of the corresponding integral), but more of that energy is pushed into the higher frequencies. It's this – the unexpectedly large amount of high-frequency energy – that kills speakers because their crossover networks push it into the tiny, tiny tweeters, and they are utterly unprepared for it.
> Is this claim actually true?
Yes, it is -- but it depends on how we define "clipped".
> My understanding is that if you take a waveform and clip it, the resulting waveform actually carries less energy (think of the corresponding integral)
Only if the clipping reduces the peak value. If you compare a sinewave with a peak value of 1, and a square wave with a peak value of 1, the square wave has a substantially higher average level (with a ratio of pi / 2).
> It's this – the unexpectedly large amount of high-frequency energy – that kills speakers because their crossover networks push it into the tiny, tiny tweeters, and they are utterly unprepared for it.
Yes -- the rate at which the speaker cones are required to move is an additional factor. But for a "clipping" definition that clips by means of trying to exceed the available voltage, these two effects add.
In the above linked image, the red trace is sin(x), the integral for the interval 0 < x < pi is 2. The green trace produces an integral of pi. The ratio of the two is pi/2, and the speaker power difference is (pi/2)^2 = 2.46 (because the speaker's power is the square of the applied voltage).
The green trace is what you would get if you simply turned up the volume beyond any reasonable setting -- the amplifier produces a clipped version of the sine wave and the peak value is equal to the supply voltage.
I don't know of any widely used definition of "clipping", nor any definition that fits the context of this discussion, that allows for a signal's peak value not to be reduced. It's called clipping because the extreme values look to have been clipped away, as if by scissors. The parts that have been clipped away contain energy, don't they? So won't the clipped signal will carry less energy than the original?
When you take a sine wave of peak value 1 and clip it, what you get is not a square wave with a peak value of 1. Rather, you get a peak-truncated sine wave in which values in excess of the clipping threshold V are replaced with the clipping threshold. There's less power in this clipped sine wave than in the original because min(V, |sin t|) <= |sin t| for all t.
But there is one. In electrical engineering, it's any process that arbitrarily limits a signal's amplitude. By far the most common meaning is a signal that exceeds the voltage range of an amplifier or signal pathway.
> nor any definition that fits the context of this discussion, that allows for a signal's peak value not to be reduced.
> It's called clipping because the extreme values look to have been clipped away, as if by scissors.
Yes, but this can result from trying to pass a signal too large for the circuit, or it can mean an intentional scheme in which a fixed signal amplitude is truncated, the meaning you're discussing.
In the present discussion, in which a volume setting is increased until the speakers are jeopardized, the meaning is clear -- it's an increase in signal amplitude that the amplifier cannot support, resulting in the waveform being clipped at the maximum available amplifier voltage.
> The parts that have been clipped away contain energy, don't they? So won't the clipped signal will carry less energy than the original?
Not if the signal amplitude is increased. In the present discussion, the problem is being caused by raising the volume level too high, which causes the signal to exceed the available amplifier voltage. My diagram shows this case:
The red trace is the maximum volume setting that the amplifier can support without distorting the signal. The green trace is a much higher volume setting that essentially reduced the output to a square wave. In both cases, the peak voltage is the same.
> When you take a sine wave of peak value 1 and clip it, what you get is not a square wave with a peak value of 1.
That depends on how you define "clip". If you increase the size of the sinewave, clipping takes place at the maximum voltage. If you clip by reducing the possible range of voltages, the sinewave remains the same size but maximum amplitude goes down. The present discussion revolves around the first of these choices.
In any case, to make sure we're talking about the same things, I'll be more formal. Let y(t) by a time varying signal. Now define a maximum amplitude V > 0. Let us say that clipping occurs at time t if |y(t)| > |V|. Define the clipped version of y to be w(t) = max(–V, min(V, y(t))).
Claim 1: |w(t)| <= |y(t)| for all t. That is, the clipped version of the signal is contained within the unclipped version. Proof: Follows from the definition of min, max, and V.
Claim 2: The clipped version carries less energy than the unclipped. Proof: Follows from Claim 1 and integration.
Now, here's where you lose me. The claim you made that sparked this conversation was this: "the resulting clipped waveform carries a lot more energy than an unclipped one." But this claim seems to contradict my Claim 2.
Can you show me how to reconcile these seemingly contradictory claims?
Edited to add: I'm not claiming that these claims can't be reconciled. Rather, I'm hopeful that thinking about the exercise will help us to see how we're talking past one another.
> Now define a maximum amplitude V > 0.
The problem being discussed is one in which the user cranks up the volume such that the maximum volume level is far exceeded, and the amplifier circuit, which cannot reproduce the higher level, instead clips the waveform at the supply voltage.
> The claim you made that sparked this conversation was this: "the resulting clipped waveform carries a lot more energy than an unclipped one."
And it does, as you can see from this diagram:
The red trace is the 100% volume level for the system, and it is not clipped. The green, "clipped" trace is far above 100%. It's really very simple.
> But this claim seems to contradict my Claim 2.
Yes. Your claim 2 doesn't apply to a case in which the maximum output voltage of the amplifier cannot reproduce the input waveform. So instead the amplifier clips its input signal at its voltage limits, as the above diagram shows.
The interesting thing about this analysis is that two ways to analyze it produce the same result.
If we use a simple integration of the unclipped and clipped cases, we see a power increase of 2.46, as discussed earlier.
If instead we use Fourier analysis to examine the harmonics of a sine wave and a square wave, the square wave's higher harmonic energies sum to 2.46 of the original sine wave's energy level in the speaker (but pi/2 above the sinewave voltage levels):
Sine wave harmonic lines = 1f
Square wave harmonic lines = (4/pi) sum(sin(2 pi f t (2k-1) / (2k-1),k,1,oo) (http://en.wikipedia.org/wiki/Square_wave#Examining_the_squar...)
The outcomes obviously have to come out the same. The above shows how they do it.
For all A > 1, |rA| > |r|. Therefore, I have no problem agreeing that a clipped rA carries more energy than the original r. (In fact, this is just saying that bigger signals carry more energy, regardless of clipping.)
To me, your original statement read as though it made the following claim: If your amplifier tries to output a signal r but clips off the peaks, what you get out is a signal that carries more energy than r. (This is the claim I found hard to believe.)
But what you really meant (I think) was that, if you take a sine wave as input and, as a human controlling the volume knob, keep turning up the volume until the sine wave's maximum amplitude so far exceeds what the amplifier can reproduce that it comes out looking like a square wave, then that square wave carries more energy than the original, un-volume-adjusted sine wave. Is that what you meant?
If that's what you meant, I have no problem believing your claim. It's just that I wouldn't call turning up the volume knob to be part of the "clipping" process, but rather amplifying. When you turn up the volume knob, what you get out is always a "bigger" signal, even if it's clipped.
But it is, indeed it's the most common example of clipping in engineering practice. Consider two alternatives -- one in which the amplifier is able to accommodate a great increase in volume without any distortion, and another in which it cannot.
In this image:
The blue trace represents maximum normal volume (100%). The green trace represents a system in which the amplifier can accommodate a great increase in volume setting (200% of normal), simply because its power supply voltage is at least twice as high as that required for 100% volume. The red trace represents a system that cannot tolerate any volume settings greater than 100%.
In this diagram, the 200%-volume green trace has a higher subjective volume level than the 100%-volume blue trace (i.e. twice as high in voltage, four times as high in speaker power). The red trace, which would sound very distorted to the user, also has a higher power level than the 100% trace, but less than the green trace. The red trace is typical of systems that are limited to 100% volume by power supply voltage.
The red trace represents the most common example of "clipping" as it takes place in actual equipment and in engineering practice. Its output has more energy than the blue trace, and less than the green trace.
-- former NASA engineer
That sole difference explains our entire conversation. In your view, clipping involves making the signal bigger. That bigger signals carry more energy naturally leads to your claim. In my view, clipping a signal makes it smaller, leading to the opposite claim.
Thanks for sticking with me through the conversation.
The fundamental frequency is reduced in energy a little bit, but the higher frequency harmonics end up containing relatively large amounts of energy.
I have to say, there may be a UI issue here as well. I blare my speakers with VLC playback something like 5X times more often than QuickTime player or mplayer. I use all 3 with about equal frequency.
I think this is fixed in the latest releases...
This is correct, and for those who want to know the technical reason, we can look at the Dell speakers (any speakers) as a resistive load (only approximately true). For a resistive load, the power increases as the square of the applied voltage, because the power in a resistor is equal to the voltage times the current, and both the voltage and current are increasing as the audio output level is increased.
In terms of Ohm's Law: P = E^2/R.
I am a VLC fan (thanks! I wish I was skilled enough to contribute to the project) and right now using a ASUS laptop, I want to know what manufacturers I should NOT buy from next time (I bought this ASUS because I tried to buy from DELL and their site was buggy and did not closed the transaction... good to me their site was buggy!)
We heard about HP and Dell doing that, and ONLY in the version they shipped to India or South-East Asia (Do they ship worse components there?)
> I wish I was skilled enough to contribute to the project
There is a very high chance that you are skilled enough, to be honest.
There is actually a chance that they might be, considering not all models are available in all regions, thus there are models that are marked for South-East Asia. So as a manufacturer, it's relatively easy for them to be biased.
That said, vendors in South-East Asia have a history of being scammers and taking out original parts and replacing them with cheaper hardware, so that could be a cause too, and HP might be innocent.
The thing about this is that such behavior makes sense when the suppliers are integrators of the product of twenty or fifty or however many suppliers spread around the globe all relentless trying to cut costs (including cutting corners in implementing whatever spec their chips are supposed to satisfy). The integration itself naturally involves putting together the cheapest stuff and seeing-if/hoping-that it will work. So when you have such a fragile chain of elements, just blank-refusing to allow substitutes makes sense in this rather twisted view. Maybe Windows Media Player fails to call the parts of the API that are "bad" and not documented as bad.
Obviously, I'm not saying this approach is justified, simply that sometimes the irrationality is "sincere".
I'd prefer to be warned rather than surprised by this!
Maybe Microsoft could regulate the output for junk speakers, but really, Dell is the one to blame here.
This is what MS Office does. A Microsoft engineer told me once that because many printers lie to the OS about their capabilities, they built a giant lookup table into the Office, that basically consists of "if printer model X, vendor Y and firmware Z, then don't trust it about the fonts onboard, render the text before sending instead".
It's so completely impractical for a hobbyist project to own every possible piece of hardware, or at least a huge majority of it. Yet it's nothing for a Fortune 500 company to do the same.
Really slants the playing field away from independent software developers.
The problem is simply that the Dell speakers are piles of shit.
How would you do that?
And no, this is not specific to VLC.
Have you heard about this problem in any other laptop before?
In other words, due to increase in amplitude, increasing volume over 100% can break the hardware? I am not trying to blame VLC, just that your statement "At worse, this will reduce the dynamics and saturate a lot, but this is not going to break your hardware" sounds a bit fallacious in the context of your own explanation.
Sad to see behavior like this
And here in India I hear people say that you shouldn't install VLC on laptops .. (even if its not a Dell laptop) !!
But does anyone have list of Manufacture that does provide speaker with BIOS Protection?. Does Apple do?
well I guess their support people are not engineers, only technicians, hope this blows back into DELL PR instead...
Indeed, and doing that destroys audio equipment just as effectively. It's the reason apps like SoundForge, Audacity and others have clip warnings on their level monitors: so users don't create audio data that destroys listeners' equipment.
The problem is VLC gives consumers (who, like you, don't know better) an exceptionally easy way to create clipped audio. Depending on the characteristics of the source, the degree of clipping VLC can create can destroy even pro equipment. If I were an engineer at Dell, I'd recommend denying warranty claims too.
There is no excuse, none, nada, zip, zilch, in 2014 for allowing userland software to generate signals powerful enough to damage built-in hardware.
Audio is typically passed into a soundcard's digital audio converter (DAC) as integers representing samples of the audio waveform. For example, a full volume sine wave looks something like this. That signal is perfectly safe to play on any hardware. However, if you take that same sine wave and increase the amplitude you end up with values outside the valid range so you have to cap them. You get something that looks like this.
Lopping off the tops and bottoms of the waveform is clipping, and the newly created sharp edges in the waveform are what can damage your speaker. They require a ton of energy to play (producing heat) and in some cases can trigger the buildup of high frequency harmonic oscillations in your speaker's voice coil that can eventually crack it. More expensive speakers last longer but virtually all speakers eventually "blow" under such circumstances.
The trouble is playing waveforms like that once in a while is totally ok and short bursts of very similar waveforms exist benignly in lots of stuff you listen to every day. And while it's trivial to know if you're creating clipped audio, it's very difficult (read: processor intensive) and error-prone to detect it after the fact. When you do detect it, your solutions are to either drastically lower the global volume so the edges have a lot less energy, or distort the waveform to make those edges more smooth. It's really, really hard to avoid false positives though and not end up "enforcing" against audio data that's natural and perfectly ok in moderation.
If it's a factor of 2, for example, just take the 3dB volume loss and move on.
I don't see why detecting the situation is so hard, though. Build a simplistic model of the amount of energy dumped into the speaker and the amount dissipated, run the audio through that model, and then limit the volume when the amount still in the speaker gets too high. This would let through small amounts and limit large amounts, just like you'd want. For a really simplistic model, run the signal through a high pass filter, integrate the output, then apply a running average to that. When the running average surpasses a value that indicates the speaker is reaching its limit, cut the volume. I take it that this doesn't work?
Once the signal is more complex than a sine wave things get crazy. The more frequencies in a signal, the harder it is to model the power draw since different parts of a complex curve cause the speaker to act more like the low resistance inductor it actually is. Discontinuities and areas of constant voltage (both caused by clipping) are the worst, and to make things even more fun the amplifier is part of the system and affects things as well.
But assuming you know a lot about the speaker, the amplifier and the DAC you could probably build a model that works well for simple sinusoidal audio, but that doesn't cause problems anyway. All bets are off for anything more complex.
So instead you're left with a few options: buy reasonable gear and don't play crap audio, play crap audio but massively overbuild your system so you lower the risk of getting into the unknowable danger zone that changes depending on what you're playing, or use a bunch of heuristics on a signal and try to distort it in some way so it's less potentially damaging.
The problem with the latter is since you don't know where the line is it's easy to be overzealous and end up distorting lots of stuff you don't need to. Problem with the middle is you either end up with something much larger and more expensive than you need, or you cripple what you have to give you a wider margin of safety. Problem with the first is apps like VLC make it exceptionally easy to accidentally play crap audio. Pick your poison.
Could Dell spend a couple extra bucks for higher quality components and create a wider margin of safety? Probably yes. But at the same time the VLC developers are being reckless by putting a tool into consumers hands that makes it so easy to play potentially damaging audio signals.
I don't understand how you can blame VLC at all. Technically, Dell shipped a tool right on the machine that makes it just as easy to play potentially damaging audio signals. Internet Explorer could just as easily play a WAV file that's been crafted to destroy the computer's speakers. The correct approach is to remove that ability, not blame a tool that accidentally triggers the problem.
As I mentioned, Dell could turn down the input volume to their amp/speakers. It doesn't totally eliminate the ability for a user to damage their speakers but it also doesn't create any distortions. I would guess that's what their bios update does. It just makes everything quieter for everyone.
I appreciate the principal that userland code shouldn't be able to damage hardware, but I'd much prefer my computer not lie to me. Now, I'm also not opposed to dynamic power limiters in general. In fact, that's exactly what VLC should be using if they insist on letting users crank things past levels that would otherwise clip. It just doesn't belong in the os or hardware.
I really don't understand, why do you think this functionality doesn't belong in the OS or the hardware? To me, you're basically saying that you're OK with giving arbitrary web sites the ability to damage your hardware, since that's effectively what that ends up implying.
> When the running average surpasses a value that indicates the speaker is reaching its limit, cut the volume. I take it that this doesn't work?
No, it might work, but it's really a question of cost, complexity and represents an added failure mode -- something else that can go wrong.
Given that, a computer which allows random audio API clients to destroy the computer's speakers is not correctly designed. Certainly, it may add cost, size, and weight, but if that's what you need for correctness, then that's what you need for correctness.
The brakes on a car add cost, size, and weight, but you can't just leave them out because you don't feel like accepting that penalty.
I don't find that controversial at all, but as time passes, it seems there are more ways that user activities can bring a computer down. The most obvious way is by sending out-of-bounds signals to storage devices that can erase or even physically damage them, but this example of destroying speakers, even though it should not be allowed to exist, seems plausible also.
Another common error is to allow a system power shutdown without parking the HDD R/W heads in a sacrificial area, so subsequent mechanical shocks won't cause the heads to collide with a legitimate data surface. This problem can be caused by insufficient power supply capacity -- a capacity that must detect the power shutdown and allow the head traversal to complete before the remaining power is used up.
Just examples, there are many similar ones.
If the speakers in a consumer device like a laptop can be damaged by maxing the volume then the laptop was not properly designed. This isn't a case of a nutty audiophile mixing and matching unknown preamps, amps, and speakers and managing to blow some cones by cranking it to 11. Dell has complete control over the selection of components in this laptop and, if they cared to, could include circuitry to limit power beneath a point that will damage the speakers. They didn't. Alternatively, they could eschew a limiter and select speaker components beefy enough to handle the maximum voltage that their DAC's can output. They didn't. Bad design.
If Dell did the math and decided the number of users noticing permanent speaker damage would be small enough that the reduced part costs would outweigh the price of the resulting warranty service, that's their decision. However, they should be on the hook to fix damaged caused by their cheap/poor design.
On the other hand, a movie with lots of low frequency content (explosions and stuff) whose audio is clipping will damage the small full range speakers since most of the audio energy is concentrated at the very low frequencies (where the signal has a lot of power) and the peaks are long.
Or a multi-band limiter for the explosions.
Ok enough metaphors.
It's possible, however, to create raw PCM that will destroy a lot of consumer equipment if played long and loud enough. VLC basically gives consumers a way to do that and labels it a feature.
Not so fast, I see no car metaphor yet. And there is no comparison of Dell's practices to those of Hitler or the Nazis, either. We are far from 'enough' metaphors, my friend.
Imagine if this was some crazy keyboard which could actually press keys automatically using a motor. Then imagine if the drivers and hardware allowed you to destroy the keyboard by pushing the motor too hard. This would be obviously crazy and the ability to write userland software that destroys built-in hardware should not result in a denied warranty.
Companies like to talk about "voiding the warranty" for all kinds of stupid stuff, and consumers don't know their rights so they often get away with it, but what the law allows is considerably more constrained.
But when you're buying them in quantities that a company like Samsung would (that above link is, amusingly enough, to ones that Samsung themselves make), the price drops off rather steeply. $0.001USD is around what I can find for buying them from China in 100Ku.
If Dell doesn't build audio properly, how can they blame the users? They really have some gut...
The VLC volume control has always terrified me, I wish it would have AGC or at least a soft limiter when pushed above 100%. I've seen people watch films with it cranked up to 200% and the system volume turned down to compensate :(
Since then I have vowed never to buy Dell.
If Dell said VLC was installed so warranty is void, I'd say I want the computer fixed as a "reklamasjon"-case, and so they can't hide between stupid rules like this. This also means that we are allowed to swap RAM, CPU's etc. in our computers without fear of not getting the computer fixed if it later breaks down for unrelated reasons.
I don't think it is a wild compromise to make some assumptions about the sounds people will play through the speakers (and it's not like a spec relating the max energy/time is going to help most shoppers).
Anyway, a moderator from Dell replied that you can contact him if Dell refuses to give support just by seeing VLC installed, so maybe it's better than it seems.
(But I don't think it is obviously unreasonable to sell a cheap laptop with cheap speakers, configured to be able to make louder peaks)
Speakers shouldn't melt because of software (unless there is dodgy firmware.)
Actually, speakers are speced in terms of RMS wattage...which is exactly that.
I have tried to update VLC Media Player on one machine on my home network, and the update fails, suggesting that the VLC Media Player installation on that computer may already be compromised by malware (which has previously been detected on that machine). What is the recommendation for current VLC Media Player users to make sure that they have a recently updated, reasonably safe installation of VLC Media Player that doesn't open up their computer to other vulnerabilities?
We did a lot of fuzzing with 2.1.x though and we've fixed all the security issues that were reported.
Would I be better off just completely uninstalling VLC Media Player?
AFTER EDIT: I might have considered a direct answer to my question (whatever the answer was) more helpful than a silent downvote to what was, after all, just a polite response to a question that someone asked me.
AFTER FURTHER EDIT: After some more rebooting of the previously infected computer, the operating system and Secunia both report that VLC Media Player version 2.1.3 is installed, and that is not reported to have any problem by Secunia. So I will leave that alone. The computer from which I usually post to HN, a different computer on the same home network, does not have VLC Media Player installed. I try to keep a close-to-bare-stock set of installed programs on this computer, but other users in my household (= teenage boys who aspire to be hackers) tend to install programs I've never heard of on the other computer on our home network, and my wife, who has other things on her mind, occasionally doesn't notice installations of crapware or adware or bloatware that tag along with legitimate program updates on that computer. So that other computer tends to be the vector for malware attacks on the home network here. Thanks for any further comments participants here have on how to keep a home network safe when not all users follow strict quarantine policies.
I would have thought windows could limitate the amplitude of the sound sent to the hardware, maybe VLC is somehow bypassing this.
Seems like an odd issue though.
I once acquired an audio geologic recording of the tragic Christmas Eve tsunami in Indonesia. It was an interesting listen, with a lot of bass/sub-base frequencies. Played at what seemed a reasonable listening volume, it managed to destroy my iPod headphones. Seems some sounds can be inherently damaging to less robust equipment when seemingly operated well within sensible limits.
(The replacement of said headphones cemented my appreciation of Apple: at a time Apple wasn't selling headphones alone, upon my consternation of not being able to buy a set, a clerk ripped open a random box and handed me new headphones gratis.)
(Yes i suppose that is morally wrong, but so is blaming VLC for your own bad designs)
If we had a normal society anywhere on earth they would be sued to the ground there.
But of course, the people that burn their speakers this way don't care about dynamics or evidently about sound quality if they press their computer speakers like this. Can't sound not even a little good.
And they should be built to be able to withstand any valid signal.
On the second, the screen began to go at 14 months. I would never by consumer electronics from Dell again.
They are still terrible speakers, though. I almost laughed when showing a friend Star Wars for the first time; it doesn't even come close to doing the soundtrack justice.
External DVD Drive, play one of my DVDs on the Mac, audio is perfectly fine.
Play the same DVD on my Asus UX31, cannot hear the people talking, use VLC player to up the audio to 125% and its fine.
Speakers/amps should have DC protection builtin.
Limiters cannot either distinguish or protect against the technical difference between a sine wave and a square wave:
The red trace is a normal audio signal that doesn't exceed the dynamic range of the amplifier. The green trace is an example of the kind of signal one gets by turning the volume up way above normal.
In a hypothetical speaker of one ohm and a peak voltage of one volt, the red trace has a time-averaged power level of 1/2 watt. The green trace has a power level of one watt -- twice as high, and possibly too high for the speakers to tolerate.
> Speakers/amps should have DC protection builtin.
This example should show that this isn't possible without taking the temperature of the speaker's activation coil -- and even that might not work.
IMHO everyone who is saying "this should be fixed by software" is doing it wrong. How much would it cost to write, test, debug, etc. the appropriate firmware/drivers? And it would still be subject to "warranty is void because you didn't use the right software". That cost could buy a lot of capacitors... and then if the values were chosen correctly, whatever the software does, it would not be able to put more power through the speaker than designed.
Yes in principle, but it would be rather complicated -- it would need to have its own microprocessor just to save the speaker. D/A ICs with included amplifiers are already pretty complex. Also, if a user was listening to music that had an occasional high level, the special limiter might kick in and spoil the sound of the audio for a transient that wouldn't actually jeopardize the speakers.
That and hard clipping is obvious and sounds awful, so it should be apparent you're doing something wrong.
I've seen it happen many times in meetings.
1. Presenter shows a video and volume is low.
2. Presenter adds volume from VLC to 200% and sound signal gets distorted.
3. Sound is awful, no-one can hear anything and people are doing nothing to fix it, because they think that speakers are broken.
Please VLC, fix your player so that it has good sounding limiter on the "output". It's not difficult.