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
0b4c99cd
Commit
0b4c99cd
authored
Oct 10, 2010
by
Jeff Cook
Committed by
Alexandre Julliard
Oct 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa.drv: Rewrite channel counting for additional readability and…
winealsa.drv: Rewrite channel counting for additional readability and circumvention of a couple of crashes.
parent
e96d3d53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
mixer.c
dlls/winealsa.drv/mixer.c
+6
-4
No files found.
dlls/winealsa.drv/mixer.c
View file @
0b4c99cd
...
@@ -491,7 +491,10 @@ static void ALSA_MixerInit(void)
...
@@ -491,7 +491,10 @@ static void ALSA_MixerInit(void)
for
(
elem
=
snd_mixer_first_elem
(
mixdev
[
mixnum
].
mix
);
elem
;
elem
=
snd_mixer_elem_next
(
elem
))
for
(
elem
=
snd_mixer_first_elem
(
mixdev
[
mixnum
].
mix
);
elem
;
elem
=
snd_mixer_elem_next
(
elem
))
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"Master"
)
&&
!
mastelem
)
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"Master"
)
&&
!
mastelem
)
{
mastelem
=
elem
;
mastelem
=
elem
;
++
(
mixdev
[
mixnum
].
chans
);
}
else
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"Capture"
)
&&
!
captelem
)
else
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"Capture"
)
&&
!
captelem
)
captelem
=
elem
;
captelem
=
elem
;
else
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"Mic"
)
&&
!
micelem
&&
!
mastelem
&&
total_elems
==
1
)
else
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"Mic"
)
&&
!
micelem
&&
!
mastelem
&&
total_elems
==
1
)
...
@@ -517,13 +520,12 @@ static void ALSA_MixerInit(void)
...
@@ -517,13 +520,12 @@ static void ALSA_MixerInit(void)
headelem
=
elem
;
headelem
=
elem
;
else
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"PCM"
)
&&
!
pcmelem
)
else
if
(
!
strcasecmp
(
snd_mixer_selem_get_name
(
elem
),
"PCM"
)
&&
!
pcmelem
)
pcmelem
=
elem
;
pcmelem
=
elem
;
else
++
(
mixdev
[
mixnum
].
chans
);
++
(
mixdev
[
mixnum
].
chans
);
}
}
}
}
/* Add
master channel, uncounted channels and an extra for capture
*/
/* Add
dummy capture channel, wanted by Windows
*/
mixdev
[
mixnum
].
chans
+=
!!
mastelem
+
!!
headelem
+
!!
pcmelem
+
1
;
mixdev
[
mixnum
].
chans
+=
1
;
/* If there is only 'Capture' and 'Master', this device is not worth it */
/* If there is only 'Capture' and 'Master', this device is not worth it */
if
(
mixdev
[
mixnum
].
chans
==
2
)
if
(
mixdev
[
mixnum
].
chans
==
2
)
...
...
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