Skip to content

Commit

Permalink
inline input and output sample rates
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossmaxx committed Oct 27, 2024
1 parent 3ed1716 commit de53170
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
12 changes: 10 additions & 2 deletions include/AudioEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,16 @@ class LMMS_EXPORT AudioEngine : public QObject

sample_rate_t baseSampleRate() const { return m_baseSampleRate; }

sample_rate_t outputSampleRate() const;
sample_rate_t inputSampleRate() const;

sample_rate_t outputSampleRate() const{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}


sample_rate_t inputSampleRate() const{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}


inline float masterGain() const
{
Expand Down
13 changes: 0 additions & 13 deletions src/core/AudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,6 @@ void AudioEngine::stopProcessing()



sample_rate_t AudioEngine::outputSampleRate() const
{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}




sample_rate_t AudioEngine::inputSampleRate() const
{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}

bool AudioEngine::criticalXRuns() const
{
return cpuLoad() >= 99 && Engine::getSong()->isExporting() == false;
Expand Down

0 comments on commit de53170

Please sign in to comment.