~.buffer
Buffer Audio Source
BufferAudioSource
BufferAudioSource(
buffer: bytearray | bytes | memoryview,
duration: float | None = None,
*,
bitrate: str | None = None,
channels: int | None = None,
name: str | None = None,
volume: float | str | None = None
)
Bases: AudioSource
Buffered audio source implementation.
Create a buffered audio source.
| PARAMETER | DESCRIPTION |
|---|---|
buffer
|
The audio data as a buffer.
TYPE:
|
duration
|
If provided, the duration of this source - Required if using player timestamp properties/fields.
TYPE:
|
bitrate
|
If provided, the bitrate in which to play this source back at.
TYPE:
|
channels
|
If provided, the amount of channels this source plays with.
TYPE:
|
name
|
If provided, an internal name used for display purposes.
TYPE:
|
volume
|
If provided, overrides the player's set/default volume. Can be scaled ( |
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
|
ValueError
|
|
bitrate
property
bitrate: str | None
If provided, the bitrate in which this source is played back at.