Cutting Wav's off instead of playing them

Previous topic - Next topic

S. P. Gardebiter

I would be happy with a function that just cuts a wave off (if all channels are used) and starts playings it again. (instead of playing the full wave file and ignoring the playsound command)
~ Cave Story rules! ~

Kitty Hello

Oh. Good idea. I'll think about it.
Maybe a STOPSOUND is required.

FutureCow

I too would like to see a STOPSOUND.

Stu_C


Sorry to reactivate this thread but I really could do with STOPSOUND too :)

/Stu
www.ovine.net

Kitty Hello

It's on my TODO. I have implemented it already but not tested so far.
HUSH is a bit of overkill, right?

FutureCow

HUSH is a useful command to have, but sometimes you want to be able to stop an individual sound too.

MikeHart

Yes, I need a StopCommand in my game too as I need to stop sounds when a game object is leaving the scene.

Can you release the command with a big beta mark on it so we can test it?

StuC_Ovine


Yea HUSH is still needed but its nice to stop individual sounds.


Whilst your in there, is there a chance we can have a LOOP flag on the PLAYSOUND as we have in the PLAYMUSIC ? -  Its nice for ambient sounds so we can loop them but kill them off when not needed with the STOPSOUND.


Kitty Hello

do it yourself with ISSOUNDPLAYING()

MikeHart

Quote from: Kitty Hello on 2009-Aug-26
do it yourself with ISSOUNDPLAYING()

Yes, you could that but depending on how much is going on in a frame it could lead to hearable gab between the end and the start of a sound.

StuC_Ovine


What he said ^  =D

Ive put a loop in but seeing that its not automatic there may be a slight silence when the loop is restarted manually.  Sounds ok whilst the game loop is so quick, but I'd imagine once theres a bit more going on then the looping sound will suffer from slight silence.


MikeHart

Like in my game AstroCrusher which I'm porting ot GLBasic; When the enemy appears, I have an short alarm sound going as long it is on the screen. And that sound needs looping.

Moru

It's still not possible to specify a starting position for a sound sample I guess? Start x seconds into the sound for example.

Kitty Hello

#13
No, and I have no way to do the start at x, because I use SDL for many platforms and sound playback is quite limited on features there.
edit - cmd is in.