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:
Evans Jahja
2025-07-20 14:18:58 +09:00
committed by GitHub
parent d48aa4488e
commit 956bbdb6d2
92 changed files with 7741 additions and 57 deletions
@@ -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)