Async  1.5.0
AsyncAudioPassthrough.h
Go to the documentation of this file.
1 
28 #ifndef AUDIO_PASSTHROUGH_INCLUDED
29 #define AUDIO_PASSTHROUGH_INCLUDED
30 
31 
32 /****************************************************************************
33  *
34  * System Includes
35  *
36  ****************************************************************************/
37 
38 
39 
40 /****************************************************************************
41  *
42  * Project Includes
43  *
44  ****************************************************************************/
45 
46 #include <AsyncAudioSink.h>
47 #include <AsyncAudioSource.h>
48 
49 
50 /****************************************************************************
51  *
52  * Local Includes
53  *
54  ****************************************************************************/
55 
56 
57 
58 /****************************************************************************
59  *
60  * Forward declarations
61  *
62  ****************************************************************************/
63 
64 
65 
66 /****************************************************************************
67  *
68  * Namespace
69  *
70  ****************************************************************************/
71 
72 namespace Async
73 {
74 
75 
76 /****************************************************************************
77  *
78  * Forward declarations of classes inside of the declared namespace
79  *
80  ****************************************************************************/
81 
82 
83 
84 /****************************************************************************
85  *
86  * Defines & typedefs
87  *
88  ****************************************************************************/
89 
90 
91 
92 /****************************************************************************
93  *
94  * Exported Global Variables
95  *
96  ****************************************************************************/
97 
98 
99 
100 /****************************************************************************
101  *
102  * Class definitions
103  *
104  ****************************************************************************/
105 
117 class AudioPassthrough : public AudioSink, public AudioSource
118 {
119  public:
123  AudioPassthrough(void) {}
124 
128  virtual ~AudioPassthrough(void) {}
129 
141  virtual int writeSamples(const float *samples, int count)
142  {
143  return sinkWriteSamples(samples, count);
144  }
145 
154  virtual void flushSamples(void)
155  {
157  }
158 
166  virtual void resumeOutput(void)
167  {
169  }
170 
178  virtual void allSamplesFlushed(void)
179  {
181  }
182 
183  protected:
184 
185  private:
187  AudioPassthrough& operator=(const AudioPassthrough&);
188 
189 }; /* AudioPassthrough */
190 
191 
192 } /* namespace */
193 
194 #endif /* AUDIO_PASSTHROUGH_INCLUDED */
195 
196 
197 
198 /*
199  * This file has not been truncated
200  */
201 
Async::AudioPassthrough::writeSamples
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
Definition: AsyncAudioPassthrough.h:197
Async::AudioSource::sinkWriteSamples
int sinkWriteSamples(const float *samples, int len)
Async::AudioPassthrough::flushSamples
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
Definition: AsyncAudioPassthrough.h:210
Async::AudioPassthrough
This class just let the audio pass through.
Definition: AsyncAudioPassthrough.h:137
Async::AudioSource::sinkFlushSamples
void sinkFlushSamples(void)
Async::AudioPassthrough::~AudioPassthrough
virtual ~AudioPassthrough(void)
Destructor.
Definition: AsyncAudioPassthrough.h:184
Async::AudioPassthrough::AudioPassthrough
AudioPassthrough(void)
Default constuctor.
Definition: AsyncAudioPassthrough.h:179
Async
Namespace for the asynchronous programming classes.
Definition: AsyncApplication.h:75
AsyncAudioSink.h
This file contains the base class for an audio sink.
Async::AudioPassthrough::resumeOutput
virtual void resumeOutput(void)
Resume audio output to the sink.
Definition: AsyncAudioPassthrough.h:222
AsyncAudioSource.h
This file contains the base class for an audio source.
Async::AudioPassthrough::allSamplesFlushed
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
Definition: AsyncAudioPassthrough.h:234
Async::AudioSink::sourceAllSamplesFlushed
void sourceAllSamplesFlushed(void)
Tell the source that all samples have been flushed.
Async::AudioSink::sourceResumeOutput
void sourceResumeOutput(void)
Tell the source that we are ready to accept more samples.