mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:07:39 +02:00
fix nasty bugs with saving / loading
- duplicate property names no longer soft crash loading (thanks, tap trial) - fix remix saving nothing music
This commit is contained in:
@ -307,18 +307,31 @@ namespace HeavenStudio.Editor
|
||||
try
|
||||
{
|
||||
if (clip != null)
|
||||
MusicBytes = OggVorbis.VorbisPlugin.GetOggVorbis(Conductor.instance.musicSource.clip, 1);
|
||||
MusicBytes = OggVorbis.VorbisPlugin.GetOggVorbis(clip, 1);
|
||||
else
|
||||
{
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is currently empty.");
|
||||
}
|
||||
}
|
||||
catch (System.Exception)
|
||||
catch (System.ArgumentNullException)
|
||||
{
|
||||
clip = null;
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is currently empty.");
|
||||
}
|
||||
catch (System.ArgumentOutOfRangeException)
|
||||
{
|
||||
clip = null;
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is malformed.");
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
clip = null;
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! Only 1 or 2 channels are supported!.");
|
||||
}
|
||||
|
||||
return clip;
|
||||
}
|
||||
|
Reference in New Issue
Block a user