On Thu, May 8, 2008 at 11:54 PM, Patrick Mullen <[EMAIL PROTECTED]> wrote:
> ... 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 wan
Ah, we could probably have a better way of sharing data. Maybe
something like a sub surface would be best.
But for now, you can copy the sound data and chop it up yourself.
cheers,
On Fri, May 9, 2008 at 5:28 PM, Brian Fisher <[EMAIL PROTECTED]> wrote:
> although it's probably not a huge thing
although it's probably not a huge thing, the sound constructor doc claims it
won't share the buffer:
"Note: The buffer will be copied internally, no data will be shared between
it and the Sound object."
if that's correct it means that approach would make copies of the music
But more importantly, h
You can get a buffer from Sound objects now.
http://pygame.org/docs/ref/mixer.html#Sound.get_buffer
Then combined with the constructor... pygame.mixer.Sound(buffer)
should do the trick.
http://pygame.org/docs/ref/mixer.html#pygame.mixer.Sound
cheers,
On Fri, May 9, 2008 at 5:20 PM, Brian Fisher
I didn't mean copying the sound - I meant with SDL could you make a mixer
chunk that pointed to a portion of some other chunk.
or are you saying it's easy in pygame to make a sound that points to a
subset of the content of another sound? (like a subsurface...) If so, how
would you do that?
On Fri
yeah, pretty much.
Doing that from python is just as easy though.
On Fri, May 9, 2008 at 5:16 PM, Brian Fisher <[EMAIL PROTECTED]> wrote:
> From looking at SDL_mixer it's hard to tell if it would even support playing
> from an offset... Would adding support for playing from an offset in pygame
>
>From looking at SDL_mixer it's hard to tell if it would even support playing
from an offset... Would adding support for playing from an offset in pygame
just be a matter of manually making a new chunk object that would point to a
place within the original chunk for the sample?
On Fri, May 9, 200
yeah, you'll have to chop up the Sound samples yourself for that...
which shouldn't be too hard.
cheers,
On Thu, May 8, 2008 at 8:09 PM, Ian Mallett <[EMAIL PROTECTED]> 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 t
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
Is it possible to start sound playback at an offset from the beginning
of the sound?
I'm working on a simple system for game music that changes with the
intensity of the game. The idea is to fade out one track while fading
in the new one, matching the beats, as the game intensity changes. To
get
11 matches
Mail list logo