diff options
Diffstat (limited to 'examples/alloopback.c')
-rw-r--r-- | examples/alloopback.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/alloopback.c b/examples/alloopback.c index 7513458b..56cd420f 100644 --- a/examples/alloopback.c +++ b/examples/alloopback.c @@ -30,6 +30,7 @@ #include <math.h> #include <stdio.h> +#define SDL_MAIN_HANDLED #include "SDL.h" #include "SDL_audio.h" #include "SDL_error.h" @@ -141,6 +142,8 @@ int main(int argc, char *argv[]) (void)argc; (void)argv; + SDL_SetMainReady(); + /* Print out error if extension is missing. */ if(!alcIsExtensionPresent(NULL, "ALC_SOFT_loopback")) { @@ -197,6 +200,10 @@ int main(int argc, char *argv[]) attrs[3] = ALC_UNSIGNED_SHORT_SOFT; else if(obtained.format == AUDIO_S16SYS) attrs[3] = ALC_SHORT_SOFT; + else if(obtained.format == AUDIO_S32SYS) + attrs[3] = ALC_INT_SOFT; + else if(obtained.format == AUDIO_F32SYS) + attrs[3] = ALC_FLOAT_SOFT; else { fprintf(stderr, "Unhandled SDL format: 0x%04x\n", obtained.format); |