AudioData Class

Inheritance diagram of AudioData

class AudioData(data, length, timestamp, duration, events)

A single packet of audio data.

This class is used internally by pyglet.

Variables:
  • data – Sample data.
  • length – Size of sample data, in bytes.
  • timestamp – Time of the first sample, in seconds.
  • duration – Total data duration, in seconds.
  • events – List of events contained within this packet. Events are timestamped relative to this audio packet.

Constructor:

__init__(data, length, timestamp, duration, events)

Methods:

consume(bytes, audio_format) Remove some data from beginning of packet.
get_string_data() Return data as a string.

Methods

AudioData.consume(bytes, audio_format)

Remove some data from beginning of packet. All events are cleared.

AudioData.get_string_data()

Return data as a string. (Python 3: return as bytes)

Table Of Contents

Previous topic

AbstractSourceLoader Class

Next topic

AudioFormat Class