Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e24533cb
Commit
e24533cb
authored
Dec 21, 2006
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Remove more mutexes from around Audio Unit calls.
parent
0bb13dd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
audio.c
dlls/winmm/winecoreaudio/audio.c
+6
-15
No files found.
dlls/winmm/winecoreaudio/audio.c
View file @
e24533cb
...
...
@@ -798,23 +798,22 @@ static DWORD wodClose(WORD wDevID)
wwo
->
state
=
WINE_WS_CLOSED
;
/* mark the device as closed */
pthread_mutex_unlock
(
&
wwo
->
lock
);
err
=
AudioUnitUninitialize
(
wwo
->
audioUnit
);
if
(
err
)
{
ERR
(
"AudioUnitUninitialize return %c%c%c%c
\n
"
,
(
char
)
(
err
>>
24
),
(
char
)
(
err
>>
16
),
(
char
)
(
err
>>
8
),
(
char
)
err
);
pthread_mutex_unlock
(
&
wwo
->
lock
);
return
MMSYSERR_ERROR
;
/* FIXME return an error based on the OSStatus */
}
if
(
!
AudioUnit_CloseAudioUnit
(
wwo
->
audioUnit
)
)
{
ERR
(
"Can't close AudioUnit
\n
"
);
pthread_mutex_unlock
(
&
wwo
->
lock
);
return
MMSYSERR_ERROR
;
/* FIXME return an error based on the OSStatus */
}
pthread_mutex_unlock
(
&
wwo
->
lock
);
ret
=
wodNotifyClient
(
wwo
,
WOM_CLOSE
,
0L
,
0L
);
}
...
...
@@ -1239,13 +1238,9 @@ static DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
}
TRACE
(
"(%u, %p);
\n
"
,
wDevID
,
lpdwVol
);
pthread_mutex_lock
(
&
WOutDev
[
wDevID
].
lock
);
AudioUnit_GetVolume
(
WOutDev
[
wDevID
].
audioUnit
,
&
left
,
&
right
);
pthread_mutex_unlock
(
&
WOutDev
[
wDevID
].
lock
);
*
lpdwVol
=
((
WORD
)
left
*
0xFFFFl
)
+
(((
WORD
)
right
*
0xFFFFl
)
<<
16
);
return
MMSYSERR_NOERROR
;
...
...
@@ -1269,13 +1264,9 @@ static DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
right
=
HIWORD
(
dwParam
)
/
65535
.
0
f
;
TRACE
(
"(%u, %08x);
\n
"
,
wDevID
,
dwParam
);
pthread_mutex_lock
(
&
WOutDev
[
wDevID
].
lock
);
AudioUnit_SetVolume
(
WOutDev
[
wDevID
].
audioUnit
,
left
,
right
);
pthread_mutex_unlock
(
&
WOutDev
[
wDevID
].
lock
);
return
MMSYSERR_NOERROR
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment