Play sound - repeat?

Started by Best, Thu 26/08/2004 22:54:02

Previous topic - Next topic

Best

Excuse my. I have a sound that I want to play as a background sound. In short: I want it to repeat again and again in loop. Is it possible? Please help me.

Thanx
Valame tes lan-utas desi gronto?

Jay

Yes.
Use SetMusicRepeat(1).

But, uh, this is clearly stated in the manual.

TerranRich

Status: Trying to come up with some ideas...

Best

Ok, I try it once more: I dont want to repeat MUSIC. I want to repeat WAV sound. Is it possible or not? When I save wav as music file, it cannot be played. Repeatedly_execute cannot help me here, so what can I do?
Valame tes lan-utas desi gronto?

Ashen

Well, you could convert the wav to MP3 or OGG, or one of the supported file types, and use PlayMusic, and SetMusic Repeat.

If you really want / have to use wav, you could use PlaySoundEx and IsChannelPlaying, e.g.:

(in repeatedly execute)
if (IsChannelPlaying(3)==0)   PlaySoundEx(20, 3);

Alternatively, you could use PlayAmbientSound  -check manual for more details on how.

Hopefully one of these will work for you.


I know what you're thinking ... Don't think that.

Radiant

PlayAmbient would be best. Also you could probably check if the sound is still playing from RepExAlways, and re-play it from there if it isn't.

SMF spam blocked by CleanTalk