diff options
author | Chris Robinson <[email protected]> | 2013-10-27 08:14:13 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-10-27 08:14:13 -0700 |
commit | 8ceb800defbf13354866cd7c6a4b676cf54aad5d (patch) | |
tree | e46b00b1fe38403173b28566cbcb2d421a4d9ca9 /Alc/backends/qsa.c | |
parent | b9e30f76041a029e9d4cd58f6c87086c0b527d6d (diff) |
Rework threading functions
Diffstat (limited to 'Alc/backends/qsa.c')
-rw-r--r-- | Alc/backends/qsa.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Alc/backends/qsa.c b/Alc/backends/qsa.c index 2890a121..d91ffb2c 100644 --- a/Alc/backends/qsa.c +++ b/Alc/backends/qsa.c @@ -31,20 +31,22 @@ #include "alMain.h" #include "alu.h" +#include "threads.h" + typedef struct { snd_pcm_t* pcmHandle; int audio_fd; + snd_pcm_channel_setup_t csetup; + snd_pcm_channel_params_t cparams; + ALvoid* buffer; ALsizei size; volatile int killNow; - ALvoid* thread; - - snd_pcm_channel_setup_t csetup; - snd_pcm_channel_params_t cparams; + althread_t thread; } qsa_data; typedef struct @@ -619,13 +621,10 @@ static ALCboolean qsa_reset_playback(ALCdevice* device) static ALCboolean qsa_start_playback(ALCdevice* device) { - qsa_data* data=(qsa_data*)device->ExtraData; + qsa_data *data = (qsa_data*)device->ExtraData; - data->thread=StartThread(qsa_proc_playback, device); - if (data->thread==NULL) - { + if(!StartThread(&data->thread, qsa_proc_playback, device)) return ALC_FALSE; - } return ALC_TRUE; } |