void ESAudio::Shutdown () { cellAudioPortStop(Port); ThreadDie = true; delete Thread; delete Semaphore; cellAudioPortClose(Port); cellAudioRemoveNotifyEventQueue(QueueKey); sys_event_queue_destroy(QueueID, SYS_EVENT_QUEUE_DESTROY_FORCE); cellAudioQuit(); }
static void ps3_audio_free(void *data) { uint64_t val; ps3_audio_t *aud = data; aud->quit_thread = true; ps3_audio_start(aud); sys_ppu_thread_join(aud->thread, &val); ps3_audio_stop(aud); cellAudioPortClose(aud->audio_port); cellAudioQuit(); fifo_free(aud->buffer); sys_lwmutex_destroy(&aud->lock); sys_lwmutex_destroy(&aud->cond_lock); sys_lwcond_destroy(&aud->cond); free(data); }
static void audioport_free(cell_audio_handle_t handle) { audioport_t *port = handle; port->quit_thread = 1; pthread_join(port->thread, NULL); sys_lwmutex_destroy(&port->lock); sys_lwmutex_destroy(&port->cond_lock); sys_lwcond_destroy(&port->cond); if (port->re) resampler_free(port->re); if (port->buffer) fifo_free(port->buffer); cellAudioPortStop(port->audio_port); cellAudioPortClose(port->audio_port); free(port); }