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
959ec2aa
Commit
959ec2aa
authored
Dec 28, 2006
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Implement widStart.
parent
c47c82a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
audio.c
dlls/winmm/winecoreaudio/audio.c
+35
-2
No files found.
dlls/winmm/winecoreaudio/audio.c
View file @
959ec2aa
...
...
@@ -1868,6 +1868,9 @@ static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
*/
static
DWORD
widStart
(
WORD
wDevID
)
{
DWORD
ret
=
MMSYSERR_NOERROR
;
WINE_WAVEIN
*
wwi
;
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEINDRV
)
{
...
...
@@ -1875,8 +1878,38 @@ static DWORD widStart(WORD wDevID)
return
MMSYSERR_INVALHANDLE
;
}
FIXME
(
"unimplemented
\n
"
);
return
MMSYSERR_NOTENABLED
;
/* The order of the following operations is important since we can't hold
* the mutex while we make an Audio Unit call. Set the PLAYING state
* before starting the Audio Unit. In widStop, the order is reversed.
* This guarantees that we can't get into a situation where the state is
* PLAYING but the Audio Unit isn't running. Although we can be in STOPPED
* state with the Audio Unit still running, that's harmless because the
* input callback will just throw away the sound data.
*/
wwi
=
&
WInDev
[
wDevID
];
OSSpinLockLock
(
&
wwi
->
lock
);
if
(
wwi
->
state
==
WINE_WS_CLOSED
)
{
WARN
(
"Trying to start closed device.
\n
"
);
ret
=
MMSYSERR_INVALHANDLE
;
}
else
wwi
->
state
=
WINE_WS_PLAYING
;
OSSpinLockUnlock
(
&
wwi
->
lock
);
if
(
ret
==
MMSYSERR_NOERROR
)
{
/* Start pulling for audio data */
OSStatus
err
=
AudioOutputUnitStart
(
wwi
->
audioUnit
);
if
(
err
!=
noErr
)
ERR
(
"Failed to start AU: %08lx
\n
"
,
err
);
TRACE
(
"Recording started...
\n
"
);
}
return
ret
;
}
...
...
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