Is there really a planet Gor on the far side of the sun? All I knew then was that a lot of people said they knew for a fact there was a planet Gor, which went one step beyond them simply believing there was a Gor. All of these people acted as if Gor was a reality, and they displayed a common set of experiences to the point where it was getting difficult for me to ascribe all of this to some highly detailed mass delusion. I was suddenly part of a wide circle of people living their lives as if Gor was a matter of fact. And then there was Rebecca stroke Jennifer and her age reversal serum. Suddenly the possibility of there actually being a Gor increased exponentially because as far as I knew there was nothing on Earth that could reverse the effects of old age. Yes it could be some highly elaborate trick to fool me, including archived evidence carefully planted for me to find but that then begged the question why go to all that effort to fool me? The thought of dozens of people working independently and sometimes together to weave an elaborate web of lies with the sole purpose of making me believe in Gor was just as improbable as there actually being a planet Gor. In fact, the possibility of another planet suddenly makes more sense than the possibility of so many people from different walks of life colluding at great expense and effort to fool me in particular. Why would anyone do that?
For web applications, the time delay between mouse and keyboard events (keydown, mousedown, etc.) and a sound being heard is important. This time delay is called latency and is caused by several factors (input device latency, internal buffering latency, DSP processing latency, output device latency, distance of user's ears from speakers, etc.), and is cummulative. The larger this latency is, the less satisfying the user's experience is going to be. In the extreme, it can make musical production or game-play impossible. At moderate levels it can affect timing and give the impression of sounds lagging behind or the game being non-responsive. For musical applications the timing problems affect rhythm. For gaming, the timing problems affect precision of gameplay. For interactive applications, it generally cheapens the users experience much in the same way that very low animation frame-rates do. Depending on the application, a reasonable latency can be from as low as 3-6 milliseconds to 25-50 milliseconds.
Audio glitches are caused by an interruption of the normal continuous audio stream, resulting in loud clicks and pops. It is considered to be a catastrophic failure of a multi-media system and must be avoided. It can be caused by problems with the threads responsible for delivering the audio stream to the hardware, such as scheduling latencies caused by threads not having the proper priority and time-constraints. It can also be caused by the audio DSP trying to do more work than is possible in real-time given the CPU's speed. The system should gracefully degrade to allow audio processing under resource constrained conditions without dropping audio frames. First of all, it should be clear that regardless of the platform, the audio processing load should never be enough to completely lock up the machine. Second, the audio rendering needs to produce a clean, un-interrupted audio stream without audible glitches. The system should be able to run on a range of hardware, from mobile phones and tablet devices to laptop and desktop computers.
But the more limited compute resources on a phone device make it necessary to consider techniques to scale back and reduce the complexity of the audio rendering. For example, voice-dropping algorithms can be implemented to reduce the total number of notes playing at any given time. The relative CPU usage can be dynamically measured for each AudioNode (and chains of connected nodes) as a percentage of the rendering time quantum. In a single-threaded implementation, overall CPU usage must remain below 100%. The measured usage may be used internally in the implementation for dynamic adjustments to the rendering. It may also be exposed through a cpuUsage attribute of AudioNode for use by JavaScript. In cases where the measured CPU usage is near 100% (or whatever threshold is considered too high), then an attempt to add additional AudioNodes into the rendering graph can trigger voice-dropping. Voice-dropping is a technique which limits the number of voices (notes) playing at the same time to keep CPU usage within a reasonable range.
|