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#ifndef __AUDACITY_AUDIO_IO_LISTENER__
13#define __AUDACITY_AUDIO_IO_LISTENER__
14
15#include <memory>
16#include <vector>
17
18class AUDIO_IO_API AudioIOListener /* not final */ {
19public:
22
23 // Pass 0 when audio stops, positive when it starts:
24 virtual void OnAudioIORate(int rate) = 0;
25
26 virtual void OnAudioIOStartRecording() = 0;
27 virtual void OnAudioIOStopRecording() = 0;
28 virtual void OnAudioIONewBlocks() = 0;
29
30 // Commit the addition of temporary recording tracks into the project
31 virtual void OnCommitRecording() = 0;
32
33 // During recording, the threshold for sound activation has been crossed
34 // in either direction
35 virtual void OnSoundActivationThreshold() = 0;
36
37};
38
39#endif
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()=0
virtual void OnAudioIOStartRecording()=0
virtual ~AudioIOListener()
virtual void OnCommitRecording()=0