Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
eff24974
Commit
eff24974
authored
Aug 22, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new audio-time-strech option to insert scaletempo by default.
parent
e740751b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
src/audio_output/input.c
src/audio_output/input.c
+13
-4
src/libvlc-module.c
src/libvlc-module.c
+10
-0
No files found.
src/audio_output/input.c
View file @
eff24974
...
@@ -70,7 +70,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
...
@@ -70,7 +70,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
audio_sample_format_t
chain_input_format
;
audio_sample_format_t
chain_input_format
;
audio_sample_format_t
chain_output_format
;
audio_sample_format_t
chain_output_format
;
vlc_value_t
val
,
text
;
vlc_value_t
val
,
text
;
char
*
psz_filters
,
*
psz_visual
;
char
*
psz_filters
,
*
psz_visual
,
*
psz_scaletempo
;
int
i_visual
;
int
i_visual
;
aout_FormatPrint
(
p_aout
,
"input"
,
&
p_input
->
input
);
aout_FormatPrint
(
p_aout
,
"input"
,
&
p_input
->
input
);
...
@@ -211,17 +211,25 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
...
@@ -211,17 +211,25 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
var_Create
(
p_aout
,
"audio-replay-gain-peak-protection"
,
var_Create
(
p_aout
,
"audio-replay-gain-peak-protection"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
}
}
if
(
var_Type
(
p_aout
,
"audio-time-stretch"
)
==
0
)
{
var_Create
(
p_aout
,
"audio-time-stretch"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
}
var_Get
(
p_aout
,
"audio-filter"
,
&
val
);
var_Get
(
p_aout
,
"audio-filter"
,
&
val
);
psz_filters
=
val
.
psz_string
;
psz_filters
=
val
.
psz_string
;
var_Get
(
p_aout
,
"audio-visual"
,
&
val
);
var_Get
(
p_aout
,
"audio-visual"
,
&
val
);
psz_visual
=
val
.
psz_string
;
psz_visual
=
val
.
psz_string
;
psz_scaletempo
=
var_GetBool
(
p_aout
,
"audio-time-stretch"
)
?
strdup
(
"scaletempo"
)
:
NULL
;
/* parse user filter lists */
/* parse user filter lists */
for
(
i_visual
=
0
;
i_visual
<
2
;
i_visual
++
)
for
(
i_visual
=
0
;
i_visual
<
2
;
i_visual
++
)
{
{
char
*
ppsz_array
[]
=
{
psz_scaletempo
,
psz_filters
,
psz_visual
};
char
*
psz_next
=
NULL
;
char
*
psz_next
=
NULL
;
char
*
psz_parser
=
i_visual
?
psz_visual
:
psz_filters
;
char
*
psz_parser
=
ppsz_array
[
i_visual
]
;
if
(
psz_parser
==
NULL
||
!*
psz_parser
)
if
(
psz_parser
==
NULL
||
!*
psz_parser
)
continue
;
continue
;
...
@@ -264,7 +272,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
...
@@ -264,7 +272,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
vlc_object_attach
(
p_filter
,
p_aout
);
vlc_object_attach
(
p_filter
,
p_aout
);
/* try to find the requested filter */
/* try to find the requested filter */
if
(
i_visual
==
1
)
/* this can only be a visualization module */
if
(
i_visual
==
2
)
/* this can only be a visualization module */
{
{
/* request format */
/* request format */
memcpy
(
&
p_filter
->
input
,
&
chain_output_format
,
memcpy
(
&
p_filter
->
input
,
&
chain_output_format
,
...
@@ -357,8 +365,9 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
...
@@ -357,8 +365,9 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
psz_parser
=
psz_next
;
psz_parser
=
psz_next
;
}
}
}
}
free
(
psz_filters
);
free
(
psz_visual
);
free
(
psz_visual
);
free
(
psz_filters
);
free
(
psz_scaletempo
);
/* complete the filter chain if necessary */
/* complete the filter chain if necessary */
if
(
!
AOUT_FMTS_IDENTICAL
(
&
chain_input_format
,
&
chain_output_format
)
)
if
(
!
AOUT_FMTS_IDENTICAL
(
&
chain_input_format
,
&
chain_output_format
)
)
...
...
src/libvlc-module.c
View file @
eff24974
...
@@ -313,6 +313,13 @@ static const char *const ppsz_force_dolby_descriptions[] = {
...
@@ -313,6 +313,13 @@ static const char *const ppsz_force_dolby_descriptions[] = {
#define AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT N_( \
#define AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT N_( \
"Protect against sound clipping" )
"Protect against sound clipping" )
#define AUDIO_TIME_STRETCH_TEXT N_( \
"Enable time streching audio" )
#define AUDIO_TIME_STRETCH_LONGTEXT N_( \
"This allows to play audio at lower or higher speed without" \
"affecting the audio pitch" )
static
const
char
*
const
ppsz_replay_gain_mode
[]
=
{
static
const
char
*
const
ppsz_replay_gain_mode
[]
=
{
"none"
,
"track"
,
"album"
};
"none"
,
"track"
,
"album"
};
static
const
char
*
const
ppsz_replay_gain_mode_text
[]
=
{
static
const
char
*
const
ppsz_replay_gain_mode_text
[]
=
{
...
@@ -1463,6 +1470,9 @@ vlc_module_begin();
...
@@ -1463,6 +1470,9 @@ vlc_module_begin();
add_bool
(
"audio-replay-gain-peak-protection"
,
true
,
NULL
,
add_bool
(
"audio-replay-gain-peak-protection"
,
true
,
NULL
,
AUDIO_REPLAY_GAIN_PEAK_PROTECTION_TEXT
,
AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT
,
true
);
AUDIO_REPLAY_GAIN_PEAK_PROTECTION_TEXT
,
AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT
,
true
);
add_bool
(
"audio-time-stretch"
,
true
,
NULL
,
AUDIO_TIME_STRETCH_TEXT
,
AUDIO_TIME_STRETCH_LONGTEXT
,
false
);
set_subcategory
(
SUBCAT_AUDIO_AOUT
);
set_subcategory
(
SUBCAT_AUDIO_AOUT
);
add_module
(
"aout"
,
"audio output"
,
NULL
,
NULL
,
AOUT_TEXT
,
AOUT_LONGTEXT
,
add_module
(
"aout"
,
"audio output"
,
NULL
,
NULL
,
AOUT_TEXT
,
AOUT_LONGTEXT
,
true
);
true
);
...
...
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