Expand description
§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 for an example of extending libcubeb via implementing a cubeb backend in rust.
To get started, have a look at the StreamBuilder
Modules§
Structs§
- Channel
Layout - Some common layout definitions
- Context
- Context
Ref - Device
- Device
Collection - Device
Collection Ref - Device
Format - Architecture specific sample type.
- Device
Info - Device
Info Ref - Device
Ref - Device
Type - Whether a particular device is an input device (e.g. a microphone), or an output device (e.g. headphones).
- Error
- Mono
Frame - A monaural frame.
- Stereo
Frame - A stereo frame.
- Stream
- Audio input/output stream
- Stream
Builder - Stream builder
- Stream
Callbacks - Stream
Params - Stream
Params Builder - Stream
Params Ref - Stream
Prefs - Miscellaneous stream preferences.
- Stream
Ref
Enums§
- Device
State - The state of a device.
- Error
Code - An enumeration of possible errors that can happen when working with cubeb.
- LogLevel
- Level (verbosity) of logging for a particular cubeb context.
- Sample
Format - State
- Stream states signaled via
state_callback
.
Traits§
- Frame
- A
Frame
is a collection of samples which have a a specific layout represented byChannelLayout
- Sample
- An extension trait which allows the implementation of converting void* buffers from libcubeb-sys into rust slices of the appropriate type.
Functions§
Type Aliases§
- Data
Callback - User supplied data callback.
- Device
Changed Callback - User supplied callback called when the underlying device changed.
- Device
Id - An opaque handle used to refer to a particular input or output device across calls.
- Result
- State
Callback - User supplied state callback.