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
sound, such that it won't play
if I call it immediately? And why does calling pygame.mixer.init first
make this problem go away?
-- Clare Richardson
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Clare Richardson
Sent: Wednesday, October 10, 2007 2:5
AIL PROTECTED]
On Behalf Of Clare Richardson
Sent: Wednesday, October 10, 2007 2:55 PM
To: pygame-users@seul.org
Subject: [pygame] pygame.init before pygame.mixer.init?
I writing a program to simply play one sound (see below for the code),
and came across some interesting behavior. If I call pyga
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
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 if
I call pygame.init *after* pygame.mixer.init (as below), the sound will
play.
Is this a
12 matches
Mail list logo