Crate cubeb [] [src]

libcubeb bindings for rust

This library contains bindings to the cubeb C library which is used to interact with system audio. The library itself is a work in progress and is likely lacking documentation and test.

The cubeb-rs library exposes the user API of libcubeb. It doesn't expose the internal interfaces, so isn't suitable for extending libcubeb. See [cubeb-pulse-rs][2] for an example of extending libcubeb via implementing a cubeb backend in rust.

Modules

ffi

Macros

cubeb_log
cubeb_log_internal
cubeb_logv

Structs

ChannelLayout

Some common layout definitions

Context
ContextRef
Device
DeviceCollection
DeviceCollectionRef
DeviceFormat
DeviceInfo
DeviceInfoRef
DeviceRef
DeviceType
Error
MonoFrame

A monaural frame.

StereoFrame

A stereo frame.

Stream
StreamBuilder
StreamCallbacks
StreamParams
StreamParamsBuilder
StreamParamsRef
StreamPrefs
StreamRef

Enums

DeviceState

The state of a device.

ErrorCode

An enumeration of possible errors that can happen when working with cubeb.

LogLevel

Level (verbosity) of logging for a particular cubeb context.

SampleFormat
State

Stream states signaled via state_callback.

Traits

Frame

A Frame is a collection of samples which have a a specific layout represented by ChannelLayout

Sample

An extension trait which allows the implementation of converting void* buffers from libcubeb-sys into rust slices of the appropriate type.

Functions

frame_from_bytes
frame_from_bytes_mut
init

Type Definitions

DataCallback
DeviceChangedCallback
DeviceId

An opaque handle used to refer to a particular input or output device across calls.

Result
StateCallback