示例#1
0
/*** 
      gx_audio_Start

     This function restarts the audio engine
     This is called when coming back from Main Menu
 ***/
void gx_audio_Start(void)
{
  /* shutdown background music */
  PauseOgg(1);	
  StopOgg();	
  
  /* shutdown menu audio processing */
  ASND_Pause(1);
  ASND_End();
  AUDIO_StopDMA();
  AUDIO_RegisterDMACallback(NULL);
  DSP_Halt();

  /* DMA Interrupt callback */
  AUDIO_RegisterDMACallback(ai_callback);

  /* emulation is synchronized with audio hardware by default */
  audioSync = AUDIO_WAIT;

  /* reset emulation audio processing */
  memset(soundbuffer, 0, sizeof(soundbuffer));
  audioWait = 0;
  bufferSize = 0;
  bufferIndex = 0;
}
示例#2
0
/* AUDIO engine shutdown */
void gx_audio_Shutdown(void)
{
  PauseOgg(1);
  StopOgg();
  ASND_Pause(1);
  ASND_End();
  if (Bg_music_ogg)
  {
    free(Bg_music_ogg);
  }
}
示例#3
0
文件: cd_revol.c 项目: Izhido/qrevpak
void CDAudio_Stop(void)
{
	if (!enabled)
		return;
	
	if (!playing)
		return;

	StopOgg();

	wasPlaying = false;
	playing = false;
}
示例#4
0
void GuiSound::Stop()
{
	if(voice < 0)
		return;

	switch(type)
	{
		case SOUND_PCM:
		ASND_StopVoice(voice);
		break;

		case SOUND_OGG:
		StopOgg();
		break;
	}
}
示例#5
0
void GuiSound::Stop() {
#ifndef NO_SOUND
    if (voice < 0)
        return;

    switch (type) {
        case SOUND_PCM:
            ASND_StopVoice(voice);
            break;

        case SOUND_OGG:
            StopOgg();
            break;
    }
#endif
}
示例#6
0
int AalibStop(int channel)
{
	if ((PSPAALIB_CHANNEL_WAV_1<=channel)&&(channel<=PSPAALIB_CHANNEL_WAV_32))
	{
		return StopWav(channel-PSPAALIB_CHANNEL_WAV_1);
	}
	if ((PSPAALIB_CHANNEL_OGG_1<=channel)&&(channel<=PSPAALIB_CHANNEL_OGG_10))
	{
		return StopOgg(channel-PSPAALIB_CHANNEL_OGG_1);
	}
	if ((PSPAALIB_CHANNEL_SCEMP3_1<=channel)&&(channel<=PSPAALIB_CHANNEL_SCEMP3_2))
	{
		return StopSceMp3(channel-PSPAALIB_CHANNEL_SCEMP3_1);
	}
	if ((PSPAALIB_CHANNEL_AT3_1<=channel)&&(channel<=PSPAALIB_CHANNEL_AT3_2))
	{
		return StopAt3(channel-PSPAALIB_CHANNEL_AT3_1);
	}
	return PSPAALIB_ERROR_INVALID_CHANNEL;
}
示例#7
0
/*** 
      gx_audio_Start

     This function restart the audio engine
     This is called when coming back from Main Menu
 ***/
void gx_audio_Start(void)
{
  /* shutdown background music */
  PauseOgg(1);	
  StopOgg();	
  
  /* shutdown menu audio processing */
  ASND_Pause(1);
  AUDIO_StopDMA();
  AUDIO_RegisterDMACallback(NULL);
  DSP_Halt();

  /* when not using 60hz mode, frame emulation is synchronized with Audio Interface DMA */
  if (gc_pal | vdp_pal)
  {
    AUDIO_RegisterDMACallback(ai_callback);
  }

  /* reset emulation audio processing */
  memset(soundbuffer, 0, 2 * 3840);
  audioStarted = 0;
  mixbuffer = 0;
}
示例#8
0
/**
 * Destructor for the GuiSound class.
 */
GuiSound::~GuiSound()
{
	if(type == SOUND_OGG)
		StopOgg();
}
示例#9
0
/**
 * Destructor for the GuiSound class.
 */
GuiSound::~GuiSound() {
#ifndef NO_SOUND
    if (type == SOUND_OGG)
        StopOgg();
#endif
}