diff --git a/README.MiNT b/README.MiNT index 961ab8d64dcc2f7ce38b9bc52a37eea69874c27d..9632dab34e93b4f92b1b674bb472f418a7c79cb2 100644 --- a/README.MiNT +++ b/README.MiNT @@ -204,7 +204,7 @@ VBL timer driver: Audio drivers: Cookies _SND, MCSN, STFA and GSXB used to detect supported audio - capabilities. + capabilities. Note: XBIOS and MCSN drivers can not be used under MiNT. STE, Mega STE, TT: 8 bits DMA (hardware access) diff --git a/src/audio/mint/SDL_mintaudio_mcsn.c b/src/audio/mint/SDL_mintaudio_mcsn.c index a5b67eaeb61cfdffd78fe6568d5e2105d660b487..7855d2805de7d570b9f400a61b9cf6e7b999277d 100644 --- a/src/audio/mint/SDL_mintaudio_mcsn.c +++ b/src/audio/mint/SDL_mintaudio_mcsn.c @@ -82,8 +82,14 @@ static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec); static int Audio_Available(void) { + unsigned long dummy; const char *envr = getenv("SDL_AUDIODRIVER"); + /* We can't use XBIOS in interrupt under MiNT */ + if (Getcookie(C_MiNT, &dummy) == C_FOUND) { + return(0); + } + /* Check if user asked a different audio driver */ if ((envr) && (strcmp(envr, MINT_AUDIO_DRIVER_NAME)!=0)) { DEBUG_PRINT((DEBUG_NAME "user asked a different audio driver\n")); diff --git a/src/audio/mint/SDL_mintaudio_xbios.c b/src/audio/mint/SDL_mintaudio_xbios.c index f95a880f7aee0bb6e53ccbaea230940acab9a8e0..b012ff21bb87e197e44820b38242d0901d7f5e01 100644 --- a/src/audio/mint/SDL_mintaudio_xbios.c +++ b/src/audio/mint/SDL_mintaudio_xbios.c @@ -82,8 +82,14 @@ static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec); static int Audio_Available(void) { + unsigned long dummy; const char *envr = getenv("SDL_AUDIODRIVER"); + /* We can't use XBIOS in interrupt under MiNT */ + if (Getcookie(C_MiNT, &dummy) == C_FOUND) { + return(0); + } + /* Check if user asked a different audio driver */ if ((envr) && (strcmp(envr, MINT_AUDIO_DRIVER_NAME)!=0)) { DEBUG_PRINT((DEBUG_NAME "user asked a different audio driver\n"));