vdr  2.2.0
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 3.0 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 
16 class cAudio : public cListObject {
17 protected:
18  cAudio(void);
19 public:
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 
39 class cAudios : public cList<cAudio> {
40 public:
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 
47 extern cAudios Audios;
48 
49 class cExternalAudio : public cAudio {
50 private:
51  char *command;
53  bool mute;
54 public:
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
unsigned char uchar
Definition: tools.h:30
cAudio(void)
Definition: audio.c:16
virtual ~cAudio()
Definition: audio.c:21
Definition: tools.h:489
char * command
Definition: audio.h:51
virtual void Play(const uchar *Data, int Length, uchar Id)=0
Plays the given block of audio Data.
virtual void PlayTs(const uchar *Data, int Length)=0
Plays the given block of audio Data.
virtual void Mute(bool On)=0
Immediately sets the audio device to be silent (On==true) or to normal replay (On==false).
Definition: audio.h:39
virtual void Clear(void)=0
Clears all data that might still be awaiting processing.
Definition: thread.h:192
cPipe pipe
Definition: audio.h:52
cAudios Audios
Definition: audio.c:27
bool mute
Definition: audio.h:53
Definition: audio.h:16