Exemple #1
0
void update_sdl_stream(void *userdata, Uint8 * stream, int len)
{
    extern Uint16 play_buffer[];
#ifdef Z80_EMULATED
    if ((!sound_muted)&&(neogeo_sound_enable)&&(neogeo_emulating))
    {
	neo4all_prof_start(NEO4ALL_PROFILER_SOUND);
    	streamupdate(len);
#ifndef DREAMCAST
    	//memcpy(stream, (Uint8 *) play_buffer, len);
    	SDL_MixAudio(stream, (Uint8*)play_buffer, len, MUSIC_VOLUME);
#else
	SDL_DC_SetSoundBuffer(play_buffer);
#endif
	neo4all_prof_end(NEO4ALL_PROFILER_SOUND);
    }
#endif
}
Exemple #2
0
/****************************************************************************
* audio_update
*
* Called from NeoCD every frame.
****************************************************************************/
void
mixer_update_audio (void)
{
  int i;
  int *src = (int *) mp3buffer;
  int *dst = (int *) mixbuffer;

  /*** Update from sound core ***/
  streamupdate (3200);
  MP3MixAudio (mp3buffer, (u8 *) play_buffer, 3200);

  /*** Update the mixbuffer ***/
  for (i = 0; i < 800; i++)
    {
      dst[mixer.head] = *src++;
      mixer.head++;
      mixer.head &= MIXMASK;
    }
}