mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-21 15:08:01 +02:00
Some member functions of AudioIO can be const
This commit is contained in:
parent
f036700b09
commit
0d9972b3e0
@ -2451,7 +2451,7 @@ bool AudioIO::StartPortMidiStream()
|
||||
}
|
||||
#endif
|
||||
|
||||
bool AudioIO::IsAvailable(AudacityProject *project)
|
||||
bool AudioIO::IsAvailable(AudacityProject *project) const
|
||||
{
|
||||
return mOwningProject == NULL || mOwningProject == project;
|
||||
}
|
||||
@ -2790,7 +2790,7 @@ void AudioIO::SetPaused(bool state)
|
||||
mPaused = state;
|
||||
}
|
||||
|
||||
bool AudioIO::IsPaused()
|
||||
bool AudioIO::IsPaused() const
|
||||
{
|
||||
return mPaused;
|
||||
}
|
||||
@ -2815,7 +2815,7 @@ double AudioIO::GetLastTimeInScrubQueue() const
|
||||
|
||||
#endif
|
||||
|
||||
bool AudioIO::IsBusy()
|
||||
bool AudioIO::IsBusy() const
|
||||
{
|
||||
if (mStreamToken != 0)
|
||||
return true;
|
||||
@ -2823,7 +2823,7 @@ bool AudioIO::IsBusy()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioIO::IsStreamActive()
|
||||
bool AudioIO::IsStreamActive() const
|
||||
{
|
||||
bool isActive = false;
|
||||
// JKC: Not reporting any Pa error, but that looks OK.
|
||||
@ -2837,17 +2837,17 @@ bool AudioIO::IsStreamActive()
|
||||
return isActive;
|
||||
}
|
||||
|
||||
bool AudioIO::IsStreamActive(int token)
|
||||
bool AudioIO::IsStreamActive(int token) const
|
||||
{
|
||||
return (this->IsStreamActive() && this->IsAudioTokenActive(token));
|
||||
}
|
||||
|
||||
bool AudioIO::IsAudioTokenActive(int token)
|
||||
bool AudioIO::IsAudioTokenActive(int token) const
|
||||
{
|
||||
return ( token > 0 && token == mStreamToken );
|
||||
}
|
||||
|
||||
bool AudioIO::IsMonitoring()
|
||||
bool AudioIO::IsMonitoring() const
|
||||
{
|
||||
return ( mPortStreamV19 && mStreamToken==0 );
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
void SeekStream(double seconds) { mSeek = seconds; }
|
||||
|
||||
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
|
||||
bool IsScrubbing() { return IsBusy() && mScrubQueue != 0; }
|
||||
bool IsScrubbing() const { return IsBusy() && mScrubQueue != 0; }
|
||||
|
||||
/** \brief enqueue a NEW scrub play interval, using the last end as the NEW start,
|
||||
* to be played over the same duration, as between this and the last
|
||||
@ -275,7 +275,7 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
* or recording.
|
||||
*
|
||||
* When this is false, it's safe to start playing or recording */
|
||||
bool IsBusy();
|
||||
bool IsBusy() const;
|
||||
|
||||
/** \brief Returns true if the audio i/o is running at all, but not during
|
||||
* cleanup
|
||||
@ -283,8 +283,8 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
* Doesn't return true if the device has been closed but some disk i/o or
|
||||
* cleanup is still going on. If you want to know if it's safe to start a
|
||||
* NEW stream, use IsBusy() */
|
||||
bool IsStreamActive();
|
||||
bool IsStreamActive(int token);
|
||||
bool IsStreamActive() const;
|
||||
bool IsStreamActive(int token) const;
|
||||
|
||||
wxLongLong GetLastPlaybackTime() const { return mLastPlaybackTimeMillis; }
|
||||
AudacityProject *GetOwningProject() const { return mOwningProject; }
|
||||
@ -317,16 +317,16 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
*
|
||||
* This is used by TrackPanel to determine when a track has been completely
|
||||
* recorded, and it's safe to flush to disk. */
|
||||
bool IsAudioTokenActive(int token);
|
||||
bool IsAudioTokenActive(int token) const;
|
||||
|
||||
/** \brief Returns true if we're monitoring input (but not recording or
|
||||
* playing actual audio) */
|
||||
bool IsMonitoring();
|
||||
bool IsMonitoring() const;
|
||||
|
||||
/** \brief Pause and un-pause playback and recording */
|
||||
void SetPaused(bool state);
|
||||
/** \brief Find out if playback / recording is currently paused */
|
||||
bool IsPaused();
|
||||
bool IsPaused() const;
|
||||
|
||||
/* Mixer services are always available. If no stream is running, these
|
||||
* methods use whatever device is specified by the preferences. If a
|
||||
@ -479,7 +479,7 @@ class AUDACITY_DLL_API AudioIO final {
|
||||
double AILAGetLastDecisionTime();
|
||||
#endif
|
||||
|
||||
bool IsAvailable(AudacityProject *projecT);
|
||||
bool IsAvailable(AudacityProject *projecT) const;
|
||||
void SetCaptureMeter(AudacityProject *project, MeterPanel *meter);
|
||||
void SetPlaybackMeter(AudacityProject *project, MeterPanel *meter);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user