Table of Contents

 
GetMusicLength
 

Purpose

Returns the length of the music clip in milliseconds

 

Protoype

int CSoundMngr::GetMusicLength (string str_music)
 

Parameters

music the ID of the music object to query
 

Description

This function queries a music object and returns the length of it in milliseconds. The first time this function is used is the slowest, because it has to access an internal engine function to get the clip length. However after that the length is stored in the object itself, and extraction is much speedier since no additional function call is made.

 

Use

CSoundMngr sound;
int i_len = sound.GetMusicLength("my_music");
 

Prev: FadeOut