Forgot to ask... how is it that you are getting the length of these
audio files?
Erick
I'm not getting the length of the file, but rather the number of
samples in the audio. After calling the (modified) GetWaveformInfo()
function in Addey's routine (which loads the samples into a
MemoryBlock), I do this:
Dim samples as Integer
samples = (SoundMemoryBlock.Size - 84 ) / 2 // number of 16-bit samples
I've modified GetWaveformInfo() to return 16-bit samples instead of
8-bit samples. For 8-bit samples, I believe it's this:
samples = SoundMemoryBlock.Size - 42 // number of 8-bit samples
(but it might be minus 84 to skip the header, I forget.)
I also sanity check my result by taking the duration of the track and
multiply by the sample rate, as in:
Dim theSongDuration as Integer
Dim theMovieTimeScale as Integer
theSongDuration = GetMovieDuration(me.Movie.Handle) ' scaled
theMovieTimeScale = GetMovieTimeScale(me.movie.Handle)
g_theSongDuration_sec = theSongDuration / theMovieTimeScale
Dim samples as Integer
samples = theSongDuration * SoundSampleRate
Jeff
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>