SDL_Mixer - get music duration

Hi,

I see SetPosition function but how I get know what is a total music length
of playing mp3?

Regards

Is it proportional to the size and bitrate of the file? Maybe experimenting
with seeking to various byte locations could be compared to song position?
Perhaps you would find that they match up nicely.On Sat, Apr 27, 2013 at 11:41 AM, Krzysztof wrote:

Hi,

I see SetPosition function but how I get know what is a total music length
of playing mp3?

Regards


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Then you realize MP3 supports variable bitrate…

2013/4/27, Christian Leger <chrism.leger at gmail.com>:> Is it proportional to the size and bitrate of the file? Maybe experimenting

with seeking to various byte locations could be compared to song position?
Perhaps you would find that they match up nicely.

On Sat, Apr 27, 2013 at 11:41 AM, Krzysztof wrote:

Hi,

I see SetPosition function but how I get know what is a total music
length
of playing mp3?

Regards


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It doesn’t look like that’s in the API. You should be able to add it
though, just look at the implementation of Mix_SetMusicPosition(), and see
how you would find the maximum position.On Sat, Apr 27, 2013 at 8:41 AM, Krzysztof wrote:

Hi,

I see SetPosition function but how I get know what is a total music length
of playing mp3?

Regards


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org