Commit graph

357 commits

Author SHA1 Message Date
Nils Daumann e3973967d2 Fixed WASAPI input stream releasing a different buffer size than it got.
This caused a SoundIOErrorStreaming error and all following reads would fail. It took a while in the microphone sample, but after ~30 seconds it would always fail for me.
2017-05-24 22:57:35 +02:00
Nils Daumann fde62658d8 Removed /WX compile option for MSVC builds. 2017-05-24 22:46:55 +02:00
Andrew Kelley 85103e43e4 Merge pull request #152 from ul/master
fix microphone example fill with zeros case
2017-03-27 14:21:04 -04:00
Ruslan Prokopchuk ae7fc0177b fix microphone example fill with zeros case
Usually when microphone example is run you never hit buffer underflow and "fill with zeros" branch is never executed. But when it's executed it fails with "invalid value" because of checks performed on frame_count. This platform-independent check 8094dc5249/src/soundio.c (L447) sometimes passed because unitialized local frame_count have arbitrary value, but this CoreAudio one 8094dc5249/src/coreaudio.c (L1078) is not passed, and "fill with zeros" scenario always fails on MacOS.
2017-03-27 10:39:38 +03:00
Andrew Kelley 8094dc5249 update sio_record usage text
closes #135
2016-12-23 18:14:58 -05:00
Andrew Kelley fec857366e Merge pull request #143 from inolen/master
build: fix detection of unsuitable JACK library
2016-12-23 15:40:33 -05:00
Anthony Pesch 8af2379cf7 build: fix detection of unsuitable JACK library 2016-12-22 19:43:14 -08:00
Andrew Kelley afe6024a85 Merge pull request #124 from ligfx/libsoundiobinarydir
CMake: CMAKE_BINARY_DIR -> libsoundio_BINARY_DIR
2016-10-31 11:33:36 -04:00
Michael Maltese c04f74c1d9 CMake: CMAKE_BINARY_DIR -> libsoundio_BINARY_DIR
- Consistent with usage of `libsoundio_SOURCE_DIR`
- Makes it easier to include inside other projects.

I haven't encountered any actual issues with the way it is now, but it
was misleading while I was debugging a different issue related to being
used as a subproject.
2016-10-26 23:48:51 -07:00
Andrew Kelley 25a35c3dab build: examples and tests work when building statically
closes #106
2016-10-23 16:49:26 -04:00
Andrew Kelley 9557eb7b60 docs: move ring buffer docs to work around doxygen limitation
closes #113
2016-10-23 16:38:57 -04:00
Andrew Kelley 6703021eba sio_sine: add phase wrap around
closes #110

Thanks to @iskunk for the fix.
2016-10-23 16:12:56 -04:00
Andrew Kelley 323fb1aa27 Merge pull request #104 from jacquesh/wasapi-device-error-handling
WASAPI device error handling
2016-09-17 12:39:00 -04:00
Jacques Heunis f9444b089b Fix incorrectly returning the same error in multiple error cases 2016-09-16 22:46:14 +02:00
Jacques Heunis b88355eaaf Return more descriptive/exact errors when available in WASAPI. 2016-09-16 21:47:00 +02:00
Jacques Heunis 61c04c3730 Fix WASAPI disconnecting if just one device cannot be opened. 2016-09-16 10:22:54 +02:00
Jacques Heunis a8201986a0 Return slightly more descriptive soundio errors when RefreshDevices fails for WASAPI. 2016-09-16 10:12:35 +02:00
Andrew Kelley 8583897d72 Merge pull request #101 from ruurdadema/master
Fixed issue with CoreAudio stereo stream being mono
2016-08-20 12:07:47 -04:00
Ruurd Adema 8fbabc4dfc Fixed issue with CoreAudio stereo stream being mono 2016-08-19 21:18:06 +02:00
Andrew Kelley 5ffdbf1ce9 Merge pull request #93 from 0joshuaolson1/patch-2
Remove duplicate documented SoundIoError
2016-07-24 19:48:29 -04:00
Joshua Olson bba007f0a7 Remove duplicate documented SoundIoError 2016-07-23 19:15:26 -06:00
Andrew Kelley 7293a58feb Merge pull request #91 from Naftoreiclag/master
WASAPI: Remove useless statement in CMake module
2016-07-21 09:54:23 -04:00
James 81cd9e54e9 WASAPI: Remove useless statement in CMake module
AUDIOCLIENT_H, as declared here, is not an external cached variable, so calling mark_as_advanced() has no apparent effect (does not enable user to modify value, even in advanced mode). Even if it were cached, its value (success/failure at finding audioclient.h) should not be edited by the user.

Also modified whitespace to be more consistent with that found in CMakeLists.txt.
2016-07-20 16:47:44 -07:00
Andrew Kelley 7469bee058 Merge pull request #86 from IceDragon200/master
Static lib and dynamic lib building options
2016-07-04 17:54:27 -04:00
Andrew Kelley e8735fa443 Merge pull request #87 from nyorain/master
Only define E_NOTFOUND if not already defined
2016-07-03 21:29:14 -04:00
nyorain f26ba0727e Only define E_NOTFOUND if not already defined 2016-07-04 00:34:56 +02:00
Corey Powell 3e1033cd30 Added flag to building the dynamic libraries
BUILD_DYNAMIC_LIBS

Some libs (glfw comes to mind), offer the option to build both or either the static and dynamic libs
2016-06-30 10:45:55 -05:00
Corey Powell 425dc4bf69 Allow overriding static lib name
This helps alleviate cases where compilers will choose to link against the dynamic library instead of the static based on name alone (in which you don't have much control, or don't wish to tinker too much with the compiler args)
2016-06-30 10:45:08 -05:00
Andrew Kelley ccf9545bc5 remove travis CI integration
It's doing more harm than good.
2016-06-29 16:28:08 -07:00
Andrew Kelley 1b332a44a0 sio_sine example: check memory allocation 2016-06-29 16:11:37 -07:00
Andrew Kelley 552167fa0e Merge pull request #85 from IceDragon200/master
Replace CMAKE_SOURCE_DIR with libsoundio_SOURCE_DIR
2016-06-29 14:52:46 -07:00
Corey Powell 09e16aa348 Replace occurences of CMAKE_SOURCE_DIR with libsoundio_SOURCE_DIR
This allows it to play nicely with add_subdirectory from another project
2016-06-29 16:43:19 -05:00
Andrew Kelley 4eb5b4bbe4 build docs in little endian mode and add note
closes #81
2016-06-13 16:58:27 -07:00
Andrew Kelley 67746c42ec sio_sine example: unref device properly
closes #82
2016-06-13 16:48:22 -07:00
Andrew Kelley c2df644493 Merge pull request #79 from jacquesh/wasapi-device-error-handling
WASAPI: Correctly handle no input or output devices instead of crashing.
2016-06-04 14:20:45 -07: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
Andrew Kelley cdc4e2fd2a handle libm with MSVC 2016-05-25 15:15:06 -07:00
Andrew Kelley 06c075e1b2 Merge pull request #76 from michaelmaltese/patch-3
Use command line switches that MSVC understands
2016-05-25 15:04:12 -07:00
Michael Maltese 2a348cbf90 Use command line switches that MSVC understands 2016-05-24 19:21:49 -07:00
Andrew Kelley 40a4d8dfc0 Merge pull request #75 from michaelmaltese/patch-2
WASAPI: define WIN32_LEAN_AND_MEAN in source as well as header
2016-05-24 17:54:12 -07: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 a8209b6ffd Merge pull request #74 from michaelmaltese/patch-1
WASAPI: use `check_include_file` instead of 'find_path` in CMake
2016-05-24 17:36:21 -07:00
Michael Maltese e1c55d807b WASAPI: use check_include_file instead of 'find_path` in CMake
# Current issue:

When attempting to compile under MSVC (#49), CMake can't find the WASAPI headers. I'm running Windows 10, Visual Studio Community 2015, and the latest SDK.

# Proposed fix:

Use `check_include_file` instead of `find_path`, which seems more semantically correct anyways.
2016-05-24 17:31:11 -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 f6d3ea9475 Merge pull request #72 from ideoforms/master
Travis: Add travis_retry to make apt-get commands persistent
2016-05-01 12:38:59 -07:00
Daniel Jones 98d78f143b Travis: Add travis_retry to make apt-get commands persistent 2016-04-27 11:21:37 +01: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
Andrew Kelley a260961fcb Merge pull request #70 from michaelmaltese/bugfix-57-truncate-number-of-soundflower-channels
coreaudio: obey MAX_CHANNELS when creating devices
2016-04-25 17:02:18 -07:00