ise
New Member
Posts: 2
Posts: 2
|
Post by ise on Sept 29, 2014 9:30:22 GMT
Hi,
I use "PlaylistController" to play multiple sounds at the same time as below.
1. I made a Master Audio prefab 2. In the prefab, I made a playlist "all_se" which include all se in my game. (Option on Unity Editor) -Song Transition Type: New Clip From Beginning -Clip Create Mode: Clip 3. I wrote a code to play sound. if(Input.GetMouseButtonDown(0)){ MasterAudio.QueuePlaylistClip("se_01"); }
In runtime, Calling the code play "se_01", but, until the sound is end, Calling it can't play "se_01". I feel bad for wasting your time with a basic question, but could you tell me how to play multiple sounds at the same time?
Best regards,
|
|
|
Post by DarkTonic Dev on Sept 29, 2014 11:35:59 GMT
That is what the Queue command does, it plays the song you tell it to, only after the current song is finished. You should use MasterAudio.TriggerPlaylistClip instead to play a song now. No need to be sorry, but it is your best interest to look at the programming API mini-site because it will probably answer your questions much faster than I can. That's located here: bit.ly/1bkiReiIt tells you what each command does. You also can read the C# comments from intelli-sense when you're typing for the same information, but the API site shows them all at once so it's a good quick read to get an idea of everything you can do. -Brian
|
|
ise
New Member
Posts: 2
Posts: 2
|
Post by ise on Sept 30, 2014 1:42:34 GMT
Thank you for your quick reply and letting me know useful information.
With MasterAudio.TriggerPlaylistClip, I can play sound without waiting for privious sound to be finished. But, I can't play multiple sounds at the same time by call TriggerPlaylistClip repeatedly.
I ask questions here after a careful inspection of checking the reference and examples.
|
|
|
Post by DarkTonic Dev on Sept 30, 2014 13:03:33 GMT
Correct, you can't play more than one "song" at a time in a Playlist. That's playlist functionality you're using there.
Sound Effects should be set up in the Group Mixer (separate from Playlists) and can be played with MasterAudio.PlaySound and the other methods like that. Or you can use the EventSounds script to do both. Please watch the first youtube first for an example of how to set up sound effects.
-Brian
|
|
|
Post by Behringer on Oct 3, 2014 12:11:17 GMT
And how to add audio files to Group Mixer from the code? I can't drag them because those files will be downloaded from the server.
|
|
|
Post by DarkTonic Dev on Oct 3, 2014 12:56:09 GMT
Are you saying you want to download an Asset Bundle and create things dynamically? Asset bundles are not currently supported (meaning you would have to write that code yourself), but it is on the to do list on the Roadmap thread.
What's the scenario where you wouldn't include audio files in the build? We haven't had a customer yet with that scenario.
If you need something else, please let us know what exactly, and we'll get it onto the Roadmap as well. It sounds like you won't be able to use our product as is though. You're going to have to write some code.
|
|
|
Post by Behringer on Oct 3, 2014 14:03:33 GMT
Yes, I wanted to use Asset Bundles and be able to load those sounds dynamically. Too bad.
|
|
|
Post by DarkTonic Dev on Oct 3, 2014 15:45:09 GMT
Ok. If you'd provide us with some information in how you'd like to use asset bundles specifically with this plugin (we don't use them and aren't familiar), that will help us to code it up. Or to help you code it up if you can't wait for us. Either way we'd appreciate some details.
I'm not actually sure of of the various scenarios for Asset Bundles and if it would even be possible to do it code free with something we could write, but we're definitely interested in exploring it.
No one has had this conversation with us yet, and that's a big part of the reason this feature is still missing.
|
|