From 8ceb800defbf13354866cd7c6a4b676cf54aad5d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 27 Oct 2013 08:14:13 -0700 Subject: Rework threading functions --- Alc/backends/oss.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Alc/backends/oss.c') diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c index 892e2327..35ae80cc 100644 --- a/Alc/backends/oss.c +++ b/Alc/backends/oss.c @@ -33,6 +33,7 @@ #include "alMain.h" #include "alu.h" +#include "threads.h" #include @@ -54,14 +55,15 @@ static const char *oss_capture = "/dev/dsp"; typedef struct { int fd; - volatile int killNow; - ALvoid *thread; ALubyte *mix_data; int data_size; RingBuffer *ring; int doCapture; + + volatile int killNow; + althread_t thread; } oss_data; @@ -286,8 +288,7 @@ static ALCboolean oss_start_playback(ALCdevice *device) data->data_size = device->UpdateSize * FrameSizeFromDevFmt(device->FmtChans, device->FmtType); data->mix_data = calloc(1, data->data_size); - data->thread = StartThread(OSSProc, device); - if(data->thread == NULL) + if(!StartThread(&data->thread, OSSProc, device)) { free(data->mix_data); data->mix_data = NULL; @@ -428,8 +429,7 @@ static ALCenum oss_open_capture(ALCdevice *device, const ALCchar *deviceName) data->mix_data = calloc(1, data->data_size); device->ExtraData = data; - data->thread = StartThread(OSSCaptureProc, device); - if(data->thread == NULL) + if(!StartThread(&data->thread, OSSCaptureProc, device)) { device->ExtraData = NULL; free(data->mix_data); -- cgit v1.2.3