swfdec.Audio — Object used for audio output.
SwfdecAudio is the way audio output is provided by a
swfdec.Player
See its documentation on how to access
swfdec.Audio objects.
An audio object gives access to one audio stream played inside a player. You are responsible for outputting this data, swfdec does not try to do this for you.
Audio data is always provided in 16bit host-endian stereo. If the data was encoded into a different format originally, Swfdec will already have decoded it. The data is always referenced relative to the player. Sample 0 references the first sample to be played at the current position. If the player gets iterated, sample 0 changes. There is no way to access samples belonging to a previous state.
def render(dest, start_offset, n_samples)
| Memory area to render to. |
| offset in samples at which to start rendering.
The offset is calculated relative to the last iteration,
so the value set by
swfdec.Player.advance()
is ignored. |
| Amount of samples to render. |
Renders the samples from audio into the area pointed to by dest. The data is added to dest, so you probably want to initialize dest to silence before calling this function.