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:

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 Reader's audio bytestream.

Metadata

Information about an Input source.

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 and creates an audio source.

ffmpeg_optioned

Opens an audio file through ffmpeg and creates an audio source, with user-specified arguments to pass to ffmpeg.

ytdl

Creates a streamed audio source with youtube-dl and ffmpeg.

ytdl_search

Creates a streamed audio source from YouTube search results with youtube-dl(c),ffmpeg, and ytsearch. Takes the first video listed from the YouTube search.