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
00259609
Commit
00259609
authored
Aug 08, 2007
by
Tijl Coosemans
Committed by
Alexandre Julliard
Aug 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss: Add SNDCTL_MIXERINFO support.
parent
ac3927a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
3 deletions
+60
-3
audio.c
dlls/wineoss.drv/audio.c
+60
-3
No files found.
dlls/wineoss.drv/audio.c
View file @
00259609
...
...
@@ -720,7 +720,29 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_RESET
,
0
);
#ifdef SOUND_MIXER_INFO
#if defined(SNDCTL_MIXERINFO)
{
int
mixer
;
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDONLY
|
O_NDELAY
))
>=
0
)
{
oss_mixerinfo
info
;
info
.
dev
=
0
;
if
(
ioctl
(
mixer
,
SNDCTL_MIXERINFO
,
&
info
)
>=
0
)
{
lstrcpynA
(
ossdev
->
ds_desc
.
szDesc
,
info
.
name
,
sizeof
(
info
.
name
));
strcpy
(
ossdev
->
ds_desc
.
szDrvname
,
"wineoss.drv"
);
MultiByteToWideChar
(
CP_ACP
,
0
,
info
.
name
,
sizeof
(
info
.
name
),
ossdev
->
out_caps
.
szPname
,
sizeof
(
ossdev
->
out_caps
.
szPname
)
/
sizeof
(
WCHAR
));
TRACE
(
"%s: %s
\n
"
,
ossdev
->
mixer_name
,
ossdev
->
ds_desc
.
szDesc
);
has_mixer
=
TRUE
;
}
else
{
WARN
(
"%s: cannot read SNDCTL_MIXERINFO!
\n
"
,
ossdev
->
mixer_name
);
}
close
(
mixer
);
}
else
{
WARN
(
"open(%s) failed (%s)
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
}
}
#elif defined(SOUND_MIXER_INFO)
{
int
mixer
;
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDONLY
|
O_NDELAY
))
>=
0
)
{
...
...
@@ -874,7 +896,26 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev)
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_RESET
,
0
);
#ifdef SOUND_MIXER_INFO
#if defined(SNDCTL_MIXERINFO)
{
int
mixer
;
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDONLY
|
O_NDELAY
))
>=
0
)
{
oss_mixerinfo
info
;
info
.
dev
=
0
;
if
(
ioctl
(
mixer
,
SNDCTL_MIXERINFO
,
&
info
)
>=
0
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
info
.
name
,
-
1
,
ossdev
->
in_caps
.
szPname
,
sizeof
(
ossdev
->
in_caps
.
szPname
)
/
sizeof
(
WCHAR
));
TRACE
(
"%s: %s
\n
"
,
ossdev
->
mixer_name
,
ossdev
->
ds_desc
.
szDesc
);
}
else
{
WARN
(
"%s: cannot read SNDCTL_MIXERINFO!
\n
"
,
ossdev
->
mixer_name
);
}
close
(
mixer
);
}
else
{
WARN
(
"open(%s) failed (%s)
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
}
}
#elif defined(SOUND_MIXER_INFO)
{
int
mixer
;
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDONLY
|
O_NDELAY
))
>=
0
)
{
...
...
@@ -995,7 +1036,23 @@ static void OSS_WaveFullDuplexInit(OSS_DEVICE* ossdev)
ioctl
(
ossdev
->
fd
,
SNDCTL_DSP_RESET
,
0
);
#ifdef SOUND_MIXER_INFO
#if defined(SNDCTL_MIXERINFO)
{
int
mixer
;
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDWR
|
O_NDELAY
))
>=
0
)
{
oss_mixerinfo
info
;
info
.
dev
=
0
;
if
(
ioctl
(
mixer
,
SNDCTL_MIXERINFO
,
&
info
)
>=
0
)
{
has_mixer
=
TRUE
;
}
else
{
WARN
(
"%s: cannot read SNDCTL_MIXERINFO!
\n
"
,
ossdev
->
mixer_name
);
}
close
(
mixer
);
}
else
{
WARN
(
"open(%s) failed (%s)
\n
"
,
ossdev
->
mixer_name
,
strerror
(
errno
));
}
}
#elif defined(SOUND_MIXER_INFO)
{
int
mixer
;
if
((
mixer
=
open
(
ossdev
->
mixer_name
,
O_RDWR
|
O_NDELAY
))
>=
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