Chris Robinson
7b4a2335eb
Load fluidsynth dynamically when possible
2014-08-05 01:48:30 -07:00
Chris Robinson
0ad3f61351
Don't try to use internal visibility
...
A number of functions are passed as callbacks to external libraries, which
internal visiiblity doesn't allow.
2014-07-26 17:48:36 -07:00
Chris Robinson
a3dbe08c8b
Support C11 atomics
2014-07-23 06:36:34 -07:00
Chris Robinson
be66692f94
Require SSE for SSE2, and SSE2 for SSE4.1
2014-06-07 23:28:32 -07:00
Timothy Arceri
fc0be88c0f
Add SSE2 and SSE4.1 linear resamplers
...
Currently the only way SSE 4.1 is detected is by using __get_cpuid, i.e. with
GCC. Windows' IsProcessorFeaturePresent does not report SSE4.1 capabilities.
2014-06-06 07:15:00 -07:00
Chris Robinson
d2c0a43498
Add an ffmpeg-based example player
...
This example shows proper timing and A/V synchronization with an OpenAL stream.
Requires the in-progress AL_SOFTX_source_length extension to avoid manually
keeping track of the buffer queue length.
2014-06-02 17:33:11 -07:00
Chris Robinson
13eac2552e
Update the examples to use SDL2
...
This should make it easier to build the examples on 64-bit, where there are no
premade dev libs for SDL1 on 64-bit mingw. FindSDL_sound.cmake has been
updated to accept SDL or SDL2.
2014-05-23 12:14:51 -07:00
Chris Robinson
85e990e915
Don't try to use the non-standard alloca.h
...
Variable-length arrays are C99 standard and are preferred over alloca. The only
compiler that needs alloca (MSVC) has it in malloc.h.
2014-05-22 08:46:13 -07:00
Chris Robinson
bd88e1743a
Build a common static lib for reusable code
2014-05-07 19:51:42 -07:00
Chris Robinson
a2bddb7b40
Move RWLock and UIntMap implementations to common
...
This should make the code in common completely self-reliant.
2014-05-07 19:16:49 -07:00
Chris Robinson
38b98de78e
Check for C99 _Bool support
2014-05-06 23:10:50 -07:00
Chris Robinson
1aff37114a
Move atomic method definitions to a separate common source
2014-05-06 19:07:40 -07:00
Chris Robinson
fa12855d19
Move threads.c to a separate source dir
...
This will eventually serve to build a static lib of common wrapper methods,
such as threads, mutexes, atomics, etc.
2014-05-06 18:57:42 -07:00
Chris Robinson
cbb94405db
Test _Alignas with 16 instead of 4
2014-05-05 14:21:09 -07:00
Chris Robinson
2edd047178
C11's alignas is also sufficient for SSE aligning
2014-05-05 13:53:07 -07:00
Chris Robinson
d90f684f16
Use a backup in case pthread_mutex_timedlock isn't available
2014-05-01 14:15:31 -07:00
Chris Robinson
84afe4fb40
Simplify the cmake backend handling a bit
2014-04-22 07:58:25 -07:00
Chris Robinson
d5ac11c87f
Fix adding backend include directories
2014-04-22 07:21:19 -07:00
Chris Robinson
d856183c4b
Only declare backend options when the backend is available
2014-04-20 22:42:53 -07:00
Chris Robinson
043e25b602
Don't link with libwinmm unless WinMM is enabled
...
We don't use timeGetTime for timing anymore, so winmm only needs to be linked
when the winmm backend is enabled.
2014-04-19 08:50:41 -07:00
Chris Robinson
96c559fbef
Use a find module to look for DirectSound
2014-04-19 07:49:27 -07:00
Chris Robinson
887763e41c
Use find cmake modules for more backends
2014-04-19 06:35:14 -07:00
Chris Robinson
59fc9aac0e
Use C11 alignas when available
2014-04-19 02:11:04 -07:00
Chris Robinson
8badd3740e
Dont bother trying _alloca
...
We prefer C99 variable-length arrays, and other systems (including MSVC9) don't
have an issue with alloca.
2014-04-19 01:10:12 -07:00
Chris Robinson
1d69ec9ce1
Set -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 earlier
2014-04-19 01:02:36 -07:00
Chris Robinson
9b685bace5
Use FindALSA.cmake to look for ALSA
...
Also, only provide the ALSA_BACKEND_ALSA option if it's available
2014-04-19 00:52:19 -07:00
Chris Robinson
2eda15fc77
Only define SSE, Neon, and FluidSynth options if they're available
2014-04-18 23:20:27 -07:00
Chris Robinson
528c8c5e77
Check explicitly for pthread_mutexattr_setkind_np before use
2014-04-17 19:01:12 -07:00
Chris Robinson
8a51995cfa
Bump _WIN32_WINNT to 0x0502 (XP SP2) for GetThreadId
2014-04-16 07:30:18 -07:00
Chris Robinson
c6821e5dd1
Use C11's static_assert when available
2014-04-07 11:48:28 -07:00
Chris Robinson
f1a4b95b8c
Use FIND_LIBRARY to look for the CoreAudio framework
2014-04-05 17:43:35 -07:00
Chris Robinson
18620ab5e0
Check for ftw and _wfindfirst
2014-03-27 22:21:37 -07:00
Chris Robinson
045959e9c0
Use C99 VLA instead of alloca when available
2014-03-25 18:16:03 -07:00
Chris Robinson
cc599333a8
Don't try to use __restrict as a replacement for restrict
...
The compiler it's intended for, MSVC, can't use it anyway because of problems
it causes with __declspec(restrict).
2014-03-23 01:35:15 -07:00
Chris Robinson
9959972c7e
Add a stub 'soft' MIDI synth handler
...
Eventually this one will be used to handle MIDI internally, using our own
mixers and resamplers.
2014-03-22 21:53:00 -07:00
Chris Robinson
143f786d1a
Move the sample conversion routines to a separate file
2014-03-05 16:38:02 -08:00
Chris Robinson
a6eb38ea7f
Use alloca for temp space decoding/encoding IMA4 blocks
2014-03-03 20:02:15 -08:00
Chris Robinson
5731534e8d
Move the default hrtf table to an external file
2014-02-23 21:02:11 -08:00
Chris Robinson
748be9a97d
Include sys/sysconf.h if available for sysconf()
2014-01-18 19:16:46 -08:00
Chris Robinson
fe55cd6de8
Add alLoadSoundfontSOFT to load a soundfont via callback
...
Some hefty caveats:
This function is not thread-safe. In particular, the current context affecting
the thread must not be changed, and the provided soundfont must not be
altered while the function is executing. Ideally, this will be fixed.
Error handling is poor. Some RIFF structure errors may not be caught (e.g. sub-
chunks with sizes greater than the parent chunk allows for), and generated AL
errors are ignored, possibly leading to resource leaks in certain situations.
These should be fixed in time.
There is minimal error checking on the provided soundfont ID. It does not
ensure a valid ID has been provided, nor does it ensure the provided soundfont
can be modified. These short-comings should be fixed eventually.
Proper cleanup is the responsibility of the caller. The caller must get the
preset objects from the soundfont before deleting it, and the fontsound objects
from each preset before deleting them, to make sure all resources are properly
deleted.
2013-12-28 09:58:55 -08:00
Chris Robinson
677b864565
Remove the zone, sample, and instrument object types
2013-12-25 19:35:43 -08:00
Chris Robinson
94ddc5cb18
Add a new fontsound object type
...
This is basically a combined preset and intrument zone with sample header.
2013-12-25 19:13:59 -08:00
Chris Robinson
99933fac49
Allow creating instrument objects
2013-12-19 00:57:07 -08:00
Chris Robinson
4288d3cd01
Move the soundfont and preset extension functions to separate sources
2013-12-19 00:27:11 -08:00
Chris Robinson
0653680690
Move the base MidiSynth to a separate file
2013-12-17 23:03:34 -08:00
Chris Robinson
0095a59fc9
Move the dummy MIDI handler to a separate file
2013-12-17 22:43:10 -08:00
Chris Robinson
ee92b3142d
Move FluidSynth to its own file
2013-12-17 22:36:25 -08:00
Chris Robinson
a3c76c3274
Add an option for FLuidSynth to handle MIDI
2013-11-28 03:08:28 -08:00
Chris Robinson
d315feae40
Add a MIDI event queue
...
In preparation for a MIDI extension.
2013-11-27 03:49:26 -08:00
Chris Robinson
4830b1afe7
Try to make sure GCC is providing C99 inline semantics
2013-11-24 17:37:48 -08:00