Getting the length of a SDL_mixer chunk?

I’m in need of getting the length of a specified SDL_mixer chunk. I
couldn’t find any functions in the SDL_mixer API for returning this, but
noticed that the Mix_Chunk struct has a field named “alen”. Is it safe
to use this field directly, or will this result in incompabilities ?

Also, could a function for returning the length of a SDL_mixer chunk be
added in a future version of SDL_mixer ? I’d submit a patch, but I’m
not 100% sure I’m using the alen field correctly …

“alen / (number of bytes per sample) / (number of channels)” should
return the number of samples, right ?

  • Gerry

Also, why doesn’t Mix_LoadMUS_RW have an autofree-flag for the RWops ?

  • Gerry

“alen / (number of bytes per sample) / (number of channels)” should
return the number of samples, right ?

Yes.

–ryan.