aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-11-02Implement cubeb_get_preferred_sample_rate for the new AAudio backend.Paul Adenot
2020-11-02Implement cubeb_get_min_latency for the new AAudio backend.Paul Adenot
2020-11-02Implement cubeb_stream_get_input_latency for the new AAudio backend.Paul Adenot
2020-11-02Implement cubeb_stream_get_latency for the new AAudio backend.Paul Adenot
2020-11-02Remove context and stream name related code, this is not used on Android.Paul Adenot
2020-11-02Repair opensl output latency, integer division issue.Paul Adenot
2020-11-02Use C++ style unused argument instead of C-style.Paul Adenot
2020-11-02Use sizeof instead of numeric litterals.Paul Adenot
2020-11-02Make the low-latency/powersave policy choice dynamic, based on latency.Paul Adenot
This adds a new file that shares the value between the two non-obsolete android backend.
2020-11-02Use a constant instead of a define.Paul Adenot
2020-11-02Capitalize enums, as it's done elsewhere.Paul Adenot
2020-10-30Tell GTest that RTTI is not available for clang (for other compilers it's ↵Paul Adenot
automatically detected)
2020-10-30Don't use exception in the new cubeb_aaudio.cpp, and don't build with ↵Paul Adenot
exception or RTTI
2020-10-28Fix rebase for new latency methodnyorain
2020-10-28aaudio: Make sure to completely cleanup streamsnyorain
2020-10-28Add minor documentation and logsnyorain
2020-10-28Move aaudio backend to C++ & enable low latencynyorain
2020-10-28AAudio: Address first review commentsnyorain
2020-10-28AAudio: destroy pthread_condattrnyorain
2020-10-28AAudio: Fix codestylenyorain
2020-10-28AAudio: Fix cv clock for android < 21nyorain
2020-10-28AAudio: Use condition variable instead of sleepingnyorain
This removes the constant checking for state changes with 5ms of sleep in between for the state thread. We need a new thread to wakeup the state thread reliably without blocking in the audio thread. For a more detailed and theoretical explanation of the problem and solution (specifically written for this commit), see: https://nyorain.github.io/lock-free-wakeup.html Now, will only do this time-based sleeping when actively waiting for a state change. We can't implement that with a blocking call to AAudioStream_waitForStateChange since that can't be woken up and we furthermore might have to wait for multiple streams at once. This also fixes some issues and race conditions with stream destruction and adds some more documentation.
2020-10-28AAudio: Implement stream_set_volumenyorain
2020-10-28AAudio: don't send stopped state after drainingnyorain
2020-10-28Add android level with aaudio to CInyorain
2020-10-28Remove pthread from libraries on androidnyorain
2020-10-28Fix codestylenyorain
2020-10-28Add first AAudio backend prototypenyorain
2020-10-20Remove add_latency from resampling code, it's not usedPaul Adenot
2020-10-20Don't add initial delay to resamplersPaul Adenot
2020-10-20Revert "Don't account for unresampled data when computing how much input is ↵Vitor Kiguchi
needed." This reverts commit d0127cdb668fe7908397ba4eaca2dc1e8600fc09. From testing this caused the audio to get out of sync(delayed) in Citra.
2020-10-19Add an option to not automatically connect ports on jack. (#613)Richard Dodd (dodj)
2020-10-13Add stream_set_name = null to cubeb_ops structs (#617)khng300
This change is for OSS backend.
2020-10-12oss: Initialize cubeb_stream::state properly (#618)khng300
2020-10-09OSS (FreeBSD/illumos) backend (#600)khng300
* ossaudio (FreeBSD currently) backend The ossaudio backend was rewritten from the sunaudio backend. * Fix leaking of mixer_fd in oss_enumerate_devices * Both input/output can be detected at the same DSP * Update on device detection during enumeration * Remove spurious calls to SNDCTL_CARDINFO * Fix string allocation detection in oss_enumerate_devices * On FreeBSD, try to open and probe the device's capability in oss_enumerate_devices * Rewrite oss_io_routine() to implement correctly for all stream directions * Add preferred device detection for FreeBSD * Emits stable devid from oss_enumerate_devices on FreeBSD * Fix SNDCTL_DSP_GETI/OSPACE calls in oss_stream_init * Use /dev/sndstat instead on FreeBSD for oss_enumerate_devices * Unify both play and record nfr and take the minimum value between them * Fix allocating both input/output buffers to input/output-only streams * Fix clipping issue * Fix misuse of input_device and output_device in oss_stream_init * Fix builds on Illumos * Code refactoring on oss_enumerate_devices * Improve oss_io_routine for the case when the stream is in both direction * Use fragsize instead of total buffer size for number of frames * Probe OSS audio availability in cubeb_init when backend is not specified * Fix scan-build10 report on src/cubeb_oss.c:285 * Add __DragonFly__ pp macro testing along-side __FreeBSD__ * Move oss_init in default_init[] table right below alsa to respect POLA * Fix use-after-free of s->mutex in oss_stream_destroy * Fix inconsistent indentation * Remove blocks_written from cubeb_stream * Add LL integer suffix to make 0x80000000 more clear * Add parsing of /dev/sndstat for hw.snd.verbose > 0 in FreeBSD * Do device setup in the order of channels, format and speed, according to developer/callorder.html of OSS v4.x API reference * Add proper latency_frame support for oss_stream_init * Mark close brackets and close braces NUL in oss_sndstat_line_parse * Search close brackets and close braces from the end of line in oss_sndstat_line_parse * Use 32 frames for each fragments in oss_calc_frag_params * Drop unnecessary #include <sys/sysctl.h> * Add support for cubeb_channel_layout * Compilation and scan-build fixes: * Fix warnings in oss_chn_from_cubeb * Include cubeb_mixer.h to have cubeb_channel_layout_nb_channels * Fix potential resource leakage in input_stream_layout->layout does not match input_stream_params->channels. (The same for output_stream_layout) * Classify cubeb_stream_params::layout and cubeb_stream_params::channels mismatch as CUBEB_ERROR_INVALID_PARAMETER * AUDIODEVICE can now override /dev/dsp AUDIODEVICE was chosen to match the sndio backend. * Change environment variable AUDIODEVICE to AUDIO_DEVICE in oss backend * Change the format of cubeb_device_info's friendly_name This avoids name collision when setting media.cubeb.output_device in about:config of Firefox. However, I think it makes more sense on Firefox's side to use device_id instead. * Fix warning of a missing %d in LOG() in oss_io_routine * Do not enable OSS compilation when SOUND_VERSION < 0x040000 * Add mutex to serialize access to cubeb_strings in cubeb_oss's cubeb_context * Change the calculation of fragsize/nfr to match stream latency, with 2 fragments available. By HPS * Now reuse the same thread for audiostream * Redo the duplex logic * Restructure the use of buffers * Fix problems dealing with draining * Revert "Fix problems dealing with draining" This reverts commit 30301ba101f8acadd1ff985cbf7eef48cef5ee36. * Revert "Restructure the use of buffers" This reverts commit 9823ca889ca407a202e7588229514b4b8cd99ec7. * Revert "Revert "Restructure the use of buffers"" This reverts commit 10dc869b852daea5ede3173ebaf76414562fbe93. * Revert "Revert "Fix problems dealing with draining"" This reverts commit 9d19b1094428ed960ef7683df9bee9fe769d78ac. * Make sure there are at least s->nfr available before calling data_cb * Kill a signed/unsigned comparison * Add The FreeBSD Foundation copyright line for recent commits * Fix race condition when restarting a stream by HPS Originally, when stopping a stream and immediately starting the stream again, the start call might be lost. * Do not signal the doorbell_cv again when a stream is already stopped This is redundant. * Revert "Do not signal the doorbell_cv again when a stream is already stopped" This reverts commit fbdf753fc720923336a979997ff85eeb9666b83b. * Make state changes look more similar to pulse backend This also allows drained/short-input stream to be resumed without stopping it first. * Remove a spurious s->running = false
2020-10-09Add stream preference to request a persistent stream session and implement ↵Admiral H. Curtiss
this in WASAPI.
2020-10-07Address review commentsPaul Adenot
2020-10-07Don't use AUDCLNT_STREAMOPTIONS_RAW on MinGW, it's not defined yet.Paul Adenot
This is proposed in https://www.mail-archive.com/[email protected]/msg17678.html, but not merged yet it seems.
2020-10-07Make RAW WASAPI streams opt-inPaul Adenot
2020-10-07Pass in AUDCLNT_STREAMOPTIONS_RAW when possible when initializing an AudioClientPaul Adenot
2020-10-07Require at least the windows 8.1 SDK for building cubebPaul Adenot
2020-10-07Add stream_set_name = null to cubeb_ops structsBrendan Early
2020-10-07Add method to change stream nameBrendan Early
2020-09-28Fix CMake rust path and only use rust deps if neededGuillaume Besson
2020-09-28jack: Add functions to connect a cb+phys port pairZoë Sparks
Ameliorates code duplication in cbjack_connect_ports().
2020-09-28jack: Special case playing mono source in stereoZoë Sparks
2020-09-22Fix wasapi_destroy_device usage, when it fails, in setup_wasapi_streamPaul Adenot
2020-09-22Clarify and fix expectations around wasapi_create_devicePaul Adenot
2020-09-21Address review commentsPaul Adenot
2020-09-21Add a test case for WASAPI reconfigure eventPaul Adenot