Upgrade sound engine to support 44100hz sample rate (#20200)

* Upgrade sound engine to support 44100hz.
* Increase audio output buffer size to 4096.
This commit is contained in:
AuraSpecs 2023-05-15 19:42:15 +02:00 committed by GitHub
parent db1c9fab41
commit ed402ccef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
0.4.6 (in development)
------------------------------------------------------------------------
- Improved: [#20200] Allow audio files to play to up to 44100hz sample rate (from 22050hz).
- Change: [#20110] Fix a few RCT1 build height parity discrepancies.
- Fix: [#19823] Parkobj, disallow overriding objects of different object types.

View File

@ -27,10 +27,10 @@ void AudioMixer::Init(const char* device)
Close();
SDL_AudioSpec want = {};
want.freq = 22050;
want.freq = 44100;
want.format = AUDIO_S16SYS;
want.channels = 2;
want.samples = 2048;
want.samples = 4096;
want.callback = [](void* arg, uint8_t* dst, int32_t length) -> void {
auto* mixer = static_cast<AudioMixer*>(arg);
mixer->GetNextAudioChunk(dst, static_cast<size_t>(length));