Async 1.8.0
AsyncSigCAudioSink.h
Go to the documentation of this file.
1
28#ifndef ASYNC_SIGC_AUDIO_SINK_INCLUDED
29#define ASYNC_SIGC_AUDIO_SINK_INCLUDED
30
31
32/****************************************************************************
33 *
34 * System Includes
35 *
36 ****************************************************************************/
37
38#include <sigc++/sigc++.h>
39
40
41/****************************************************************************
42 *
43 * Project Includes
44 *
45 ****************************************************************************/
46
47#include <AsyncAudioSink.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
114class SigCAudioSink : public AudioSink, public sigc::trackable
115{
116 public:
121
126
140 virtual int writeSamples(const float *samples, int count)
141 {
142 return sigWriteSamples(const_cast<float *>(samples), count);
143 }
144
155 virtual void flushSamples(void)
156 {
158 }
159
166 void resumeOutput(void)
167 {
169 }
170
180 {
182 }
183
194 sigc::signal<int, float *, int> sigWriteSamples;
195
203 sigc::signal<void> sigFlushSamples;
204
205}; /* class SigCAudioSink */
206
207
208} /* namespace */
209
210#endif /* ASYNC_SIGC_AUDIO_SINK_INCLUDED */
211
212
213
214/*
215 * This file has not been truncated
216 */
This file contains the base class for an audio sink.
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.
An adapter class to connect to an AudioSource class using SigC.
~SigCAudioSink(void)
Destructor.
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
sigc::signal< void > sigFlushSamples
Signal emitted when the source are finished writing samples.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
SigCAudioSink(void)
Default constuctor.
void resumeOutput(void)
Tell the source that we are ready to accept more samples.
sigc::signal< int, float *, int > sigWriteSamples
Signal that is emitted when the source write samples.
void allSamplesFlushed(void)
Tell the source that all samples have been flushed.
Namespace for the asynchronous programming classes.