Marcus Weseloh
e8717e5b40
Remove explicit cast of FLUID_MALLOC return value
2018-04-04 11:11:41 +02:00
Marcus Weseloh
c7e579aa75
Remove redundant error messages
2018-04-04 11:11:41 +02:00
Marcus Weseloh
29296b0e20
Ensure that sample_data memory is unlocked even if sample_data_24 mlock fails
2018-04-04 11:11:41 +02:00
Marcus Weseloh
d5407742a6
Always release the mutex when exiting fluid_samplecache_load
...
And change fluid_samplecache_unload to use the same style.
2018-04-04 11:11:41 +02:00
Marcus Weseloh
8024907610
No need for fluid_sample_* functions in fluid_sfont to be public
2018-04-04 11:11:41 +02:00
Marcus Weseloh
4932b4af90
Refactor sample cache loader
...
- move sample reading to fluid_sffile
- refactor sample cache to use fluid_list and separate long functions into
smaller ones
- include sample start and count in cache key, in preparation for lazy loading
- make defsfont use new sample cache loader interface
2018-04-04 11:11:41 +02:00
Marcus Weseloh
5bc2d33bb9
Differences in sample chunk sizes are not an error but simply an indication of a changed file
2018-04-04 11:11:41 +02:00
Marcus Weseloh
870fc56d6a
Code cleanup and formatting in fluid_samplecache
2018-04-04 11:11:41 +02:00
Marcus Weseloh
a274a394e0
Clang-format fluid_samplecache
2018-04-04 11:11:41 +02:00
Marcus Weseloh
4ec1cfe73e
Move sample caching code to own file fluid_samplecache.c/h
2018-04-04 11:11:41 +02:00
Marcus Weseloh
76102f2009
Remove unnecessary fluid_sample_t::valid flag
2018-04-04 11:11:41 +02:00
Marcus Weseloh
963a5e98b4
Move sample and loop validation to fluid_sfont
...
Makes it possible to use the same validation logic for both SF2 and SF3
samples.
2018-04-04 11:11:41 +02:00
Marcus Weseloh
987d8a5f17
Move vorbis decompression to fluid_sfont
2018-04-04 11:11:41 +02:00
Marcus Weseloh
0a664e0797
Remove unnecessary conversion of sample pointers to offsets
...
SFSample should provide the sample pointers as specified in the Soundfont
file. If any mangling of the pointers is required, it should happen in the
defsfont loader.
2018-04-04 11:11:34 +02:00
Marcus Weseloh
9341059b24
Remove underscore functions for log messages
...
They were only used in soundfont loading code, so are probably a remnant
from Smurf. The rest of the FluidSynth code doesn't use underscore
functions, so remove them here as well for consistency.
Also use single quotes in double quoted string, to remove the need for
escaping chars.
2018-04-04 11:08:45 +02:00
Marcus Weseloh
1bc69be41b
Rename fluid_sf2_* functions to fluid_sffile_*
2018-04-04 11:08:45 +02:00
Marcus Weseloh
b6bdb6b059
Cleanup delete_* functions
2018-04-04 11:08:45 +02:00
Marcus Weseloh
7f09321714
Make size macro names easier to read
2018-04-04 11:08:45 +02:00
Marcus Weseloh
10b87e9d54
Rename fluid_sf2 to fluid_sffile
2018-04-04 11:08:45 +02:00
Marcus Weseloh
5dc64d1544
Cleanup function signatures, passing SFData to every function
...
Makes the whole file easier to read and gives the implementation a little
more "object-oriented" feel.
2018-04-04 11:08:38 +02:00
Marcus Weseloh
74e2a4b933
More expressive variable names in load_phdr
2018-04-04 11:08:38 +02:00
Marcus Weseloh
9c31e96c60
Store file_callbacks in SFData structure
2018-04-04 11:08:38 +02:00
Marcus Weseloh
181b9727e8
Cleanup error handling in fluid_sf2_load
2018-04-04 11:08:38 +02:00
Marcus Weseloh
fb374814c3
Move public functions to top of file and document them properly
2018-04-04 11:08:38 +02:00
Marcus Weseloh
78be6f7fe1
Use FLUID_FREE instead of free
2018-04-04 11:08:38 +02:00
Marcus Weseloh
500931bd33
Separate typedefs and struct definitons
2018-04-04 11:08:38 +02:00
Marcus Weseloh
e7109a91aa
Rename public and static methods to naming conventions
...
# Conflicts:
# src/sfloader/fluid_sf2.h
2018-04-04 11:08:38 +02:00
Marcus Weseloh
6fc816c3cb
Clarify some function names and comments
...
# Conflicts:
# src/sfloader/fluid_sf2.c
2018-04-04 11:08:38 +02:00
Marcus Weseloh
af3e6bba01
Cleanup return values
2018-04-04 11:08:34 +02:00
Marcus Weseloh
f83c49d6fa
Remove sfont_zone_delete, replace with direct invocations instead
2018-04-04 11:08:25 +02:00
Marcus Weseloh
4dbc31215f
Make all private functions static
2018-04-04 11:08:25 +02:00
Marcus Weseloh
d538d7f52c
Cleanup error handling, remove gerr function
2018-04-04 11:08:25 +02:00
Marcus Weseloh
79c3bebaea
Source formatting (clang-format)
2018-04-04 11:08:25 +02:00
Marcus Weseloh
333e8a1295
Move private defines from fluid_sf2.h to fluid_sf2.c
2018-04-04 11:08:25 +02:00
Marcus Weseloh
5c58c304b9
Move declarations to top of file
2018-04-04 11:08:25 +02:00
Marcus Weseloh
12902f7454
Remove unused defines and declarations
2018-04-04 11:08:25 +02:00
Marcus Weseloh
167048f5a3
Remove reference to defsfont from low-level function
2018-04-04 11:08:18 +02:00
Marcus Weseloh
879a14163a
Move low-level soundfont loading functions to separate files
2018-04-04 11:03:47 +02:00
Javier Nonis
30e894fbe4
Fix for LADSPA chorus send port.
2018-04-01 19:39:46 -03:00
Tom M
9196636177
Merge pull request #359 from FluidSynth/carlo-bramini-patch-1
...
No need to use printf, puts is enough
2018-04-01 21:16:36 +02:00
carlo-bramini
8c36d46aa2
No need to use printf, puts is enough
2018-04-01 14:31:50 +02:00
jjceresa
124a5b71bc
fix buffer overrun during channel disabled check ( #358 )
2018-03-30 20:03:15 +02:00
Marcus Weseloh
5001945979
Merge pull request #354 from FluidSynth/fix-sample-fixup
...
Fix sample check and SF3 soundfont loading
2018-03-25 19:25:54 +02:00
Tom M
d76a23c28d
Merge pull request #355 from carlo-bramini/master
...
Build fixes and header cleanups.
2018-03-25 19:09:52 +02:00
carlo-bramini
3825d666d8
Build only if DSOUND_SUPPORT is defined
2018-03-25 13:46:30 +02:00
carlo-bramini
1fcf81fbc4
Remove redundant includes
...
These files are already included by "fluid_synth.h"
2018-03-25 13:44:37 +02:00
carlo-bramini
e1038e253e
Remove redundant includes.
...
"fluid_synth.h" is already included by "fluid_lash.h".
"fluidsynth_priv.h" already includes all these files, with the conditional inclusion.
2018-03-25 13:40:57 +02:00
carlo-bramini
dfc95bffff
Add conditional inclusion for signal.h
...
HAVE_SIGNAL_H macro is already handled by CMAKE, but signal.h is not included here (it's required for LASH).
2018-03-25 13:31:35 +02:00
Marcus Weseloh
adff5e98d8
Use goto to move to next sample
2018-03-25 13:27:14 +02:00
Marcus Weseloh
13fb940262
Avoid uninitialized use of max_end
2018-03-25 13:24:24 +02:00