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
519b0809
Commit
519b0809
authored
Feb 11, 2003
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/codec/lpcm.c: Attempt at supporting all channel configurations,
* Support for 7 and 7.1 channel configurations.
parent
a0794f24
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
18 deletions
+39
-18
include/audio_output.h
include/audio_output.h
+4
-2
modules/audio_filter/channel_mixer/headphone.c
modules/audio_filter/channel_mixer/headphone.c
+3
-1
modules/codec/lpcm.c
modules/codec/lpcm.c
+22
-13
src/audio_output/common.c
src/audio_output/common.c
+10
-2
No files found.
include/audio_output.h
View file @
519b0809
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
* audio_output.h : audio output interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.7
8 2003/02/09 01:13:43
massiot Exp $
* $Id: audio_output.h,v 1.7
9 2003/02/11 11:16:04
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -111,7 +111,9 @@ typedef int32_t vlc_fixed_t;
...
@@ -111,7 +111,9 @@ typedef int32_t vlc_fixed_t;
#define AOUT_CHAN_REARCENTER 0x10
#define AOUT_CHAN_REARCENTER 0x10
#define AOUT_CHAN_REARLEFT 0x20
#define AOUT_CHAN_REARLEFT 0x20
#define AOUT_CHAN_REARRIGHT 0x40
#define AOUT_CHAN_REARRIGHT 0x40
#define AOUT_CHAN_LFE 0x100
#define AOUT_CHAN_MIDDLELEFT 0x100
#define AOUT_CHAN_MIDDLERIGHT 0x200
#define AOUT_CHAN_LFE 0x1000
/* Values available for original channels only */
/* Values available for original channels only */
#define AOUT_CHAN_DOLBYSTEREO 0x10000
#define AOUT_CHAN_DOLBYSTEREO 0x10000
...
...
modules/audio_filter/channel_mixer/headphone.c
View file @
519b0809
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* -> gives the feeling of a real room with a simple headphone
* -> gives the feeling of a real room with a simple headphone
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: headphone.c,v 1.
1 2002/12/09 00:52:42 babal
Exp $
* $Id: headphone.c,v 1.
2 2003/02/11 11:16:04 massiot
Exp $
*
*
* Authors: Boris Dors <babal@via.ecp.fr>
* Authors: Boris Dors <babal@via.ecp.fr>
*
*
...
@@ -260,6 +260,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -260,6 +260,8 @@ static int Create( vlc_object_t *p_this )
aout_filter_t
*
p_filter
=
(
aout_filter_t
*
)
p_this
;
aout_filter_t
*
p_filter
=
(
aout_filter_t
*
)
p_this
;
if
(
p_filter
->
output
.
i_physical_channels
!=
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
if
(
p_filter
->
output
.
i_physical_channels
!=
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
||
(
p_filter
->
input
.
i_physical_channels
&
AOUT_CHAN_MIDDLELEFT
)
||
(
p_filter
->
input
.
i_physical_channels
&
AOUT_CHAN_MIDDLERIGHT
)
||
p_filter
->
input
.
i_format
!=
p_filter
->
output
.
i_format
||
p_filter
->
input
.
i_format
!=
p_filter
->
output
.
i_format
||
p_filter
->
input
.
i_rate
!=
p_filter
->
output
.
i_rate
||
p_filter
->
input
.
i_rate
!=
p_filter
->
output
.
i_rate
||
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
||
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
...
...
modules/codec/lpcm.c
View file @
519b0809
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* lpcm.c: lpcm decoder module
* lpcm.c: lpcm decoder module
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm.c,v 1.1
0 2003/01/02 20:48:28 gbazin
Exp $
* $Id: lpcm.c,v 1.1
1 2003/02/11 11:16:04 massiot
Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
* Henri Fallon <henri@videolan.org>
...
@@ -176,7 +176,7 @@ static void DecodeFrame( dec_thread_t * p_dec )
...
@@ -176,7 +176,7 @@ static void DecodeFrame( dec_thread_t * p_dec )
aout_buffer_t
*
p_buffer
;
aout_buffer_t
*
p_buffer
;
mtime_t
i_pts
;
mtime_t
i_pts
;
uint8_t
i_header
;
uint8_t
i_header
;
unsigned
int
i_rate
,
i_original_channels
,
i_nb_channels
;
unsigned
int
i_rate
,
i_original_channels
;
/* Look for sync word - should be 0xXX80 */
/* Look for sync word - should be 0xXX80 */
RealignBits
(
&
p_dec
->
bit_stream
);
RealignBits
(
&
p_dec
->
bit_stream
);
...
@@ -214,32 +214,41 @@ static void DecodeFrame( dec_thread_t * p_dec )
...
@@ -214,32 +214,41 @@ static void DecodeFrame( dec_thread_t * p_dec )
{
{
case
0
:
case
0
:
i_original_channels
=
AOUT_CHAN_CENTER
;
i_original_channels
=
AOUT_CHAN_CENTER
;
i_nb_channels
=
1
;
break
;
break
;
case
1
:
case
1
:
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
;
i_nb_channels
=
2
;
break
;
case
2
:
/* This is unsure. */
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_LFE
;
break
;
break
;
case
3
:
case
3
:
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
;
i_nb_channels
=
4
;
break
;
case
4
:
/* This is unsure. */
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_LFE
;
break
;
break
;
case
5
:
case
5
:
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_LFE
;
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_LFE
;
i_nb_channels
=
6
;
break
;
break
;
case
2
:
case
4
:
case
6
:
case
6
:
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_MIDDLELEFT
|
AOUT_CHAN_MIDDLERIGHT
;
break
;
case
7
:
case
7
:
default:
i_original_channels
=
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
msg_Err
(
p_dec
->
p_fifo
,
"unsupported LPCM channels (0x%x)"
,
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
i_header
);
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_MIDDLELEFT
p_dec
->
p_fifo
->
b_error
=
1
;
|
AOUT_CHAN_MIDDLERIGHT
|
AOUT_CHAN_LFE
;
return
;
break
;
}
}
if
(
(
p_dec
->
p_aout_input
!=
NULL
)
&&
if
(
(
p_dec
->
p_aout_input
!=
NULL
)
&&
...
...
src/audio_output/common.c
View file @
519b0809
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* common.c : audio output management of common data structures
* common.c : audio output management of common data structures
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: common.c,v 1.1
6 2003/01/23 17:13:28
massiot Exp $
* $Id: common.c,v 1.1
7 2003/02/11 11:16:04
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -99,7 +99,7 @@ unsigned int aout_FormatNbChannels( const audio_sample_format_t * p_format )
...
@@ -99,7 +99,7 @@ unsigned int aout_FormatNbChannels( const audio_sample_format_t * p_format )
static
const
uint32_t
pi_channels
[]
=
static
const
uint32_t
pi_channels
[]
=
{
AOUT_CHAN_CENTER
,
AOUT_CHAN_LEFT
,
AOUT_CHAN_RIGHT
,
{
AOUT_CHAN_CENTER
,
AOUT_CHAN_LEFT
,
AOUT_CHAN_RIGHT
,
AOUT_CHAN_REARCENTER
,
AOUT_CHAN_REARLEFT
,
AOUT_CHAN_REARRIGHT
,
AOUT_CHAN_REARCENTER
,
AOUT_CHAN_REARLEFT
,
AOUT_CHAN_REARRIGHT
,
AOUT_CHAN_LFE
};
AOUT_CHAN_
MIDDLELEFT
,
AOUT_CHAN_MIDDLERIGHT
,
AOUT_CHAN_
LFE
};
unsigned
int
i_nb
=
0
,
i
;
unsigned
int
i_nb
=
0
,
i
;
for
(
i
=
0
;
i
<
sizeof
(
pi_channels
)
/
sizeof
(
uint32_t
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
pi_channels
)
/
sizeof
(
uint32_t
);
i
++
)
...
@@ -235,6 +235,14 @@ const char * aout_FormatPrintChannels( const audio_sample_format_t * p_format )
...
@@ -235,6 +235,14 @@ const char * aout_FormatPrintChannels( const audio_sample_format_t * p_format )
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_LFE
:
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_LFE
:
return
"3F2R/LFE"
;
return
"3F2R/LFE"
;
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_MIDDLELEFT
|
AOUT_CHAN_MIDDLERIGHT
:
return
"3F2M2R"
;
case
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
|
AOUT_CHAN_CENTER
|
AOUT_CHAN_REARLEFT
|
AOUT_CHAN_REARRIGHT
|
AOUT_CHAN_MIDDLELEFT
|
AOUT_CHAN_MIDDLERIGHT
|
AOUT_CHAN_LFE
:
return
"3F2M2R/LFE"
;
}
}
return
"ERROR"
;
return
"ERROR"
;
...
...
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