* Initial support. Device scanning and sanity checks work.
Playback and recording does not.
* stream_init fixes. Audio test now runs, though doesn't do anything.
* Set the prinfo type to the device type we'll later be limited to.
* Playback support.
Also implement stream_get_current_device and stream_device_destroy.
* AUDIO_SETINFO properly.
* Don't poll forever when recording.
Use the recommended number of latency_frames as our BUFSIZE.
* Fix typo.
* Don't allocate devid. Required for a sanity test.
* Fix some tests
* Initial attempt to support Solaris
* stdlib.h for calloc.
* undo local change
* Should probably be using "events" here, and the state change isn't
necessary now that it's done elsewhere.
* Avoid format truncation warning.
* more illumos fixes
* Performance improvements.
It seems polling for input is not a viable strategy.
* Protect volume and frames_written with a mutex.
* Protect running with a mutex.
* Add QUAD and QUAD_LFE layouts.
* Remove dual mono layout.
It makes no sense to have a case for those as the data structure
used (a bitmask) do not allow to represent this channel layout (a
channel can only be present once). As such it was a non-functional
layout
* Fix up cubeb_pulse compilation using C++ keyword.
* Remove the concept of preferred layout.
Channel layout is derived by the content being played. The concept of
preferred layout is meaningless. Either we have a layout defined, or
we don't. There's no in-between.
So we remove it.
* Remove CHANNEL_MONO concept.
* Add cubeb_sample_size convenience method.
* Rework cubeb_mixer.
This completely replace the existing remixer which had serious limitations:
1- Had no memory bound checks
2- Could only downmix 5.1 and 7.1 to stereo.
This mixer allows to convert from any sane layout to any other and work directly on interleaved samples.
This cubeb_mixer doesn't have an API compatible with the previous one.
This commit is non-fonctional, and was split for ease of review.
* Fix remixing on mac, windows and pulse backend.
* Make cubeb_mixer creation infallible.
Rather than ignore nonsensical layouts, we attempt to play it according to the stream channels count instead. The audio data will be played as-is, dropping the extra channels or inserting silence where needed.
* User proper sample size when calculating offsets.
Should the user data be of a different type to what the AudioUnit output is set to, we would have written outside the end of our allocated buffer.
* Fix input mixing and clarify frames vs samples terminology
* If a layout is unknown or invalid, always treat it as plain stereo or mono.
Add a test file for loopback tests and add to build script. This file is
currently configured to be Windows only in build scripts, as the WASAPI backend
is currently the only backend supporting the new loopback interface.
Add a test for duplex streams using the default output device and a loopback
from the same device.
* Make cubeb_device_info_destroy private.
* Move implementation of cubeb_device_collection_destroy to cubeb_utils.
* Move cubeb_device_collection_destroy implementation into backend.
Push the responsiblity for destroying device collections to the
backends so they can make independent choices on how to handle
allocation.
* Unstage space changes
This makes it easier to embed cubeb within larger projects that already
provide googletest and/or sanitizers-cmake, by testing directly for what
is used rather than indirectly for .git folders.
* Add a deadlock test and intentionally produce a deadlock on OSX
* Replace std::mutex by owned_critical_section
* Restore audiounit_get_preferred_channel_layout
* Revise comments
* Add more log and comments for better readability.
This restores the previous attempt to remove this code before BMO #1130266 took effect.
Revert "Revert "wasapi: Call avrt functions directly since we only support Vista+.""
This reverts commit 13f167c239.
Conflicts:
src/cubeb_wasapi.cpp