Added .mp3 export (#92)
* Update to larger bitrate * Add support for sub-voice export --------- Co-authored-by: katboi01 <59540382+katboi01@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
#if !UNITY_ANDROID || UNITY_EDITOR
|
||||
using SFB;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UmaMusumeAudio;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -63,6 +69,31 @@ public class UISettingsSound : MonoBehaviour
|
||||
LyricsText.text = "";
|
||||
}
|
||||
|
||||
public void ExportAudio()
|
||||
{
|
||||
#if !UNITY_ANDROID || UNITY_EDITOR
|
||||
var LiveSources = Builder.CurrentLiveSoundAWB;
|
||||
if (LiveSources.Count > 0)
|
||||
{
|
||||
var lists = new List<UmaWaveStream>();
|
||||
foreach (var source in LiveSources) {
|
||||
var z = Builder.LoadAudioStreams(source);
|
||||
foreach (var item in z)
|
||||
{
|
||||
lists.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
var path = StandaloneFileBrowser.SaveFilePanel("Save Music MP3 File", Config.Instance.MainPath, $"{TitleText.text}", "mp3");
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
AudioExporter.ExportAudio(lists, path, Builder.CurrentLiveSoundAWBIndex);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public void AudioProgressChange(float val)
|
||||
{
|
||||
if (Builder.CurrentAudioSources.Count > 0)
|
||||
|
||||
Reference in New Issue
Block a user