Mercurial > sdl-ios-xcode
comparison src/audio/mint/SDL_mintaudio_dma8.c @ 1098:2911ff0a32bb
Set MFP interrupt at end of frame
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Wed, 20 Jul 2005 17:47:18 +0000 |
parents | 176240cf4405 |
children | 856f76a099c7 |
comparison
equal
deleted
inserted
replaced
1097:c83fa1c650dd | 1098:2911ff0a32bb |
---|---|
98 if (Getcookie(C__SND, &cookie_snd) == C_NOTFOUND) { | 98 if (Getcookie(C__SND, &cookie_snd) == C_NOTFOUND) { |
99 cookie_snd = SND_PSG; | 99 cookie_snd = SND_PSG; |
100 } | 100 } |
101 | 101 |
102 /* Check if we have 8 bits audio */ | 102 /* Check if we have 8 bits audio */ |
103 /* | |
104 if ((cookie_snd & SND_8BIT)==0) { | 103 if ((cookie_snd & SND_8BIT)==0) { |
105 DEBUG_PRINT((DEBUG_NAME "no 8 bits sound\n")); | 104 DEBUG_PRINT((DEBUG_NAME "no 8 bits sound\n")); |
106 return(0); | 105 return(0); |
107 } | 106 } |
108 */ | |
109 if ((cookie_mch>>16)>MCH_F30) { | |
110 DEBUG_PRINT((DEBUG_NAME "unknown 8 bits audio chip\n")); | |
111 return 0; | |
112 } | |
113 | 107 |
114 /* Check if audio is lockable */ | 108 /* Check if audio is lockable */ |
115 if ((cookie_mch>>16) == MCH_F30) { | 109 if (cookie_snd & SND_16BIT) { |
116 if (Locksnd()!=1) { | 110 if (Locksnd()!=1) { |
117 DEBUG_PRINT((DEBUG_NAME "audio locked by other application\n")); | 111 DEBUG_PRINT((DEBUG_NAME "audio locked by other application\n")); |
118 return(0); | 112 return(0); |
119 } | 113 } |
120 | 114 |
245 case MCH_TT: | 239 case MCH_TT: |
246 masterclock=MASTERCLOCK_TT; | 240 masterclock=MASTERCLOCK_TT; |
247 masterprediv=MASTERPREDIV_TT; | 241 masterprediv=MASTERPREDIV_TT; |
248 break; | 242 break; |
249 case MCH_F30: | 243 case MCH_F30: |
244 case MCH_ARANYM: | |
250 masterclock=MASTERCLOCK_FALCON1; | 245 masterclock=MASTERCLOCK_FALCON1; |
251 masterprediv=MASTERPREDIV_FALCON; | 246 masterprediv=MASTERPREDIV_FALCON; |
252 sfreq=1; | 247 sfreq=1; |
253 break; | 248 break; |
254 } | 249 } |
316 /* Set interrupt */ | 311 /* Set interrupt */ |
317 Jdisint(MFP_DMASOUND); | 312 Jdisint(MFP_DMASOUND); |
318 Xbtimer(XB_TIMERA, 8, 1, SDL_MintAudio_Dma8Interrupt); | 313 Xbtimer(XB_TIMERA, 8, 1, SDL_MintAudio_Dma8Interrupt); |
319 Jenabint(MFP_DMASOUND); | 314 Jenabint(MFP_DMASOUND); |
320 | 315 |
316 if (cookie_snd & SND_16BIT) { | |
317 if (Setinterrupt(SI_TIMERA, SI_PLAY)<0) { | |
318 DEBUG_PRINT((DEBUG_NAME "Setinterrupt() failed\n")); | |
319 } | |
320 } | |
321 | |
321 /* Go */ | 322 /* Go */ |
322 DMAAUDIO_IO.control = 3; /* playback + repeat */ | 323 DMAAUDIO_IO.control = 3; /* playback + repeat */ |
323 | 324 |
324 Super(oldpile); | 325 Super(oldpile); |
325 } | 326 } |