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
a087b402
Commit
a087b402
authored
Sep 27, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove aout_filter_t.b_discontinuity
parent
a4a13400
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
17 deletions
+10
-17
include/vlc_aout.h
include/vlc_aout.h
+0
-1
modules/audio_filter/resampler/bandlimited.c
modules/audio_filter/resampler/bandlimited.c
+3
-7
modules/audio_filter/resampler/linear.c
modules/audio_filter/resampler/linear.c
+4
-5
src/audio_output/filters.c
src/audio_output/filters.c
+0
-2
src/audio_output/input.c
src/audio_output/input.c
+3
-2
No files found.
include/vlc_aout.h
View file @
a087b402
...
...
@@ -171,7 +171,6 @@ struct aout_filter_t
aout_alloc_t
output_alloc
;
bool
b_in_place
;
bool
b_continuity
;
void
(
*
pf_do_work
)(
aout_instance_t
*
,
aout_filter_t
*
,
aout_buffer_t
*
,
aout_buffer_t
*
);
...
...
modules/audio_filter/resampler/bandlimited.c
View file @
a087b402
...
...
@@ -85,7 +85,6 @@ struct filter_sys_t
date_t
end_date
;
bool
b_first
;
bool
b_filter2
;
};
...
...
@@ -228,16 +227,16 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_filter->fmt_in.audio.i_bytes_per_frame;
}
#endif
p_
filter
->
b_continuity
=
false
;
p_
out_buf
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
p_sys
->
i_old_wing
=
0
;
return
;
}
if
(
!
p_filter
->
b_continuity
)
if
(
p_in_buf
->
i_flags
&
BLOCK_FLAG_DISCONTINUITY
)
{
/* Continuity in sound samples has been broken, we'd better reset
* everything. */
p_
filter
->
b_continuity
=
true
;
p_
out_buf
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
p_sys
->
i_remainder
=
0
;
date_Init
(
&
p_sys
->
end_date
,
i_out_rate
,
1
);
date_Set
(
&
p_sys
->
end_date
,
p_in_buf
->
i_pts
);
...
...
@@ -509,7 +508,6 @@ static int OpenFilter( vlc_object_t *p_this )
}
p_filter
->
p_sys
->
i_old_wing
=
0
;
p_sys
->
b_first
=
true
;
p_sys
->
b_filter2
=
true
;
p_filter
->
pf_audio_filter
=
Resample
;
...
...
@@ -583,8 +581,6 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
aout_filter
.
fmt_out
.
audio
=
p_filter
->
fmt_out
.
audio
;
aout_filter
.
fmt_out
.
audio
.
i_bytes_per_frame
=
p_filter
->
fmt_out
.
audio
.
i_channels
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
/
8
;
aout_filter
.
b_continuity
=
!
p_filter
->
p_sys
->
b_first
;
p_filter
->
p_sys
->
b_first
=
false
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_buffer
=
p_block
->
i_buffer
;
...
...
modules/audio_filter/resampler/linear.c
View file @
a087b402
...
...
@@ -148,7 +148,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if
(
p_aout
->
mixer_format
.
i_rate
==
p_filter
->
fmt_in
.
audio
.
i_rate
)
{
#if 0 /* FIXME: needs audio filter2 for block_Realloc */
if(
p_filter->b_continuity
)
if(
!(p_in_buf->i_flags & BLOCK_FLAG_DISCONTINUITY)
)
{
p_in_buf = block_Realloc( p_in_buf, sizeof(float) * i_nb_channels,
p_in_buf->i_buffer );
...
...
@@ -159,7 +159,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
i_nb_channels * sizeof(float) );
}
#endif
p_
filter
->
b_continuity
=
false
;
p_
out_buf
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
return
;
}
...
...
@@ -168,9 +168,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
vlc_memcpy
(
p_in
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_buffer
);
/* Take care of the previous input sample (if any) */
if
(
!
p_filter
->
b_continuity
)
if
(
p_in_buf
->
i_flags
&
BLOCK_FLAG_DISCONTINUITY
)
{
p_
filter
->
b_continuity
=
true
;
p_
out_buf
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
p_sys
->
i_remainder
=
0
;
date_Init
(
&
p_sys
->
end_date
,
p_filter
->
fmt_out
.
audio
.
i_rate
,
1
);
}
...
...
@@ -335,7 +335,6 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
aout_filter
.
p_sys
=
(
struct
aout_filter_sys_t
*
)
p_filter
->
p_sys
;
aout_filter
.
fmt_in
.
audio
=
p_filter
->
fmt_in
.
audio
;
aout_filter
.
fmt_out
.
audio
=
p_filter
->
fmt_out
.
audio
;
aout_filter
.
b_continuity
=
false
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_buffer
=
p_block
->
i_buffer
;
...
...
src/audio_output/filters.c
View file @
a087b402
...
...
@@ -64,8 +64,6 @@ static aout_filter_t * FindFilter( aout_instance_t * p_aout,
return
NULL
;
}
p_filter
->
b_continuity
=
false
;
return
p_filter
;
}
...
...
src/audio_output/input.c
View file @
a087b402
...
...
@@ -370,7 +370,6 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
}
/* success */
p_filter
->
b_continuity
=
false
;
p_input
->
pp_filters
[
p_input
->
i_nb_filters
++
]
=
p_filter
;
memcpy
(
&
chain_input_format
,
&
p_filter
->
fmt_out
.
audio
,
sizeof
(
audio_sample_format_t
)
);
...
...
@@ -593,6 +592,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
if
(
p_input
->
i_resampling_type
!=
AOUT_RESAMPLING_NONE
)
msg_Warn
(
p_aout
,
"timing screwed, stopping resampling"
);
inputResamplingStop
(
p_input
);
p_buffer
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
start_date
=
0
;
}
...
...
@@ -623,6 +623,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
if
(
p_input
->
i_resampling_type
!=
AOUT_RESAMPLING_NONE
)
msg_Warn
(
p_aout
,
"timing screwed, stopping resampling"
);
inputResamplingStop
(
p_input
);
p_buffer
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
start_date
=
0
;
}
else
if
(
start_date
!=
0
&&
...
...
@@ -720,6 +721,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
* is bad. We'd better stop the resampling right now. */
msg_Warn
(
p_aout
,
"timing screwed, stopping resampling"
);
inputResamplingStop
(
p_input
);
p_buffer
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
}
}
...
...
@@ -794,7 +796,6 @@ static void inputResamplingStop( aout_input_t *p_input )
(
p_input
->
pp_resamplers
[
0
]
==
p_input
->
p_playback_rate_filter
)
?
INPUT_RATE_DEFAULT
*
p_input
->
input
.
i_rate
/
p_input
->
i_last_input_rate
:
p_input
->
input
.
i_rate
;
p_input
->
pp_resamplers
[
0
]
->
b_continuity
=
false
;
}
}
...
...
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