comparison audioio/AudioCallbackPlayTarget.h @ 1:97c69acdcb82

* Adjust use of target sample rate, so as to make the decision about whether to resample or not more robust. * Update copyrights to 2006
author Chris Cannam
date Thu, 12 Jan 2006 13:45:06 +0000
parents db6fcbd4405c
children c606d3ffa397
comparison
equal deleted inserted replaced
0:db6fcbd4405c 1:97c69acdcb82
1 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ 1 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */
2 2
3 /* 3 /*
4 A waveform viewer and audio annotation editor. 4 A waveform viewer and audio annotation editor.
5 Chris Cannam, Queen Mary University of London, 2005 5 Chris Cannam, Queen Mary University of London, 2005-2006
6 6
7 This is experimental software. Not for distribution. 7 This is experimental software. Not for distribution.
8 */ 8 */
9 9
10 #ifndef _AUDIO_CALLBACK_PLAY_TARGET_H_ 10 #ifndef _AUDIO_CALLBACK_PLAY_TARGET_H_
32 /** 32 /**
33 * Set the playback gain (0.0 = silence, 1.0 = levels unmodified) 33 * Set the playback gain (0.0 = silence, 1.0 = levels unmodified)
34 */ 34 */
35 virtual void setOutputGain(float gain); 35 virtual void setOutputGain(float gain);
36 36
37 /**
38 * The main source model (providing the playback sample rate) has
39 * been changed. The target should query the source's sample
40 * rate, set its output sample rate accordingly, and call back on
41 * the source's setTargetSampleRate to indicate what sample rate
42 * it succeeded in setting at the output. If this differs from
43 * the model rate, the source will resample.
44 */
37 virtual void sourceModelReplaced() = 0; 45 virtual void sourceModelReplaced() = 0;
38 46
39 protected: 47 protected:
40 AudioCallbackPlaySource *m_source; 48 AudioCallbackPlaySource *m_source;
41 float m_outputGain; 49 float m_outputGain;