directX audio backend sets things up in a way that audio can't be
played until after a window is created. The docs for pygame.mixer.init
allude to this:
http://www.pygame.org/docs/ref/mixer.html#pygame.mixer.init
***
Yes, that is what I read and was refering to when I tried explaining it. I
di
I tested the cases Clare mentioned, and was able to get the same
behavior as her (specifically that doing a pygame.init first, sound
would never be heard until after a display was sucessfully created,
while doing a pygame.mixer.init first, the sound worked in all cases).
Also, if I replace pygame.i
07 8:34 PM
Subject: Re: [pygame] pygame.init before pygame.mixer.init?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
RR4CLB wrote:
> Hi Clare,
>
> I still think it is the same problem as before. The get_busy is only busy
> when the file is playing. You have delayed it to allow th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
RR4CLB wrote:
> Hi Clare,
>
> I still think it is the same problem as before. The get_busy is only busy
> when the file is playing. You have delayed it to allow the file to Queue in
> and that has fixed it. If your hard drive is slow that would
Hi Clare,
I still think it is the same problem as before. The get_busy is only busy
when the file is playing. You have delayed it to allow the file to Queue in and
that has fixed it. If your hard drive is slow that would cause it. Most things
on the screen will not become active until the
I did a little more testing:
OS: Windows XP
Pygame: I installed v1.7.1 for Win32 and Python 2.5
(http://www.pygame.org/ftp/pygame-1.7.1release.win32-py2.5.exe)
I've reproduced the problem on one other WinXP machine with the same
Pygame release, but the problem doesn't occur on my WinXP machine at
Hi Clare,
comments below
On 10/10/07, Clare Richardson <[EMAIL PROTECTED]> wrote:
> I writing a program to simply play one sound (see below for the code),
> and came across some interesting behavior. If I call pygame.init()
> before pygame.mixer.init(), I don't hear any sound playing. However i
Sent: Wednesday, October 10, 2007 5:27 PM
Subject: RE: [pygame] pygame.init before pygame.mixer.init?
I tried running your code and don't hear anything playing. I added back
pygame.mixer.init() before pygame.init() in your code, and it played.
--
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Clare Richardson wrote:
> Is this a known behavior? What's causing the problem? I understand
> that I don't need pygame.init to just play a sound, but I don't think it
> should matter if I call it.
Hi,
I just ran your code, and it played the sound
er 10, 2007 4:18 PM
To: pygame-users@seul.org
Subject: Re: [pygame] pygame.init before pygame.mixer.init?
The simplest thing to do is:
---
import pygame
from pygame.locals import *
pygame.init()
sound = pygame.mixer.Sound("bark.wav")
sou
The simplest thing to do is:
---
import pygame
from pygame.locals import *
pygame.init()
sound = pygame.mixer.Sound("bark.wav")
sound.play()
while pygame.mixer.get_busy():
pass
---
...because "pygame.locals" is everything
11 matches
Mail list logo