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

BUG: Re: [pygame] pygame.mixer.music Question



hey,

this seems to be a bug.  Thanks for finding it.

cu,



On Sun, Mar 22, 2009 at 5:07 PM, high <sunyonggao@xxxxxxxxx> wrote:
> Hello all!
>
> When using pygame.mixer.music, I encountered a strange problem,
> as follows:
>
> 1.The following code can be a
> normal player, you can hear the music
>
> import pygame,time
> ###########pygame.init()
> pygame.mixer.init()
> pygame.mixer.music.load('music.ogg')
> pygame.mixer.music.play()
> while pygame.mixer.music.get_busy():
> time.sleep(0.1)
>
> 2.When add pygame.init(),Can not hear the music
>
> import pygame,time
> pygame.init()
> pygame.mixer.init()
> pygame.mixer.music.load('music.ogg')
> pygame.mixer.music.play()
> while pygame.mixer.music.get_busy():
> time.sleep(0.1)
>
> 3.But First pygame.mixer.init() are well
>
> import pygame,time
> pygame.mixer.init()
> pygame.init()
> pygame.mixer.music.load('music.ogg')
> pygame.mixer.music.play(-1)
> while pygame.mixer.music.get_busy():
>    print time.ctime()
>    time.sleep(0.1)
>
> [The end]
>
>
>
>