Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void *event_loop(void *data)
- {
- ps3_audio_t *aud = data;
- sys_event_queue_t id;
- sys_ipc_key_t key;
- sys_event_t event;
- cellAudioCreateNotifyEventQueue(&id, &key);
- cellAudioSetNotifyEventQueue(key);
- resampler_t *resampler = resampler_new(drain_fifo, 2.1, 2, data);
- float out_tmp[CELL_AUDIO_BLOCK_SAMPLES * AUDIO_CHANNELS] __attribute__((aligned(16)));
- while (!aud->quit_thread)
- {
- sys_event_queue_receive(id, &event, SYS_NO_TIMEOUT);
- resampler_cb_read(resampler, CELL_AUDIO_BLOCK_SAMPLES, out_tmp);
- cellAudioAddData(aud->audio_port, out_tmp, CELL_AUDIO_BLOCK_SAMPLES, 1.0);
- pthread_cond_signal(&aud->cond);
- }
- cellAudioRemoveNotifyEventQueue(key);
- resampler_free(resampler);
- pthread_exit(NULL);
- return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement