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

Re: [pygame] MPEG problems



Thanks Willi,

Yes, I had already checked that with "lsof /dev/dsp" (as esd in gnome
usually takes the sound device), but nobody is using it.

Anyway, I have found the problem: it is needed to unitialize the mixer
module with "pygame.mixer.quit()" before playing the movie.

With that modification, the code works perfect with Linux, but still no
image with Win32 (sound ok).

arnau


Willi Kappler wrote:

>Hi Arnau,
>
>Am Sonntag 21 August 2005 14:03 schrieb Arnau Sánchez:
>
><snip>
>
>  
>
>>all (it gives a "cannot find /dev/sequencer" error, but I think that's
>>    
>>
>
>libsdl can't initialise the soundsystem. You should check if the sounddevice 
>isn't occupied by an other programm (see code below). Are you running KDE ?
>Try running your app with "./artsdsp myapp.py" or kill artsd completly: 
>"killall artsd && ./myapp.py"
>
>import pygame, sys, time
>size=320,240
>pygame.init()
>display = pygame.display.set_mode(size)
>if pygame.mixer.get_init() == None:
>    print "no sounddevice available!"
>mov = pygame.movie.Movie("test.mpg")
>mov.set_display(display)
>mov.play()
>while mov.get_busy():
>    time.sleep(0.1)
>sys.exit(0)
>
>HTH,
>Willi
>
>
>  
>