Playing Multiple Audio Tracks Simultaneously

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
vcirilli
Posts: 12
Joined: Sat Sep 03, 2022 7:58 pm

Playing Multiple Audio Tracks Simultaneously

Post by vcirilli » Sat Jan 07, 2023 8:22 pm

Is it possible to have multiple audio files playing at the same time.
Ex. Background music playing while a dialog track plays at the same time.
I've tried Play audioClip and Play File.
Both replace the previously playing file.
Working on Mac at the moment but eventually would like to build for Android/IOS

Thank Vincent

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Playing Multiple Audio Tracks Simultaneously

Post by richmond62 » Sat Jan 07, 2023 8:23 pm

I think you have already answered your question yourself.

vcirilli
Posts: 12
Joined: Sat Sep 03, 2022 7:58 pm

Re: Playing Multiple Audio Tracks Simultaneously

Post by vcirilli » Sat Jan 07, 2023 11:42 pm

Yes I found the documentation that states that.

Evidently a LC limitation, bummer.
Might there be a plugin to help with playing multiple audio tracks?

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Playing Multiple Audio Tracks Simultaneously

Post by SparkOut » Sun Jan 08, 2023 12:32 am

Uh... what documentation did you read?

You can't play embeded audioclips simultaneously, that I believe.
You can't simultaneously play two files in one Player object, but you can easily have multiple Player objects with different filenames playing at the same time. You just have to reference each one individually.

vcirilli
Posts: 12
Joined: Sat Sep 03, 2022 7:58 pm

Re: Playing Multiple Audio Tracks Simultaneously

Post by vcirilli » Sun Jan 08, 2023 3:49 am

I was using Play audioClip.
Player Object !! Thanks

vcirilli
Posts: 12
Joined: Sat Sep 03, 2022 7:58 pm

Re: Playing Multiple Audio Tracks Simultaneously

Post by vcirilli » Wed Jan 11, 2023 1:04 am

Player doesn't work on Android.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Playing Multiple Audio Tracks Simultaneously

Post by SparkOut » Wed Jan 11, 2023 2:27 am

Yes it does, but you have to create the object dynamically.
See mobileControlCreate in the dictionary. You have to create and manage these controls by script on opening a card and delete them again when you change card, or else they will stay open over the new card, which might interfere with the layout.

vcirilli
Posts: 12
Joined: Sat Sep 03, 2022 7:58 pm

Re: Playing Multiple Audio Tracks Simultaneously

Post by vcirilli » Wed Jan 11, 2023 8:48 pm

Ok I see thanks.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”