1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00
audacity/src/ProjectAudioIO.h
Panagiotis Vasilopoulos 44968d3ac3
Rebranding: Replace 'Audacity: A Digital Audio Editor' in source files (#248)
List of commands that were executed in the `src directory`:
* sed -i 's/Audacity: A Digital Audio Editor/Tenacity/g' *.h
* sed -i 's/Audacity: A Digital Audio Editor/Tenacity/g' *.cpp

Signed-off-by: Panagiotis Vasilopoulos <hello@alwayslivid.com>
2021-07-13 09:30:42 +00:00

57 lines
1.5 KiB
C++

/**********************************************************************
Tenacity
ProjectAudioIO.h
Paul Licameli split from AudacityProject.h
**********************************************************************/
#ifndef __PROJECT_AUDIO_IO__
#define __PROJECT_AUDIO_IO__
#include "ClientData.h" // to inherit
#include <wx/weakref.h>
class AudacityProject;
// Windows build needs complete type for parameter of wxWeakRef
// class MeterPanelBase;
#include "widgets/MeterPanelBase.h"
///\ brief Holds per-project state needed for interaction with AudioIO,
/// including the audio stream token and pointers to meters
class AUDACITY_DLL_API 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
wxWeakRef<MeterPanelBase> mPlaybackMeter{};
wxWeakRef<MeterPanelBase> mCaptureMeter{};
int mAudioIOToken{ -1 };
};
#endif