Commit graph

247 commits

Author SHA1 Message Date
Andrew Kelley 98b85efba5 Merge branch 'android' of https://github.com/ligfx/libsoundio into v2 2016-12-23 14:22:41 -05:00
JP Cimalando 662ef7983b add Jack option to leave ports unconnected 2016-12-23 14:12:21 -05:00
Jacques Heunis eef66c5d34 Fix incorrectly returning the same error in multiple error cases 2016-12-23 14:11:52 -05:00
Jacques Heunis 29555645eb Return more descriptive/exact errors when available in WASAPI. 2016-12-23 14:11:52 -05:00
Jacques Heunis e73a630c56 Fix WASAPI disconnecting if just one device cannot be opened. 2016-12-23 14:11:52 -05:00
Jacques Heunis de9bb2902b Return slightly more descriptive soundio errors when RefreshDevices fails for WASAPI. 2016-12-23 14:11:52 -05:00
Ruurd Adema 6700f9145e Fixed issue with CoreAudio stereo stream being mono 2016-12-23 14:11:52 -05:00
Michael Maltese dd74dd773d android: ashmem implementation of mirrored memory 2016-11-08 19:22:41 -08:00
Michael Maltese ddbe4a8bf2 android: input device support 2016-11-08 19:22:41 -08:00
Michael Maltese 22e13b1c48 Android: implement functioning outstream 2016-11-08 19:21:58 -08:00
Michael Maltese 852403f405 Android: create and destroy OpenSL ES engine 2016-11-08 19:20:39 -08:00
Michael Maltese e75329f585 Android: open-able output device 2016-11-08 19:20:39 -08:00
Michael Maltese dfe2ac7f86 Add (empty) Android OpenSL ES backend 2016-11-08 19:20:03 -08:00
Andrew Kelley c81fe43ac0 add soundio parameter to emit_rtprio_warning
closes #114
2016-10-23 19:40:37 -04:00
Andrew Kelley bef0df2f0b use consistent enum to string function names
closes #115
2016-10-23 19:21:21 -04:00
Andrew Kelley 4a8376a704 use SoundIoError for return type instead of int
closes #116
2016-10-23 19:14:54 -04:00
Andrew Kelley 369181fb9c Merge branch 'pulseaudio' of https://github.com/0joshuaolson1/libsoundio into v2
closes #96
2016-10-23 14:41:49 -04:00
Andrew Kelley 48681a11db remove SoundIo param from 2 API functions
closes #29
2016-10-23 14:28:54 -04:00
0joshuaolson1 662286a312 Add PulseAudio signed 24bit packed formats 2016-07-30 14:45:28 -06:00
0joshuaolson1 9defcda7f4 Add packed/3bytes format to ALSA,dummy 2016-07-26 16:23:05 -06:00
nyorain f26ba0727e Only define E_NOTFOUND if not already defined 2016-07-04 00:34:56 +02:00
Jacques Heunis 17dc688ddc Move the E_NOTFOUND define out of wasapi.h 2016-06-04 23:09:11 +02:00
Jacques Heunis 4b95b79f27 WASAPI: Correctly handle no input or output devices instead of crashing. 2016-06-04 14:38:11 +02:00
Michael Maltese 93e7706978 WASAPI: define WIN32_LEAN_AND_MEAN in source as well as header
When compiling with Visual Studio (#49), prevents this error:

```
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um\commdlg.h(929): error C2373: 'IPrintDialogCallbackVtbl': redefinition; different type modifiers
1>  C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um\commdlg.h(929): note: see declaration of 'IPrintDialogCallbackVtbl'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um\commdlg.h(961): error C2373: 'IPrintDialogServicesVtbl': redefinition; different type modifiers
1>  C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um\commdlg.h(961): note: see declaration of 'IPrintDialogServicesVtbl'
```
2016-05-24 17:43:55 -07:00
Andrew Kelley 9c90c0b2ed WASAPI: default input software latency when none detected
See #73
2016-05-01 13:04:29 -07:00
Andrew Kelley 45d5691254 Merge pull request #71 from michaelmaltese/feature-more-coreaudio-formats
coreaudio: support more formats: S16LE, S32LE, and Float64LE
2016-04-26 16:46:31 -07:00
Michael Maltese 8742fe215d coreaudio: support more formats: S16LE, S32LE, and Float64LE 2016-04-26 16:24:37 -07:00
Michael Maltese 99f5b4e4b6 coreaudio: obey MAX_CHANNELS when creating devices
fixes #57, which was caused by a buffer overflow with devices with more
than MAX_CHANNELS channels
2016-04-25 15:16:12 -07:00
Andrew Kelley 658c4f60c5 fix compile error with use of ATOMIC_FLAG_INIT
closes #60
2016-04-22 10:33:44 -07:00
Andrew Kelley e8b908243d add missing include directive
fixes compilation when no backends are available. closes #67
2016-04-22 10:24:32 -07:00
Andrew Kelley ca0ebfda5c os: fix not cleaning up fd resource when mmap fails 2016-02-17 18:05:08 -07:00
Andrew Kelley c2836e494b alsa: refactor for readability 2016-01-26 20:18:39 -07:00
Charles Lehner cdadcee7ed Handle ALSA devices with null description 2016-01-26 21:42:44 -05:00
Raphaël Londeix a205359a08 Fix missing none backend initializer 2016-01-06 10:23:33 +01:00
Raphaël Londeix ce60176e99 Go back to statically initialized arrays 2016-01-06 09:27:22 +01:00
Raphaël Londeix 45cd6a7af2 Fix WASAPI implementation when building in C++ mode. 2015-12-07 11:28:06 +01:00
Raphaël Londeix 699b00c427 Prevent WASAPI GUID from being re-defined in all compilation units. 2015-12-07 11:28:06 +01:00
Raphaël Londeix 8587a22b21 Fix compiler attributes for MSVC 2015-12-07 11:28:06 +01:00
Raphaël Londeix d1eb1d8042 Do not use C99 array initialization syntax. 2015-12-07 11:28:06 +01:00
Raphaël Londeix 406ffa668c Wrap atomic_flag usage behind SoundIo macros and types
As done for other atomic types, we hide atomic_flag real type in
    order to use both the C and the C++ standard libraries.
2015-12-05 13:33:47 +00:00
Raphaël Londeix af98891b4f Use a different set of macros and types for atomics when compiled in C++
Previously, the `atomics.h` header relied solely on the presence of
    the C11 specific header `stdatomic.h`. Now, when compiled in C++,
    we use the `std::atomic` type family provided by the STL in C++11.
2015-12-05 13:33:47 +00:00
Raphaël Londeix ff1af0e4cb ALLOCATE_* family macros cast to the destination type
They were previously evaluated as an expression of `void *` type.
    This allows a C++ compiler to assign it a variable of the
    destination type.
2015-12-05 13:33:47 +00:00
Andrew Kelley ce42b89da3 no longer ship config.h header
Instead provide these functions:

 * soundio_version_string
 * soundio_version_major
 * soundio_version_minor
 * soundio_version_patch
2015-11-23 13:51:25 -07:00
Andrew Kelley 72fde44073 PulseAudio: fix incorrect outstream software_latency
Previously, when using PulseAudio, unintended integer division
caused SoundIoOutStream::software_latency to be incorrect.
2015-11-20 23:51:16 -07:00
Andrew Kelley f61acfd953 ALSA: fix potential cleanup deadlock
The main ALSA poll now includes another file descriptor which we
write to when cleaning up, to ensure that the poll terminates
when soundio_outstream_destroy is invoked.

closes #36
2015-11-14 22:16:29 -07:00
Andrew Kelley 8f1e1b8752 ALSA: let alsa lib choose period settings
Closes #46
2015-11-14 21:48:58 -07:00
Andrew Kelley d168a7d192 ALSA: better device detection
* Don't suppress sysdefault.
 * If default and sysdefault are missing, use the first device as
   the default device.
 * In sio_record example, don't segfault when device not found or
   probe error.
 * Workaround for Raspberry Pi driver that incorrectly reports
   itself as Output when it is actually Input.

See #44.
2015-11-10 04:23:27 -07:00
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 2633b1bd60 PulseAudio: pass the latency test 2015-11-01 12:39:21 -07:00
Andrew Kelley 8e30053962 JACK: delete broken pause implementation
Previously, calling soundio_outstream_pause or soundio_instream_pause
during the write_callback or read_callback would cause a deadlock. Now,
attempting to pause always results in SoundIoErrorBackendIncompatible.

Closes #39
2015-10-28 16:01:08 -07:00