comparison src/audio/mint/SDL_mintaudio_mcsn.c @ 1107:856f76a099c7

Can use both clocks of FDI interface on Falcon, plus digital output
author Patrice Mandin <patmandin@gmail.com>
date Sun, 07 Aug 2005 12:17:28 +0000
parents 524fd51f5d2c
children 12c49532be00
comparison
equal deleted inserted replaced
1106:524fd51f5d2c 1107:856f76a099c7
231 MINTAUDIO_freqcount=0; 231 MINTAUDIO_freqcount=0;
232 switch(cookie_mcsn->play) { 232 switch(cookie_mcsn->play) {
233 case MCSN_ST: 233 case MCSN_ST:
234 spec->channels=1; 234 spec->channels=1;
235 spec->format=8; /* FIXME: is it signed or unsigned ? */ 235 spec->format=8; /* FIXME: is it signed or unsigned ? */
236 SDL_MintAudio_AddFrequency(this, 12500, 0, 0); 236 SDL_MintAudio_AddFrequency(this, 12500, 0, 0, -1);
237 break; 237 break;
238 case MCSN_TT: /* Also STE, Mega STE */ 238 case MCSN_TT: /* Also STE, Mega STE */
239 spec->format=AUDIO_S8; 239 spec->format=AUDIO_S8;
240 masterclock=MASTERCLOCK_STE; 240 masterclock=MASTERCLOCK_STE;
241 masterprediv=MASTERPREDIV_STE; 241 masterprediv=MASTERPREDIV_STE;
242 if ((cookie_mch>>16)==MCH_TT) { 242 if ((cookie_mch>>16)==MCH_TT) {
243 masterclock=MASTERCLOCK_TT; 243 masterclock=MASTERCLOCK_TT;
244 masterprediv=MASTERPREDIV_TT; 244 masterprediv=MASTERPREDIV_TT;
245 } 245 }
246 for (i=0; i<4; i++) { 246 for (i=0; i<4; i++) {
247 SDL_MintAudio_AddFrequency(this, masterclock/(masterprediv*(1<<i)), masterclock, 3-i); 247 SDL_MintAudio_AddFrequency(this, masterclock/(masterprediv*(1<<i)),
248 masterclock, 3-i, -1);
248 } 249 }
249 break; 250 break;
250 case MCSN_FALCON: /* Also Mac */ 251 case MCSN_FALCON: /* Also Mac */
251 for (i=1; i<12; i++) { 252 for (i=1; i<12; i++) {
252 /* Remove unusable Falcon codec predivisors */ 253 /* Remove unusable Falcon codec predivisors */
253 if ((i==6) || (i==8) || (i==10)) { 254 if ((i==6) || (i==8) || (i==10)) {
254 continue; 255 continue;
255 } 256 }
256 SDL_MintAudio_AddFrequency(this, MASTERCLOCK_FALCON1/(MASTERPREDIV_FALCON*(i+1)), CLK25M, i+1); 257 SDL_MintAudio_AddFrequency(this, MASTERCLOCK_FALCON1/(MASTERPREDIV_FALCON*(i+1)),
258 CLK25M, i+1, -1);
257 } 259 }
258 if (cookie_mcsn->res1 != 0) { 260 if (cookie_mcsn->res1 != 0) {
259 for (i=1; i<4; i++) { 261 for (i=1; i<4; i++) {
260 SDL_MintAudio_AddFrequency(this, (cookie_mcsn->res1)/(MASTERPREDIV_FALCON*(1<<i)), CLKEXT, (1<<i)-1); 262 SDL_MintAudio_AddFrequency(this, (cookie_mcsn->res1)/(MASTERPREDIV_FALCON*(1<<i)),
263 CLKEXT, (1<<i)-1, -1);
261 } 264 }
262 } 265 }
263 spec->format |= 0x8000; /* Audio is always signed */ 266 spec->format |= 0x8000; /* Audio is always signed */
264 if ((spec->format & 0x00ff)==16) { 267 if ((spec->format & 0x00ff)==16) {
265 spec->format |= 0x1000; /* Audio is always big endian */ 268 spec->format |= 0x1000; /* Audio is always big endian */