derselbst
8c2ef30038
fix uninitialized member access
...
of voice_zone->range.ignore; introduced in #370
2018-05-09 11:39:21 +02:00
derselbst
34912586f0
add a unit test for manually unregistering via fluid_event_unregistering()
...
currently results in a double free
2018-05-08 22:19:59 +02:00
jjceresa
3dcb7d3b92
remove redundant function declarations ( #379 )
...
Remove fluid_channel_get_interp_method(), fluid_channel_set_interp_method(), fluid_channel_get_preset() and fluid_channel_get_num() as they are already defined as macros.
2018-05-05 21:08:59 +02:00
derselbst
d47de30f16
fix tautological comparision
...
on platforms where `char` is implemented as `unsigned char`, addresses #378
2018-05-05 20:55:26 +02:00
Tom M
bad3102251
Fix Travis CI ( #376 )
...
* fix build on macOSx with gcc7
* use gold linker for debug build
* add gcc8 build
2018-05-05 17:48:27 +02:00
jjceresa
2bff09b420
fluid_rvoice_check_sample_sanity cleanup ( #375 )
...
Check already done by the caller.
2018-05-05 16:40:55 +02:00
Tom M
05c2d57e65
Merge pull request #372 from FluidSynth/rvoice-refactor3
...
rvoice_mixer refactorings + cleanups
2018-05-02 20:51:53 +02:00
derselbst
c64d2b44be
silence uninitialized warning
2018-04-30 10:16:01 +02:00
derselbst
edd52edac2
consistently use signed int for sfont_id, bank_num and preset_num
2018-04-30 10:09:48 +02:00
derselbst
3e3bef87ec
report errors in fluid_handle_set()
2018-04-29 16:11:30 +02:00
derselbst
4add88db7c
document dynamic sample loading in API docs
2018-04-27 21:39:28 +02:00
derselbst
1a5ea8d8e5
fix signedness warning
2018-04-27 21:32:00 +02:00
Marcus Weseloh
9ad07430ea
Merge pull request #370 from FluidSynth/unique-sfont-insts
...
Only import Soundfont instruments once
2018-04-25 22:58:01 +02:00
derselbst
354bea9cfc
fix build if ENABLE_MIXER_THREADS == 0
2018-04-25 21:08:48 +02:00
derselbst
2ad96d020e
avoid leaking rvoice_mixer threads
...
introduced in 7ae9099293
2018-04-25 21:05:02 +02:00
derselbst
384f05e77c
disable padding warnings
2018-04-25 17:28:37 +02:00
derselbst
f8e4890a63
refactor data types of fluid_channel_t members
...
Use char if possible + reorder fields to avoid padding. Overall saved 408 bytes per fluid_channel_t instance
2018-04-25 17:21:38 +02:00
derselbst
f34567fb61
reorder fields of struct _fluid_voice_t
...
to minimize padding
2018-04-25 16:21:37 +02:00
derselbst
f867e3b15a
fix rvoice_buffers initialization loop
2018-04-25 15:59:00 +02:00
derselbst
8aa073b4a4
remove redundant fluid_rvoice_mixer_t::remove_voice_callback
...
call rvoice_eventhandler directly to handle finished voices
2018-04-25 15:59:00 +02:00
derselbst
5d28ecc5cc
remove redundant fluid_rvoice_mixer_t::buf_blocks
...
as it's always equal to FLUID_MIXER_MAX_BUFFERS_DEFAULT
2018-04-25 15:59:00 +02:00
derselbst
0b64c8d887
remove fluid_rvoice_dsp_t::is_looping flag
...
and pass it to interpolate functions directly and reorder flags
2018-04-25 15:58:59 +02:00
derselbst
b95266cf6c
remove fluid_rvoice_dsp_t::dsp_buf
...
pass dsp_buf to interpolation functions directly
2018-04-25 15:58:59 +02:00
derselbst
9178eebf39
add FLUID_RESTRICT
...
for restrict pointers
2018-04-25 15:58:59 +02:00
derselbst
f2cf1f82c7
move fluid_rvoice_buffers_mix() to rvoice_mixer
2018-04-25 14:57:40 +02:00
derselbst
907ec27a9e
optimize away memset/mix if voice is quiet
2018-04-25 14:56:20 +02:00
derselbst
291075c31f
fix build for gcc
2018-04-25 12:33:47 +02:00
derselbst
044c5e3238
fuse preset iteration tests to preset+sample loading tests
2018-04-24 21:32:49 +02:00
Marcus Weseloh
df3bab0b40
Only import instruments once from Soundfont
...
This changes the way instruments and their related information is imported
from a Soundfont. Previously, each preset zone got a complete copy of the
instrument and related information, wasting a lot of precious memory.
After this change, an instrument and related information is only
imported once and then linked into all preset zones that use this
instrument.
2018-04-22 19:09:23 +02:00
Marcus Weseloh
c4003bef39
Store mutable information about inst zones in new fluid_voice_zone_t struct
...
This change separates the static instrument zone information read from
the Soundfont from the information that gets modified on import and
later via the legato handling. It opens opens up the possibility of
having unique instruments that only get imported once and then linked
into the individual preset zones.
2018-04-22 19:08:09 +02:00
Marcus Weseloh
a95a4864fd
Merge pull request #366 from FluidSynth/dynamic-sample-loading
...
Dynamic sample loading
2018-04-22 19:06:53 +02:00
Marcus Weseloh
3603a34a77
Also load 46 zero words area after sample for uncompressed samples
2018-04-22 12:20:37 +02:00
Marcus Weseloh
3ce3575269
Ensure that loops are sanitized and sample is optimized for dynamically loaded samples
2018-04-22 10:37:14 +02:00
Marcus Weseloh
4cfdacd905
Fix typo in dynamic-sample-loading settings documentation
2018-04-21 23:38:12 +02:00
Marcus Weseloh
7240461e5b
Merge branch 'master' into dynamic-sample-loading
2018-04-21 23:34:20 +02:00
Marcus Weseloh
9dcb4148cb
Only open the Soundfont for sample reading if necessary
2018-04-21 23:22:45 +02:00
derselbst
c433fc887c
simplify dependency handling of unit tests
2018-04-21 23:22:45 +02:00
derselbst
02de830043
fix dangling pointer on inst_zone sample lookup
...
fixes #369
2018-04-21 23:17:19 +02:00
derselbst
323b9b8cbf
avoid assigning incompatible pointers
2018-04-21 22:31:18 +02:00
derselbst
17dded3700
avoid NULL deref in fluid_rampreset_preset_delete()
2018-04-21 16:55:08 +02:00
derselbst
71592ec679
fix memory leaks during sfont loading
2018-04-21 16:48:56 +02:00
derselbst
08147cc3d6
avoid double free in fluid_sample_set_sound_data()
2018-04-21 16:33:27 +02:00
derselbst
a051d57ab3
avoid preprocessor stringification to expand to special '%' character
...
in fprintf() call
2018-04-21 10:37:04 +02:00
Marcus Weseloh
7987446fdf
Fix tests without libsndfile. Not pretty, welcome a better solution!
2018-04-18 09:14:55 +02:00
Marcus Weseloh
073da2141c
Implement dynamic sample loading
...
This change adds a new feature that enables loading and unloading of
sample data on demand. As soon as a preset is selected for a channel, all
of it's samples are loaded into memory. When a preset is unselected, all
of it's samples are unloaded from memory (unless they are being used by
another selected preset).
This feature is disabled by default and can be switched on with the
"synth.dynamic-sample-loading" setting.
2018-04-18 09:14:55 +02:00
Marcus Weseloh
a985c68a13
Enable decompressed Ogg Vorbis samples to be stored in sample cache
...
This change moves the Ogg Vorbis decompression to fluid_sffile, so that
this is the only place where we have to deal with compressed audio.
It also changes the way the samples are loaded for SF3 files: previously,
the compressed data was copied into memory, then the individual samples
were decompressed (resulting in both compressed and decompressed data to
stay in memory). Also, decompressed data wasn't cached, so previous loads
of the same file ran the decompressed again for each sample.
After this change, the vorbis decompression is changed so that it reads the
compressed data directly from the Soundfont file. And the resulting WAV
data is stored in the sample cache.
2018-04-18 09:14:55 +02:00
Marcus Weseloh
f52bbf53a4
Add VintageDreamsWaves-v2 in SF3 format and some tests for sf3 loading
2018-04-18 09:14:55 +02:00
Marcus Weseloh
3d05360f33
Split preset parsing from Soundfont file open
2018-04-18 09:14:55 +02:00
derselbst
8051b43c02
fix result checking for fwrite()
...
Potentially fixes infinite loop in file renderer, when fwrite() returns zero. Addressing #367 .
2018-04-17 16:43:52 +02:00
Tom M
d3e6781abd
Merge pull request #364 from FluidSynth/197
...
Unify calling conventions for rvoice update functions
2018-04-11 19:42:19 +02:00