[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Problem with get_length and mp3
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Problem with get_length and mp3
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Sat, 21 Jun 2008 09:19:52 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 20 Jun 2008 19:19:57 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=jvyaTnMuoi6MiPeL44gAQj7mgVJkxXOP5IV3vldBmqo=; b=Z3tVhA1RMvER3MnhNuTCIi0zP3uqoEtrn8zs0JeMq0wWZwfKLIzbDFChkTsivOzI6i FnaxPqwc7wj6F6t2vLTQW7tug408lBVpbOJOU8xiZQt4SYS8wZAe5ixMxnCo4TvZkICC vzVUlvvr3O21ZKpnU5fiUr9WDQ6g1raf0N98o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=mBDgsat3ObcRnpnWCIx0s+v4Ia/DfJMkB3/dUiA/QfPw+wepamxIBlbhbq1I/KFcnH ICMSn5WyEGMY1FanyxE8BJhcB2bL+0X03eoVryXENRhaCVzqj9TeuuEdnjlWB0Ui5lyS A8PJ0cM0G9Xdb6os2Gyr9F69pEvlqn+z/Lqks=
- In-reply-to: <c3cc671d0806200510q7415377ekb1c96eddcd6cda90@xxxxxxxxxxxxxx>
- References: <c3cc671d0806200510q7415377ekb1c96eddcd6cda90@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
hi,
pygame has dodgey mp3 support, as it uses smpeg which doesn't do mp3 very well.
Mostly it's a good idea to use ogg vorbis format if you can, or use a
different way to convert the mp3 files to wav files then load those
with pygame.
cheers,
On Fri, Jun 20, 2008 at 10:10 PM, Stefan Huchler <s.huchler@xxxxxxxxx> wrote:
> Hi,
>
> i have following problem with pygame:
>
>>>> import pygame
>>>> pygame.mixer.init()
>>>> pygame.mixer.Sound('test.mp3')
> <pygame.mixer.Sound object at 0x7f16a8616350>
>>>> x = pygame.mixer.Sound('test.mp3')
>>>> x.get_length()
> 9.0702946181409061e-05
>
> the mp3 is 5min 18 sec long (xmms)
>
> pygame v. 1.8
>
> pygame < 1.8 dont support mp3 with pygame.mixer.Sound module and
> pygame.mixer.music has no get_lenth method so i have to use > 1.8
> i postet the problem on your irc channel one guy (_raz_) testet it
> with latest svn trunk, he confirmed that this bug is also with this
> version.
>
>
> greetings
>
> Stefan Huchler
> www.canta-game.org
>