mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Revert "Adds custom MIDI soundfont support (#2720)"
This reverts commit 9ff46b9aad.
Sandbox violation, oops.
This commit is contained in:
@@ -51,11 +51,6 @@ public interface IMidiManager
|
||||
/// </summary>
|
||||
RobustMidiEvent FromSequencerEvent(SequencerEvent midiEvent, uint tick);
|
||||
|
||||
/// <summary>
|
||||
/// Redirect for the MIDI library's soundfont checker
|
||||
/// </summary>
|
||||
bool IsSoundFont(string filename);
|
||||
|
||||
/// <summary>
|
||||
/// Method called every frame.
|
||||
/// Should be used to update positional audio.
|
||||
|
||||
@@ -237,13 +237,6 @@ internal sealed partial class MidiManager : IMidiManager
|
||||
renderer.LoadSoundfont(WindowsSoundfont, true);
|
||||
}
|
||||
|
||||
var customFont = _cfgMan.GetCVar(CVars.MidiSoundfont);
|
||||
if (!string.IsNullOrEmpty(customFont))
|
||||
{
|
||||
if (File.Exists(customFont) && SoundFont.IsSoundFont(customFont))
|
||||
renderer.LoadSoundfont(customFont, true);
|
||||
}
|
||||
|
||||
renderer.Source.SetVolume(Volume);
|
||||
|
||||
lock (_renderers)
|
||||
@@ -397,12 +390,6 @@ internal sealed partial class MidiManager : IMidiManager
|
||||
midiEvent.Velocity);
|
||||
}
|
||||
|
||||
// really lazy, this could be a static i guess if the interface allowed for it
|
||||
public bool IsSoundFont(string filename)
|
||||
{
|
||||
return SoundFont.IsSoundFont(filename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to load soundfonts.
|
||||
/// </summary>
|
||||
|
||||
@@ -13,11 +13,6 @@ namespace Robust.Client.UserInterface
|
||||
return Task.FromResult<Stream?>(null);
|
||||
}
|
||||
|
||||
public Task<string?> GetOpenFileName(FileDialogFilters? filters = null)
|
||||
{
|
||||
return Task.FromResult<string?>(null);
|
||||
}
|
||||
|
||||
public Task<(Stream fileStream, bool alreadyExisted)?> SaveFile(FileDialogFilters? filters = null)
|
||||
{
|
||||
return Task.FromResult<(Stream fileStream, bool alreadyExisted)?>(null);
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Robust.Client.UserInterface
|
||||
return File.Open(name, FileMode.Open);
|
||||
}
|
||||
|
||||
public async Task<string?> GetOpenFileName(FileDialogFilters? filters)
|
||||
private async Task<string?> GetOpenFileName(FileDialogFilters? filters)
|
||||
{
|
||||
if (await IsKDialogAvailable())
|
||||
{
|
||||
|
||||
@@ -21,15 +21,6 @@ namespace Robust.Client.UserInterface
|
||||
/// </returns>
|
||||
Task<Stream?> OpenFile(FileDialogFilters? filters = null);
|
||||
|
||||
/// <summary>
|
||||
/// Open a file dialog used for getting a file's name.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// The file name for the file the user opened.
|
||||
/// <see langword="null" /> if the user cancelled the action.
|
||||
/// </returns>
|
||||
Task<string?> GetOpenFileName(FileDialogFilters? filters = null);
|
||||
|
||||
/// <summary>
|
||||
/// Open a file dialog used for saving a single file.
|
||||
/// </summary>
|
||||
|
||||
@@ -1052,9 +1052,6 @@ namespace Robust.Shared
|
||||
public static readonly CVarDef<float> MidiVolume =
|
||||
CVarDef.Create("midi.volume", 0f, CVar.CLIENTONLY | CVar.ARCHIVE);
|
||||
|
||||
public static readonly CVarDef<string> MidiSoundfont =
|
||||
CVarDef.Create("midi.soundfont", string.Empty, CVar.CLIENTONLY | CVar.ARCHIVE);
|
||||
|
||||
/*
|
||||
* HUB
|
||||
* CVars related to public master server hub
|
||||
|
||||
Reference in New Issue
Block a user