6eb6aab8f5
... when there really is at least one new sample block committed to the table, which is typically only once in about every six seconds, with the default rate and sample format. Also renamed a callback function more aptly, since blocks are not files any more.
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
AudioIOListener.h
|
|
|
|
Dominic Mazzoni
|
|
|
|
Use the PortAudio library to play and record sound
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef __AUDACITY_AUDIO_IO_LISTENER__
|
|
#define __AUDACITY_AUDIO_IO_LISTENER__
|
|
|
|
#include "Audacity.h"
|
|
|
|
class AUDACITY_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
|