mvPlaySpeed(3dm) mvPlaySpeed(3dm) NAME mvSetPlaySpeed, mvGetPlaySpeed, mvGetCurrentDirection - Control rate of playback for a movie instance SYNOPSIS #include <dmedia/moviefile.h> #include <dmedia/movieplay.h> void mvSetPlaySpeed(MVid movieId, double newPlaySpeed); double mvGetPlaySpeed(MVid movieId); MVdirection mvGetCurrentDirection(MVid movieId); DESCRIPTION mvSetPlaySpeed(3dm) changes the movie play speed, expressed as a fraction of the movie's natural image frame rate. This frame rate is stored in the movie file (SGI and QuickTime only) and it may be determined by calling mvGetImageRate(3dm). For example, if you call mvSetPlaySpeed(3dm) with a value of 2.0, the movie plays twice as fast as it normally would. For movies with audio, the Movie Playback Library attempts to resample the audio to match the requested playback speed. This changes the pitch of the audio. Be aware that the current implementation uses software techniques to perform audio resampling; thus, changing the speed of playback for a movie with an audio sound-track will consume more processor time. If you specify a negative value for newplayspeed, the movie plays in reverse. You should use mvGetCurrentDirection(3dm) to determine the direction the movie is actually playing, because the swinging loop mode may cause the movie to play in a direction other than that indicated by the sign of the current speed. See mvPlayLoop(3dm) for details. The default movie speed is always 1.0. mvGetPlaySpeed(3dm) returns the current play speed. The results of mvSetPlaySpeed(3dm) depend on whether or not the movie is playing every frame (see mvSetPlayEveryFrame(3dm)). If the movie is not playing every frame, then mvSetPlaySpeed(3dm) acts as described above. If the movie is playing every frame, then mvSetPlaySpeed(3dm) will have no effect. You may call these functions for a specified movie instance regardless of whether or not the movie is playing. NOTES The method the Movie Playback Library uses to resample audio for variable speed playback does not perform any filtering. Thus, the pitch-shifted audio may have aliasing artifacts. SEE ALSO mvBindOpenGLWindow(3dm), mvIntro(3dm), mvPlay(3dm), mvPlayLoop(3mv), mvSetPlayEveryFrame(3dm). Page 2