mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Merge pull request #667 from RachelBryk/remove-audio-limit
Remove audio frame limit.
This commit is contained in:
@ -152,7 +152,6 @@ namespace AudioCommon
|
||||
{
|
||||
if (soundStream)
|
||||
{
|
||||
soundStream->GetMixer()->SetThrottle(SConfig::GetInstance().m_Framelimit == 2);
|
||||
soundStream->SetVolume(SConfig::GetInstance().m_Volume);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ unsigned int CMixer::MixerFifo::Mix(short* samples, unsigned int numSamples, boo
|
||||
|
||||
u32 framelimit = SConfig::GetInstance().m_Framelimit;
|
||||
float aid_sample_rate = m_input_sample_rate + offset;
|
||||
if (consider_framelimit && framelimit > 2)
|
||||
if (consider_framelimit && framelimit > 1)
|
||||
{
|
||||
aid_sample_rate = aid_sample_rate * (framelimit - 1) * 5 / VideoInterface::TargetRefreshRate;
|
||||
}
|
||||
@ -132,21 +132,6 @@ void CMixer::MixerFifo::PushSamples(const short *samples, unsigned int num_sampl
|
||||
// needs to get updates to not deadlock.
|
||||
u32 indexW = Common::AtomicLoad(m_indexW);
|
||||
|
||||
if (m_mixer->m_throttle)
|
||||
{
|
||||
// The auto throttle function. This loop will put a ceiling on the CPU MHz.
|
||||
while (num_samples * 2 + ((indexW - Common::AtomicLoad(m_indexR)) & INDEX_MASK) >= MAX_SAMPLES * 2)
|
||||
{
|
||||
if (*PowerPC::GetStatePtr() != PowerPC::CPU_RUNNING || soundStream->IsMuted())
|
||||
break;
|
||||
// Shortcut key for Throttle Skipping
|
||||
if (Core::GetIsFramelimiterTempDisabled())
|
||||
break;
|
||||
SLEEP(1);
|
||||
soundStream->Update();
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we have enough free space
|
||||
// indexW == m_indexR results in empty buffer, so indexR must always be smaller than indexW
|
||||
if (num_samples * 2 + ((indexW - Common::AtomicLoad(m_indexR)) & INDEX_MASK) >= MAX_SAMPLES * 2)
|
||||
|
@ -26,7 +26,6 @@ public:
|
||||
, m_streaming_mixer(this, 48000)
|
||||
, m_sampleRate(BackendSampleRate)
|
||||
, m_logAudio(0)
|
||||
, m_throttle(false)
|
||||
, m_speed(0)
|
||||
{
|
||||
INFO_LOG(AUDIO_INTERFACE, "Mixer is initialized");
|
||||
@ -46,9 +45,6 @@ public:
|
||||
void SetStreamInputSampleRate(unsigned int rate);
|
||||
void SetStreamingVolume(unsigned int lvolume, unsigned int rvolume);
|
||||
|
||||
void SetThrottle(bool use) { m_throttle = use;}
|
||||
|
||||
|
||||
virtual void StartLogAudio(const std::string& filename)
|
||||
{
|
||||
if (! m_logAudio)
|
||||
@ -122,8 +118,6 @@ protected:
|
||||
|
||||
bool m_logAudio;
|
||||
|
||||
bool m_throttle;
|
||||
|
||||
std::mutex m_csMixing;
|
||||
|
||||
volatile float m_speed; // Current rate of the emulation (1.0 = 100% speed)
|
||||
|
Reference in New Issue
Block a user