void sound_exit(void) { qsound_sh_stop(); #ifdef GP2X sound_play = 0; option_sound_enable = 0; pthread_join(sound_th, NULL); close(sound_fd); #else SDL_PauseAudio(1); #endif }
int32 qsf_stop(void *handle) { qsf_synth_t *s = (qsf_synth_t *)handle; free(s->Z80ROM); free(s->QSamples); if (s->z80) { z80_free (s->z80); } if (s->qs) { qsound_sh_stop (s->qs); } if (s->c) { free (s->c); } free(s); return AO_SUCCESS; }
int32 qsf_command(void *handle, int32 command, int32 parameter) { qsf_synth_t *s = handle; switch (command) { case COMMAND_RESTART: memcpy (s->RAM, s->initRAM, 0x1000); memcpy (s->RAM2, s->initRAM2, 0x1000); if (s->z80) { z80_reset(s->z80, NULL); z80_set_irq_callback(s->z80, qsf_irq_cb); } qsound_sh_stop (s->qs); s->qs = qsound_sh_start(&qsintf); s->samples_to_next_tick = samples_per_tick; return AO_SUCCESS; } return AO_FAIL; }