53ef50a03a
- rename from "libsndio" to "sndio" - remove support for "frame tick" synchronization; nothing uses it - as with many other sndio backends, the audio device block size is the buffer-write-size the application wants and there are 2 blocks per device buffer - if SDL will resample, increase the audio block and buffer size by the same ratio, so that device latency (or how much *time* the application has between write()s to not let the buffer underrun) does not change - allow applications to disable conversions tested with almost every port that uses this code (exceptions being some games that require non-free game data) on a device most likely to be affected by the changes (azalia(4) that only does 44.1 or 48 kHz s16) unoverriding conversion disabling exposes brokenness in a few other ports, those will be fixed soon
23 lines
819 B
Plaintext
23 lines
819 B
Plaintext
$OpenBSD: patch-src_audio_SDL_audio_c,v 1.16 2009/01/24 10:56:11 jakemsr Exp $
|
|
--- src/audio/SDL_audio.c.orig Sun Dec 30 20:47:59 2007
|
|
+++ src/audio/SDL_audio.c Thu Jan 22 20:40:14 2009
|
|
@@ -36,6 +36,9 @@
|
|
|
|
/* Available audio drivers */
|
|
static AudioBootStrap *bootstrap[] = {
|
|
+#if SDL_AUDIO_DRIVER_SNDIO
|
|
+ &SNDIO_bootstrap,
|
|
+#endif
|
|
#if SDL_AUDIO_DRIVER_BSD
|
|
&BSD_AUDIO_bootstrap,
|
|
#endif
|
|
@@ -532,7 +535,7 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpe
|
|
return(-1);
|
|
}
|
|
if ( audio->convert.needed ) {
|
|
- audio->convert.len = (int) ( ((double) desired->size) /
|
|
+ audio->convert.len = (int) ( ((double) audio->spec.size) /
|
|
audio->convert.len_ratio );
|
|
audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
|
|
audio->convert.len*audio->convert.len_mult);
|