Audio connections

In the real world, patch cords are used to route audio signals between sources, special-effects processors, and speakers. In the Audio system, audio components are connected through their input and output ports. No loops (cycles) are allowed in a network of audio components. If an audio port connection creates a loop, an exception is thrown.

For audio players, a connection represents a single audio channel; stereo is handled by using two connections, one for the left channel and one for the right channel. By convention, the left channel is used if there is only a single channel (monophonic).

Audio ports

Like all media components, you connect audio components by using port surrogates to connect their ports. An audio component has at least one port, either an input port or an output port. For more information about general time-media components and ports, see "Routing time-media data" on page 298.

NOTE Audio ports do not support fan-in or fan-out. Only one component can be connected to an audio port at a time.

Audio types

Each audio port has one or more audio types associated with it. Audio types specify the format of the audio data that flows across a connection. When two ports are connected, a type negotiation takes place to verify that the types of the ports match. If they do not match, an exception is thrown. You can insert an instance of TAudioTypeConverter between two ports whose types do not match to perform an explicit type conversion.

Audio types are represented by TAudioType, which specifies the audio format, sample rate, sample width, and a unique name.

Audio type Sample rate
(samples/
sec)
Sample width
(bits)
Description

TAudioType::GetLinear16Bit44KHz 44100 16 Compact disc quality. Two's complement integer samples.
TAudioType::GetLinear8Bit22KHz 22050 8 Medium quality. Two's complement integer samples.
TAudioType::GetOffsetBinary8Bit22KHz 22050 8 Medium quality. Offset binary samples.
TAudioType::GetMuLaw8KHz 8000 8 North American telephone standard. Log-companded samples.
TAudioType::GetALaw8KHz 8000 8 Telephone quality, standard 8-bit A-law.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker