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
d6d9ee33
Commit
d6d9ee33
authored
Nov 24, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FluidSynth: look for sound font in /usr/share/sounds/sf2/ by default
parent
bfa53574
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
modules/codec/fluidsynth.c
modules/codec/fluidsynth.c
+28
-1
No files found.
modules/codec/fluidsynth.c
View file @
d6d9ee33
...
@@ -31,6 +31,13 @@
...
@@ -31,6 +31,13 @@
#include <vlc_dialog.h>
#include <vlc_dialog.h>
#include <vlc_charset.h>
#include <vlc_charset.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef _POSIX_VERSION
# include <glob.h>
#endif
/* On Win32, we link statically */
/* On Win32, we link statically */
#ifdef WIN32
#ifdef WIN32
# define FLUIDSYNTH_NOT_A_DLL
# define FLUIDSYNTH_NOT_A_DLL
...
@@ -46,7 +53,7 @@
...
@@ -46,7 +53,7 @@
# define fluid_synth_channel_pressure(synth, channel, p) (FLUID_FAILED)
# define fluid_synth_channel_pressure(synth, channel, p) (FLUID_FAILED)
#endif
#endif
#define SOUNDFONT_TEXT N_("Sound fonts
(required)
")
#define SOUNDFONT_TEXT N_("Sound fonts")
#define SOUNDFONT_LONGTEXT N_( \
#define SOUNDFONT_LONGTEXT N_( \
"A sound fonts file is required for software synthesis." )
"A sound fonts file is required for software synthesis." )
...
@@ -104,6 +111,26 @@ static int Open (vlc_object_t *p_this)
...
@@ -104,6 +111,26 @@ static int Open (vlc_object_t *p_this)
msg_Err
(
p_this
,
"cannot load sound fonts file %s"
,
font_path
);
msg_Err
(
p_this
,
"cannot load sound fonts file %s"
,
font_path
);
free
(
font_path
);
free
(
font_path
);
}
}
#ifdef _POSIX_VERSION
else
{
glob_t
gl
;
if
(
!
glob
(
"/usr/share/sounds/sf2/*.sf2"
,
GLOB_NOESCAPE
,
NULL
,
&
gl
))
{
for
(
size_t
i
=
0
;
i
<
gl
.
gl_pathc
;
i
++
)
{
const
char
*
path
=
gl
.
gl_pathv
[
i
];
p_sys
->
soundfont
=
fluid_synth_sfload
(
p_sys
->
synth
,
path
,
1
);
if
(
p_sys
->
soundfont
!=
-
1
)
break
;
/* it worked! */
msg_Err
(
p_this
,
"cannot load sound fonts file %s"
,
path
);
}
globfree
(
&
gl
);
}
}
#endif
if
(
p_sys
->
soundfont
==
-
1
)
if
(
p_sys
->
soundfont
==
-
1
)
{
{
...
...
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