UserDataAudio

from panda3d.core import UserDataAudio
class UserDataAudio

Bases: MovieAudio

A UserDataAudio is a way for the user to manually supply raw audio samples. remove_after_read means the data will be removed if read once. Else data will be stored (enable looping and seeking). Expects data as 16 bit signed (word); Example for stereo: 1.word = 1.channel,2.word = 2.channel, 3.word = 1.channel,4.word = 2.channel, etc.

Inheritance diagram

Inheritance diagram of UserDataAudio

__init__(*args, **kwargs)
append()

C++ Interface: append(const UserDataAudio self, DatagramIterator src, int len) append(const UserDataAudio self, bytes param0)

/**
  • Appends audio samples to the buffer.

*/

/**
  • Appends audio samples to the buffer from a datagram. This is intended to

  • make it easy to send streaming raw audio over a network.

*/

/**
  • Appends audio samples to the buffer from a string. The samples must be

  • stored little-endian in the string. This is not particularly efficient,

  • but it may be convenient to deal with samples in python.

*/

done()

C++ Interface: done(const UserDataAudio self)

// A promise not to write any more samples.

/**
  • Promises not to append any more samples, ie, this marks the end of the

  • audio stream.

*/

getClassType()

C++ Interface: get_class_type()

get_class_type()

C++ Interface: get_class_type()