Async 1.8.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
72namespace 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
118{
119 public:
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
This file contains the base class for an audio sink.
This file contains the base class for an audio source.
This class just let the audio pass through.
virtual ~AudioPassthrough(void)
Destructor.
virtual void resumeOutput(void)
Resume audio output to the sink.
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
AudioPassthrough(void)
Default constuctor.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
The base class for an audio sink.
void sourceAllSamplesFlushed(void)
Tell the source that all samples have been flushed.
void sourceResumeOutput(void)
Tell the source that we are ready to accept more samples.
The base class for an audio source.
void sinkFlushSamples(void)
int sinkWriteSamples(const float *samples, int len)
Namespace for the asynchronous programming classes.