Commit graph

1814 commits

Author SHA1 Message Date
carlo-bramini
26325edb22
Optimize device search
Search of the MIDI device can be done before allocating the struct for the driver.
2018-11-25 21:13:25 +01:00
carlo-bramini
fa924516f0
Max length of device name is MAXPNAMELEN 2018-11-25 21:10:16 +01:00
carlo-bramini
9aeac6ca6e
Unprepare MIDI buffers
This was missing.
2018-11-25 20:14:18 +01:00
carlo-bramini
c57d7fffe8
move fluid_winmidi_callback()
Function fluid_winmidi_callback() has been moved on top of the source and made static.
2018-11-25 20:06:56 +01:00
carlo-bramini
cfa8019a53
Remove old fluid_winmidi_input_error() 2018-11-25 20:05:40 +01:00
carlo-bramini
cea2645530
Makes fluid_winmidi_input_error() thread-safe
The changes are:
1) made the function static
2) implemented UNICODE support
3) made thread-safe
4) delete unused static buffer
2018-11-25 20:03:12 +01:00
carlo-bramini
dea91e7932
Merge pull request #1 from FluidSynth/master
Sync to master
2018-11-25 19:55:57 +01:00
carlo-bramini
b8b41f781f Improve chunk id search (#471)
If we move UNKN_ID to the bottom of the enum, in the for() cycle inside chunkid() if the value is not found then the "i" variable will be already UNKN_ID.
2018-11-25 10:02:33 +01:00
jjceresa
36da011191 Avoid redundant dsp parameter updates upon modulation. (#461) 2018-11-25 08:21:51 +01:00
carlo-bramini
98e4046096 Fix handle leak in winmidi driver (#469) 2018-11-23 19:49:20 +01:00
jjceresa
6e9d84f02a Forbid DATA_ENTRY_LSB to modulate (#465)
and document illegal CC modulation
2018-11-18 15:43:03 +01:00
derselbst
f52e4fdf39 update documentation for enable-threads 2018-11-18 09:45:28 +01:00
derselbst
eb22cfbdbb bump to version 2.0.2 2018-11-18 09:39:09 +01:00
derselbst
c8d1ec3841 Merge branch 'recent-docs' into master 2018-11-18 09:12:22 +01:00
carlo-bramini
fe92a0a655 Introduce enable-threads option to cmake (#463) 2018-11-18 08:55:52 +01:00
carlo-bramini
29c668683f Improve float calculations (#462)
I tried to check the generated ASM code when WITH_FLOAT macro is defined and when it is undefined. In both cases I noticed that there are some points where the math number are converted from float to double and viceversa. Actually this happens whether the FPU is present or not, perhaps for granting the right precision in digits. I also noticed few points that could be simplified a bit by using integer math, so I also included them.

 * Since fluid_voice_get_actual_key() returns an integer value, the value 60 could be subtracted directly as integer, the code generated looks a bit better.
 * FLUID_NOISE_FLOOR needs to be cast to fluid_real_t to generate a bit more efficient code.
 * DC_OFFSET needs a cast to fluid_real_t to generate a bit more efficient code.
 * "last_fres" and "output_rate" are already fluid_real_t, so they do not need type cast.
 * "chan_add", "par1_add" and "par2_add" are integer types, so they can be added without FPU. "chan_mul", "par1_mul" and "par2_mul" are already fluid_real_t, so they do not need type cast. Instead, the constant 0.5 needs cast to fluid_real_t to be more efficient.
2018-11-16 16:52:34 +01:00
carlo-bramini
bd41795263 Remove redundant dependency to readline in fluid_cmd.c
Libreadline is already used into fluid_istream_readline().
In my opinion, there is no need to have this duplicated code, so I would suggest to move the call to add_history() into fluid_sys.h

Closes #460.
2018-11-10 08:25:55 +01:00
carlo-bramini
0bf5c28275 "ready" is unused if ENABLE_MIXER_THREADS=0 2018-11-10 08:09:08 +01:00
Tom M
06bcf8db9f
Fix an incorrectly aligned result when converting between pointer types (#457)
fix alignment issue of idlist
2018-11-10 08:07:30 +01:00
Tom M
edc59ee3b5
Merge pull request #458 from FluidSynth/clang-tidying
Fix clang-tidy warnings
2018-11-10 08:01:10 +01:00
Tom M
417dc59ffd
Merge pull request #459 from carlo-bramini/minor-math-fix
Minor math fixes
2018-11-06 18:06:44 +01:00
carlo-bramini
d20f6cff66
Use integer math. 2018-11-03 21:07:37 +01:00
carlo-bramini
afbd818f8a
Use M_LN10 macro instead of log(10.) 2018-11-03 17:07:20 +01:00
carlo-bramini
578f3ccbbe
Merge pull request #4 from FluidSynth/master
Sync to master
2018-11-03 16:06:11 +01:00
Tom M
0160543cdd
Compile time constant lookup tables with cmake (#438)
Autogenerate lookup tables with a C helper tool, allowing them to be compile time constant and reduce memory requirements esp. on embedded systems.
2018-11-03 14:38:54 +01:00
derselbst
28edbbfe83 fluid_settings_option_concat: dont count NULL options
should never happen though
2018-11-03 14:17:40 +01:00
derselbst
4d8954ee30 fix mistaken usage of fluid_synth_process in coreaudio driver 2018-11-03 14:11:05 +01:00
derselbst
31ccc6b6a0 fix a NULL deref in coreaudio driver 2018-11-03 14:11:05 +01:00
derselbst
ffdf5b89d7 constify function parameters if possible 2018-11-03 14:11:05 +01:00
derselbst
16d81d50ea remove unused fluid_hz2ct()
Closes #455.
2018-11-03 09:13:56 +01:00
carlo-bramini
2205e4a8fc Use integer math
Since 'data' is an integer value clipped between +/-8192 and 'nrpn_scale' is a char value, this calculation could be done with integers and then return the fluid_real_t value.

Addresses #455.
2018-11-03 08:06:56 +01:00
carlo-bramini
a948f7c5b2 Use integer math
Actually, using an integer division produces the same result.

Addresses #455.
2018-11-03 08:04:16 +01:00
carlo-bramini
241c82a4b0
Merge pull request #3 from FluidSynth/master
Sync to master
2018-11-01 11:00:10 +01:00
derselbst
da6a2e7a91 travis: disable sudo 2018-10-31 13:23:05 +01:00
Tom M
3f4c08e34b
Merge pull request #442 from carlo-bramini/float-to-s16-1
Rounded samples do not need to be float.
2018-10-31 13:18:33 +01:00
derselbst
ac356a408b update fluidsettings.xml on jack midi autoconnect 2018-10-31 13:14:59 +01:00
Colin Kinloch
cf09b654ab jack midi autoconnect (#450) 2018-10-31 13:10:29 +01:00
derselbst
b628115092 optimize rounding and clipping to int16 samples 2018-10-31 10:40:32 +01:00
derselbst
ee5b0ea1c7 remove redundant declarations 2018-10-28 16:42:20 +01:00
derselbst
a4ddc9396c avoid leaking memory in pulse driver 2018-10-28 16:37:44 +01:00
Tom M
c0ff5a0af1
Optimize Travis and AppVeyor CI builds (#451)
* cleanup unneeded compiler variations (now builds in 7 min rather than 13 min)
* Windows:
  * use VS2017 for vcpkg, VS2015 for manual build
* Linux:
  * install alsa, jack, pulse, portaudio, ladspa, libsndfile for all builds
* MacOSX: 
  * use AppleClang
  * reorder macosx build in between linux build, as macosx usually takes longer to build, allowing to make better use of build time (via pipelining)
  * switch to XCode10, enabling TravisCI to support CoreAudio and CoreMidi
2018-10-28 16:29:15 +01:00
derselbst
3d94d01225 clang-tidy: remove annoying readability-inconsistent-declaration-parameter-name 2018-10-28 14:21:36 +01:00
Tom M
804cbf91c9
Merge pull request #449 from carlo-bramini/win-driver-selection
let cmake find WinMidi and DSound
2018-10-27 20:26:18 +02:00
derselbst
e4ab5067f1 fix linker error on win32 without network support
by adding missing #ifdefs
2018-10-27 16:32:54 +02:00
carlo-bramini
e298fefd7f cleanup audio and midi driver instantiation (#448)
Instead of saving the name of the driver, it would be worth to save to pointer to the selected definition instead.
In this way, the function for deleting the driver does not need to search its name by parsing all the list, but it just needs to call the pointer into the saved definition (less code). This fix can be applied to MIDI drivers too. 
I also moved the FLUID_FREE(allnames) inside the "if(allnames != NULL)" block, nothing bad should happen even by keeping that instruction outside, but actually there is no need to call the free if allnames is NULL.
2018-10-27 16:22:44 +02:00
carlo-bramini
a1affca2ca
Use "enable-network" instead of NETWORK_SUPPORT 2018-10-27 10:11:28 +02:00
carlo-bramini
02d7ab6939
Fix "-mms-bitfields" option. 2018-10-26 19:49:27 +02:00
carlo-bramini
2ffad4dd2c
Add options for Windows drivers 2018-10-26 19:48:01 +02:00
carlo-bramini
30886a3d78
Remove handwritten macros 2018-10-26 19:44:27 +02:00
carlo-bramini
413bcbeb84
Add Windows driver support macro. 2018-10-26 19:43:27 +02:00