Switch branches/tags
Nothing to show
Commits on Jun 12, 2018
  1. Fix volume handling in sndio backend

    ratchov authored and kinetiknz committed Jun 9, 2018
    Apply volume in software as do other backends. This is necessary
    because sndio volume may be controlled externally and there's no
    volume getter in libcubeb to notify the caller about volume
Commits on Jun 1, 2018
  1. osx: always access active stream count under context lock, BMO 146221…

    achronop authored and kinetiknz committed Jun 1, 2018
    …0. (#442)
Commits on May 1, 2018
  1. audiounit: use separate variables for each use of CFStringRef.

    achronop authored and kinetiknz committed Mar 29, 2018
  2. wasapi: if no playback check for capture device in init

    achronop authored and kinetiknz committed Mar 29, 2018
Commits on Apr 13, 2018
  1. wasapi: Make CO_E_NOTINITIALIZED a soft error.

    kinetiknz committed Apr 13, 2018
Commits on Mar 29, 2018
  1. audiounit: Fix up channel layout iteration logic.

    djg authored and kinetiknz committed Mar 29, 2018
Commits on Mar 27, 2018
  1. audiounit: Apply latency correction to stream_get_position. (#434)

    kinetiknz authored and padenot committed Mar 27, 2018
    The presentation latency of a stream is roughly kAudioDevicePropertyLatency +
    kAudioStreamPropertyLatency + kAudioUnitProperty_Latency.  Calculate this at
    device setup time and apply the correction when calculating the current stream
    position for stream_get_position.
  2. Initialize cubeb_stream_params.prefs field in more tests to avoid ran…

    kinetiknz committed Mar 27, 2018
    …dom failures.
Commits on Mar 26, 2018
  1. Remove output channel count limitation. (#433)

    jyavenard authored and padenot committed Mar 26, 2018
    Fixes #432
Commits on Mar 25, 2018
  1. Don't use _popcnt intrinsec on windows. (#431)

    jyavenard authored and padenot committed Mar 25, 2018
    Not all CPUs support it.
Commits on Mar 23, 2018
  1. Eliminate warning from MixerContext constructor.

    djg committed Mar 23, 2018
  2. pulse: check pa_context_connect return value

    oxij authored and kinetiknz committed Mar 7, 2018
Commits on Mar 22, 2018
  1. Change cubeb_mixer_mix input to be const void *

    djg authored and kinetiknz committed Mar 22, 2018
Commits on Mar 20, 2018
  1. wasapi: Remove COM initialization and require caller to complete.

    kinetiknz committed Mar 13, 2018
    This addresses the thread local COM initialization lifetime problem
    discussed in issue #416 by moving the responsibility for COM
    initialization from within cubeb to the caller.
  2. Remove stray `1 <<` from CUBEB_LAYOUT_3F2_BACK.

    djg committed Mar 20, 2018
  3. Fix heap overflow found by address sanitizer.

    djg authored and kinetiknz committed Mar 20, 2018
Commits on Mar 19, 2018
  1. Multi-channels support for windows/mac/linux (#426)

    jyavenard authored and padenot committed Mar 19, 2018
    * 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
    * 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.
Commits on Mar 12, 2018
  1. Relax some of the checks in the loopback test to avoid false positives.

    SingingTree authored and kinetiknz committed Mar 12, 2018
    - For the silent loopback test we check that we don't get any sound above an
    epsilon. The value of this epsilon has been increased to accommodate a wider
    range of systems.
    - The delay on all tests has been increased to allow for more time to capture
    looped samples. The original 150ms delay was sufficient on the machine I tested
    with, however, I've seen the tests fail due to not having enough looped input.
Commits on Mar 1, 2018
  1. When having on or two channel, force mono or stereo.

    padenot committed Feb 28, 2018
    Some devices (namely, Bose QC35, mark 1 and 2), expose a single channel mapped
    to the right for some reason, and this confuses our channel mapping code.
  2. Stop the stream properly for input-only streams on AudioUnit.

    padenot committed Feb 8, 2018
  3. WASAPI: Update input only stream stop logic to be similar to output a…

    SingingTree authored and padenot committed Feb 5, 2018
    …nd duplex streams.
    WASAPI input only streams were not stopping if the data callback returned
    values less than nframes. This is inconsistent with other backends and with
    the behaviour of duplex and output only streams. This commit updates this
    behaviour so these streams will now stop (internally the term drain is used,
    but stop is more suitable for input only streams).
  4. Clarify cubeb_data_callback ret value for input only streams.

    SingingTree authored and padenot committed Jan 19, 2018
    The description of the ret value of cubeb_data_callback specifies that it is
    the number of frames written to the output buffer. However, in the input only
    stream case no data should be written to the output buffer and the output
    buffer arg will be NULL.
    This leaves it unclear as to the value that should be returned in the input
    only case. To prevent a drain nframes should be returned, however, reading the
    documentation left me unsure as to if I should return 0 or nframes.
    This commit attempts to clarify the doc comment for input only streams.
  5. opensl: Pass in JNIEnv instead of JavaVM (#420)

    achronop authored and padenot committed Mar 1, 2018
Commits on Feb 26, 2018
  1. opensl: keep media lib access for older versions (#417)

    achronop committed Feb 26, 2018
Commits on Feb 19, 2018
  1. opensl es: remove methods relying on use of dlopen. (#412)

    achronop committed Feb 19, 2018
    opensl es: add new jni files.
    apply review commnets
    apply jchen comments
Commits on Feb 13, 2018
  1. Provide access to cubeb_stream's user ptr. (#407)

    djg committed Feb 13, 2018
    Provide access to cubeb_stream's user ptr.
    cubeb_stream in every backend has a copy of the user data ptr passed
    in during `stream_init` but there is no way to access the
    value. (Besides from `data_callback`/`state_callback`).
    Add `cubeb_stream_user_ptr()` to retrieve the stored value.
Commits on Feb 9, 2018
  1. wasapi: reset stream on invalidated device error (Bug 1426333).

    achronop committed Feb 9, 2018
    * wasapi: reset stream on invalidated device error.
    * wasapi: check stream start for error on reconfigure
    * wasapi: add logs on stream init/destroy
    * apply review comments
Commits on Feb 2, 2018
  1. audiounit: guard counter with stream mutex similar to stream init. (#411

    achronop authored and padenot committed Feb 2, 2018
Commits on Jan 26, 2018
  1. don't pass null string to CFRelease.

    padenot authored and achronop committed Jan 26, 2018
  2. Fix deadlock and device collection changed callback issue on OSX (#401)

    padenot committed Jan 26, 2018
    * Add an automated test to ensure creating a duplex stream with a device collection changed callback works.
    * Fix a deadlock
    When creating an aggregate device, and a device collection change callback was
    installed, a deadlock occured, because the device collection change listener was
    being called synchronously.
    Use GCD to send a task to a serial queue, and carefuly unlock the mutex in
    audiounit_stream_destroy to not deadlock on the queue.
    * Don't call the device collection change callback when creating cubeb's own aggregate device.
    * Remove std:: prefix, there is a using namespace std; now.
    * Address review comments
    * Address even more comments.
Commits on Jan 22, 2018
  1. Explicitly init stream_params.prefs in tests.

    SingingTree authored and kinetiknz committed Jan 22, 2018
    Also update the example code comment in cubbeb.h to reflect new param usage.

    SingingTree authored and kinetiknz committed Jan 19, 2018
    Add a comment to get_input_buffer explaining why we don't explicitly check for