31 for (
cAudio *audio = First(); audio; audio =
Next(audio))
32 audio->Play(Data, Length, Id);
37 for (
cAudio *audio = First(); audio; audio =
Next(audio))
38 audio->PlayTs(Data, Length);
43 for (
cAudio *audio = First(); audio; audio =
Next(audio))
49 for (
cAudio *audio = First(); audio; audio =
Next(audio))
57 command = strdup(Command);
69 if (command && !mute) {
70 if (pipe || pipe.Open(command,
"w")) {
71 if (0x80 <= Id && Id <= 0x87 || Id == 0xBD) {
72 int written = Data[8] + 9;
77 int w = fwrite(Data + written, 1, Length, pipe);
88 esyslog(
"ERROR: can't open pipe to audio command '%s'", command);
97 if (command && !mute) {
98 if (pipe || pipe.Open(command,
"w")) {
101 int w = fwrite(Data + written, 1, Length, pipe);
111 esyslog(
"ERROR: can't open pipe to audio command '%s'", command);
void Add(cListObject *Object, cListObject *After=NULL)
void PlayAudio(const uchar *Data, int Length, uchar Id)
virtual void Clear(void)
Clears all data that might still be awaiting processing.
virtual void PlayTs(const uchar *Data, int Length)
Plays the given block of audio Data.
virtual void Mute(bool On)
Immediately sets the audio device to be silent (On==true) or to normal replay (On==false).
virtual void Play(const uchar *Data, int Length, uchar Id)
Plays the given block of audio Data.
virtual ~cExternalAudio()
cListObject * Next(void) const
cExternalAudio(const char *Command)
virtual void Clear(void)=0
Clears all data that might still be awaiting processing.
void PlayTsAudio(const uchar *Data, int Length)
static void SetTransferModeForDolbyDigital(int Mode)