mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-05 00:26:23 +00:00
Fix sound distortion and improve sound clarity
This commit is contained in:
parent
bf0792e42a
commit
1dbb6a8bda
@ -38,16 +38,16 @@ std::recursive_mutex section;
|
|||||||
|
|
||||||
int eventAudioUpdate = -1;
|
int eventAudioUpdate = -1;
|
||||||
int eventHostAudioUpdate = -1;
|
int eventHostAudioUpdate = -1;
|
||||||
int mixFrequency = 44100;
|
int mixFrequency = 48000;
|
||||||
const int hwSampleRate = 44100;
|
const int hwSampleRate = 48000;
|
||||||
const int hwBlockSize = 480;
|
const int hwBlockSize = 480;
|
||||||
const int hostAttemptBlockSize = 64;
|
const int hostAttemptBlockSize = 64;
|
||||||
const int audioIntervalUs = (int)(1000000ULL * hwBlockSize / hwSampleRate);
|
const int audioIntervalUs = (int)(1000000ULL * hwBlockSize / hwSampleRate);
|
||||||
const int audioHostIntervalUs = (int)(1000000ULL * hostAttemptBlockSize / hwSampleRate);
|
const int audioHostIntervalUs = (int)(1000000ULL * hostAttemptBlockSize / hwSampleRate);
|
||||||
|
|
||||||
// High and low watermarks, basically.
|
// High and low watermarks, basically.
|
||||||
const int chanQueueMaxSizeFactor = 4;
|
const int chanQueueMaxSizeFactor = 12;
|
||||||
const int chanQueueMinSizeFactor = 2;
|
const int chanQueueMinSizeFactor = 1;
|
||||||
|
|
||||||
FixedSizeQueue<s16, hwBlockSize * 8> outAudioQueue;
|
FixedSizeQueue<s16, hwBlockSize * 8> outAudioQueue;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ void hleHostAudioUpdate(u64 userdata, int cyclesLate)
|
|||||||
|
|
||||||
void __AudioInit()
|
void __AudioInit()
|
||||||
{
|
{
|
||||||
mixFrequency = 44100;
|
mixFrequency = 48000;
|
||||||
|
|
||||||
eventAudioUpdate = CoreTiming::RegisterEvent("AudioUpdate", &hleAudioUpdate);
|
eventAudioUpdate = CoreTiming::RegisterEvent("AudioUpdate", &hleAudioUpdate);
|
||||||
eventHostAudioUpdate = CoreTiming::RegisterEvent("AudioUpdateHost", &hleHostAudioUpdate);
|
eventHostAudioUpdate = CoreTiming::RegisterEvent("AudioUpdateHost", &hleHostAudioUpdate);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user