* Hardcodes wasapi GUIDs when compiling as C
* Uses the user requested buffer size on wasapi
Windows appears to automatically adjust the timer period when you
use a small buffer, meaning that using a fraction of a large buffer
is unreliable unless you call timeBeginPeriod. Seems simpler to just
request the desired size directly.
I'll do some further investigations into this, if it seems like the
right change to make I'll update the docs as well if needed.
* Switches to event driven callbacks on wasapi
* Removes some commented out code, moves class variable to local
On line 242, ´SoundIoFormatU16BE´ is incorrectly documented as an *Unsigned 16 bit Little Endian*; looking at the naming and structure, this is likely an *Unsigned 16 bit Big Endian*.
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.
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.
- 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.
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.