Panda3D
Functions
movieAudioCursor.I File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

Go to the source code of this file.

Functions

 PT (MovieAudio) MovieAudioCursor
 Returns the MovieAudio which this cursor references. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
jyelon
Date
2007-07-02

Definition in file movieAudioCursor.I.

Function Documentation

◆ PT()

PT ( MovieAudio  )
inline

Returns the MovieAudio which this cursor references.

Returns the audio sample rate. Returns the number of audio channels (ie, two for stereo, one for mono). Returns the length of the movie. Attempting to read audio samples beyond the specified length will produce silent samples.

Some kinds of Movie, such as internet TV station, might not have a predictable length. In that case, the length will be set to a very large number: 1.0E10.

Some AVI files have incorrect length values encoded into them - they may be a second or two long or short. When playing such an AVI using the Movie class, you may see a slightly truncated video, or a slightly elongated video (padded with black frames). There are utilities out there to fix the length values in AVI files.

An audio consumer needs to check the length, the ready status, and the aborted flag. Returns true if the movie can seek. If this is true, seeking is still not guaranteed to be fast: for some movies, seeking is implemented by rewinding to the beginning and then fast-forwarding to the desired location. Even if the movie cannot seek, the seek method can still advance to an arbitrary location by reading samples and discarding them. However, to move backward, can_seek must return true. Returns true if seek operations are constant time. If aborted is true, it means that the "ready" samples are not being replenished. See the method "ready" for an explanation. Returns the current offset within the file. Skip audio samples from the stream. This is mostly for debugging purposes.

Definition at line 17 of file movieAudioCursor.I.