Smpeg and playing time?

Hi !
I want to program a little mp3 player with the smpeg-lib.
This lib works fine but i want to show the time how long a song is
currently running.

Now i wanted to know:

1.) does the smpeg-lib support the song-time (because there is a
skip-seconds)

2.) do mp3 files have a fixed framerate so that i only have to multiply
the current frame counter with the frames per second ?

I also have a problem with a c++ - class.
The class works fine until i just declare one more variable for example an
int. It doesn’t matter if this variable is private,public or protected.

The class represents a graphic object and my program controlls this
objects with a list. Without the variable declaration the program works with the
declaration the program get a segmentation fault.

I can’t exactly say when deg segv appears but i think its when i try to
delete the object from the list and from the screen;

Has anybody seen something like this before ?
Please tell me what i have to do or where i should start the search for
the segv.–
Sent through GMX FreeMail - http://www.gmx.net

gamsta at gmx.net wrote:

1.) does the smpeg-lib support the song-time (because there is a
skip-seconds)

Yes, through SMPEG_getinfo(), in the current_time field of the
SMPEG_Info structure.

2.) do mp3 files have a fixed framerate so that i only have to multiply
the current frame counter with the frames per second ?

Not always. However, SMPEG assumes this to estimate the total time when
the file is only audio, so current_time may be greater than total_time
for variable bitrate mp3…

Please tell me what i have to do or where i should start the search for
the segv.

Use gdb.

see ya,
Vivien Chappelier.