Multiple audio tracks.

Non-platform specific questions.

Multiple audio tracks.

Postby BloodRedDragon » Sat Nov 23, 2013 1:19 am

I'm trying to have dynamic music by using multiple audio files playing at the same time to create the background music, but Game Editor simply can't carry out two lines of code at once with all the ways I've tried. So I can't get the files to synchronize with each other, therefore they are out of time.

I'm using the PlaySound script in the script editor with variables for each channel. I have two actors each playing one sound file on the Create Actor event.

Anyone have any ideas? Is there a way to load two audio files within the same line of code?
Help is appreciated more than ever, as this is for a university project.
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: Multiple audio tracks.

Postby skydereign » Sat Nov 23, 2013 7:47 am

BloodRedDragon wrote:but Game Editor simply can't carry out two lines of code at once with all the ways I've tried.

You can technically (by using && to combine the two into one "line of code"), but even running one line of code is not the issue. You want two functions to be ran at the same time, and for them to complete at the same time, which gE can't do. If you are dealing with small sound files, the delay between the two PlaySound2 function calls should be negligible. But since you are loading music, there is no reliable way to sync the two sounds since the speed each sound loads will change slightly on different computers.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Multiple audio tracks.

Postby BloodRedDragon » Sun Nov 24, 2013 1:53 am

Thanks a lot for the help. Yeah i guess this is true, I know a few books that tell me a lot about how i would get dynamic music to work, but it requires far too much to look into, and I only have two months. Glad i got it cleared up though.
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron