Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ff9a492d
Commit
ff9a492d
authored
Mar 13, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FluidSynth: support for custom sample rate
parent
3ead74ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
configure.ac
configure.ac
+1
-1
modules/codec/fluidsynth.c
modules/codec/fluidsynth.c
+7
-1
No files found.
configure.ac
View file @
ff9a492d
...
...
@@ -2882,7 +2882,7 @@ fi
dnl
dnl libfluidsynth (MIDI synthetizer) plugin
dnl
PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.
0
], [MIDI synthetiser with libfluidsynth], [auto])
PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.
2
], [MIDI synthetiser with libfluidsynth], [auto])
dnl
dnl Teletext Modules
...
...
modules/codec/fluidsynth.c
View file @
ff9a492d
...
...
@@ -51,6 +51,7 @@
#define GAIN_LONGTEXT N_("This gain is applied to synthesis output. " \
"High values may cause saturation when many notes are played at a time." )
#define SAMPLE_RATE_TEXT N_("Sample rate")
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
...
...
@@ -66,6 +67,9 @@ vlc_module_begin ()
SOUNDFONT_TEXT
,
SOUNDFONT_LONGTEXT
,
false
)
add_float
(
"synth-gain"
,
0
.
8
,
GAIN_TEXT
,
GAIN_LONGTEXT
,
false
)
change_float_range
(
0
.,
10
.)
add_integer
(
"synth-sample-rate"
,
44100
,
SAMPLE_RATE_TEXT
,
SAMPLE_RATE_TEXT
,
true
)
change_integer_range
(
22050
,
96000
)
vlc_module_end
()
...
...
@@ -146,7 +150,9 @@ static int Open (vlc_object_t *p_this)
var_InheritFloat
(
p_this
,
"synth-gain"
));
p_dec
->
fmt_out
.
i_cat
=
AUDIO_ES
;
p_dec
->
fmt_out
.
audio
.
i_rate
=
44100
;
p_dec
->
fmt_out
.
audio
.
i_rate
=
var_InheritInteger
(
p_this
,
"synth-sample-rate"
);;
fluid_synth_set_sample_rate
(
p_sys
->
synth
,
p_dec
->
fmt_out
.
audio
.
i_rate
);
p_dec
->
fmt_out
.
audio
.
i_channels
=
2
;
p_dec
->
fmt_out
.
audio
.
i_original_channels
=
p_dec
->
fmt_out
.
audio
.
i_physical_channels
=
...
...
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