mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-25 08:58:06 +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
|
#endif
|
||||||
|
|
||||||
bool AudioIO::IsAvailable(AudacityProject *project)
|
bool AudioIO::IsAvailable(AudacityProject *project) const
|
||||||
{
|
{
|
||||||
return mOwningProject == NULL || mOwningProject == project;
|
return mOwningProject == NULL || mOwningProject == project;
|
||||||
}
|
}
|
||||||
@ -2790,7 +2790,7 @@ void AudioIO::SetPaused(bool state)
|
|||||||
mPaused = state;
|
mPaused = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioIO::IsPaused()
|
bool AudioIO::IsPaused() const
|
||||||
{
|
{
|
||||||
return mPaused;
|
return mPaused;
|
||||||
}
|
}
|
||||||
@ -2815,7 +2815,7 @@ double AudioIO::GetLastTimeInScrubQueue() const
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool AudioIO::IsBusy()
|
bool AudioIO::IsBusy() const
|
||||||
{
|
{
|
||||||
if (mStreamToken != 0)
|
if (mStreamToken != 0)
|
||||||
return true;
|
return true;
|
||||||
@ -2823,7 +2823,7 @@ bool AudioIO::IsBusy()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioIO::IsStreamActive()
|
bool AudioIO::IsStreamActive() const
|
||||||
{
|
{
|
||||||
bool isActive = false;
|
bool isActive = false;
|
||||||
// JKC: Not reporting any Pa error, but that looks OK.
|
// JKC: Not reporting any Pa error, but that looks OK.
|
||||||
@ -2837,17 +2837,17 @@ bool AudioIO::IsStreamActive()
|
|||||||
return isActive;
|
return isActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioIO::IsStreamActive(int token)
|
bool AudioIO::IsStreamActive(int token) const
|
||||||
{
|
{
|
||||||
return (this->IsStreamActive() && this->IsAudioTokenActive(token));
|
return (this->IsStreamActive() && this->IsAudioTokenActive(token));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioIO::IsAudioTokenActive(int token)
|
bool AudioIO::IsAudioTokenActive(int token) const
|
||||||
{
|
{
|
||||||
return ( token > 0 && token == mStreamToken );
|
return ( token > 0 && token == mStreamToken );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioIO::IsMonitoring()
|
bool AudioIO::IsMonitoring() const
|
||||||
{
|
{
|
||||||
return ( mPortStreamV19 && mStreamToken==0 );
|
return ( mPortStreamV19 && mStreamToken==0 );
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ class AUDACITY_DLL_API AudioIO final {
|
|||||||
void SeekStream(double seconds) { mSeek = seconds; }
|
void SeekStream(double seconds) { mSeek = seconds; }
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
|
#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,
|
/** \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
|
* 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.
|
* or recording.
|
||||||
*
|
*
|
||||||
* When this is false, it's safe to start playing 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
|
/** \brief Returns true if the audio i/o is running at all, but not during
|
||||||
* cleanup
|
* 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
|
* 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
|
* cleanup is still going on. If you want to know if it's safe to start a
|
||||||
* NEW stream, use IsBusy() */
|
* NEW stream, use IsBusy() */
|
||||||
bool IsStreamActive();
|
bool IsStreamActive() const;
|
||||||
bool IsStreamActive(int token);
|
bool IsStreamActive(int token) const;
|
||||||
|
|
||||||
wxLongLong GetLastPlaybackTime() const { return mLastPlaybackTimeMillis; }
|
wxLongLong GetLastPlaybackTime() const { return mLastPlaybackTimeMillis; }
|
||||||
AudacityProject *GetOwningProject() const { return mOwningProject; }
|
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
|
* This is used by TrackPanel to determine when a track has been completely
|
||||||
* recorded, and it's safe to flush to disk. */
|
* 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
|
/** \brief Returns true if we're monitoring input (but not recording or
|
||||||
* playing actual audio) */
|
* playing actual audio) */
|
||||||
bool IsMonitoring();
|
bool IsMonitoring() const;
|
||||||
|
|
||||||
/** \brief Pause and un-pause playback and recording */
|
/** \brief Pause and un-pause playback and recording */
|
||||||
void SetPaused(bool state);
|
void SetPaused(bool state);
|
||||||
/** \brief Find out if playback / recording is currently paused */
|
/** \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
|
/* Mixer services are always available. If no stream is running, these
|
||||||
* methods use whatever device is specified by the preferences. If a
|
* methods use whatever device is specified by the preferences. If a
|
||||||
@ -479,7 +479,7 @@ class AUDACITY_DLL_API AudioIO final {
|
|||||||
double AILAGetLastDecisionTime();
|
double AILAGetLastDecisionTime();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool IsAvailable(AudacityProject *projecT);
|
bool IsAvailable(AudacityProject *projecT) const;
|
||||||
void SetCaptureMeter(AudacityProject *project, MeterPanel *meter);
|
void SetCaptureMeter(AudacityProject *project, MeterPanel *meter);
|
||||||
void SetPlaybackMeter(AudacityProject *project, MeterPanel *meter);
|
void SetPlaybackMeter(AudacityProject *project, MeterPanel *meter);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user