Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
38573f3b
Commit
38573f3b
authored
Jan 11, 2002
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed aout_CreateFifo from mad_adec.c InitThread() and added it to mad_libmad.c in mad_libmad.c
parent
37759cf5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
42 deletions
+42
-42
plugins/mad/mad_adec.c
plugins/mad/mad_adec.c
+13
-12
plugins/mad/mad_libmad.c
plugins/mad/mad_libmad.c
+29
-30
No files found.
plugins/mad/mad_adec.c
View file @
38573f3b
...
...
@@ -67,7 +67,7 @@ MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION
(
"Libmad MPEG 1/2/3 audio decoder library"
)
ADD_CAPABILITY
(
DECODER
,
9
50
)
ADD_CAPABILITY
(
DECODER
,
50
)
ADD_SHORTCUT
(
"mad"
)
MODULE_INIT_STOP
...
...
@@ -190,19 +190,20 @@ static int InitThread( mad_adec_thread_t * p_mad_adec )
/*
* Initialize the output properties
*/
p_mad_adec
->
p_aout_fifo
=
NULL
;
/* Creating the audio output fifo */
p_mad_adec
->
p_aout_fifo
=
aout_CreateFifo
(
AOUT_ADEC_STEREO_FIFO
,
/* fifo type */
2
,
/* nr. of channels */
48000
,
/* frame rate in Hz ?*/
0
,
/* units */
ADEC_FRAME_SIZE
/
2
,
/* frame size */
NULL
);
/* buffer */
if
(
p_mad_adec
->
p_aout_fifo
==
NULL
)
{
return
(
-
1
);
}
//
p_mad_adec->p_aout_fifo = aout_CreateFifo( AOUT_ADEC_STEREO_FIFO, /* fifo type */
//
2, /* nr. of channels */
//
48000, /* frame rate in Hz ?*/
//
0, /* units */
//
ADEC_FRAME_SIZE/2, /* frame size */
//
NULL ); /* buffer */
//
//
if ( p_mad_adec->p_aout_fifo == NULL )
//
{
//
return( -1 );
//
}
intf_ErrMsg
(
"mad_adec debug: mad decoder thread %p initialized"
,
p_mad_adec
);
...
...
plugins/mad/mad_libmad.c
View file @
38573f3b
...
...
@@ -224,6 +224,24 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header
static
struct
audio_dither
dither
;
#endif
/* Creating the audio output fifo */
if
(
p_mad_adec
->
p_aout_fifo
==
NULL
)
{
p_mad_adec
->
p_aout_fifo
=
aout_CreateFifo
(
AOUT_ADEC_STEREO_FIFO
,
/* fifo type */
p_libmad_pcm
->
channels
,
/* nr. of channels */
p_libmad_pcm
->
samplerate
,
/* frame rate in Hz ?*/
0
,
/* units */
ADEC_FRAME_SIZE
/
2
,
/* frame size */
NULL
);
/* buffer */
if
(
p_mad_adec
->
p_aout_fifo
==
NULL
)
{
return
(
-
1
);
}
intf_ErrMsg
(
"mad_adec debug: in libmad_output aout fifo created"
);
}
/* Set timestamp to synchronize audio and video decoder fifo's */
vlc_mutex_lock
(
&
p_mad_adec
->
p_aout_fifo
->
data_lock
);
p_mad_adec
->
p_aout_fifo
->
l_rate
=
p_libmad_header
->
samplerate
;
...
...
@@ -231,8 +249,6 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header
buffer
=
((
byte_t
*
)
p_mad_adec
->
p_aout_fifo
->
buffer
)
+
(
p_mad_adec
->
p_aout_fifo
->
l_end_frame
*
ADEC_FRAME_SIZE
);
if
(
p_libmad_pcm
->
channels
==
2
)
{
while
(
nsamples
--
)
{
#ifdef MPG321_ROUTINES
...
...
@@ -248,6 +264,8 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header
*
buffer
++
=
(
byte_t
)
(
sample
>>
8
);
*
buffer
++
=
(
byte_t
)
(
sample
);
#endif
if
(
p_libmad_pcm
->
channels
==
2
)
{
/* right audio channel */
#ifdef MPG321_ROUTINES
sample
=
audio_linear_dither
(
16
,
*
right_ch
++
,
&
dither
);
...
...
@@ -256,27 +274,8 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header
#endif
#ifndef WORDS_BIGENDIAN
*
buffer
++
=
(
byte_t
)
(
sample
);
*
buffer
++
=
(
byte_t
)
(
sample
>>
8
);
#else
*
buffer
++
=
(
byte_t
)
(
sample
>>
8
);
*
buffer
++
=
(
byte_t
)
(
sample
);
#endif
}
}
else
{
while
(
nsamples
--
)
{
#ifdef MPG321_ROUTINES
sample
=
audio_linear_dither
(
16
,
*
left_ch
++
,
&
dither
);
#else
sample
=
s24_to_s16_pcm
(
*
left_ch
++
);
#endif
#ifndef WORDS_BIGENDIAN
*
buffer
++
=
(
byte_t
)
(
sample
);
*
buffer
++
=
(
byte_t
)
(
sample
>>
8
);
*
buffer
++
=
(
byte_t
)
(
sample
)
&
0xFF
;
*
buffer
++
=
(
byte_t
)
(
sample
>>
8
)
&
0xFF
;
#else
*
buffer
++
=
(
byte_t
)
(
sample
>>
8
);
*
buffer
++
=
(
byte_t
)
(
sample
);
...
...
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