Commit 3ade58b0 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winecoreaudio: Change to faster non-recursive mutex.

parent d5975872
...@@ -438,7 +438,6 @@ LONG CoreAudio_WaveInit(void) ...@@ -438,7 +438,6 @@ LONG CoreAudio_WaveInit(void)
OSStatus status; OSStatus status;
UInt32 propertySize; UInt32 propertySize;
CHAR szPname[MAXPNAMELEN]; CHAR szPname[MAXPNAMELEN];
pthread_mutexattr_t mutexattr;
int i; int i;
HANDLE hThread; HANDLE hThread;
CFStringRef messageThreadPortName; CFStringRef messageThreadPortName;
...@@ -472,9 +471,6 @@ LONG CoreAudio_WaveInit(void) ...@@ -472,9 +471,6 @@ LONG CoreAudio_WaveInit(void)
CoreAudio_DefaultDevice.interface_name=HeapAlloc(GetProcessHeap(),0,strlen(CoreAudio_DefaultDevice.dev_name)+1); CoreAudio_DefaultDevice.interface_name=HeapAlloc(GetProcessHeap(),0,strlen(CoreAudio_DefaultDevice.dev_name)+1);
sprintf(CoreAudio_DefaultDevice.interface_name, "%s", CoreAudio_DefaultDevice.dev_name); sprintf(CoreAudio_DefaultDevice.interface_name, "%s", CoreAudio_DefaultDevice.dev_name);
pthread_mutexattr_init(&mutexattr);
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
for (i = 0; i < MAX_WAVEOUTDRV; ++i) for (i = 0; i < MAX_WAVEOUTDRV; ++i)
{ {
WOutDev[i].state = WINE_WS_CLOSED; WOutDev[i].state = WINE_WS_CLOSED;
...@@ -509,10 +505,8 @@ LONG CoreAudio_WaveInit(void) ...@@ -509,10 +505,8 @@ LONG CoreAudio_WaveInit(void)
WOutDev[i].caps.dwFormats |= WAVE_FORMAT_1M16; WOutDev[i].caps.dwFormats |= WAVE_FORMAT_1M16;
WOutDev[i].caps.dwFormats |= WAVE_FORMAT_1S16; WOutDev[i].caps.dwFormats |= WAVE_FORMAT_1S16;
pthread_mutex_init(&WOutDev[i].lock, &mutexattr); /* initialize the mutex */ pthread_mutex_init(&WOutDev[i].lock, NULL); /* initialize the mutex */
} }
pthread_mutexattr_destroy(&mutexattr);
/* create mach messages handler */ /* create mach messages handler */
srandomdev(); srandomdev();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment