Mercurial > hg > svcore
comparison base/AudioPlaySource.h @ 389:a1b6d2e33cab
* document library dependencies
* remove dependency of transform on audioio
author | Chris Cannam |
---|---|
date | Thu, 13 Mar 2008 10:12:14 +0000 |
parents | d3ac9f953ebf |
children | cb5eb032c28b 6a94bb528e9d |
comparison
equal
deleted
inserted
replaced
388:370aa9714ef5 | 389:a1b6d2e33cab |
---|---|
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #ifndef _AUDIO_PLAY_SOURCE_H_ | 16 #ifndef _AUDIO_PLAY_SOURCE_H_ |
17 #define _AUDIO_PLAY_SOURCE_H_ | 17 #define _AUDIO_PLAY_SOURCE_H_ |
18 | |
19 struct Auditionable { | |
20 virtual ~Auditionable() { } | |
21 }; | |
18 | 22 |
19 /** | 23 /** |
20 * Simple interface for audio playback. This should be all that the | 24 * Simple interface for audio playback. This should be all that the |
21 * ViewManager needs to know about to synchronise with playback by | 25 * ViewManager needs to know about to synchronise with playback by |
22 * sample frame, but it doesn't provide enough to determine what is | 26 * sample frame, but it doesn't provide enough to determine what is |
67 * Return the sample rate set by the target audio device (or the | 71 * Return the sample rate set by the target audio device (or the |
68 * source sample rate if the target hasn't set one). If the | 72 * source sample rate if the target hasn't set one). If the |
69 * source and target sample rates differ, resampling will occur. | 73 * source and target sample rates differ, resampling will occur. |
70 */ | 74 */ |
71 virtual size_t getTargetSampleRate() const = 0; | 75 virtual size_t getTargetSampleRate() const = 0; |
72 | 76 |
77 /** | |
78 * Get the block size of the target audio device. This may be an | |
79 * estimate or upper bound, if the target has a variable block | |
80 * size; the source should behave itself even if this value turns | |
81 * out to be inaccurate. | |
82 */ | |
83 virtual size_t getTargetBlockSize() const = 0; | |
84 | |
85 /** | |
86 * Get the number of channels of audio that will be provided | |
87 * to the play target. This may be more than the source channel | |
88 * count: for example, a mono source will provide 2 channels | |
89 * after pan. | |
90 */ | |
91 virtual size_t getTargetChannelCount() const = 0; | |
92 | |
93 /** | |
94 * Set a plugin or other subclass of Auditionable as an | |
95 * auditioning effect. | |
96 */ | |
97 virtual void setAuditioningEffect(Auditionable *) = 0; | |
98 | |
73 }; | 99 }; |
74 | 100 |
75 #endif | 101 #endif |