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
1d834f47
Commit
1d834f47
authored
Jun 15, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Jun 15, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the check for SNDCTL_DSP_GETCAPS so that it is compliant with the
OSS specification. Only test the different formats if tracing is on.
parent
5ea386e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
27 deletions
+38
-27
audio.c
dlls/winmm/wineoss/audio.c
+38
-27
No files found.
dlls/winmm/wineoss/audio.c
View file @
1d834f47
...
...
@@ -869,7 +869,7 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev)
ossdev
->
dsc_caps
.
dwFormats
=
0x00000000
;
ossdev
->
dsc_caps
.
dwChannels
=
1
;
/* See the comment in OSS_WaveOutInit */
/* See the comment in OSS_WaveOutInit
for the loop order
*/
for
(
f
=
0
;
f
<
2
;
f
++
)
{
arg
=
win_std_oss_fmts
[
f
];
rc
=
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_SAMPLESIZE
,
&
arg
);
...
...
@@ -933,46 +933,57 @@ static void OSS_WaveFullDuplexInit(OSS_DEVICE* ossdev)
int
caps
;
TRACE
(
"(%p) %s
\n
"
,
ossdev
,
ossdev
->
dev_name
);
if
(
OSS_OpenDevice
(
ossdev
,
O_RDWR
,
NULL
,
0
,
-
1
,
-
1
,
-
1
)
!=
0
)
/* The OSS documentation says we must call SNDCTL_SETDUPLEX
* *before* checking for SNDCTL_DSP_GETCAPS otherwise we may
* get the wrong result. This ioctl must even be done before
* setting the fragment size so that only OSS_RawOpenDevice is
* in a position to do it. So we set full_duplex speculatively
* and adjust right after.
*/
ossdev
->
full_duplex
=
1
;
rc
=
OSS_OpenDevice
(
ossdev
,
O_RDWR
,
NULL
,
0
,
-
1
,
-
1
,
-
1
);
ossdev
->
full_duplex
=
0
;
if
(
rc
!=
0
)
return
;
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_RESET
,
0
);
TRACE
(
"%s
\n
"
,
ossdev
->
ds_desc
.
szDesc
);
if
(
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_GETCAPS
,
&
caps
)
==
0
)
ossdev
->
full_duplex
=
(
caps
&
DSP_CAP_DUPLEX
);
if
(
WINE_TRACE_ON
(
wave
))
{
OSS_Info
(
ossdev
->
fd
);
/* See the comment in OSS_WaveOutInit */
for
(
f
=
0
;
f
<
2
;
f
++
)
{
arg
=
win_std_oss_fmts
[
f
];
rc
=
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_SAMPLESIZE
,
&
arg
);
if
(
rc
!=
0
||
arg
!=
win_std_oss_fmts
[
f
])
{
TRACE
(
"DSP_SAMPLESIZE: rc=%d returned 0x%x for 0x%x
\n
"
,
rc
,
arg
,
win_std_oss_fmts
[
f
]);
continue
;
}
for
(
c
=
0
;
c
<
2
;
c
++
)
{
arg
=
c
;
rc
=
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_STEREO
,
&
arg
);
if
(
rc
!=
0
||
arg
!=
c
)
{
TRACE
(
"DSP_STEREO: rc=%d returned %d for %d
\n
"
,
rc
,
arg
,
c
);
/* See the comment in OSS_WaveOutInit for the loop order */
for
(
f
=
0
;
f
<
2
;
f
++
)
{
arg
=
win_std_oss_fmts
[
f
];
rc
=
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_SAMPLESIZE
,
&
arg
);
if
(
rc
!=
0
||
arg
!=
win_std_oss_fmts
[
f
])
{
TRACE
(
"DSP_SAMPLESIZE: rc=%d returned 0x%x for 0x%x
\n
"
,
rc
,
arg
,
win_std_oss_fmts
[
f
]);
continue
;
}
for
(
r
=
0
;
r
<
sizeof
(
win_std_rates
)
/
sizeof
(
*
win_std_rates
);
r
++
)
{
arg
=
win_std_rates
[
r
];
rc
=
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_SPEED
,
&
arg
);
TRACE
(
"DSP_SPEED: rc=%d returned %d for %dx%dx%d
\n
"
,
rc
,
arg
,
win_std_rates
[
r
],
win_std_oss_fmts
[
f
],
c
+
1
);
for
(
c
=
0
;
c
<
2
;
c
++
)
{
arg
=
c
;
rc
=
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_STEREO
,
&
arg
);
if
(
rc
!=
0
||
arg
!=
c
)
{
TRACE
(
"DSP_STEREO: rc=%d returned %d for %d
\n
"
,
rc
,
arg
,
c
);
continue
;
}
for
(
r
=
0
;
r
<
sizeof
(
win_std_rates
)
/
sizeof
(
*
win_std_rates
);
r
++
)
{
arg
=
win_std_rates
[
r
];
rc
=
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_SPEED
,
&
arg
);
TRACE
(
"DSP_SPEED: rc=%d returned %d for %dx%dx%d
\n
"
,
rc
,
arg
,
win_std_rates
[
r
],
win_std_oss_fmts
[
f
],
c
+
1
);
}
}
}
}
if
(
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_GETCAPS
,
&
caps
)
==
0
)
ossdev
->
full_duplex
=
(
caps
&
DSP_CAP_DUPLEX
);
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