vdr 2.6.4
audio.h
Go to the documentation of this file.
1/*
2 * audio.h: The basic audio interface
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * $Id: audio.h 2.1 2008/07/06 11:39:21 kls Exp $
8 */
9
10#ifndef __AUDIO_H
11#define __AUDIO_H
12
13#include "thread.h"
14#include "tools.h"
15
16class cAudio : public cListObject {
17protected:
18 cAudio(void);
19public:
20 virtual ~cAudio();
21 virtual void Play(const uchar *Data, int Length, uchar Id) = 0;
27 virtual void PlayTs(const uchar *Data, int Length) = 0;
32 virtual void Mute(bool On) = 0;
35 virtual void Clear(void) = 0;
37 };
38
39class cAudios : public cList<cAudio> {
40public:
41 void PlayAudio(const uchar *Data, int Length, uchar Id);
42 void PlayTsAudio(const uchar *Data, int Length);
43 void MuteAudio(bool On);
44 void ClearAudio(void);
45 };
46
47extern cAudios Audios;
48
49class cExternalAudio : public cAudio {
50private:
51 char *command;
53 bool mute;
54public:
55 cExternalAudio(const char *Command);
56 virtual ~cExternalAudio();
57 virtual void Play(const uchar *Data, int Length, uchar Id);
58 virtual void PlayTs(const uchar *Data, int Length);
59 virtual void Mute(bool On);
60 virtual void Clear(void);
61 };
62
63#endif //__AUDIO_H
cAudios Audios
Definition audio.c:27
Definition audio.h:16
virtual void PlayTs(const uchar *Data, int Length)=0
Plays the given block of audio Data.
virtual void Clear(void)=0
Clears all data that might still be awaiting processing.
virtual void Play(const uchar *Data, int Length, uchar Id)=0
Plays the given block of audio Data.
cAudio(void)
Definition audio.c:16
virtual ~cAudio()
Definition audio.c:21
virtual void Mute(bool On)=0
Immediately sets the audio device to be silent (On==true) or to normal replay (On==false).
void PlayAudio(const uchar *Data, int Length, uchar Id)
Definition audio.c:29
void PlayTsAudio(const uchar *Data, int Length)
Definition audio.c:35
void ClearAudio(void)
Definition audio.c:47
void MuteAudio(bool On)
Definition audio.c:41
virtual void Mute(bool On)
Immediately sets the audio device to be silent (On==true) or to normal replay (On==false).
Definition audio.c:118
virtual ~cExternalAudio()
Definition audio.c:62
cPipe pipe
Definition audio.h:52
char * command
Definition audio.h:51
virtual void Play(const uchar *Data, int Length, uchar Id)
Plays the given block of audio Data.
Definition audio.c:67
virtual void Clear(void)
Clears all data that might still be awaiting processing.
Definition audio.c:125
bool mute
Definition audio.h:53
virtual void PlayTs(const uchar *Data, int Length)
Plays the given block of audio Data.
Definition audio.c:95
Definition tools.h:641
unsigned char uchar
Definition tools.h:31