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
51fa2629
Commit
51fa2629
authored
Oct 09, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* (Hopefully) fixed S/PDIF outputs ;
* Finally fixed the audio problem on most platforms.
parent
0e5978dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
25 deletions
+34
-25
src/audio_output/input.c
src/audio_output/input.c
+34
-25
No files found.
src/audio_output/input.c
View file @
51fa2629
...
...
@@ -2,7 +2,7 @@
* input.c : internal management of input streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: input.c,v 1.1
5 2002/10/04 18:07:22 sam
Exp $
* $Id: input.c,v 1.1
6 2002/10/09 22:54:22 massiot
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -63,37 +63,46 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
return
-
1
;
}
/* Create resamplers. */
intermediate_format
.
i_rate
=
(
p_input
->
input
.
i_rate
*
(
100
+
AOUT_MAX_RESAMPLING
))
/
100
;
if
(
intermediate_format
.
i_rate
==
p_aout
->
mixer
.
mixer
.
i_rate
)
/* Prepare hints for the buffer allocator. */
p_input
->
input_alloc
.
i_alloc_type
=
AOUT_ALLOC_HEAP
;
p_input
->
input_alloc
.
i_bytes_per_sec
=
-
1
;
if
(
AOUT_FMT_NON_LINEAR
(
&
p_aout
->
mixer
.
mixer
)
)
{
/* Just in case... */
intermediate_format
.
i_rate
++
;
p_input
->
i_nb_resamplers
=
0
;
}
if
(
aout_FiltersCreatePipeline
(
p_aout
,
p_input
->
pp_resamplers
,
&
p_input
->
i_nb_resamplers
,
&
intermediate_format
,
&
p_aout
->
mixer
.
mixer
)
<
0
)
else
{
msg_Err
(
p_aout
,
"couldn't set a resampler pipeline"
);
/* Create resamplers. */
intermediate_format
.
i_rate
=
(
p_input
->
input
.
i_rate
*
(
100
+
AOUT_MAX_RESAMPLING
))
/
100
;
if
(
intermediate_format
.
i_rate
==
p_aout
->
mixer
.
mixer
.
i_rate
)
{
/* Just in case... */
intermediate_format
.
i_rate
++
;
}
if
(
aout_FiltersCreatePipeline
(
p_aout
,
p_input
->
pp_resamplers
,
&
p_input
->
i_nb_resamplers
,
&
intermediate_format
,
&
p_aout
->
mixer
.
mixer
)
<
0
)
{
msg_Err
(
p_aout
,
"couldn't set a resampler pipeline"
);
aout_FiltersDestroyPipeline
(
p_aout
,
p_input
->
pp_filters
,
p_input
->
i_nb_filters
);
aout_FifoDestroy
(
p_aout
,
&
p_input
->
fifo
);
p_input
->
b_error
=
1
;
aout_FiltersDestroyPipeline
(
p_aout
,
p_input
->
pp_filters
,
p_input
->
i_nb_filters
);
aout_FifoDestroy
(
p_aout
,
&
p_input
->
fifo
);
p_input
->
b_error
=
1
;
return
-
1
;
return
-
1
;
}
aout_FiltersHintBuffers
(
p_aout
,
p_input
->
pp_resamplers
,
p_input
->
i_nb_resamplers
,
&
p_input
->
input_alloc
);
}
/* Prepare hints for the buffer allocator. */
p_input
->
input_alloc
.
i_alloc_type
=
AOUT_ALLOC_HEAP
;
p_input
->
input_alloc
.
i_bytes_per_sec
=
-
1
;
aout_FiltersHintBuffers
(
p_aout
,
p_input
->
pp_resamplers
,
p_input
->
i_nb_resamplers
,
&
p_input
->
input_alloc
);
aout_FiltersHintBuffers
(
p_aout
,
p_input
->
pp_filters
,
p_input
->
i_nb_filters
,
&
p_input
->
input_alloc
);
...
...
@@ -154,9 +163,9 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
* happen :). */
msg_Warn
(
p_aout
,
"computed PTS is out of range (%lld), clearing out"
,
start_date
);
vlc_mutex_lock
(
&
p_aout
->
mixer
_lock
);
vlc_mutex_lock
(
&
p_aout
->
input_fifos
_lock
);
aout_FifoSet
(
p_aout
,
&
p_input
->
fifo
,
0
);
vlc_mutex_unlock
(
&
p_aout
->
mixer
_lock
);
vlc_mutex_unlock
(
&
p_aout
->
input_fifos
_lock
);
start_date
=
0
;
}
...
...
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