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).
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 are represented by TAudioType, which specifies the audio format, sample rate, sample width, and a unique name.
Audio ports
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 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. |