derselbst
b7cf79bc15
vectorize mixdown loop of fluid_mixer_buffers_mix()
2018-04-27 17:49:22 +02:00
derselbst
58008aae18
convert rvoice_mixer mixdown buffer to 1D arrays
2018-04-27 17:34:29 +02:00
derselbst
ed312b7acc
refactor fluid_rvoice_mixer_process_fx()
2018-04-26 22:01:50 +02:00
derselbst
89015494cb
vectorize mixing loop of fluid_rvoice_buffers_mix()
2018-04-26 22:01:49 +02:00
derselbst
f332f32a7c
remove optimization for centered stereo samples
...
in favour of vectorized mixing loop. Was incredibly unlikely to happen anyway.
2018-04-26 16:47:06 +02:00
derselbst
ba9da3b790
enable FLUID_ASSERT macro
2018-04-26 16:38:12 +02:00
derselbst
7ebdabae0c
allocate mono voice mix buffer on the heap
2018-04-26 16:25:26 +02:00
derselbst
e229f62020
cmake: detect openMP
2018-04-26 16:25:18 +02:00
derselbst
cdbd508007
add fluid_align_ptr() for aligning pointers
2018-04-26 16:07:19 +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
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
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
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
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
derselbst
ff19788fda
avoid memory leak in new_fluid_voice()
2018-04-11 19:33:40 +02:00
derselbst
78de299da4
make param array of fluid_rvoice_function_t const
2018-04-11 19:22:55 +02:00
derselbst
cb35fac1c6
make VintageDreams sf2 an explicit requirement for unit tests
2018-04-11 11:03:12 +02:00
derselbst
b76aeead01
remove obsolete alloc preset comments
2018-04-11 10:05:24 +02:00
derselbst
0af950a1e2
avoid swapping rvoices when can_access_rvoice is false
2018-04-11 09:56:42 +02:00
derselbst
036595f7db
avoid duplicate call of fluid_rvoice_set_output_rate()
2018-04-11 09:56:03 +02:00
Marcus Weseloh
839f62f89d
Remove unused variable
2018-04-10 22:09:33 +02:00
derselbst
0ccb0460fb
update rvoice function related docs
2018-04-09 16:57:34 +02:00
derselbst
5034e0ca8b
rename fluid_rvoice_eventhandler_push*()
2018-04-09 16:40:25 +02:00
derselbst
b4456d1b4c
rename EVENT_PARAMS to MAX_EVENT_PARAMS
2018-04-09 16:32:32 +02:00
Marcus Weseloh
efa97718fa
Increase soundfont references only when assigning preset to channel
...
Previously, the refcount was increased when retrieving a preset from
a soundfont. That doesn't really make sense anymore.
2018-04-08 23:03:14 +02:00
Marcus Weseloh
5a8880560d
Remove now invalid comments about having to free presets
2018-04-08 23:03:14 +02:00
Marcus Weseloh
1a1bf7d0ea
Remove now obsolete preset stack code and struct members
2018-04-08 23:03:14 +02:00
Marcus Weseloh
66610abcb9
Refactor fluid_preset_t handling in defsfont and ramsfont
...
Removes the need for a pre-allocated stack of fluid_preset_t's. Upon
adding a loader specific preset, a fluid_preset_t is automatically
created. defsfont and ramsfont now keep track of the fluid_preset_t's,
not the loader specific ones.
Also changes the sfont::iteration_next signature to directly return
the next preset. This is possible as presets are now only created once
and returned as a pointer.
2018-04-08 22:59:55 +02:00
derselbst
0bfa332fd9
remove redundant call to fluid_synth_set_sample_rate()
...
on synth creation
2018-04-08 18:49:18 +02:00
derselbst
ddd14cb00b
duplicate rvoice_eventhandler in fluid_voice_t
...
avoiding several indirection to access it
2018-04-08 18:35:54 +02:00