Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: daremes on Sun 15/08/2010 13:55:28

Title: Advanced sound looping, timing and synchronization?
Post by: daremes on Sun 15/08/2010 13:55:28
Hi,
I'm working on (not so simple after all) project for kids in my class and what I'm trying to do is that everytime I press a key (or let's say...left mouse-click) it should start the sound loop assigned to the left mouse-click and immediately stop the previous loop (the same loop sound). I need to do the same for right click and it mustn't affect the left-click loop (whether it's playing or not). And the timing is essential because the player has to sync two music themes (start 1 theme and then start 2). I'm sorry for my lousy english but I think you'll get the idea. Every opinion appreciated.
Title: Re: Advanced sound looping, timing and synchronization?
Post by: Pumaman on Sun 15/08/2010 14:40:13
Assuming you're using AGS 3.1.2, you can use PlaySoundEx to specify an explicit channel number for the left click and a different one for the right click, so that they always override the correct sound.