Module songbird::input [−][src]
Raw audio input data streams and sources.
Input
is handled in Songbird by combining metadata with:
- A 48kHz audio bytestream, via
Reader
, - A
Container
describing the framing mechanism of the bytestream, - A
Codec
, defining the format of audio frames.
When used as a Read
, the output bytestream will be a floating-point
PCM stream at 48kHz, matching the channel count of the input source.
Opus frame passthrough.
Some sources, such as Compressed
or the output of dca
, support
direct frame passthrough to the driver. This lets you directly send the
audio data you have without decoding, re-encoding, or mixing. In many
cases, this can greatly reduce the processing/compute cost of the driver.
This functionality requires that:
- only one track is active (including paused tracks),
- that track's input supports direct Opus frame reads,
- its
Input
meets the promises described herein, - and that track's volume is set to
1.0
.
Re-exports
pub use self::codec::Codec; |
pub use self::codec::CodecType; |
pub use self::reader::Reader; |
pub use self::restartable::Restartable; |
Modules
cached | In-memory, shared input sources for reuse between calls, fast seeking, and direct Opus frame passthrough. |
codec | Decoding schemes for input audio bytestreams. |
error | Errors caused by input creation. |
reader | Raw handlers for input bytestreams. |
restartable | A source which supports seeking by recreating its input stream. |
utils | Utility methods for seeking or decoding. |
Structs
ChildContainer | Handle for a child process which ensures that any subprocesses are properly closed on drop. |
Frame | Information used in audio frame detection. |
Input | Data and metadata needed to correctly parse a |
Metadata | Information about an |
Enums
Container | Marker and state for decoding framed input files. |
Functions
dca | Creates a streamed audio source from a DCA file. Currently only accepts the DCA1 format. |
ffmpeg | Opens an audio file through |
ffmpeg_optioned | Opens an audio file through |
ytdl | Creates a streamed audio source with |
ytdl_search | Creates a streamed audio source from YouTube search results with |