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
48dfed70
Commit
48dfed70
authored
Sep 29, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Sep 29, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create DirectSound object even without sounddevice. Games can be
played without sound, but not without DirectSound object (tested with Monkey Island 3).
parent
e216de97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
dsound.c
multimedia/dsound.c
+11
-6
No files found.
multimedia/dsound.c
View file @
48dfed70
...
...
@@ -2082,14 +2082,19 @@ static int DSOUND_OpenAudio(void)
if
(
primarybuf
==
NULL
)
return
DSERR_OUTOFMEMORY
;
while
(
audiofd
!=
-
1
)
while
(
audiofd
>=
0
)
sleep
(
5
);
/* we will most likely not get one, avoid excessive opens ... */
if
(
audiofd
==
-
ENODEV
)
return
-
1
;
audiofd
=
open
(
"/dev/audio"
,
O_WRONLY
);
if
(
audiofd
==-
1
)
{
/* Don't worry if sound is busy at the moment */
if
(
errno
!=
EBUSY
)
if
(
(
errno
!=
EBUSY
)
&&
(
errno
!=
ENODEV
)
)
perror
(
"open /dev/audio"
);
return
audiofd
;
/* -1 */
audiofd
=
-
errno
;
return
-
1
;
/* -1 */
}
/* We should probably do something here if SETFRAGMENT fails... */
...
...
@@ -2113,7 +2118,7 @@ static void DSOUND_CloseAudio(void)
/* It's possible we've been called with audio closed */
/* from SetFormat()... this is just to force a call */
/* to OpenAudio() to reset the hardware properly */
if
(
audiofd
!=
-
1
)
if
(
audiofd
>=
0
)
close
(
audiofd
);
primarybuf
->
playpos
=
0
;
primarybuf
->
writepos
=
DSOUND_FRAGLEN
;
...
...
@@ -2270,9 +2275,9 @@ HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pU
audiofd
=
open
(
"/dev/audio"
,
O_WRONLY
);
if
(
audiofd
==
-
1
)
{
audiofd
=
-
errno
;
if
(
errno
==
ENODEV
)
{
MESSAGE
(
"No sound hardware found.
\n
"
);
return
DSERR_NODRIVER
;
MESSAGE
(
"No sound hardware found, but continuing anyway.
\n
"
);
}
else
if
(
errno
==
EBUSY
)
{
MESSAGE
(
"Sound device busy, will keep trying.
\n
"
);
}
else
{
...
...
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