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

Re: [pygame] starting sound playback at offset





On Thu, May 8, 2008 at 8:09 PM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
I suppose it is possible to play the sound at zero volume until the starting point, then pause, and restart when you need to start.  This seems to me to be a decidedly low-tech solution though.
Ian

Although getting the timing right on this would be difficult - you would have to queue up a sound ahead of time at the low volume.  Another low tech solution I can think of would be to chop up your music into set time intervals and only fade between them at an interval.  A more high tech solution may be to use a sndarray, but I am completely unfamiliar with how these array objects can be used exactly.  but it may be that you can make an array, and then slive it from where you want to start, and it will modify the sound such as to start from where you want. 

There are no high-level interfaces for seeking through a sound though.  More sound control in pygame would be great.

If you do figure out how to "seek" using a sndarray let me know, I'd be interested in such a thing as well.