Name Description Size
cubeb-internal.h CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5 3082
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. 895
cubeb-jni.cpp clang-format off 2703
cubeb-jni.h 254
cubeb-speex-resampler.h 35
cubeb.c Note: All implementations of cubeb_stream must keep the following layout. 17215
cubeb_aaudio.cpp 53824
cubeb_alsa.c snd_pcm_hw_params_alloca is actually a macro 40256
cubeb_android.h 440
cubeb_array_queue.h 1888
cubeb_assert.h Forward fatal asserts to MOZ_RELEASE_ASSERT when built inside Gecko. 573
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. 122679
cubeb_jack.cpp static 36536
cubeb_log.cpp The maximum size of a log message, after having been formatted. 6891
cubeb_log.h Asynchronous logging macros to log in real-time callbacks. 2621
cubeb_mixer.cpp 1/sqrt(2) 20404
cubeb_mixer.h 961
cubeb_opensl.c Note: Must match cubeb_stream layout in cubeb.c. 56322
cubeb_oss.c Supported well by most hardware. 34266
cubeb_osx_run_loop.c 429
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_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. 4235
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. 18491
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. 19151
cubeb_tracing.h 1053
cubeb_triple_buffer.h Adapted and ported to C++ from 2393
cubeb_utils.cpp 544
cubeb_utils.h Similar to memcpy, but accounts for the size of an element. 7959
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 1542
cubeb_wasapi.cpp clang-format off 112427
cubeb_winmm.c clang-format off 33167 2613