Re: [Plib-users] Damage to sound hardware
Brought to you by:
sjbaker
From: <Va...@t-...> - 2000-10-01 11:20:42
|
Risto S Varanka wrote: > > I gather it is possible to damage your audio hardware, eg. the > speakers, if you for example turn the volume high enough and play > some clicks or noise. I imagine this could happen with badly > coded / pre-alpha / prototype applications. > > How do you guard against this using Plib, so you can avoid > problems with your users? Should you always set your safetyMargin > high enough and check that you get the same from getRate etc. for > your slSample and slScheduler? (Btw, what would happen if you call > slSample::adjustVolume in a loop?) IMHO it's not the task of PLIB to protect the user/speaker from such sounds. There are two reasons: 1) it's technically too complex and would consume too much CPU for something that nearly no application needs. We'd need to add a 'noise detection' that most probably would require some sort of fourier transformation - or we would need to scale the volume down generally. Both sollutions wouldn't be wanted by our customers (i.e. the application programmers) as there are quite a lot real time programmers (they need every bit of the CPU). And a downscaled volume would force the programmers to scale the sound up before he sends it to SL - due to the limited precition we'd loose quality. 2) If the application destroys the speakers it's the applications fault, not ours. We didn't provide the sound - we are just passing it to the OS which is passing it to the soundcard wich is passing it to the speakers. So we also should require the OS and the soundcard to protect the speakers (oh, and the speakers should protect themselves, too) IMHO it's ridiculous to make a library guilty for destroying the speakers; we'd just have to bewareabout the USA as there's a microwave producer guilty for the death of an hamster that a customer put into it to dry it after a bath (unless the puts a warning in the manual...). Both examples show that the problem lies somewhere else. CU, Christian |