mirror of https://github.com/OpenRCT2/OpenRCT2.git
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:
parent
db1c9fab41
commit
ed402ccef1
|
@ -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.
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue