|
Post by NetzaH on May 31, 2020 2:32:35 GMT
Hi! In a looping playlist with two tracks im changing track position at runtime using PlaylistController.CurrentPlaylistSource.timeSamples = N,it works fine but when changed track starts again it does it at that timeSamples instead of from the beginning.
Should I change position in any other way? how can I avoid that "position stuck" without disable gapless switching?
Thanks in advance!
|
|
|
Post by DarkTonic Dev on May 31, 2020 17:23:20 GMT
|
|
|
Post by NetzaH on May 31, 2020 21:11:37 GMT
Thanks, but that's not the point, im not speaking about tiny gap between songs, I understand it can't be removed as docs says, anyways using Unity 2019.3 and resource files, next song starts accurately enough with current song time changed.(I'm changing time just after trigger playlist clip on game progess loaded, loading saved clip and clip position, and it works) The issue is about song start time, once song time has been changed, it doesn't start from the beginning again. Thank you again!
|
|
|
Post by NetzaH on May 31, 2020 21:52:51 GMT
FYI it works if I reset timeSamples on PlaylistController.cs:1653, but idk how that affects other things
|
|
|
Post by DarkTonic Dev on May 31, 2020 22:00:58 GMT
You're gonna have to explain with more detail then, I don't fully understand, even reading that again a couple times.
First is to determine if this is something we support or could support. If so, try and fix it.
Do you have an example Scene you could send me that shows the behavior?
|
|
|
Post by NetzaH on May 31, 2020 22:30:44 GMT
Sorry, english is not my first language... i'll try to explain it better. When player touches a save point, im serializing and saving current playlist clip name and current audiosource timesamples, and when player loads a saved game, I load them again: _myPlaylistInstance.TriggerPlaylistClip("myDeserializedClipName"); _myPlaylistInstance.CurrentPlaylistSource.timeSamples = myDeserializedSamples;
Steps in the video: 1 - Scene starts normally playing first clip 2 - Player dies at the middle of the clip 3 - Secene reloads (blank part) and I set the samples to the point it were when player died 4- First clip ends normally, second clip starts normally 5- Second clip ends, playlist loops, and first clip starts with modified timesamples instead of from beginning 6- Second clip starts from the beginning again
Thank you!
|
|
|
Post by NetzaH on May 31, 2020 22:31:21 GMT
|
|
|
Post by DarkTonic Dev on May 31, 2020 23:31:44 GMT
Ok, now show me what code you wrote with the Master Audio API for any of those 6 steps please. Including any to change the song.
What do you have "Song Transition Mode" for the Playlist set to?
It may be tough to reproduce since there are so many settings and variables, so best is if you can send me a Scene that shows the issue. If you can do that, we will probably be able to solve faster.
|
|
|
Post by NetzaH on Jun 1, 2020 0:02:13 GMT
There is no more code, just using these two lines on step 3 after reload, gapless is active, its a playlist with two clips (using resource files), "start on awake", "loop playlist", "auto advance" are marked and song transition mode is set to "new clip from the beginning", also song start time mode in both songs is "beginning", in other words, is a standard gapless playlist. In fact,i think you can reproduce it by just setting a scene with the playlistcontroller and changing first clip position with a single click on the position bar. Anyway, I cant send you a test scene right now, i'll do it later if you still need it. Whats the support email address? Thank you veeeery much
|
|
|
Post by DarkTonic Dev on Jun 1, 2020 1:51:50 GMT
You definitely used code to change the position, and maybe to change to the next song or play the first song again....
Let me know if you can make it happen with the provided Example Scene. If so you can make the changes and send me that. Just let me know the steps (click on position bar, etc).
Support address is support@darktonic.com
Thanks!
|
|
|
Post by DarkTonic Dev on Jun 1, 2020 20:18:31 GMT
This issue is fixed, through email. Bug will be in the next update.
|
|