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

[pygame] Sound.get_length() problem



Hi,

I have a problem with Sound.get_length() returning an 'AttributeError: get_length'.

Here's what I have:

import pygame.mixer

pygame.mixer.init(44100)
pygame.mixer.set_num_channels(4)

sound = pygame.mixer.Sound('cache/1.wav')
print sound.get_length() # <=== error occurs here
Channel = sound.play()

Running pygame 1.6 on OS X.

Any ideas?

Thanks, Arthur.