Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
35be7fb3
Commit
35be7fb3
authored
Dec 03, 2008
by
Danny Wood
Committed by
Rémi Denis-Courmont
Dec 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pulseaudio surround support
Signed-off-by:
Rémi Denis-Courmont
<
rdenis@simphalempin.com
>
parent
0545e3f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
6 deletions
+37
-6
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+37
-6
No files found.
modules/audio_output/pulse.c
View file @
35be7fb3
...
...
@@ -123,12 +123,43 @@ static int Open ( vlc_object_t *p_this )
PULSE_DEBUG
(
"Pulse start initialization"
);
ss
.
rate
=
p_aout
->
output
.
output
.
i_rate
;
ss
.
channels
=
2
;
ss
.
channels
=
aout_FormatNbChannels
(
&
p_aout
->
output
.
output
);
/* Get the input stream channel count */
/* Setup the pulse audio stream based on the input stream count */
switch
(
ss
.
channels
)
{
case
6
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_LFE
;
break
;
case
4
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
break
;
case
2
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
break
;
case
1
:
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_CENTER
;
break
;
default:
msg_Err
(
p_aout
,
"Invalid number of channels"
);
goto
fail
;
}
/* Add a quick command line info message */
msg_Info
(
p_aout
,
"No. of Audio Channels: %d"
,
ss
.
channels
);
ss
.
rate
=
p_aout
->
output
.
output
.
i_rate
;
ss
.
format
=
PA_SAMPLE_S16LE
;
p_aout
->
output
.
output
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
p_aout
->
output
.
output
.
i_format
=
AOUT_FMT_S16_NE
;
if
(
!
pa_sample_spec_valid
(
&
ss
))
{
...
...
@@ -148,8 +179,8 @@ static int Open ( vlc_object_t *p_this )
p_sys
->
buffer_size
=
a
.
minreq
;
pa_channel_map_init_stereo
(
&
map
);
/* Initialise the speaker map setup above */
pa_channel_map_init_auto
(
&
map
,
ss
.
channels
,
PA_CHANNEL_MAP_ALSA
);
if
(
!
(
p_sys
->
mainloop
=
pa_threaded_mainloop_new
()))
{
msg_Err
(
p_aout
,
"Failed to allocate main loop"
);
...
...
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