src/audio/mint/SDL_mintaudio_xbios.c
branchSDL-1.2
changeset 5867 94e0116059f4
parent 5653 9a7d629b403a
child 6137 4720145f848b
equal deleted inserted replaced
5864:f31019514269 5867:94e0116059f4
   382 	return 0;
   382 	return 0;
   383 }
   383 }
   384 
   384 
   385 static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec)
   385 static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec)
   386 {
   386 {
   387 	int channels_mode, dmaclock, prediv;
   387 	int channels_mode, prediv;
   388 	void *buffer;
   388 	void *buffer;
   389 
   389 
   390 	/* Stop currently playing sound */
   390 	/* Stop currently playing sound */
   391 	SDL_MintAudio_quit_thread = SDL_FALSE;
   391 	SDL_MintAudio_quit_thread = SDL_FALSE;
   392 	SDL_MintAudio_thread_finished = SDL_TRUE;
   392 	SDL_MintAudio_thread_finished = SDL_TRUE;
   410 	}
   410 	}
   411 	if (Setmode(channels_mode)<0) {
   411 	if (Setmode(channels_mode)<0) {
   412 		DEBUG_PRINT((DEBUG_NAME "Setmode() failed\n"));
   412 		DEBUG_PRINT((DEBUG_NAME "Setmode() failed\n"));
   413 	}
   413 	}
   414 
   414 
   415 	dmaclock = MINTAUDIO_frequencies[MINTAUDIO_numfreq].masterclock;
       
   416 	prediv = MINTAUDIO_frequencies[MINTAUDIO_numfreq].predivisor;
   415 	prediv = MINTAUDIO_frequencies[MINTAUDIO_numfreq].predivisor;
   417 	if (MINTAUDIO_frequencies[MINTAUDIO_numfreq].gpio_bits != -1) {
   416 	if (MINTAUDIO_frequencies[MINTAUDIO_numfreq].gpio_bits != -1) {
   418 		Gpio(GPIO_SET,7);		/* DSP port gpio outputs */
   417 		Gpio(GPIO_SET,7);		/* DSP port gpio outputs */
   419 		Gpio(GPIO_WRITE, MINTAUDIO_frequencies[MINTAUDIO_numfreq].gpio_bits);
   418 		Gpio(GPIO_WRITE, MINTAUDIO_frequencies[MINTAUDIO_numfreq].gpio_bits);
   420 		Devconnect2(DMAPLAY, DAC|EXTOUT, CLKEXT, prediv);
   419 		Devconnect2(DMAPLAY, DAC|EXTOUT, CLKEXT, prediv);