15.01.2013 Views

U. Glaeser

U. Glaeser

U. Glaeser

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

system, and the application programs that ultimately generate the audio. Any method of determining<br />

the amount to reserve seems entirely arbitrary since variable quantities determine the optimal amount.<br />

Instead of relying on an arbitrary decision based on a guess, one could make measurements of the<br />

bus bandwidth used by other devices on the bus in a typical system. Although measurements are by no<br />

means a guarantee that any particular system will provide enough bandwidth, one can assume that a<br />

similarly equipped typical system will provide a similar amount of bandwidth. The designer can also<br />

estimate the bandwidth needed to program the audio processor. Clearly, there is a known overhead to<br />

start up a single channel of audio. The bandwidth needed to program the processor includes at least this<br />

overhead multiplied by the number of channels. There is additional bandwidth required to maintain a<br />

channel of audio. For example, if an object in a virtual 3-D environment moves, the processor must<br />

reprogram the portion of the audio processor that positions the object. Numerous other facets are part<br />

of this problem, and the audio processor designer should consult with the software engineers to obtain<br />

a reasonable estimate of the true bandwidth needed to program the processor.<br />

Given estimates of the memory bandwidth required for audio data transfer and the available bus<br />

bandwidth, the designer can determine the limits at which the system will fail. Based on this information,<br />

the processor implementation or the target system requirements may need to change.<br />

Mixing Multiple Sources<br />

The basic system requirements and user expectations require that the sound system sum together multiple<br />

audio sources with an independent level control for each source. The audio term for this summation<br />

process is mixing. The operating system usually provides software for a simple audio mixer that enables<br />

the user to control the relative levels of the compact disc, line in, microphone, and various internally<br />

generated sound sources. The system often uses a small digitally programmable analog mixer for the<br />

analog sources such as line in and microphone; however, the wavetable synthesizer and 3-D gaming<br />

applications require mixing a relatively large number of channels under real-time software control, as<br />

shown in Fig. 39.58. These applications use an all-digital mixer due to the large number of channels.<br />

On the surface, a digital audio mixer sounds like a trivial exercise in multiply-accumulate operations;<br />

however, in order to sum together sampled waveforms, they must all have the exact same sample rate.<br />

Consider two sampled waveforms, each 1-second in length. The first has a sample rate of 48 kHz and the<br />

second has a sample rate of 24 kHz. Although they both represent 1-second of time, the first waveform<br />

consists of 48000 points, and the second waveform consists of 24000 points. In order to mix them, they<br />

must have the same number of points representing the same amount of time.<br />

The solution is to use a sample rate converter before the mixer. The sample rate converter has a fixed<br />

output sampling-rate and a variable input sampling-rate. This allows the digital mixer to operate on<br />

multiple waveforms of different sample rates. The software programs the sample rate converter with the<br />

ratio of input to output, also known as the pitch. Pitch is a musical term that relates to the frequency of<br />

FIGURE 39.58<br />

© 2002 by CRC Press LLC<br />

Application<br />

with<br />

Large<br />

Number<br />

of<br />

Sound<br />

Sources<br />

Source 0<br />

Volume 0<br />

Source 1<br />

Volume 1<br />

Source N<br />

Volume N<br />

Mixing a large number of sound sources under software control.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!