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
9a6b90b8
Commit
9a6b90b8
authored
Sep 30, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Made audio_sample_format->i_format a FOURCC to allow the creation of
new ones.
parent
bf2f5b00
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
117 additions
and
131 deletions
+117
-131
include/audio_output.h
include/audio_output.h
+8
-23
modules/audio_filter/channel_mixer/trivial.c
modules/audio_filter/channel_mixer/trivial.c
+3
-3
modules/audio_filter/converter/a52tofloat32.c
modules/audio_filter/converter/a52tofloat32.c
+3
-3
modules/audio_filter/converter/a52tospdif.c
modules/audio_filter/converter/a52tospdif.c
+3
-3
modules/audio_filter/converter/fixed32tofloat32.c
modules/audio_filter/converter/fixed32tofloat32.c
+3
-3
modules/audio_filter/converter/fixed32tos16.c
modules/audio_filter/converter/fixed32tos16.c
+2
-2
modules/audio_filter/converter/float32tos16.c
modules/audio_filter/converter/float32tos16.c
+2
-2
modules/audio_filter/converter/float32tos8.c
modules/audio_filter/converter/float32tos8.c
+3
-3
modules/audio_filter/converter/float32tou16.c
modules/audio_filter/converter/float32tou16.c
+2
-2
modules/audio_filter/converter/float32tou8.c
modules/audio_filter/converter/float32tou8.c
+3
-3
modules/audio_filter/converter/s16tofloat32.c
modules/audio_filter/converter/s16tofloat32.c
+2
-2
modules/audio_filter/converter/s16tofloat32swab.c
modules/audio_filter/converter/s16tofloat32swab.c
+4
-4
modules/audio_filter/resampler/trivial.c
modules/audio_filter/resampler/trivial.c
+3
-3
modules/audio_filter/resampler/ugly.c
modules/audio_filter/resampler/ugly.c
+3
-3
modules/audio_mixer/float32.c
modules/audio_mixer/float32.c
+2
-2
modules/audio_mixer/trivial.c
modules/audio_mixer/trivial.c
+3
-3
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+8
-15
modules/audio_output/file.c
modules/audio_output/file.c
+12
-6
modules/audio_output/oss.c
modules/audio_output/oss.c
+6
-6
modules/codec/a52.c
modules/codec/a52.c
+2
-2
modules/codec/faad/decoder.c
modules/codec/faad/decoder.c
+2
-2
modules/codec/lpcm.c
modules/codec/lpcm.c
+2
-2
modules/codec/mad/decoder.c
modules/codec/mad/decoder.c
+1
-1
modules/codec/mpeg_audio/decoder.c
modules/codec/mpeg_audio/decoder.c
+2
-2
modules/gui/macosx/aout.m
modules/gui/macosx/aout.m
+2
-2
modules/gui/qnx/aout.c
modules/gui/qnx/aout.c
+1
-1
modules/misc/dummy/aout.c
modules/misc/dummy/aout.c
+2
-2
src/audio_output/common.c
src/audio_output/common.c
+13
-15
src/audio_output/filters.c
src/audio_output/filters.c
+4
-3
src/audio_output/output.c
src/audio_output/output.c
+11
-8
No files found.
include/audio_output.h
View file @
9a6b90b8
...
@@ -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.6
7 2002/09/26 22:40:18
massiot Exp $
* $Id: audio_output.h,v 1.6
8 2002/09/30 21:32:31
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -40,21 +40,6 @@ struct audio_sample_format_t
...
@@ -40,21 +40,6 @@ struct audio_sample_format_t
* i_nb_samples * i_bytes_per_frame / i_frame_length */
* i_nb_samples * i_bytes_per_frame / i_frame_length */
};
};
#define AOUT_FMT_MU_LAW 0x00000001
#define AOUT_FMT_A_LAW 0x00000002
#define AOUT_FMT_IMA_ADPCM 0x00000004
#define AOUT_FMT_U8 0x00000008
#define AOUT_FMT_S16_LE 0x00000010
/* Little endian signed 16 */
#define AOUT_FMT_S16_BE 0x00000020
/* Big endian signed 16 */
#define AOUT_FMT_S8 0x00000040
#define AOUT_FMT_U16_LE 0x00000080
/* Little endian U16 */
#define AOUT_FMT_U16_BE 0x00000100
/* Big endian U16 */
#define AOUT_FMT_SPDIF 0x00000400
/* S/PDIF hardware support */
#define AOUT_FMT_FLOAT32 0x00010000
#define AOUT_FMT_FIXED32 0x00020000
#define AOUT_FMT_A52 0x00100000
#define AOUT_FMT_DTS 0x00200000
#define AOUT_FMTS_IDENTICAL( p_first, p_second ) ( \
#define AOUT_FMTS_IDENTICAL( p_first, p_second ) ( \
((p_first)->i_format == (p_second)->i_format) \
((p_first)->i_format == (p_second)->i_format) \
&& ((p_first)->i_rate == (p_second)->i_rate) \
&& ((p_first)->i_rate == (p_second)->i_rate) \
...
@@ -68,17 +53,17 @@ struct audio_sample_format_t
...
@@ -68,17 +53,17 @@ struct audio_sample_format_t
|| (p_first)->i_channels == -1 || (p_second)->i_channels == -1) )
|| (p_first)->i_channels == -1 || (p_second)->i_channels == -1) )
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
# define AOUT_FMT_S16_NE
AOUT_FMT_S16_BE
# define AOUT_FMT_S16_NE
VLC_FOURCC('s','1','6','b')
# define AOUT_FMT_U16_NE
AOUT_FMT_U16_BE
# define AOUT_FMT_U16_NE
VLC_FOURCC('u','1','6','b')
#else
#else
# define AOUT_FMT_S16_NE
AOUT_FMT_S16_LE
# define AOUT_FMT_S16_NE
VLC_FOURCC('s','1','6','l')
# define AOUT_FMT_U16_NE
AOUT_FMT_U16_LE
# define AOUT_FMT_U16_NE
VLC_FOURCC('u','1','6','l')
#endif
#endif
#define AOUT_FMT_NON_LINEAR( p_format ) \
#define AOUT_FMT_NON_LINEAR( p_format ) \
( ((p_format)->i_format ==
AOUT_FMT_SPDIF)
\
( ((p_format)->i_format ==
VLC_FOURCC('s','p','d','i'))
\
|| ((p_format)->i_format ==
AOUT_FMT_A52)
\
|| ((p_format)->i_format ==
VLC_FOURCC('a','5','2',' '))
\
|| ((p_format)->i_format ==
AOUT_FMT_DTS
) )
|| ((p_format)->i_format ==
VLC_FOURCC('d','t','s',' ')
) )
/* This is heavily borrowed from libmad, by Robert Leslie <rob@mars.org> */
/* This is heavily borrowed from libmad, by Robert Leslie <rob@mars.org> */
/*
/*
...
...
modules/audio_filter/channel_mixer/trivial.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* trivial.c : trivial channel mixer plug-in (drops unwanted channels)
* trivial.c : trivial channel mixer plug-in (drops unwanted channels)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.
3 2002/09/02 23:21:40
massiot Exp $
* $Id: trivial.c,v 1.
4 2002/09/30 21:32:31
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -59,8 +59,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -59,8 +59,8 @@ static int Create( vlc_object_t *p_this )
if
(
p_filter
->
input
.
i_channels
==
p_filter
->
output
.
i_channels
if
(
p_filter
->
input
.
i_channels
==
p_filter
->
output
.
i_channels
||
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
!=
AOUT_FMT_FLOAT32
||
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
&&
p_filter
->
input
.
i_format
!=
AOUT_FMT_FIXED32
)
)
&&
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/converter/a52tofloat32.c
View file @
9a6b90b8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
* (http://liba52.sf.net/).
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* Copyright (C) 2001, 2002 VideoLAN
* $Id: a52tofloat32.c,v 1.
2 2002/09/16 20:46:37
massiot Exp $
* $Id: a52tofloat32.c,v 1.
3 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
...
@@ -96,8 +96,8 @@ static int Create( vlc_object_t * _p_filter )
...
@@ -96,8 +96,8 @@ static int Create( vlc_object_t * _p_filter )
aout_filter_t
*
p_filter
=
(
aout_filter_t
*
)
_p_filter
;
aout_filter_t
*
p_filter
=
(
aout_filter_t
*
)
_p_filter
;
struct
aout_filter_sys_t
*
p_sys
;
struct
aout_filter_sys_t
*
p_sys
;
if
(
p_filter
->
input
.
i_format
!=
AOUT_FMT_A52
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'a'
,
'5'
,
'2'
,
' '
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_FLOAT32
)
||
p_filter
->
output
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/converter/a52tospdif.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* a52tospdif.c : encapsulates A/52 frames into S/PDIF packets
* a52tospdif.c : encapsulates A/52 frames into S/PDIF packets
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: a52tospdif.c,v 1.1
2 2002/09/11 23:08:43 stef
Exp $
* $Id: a52tospdif.c,v 1.1
3 2002/09/30 21:32:32 massiot
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
...
@@ -61,8 +61,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -61,8 +61,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
->
input
.
i_format
!=
AOUT_FMT_A52
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'a'
,
'5'
,
'2'
,
' '
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_SPDIF
)
||
p_filter
->
output
.
i_format
!=
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/converter/fixed32tofloat32.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* fixed32float32.c : converter from fixed32 to float32 bits integer
* fixed32float32.c : converter from fixed32 to float32 bits integer
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: fixed32tofloat32.c,v 1.
8 2002/08/28 22:44:31
massiot Exp $
* $Id: fixed32tofloat32.c,v 1.
9 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
*
...
@@ -58,8 +58,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -58,8 +58,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
->
input
.
i_format
!=
AOUT_FMT_FIXED32
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_FLOAT32
)
||
p_filter
->
output
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/converter/fixed32tos16.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* fixed32tos16.c : converter from fixed32 to signed 16 bits integer
* fixed32tos16.c : converter from fixed32 to signed 16 bits integer
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: fixed32tos16.c,v 1.
5 2002/08/21 22:41:59
massiot Exp $
* $Id: fixed32tos16.c,v 1.
6 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
*
...
@@ -58,7 +58,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -58,7 +58,7 @@ 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
->
input
.
i_format
!=
AOUT_FMT_FIXED32
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_S16_NE
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_S16_NE
)
{
{
return
-
1
;
return
-
1
;
...
...
modules/audio_filter/converter/float32tos16.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* float32tos16.c : converter from float32 to signed 16 bits integer
* float32tos16.c : converter from float32 to signed 16 bits integer
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: float32tos16.c,v 1.
9 2002/08/21 22:41:59
massiot Exp $
* $Id: float32tos16.c,v 1.
10 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -56,7 +56,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -56,7 +56,7 @@ 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
->
input
.
i_format
!=
AOUT_FMT_FLOAT32
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_S16_NE
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_S16_NE
)
{
{
return
-
1
;
return
-
1
;
...
...
modules/audio_filter/converter/float32tos8.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* float32tos8.c : converter from float32 to signed 8 bits integer
* float32tos8.c : converter from float32 to signed 8 bits integer
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: float32tos8.c,v 1.
4 2002/08/21 22:41:59
massiot Exp $
* $Id: float32tos8.c,v 1.
5 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
*
...
@@ -58,8 +58,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -58,8 +58,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
->
input
.
i_format
!=
AOUT_FMT_FLOAT32
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_S8
)
||
p_filter
->
output
.
i_format
!=
VLC_FOURCC
(
's'
,
'8'
,
' '
,
' '
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/converter/float32tou16.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* float32tou16.c : converter from float32 to unsigned 16 bits integer
* float32tou16.c : converter from float32 to unsigned 16 bits integer
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: float32tou16.c,v 1.
4 2002/08/21 22:41:59
massiot Exp $
* $Id: float32tou16.c,v 1.
5 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
*
...
@@ -58,7 +58,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -58,7 +58,7 @@ 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
->
input
.
i_format
!=
AOUT_FMT_FLOAT32
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_U16_NE
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_U16_NE
)
{
{
return
-
1
;
return
-
1
;
...
...
modules/audio_filter/converter/float32tou8.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* float32tou8.c : converter from float32 to unsigned 8 bits integer
* float32tou8.c : converter from float32 to unsigned 8 bits integer
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: float32tou8.c,v 1.
4 2002/08/21 22:41:59
massiot Exp $
* $Id: float32tou8.c,v 1.
5 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
*
...
@@ -58,8 +58,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -58,8 +58,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
->
input
.
i_format
!=
AOUT_FMT_FLOAT32
if
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_U8
)
||
p_filter
->
output
.
i_format
!=
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/converter/s16tofloat32.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* s16tofloat32.c : converter from signed 16 bits integer to float32
* s16tofloat32.c : converter from signed 16 bits integer to float32
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: s16tofloat32.c,v 1.
2 2002/08/21 22:41:59
massiot Exp $
* $Id: s16tofloat32.c,v 1.
3 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -59,7 +59,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -59,7 +59,7 @@ 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
->
input
.
i_format
!=
AOUT_FMT_S16_NE
if
(
p_filter
->
input
.
i_format
!=
AOUT_FMT_S16_NE
||
p_filter
->
output
.
i_format
!=
AOUT_FMT_FLOAT32
)
||
p_filter
->
output
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/converter/s16tofloat32swab.c
View file @
9a6b90b8
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* with endianness change
* with endianness change
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: s16tofloat32swab.c,v 1.
5 2002/09/27 23:38:04
massiot Exp $
* $Id: s16tofloat32swab.c,v 1.
6 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
* Henri Fallon <henri@videolan.org>
...
@@ -75,9 +75,9 @@ static int Create( vlc_object_t *p_this )
...
@@ -75,9 +75,9 @@ static int Create( vlc_object_t *p_this )
return
-
1
;
return
-
1
;
}
}
if
(
(
p_filter
->
input
.
i_format
==
AOUT_FMT_S16_LE
||
if
(
(
p_filter
->
input
.
i_format
==
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
)
||
p_filter
->
input
.
i_format
==
AOUT_FMT_S16_BE
)
p_filter
->
input
.
i_format
==
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'b'
)
)
&&
p_filter
->
output
.
i_format
==
AOUT_FMT_FLOAT32
&&
p_filter
->
output
.
i_format
==
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
&&
p_filter
->
input
.
i_format
!=
AOUT_FMT_S16_NE
)
&&
p_filter
->
input
.
i_format
!=
AOUT_FMT_S16_NE
)
{
{
p_filter
->
pf_do_work
=
DoWork
;
p_filter
->
pf_do_work
=
DoWork
;
...
...
modules/audio_filter/resampler/trivial.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* trivial.c : trivial resampler (skips samples or pads with zeroes)
* trivial.c : trivial resampler (skips samples or pads with zeroes)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.
5 2002/08/24 16:07:48 sam
Exp $
* $Id: trivial.c,v 1.
6 2002/09/30 21:32:32 massiot
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -59,8 +59,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -59,8 +59,8 @@ static int Create( vlc_object_t *p_this )
if
(
p_filter
->
input
.
i_rate
==
p_filter
->
output
.
i_rate
if
(
p_filter
->
input
.
i_rate
==
p_filter
->
output
.
i_rate
||
p_filter
->
input
.
i_format
!=
p_filter
->
output
.
i_format
||
p_filter
->
input
.
i_format
!=
p_filter
->
output
.
i_format
||
p_filter
->
input
.
i_channels
!=
p_filter
->
output
.
i_channels
||
p_filter
->
input
.
i_channels
!=
p_filter
->
output
.
i_channels
||
(
p_filter
->
input
.
i_format
!=
AOUT_FMT_FLOAT32
||
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
&&
p_filter
->
input
.
i_format
!=
AOUT_FMT_FIXED32
)
)
&&
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_filter/resampler/ugly.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* ugly.c : ugly resampler (changes pitch)
* ugly.c : ugly resampler (changes pitch)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: ugly.c,v 1.
2 2002/08/28 22:25:38
massiot Exp $
* $Id: ugly.c,v 1.
3 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -59,8 +59,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -59,8 +59,8 @@ static int Create( vlc_object_t *p_this )
if
(
p_filter
->
input
.
i_rate
==
p_filter
->
output
.
i_rate
if
(
p_filter
->
input
.
i_rate
==
p_filter
->
output
.
i_rate
||
p_filter
->
input
.
i_format
!=
p_filter
->
output
.
i_format
||
p_filter
->
input
.
i_format
!=
p_filter
->
output
.
i_format
||
p_filter
->
input
.
i_channels
!=
p_filter
->
output
.
i_channels
||
p_filter
->
input
.
i_channels
!=
p_filter
->
output
.
i_channels
||
(
p_filter
->
input
.
i_format
!=
AOUT_FMT_FLOAT32
||
(
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
&&
p_filter
->
input
.
i_format
!=
AOUT_FMT_FIXED32
)
)
&&
p_filter
->
input
.
i_format
!=
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
)
)
{
{
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
...
modules/audio_mixer/float32.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* float32.c : precise float32 audio mixer implementation
* float32.c : precise float32 audio mixer implementation
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: float32.c,v 1.
4 2002/09/20 23:27:03
massiot Exp $
* $Id: float32.c,v 1.
5 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -55,7 +55,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -55,7 +55,7 @@ static int Create( vlc_object_t *p_this )
{
{
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
if
(
p_aout
->
mixer
.
mixer
.
i_format
!=
AOUT_FMT_FLOAT32
)
if
(
p_aout
->
mixer
.
mixer
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_mixer/trivial.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.
8 2002/09/28 13:05:16
massiot Exp $
* $Id: trivial.c,v 1.
9 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -55,8 +55,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -55,8 +55,8 @@ static int Create( vlc_object_t *p_this )
{
{
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
if
(
p_aout
->
mixer
.
mixer
.
i_format
!=
AOUT_FMT_FLOAT32
if
(
p_aout
->
mixer
.
mixer
.
i_format
!=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
&&
p_aout
->
mixer
.
mixer
.
i_format
!=
AOUT_FMT_FIXED32
)
&&
p_aout
->
mixer
.
mixer
.
i_format
!=
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
modules/audio_output/alsa.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* alsa.c : alsa plugin for vlc
* alsa.c : alsa plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* Copyright (C) 2000-2001 VideoLAN
* $Id: alsa.c,v 1.1
1 2002/09/18 21:21:23
massiot Exp $
* $Id: alsa.c,v 1.1
2 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
...
@@ -136,7 +136,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -136,7 +136,7 @@ static int Open( vlc_object_t *p_this )
else
else
{
{
/* Use the internal logic to decide on the device name */
/* Use the internal logic to decide on the device name */
if
(
p_aout
->
output
.
output
.
i_format
==
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
==
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
/* Will probably need some little modification in the case
/* Will probably need some little modification in the case
we want to send some data at a different rate
we want to send some data at a different rate
...
@@ -180,7 +180,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -180,7 +180,7 @@ static int Open( vlc_object_t *p_this )
/* Default settings */
/* Default settings */
p_sys
->
b_can_sleek
=
VLC_FALSE
;
p_sys
->
b_can_sleek
=
VLC_FALSE
;
i_channels
=
p_aout
->
output
.
output
.
i_channels
;
i_channels
=
p_aout
->
output
.
output
.
i_channels
;
if
(
p_aout
->
output
.
output
.
i_format
==
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
==
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
p_sys
->
i_buffer_size
=
ALSA_SPDIF_BUFFER_SIZE
;
p_sys
->
i_buffer_size
=
ALSA_SPDIF_BUFFER_SIZE
;
p_aout
->
output
.
i_nb_samples
=
ALSA_SPDIF_PERIOD_SIZE
;
p_aout
->
output
.
i_nb_samples
=
ALSA_SPDIF_PERIOD_SIZE
;
...
@@ -195,17 +195,11 @@ static int Open( vlc_object_t *p_this )
...
@@ -195,17 +195,11 @@ static int Open( vlc_object_t *p_this )
/* Compute the settings */
/* Compute the settings */
switch
(
p_aout
->
output
.
output
.
i_format
)
switch
(
p_aout
->
output
.
output
.
i_format
)
{
{
case
AOUT_FMT_MU_LAW
:
i_format
=
SND_PCM_FORMAT_MU_LAW
;
break
;
case
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
):
case
AOUT_FMT_A_LAW
:
i_format
=
SND_PCM_FORMAT_A_LAW
;
break
;
i_format
=
SND_PCM_FORMAT_FLOAT
;
case
AOUT_FMT_IMA_ADPCM
:
i_format
=
SND_PCM_FORMAT_IMA_ADPCM
;
break
;
break
;
case
AOUT_FMT_U8
:
i_format
=
SND_PCM_FORMAT_U8
;
break
;
case
AOUT_FMT_S16_LE
:
i_format
=
SND_PCM_FORMAT_S16_LE
;
break
;
case
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
):
case
AOUT_FMT_S16_BE
:
i_format
=
SND_PCM_FORMAT_S16_BE
;
break
;
case
AOUT_FMT_S8
:
i_format
=
SND_PCM_FORMAT_S8
;
break
;
case
AOUT_FMT_U16_LE
:
i_format
=
SND_PCM_FORMAT_U16_LE
;
break
;
case
AOUT_FMT_U16_BE
:
i_format
=
SND_PCM_FORMAT_U16_BE
;
break
;
case
AOUT_FMT_FLOAT32
:
i_format
=
SND_PCM_FORMAT_FLOAT
;
break
;
case
AOUT_FMT_SPDIF
:
/* Override some settings to make S/PDIF work */
/* Override some settings to make S/PDIF work */
p_sys
->
b_can_sleek
=
VLC_TRUE
;
p_sys
->
b_can_sleek
=
VLC_TRUE
;
i_format
=
SND_PCM_FORMAT_S16_LE
;
i_format
=
SND_PCM_FORMAT_S16_LE
;
...
@@ -213,7 +207,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -213,7 +207,6 @@ static int Open( vlc_object_t *p_this )
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_frame_length
=
ALSA_SPDIF_PERIOD_SIZE
;
p_aout
->
output
.
output
.
i_frame_length
=
ALSA_SPDIF_PERIOD_SIZE
;
break
;
break
;
case
AOUT_FMT_FIXED32
:
default:
default:
msg_Err
(
p_aout
,
"audio output format 0x%x not supported"
,
msg_Err
(
p_aout
,
"audio output format 0x%x not supported"
,
p_aout
->
output
.
output
.
i_format
);
p_aout
->
output
.
output
.
i_format
);
...
...
modules/audio_output/file.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* file.c : audio output which writes the samples to a file
* file.c : audio output which writes the samples to a file
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: file.c,v 1.1
1 2002/09/18 21:21:23
massiot Exp $
* $Id: file.c,v 1.1
2 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -54,10 +54,16 @@ static void Play ( aout_instance_t * );
...
@@ -54,10 +54,16 @@ static void Play ( aout_instance_t * );
static
char
*
format_list
[]
=
{
"u8"
,
"s8"
,
"u16"
,
"s16"
,
"u16_le"
,
"s16_le"
,
static
char
*
format_list
[]
=
{
"u8"
,
"s8"
,
"u16"
,
"s16"
,
"u16_le"
,
"s16_le"
,
"u16_be"
,
"s16_be"
,
"fixed32"
,
"float32"
,
"u16_be"
,
"s16_be"
,
"fixed32"
,
"float32"
,
"spdif"
,
NULL
};
"spdif"
,
NULL
};
static
int
format_int
[]
=
{
AOUT_FMT_U8
,
AOUT_FMT_S8
,
AOUT_FMT_U16_NE
,
static
int
format_int
[]
=
{
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
),
AOUT_FMT_S16_NE
,
AOUT_FMT_U16_LE
,
AOUT_FMT_S16_LE
,
VLC_FOURCC
(
's'
,
'8'
,
' '
,
' '
),
AOUT_FMT_U16_BE
,
AOUT_FMT_S16_BE
,
AOUT_FMT_FIXED32
,
AOUT_FMT_U16_NE
,
AOUT_FMT_S16_NE
,
AOUT_FMT_FLOAT32
,
AOUT_FMT_SPDIF
};
VLC_FOURCC
(
'u'
,
'1'
,
'6'
,
'l'
),
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
),
VLC_FOURCC
(
'u'
,
'1'
,
'6'
,
'b'
),
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'b'
),
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
),
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
),
VLC_FOURCC
(
's'
,
'p'
,
'i'
,
'f'
)
};
#define PATH_TEXT N_("path of the output file")
#define PATH_TEXT N_("path of the output file")
#define PATH_LONGTEXT N_("By default samples.raw")
#define PATH_LONGTEXT N_("By default samples.raw")
...
@@ -111,7 +117,7 @@ static int Open( vlc_object_t * p_this )
...
@@ -111,7 +117,7 @@ static int Open( vlc_object_t * p_this )
}
}
p_aout
->
output
.
output
.
i_format
=
format_int
[
i
];
p_aout
->
output
.
output
.
i_format
=
format_int
[
i
];
if
(
p_aout
->
output
.
output
.
i_format
==
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
==
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
p_aout
->
output
.
i_nb_samples
=
A52_FRAME_NB
;
p_aout
->
output
.
i_nb_samples
=
A52_FRAME_NB
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
...
...
modules/audio_output/oss.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.2
6 2002/09/18 21:21:23
massiot Exp $
* $Id: oss.c,v 1.2
7 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -158,9 +158,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -158,9 +158,9 @@ static int Open( vlc_object_t *p_this )
}
}
/* Set the output format */
/* Set the output format */
if
(
p_aout
->
output
.
output
.
i_format
==
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
==
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
i_format
=
AOUT_FMT_SPDIF
;
i_format
=
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
;
p_aout
->
output
.
i_nb_samples
=
A52_FRAME_NB
;
p_aout
->
output
.
i_nb_samples
=
A52_FRAME_NB
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_frame_length
=
A52_FRAME_NB
;
p_aout
->
output
.
output
.
i_frame_length
=
A52_FRAME_NB
;
...
@@ -178,7 +178,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -178,7 +178,7 @@ static int Open( vlc_object_t *p_this )
if
(
ioctl
(
p_sys
->
i_fd
,
SNDCTL_DSP_SETFMT
,
&
i_format
)
<
0
if
(
ioctl
(
p_sys
->
i_fd
,
SNDCTL_DSP_SETFMT
,
&
i_format
)
<
0
||
i_format
!=
p_aout
->
output
.
output
.
i_format
)
||
i_format
!=
p_aout
->
output
.
output
.
i_format
)
{
{
if
(
i_format
==
AOUT_FMT_SPDIF
)
if
(
i_format
==
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
/* Retry with S16 */
/* Retry with S16 */
msg_Warn
(
p_aout
,
"cannot set audio output format (%i)"
,
i_format
);
msg_Warn
(
p_aout
,
"cannot set audio output format (%i)"
,
i_format
);
...
@@ -199,7 +199,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -199,7 +199,7 @@ static int Open( vlc_object_t *p_this )
}
}
}
}
if
(
p_aout
->
output
.
output
.
i_format
!=
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
!=
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
/* FIXME */
/* FIXME */
if
(
p_aout
->
output
.
output
.
i_channels
>
2
)
if
(
p_aout
->
output
.
output
.
i_channels
>
2
)
...
@@ -326,7 +326,7 @@ static int OSSThread( aout_instance_t * p_aout )
...
@@ -326,7 +326,7 @@ static int OSSThread( aout_instance_t * p_aout )
int
i_tmp
,
i_size
;
int
i_tmp
,
i_size
;
byte_t
*
p_bytes
;
byte_t
*
p_bytes
;
if
(
p_aout
->
output
.
output
.
i_format
!=
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
!=
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
mtime_t
buffered
=
BufferDuration
(
p_aout
);
mtime_t
buffered
=
BufferDuration
(
p_aout
);
...
...
modules/codec/a52.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* a52.c: A/52 basic parser
* a52.c: A/52 basic parser
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001-2002 VideoLAN
* Copyright (C) 2001-2002 VideoLAN
* $Id: a52.c,v 1.1
3 2002/09/26 22:40:20
massiot Exp $
* $Id: a52.c,v 1.1
4 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Authors: Stphane Borel <stef@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
...
@@ -125,7 +125,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
...
@@ -125,7 +125,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
p_dec
->
p_aout
=
NULL
;
p_dec
->
p_aout
=
NULL
;
p_dec
->
p_aout_input
=
NULL
;
p_dec
->
p_aout_input
=
NULL
;
p_dec
->
p_fifo
=
p_fifo
;
p_dec
->
p_fifo
=
p_fifo
;
p_dec
->
output_format
.
i_format
=
AOUT_FMT_A52
;
p_dec
->
output_format
.
i_format
=
VLC_FOURCC
(
'a'
,
'5'
,
'2'
,
' '
)
;
/* Init the bitstream */
/* Init the bitstream */
InitBitstream
(
&
p_dec
->
bit_stream
,
p_dec
->
p_fifo
,
InitBitstream
(
&
p_dec
->
bit_stream
,
p_dec
->
p_fifo
,
...
...
modules/codec/faad/decoder.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2
* decoder.c: AAC decoder using libfaad2
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* Copyright (C) 2001, 2002 VideoLAN
* $Id: decoder.c,v 1.
4 2002/09/28 13:05:16
massiot Exp $
* $Id: decoder.c,v 1.
5 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -326,7 +326,7 @@ static int InitThread( adec_thread_t * p_adec )
...
@@ -326,7 +326,7 @@ static int InitThread( adec_thread_t * p_adec )
/* Initialize the thread properties */
/* Initialize the thread properties */
p_adec
->
output_format
.
i_format
=
AOUT_FMT_FLOAT32
;
p_adec
->
output_format
.
i_format
=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
;
p_adec
->
output_format
.
i_rate
=
i_rate
;
p_adec
->
output_format
.
i_rate
=
i_rate
;
p_adec
->
output_format
.
i_channels
=
i_channels
;
p_adec
->
output_format
.
i_channels
=
i_channels
;
p_adec
->
p_aout
=
NULL
;
p_adec
->
p_aout
=
NULL
;
...
...
modules/codec/lpcm.c
View file @
9a6b90b8
...
@@ -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.
3 2002/09/28 13:05:16
massiot Exp $
* $Id: lpcm.c,v 1.
4 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
* Henri Fallon <henri@videolan.org>
...
@@ -126,7 +126,7 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
...
@@ -126,7 +126,7 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
/* FIXME : I suppose the number of channel and sampling rate
/* FIXME : I suppose the number of channel and sampling rate
* are somewhere in the headers */
* are somewhere in the headers */
p_dec
->
output_format
.
i_format
=
AOUT_FMT_S16_BE
;
p_dec
->
output_format
.
i_format
=
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'b'
)
;
p_dec
->
output_format
.
i_channels
=
2
;
p_dec
->
output_format
.
i_channels
=
2
;
p_dec
->
output_format
.
i_rate
=
48000
;
p_dec
->
output_format
.
i_rate
=
48000
;
...
...
modules/codec/mad/decoder.c
View file @
9a6b90b8
...
@@ -141,7 +141,7 @@ static int InitThread( mad_adec_thread_t * p_dec )
...
@@ -141,7 +141,7 @@ static int InitThread( mad_adec_thread_t * p_dec )
/* Initialize the thread properties */
/* Initialize the thread properties */
p_dec
->
p_aout
=
NULL
;
p_dec
->
p_aout
=
NULL
;
p_dec
->
p_aout_input
=
NULL
;
p_dec
->
p_aout_input
=
NULL
;
p_dec
->
output_format
.
i_format
=
AOUT_FMT_FIXED32
;
p_dec
->
output_format
.
i_format
=
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
;
/*
/*
* Properties of audio for libmad
* Properties of audio for libmad
...
...
modules/codec/mpeg_audio/decoder.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* decoder.c: MPEG audio decoder thread
* decoder.c: MPEG audio decoder thread
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* Copyright (C) 1999-2001 VideoLAN
* $Id: decoder.c,v 1.
4 2002/09/26 22:40:23
massiot Exp $
* $Id: decoder.c,v 1.
5 2002/09/30 21:32:32
massiot Exp $
*
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
...
@@ -178,7 +178,7 @@ static void DecodeThread( adec_thread_t * p_dec )
...
@@ -178,7 +178,7 @@ static void DecodeThread( adec_thread_t * p_dec )
}
}
/* Set output configuration */
/* Set output configuration */
p_dec
->
output_format
.
i_format
=
AOUT_FMT_FLOAT32
;
p_dec
->
output_format
.
i_format
=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
;
p_dec
->
output_format
.
i_channels
=
(
sync_info
.
b_stereo
?
2
:
1
);
p_dec
->
output_format
.
i_channels
=
(
sync_info
.
b_stereo
?
2
:
1
);
p_dec
->
output_format
.
i_rate
=
sync_info
.
sample_rate
;
p_dec
->
output_format
.
i_rate
=
sync_info
.
sample_rate
;
aout_DateInit
(
&
p_dec
->
end_date
,
sync_info
.
sample_rate
);
aout_DateInit
(
&
p_dec
->
end_date
,
sync_info
.
sample_rate
);
...
...
modules/gui/macosx/aout.m
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* aout.m: CoreAudio output plugin
* aout.m: CoreAudio output plugin
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: aout.m,v 1.1
0 2002/09/18 21:21:24
massiot Exp $
* $Id: aout.m,v 1.1
1 2002/09/30 21:32:33
massiot Exp $
*
*
* Authors: Colin Delacroix
<colin
@
zoy
.
org
>
* Authors: Colin Delacroix
<colin
@
zoy
.
org
>
* Jon Lech Johansen
<jon-vl
@
nanocrew
.
net
>
* Jon Lech Johansen
<jon-vl
@
nanocrew
.
net
>
...
@@ -120,7 +120,7 @@ int E_(OpenAudio)( vlc_object_t * p_this )
...
@@ -120,7 +120,7 @@ int E_(OpenAudio)( vlc_object_t * p_this )
}
}
/* We only deal with floats. FIXME : this is where we should do S/PDIF. */
/* We only deal with floats. FIXME : this is where we should do S/PDIF. */
p_aout->output.output.i_format =
AOUT_FMT_FLOAT32
;
p_aout->output.output.i_format =
VLC_FOURCC('f','l','3','2')
;
/* Set sample rate and channels per frame */
/* Set sample rate and channels per frame */
p_aout->output.output.i_rate = p_sys->stream_format.mSampleRate;
p_aout->output.output.i_rate = p_sys->stream_format.mSampleRate;
...
...
modules/gui/qnx/aout.c
View file @
9a6b90b8
...
@@ -266,7 +266,7 @@ static int QNXaoutThread( aout_instance_t * p_aout )
...
@@ -266,7 +266,7 @@ static int QNXaoutThread( aout_instance_t * p_aout )
int
i_tmp
,
i_size
;
int
i_tmp
,
i_size
;
byte_t
*
p_bytes
;
byte_t
*
p_bytes
;
if
(
p_aout
->
output
.
output
.
i_format
!=
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
!=
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
mtime_t
next_date
=
0
;
mtime_t
next_date
=
0
;
...
...
modules/misc/dummy/aout.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* aout_dummy.c : dummy audio output plugin
* aout_dummy.c : dummy audio output plugin
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: aout.c,v 1.
9 2002/09/18 21:21:24
massiot Exp $
* $Id: aout.c,v 1.
10 2002/09/30 21:32:33
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -50,7 +50,7 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
...
@@ -50,7 +50,7 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
p_aout
->
output
.
pf_play
=
Play
;
p_aout
->
output
.
pf_play
=
Play
;
aout_VolumeSoftInit
(
p_aout
);
aout_VolumeSoftInit
(
p_aout
);
if
(
p_aout
->
output
.
output
.
i_format
==
AOUT_FMT_SPDIF
)
if
(
p_aout
->
output
.
output
.
i_format
==
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
)
{
{
p_aout
->
output
.
i_nb_samples
=
A52_FRAME_NB
;
p_aout
->
output
.
i_nb_samples
=
A52_FRAME_NB
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
...
...
src/audio_output/common.c
View file @
9a6b90b8
...
@@ -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 2002/09/26 22:40:25
massiot Exp $
* $Id: common.c,v 1.
2 2002/09/30 21:32:33
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -136,32 +136,30 @@ void aout_FormatPrepare( audio_sample_format_t * p_format )
...
@@ -136,32 +136,30 @@ void aout_FormatPrepare( audio_sample_format_t * p_format )
switch
(
p_format
->
i_format
)
switch
(
p_format
->
i_format
)
{
{
case
AOUT_FMT_U8
:
case
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
)
:
case
AOUT_FMT_S8
:
case
VLC_FOURCC
(
's'
,
'8'
,
' '
,
' '
)
:
i_result
=
1
;
i_result
=
1
;
break
;
break
;
case
AOUT_FMT_U16_LE
:
case
VLC_FOURCC
(
'u'
,
'1'
,
'6'
,
'l'
)
:
case
AOUT_FMT_U16_BE
:
case
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
)
:
case
AOUT_FMT_S16_LE
:
case
VLC_FOURCC
(
'u'
,
'1'
,
'6'
,
'b'
)
:
case
AOUT_FMT_S16_BE
:
case
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'b'
)
:
i_result
=
2
;
i_result
=
2
;
break
;
break
;
case
AOUT_FMT_FLOAT32
:
case
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
:
case
AOUT_FMT_FIXED32
:
case
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
)
:
i_result
=
4
;
i_result
=
4
;
break
;
break
;
case
AOUT_FMT_SPDIF
:
case
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
):
case
AOUT_FMT_A52
:
case
VLC_FOURCC
(
'a'
,
'5'
,
'2'
,
' '
):
case
AOUT_FMT_DTS
:
case
VLC_FOURCC
(
'd'
,
't'
,
's'
,
' '
):
default:
/* For these formats the caller has to indicate the parameters
/* For these formats the caller has to indicate the parameters
* by hand. */
* by hand. */
return
;
return
;
default:
i_result
=
0
;
/* will segfault much sooner... */
}
}
p_format
->
i_bytes_per_frame
=
i_result
*
aout_FormatNbChannels
(
p_format
);
p_format
->
i_bytes_per_frame
=
i_result
*
aout_FormatNbChannels
(
p_format
);
...
...
src/audio_output/filters.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* filters.c : audio output filters management
* filters.c : audio output filters management
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: filters.c,v 1.1
0 2002/09/22 14:53:52
massiot Exp $
* $Id: filters.c,v 1.1
1 2002/09/30 21:32:33
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -128,8 +128,9 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
...
@@ -128,8 +128,9 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
return
0
;
return
0
;
}
}
msg_Dbg
(
p_aout
,
"filter(s) format=%d->%d rate=%d->%d channels=%d->%d"
,
msg_Dbg
(
p_aout
,
"filter(s) format=%4.4s->%4.4s rate=%d->%d channels=%d->%d"
,
p_input_format
->
i_format
,
p_output_format
->
i_format
,
(
char
*
)
&
p_input_format
->
i_format
,
(
char
*
)
&
p_output_format
->
i_format
,
p_input_format
->
i_rate
,
p_output_format
->
i_rate
,
p_input_format
->
i_rate
,
p_output_format
->
i_rate
,
p_input_format
->
i_channels
,
p_output_format
->
i_channels
);
p_input_format
->
i_channels
,
p_output_format
->
i_channels
);
...
...
src/audio_output/output.c
View file @
9a6b90b8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* output.c : internal management of output streams for the audio output
* output.c : internal management of output streams for the audio output
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: output.c,v 1.1
5 2002/09/26 22:40:25
massiot Exp $
* $Id: output.c,v 1.1
6 2002/09/30 21:32:33
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -50,14 +50,15 @@ int aout_OutputNew( aout_instance_t * p_aout,
...
@@ -50,14 +50,15 @@ int aout_OutputNew( aout_instance_t * p_aout,
if
(
i_channels
!=
-
1
)
p_aout
->
output
.
output
.
i_channels
=
i_channels
;
if
(
i_channels
!=
-
1
)
p_aout
->
output
.
output
.
i_channels
=
i_channels
;
if
(
AOUT_FMT_NON_LINEAR
(
&
p_aout
->
output
.
output
)
)
if
(
AOUT_FMT_NON_LINEAR
(
&
p_aout
->
output
.
output
)
)
{
{
p_aout
->
output
.
output
.
i_format
=
AOUT_FMT_SPDIF
;
p_aout
->
output
.
output
.
i_format
=
VLC_FOURCC
(
's'
,
'p'
,
'd'
,
'i'
)
;
}
}
else
else
{
{
/* Non-S/PDIF mixer only deals with float32 or fixed32. */
/* Non-S/PDIF mixer only deals with float32 or fixed32. */
p_aout
->
output
.
output
.
i_format
p_aout
->
output
.
output
.
i_format
=
(
p_aout
->
p_vlc
->
i_cpu
&
CPU_CAPABILITY_FPU
)
?
=
(
p_aout
->
p_vlc
->
i_cpu
&
CPU_CAPABILITY_FPU
)
?
AOUT_FMT_FLOAT32
:
AOUT_FMT_FIXED32
;
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
:
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
);
}
}
aout_FormatPrepare
(
&
p_aout
->
output
.
output
);
aout_FormatPrepare
(
&
p_aout
->
output
.
output
);
...
@@ -80,8 +81,9 @@ int aout_OutputNew( aout_instance_t * p_aout,
...
@@ -80,8 +81,9 @@ int aout_OutputNew( aout_instance_t * p_aout,
vlc_mutex_unlock
(
&
p_aout
->
output_fifo_lock
);
vlc_mutex_unlock
(
&
p_aout
->
output_fifo_lock
);
msg_Dbg
(
p_aout
,
"output format=%d rate=%d channels=%d"
,
msg_Dbg
(
p_aout
,
"output format=%4.4s rate=%d channels=%d"
,
p_aout
->
output
.
output
.
i_format
,
p_aout
->
output
.
output
.
i_rate
,
(
char
*
)
&
p_aout
->
output
.
output
.
i_format
,
p_aout
->
output
.
output
.
i_rate
,
p_aout
->
output
.
output
.
i_channels
);
p_aout
->
output
.
output
.
i_channels
);
/* Calculate the resulting mixer output format. */
/* Calculate the resulting mixer output format. */
...
@@ -92,7 +94,8 @@ int aout_OutputNew( aout_instance_t * p_aout,
...
@@ -92,7 +94,8 @@ int aout_OutputNew( aout_instance_t * p_aout,
/* Non-S/PDIF mixer only deals with float32 or fixed32. */
/* Non-S/PDIF mixer only deals with float32 or fixed32. */
p_aout
->
mixer
.
mixer
.
i_format
p_aout
->
mixer
.
mixer
.
i_format
=
(
p_aout
->
p_vlc
->
i_cpu
&
CPU_CAPABILITY_FPU
)
?
=
(
p_aout
->
p_vlc
->
i_cpu
&
CPU_CAPABILITY_FPU
)
?
AOUT_FMT_FLOAT32
:
AOUT_FMT_FIXED32
;
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
:
VLC_FOURCC
(
'f'
,
'i'
,
'3'
,
'2'
);
aout_FormatPrepare
(
&
p_aout
->
mixer
.
mixer
);
aout_FormatPrepare
(
&
p_aout
->
mixer
.
mixer
);
}
}
else
else
...
@@ -100,8 +103,8 @@ int aout_OutputNew( aout_instance_t * p_aout,
...
@@ -100,8 +103,8 @@ int aout_OutputNew( aout_instance_t * p_aout,
p_aout
->
mixer
.
mixer
.
i_format
=
p_format
->
i_format
;
p_aout
->
mixer
.
mixer
.
i_format
=
p_format
->
i_format
;
}
}
msg_Dbg
(
p_aout
,
"mixer format=%
d
rate=%d channels=%d"
,
msg_Dbg
(
p_aout
,
"mixer format=%
4.4s
rate=%d channels=%d"
,
p_aout
->
mixer
.
mixer
.
i_format
,
p_aout
->
mixer
.
mixer
.
i_rate
,
(
char
*
)
&
p_aout
->
mixer
.
mixer
.
i_format
,
p_aout
->
mixer
.
mixer
.
i_rate
,
p_aout
->
mixer
.
mixer
.
i_channels
);
p_aout
->
mixer
.
mixer
.
i_channels
);
/* Create filters. */
/* Create filters. */
...
...
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