LoadTrackIntoRam
TheLoadTrackIntoRamfunction loads a track's data into memory. If the track does not fit, the function returns an error.
pascal OSErr LoadTrackIntoRam (Track theTrack, TimeValue time, TimeValue duration, long flags);
theTrack- Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrackandGetMovieTrack(described on page 2-136 and page 2-188, respectively).time- Allows you to specify a portion of the track to load. The
timeparameter contains the starting time of the track segment to load. Thedurationparameter specifies the length of the segment to load. You must specify this time value in the movie's time coordinate system.duration- Allows you to specify a portion of the track to load. The
timeparameter contains the starting time of the track segment to load. Thedurationparameter specifies the length of the segment to load. You can use theGetTrackDurationfunction (described on page 2-176) to determine the length of the entire movie. Note that the media handler may load more data than you specify.flags- Gives you explicit control over what is loaded into memory and how long to keep it around. The following constants are provided:
enum { keepInRam = 1<<0, unkeepInRam = 1<<1, flushFromRam = 1<<2, loadForwardTrackEdits = 1<<3, loadBackwardTrackEdits = 1<<4 };
- You can set these flags in any combination that makes sense. For descriptions of the individual flag constants, see the description of the
LoadMovieIntoRamfunction on page 2-125.ERROR CODES
File Manager errors
invalidTrack -2009 This track is corrupted or invalid invalidDuration -2014 This duration value is invalid invalidTime -2015 This time value is invalid progressProcAborted -2019 Your progress function returned an error
Memory Manager errors
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help