| || || |
Open Sound System
OSS 4.x Programmer's Guide
AFMT_AC3 sample format
Dolby Digital (AC3) sample format
The AC3 sample format is designed by Dolby and it's commonly used on DVD video disks and in digital satellite/cable/terrestrial TV transmissions. Please look at the documentation available on Dolby's web site
for more information.
The AC3 format is not linear and requires special encoding and decoding algorithm that can be licensed from Dolby. This is beyond the scope of this document.
The AFMT_AC3 format requires significantly different handling than most other sample formats known by OSS.
- Many drivers report AFMT_AC3 as a supported format when the SNDCTL_DSP_GETFMTS is called. However this doesn't guarantee thet the device actually supports this format. This unusual behaviour is just required to keep many popular DVD player applications happy.
- Usually AC3 playback is done using so called AC3 passthrough method. It means that the application dumps the bitstream to the digital (S/PDIF) output device hoping that the device connected to the other end of the cable can decode it. There is no way to detect this capability automatically so the application must ask if the user really wants to use this feature.
- The application must also turn on two channel (stereo) mode and and set the sampling rate to 48 kHz. The number of channels must be set to 2 regardless of the format the bitstream itself contains.
- The AC3 format is based on frames. The bit rate of the encoded signal is smaller than 48 kHz. This means that the application must pad the AC3 frames with zero bytes to make the actual data rate to be exactly 48000*4 bytes per second). Otherwise the frames will be sent too fast to the decoder.
Copyright (C) 4Front Technologies, 2007. All rights reserved. Back to index OSS web site