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
b2ba933f
Commit
b2ba933f
authored
Apr 27, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 27, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make multimedia threads high priority.
parent
c7bd5fb1
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
22 additions
and
0 deletions
+22
-0
mciavi.c
dlls/winmm/mciavi/mciavi.c
+1
-0
mcimidi.c
dlls/winmm/mciseq/mcimidi.c
+1
-0
mciwave.c
dlls/winmm/mciwave/mciwave.c
+1
-0
mmsystem.c
dlls/winmm/mmsystem.c
+1
-0
playsound.c
dlls/winmm/playsound.c
+1
-0
audio.c
dlls/winmm/winealsa/audio.c
+4
-0
midi.c
dlls/winmm/winealsa/midi.c
+1
-0
audio.c
dlls/winmm/winearts/audio.c
+4
-0
audio.c
dlls/winmm/wineaudioio/audio.c
+4
-0
audio.c
dlls/winmm/winenas/audio.c
+2
-0
winmm.c
dlls/winmm/winmm.c
+2
-0
No files found.
dlls/winmm/mciavi/mciavi.c
View file @
b2ba933f
...
@@ -109,6 +109,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
...
@@ -109,6 +109,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
WARN
(
"Couldn't allocate thread for async command handling, sending synchronously
\n
"
);
WARN
(
"Couldn't allocate thread for async command handling, sending synchronously
\n
"
);
return
MCI_SCAStarter
(
&
sca
);
return
MCI_SCAStarter
(
&
sca
);
}
}
SetThreadPriority
(
handle
,
THREAD_PRIORITY_TIME_CRITICAL
);
CloseHandle
(
handle
);
CloseHandle
(
handle
);
return
0
;
return
0
;
}
}
...
...
dlls/winmm/mciseq/mcimidi.c
View file @
b2ba933f
...
@@ -159,6 +159,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
...
@@ -159,6 +159,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
WARN
(
"Couldn't allocate thread for async command handling, sending synchonously
\n
"
);
WARN
(
"Couldn't allocate thread for async command handling, sending synchonously
\n
"
);
return
MCI_SCAStarter
(
&
sca
);
return
MCI_SCAStarter
(
&
sca
);
}
}
SetThreadPriority
(
handle
,
THREAD_PRIORITY_TIME_CRITICAL
);
CloseHandle
(
handle
);
CloseHandle
(
handle
);
return
0
;
return
0
;
}
}
...
...
dlls/winmm/mciwave/mciwave.c
View file @
b2ba933f
...
@@ -122,6 +122,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
...
@@ -122,6 +122,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
WARN
(
"Couldn't allocate thread for async command handling, sending synchonously
\n
"
);
WARN
(
"Couldn't allocate thread for async command handling, sending synchonously
\n
"
);
return
MCI_SCAStarter
(
&
sca
);
return
MCI_SCAStarter
(
&
sca
);
}
}
SetThreadPriority
(
handle
,
THREAD_PRIORITY_TIME_CRITICAL
);
CloseHandle
(
handle
);
CloseHandle
(
handle
);
return
0
;
return
0
;
}
}
...
...
dlls/winmm/mmsystem.c
View file @
b2ba933f
...
@@ -1946,6 +1946,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD
...
@@ -1946,6 +1946,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD
CloseHandle
(
lpMMThd
->
hEvent
);
CloseHandle
(
lpMMThd
->
hEvent
);
ret
=
2
;
ret
=
2
;
}
else
{
}
else
{
SetThreadPriority
(
lpMMThd
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
TRACE
(
"Got a nice thread hndl=%p id=0x%08lx
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
dwThreadID
);
TRACE
(
"Got a nice thread hndl=%p id=0x%08lx
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
dwThreadID
);
ret
=
0
;
ret
=
0
;
}
}
...
...
dlls/winmm/playsound.c
View file @
b2ba933f
...
@@ -471,6 +471,7 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo
...
@@ -471,6 +471,7 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo
wps
->
bLoop
=
(
fdwSound
&
SND_LOOP
)
?
TRUE
:
FALSE
;
wps
->
bLoop
=
(
fdwSound
&
SND_LOOP
)
?
TRUE
:
FALSE
;
if
((
handle
=
CreateThread
(
NULL
,
0
,
proc_PlaySound
,
wps
,
0
,
&
id
))
!=
0
)
{
if
((
handle
=
CreateThread
(
NULL
,
0
,
proc_PlaySound
,
wps
,
0
,
&
id
))
!=
0
)
{
wps
->
hThread
=
handle
;
wps
->
hThread
=
handle
;
SetThreadPriority
(
handle
,
THREAD_PRIORITY_TIME_CRITICAL
);
return
TRUE
;
return
TRUE
;
}
}
}
}
...
...
dlls/winmm/winealsa/audio.c
View file @
b2ba933f
...
@@ -2007,6 +2007,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
...
@@ -2007,6 +2007,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
wwo
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
if
(
wwo
->
hThread
)
SetThreadPriority
(
wwo
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
WaitForSingleObject
(
wwo
->
hStartUpEvent
,
INFINITE
);
WaitForSingleObject
(
wwo
->
hStartUpEvent
,
INFINITE
);
CloseHandle
(
wwo
->
hStartUpEvent
);
CloseHandle
(
wwo
->
hStartUpEvent
);
}
else
{
}
else
{
...
@@ -3474,6 +3476,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
...
@@ -3474,6 +3476,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
wwi
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwi
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwi
->
hThread
=
CreateThread
(
NULL
,
0
,
widRecorder
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwi
->
dwThreadID
));
wwi
->
hThread
=
CreateThread
(
NULL
,
0
,
widRecorder
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwi
->
dwThreadID
));
if
(
wwi
->
hThread
)
SetThreadPriority
(
wwi
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
WaitForSingleObject
(
wwi
->
hStartUpEvent
,
INFINITE
);
WaitForSingleObject
(
wwi
->
hStartUpEvent
,
INFINITE
);
CloseHandle
(
wwi
->
hStartUpEvent
);
CloseHandle
(
wwi
->
hStartUpEvent
);
}
else
{
}
else
{
...
...
dlls/winmm/winealsa/midi.c
View file @
b2ba933f
...
@@ -462,6 +462,7 @@ static DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
...
@@ -462,6 +462,7 @@ static DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
midiCloseSeq
();
midiCloseSeq
();
return
MMSYSERR_ERROR
;
return
MMSYSERR_ERROR
;
}
}
SetThreadPriority
(
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
TRACE
(
"Created thread for midi-in
\n
"
);
TRACE
(
"Created thread for midi-in
\n
"
);
}
}
...
...
dlls/winmm/winearts/audio.c
View file @
b2ba933f
...
@@ -1208,6 +1208,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
...
@@ -1208,6 +1208,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
wwo
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
if
(
wwo
->
hThread
)
SetThreadPriority
(
wwo
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
WaitForSingleObject
(
wwo
->
hStartUpEvent
,
INFINITE
);
WaitForSingleObject
(
wwo
->
hStartUpEvent
,
INFINITE
);
CloseHandle
(
wwo
->
hStartUpEvent
);
CloseHandle
(
wwo
->
hStartUpEvent
);
}
else
{
}
else
{
...
@@ -1860,6 +1862,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
...
@@ -1860,6 +1862,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
wwi
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwi
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwi
->
hThread
=
CreateThread
(
NULL
,
0
,
widRecorder
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwi
->
dwThreadID
));
wwi
->
hThread
=
CreateThread
(
NULL
,
0
,
widRecorder
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwi
->
dwThreadID
));
if
(
wwi
->
hThread
)
SetThreadPriority
(
wwi
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
WaitForSingleObject
(
wwi
->
hStartUpEvent
,
INFINITE
);
WaitForSingleObject
(
wwi
->
hStartUpEvent
,
INFINITE
);
CloseHandle
(
wwi
->
hStartUpEvent
);
CloseHandle
(
wwi
->
hStartUpEvent
);
}
else
{
}
else
{
...
...
dlls/winmm/wineaudioio/audio.c
View file @
b2ba933f
...
@@ -894,6 +894,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
...
@@ -894,6 +894,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
wwo
->
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
if
(
wwo
->
hThread
)
SetThreadPriority
(
wwo
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
WaitForSingleObject
(
wwo
->
hEvent
,
INFINITE
);
WaitForSingleObject
(
wwo
->
hEvent
,
INFINITE
);
}
else
{
}
else
{
wwo
->
hEvent
=
INVALID_HANDLE_VALUE
;
wwo
->
hEvent
=
INVALID_HANDLE_VALUE
;
...
@@ -1979,6 +1981,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
...
@@ -1979,6 +1981,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
wwi
->
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwi
->
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwi
->
hThread
=
CreateThread
(
NULL
,
0
,
widRecorder
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwi
->
dwThreadID
));
wwi
->
hThread
=
CreateThread
(
NULL
,
0
,
widRecorder
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwi
->
dwThreadID
));
if
(
wwi
->
hThread
)
SetThreadPriority
(
wwi
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
WaitForSingleObject
(
wwi
->
hEvent
,
INFINITE
);
WaitForSingleObject
(
wwi
->
hEvent
,
INFINITE
);
if
(
LIBAUDIOIO_NotifyClient
(
wDevID
,
WIM_OPEN
,
0L
,
0L
)
!=
MMSYSERR_NOERROR
)
{
if
(
LIBAUDIOIO_NotifyClient
(
wDevID
,
WIM_OPEN
,
0L
,
0L
)
!=
MMSYSERR_NOERROR
)
{
...
...
dlls/winmm/winenas/audio.c
View file @
b2ba933f
...
@@ -956,6 +956,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
...
@@ -956,6 +956,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
if
(
!
(
dwFlags
&
WAVE_DIRECTSOUND
))
{
wwo
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hStartUpEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
wwo
->
hThread
=
CreateThread
(
NULL
,
0
,
wodPlayer
,
(
LPVOID
)(
DWORD
)
wDevID
,
0
,
&
(
wwo
->
dwThreadID
));
if
(
wwo
->
hThread
)
SetThreadPriority
(
wwo
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
WaitForSingleObject
(
wwo
->
hStartUpEvent
,
INFINITE
);
WaitForSingleObject
(
wwo
->
hStartUpEvent
,
INFINITE
);
CloseHandle
(
wwo
->
hStartUpEvent
);
CloseHandle
(
wwo
->
hStartUpEvent
);
}
else
{
}
else
{
...
...
dlls/winmm/winmm.c
View file @
b2ba933f
...
@@ -1786,6 +1786,7 @@ MMRESULT MIDI_StreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID, DWORD cMidi
...
@@ -1786,6 +1786,7 @@ MMRESULT MIDI_StreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID, DWORD cMidi
midiStreamClose
((
HMIDISTRM
)
hMidiOut
);
midiStreamClose
((
HMIDISTRM
)
hMidiOut
);
return
MMSYSERR_NOMEM
;
return
MMSYSERR_NOMEM
;
}
}
SetThreadPriority
(
lpMidiStrm
->
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
/* wait for thread to have started, and for its queue to be created */
/* wait for thread to have started, and for its queue to be created */
{
{
...
@@ -2797,6 +2798,7 @@ MMRESULT WINAPI mmTaskCreate(LPTASKCALLBACK cb, HANDLE* ph, DWORD client)
...
@@ -2797,6 +2798,7 @@ MMRESULT WINAPI mmTaskCreate(LPTASKCALLBACK cb, HANDLE* ph, DWORD client)
if
(
hEvent
)
CloseHandle
(
hEvent
);
if
(
hEvent
)
CloseHandle
(
hEvent
);
return
TASKERR_OUTOFMEMORY
;
return
TASKERR_OUTOFMEMORY
;
}
}
SetThreadPriority
(
hThread
,
THREAD_PRIORITY_TIME_CRITICAL
);
if
(
ph
)
*
ph
=
hEvent
;
if
(
ph
)
*
ph
=
hEvent
;
CloseHandle
(
hThread
);
CloseHandle
(
hThread
);
return
0
;
return
0
;
...
...
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