mirror of https://github.com/OpenTTD/OpenTTD
(svn r18820) -Codechange: [SDL] make the number of samples runtime configurable and increase the default slightly
parent
1a1797ec4d
commit
f74ce1890e
|
@ -35,7 +35,7 @@ const char *SoundDriver_SDL::Start(const char * const *parm)
|
||||||
spec.freq = GetDriverParamInt(parm, "hz", 44100);
|
spec.freq = GetDriverParamInt(parm, "hz", 44100);
|
||||||
spec.format = AUDIO_S16SYS;
|
spec.format = AUDIO_S16SYS;
|
||||||
spec.channels = 2;
|
spec.channels = 2;
|
||||||
spec.samples = 512;
|
spec.samples = GetDriverParamInt(parm, "samples", 1024);
|
||||||
spec.callback = fill_sound_buffer;
|
spec.callback = fill_sound_buffer;
|
||||||
MxInitialize(spec.freq);
|
MxInitialize(spec.freq);
|
||||||
SDL_CALL SDL_OpenAudio(&spec, &spec);
|
SDL_CALL SDL_OpenAudio(&spec, &spec);
|
||||||
|
|
Loading…
Reference in New Issue