Name Description Size
android
cubeb-internal.h CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5 3372
cubeb-jni-instances.h The methods in this file offer a way to pass in the required JNI instances in the cubeb library. By default they return NULL. In this case part of the cubeb API that depends on JNI will return CUBEB_ERROR_NOT_SUPPORTED. Currently only one method depends on that: cubeb_stream_get_position() Users that want to use that cubeb API method must "override" the methods bellow to return a valid instance of JavaVM and application's Context object. 710
cubeb-jni.cpp clang-format off 2703
cubeb-jni.h 324
cubeb-speex-resampler.h 35
cubeb.c Note: All implementations of cubeb_stream must keep the following layout. 18364
cubeb_aaudio.cpp 61267
cubeb_alsa.c timersub() 40461
cubeb_android.h 440
cubeb_array_queue.h 1888
cubeb_assert.h This allow using an external release assert method. This file should only export a function or macro called XASSERT that aborts the program. 911
cubeb_audio_dump.cpp 5608
cubeb_audio_dump.h 3280
cubeb_audiotrack.c A lot of bytes for safety. It should be possible to bring this down a bit. 14742
cubeb_audiounit.cpp Testing empirically, some headsets report a minimal latency that is very low, but this does not work in practice. Lie and say the minimum is 256 frames. 123615
cubeb_jack.cpp static 36974
cubeb_kai.c We don't support more than 2 channels in KAI 8783
cubeb_log.cpp The maximum size of a log message, after having been formatted. 6897
cubeb_log.h Asynchronous logging macros to log in real-time callbacks. 2621
cubeb_mixer.cpp 1/sqrt(2) 20405
cubeb_mixer.h 961
cubeb_opensl.cpp Note: Must match cubeb_stream layout in cubeb.c. 62541
cubeb_oss.c Supported well by most hardware. 34400
cubeb_osx_run_loop.cpp This is needed so that AudioUnit listeners get called on this thread, and not the main thread. If we don't do that, they are not called, or a crash occur, depending on the OSX version. 1114
cubeb_osx_run_loop.h On OSX 10.6 and after, the notification callbacks from the audio hardware are called on the main thread. Setting the kAudioHardwarePropertyRunLoop property to null tells the OSX to use a separate thread for that. This has to be called only once per process, so it is in a separate header for easy integration in other code bases. 646
cubeb_pulse.c 52402
cubeb_resampler.cpp 13098
cubeb_resampler.h Create a resampler to adapt the requested sample rate into something that is accepted by the audio backend. @param stream A cubeb_stream instance supplied to the data callback. @param input_params Used to calculate bytes per frame and buffer size for resampling of the input side of the stream. NULL if input should not be resampled. @param output_params Used to calculate bytes per frame and buffer size for resampling of the output side of the stream. NULL if output should not be resampled. @param target_rate The sampling rate after resampling for the input side of the stream, and/or the sampling rate prior to resampling of the output side of the stream. @param callback A callback to request data for resampling. @param user_ptr User data supplied to the data callback. @param quality Quality of the resampler. @retval A non-null pointer if success. 3046
cubeb_resampler_internal.h This header file contains the internal C++ API of the resamplers, for testing. 23022
cubeb_ring_array.h Ring array of pointers is used to hold buffers. In case that asynchronous producer/consumer callbacks do not arrive in a repeated order the ring array stores the buffers and fetch them in the correct order. 3916
cubeb_ringbuffer.h Single producer single consumer lock-free and wait-free ring buffer. This data structure allows producing data from one thread, and consuming it on another thread, safely and without explicit synchronization. If used on two threads, this data structure uses atomics for thread safety. It is possible to disable the use of atomics at compile time and only use this data structure on one thread. The role for the producer and the consumer must be constant, i.e., the producer should always be on one thread and the consumer should always be on another thread. Some words about the inner workings of this class: - Capacity is fixed. Only one allocation is performed, in the constructor. When reading and writing, the return value of the method allows checking if the ring buffer is empty or full. - We always keep the read index at least one element ahead of the write index, so we can distinguish between an empty and a full ring buffer: an empty ring buffer is when the write index is at the same position as the read index. A full buffer is when the write index is exactly one position before the read index. - We synchronize updates to the read index after having read the data, and the write index after having written the data. This means that the each thread can only touch a portion of the buffer that is not touched by the other thread. - Callers are expected to provide buffers. When writing to the queue, elements are copied into the internal storage from the buffer passed in. When reading from the queue, the user is expected to provide a buffer. Because this is a ring buffer, data might not be contiguous in memory, providing an external buffer to copy into is an easy way to have linear data for further processing. 15215
cubeb_sndio.c Note: Must match cubeb_stream layout in cubeb.c. 18820
cubeb_strings.c Look for string in string storage. @param strings Opaque pointer to interned string storage. @param s String to look up. @retval Read-only string or NULL if not found. 2859
cubeb_strings.h Opaque handle referencing interned string storage. 1271
cubeb_sun.c Default to 4 + 1 for the default device. 19285
cubeb_tracing.h Empty header to allow hooking up a frame profiler. 743
cubeb_triple_buffer.h Adapted and ported to C++ from https://crates.io/crates/triple_buffer 2393
cubeb_utils.cpp 544
cubeb_utils.h Similar to memcpy, but accounts for the size of an element. 8094
cubeb_utils_unix.h This wraps a critical section to track the owner in debug mode. 1678
cubeb_utils_win.h This wraps an SRWLock to track the owner in debug mode, adapted from NSPR and http://blogs.msdn.com/b/oldnewthing/archive/2013/07/12/10433554.aspx 1542
cubeb_wasapi.cpp clang-format off 114573
cubeb_winmm.c clang-format off 34478