MovieAudio

class MovieAudio

Bases: TypedWritableReferenceCount, Namable

A MovieAudio is actually any source that provides a sequence of audio samples. That could include an AVI file, a microphone, or an internet TV station.

The difference between a MovieAudio and a MovieAudioCursor is like the difference between a filename and a file handle. The MovieAudio just indicates a particular movie. The MovieAudioCursor is what allows access.

Inheritance diagram

Inheritance diagram of MovieAudio

explicit MovieAudio(std::string const &name = "Blank Audio")
MovieAudio(MovieAudio const&) = default

This constructor returns a null audio stream — a stream of total silence, at 8000 samples per second. To get more interesting audio, you need to construct a subclass of this class.

static PointerTo<MovieAudio> get(Filename const &name)

Obtains a MovieAudio that references a file. Just calls MovieTypeRegistry::make_audio().

static TypeHandle get_class_type(void)
Filename const &get_filename(void) const

Returns the movie’s filename. A movie is not guaranteed to have a filename, if not, then this function returns a null filename.

virtual PointerTo<MovieAudioCursor> open(void)

Open this audio, returning a MovieAudioCursor