forked from Sneeds-Feed-and-Seed/sneedacity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAudioIOListener.h
43 lines (27 loc) · 1.1 KB
/
AudioIOListener.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**********************************************************************
Sneedacity: A Digital Audio Editor
AudioIOListener.h
Dominic Mazzoni
Use the PortAudio library to play and record sound
**********************************************************************/
#ifndef __SNEEDACITY_AUDIO_IO_LISTENER__
#define __SNEEDACITY_AUDIO_IO_LISTENER__
class WaveTrack;
using WaveTrackArray =
std::vector < std::shared_ptr < WaveTrack > >;
class SNEEDACITY_DLL_API AudioIOListener /* not final */ {
public:
AudioIOListener() {}
virtual ~AudioIOListener() {}
// Pass 0 when audio stops, positive when it starts:
virtual void OnAudioIORate(int rate) = 0;
virtual void OnAudioIOStartRecording() = 0;
virtual void OnAudioIOStopRecording() = 0;
virtual void OnAudioIONewBlocks(const WaveTrackArray *tracks) = 0;
// Commit the addition of temporary recording tracks into the project
virtual void OnCommitRecording() = 0;
// During recording, the threshold for sound activation has been crossed
// in either direction
virtual void OnSoundActivationThreshold() = 0;
};
#endif