Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
815fd326
Commit
815fd326
authored
Oct 02, 2011
by
Sébastien Toque
Committed by
Rémi Denis-Courmont
Oct 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amem: add channel mapping
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
eaa0d3c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
2 deletions
+49
-2
modules/audio_output/amem.c
modules/audio_output/amem.c
+49
-2
No files found.
modules/audio_output/amem.c
View file @
815fd326
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
#include <vlc_aout.h>
#include <assert.h>
static
int
Open
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
...
@@ -143,14 +144,60 @@ static int Open (vlc_object_t *obj)
...
@@ -143,14 +144,60 @@ static int Open (vlc_object_t *obj)
goto
error
;
goto
error
;
/* TODO: amem-format */
/* TODO: amem-format */
/* FIXME/TODO channel mapping */
if
(
strcmp
(
format
,
"S16N"
))
if
(
strcmp
(
format
,
"S16N"
)
||
aout
->
format
.
i_channels
!=
channels
)
{
{
msg_Err
(
aout
,
"format not supported"
);
msg_Err
(
aout
,
"format not supported"
);
goto
error
;
goto
error
;
}
}
/* channel mapping */
switch
(
channels
)
{
case
1
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_CENTER
;
break
;
case
2
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
break
;
case
3
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_LFE
;
break
;
case
4
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
break
;
case
5
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
break
;
case
6
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_LFE
;
break
;
case
7
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARCENTER
|
AOUT_CHAN_MIDDLELEFT
|
AOUT_CHAN_MIDDLERIGHT
|
AOUT_CHAN_LFE
;
break
;
case
8
:
aout
->
format
.
i_physical_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_MIDDLELEFT
|
AOUT_CHAN_MIDDLERIGHT
|
AOUT_CHAN_LFE
;
break
;
default:
assert
(
0
);
}
aout
->
format
.
i_format
=
VLC_CODEC_S16N
;
aout
->
format
.
i_format
=
VLC_CODEC_S16N
;
aout
->
format
.
i_rate
=
rate
;
aout
->
format
.
i_rate
=
rate
;
aout
->
format
.
i_original_channels
=
aout
->
format
.
i_physical_channels
;
aout
->
pf_play
=
Play
;
aout
->
pf_play
=
Play
;
aout
->
pf_pause
=
Pause
;
aout
->
pf_pause
=
Pause
;
...
...
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