summaryrefslogtreecommitdiffstats
path: root/third_party/rust/cubeb/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/rust/cubeb/src/lib.rs
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/cubeb/src/lib.rs')
-rw-r--r--third_party/rust/cubeb/src/lib.rs38
1 files changed, 38 insertions, 0 deletions
diff --git a/third_party/rust/cubeb/src/lib.rs b/third_party/rust/cubeb/src/lib.rs
new file mode 100644
index 0000000000..7e9764941b
--- /dev/null
+++ b/third_party/rust/cubeb/src/lib.rs
@@ -0,0 +1,38 @@
+//! # libcubeb bindings for rust
+//!
+//! This library contains bindings to the [cubeb][1] 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.
+//!
+//! [1]: https://github.com/kinetiknz/cubeb/
+//!
+//! 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.
+//!
+//! To get started, have a look at the [`StreamBuilder`]
+
+// Copyright © 2017-2018 Mozilla Foundation
+//
+// This program is made available under an ISC-style license. See the
+// accompanying file LICENSE for details.
+
+extern crate cubeb_core;
+
+mod context;
+mod frame;
+mod sample;
+mod stream;
+
+pub use context::*;
+// Re-export cubeb_core types
+pub use cubeb_core::{
+ ffi, ChannelLayout, Context, ContextRef, Device, DeviceCollection, DeviceCollectionRef,
+ DeviceFormat, DeviceId, DeviceInfo, DeviceInfoRef, DeviceRef, DeviceState, DeviceType, Error,
+ ErrorCode, LogLevel, Result, SampleFormat, State, StreamParams, StreamParamsBuilder,
+ StreamParamsRef, StreamPrefs, StreamRef,
+};
+pub use frame::*;
+pub use sample::*;
+pub use stream::*;