Commit Graph

2165 Commits

Author SHA1 Message Date
jjceresa 0f807e63a1 Fix typos in comments 2020-09-16 12:05:50 +02:00
jjceresa ccad46936d fix missing check of result1 2020-09-16 03:36:00 +02:00
jjceresa b2cc3a6341 split set mapping API. This leads to 3 API:
- fluid_synth_mixer_set_chan_to_out_mapping().
- fluid_synth_mixer_set_chan_to_fx_mapping().
- fluid_synth_mixer_set_fx_to_out_mapping().
2020-09-16 02:59:56 +02:00
jjceresa ce472b340c fix typo in command name 2020-09-16 00:05:18 +02:00
jjceresa 10f04c0a6a add fxmap shell command 2020-09-15 19:49:18 +02:00
jjceresa efbddb8d3d Separate getter function. This leads to the API
- fluid_synth_mixer_get_channel_mapping().
- fluid_synth_mixer_get_fx_mapping().
2020-09-15 19:17:03 +02:00
jjceresa 4162bbe516 polish MIDI channel buffers mapping in fluid_voice_init() 2020-09-13 13:52:00 +02:00
jjceresa 226a6de812 consolidate parameters checking
- out_from_chan must be in range [-1..synth->audio_groups[
- fx_from_chan must be in range [-1..synth-effects_groups[
2020-09-13 12:03:37 +02:00
jjceresa 7728ed6102 add comment in fluid_synth_mixer_reset_mapping() 2020-09-13 11:53:56 +02:00
jjceresa dd5b2bc414 return status from fluid_rvoice_eventhandler_push() 2020-09-13 11:43:17 +02:00
jjceresa fc8f48f1c1 fix typos in comments 2020-09-08 21:53:12 +02:00
jjceresa 8546f337f4 declare const fluid_rvoice_mixer_t *mixer 2020-09-08 18:16:21 +02:00
jjceresa 6e6e2fe74b remove useless parentheses 2020-09-08 18:13:18 +02:00
jjceresa 309b0385ae arrange commands strings 2020-09-08 16:48:47 +02:00
jjceresa 7ef467e970 fix correct indentation 2020-09-08 16:20:21 +02:00
jjceresa 54191f44d3 simplify fluid_synth_mixer_set_mapping() 2020-09-08 16:13:38 +02:00
jjceresa 373644908c simplify fluid_synth_mixer_get_mapping() 2020-09-08 15:49:51 +02:00
jjceresa 77abe1a9f5 Consolidate fluid_rvoice_mixer_get_fx_out_mapping()
- check parameter fxunit_idx.
2020-09-08 15:31:33 +02:00
jjceresa 2d7ea7a65b consolidate fluid_rvoice_mixer_set_fx_out_mapping()
- Check parameter fxunit_idx and out_from_fx
- return FLUID_OK or FLUID_FAILED
2020-09-08 15:20:34 +02:00
jjceresa 27a398851e Add function API to set default mapping
- Add fluid_synth_mixer_reset_mapping() in fluid_synth.c.
- Add command resetchanmap in fluid_cmd.c.
2020-09-08 14:48:11 +02:00
jjceresa f62419a367 Add command setchanfxmapout in fluid_cmd.c
- fix a bug in fluid_setchanmap().
- in fluid_synth_mixer_set_mapping check out_from_fx  in range
  [0..synth->audio_group[.
2020-09-08 07:25:08 +02:00
jjceresa 94ad3d6750 Add command setchanmapfx 2020-09-08 05:35:02 +02:00
jjceresa 0fa451f46b Add function API fluid_synth_mixer_set_mapping()
- Add fluid_synth_mixer_set_mapping() in fluid_synth.c.
- Add setter function fluid_rvoice_mixer_set_fx_out_mapping() in
  fluid_rvoice_mixer.c.
- Add command sechanmapout in fluid_cmd.c.
2020-09-08 05:15:54 +02:00
jjceresa ac62a8a41c Add function API fluid_synth_mixer_get_mapping()
- Add fluid_synth_mixer_get_mapping() in fluid_synth.c.
- Add getter function fluid_rvoice_mixer_get_fx_out_mapping() in
  fluid_rvoice_mixer.c.
- Add command chanmap in fluid_cmd.c.
2020-09-08 02:05:41 +02:00
jjceresa 7fca968b6b Add fx unit output mapping to audio dry output 2020-09-08 00:09:04 +02:00
jjceresa 13c486231b Add MIDI channel mapping to fx unit input 2020-09-07 23:29:26 +02:00
jjceresa 0b0e5dd2a1 Add MIDI channel mapping to audio dry output 2020-09-07 23:04:06 +02:00
Tom M 565002f34f
Add SonarQube static code analysis (#671) 2020-09-06 23:43:18 +02:00
derselbst 23b270c08b Merge branch '2.1.x' into master 2020-09-06 14:54:26 +02:00
derselbst ff7c72c80f Bump to 2.1.5 2020-09-06 11:52:39 +02:00
jjceresa f94cee0a50
Add multi channels support for audio driver. (#667)
This PR addresses #665.

1) Add new functions for multi channels support: `fluid_synth_write_float_channels()`, `fluid_synth_write_s16_channels()`
2) `dsound` and `waveout` driver make use of this support. tested on 2 audio devices: 
    - creative SB Live! (6 channels).
    - Realtek: ALC889A (8 channels).
2020-09-02 21:31:50 +02:00
jjceresa 57af8803f2
Mapping of fx unit output to dry buffers in mix mode. (#668)
Currently, all fx unit output (in mix mode) are mapped to the `first buffer`.
This is not appropriate for synth.audio-groups > 1

This PR allows the mapping of fx output based on `fx unit index` and `synth.audio-groups` value.
This allows us to get the `fx output `mixed to the respective  `buffer` on which a `MIDI channel` is mapped.
For example: with `synth.audio-groups = 3` and  `synth.effect-groups = 3`:
- MIDI chan 0 (dry + fx0) is mapped to buf 0
- MIDI chan 1 (dry + fx1) is mapped to buf 1
- MIDI chan 2 (dry + fx2) is mapped to buf 2
2020-09-02 21:10:31 +02:00
jjceresa 7834c4eb62 Add a chart about voice mixing and rendering 2020-09-02 20:54:05 +02:00
Tom M aea6644324
Use a runtime check to detect version of libinstpatch (#666)
It could be that during runtime an older version of libinstpatch is used than the one fluidsynth was compiled against. In this case, libinstpatch will fail to load DLS fonts, because libinstpatch's initialization semantics don't match those compiled into fluidsynth.
2020-08-31 20:35:21 +02:00
jjceresa c76949e6d3
Limiting audio-channels to audio-groups (#663) 2020-08-22 13:24:41 +02:00
derselbst 0acfd81e28 Merge branch '2.1.x' into master 2020-08-17 18:24:45 +02:00
derselbst fa6f9c3570 Remove unused member variable 2020-08-17 18:23:43 +02:00
Tom M 43078d6b7b
TravisCI: add a build for GCC 4.8 (#662) 2020-08-17 18:19:15 +02:00
Fabrice Fontaine 0cccf83a38 CMakeLists.txt: fix build with gcc 4.8 (#661)
-Werror=incompatible-pointer-types is unconditionally used since version
2.1.4 and 137a14e106. This will raise a
build failure when checking for threads on gcc 4.8:

/home/buildroot/autobuild/run/instance-3/output-1/host/bin/arm-none-linux-gnueabi-gcc --sysroot=/home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-gnueabi/sysroot -DTESTKEYWORD=inline  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Wbad-function-cast -Wcast-align   -DNDEBUG -fPIE   -o CMakeFiles/cmTC_98946.dir/CheckIncludeFile.c.o   -c /home/buildroot/autobuild/run/instance-3/output-1/build/fluidsynth-2.1.4/CMakeFiles/CMakeTmp/CheckIncludeFile.c
cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types

Fixes:
 - http://autobuild.buildroot.org/results/13cbba871db56ef8657a3d13c6ac8e1b4da0d244

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-08-17 18:01:39 +02:00
derselbst 4b83ee55c0 Merge branch '2.1.x' into master 2020-08-10 20:35:42 +02:00
jjceresa 3ee2bbed96 fix NULL permitted for out and fx pointer buffer
Closes #659
2020-08-10 20:33:42 +02:00
Tom M 31c4e12ac9
Update Travis CI (#658)
* update to Ubuntu Focal
* use clang10
* avoid unintentional fallbacks to  default `/usr/bin/c++` compiler
* fix related compiler warnings
2020-07-28 21:05:01 +02:00
derselbst 3c94f6366d Merge branch '2.1.x' into master 2020-07-12 13:03:59 +02:00
derselbst 277eda6bc6 Update Android Asset loader to new callback API 2020-07-12 13:03:30 +02:00
derselbst 2393aef3bd Fix printf format warnings 2020-07-12 12:55:32 +02:00
derselbst 62b715483f Merge branch '2.1.x' into master 2020-07-09 19:39:21 +02:00
derselbst d7abe8bdfd Fix a possible race condition during midi autoconnect 2020-07-09 19:30:32 +02:00
derselbst eac0de0345 Fix a NULL deref in jack driver 2020-07-09 19:10:11 +02:00
derselbst 85f94c61c9 Fix passing arguments from incompatible pointer type 2020-07-08 19:20:13 +02:00
derselbst 137a14e106 Turn incompatible-pointer-types warning into error 2020-07-08 19:10:53 +02:00