Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
db1113fe
Commit
db1113fe
authored
Dec 31, 2003
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Dec 31, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error messages in OSS_WaveOutInit() and OSS_WaveInInit() and
warn instead of aborting in case of problems reading mixer info.
parent
c5e507a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
audio.c
dlls/winmm/wineoss/audio.c
+12
-10
No files found.
dlls/winmm/wineoss/audio.c
View file @
db1113fe
...
...
@@ -538,17 +538,18 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDONLY
|
O_NDELAY
))
>=
0
)
{
mixer_info
info
;
if
(
ioctl
(
mixer
,
SOUND_MIXER_INFO
,
&
info
)
>=
0
)
{
close
(
mixer
);
strncpy
(
ossdev
->
ds_desc
.
szDesc
,
info
.
name
,
sizeof
(
info
.
name
));
strcpy
(
ossdev
->
ds_desc
.
szDrvName
,
"wineoss.drv"
);
strncpy
(
ossdev
->
out_caps
.
szPname
,
info
.
name
,
sizeof
(
info
.
name
));
TRACE
(
"%s
\n
"
,
ossdev
->
ds_desc
.
szDesc
);
}
else
{
ERR
(
"%s: can't read info!
\n
"
,
ossdev
->
mixer_name
);
OSS_CloseDevice
(
ossdev
);
close
(
mixer
);
return
FALSE
;
/* FreeBSD up to at least 5.2 provides this ioctl, but does not
* implement it properly, and there are probably similar issues
* on other platforms, so we warn but try to go ahead.
*/
WARN
(
"%s: cannot read SOUND_MIXER_INFO!
\n
"
,
ossdev
->
mixer_name
);
}
close
(
mixer
);
}
else
{
ERR
(
"%s: %s
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
OSS_CloseDevice
(
ossdev
);
...
...
@@ -680,15 +681,16 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev)
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDONLY
|
O_NDELAY
))
>=
0
)
{
mixer_info
info
;
if
(
ioctl
(
mixer
,
SOUND_MIXER_INFO
,
&
info
)
>=
0
)
{
close
(
mixer
);
strncpy
(
ossdev
->
in_caps
.
szPname
,
info
.
name
,
sizeof
(
info
.
name
));
TRACE
(
"%s
\n
"
,
ossdev
->
ds_desc
.
szDesc
);
}
else
{
ERR
(
"%s: can't read info!
\n
"
,
ossdev
->
mixer_name
);
OSS_CloseDevice
(
ossdev
);
close
(
mixer
);
return
FALSE
;
/* FreeBSD up to at least 5.2 provides this ioctl, but does not
* implement it properly, and there are probably similar issues
* on other platforms, so we warn but try to go ahead.
*/
WARN
(
"%s: cannot read SOUND_MIXER_INFO!
\n
"
,
ossdev
->
mixer_name
);
}
close
(
mixer
);
}
else
{
ERR
(
"%s: %s
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
OSS_CloseDevice
(
ossdev
);
...
...
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