[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] No pygame.mixer.Sound.get_current()?



> It's impossible to get this information accurately in a portable way.
> Because of various buffers, you can't actually be sure how much sound
> has come out of the speakers.  You can sometimes figure this out on
> specific machines though.

I'm afraid I don't understand. If it's not possible to get this
information accurately, due to buffers which would apparently apply to
all methods of audio output, then why do several pygame audio-related
modules include commands to produce this information? Among these are
cdrom and the mixer.music module you mentioned.

By the way, I did find both the "seek function" and the documentation
for mixer.music. The seek function was hidden in play(), and the
documentation itself is available only through
help(pygame.mixer.music), not the public documentation site.

Now I guess my original question has changed. I can now find my
position within a track, using your suggestion of
mixer.music.get_pos() (Though the value returned is relative only to
the current seek position, not the start of the file.) Now I'm missing
a get_length() function for mixer.music(). Is this something that can
be added?