Post by codestrider on Mar 12, 2015 21:18:18 GMT
Hey There,
Been using this plugin for a while now, but recently upgraded our project to Unity 5 and have been rewriting a few of our scripts. One such script is our MusicManager, which uses Master Audio to help control and manage the music that is being played.
We use this class, because we also need to access meta data for the Currently playing track as well as a "never play that again" feature. Our custom features are working, but I'm getting an odd error sometimes and I can't pin point the cause.
After everything is done with it's Awake and Start functions we reference the Music Controller (which on our bootstrapping scene is the only sound controller so far.)
All of the potential values of "nameOfResourceFile" exist in a playlist in Master Audio, and the Sound Controller references this playlist. Sometimes this works great, but more often then not I get this error:
After this error is thrown, the music plays as expected. However, this error causes a crash on ios.
Some settings that may be relevant:
Any help figuring this out would be great.
Been using this plugin for a while now, but recently upgraded our project to Unity 5 and have been rewriting a few of our scripts. One such script is our MusicManager, which uses Master Audio to help control and manage the music that is being played.
We use this class, because we also need to access meta data for the Currently playing track as well as a "never play that again" feature. Our custom features are working, but I'm getting an odd error sometimes and I can't pin point the cause.
After everything is done with it's Awake and Start functions we reference the Music Controller (which on our bootstrapping scene is the only sound controller so far.)
MusicController = PlaylistController.Instances[0];
MusicController.SongEnded += HandleSongEnded;
void HandleSongEnded(string SongName)
{
//Code that selects the next song to play....
MasterAudio.TriggerPlaylistClip(nameOfResourceFile);
}
All of the potential values of "nameOfResourceFile" exist in a playlist in Master Audio, and the Sound Controller references this playlist. Sometimes this works great, but more often then not I get this error:
/Users/builduser/buildslave/unity/build/Runtime/Audio/sound/SoundChannel.cpp(374) : Error executing result (An invalid seek position was passed to this function. )
UnityEngine.AudioSource:Play()
PlaylistController:FinishLoadingNewSong(AudioClip, AudioPlayType) (at Assets/DarkTonic/MasterAudio/Scripts/Utility/PlaylistController.cs:1067)
<PopulateResourceSongToPlaylistControllerAsync>c__Iterator2:MoveNext() (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/AudioResourceOptimizer.cs:124)
After this error is thrown, the music plays as expected. However, this error causes a crash on ios.
Some settings that may be relevant:
- Crossfade Time : 0
- Clip Create Mode: ResourceFile
- Song Transition Type: New Clip from Beginning
- Controller Sync Group: none
Any help figuring this out would be great.