1 .. -*- coding: utf-8; mode: rst -*-
9 This section describes the structures, data types and defines used when
10 talking to the audio device.
12 .. c:type:: audio_stream_source
14 The audio stream source is set through the AUDIO_SELECT_SOURCE call
15 and can take the following values, depending on whether we are replaying
16 from an internal (demux) or external (user write) source.
24 } audio_stream_source_t;
26 AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the
27 frontend or the DVR device) as the source of the video stream. If
28 AUDIO_SOURCE_MEMORY is selected the stream comes from the application
29 through the ``write()`` system call.
32 .. c:type:: audio_play_state
34 The following values can be returned by the AUDIO_GET_STATUS call
35 representing the state of audio playback.
47 .. c:type:: audio_channel_select
49 The audio channel selected via AUDIO_CHANNEL_SELECT is determined by
61 } audio_channel_select_t;
64 .. c:type:: audio_status
66 The AUDIO_GET_STATUS call returns the following structure informing
67 about various states of the playback operation.
72 typedef struct audio_status {
73 boolean AV_sync_state;
75 audio_play_state_t play_state;
76 audio_stream_source_t stream_source;
77 audio_channel_select_t channel_select;
79 audio_mixer_t mixer_state;
83 .. c:type:: audio_mixer
85 The following structure is used by the AUDIO_SET_MIXER call to set the
91 typedef struct audio_mixer {
92 unsigned int volume_left;
93 unsigned int volume_right;
102 A call to AUDIO_GET_CAPABILITIES returns an unsigned integer with the
103 following bits set according to the hardwares capabilities.
108 #define AUDIO_CAP_DTS 1
109 #define AUDIO_CAP_LPCM 2
110 #define AUDIO_CAP_MP1 4
111 #define AUDIO_CAP_MP2 8
112 #define AUDIO_CAP_MP3 16
113 #define AUDIO_CAP_AAC 32
114 #define AUDIO_CAP_OGG 64
115 #define AUDIO_CAP_SDDS 128
116 #define AUDIO_CAP_AC3 256