basto
New Member
Posts: 6
Posts: 6
|
Post by basto on Jan 13, 2015 12:26:21 GMT
I'm having some issues with windows phone 8 (that do not appear on android/ ios !): In my project are 3 major scenes which all have a different playlist for the background music. There is also a loading sceene where the music flawlessly plays. So the problem accures when i switch from scene1 to scene2 (playlist1 plays till scene2 is loaded and playlist2 starts) and back to scene1 (playlist2 plays till scene1 is loaded and playlist1 plays). After some debugging a found out that master audio deletes the current playing clip from the playlist after switching the scene (but only on wp8, android and ios work perfectly). (I think it has something to do with the "CeaseAudioSource" method in the Playlistcontroller but i can't figure out why it only happens on wp8) I would really appreciate a fast answer
|
|
|
Post by DarkTonic Dev on Jan 13, 2015 17:28:27 GMT
Deletes? No, a song is never deleted from a Playlist by Master Audio under any circumstances.
2 related things. If its a temporary Playlist (set up in Dynamic Sound Group Creator, the entire Playlist will be deleted when the Scene changes. If its a resource file, it will be unloaded from memory when it stops playing.
I assume you're using a persistent MA prefab? Give me more details please. I have no Windows phone to test though.
|
|
basto
New Member
Posts: 6
Posts: 6
|
Post by basto on Jan 14, 2015 8:19:18 GMT
yeah exactly we use an persistent MA prefab and a persistent playlistcontroller. The MA object has all playlists defined with "Clip create mode: clip" and the corresponding audio sources have "audio origin: clip".
the new scene has loaded, the ClipToRemove method is called and removes the previous clip from the previous scene. after changing back to the first scene there is a return @ "aSong.audLocation != MasterAudio.AudioLocation.ResourceFile"
|
|
|
Post by DarkTonic Dev on Jan 14, 2015 16:26:26 GMT
I think you just ran out of songs and don't have "Loop Playlists" turned on (checkbox is on the Playlist Controller game object). Let me know if that fixes it for you. If it's off, each song will only play once and then you're done.
|
|
basto
New Member
Posts: 6
Posts: 6
|
Post by basto on Jan 15, 2015 7:53:29 GMT
I added screenshots of the MA and Playlistcontroller settings. Hope that helps you a bit more. The thing is that with this exact settings everything works as we intended - but as I said only on android and iOS Edit: In the Clip Manager these sounds are set as Compressed and "Stream from Disc"
|
|
basto
New Member
Posts: 6
Posts: 6
|
Post by basto on Jan 15, 2015 15:30:25 GMT
Okay so I changed the audio origin to resource files and everything works now. But why? What's the issue with Clips?
|
|
|
Post by DarkTonic Dev on Jan 15, 2015 16:30:38 GMT
It would probably be easier for me to troubleshoot if you sent me a project that duplicates the error. For instance I don't know how many times you play each song before the bug happens and stuff like that. I don't think it has anything to do with Scene changing.
How many songs are in your playlist? Because we recommend using Resource files anyway if more than a couple. Although I still want to figure this out.
Does the error happen inside Unity when you go into Build Settings and set the platform to Windows Mobile?
The error in the console actually says to turn on Loop Playlists right?
What version of Unity and MA are you on?
|
|
basto
New Member
Posts: 6
Posts: 6
|
Post by basto on Jan 16, 2015 8:29:56 GMT
We have 3 main playlists (1 song <loop> / 1 song <loop> / 3 songs <shuffel>) It does only happen on an actual device, inside unity everything is working perfect.
I don't got actual errors. What I did was adding debugging lines to see what's happening when I use ChangePlaylistByName(string), because the second time I used it nothing happened and the old playlist continued playing.
Unity 4.6.1f1
I sent you a sample project via PM
|
|
|
Post by DarkTonic Dev on Jan 16, 2015 9:01:45 GMT
If it only happens on the device, I don't think I can help since I don't have a Windows device. If we can get it to happen in Unity then I can figure it out. So the sample project isn't going to do anything for me without a device unfortunately.
You're confusing some terminology I think. Playlists don't have "shuffle" or not. The *Playlist Controller* has the shuffle checkbox, not the Playlist. So you have only 1 Playlist Controller and 3 Playlists? You won't be able to change the controller to shuffle for some Playlists and not for others. So you should probably have 2 Playlist Controllers. One for shuffle Playlists, and one for non-shuffle.
And those 2 looping songs that are in 2 different Playlists can be in the same Playlist. No reason why not.
If you can show me whatever was output by the debugging, that may be helpful. Or maybe we can find some more debugging to add so you can figure out what's happening (or not happening) on your device.
Tell me all the steps it takes to break on the device.
1) Play playlist with 1 song. 2) After 5 seconds, change Playlist to shuffle Playlist 3) Do something that doesn't work.
etc.
That might help me.
Also, a few posts up you mentioned "clipToRemove" but that's only used for Resource files, before you were using Resource files...
This is definitely going to take some back and forth, so I would advise you to just use Resource files (that's usually best practice) while we figure this out.
|
|
basto
New Member
Posts: 6
Posts: 6
|
Post by basto on Jan 16, 2015 9:16:14 GMT
I'm sorry for the wrong terms. That's why I sent you the sample project. It has the same structure as our real project.
"Also, a few posts up you mentioned "clipToRemove" but that's only used for Resource files, before you were using Resource files..." That's exactly what confused me because on android MA did not try to do this.
I will try some more debugging and answer as soon as I know something new.
|
|
|
Post by DarkTonic Dev on Jan 16, 2015 17:24:20 GMT
Ok thanks man.
|
|