On Sat, Oct 4, 2008 at 2:49 PM, Alex Holkner <[EMAIL PROTECTED]> wrote:
>
> On Sat, Oct 4, 2008 at 12:43 PM, m e <[EMAIL PROTECTED]> wrote:
>>
>> On Sat, Oct 4, 2008 at 2:19 PM, Alex Holkner <[EMAIL PROTECTED]> wrote:
>>>
>>> On Thu, Oct 2, 2008 at 4:16 PM, matthew <[EMAIL PROTECTED]> wrote:
>>> >
>>> > Hi,
>>> >
>>> > When I try to play a sound, it loops until I close the program. E.g.:
>>> >>>> import pyglet
>>> >>>> pyglet.media.load('C:\\Windows\\Media\\ding.wav',
>>> >>>> streaming=False).play()
>>> >
>>> > Changing the value of streaming doesn't help. It happens with other
>>> > files, including an ogg file.
>>> >
>>> > I'm using Windows XP, python 2.5.2, AVBin 5, and pyglet 1.1.1.
>>> > Removing AVBin doesn't help. Running python as an administrator
>>> > doesn't help. Doing the same thing on Ubuntu Hardy without AVBin (with
>>> > a different wav file) works fine.
>>>
>>> Could you post a complete non-working example? I can't reproduce your
>>> problem here. (Also try the examples/noisy/noisy.py program, which
>>> plays sounds in a similar way).
>>>
>> That is a complete working example. noisy works fine.
>>
>> Most of the problem is that I'm not calling pyglet.app.run()
>> afterwards. I'm just unsure why it works on Linux but not on Windows.
>
> run() is needed so that pyglet.media can pump the sound buffers. That
> it works on Linux without it is a fluke, and probably particular to
> the length of the sound as well.
>
Okay then, thanks.
Matthew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---