Audacity 3.2.0
AudioIOListener.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 AudioIOListener.h
6
7 Dominic Mazzoni
8
9 Use the PortAudio library to play and record sound
10
11**********************************************************************/
12
13#ifndef __AUDACITY_AUDIO_IO_LISTENER__
14#define __AUDACITY_AUDIO_IO_LISTENER__
15
16
17
18class WaveTrack;
20 std::vector < std::shared_ptr < WaveTrack > >;
21
22class AUDACITY_DLL_API AudioIOListener /* not final */ {
23public:
25 virtual ~AudioIOListener() {}
26
27 // Pass 0 when audio stops, positive when it starts:
28 virtual void OnAudioIORate(int rate) = 0;
29
30 virtual void OnAudioIOStartRecording() = 0;
31 virtual void OnAudioIOStopRecording() = 0;
32 virtual void OnAudioIONewBlocks(const WaveTrackArray *tracks) = 0;
33
34 // Commit the addition of temporary recording tracks into the project
35 virtual void OnCommitRecording() = 0;
36
37 // During recording, the threshold for sound activation has been crossed
38 // in either direction
39 virtual void OnSoundActivationThreshold() = 0;
40
41};
42
43#endif
std::vector< std::shared_ptr< WaveTrack > > WaveTrackArray
Definition: AudioIO.h:49
Monitors record play start/stop and new sample blocks. Has callbacks for these events.
virtual void OnAudioIORate(int rate)=0
virtual void OnSoundActivationThreshold()=0
virtual void OnAudioIOStopRecording()=0
virtual void OnAudioIONewBlocks(const WaveTrackArray *tracks)=0
virtual void OnAudioIOStartRecording()=0
virtual void OnCommitRecording()=0
virtual ~AudioIOListener()
A Track that contains audio waveform data.
Definition: WaveTrack.h:57