Commit graph

37 commits

Author SHA1 Message Date
Andrew Kelley ee7c0d3e11 convert source code to pure C
List<T> is now a really ugly macro.

Added a workaround for jack.h not putting `void` in function
prototypes for functions that take no arguments. I made upstream
pull requests to jack1 and jack2 but I don't have high hopes
about them getting merged.

I removed the lock-free atomic asserts. clang reports
non-lock-free atomics when in fact it does have lock-free
atomics. I inspected the generated code for gcc and clang
for fetch_add, load, and store, on x86_64 and armhf, and
it's all lock free.

Closes #45.
2015-11-10 02:24:18 -07:00
Andrew Kelley db0e3d136c fix double clean up corruption when opening stream fails
affects ALSA, CoreAudio, JACK, WASAPI, and Dummy.
2015-10-08 17:10:21 -07:00
Andrew Kelley e2e483a4d5 no longer depend on or link against libm 2015-09-05 14:56:36 -07:00
Andrew Kelley b55a225b9c CoreAudio: pass the latency test
See #2
2015-09-03 10:47:38 -07:00
Andrew Kelley e5cd076e2e dummy: pass the latency test
See #2
2015-09-02 13:31:50 -07:00
Andrew Kelley debab8e70f get latency skeleton
See #2
2015-09-02 12:22:03 -07:00
Andrew Kelley fe4a04d93c ALSA: better pause/unpause behavior 2015-09-01 14:43:50 -07:00
Andrew Kelley 7a714298c1 add soundio_force_device_scan API 2015-08-27 21:45:22 -07:00
Andrew Kelley 16437bd357 various code adjustments
* doc clarifications
 * examples compile with c99 not c11
 * fix pulseaudio on_backend_disconnected not firing only during
   flush events
 * make wait events more efficient
 * fix alsa devices race condition
 * fix backend disconnected code handling
 * add overflow test
 * fix on_events_signal not called at correct times
 * refactor pulseaudio device scanning
 * fix SoundIoErrorNoSuchDevice string value
2015-08-27 20:57:53 -07:00
Andrew Kelley c96405a091 rt prio warning behavior is overridable 2015-08-26 12:54:13 -07:00
Andrew Kelley fbc7318268 remove the concept of period duration from the API
also more progress on WASAPI
2015-08-13 22:54:15 -07:00
Andrew Kelley 9a06d22608 WASAPI: detect channel layout of exclusive device 2015-08-13 00:58:05 -07:00
Andrew Kelley 709fc5fa19 WASAPI: detect raw devices 2015-08-12 19:29:01 -07:00
Andrew Kelley 75185d17d7 WASAPI: get the list of supported formats from devices 2015-08-12 17:11:03 -07:00
Andrew Kelley 97abe08f0e WASAPI: get the number of available audio devices 2015-08-10 15:22:08 -07:00
Andrew Kelley 34ba7e7564 CoreAudio: fix build 2015-08-08 14:49:03 -07:00
Andrew Kelley 7238d29666 sample rate is exposed as a list of min/max pairs 2015-08-08 14:44:31 -07:00
Andrew Kelley eb7308d992 CoreAudio: microphone example works 2015-08-08 11:45:21 -07:00
Andrew Kelley 29d55f59f7 CoreAudio: ability to open an input device 2015-08-07 15:28:22 -07:00
Andrew Kelley 48d927d8e3 CoreAudio: ability to set buffer duration 2015-08-07 13:40:25 -07:00
Andrew Kelley cdb02e2b46 CoreAudio: underflow test passes 2015-08-07 13:13:10 -07:00
Andrew Kelley 753673b194 CoreAudio: fix build 2015-08-04 22:15:43 -07:00
Andrew Kelley c381526205 callbacks supply min and max frame count parameters
This changes the semantics of the callbacks so that instead of
a single `requested_frame_count` or `available_frame_count`,
the callbacks get a minimum frame count and maximum frame count.

The callback must write at least the minimum or get an underflow.
The minimum will be 0 on ALSA, PulseAudio, and Dummy, and will
equal the maximum on CoreAudio and JACK.

This ensures optimal behavior regardless of buffer size.
2015-08-04 21:57:46 -07:00
Andrew Kelley 29a914ceba no constructors or destructors 2015-08-04 11:03:19 -07:00
Andrew Kelley 28f73ba037 CoreAudio: listen for changes to device properties 2015-08-04 10:40:26 -07:00
Andrew Kelley d00fe4db58 CoreAudio: cleanup 2015-08-04 09:52:48 -07:00
Andrew Kelley f87961275d write and read functions no longer allow setting frame count
CoreAudio and JACK both have this limitation
2015-08-04 00:56:03 -07:00
Andrew Kelley df0ca8a772 CoreAudio: sine wave example works 2015-08-03 22:27:09 -07:00
Andrew Kelley a774a72958 CoreAudio: get the full list of available sample rates 2015-08-03 17:06:38 -07:00
Andrew Kelley c347629c8d CoreAudio: obtain device buffer duration 2015-08-03 15:14:41 -07:00
Andrew Kelley d8aa9dce4d CoreAudio: get the UID for the device id 2015-08-03 14:58:46 -07:00
Andrew Kelley b0f983bd84 CoreAudio: obtain sample rate information for devices 2015-08-03 14:29:57 -07:00
Andrew Kelley c52e76928f fix build on linux 2015-08-01 22:40:55 -07:00
Andrew Kelley f77663399f CoreAudio: obtain most device information 2015-08-01 22:10:43 -07:00
Andrew Kelley 6d185de82c CoreAudio: emit on_backend_disconnecte when service restarts 2015-08-01 13:24:58 -07:00
Andrew Kelley 7371ce5146 Fix kqueue-based cond and signal implementation 2015-08-01 13:01:49 -07:00
Andrew Kelley 4c5742eb29 CoreAudio skeleton 2015-07-31 18:52:51 -07:00