Fixed AudioEditor crash and removed unused function

This commit is contained in:
MattNL
2022-10-04 14:46:14 -04:00
parent 00f27c18c9
commit 1cfba9a8f9
2 changed files with 2 additions and 17 deletions

View File

@@ -74,7 +74,6 @@ namespace PckStudio.Classes
public void CleanUpBinka()
{
FreeLibrary(library);
File.Delete(binka_enc_loc);
File.Delete(binkawin_loc);
while (File.Exists(mss32_loc))

View File

@@ -87,24 +87,10 @@ namespace PckStudio.Forms.Editor
playOverworldInCreative.Enabled = audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Creative);
}
// https://stackoverflow.com/a/25064568 by Alik Khilazhev -MattNL
private void ExtractResource(string resName, string fName)
{
object ob = Properties.Resources.ResourceManager.GetObject(resName);
byte[] myResBytes = (byte[])ob;
using (FileStream fsDst = new FileStream(fName, FileMode.CreateNew, FileAccess.Write))
{
byte[] bytes = myResBytes;
fsDst.Write(bytes, 0, bytes.Length);
fsDst.Close();
fsDst.Dispose();
}
}
private void AudioEditor_FormClosed(object sender, FormClosedEventArgs e)
{
//FreeLibrary(library);
BINK.CleanUpBinka();
// Clean up is throwing an error of some kind? FreeLibrary maybe??
//BINK.CleanUpBinka();
}
private void verifyFileLocationToolStripMenuItem_Click(object sender, EventArgs e)