src/audio/mint/SDL_mintaudio_xbios.c
changeset 2022 649e9ac39f74
parent 2005 45af7d69f8eb
child 2027 d48ead2d2ba5
equal deleted inserted replaced
2021:4ddfbe55e105 2022:649e9ac39f74
    81 Audio_Available(void)
    81 Audio_Available(void)
    82 {
    82 {
    83     unsigned long dummy;
    83     unsigned long dummy;
    84     const char *envr = SDL_getenv("SDL_AUDIODRIVER");
    84     const char *envr = SDL_getenv("SDL_AUDIODRIVER");
    85 
    85 
    86     SDL_MintAudio_mint_present = (Getcookie(C_MiNT, &dummy) == C_FOUND);
    86     /*SDL_MintAudio_mint_present = (Getcookie(C_MiNT, &dummy) == C_FOUND);*/
       
    87     SDL_MintAudio_mint_present = SDL_FALSE;
    87 
    88 
    88     /* We can't use XBIOS in interrupt with Magic, don't know about thread */
    89     /* We can't use XBIOS in interrupt with Magic, don't know about thread */
    89     if (Getcookie(C_MagX, &dummy) == C_FOUND) {
    90     if (Getcookie(C_MagX, &dummy) == C_FOUND) {
    90         return (0);
    91         return (0);
    91     }
    92     }
   465     if (SDL_MintAudio_mint_present) {
   466     if (SDL_MintAudio_mint_present) {
   466         SDL_MintAudio_thread_pid = tfork(SDL_MintAudio_Thread, 0);
   467         SDL_MintAudio_thread_pid = tfork(SDL_MintAudio_Thread, 0);
   467     } else {
   468     } else {
   468         /* Install interrupt */
   469         /* Install interrupt */
   469         Jdisint(MFP_DMASOUND);
   470         Jdisint(MFP_DMASOUND);
   470         Xbtimer(XB_TIMERA, 8, 1, SDL_MintAudio_XbiosInterrupt);
   471         /*Xbtimer(XB_TIMERA, 8, 1, SDL_MintAudio_XbiosInterrupt);*/
       
   472         Xbtimer(XB_TIMERA, 8, 1, SDL_MintAudio_Dma8Interrupt);
   471         Jenabint(MFP_DMASOUND);
   473         Jenabint(MFP_DMASOUND);
   472 
   474 
   473         if (Setinterrupt(SI_TIMERA, SI_PLAY) < 0) {
   475         if (Setinterrupt(SI_TIMERA, SI_PLAY) < 0) {
   474             DEBUG_PRINT((DEBUG_NAME "Setinterrupt() failed\n"));
   476             DEBUG_PRINT((DEBUG_NAME "Setinterrupt() failed\n"));
   475         }
   477         }