Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
e97b748b
Commit
e97b748b
authored
Aug 18, 2004
by
sigmunau
Browse files
alsa.c: support mono on stereo only boards
parent
4b5259f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/audio_output/alsa.c
View file @
e97b748b
...
...
@@ -198,6 +198,21 @@ static void Probe( aout_instance_t * p_aout,
--
i_channels
;
}
/* Special case for mono on stereo only boards */
i_channels
=
aout_FormatNbChannels
(
&
p_aout
->
output
.
output
);
var_Change
(
p_aout
,
"audio-device"
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
if
(
val
.
i_int
<=
0
&&
i_channels
==
1
)
{
if
(
!
snd_pcm_hw_params_test_channels
(
p_sys
->
p_snd_pcm
,
p_hw
,
2
))
{
val
.
i_int
=
AOUT_VAR_STEREO
;
text
.
psz_string
=
N_
(
"Stereo"
);
var_Change
(
p_aout
,
"audio-device"
,
VLC_VAR_ADDCHOICE
,
&
val
,
&
text
);
var_Set
(
p_aout
,
"audio-device"
,
val
);
}
}
/* Close the previously opened device */
snd_pcm_close
(
p_sys
->
p_snd_pcm
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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