On this page

AudioSource

from noon import AudioSource

Source-derived class. Host availability is not inferred from this listing. See reference scope.

Bases: object. Declared members follow; inherited and dynamically attached members are not expanded.

Prepared immutable mono/stereo PCM owned by Rust.

Use small_discovery() for the bundled original CC0 music, or
from_interleaved() for already-decoded PCM. A reused source crosses the
Python/Rust boundary only once; clip attachment shares its Rust payload.

AudioSource.__init__

AudioSource.__init__(self)
ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration

AudioSource.small_discovery

AudioSource.small_discovery(cls)

Decorators: classmethod

ParameterKindAnnotationDefault
clspositional or keywordNot annotatedNo default

Return annotation: Not annotated

Prepare the original 80-second stereo composition at 24 kHz.

Source declaration

AudioSource.from_interleaved

AudioSource.from_interleaved(cls, samples, *, sample_rate, channels=1)

Decorators: classmethod

ParameterKindAnnotationDefault
clspositional or keywordNot annotatedNo default
samplespositional or keywordNot annotatedNo default
sample_ratekeyword-onlyNot annotatedNo default
channelskeyword-onlyNot annotated1

Return annotation: Not annotated

Copy interleaved float PCM into an immutable shared Rust resource.

sample_rate is in Hz; channels is 1 or 2. Stereo samples alternate
left/right. Rust rejects nonfinite PCM and retains the original levels,
with no automatic normalization or clipping. File decoding is separate.

Source declaration

AudioSource.sample_rate

AudioSource.sample_rate(self)

Decorators: property

ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration

AudioSource.channels

AudioSource.channels(self)

Decorators: property

ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration

AudioSource.frames

AudioSource.frames(self)

Decorators: property

ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration