mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
... except for Tags; also some uses of final and explicit This caught a mistake in Scrubbing.cpp
53 lines
1.3 KiB
C++
53 lines
1.3 KiB
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
ProjectAudioIO.h
|
|
|
|
Paul Licameli split from AudacityProject.h
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef __PROJECT_AUDIO_IO__
|
|
#define __PROJECT_AUDIO_IO__
|
|
|
|
#include "ClientData.h" // to inherit
|
|
|
|
class AudacityProject;
|
|
class MeterPanelBase;
|
|
|
|
///\ brief Holds per-project state needed for interaction with AudioIO,
|
|
/// including the audio stream token and pointers to meters
|
|
class ProjectAudioIO final
|
|
: public ClientData::Base
|
|
{
|
|
public:
|
|
static ProjectAudioIO &Get( AudacityProject &project );
|
|
static const ProjectAudioIO &Get( const AudacityProject &project );
|
|
|
|
explicit ProjectAudioIO( AudacityProject &project );
|
|
ProjectAudioIO( const ProjectAudioIO & ) PROHIBITED;
|
|
ProjectAudioIO &operator=( const ProjectAudioIO & ) PROHIBITED;
|
|
~ProjectAudioIO();
|
|
|
|
int GetAudioIOToken() const;
|
|
bool IsAudioActive() const;
|
|
void SetAudioIOToken(int token);
|
|
|
|
MeterPanelBase *GetPlaybackMeter();
|
|
void SetPlaybackMeter(MeterPanelBase *playback);
|
|
MeterPanelBase *GetCaptureMeter();
|
|
void SetCaptureMeter(MeterPanelBase *capture);
|
|
|
|
private:
|
|
AudacityProject &mProject;
|
|
|
|
// Project owned meters
|
|
MeterPanelBase *mPlaybackMeter{};
|
|
MeterPanelBase *mCaptureMeter{};
|
|
|
|
int mAudioIOToken{ -1 };
|
|
};
|
|
|
|
#endif
|