From 141e5a0db8bce69409a894e2f00db951bc93f597 Mon Sep 17 00:00:00 2001 From: bree Date: Fri, 13 May 2022 16:51:40 +0200 Subject: [PATCH] Version 14.6.13 (PR97) --- OmniMIDI/BufferSystem.h | 6 +- OmniMIDI/DriverInit.h | 3 + OmniMIDI/Resource.aps | Bin 162568 -> 162568 bytes OmniMIDI/Resource.rc | Bin 5978 -> 5978 bytes OmniMIDI/SoundFontLoader.h | 4 +- OmniMIDI/Values.h | 1 + .../OmniMIDIConfigurator/App.config | 55 ++- .../Extensions/OM/Functions.cs | 23 +- .../OM/Secondary/SoundFontInfo.designer.cs | 6 +- .../OmniMIDIConfigurator.csproj | 32 +- .../SoundFontListExtension.cs | 26 +- .../Properties/Settings.Designer.cs | 133 +++--- .../Properties/Settings.settings | 83 ++-- .../OmniMIDIConfigurator/packages.config | 34 +- OmniMIDISetup.iss | 2 +- external_packages/bassmidi.h | 4 +- external_packages/bassmidi.h.old | 427 ++++++++++++++++++ 17 files changed, 655 insertions(+), 184 deletions(-) create mode 100644 external_packages/bassmidi.h.old diff --git a/OmniMIDI/BufferSystem.h b/OmniMIDI/BufferSystem.h index 9a9f9c7e..45c82901 100644 --- a/OmniMIDI/BufferSystem.h +++ b/OmniMIDI/BufferSystem.h @@ -159,7 +159,7 @@ void __inline SendToBASSMIDI(DWORD dwParam1) { } } - _BMSEs(OMStream, BASS_MIDI_EVENTS_RAW, &dwParam1, len); + _BMSEs(OMStream, BMSEsRAWFlags, &dwParam1, len); return; } } @@ -183,7 +183,7 @@ void __inline PrepareForBASSMIDI(DWORD LastRunningStatus, DWORD dwParam1) { if (ManagedSettings.OverrideNoteLength) Evs[1] = { MIDI_EVENT_NOTE, (BYTE)(dwParam1 >> 8), dwParam1 & 0xF, FNoteLengthValue, 0 }; - BASS_MIDI_StreamEvents(OMStream, (ManagedSettings.BASSDSMode ? BASS_MIDI_EVENTS_ASYNC : 0) | BASS_MIDI_EVENTS_STRUCT | BASS_MIDI_EVENTS_TIME | BASS_MIDI_EVENTS_CANCEL, &Evs, ManagedSettings.OverrideNoteLength ? 2 : 1); + BASS_MIDI_StreamEvents(OMStream, BMSEsFlags, &Evs, ManagedSettings.OverrideNoteLength ? 2 : 1); return; } @@ -191,7 +191,7 @@ void __inline PrepareForBASSMIDI(DWORD LastRunningStatus, DWORD dwParam1) { if (!ManagedSettings.OverrideNoteLength && ManagedSettings.DelayNoteOff) { Evs[0] = { MIDI_EVENT_NOTE, (BYTE)(dwParam1 >> 8), dwParam1 & 0xF, FDelayNoteOff, 0 }; - BASS_MIDI_StreamEvents(OMStream, (ManagedSettings.BASSDSMode ? BASS_MIDI_EVENTS_ASYNC : 0) | BASS_MIDI_EVENTS_STRUCT | BASS_MIDI_EVENTS_TIME | BASS_MIDI_EVENTS_CANCEL, &Evs, 1); + BASS_MIDI_StreamEvents(OMStream, BMSEsFlags, &Evs, 1); } return; diff --git a/OmniMIDI/DriverInit.h b/OmniMIDI/DriverInit.h index f3e5625c..307da872 100644 --- a/OmniMIDI/DriverInit.h +++ b/OmniMIDI/DriverInit.h @@ -564,6 +564,9 @@ BOOL InitializeStream(INT32 mixfreq) { exit(ERROR_INVALID_HANDLE); } } + + BMSEsFlags = (ManagedSettings.BASSDSMode ? BASS_MIDI_EVENTS_ASYNC : 0) | BASS_MIDI_EVENTS_STRUCT | BASS_MIDI_EVENTS_TIME | BASS_MIDI_EVENTS_CANCEL; + BMSEsRAWFlags = (ManagedSettings.BASSDSMode ? BASS_MIDI_EVENTS_ASYNC : 0) | BASS_MIDI_EVENTS_RAW; PrintMessageToDebugLog("InitializeStreamFunc", "Stream is now active!"); return TRUE; diff --git a/OmniMIDI/Resource.aps b/OmniMIDI/Resource.aps index d2ff792a067d89bf42a02b7dff54d45aa744dd57..d07074630c278984d271d125efa3168bccfbbe71 100644 GIT binary patch delta 50 zcmeD9#@X?WbHfWZ&O`=Y1~vvhhQ!Su+1weKEg8%=TXU=hGn!v>w!h|N-2R%ANwyFG Dkx~ys delta 50 zcmeD9#@X?WbHfWZ&OioU1~vvhhQQ4q+1weKEf@?pTXU=hGn!v>w!h|N-2R%ANwyFG Di^~rc diff --git a/OmniMIDI/Resource.rc b/OmniMIDI/Resource.rc index 5fd13fd3a3159d3adf91a23a61930e6d19165bb3..8801e841bf37013ca8305bf27e78c90a7a032db5 100644 GIT binary patch delta 46 tcmcbmcS~=>Cst-l2J^{ZSxrIoW?eQ_X0SjZm+s~!P9G+)=tb^MZU9sB4L$$> delta 46 tcmcbmcS~=>Cst+)2E)l;SxrIoW?eQ_X0SjZm+s~!P9G+)=tb^MZU9ky4I%&l diff --git a/OmniMIDI/SoundFontLoader.h b/OmniMIDI/SoundFontLoader.h index b28bd941..f9d4890a 100644 --- a/OmniMIDI/SoundFontLoader.h +++ b/OmniMIDI/SoundFontLoader.h @@ -67,8 +67,10 @@ static BOOL FontLoader(LPWSTR in_path) { PrintMessageToDebugLog("NewSFLoader", "Path has been parsed..."); PrintMessageToDebugLog("NewSFLoader", "Checking if it's a SoundFont or a list..."); - if (!_wcsicmp(Extension, _T(".sf2")) || + if (!_wcsicmp(Extension, _T(".sf1")) || + !_wcsicmp(Extension, _T(".sf2")) || !_wcsicmp(Extension, _T(".sf2pack")) || + !_wcsicmp(Extension, _T(".sf3")) || !_wcsicmp(Extension, _T(".sfz"))) { PrintMessageToDebugLog("NewSFLoader", "It's a SoundFont. Checking if it exists..."); diff --git a/OmniMIDI/Values.h b/OmniMIDI/Values.h index 36f1b552..ad88dfc9 100644 --- a/OmniMIDI/Values.h +++ b/OmniMIDI/Values.h @@ -108,6 +108,7 @@ BOOL BASSLoadedToMemory = FALSE; BOOL KDMAPIEnabled = FALSE; BOOL IsKDMAPIViaWinMM = FALSE; BOOL HostSessionMode = FALSE; +int BMSEsFlags = 0, BMSEsRAWFlags = 0; // DLL hell BOOL AppLibWarning = FALSE; diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/App.config b/OmniMIDIConfigurator/OmniMIDIConfigurator/App.config index 4ad7c4c6..9a4b2e74 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/App.config +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/App.config @@ -9,7 +9,7 @@ - + @@ -37,22 +37,6 @@ False - - - - -1 - -1 - -1 - -1 - -1 - -1 - -1 - -1 - -1 - -1 - - - True @@ -74,13 +58,32 @@ False + + + + -1 + -1 + -1 + -1 + -1 + -1 + -1 + -1 + -1 + -1 + + + + + https://github.com/KeppySoftware/OmniMIDI + - + 425 30 30 @@ -93,22 +96,20 @@ - - https://github.com/KeppySoftware/OmniMIDI - - + .sf1 .sf2 .sf2pack + .sf3 .sfz - + Pre-release branch prerelease @@ -116,7 +117,7 @@ - + Stable branch stable @@ -124,7 +125,7 @@ - + Slow branch slow @@ -142,6 +143,10 @@ + + + + diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/Extensions/OM/Functions.cs b/OmniMIDIConfigurator/OmniMIDIConfigurator/Extensions/OM/Functions.cs index 69cbd5ac..a4a446a6 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/Extensions/OM/Functions.cs +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/Extensions/OM/Functions.cs @@ -18,6 +18,9 @@ class PA [DllImport("kernel32.dll")] public static extern void GetNativeSystemInfo(ref SYSTEM_INFO lpSystemInfo); + [DllImport("kernel32.dll")] + public static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, SymbolicLink dwFlags); + public const short PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFF; public const short PROCESSOR_ARCHITECTURE_ARM64 = 12; public const short PROCESSOR_ARCHITECTURE_AMD64 = 9; @@ -40,6 +43,12 @@ public struct SYSTEM_INFO public short wProcessorRevision; } + public enum SymbolicLink + { + File = 0, + Directory = 1 + } + public enum FILE_ARCH { UNK, @@ -586,9 +595,9 @@ public static DialogResult ApplyWinMMWRPPatch(Boolean DAWMode, PA.FILE_ARCH Over if (DAWMode) File.WriteAllBytes(String.Format("{0}\\{1}", DirectoryPath, "winmm.dll"), Properties.Resources.winmm32DAW); else - File.Copy( + PA.CreateSymbolicLink(String.Format("{0}\\{1}", DirectoryPath, "winmm.dll"), String.Format("{0}\\{1}", Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "OmniMIDI.dll"), - String.Format("{0}\\{1}", DirectoryPath, "winmm.dll")); + PA.SymbolicLink.File); break; @@ -603,9 +612,9 @@ public static DialogResult ApplyWinMMWRPPatch(Boolean DAWMode, PA.FILE_ARCH Over if (DAWMode) File.WriteAllBytes(String.Format("{0}\\{1}", DirectoryPath, "winmm.dll"), Properties.Resources.winmm64DAW); else - File.Copy( + PA.CreateSymbolicLink(String.Format("{0}\\{1}", DirectoryPath, "winmm.dll"), String.Format("{0}\\{1}", Environment.GetFolderPath(Environment.SpecialFolder.System), "OmniMIDI.dll"), - String.Format("{0}\\{1}", DirectoryPath, "winmm.dll")); + PA.SymbolicLink.File); Wow64RevertWow64FsRedirection(Dummy); @@ -619,9 +628,9 @@ public static DialogResult ApplyWinMMWRPPatch(Boolean DAWMode, PA.FILE_ARCH Over if (DAWMode) File.WriteAllBytes(String.Format("{0}\\{1}", DirectoryPath, "winmm.dll"), Properties.Resources.winmmARM64DAW); else - File.Copy( - String.Format("{0}\\{1}", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "SysArm32"), "OmniMIDI.dll"), - String.Format("{0}\\{1}", DirectoryPath, "winmm.dll")); + PA.CreateSymbolicLink(String.Format("{0}\\{1}", DirectoryPath, "winmm.dll"), + String.Format("{0}\\{1}", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "SysArm32"), "OmniMIDI.dll"), + PA.SymbolicLink.File); Wow64RevertWow64FsRedirection(Dummy); diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/Forms/OM/Secondary/SoundFontInfo.designer.cs b/OmniMIDIConfigurator/OmniMIDIConfigurator/Forms/OM/Secondary/SoundFontInfo.designer.cs index 50adeb41..895d35fb 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/Forms/OM/Secondary/SoundFontInfo.designer.cs +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/Forms/OM/Secondary/SoundFontInfo.designer.cs @@ -296,22 +296,20 @@ private void InitializeComponent() // this.SamF.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.SamF.Location = new System.Drawing.Point(166, 162); + this.SamF.Location = new System.Drawing.Point(166, 161); this.SamF.Name = "SamF"; this.SamF.Size = new System.Drawing.Size(440, 15); this.SamF.TabIndex = 19; this.SamF.Text = "label6"; - this.SamF.Visible = false; // // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(12, 162); + this.label8.Location = new System.Drawing.Point(12, 161); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(93, 15); this.label8.TabIndex = 18; this.label8.Text = "Samples format:"; - this.label8.Visible = false; // // SoundFontInfo // diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/OmniMIDIConfigurator.csproj b/OmniMIDIConfigurator/OmniMIDIConfigurator/OmniMIDIConfigurator.csproj index 4d2a728e..92382064 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/OmniMIDIConfigurator.csproj +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/OmniMIDIConfigurator.csproj @@ -9,7 +9,7 @@ WinExe OmniMIDIConfigurator OmniMIDIConfigurator - v4.6 + v4.6.2 512 true true @@ -66,10 +66,10 @@ ..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll - ..\packages\CyotekImageBox.1.2.1\lib\net20\Cyotek.Windows.Forms.ImageBox.dll + ..\packages\CyotekImageBox.1.3.1\lib\net20\Cyotek.Windows.Forms.ImageBox.dll - - ..\packages\HtmlAgilityPack.1.11.39\lib\Net45\HtmlAgilityPack.dll + + ..\packages\HtmlAgilityPack.1.11.42\lib\Net45\HtmlAgilityPack.dll @@ -81,21 +81,24 @@ ..\packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll - - ..\packages\Octokit.0.50.0\lib\net46\Octokit.dll + + ..\packages\Octokit.0.51.0\lib\net46\Octokit.dll ..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + ..\packages\System.Console.4.3.1\lib\net46\System.Console.dll - - ..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.6.0.0\lib\net461\System.Diagnostics.DiagnosticSource.dll ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll @@ -114,6 +117,9 @@ ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll @@ -121,6 +127,12 @@ ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll @@ -591,14 +603,14 @@ - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + + \ No newline at end of file diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/Panels/SoundFontListEditor/SoundFontListExtension.cs b/OmniMIDIConfigurator/OmniMIDIConfigurator/Panels/SoundFontListEditor/SoundFontListExtension.cs index 761096c2..cb239f47 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/Panels/SoundFontListEditor/SoundFontListExtension.cs +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/Panels/SoundFontListEditor/SoundFontListExtension.cs @@ -78,16 +78,22 @@ public static string ReturnSoundFontFormat(string fileext) public static string ReturnSoundFontFormatMore(string fileext) { - if (fileext.ToLowerInvariant() == ".sf1") - return "SoundFont 1.x by E-mu Systems"; - else if (fileext.ToLowerInvariant() == ".sf2") - return "SoundFont 2.x by Creative Labs"; - else if (fileext.ToLowerInvariant() == ".sfz") - return "SoundFontZ by Cakewalk™"; - else if (fileext.ToLowerInvariant() == ".sf2pack") - return "SoundFont 2 compressed package"; - else - return "Unknown format"; + switch (fileext.ToLowerInvariant()) + { + case ".sf1": + return "SoundFont 1.x by E-mu™ Systems"; + case ".sf2": + return "SoundFont 2.x by Creative™ Labs"; + case ".sf2pack": + return "SoundFont 2 compressed package"; + case ".sf3": + return "SoundFont 3.x by MuseScore"; + case ".sfz": + return "SoundFontZ by Cakewalk™"; + default: + return "Unknown format"; + + } } public static string ReturnSoundFontSize(string preset, string ext, long length) diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.Designer.cs b/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.Designer.cs index 84ae0481..9027d453 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.Designer.cs +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace OmniMIDIConfigurator.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -119,50 +119,6 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute(@" - - -1 - -1 - -1 - -1 - -1 - -1 - -1 - -1 - -1 - -1 -")] - public int[] SFColumnsSize { - get { - return ((int[])(this["SFColumnsSize"])); - } - set { - this["SFColumnsSize"] = value; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute(@" - - 425 - 30 - 30 - 30 - 30 - 30 - 32 - 53 - 62 -")] - public int[] SFColumnsDefSize { - get { - return ((int[])(this["SFColumnsDefSize"])); - } - } - [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("https://github.com/KeppySoftware/OmniMIDI")] @@ -220,21 +176,6 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio } } - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute(@" - - .sf1 - .sf2 - .sf2pack - .sfz -")] - public global::System.Collections.Specialized.StringCollection SupportedFormats { - get { - return ((global::System.Collections.Specialized.StringCollection)(this["SupportedFormats"])); - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("1970-01-01")] @@ -273,8 +214,44 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("\r\n\r\n + + 425 + 30 + 30 + 30 + 30 + 30 + 32 + 53 + 62 +")] + public int[] SFColumnsDefSize { + get { + return ((int[])(this["SFColumnsDefSize"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute(@" + + .sf1 + .sf2 + .sf2pack + .sf3 + .sfz +")] + public global::System.Collections.Specialized.StringCollection SupportedFormats { + get { + return ((global::System.Collections.Specialized.StringCollection)(this["SupportedFormats"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("\r\n\r\n Pre-release branch\r\n prerelease\r\n")] public global::System.Collections.Specialized.StringCollection PreReleaseBranch { @@ -285,8 +262,8 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("\r\n\r\n \r\n\r\n Stable branch\r\n stable\r\n")] public global::System.Collections.Specialized.StringCollection StableBranch { get { @@ -296,13 +273,37 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("\r\n\r\n \r\n\r\n Slow branch\r\n slow\r\n")] public global::System.Collections.Specialized.StringCollection SlowBranch { get { return ((global::System.Collections.Specialized.StringCollection)(this["SlowBranch"])); } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute(@" + + -1 + -1 + -1 + -1 + -1 + -1 + -1 + -1 + -1 + -1 +")] + public int[] SFColumnsSize { + get { + return ((int[])(this["SFColumnsSize"])); + } + set { + this["SFColumnsSize"] = value; + } + } } } diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.settings b/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.settings index 014e79d9..4bbeae0f 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.settings +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/Properties/Settings.settings @@ -26,35 +26,6 @@ False - - <?xml version="1.0" encoding="utf-16"?> -<ArrayOfInt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <int>-1</int> - <int>-1</int> - <int>-1</int> - <int>-1</int> - <int>-1</int> - <int>-1</int> - <int>-1</int> - <int>-1</int> - <int>-1</int> - <int>-1</int> -</ArrayOfInt> - - - <?xml version="1.0" encoding="utf-16"?> -<ArrayOfInt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <int>425</int> - <int>30</int> - <int>30</int> - <int>30</int> - <int>30</int> - <int>30</int> - <int>32</int> - <int>53</int> - <int>62</int> -</ArrayOfInt> - https://github.com/KeppySoftware/OmniMIDI @@ -70,15 +41,6 @@ False - - <?xml version="1.0" encoding="utf-16"?> -<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <string>.sf1</string> - <string>.sf2</string> - <string>.sf2pack</string> - <string>.sfz</string> -</ArrayOfString> - 1970-01-01 @@ -88,26 +50,65 @@ False + + <?xml version="1.0" encoding="utf-16"?> +<ArrayOfInt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <int>425</int> + <int>30</int> + <int>30</int> + <int>30</int> + <int>30</int> + <int>30</int> + <int>32</int> + <int>53</int> + <int>62</int> +</ArrayOfInt> + + + <?xml version="1.0" encoding="utf-16"?> +<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <string>.sf1</string> + <string>.sf2</string> + <string>.sf2pack</string> + <string>.sf3</string> + <string>.sfz</string> +</ArrayOfString> + <?xml version="1.0" encoding="utf-16"?> -<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <string>Pre-release branch</string> <string>prerelease</string> </ArrayOfString> <?xml version="1.0" encoding="utf-16"?> -<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <string>Stable branch</string> <string>stable</string> </ArrayOfString> <?xml version="1.0" encoding="utf-16"?> -<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <string>Slow branch</string> <string>slow</string> </ArrayOfString> + + <?xml version="1.0" encoding="utf-16"?> +<ArrayOfInt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <int>-1</int> + <int>-1</int> + <int>-1</int> + <int>-1</int> + <int>-1</int> + <int>-1</int> + <int>-1</int> + <int>-1</int> + <int>-1</int> + <int>-1</int> +</ArrayOfInt> + \ No newline at end of file diff --git a/OmniMIDIConfigurator/OmniMIDIConfigurator/packages.config b/OmniMIDIConfigurator/OmniMIDIConfigurator/packages.config index f89a97a8..eb2169f5 100644 --- a/OmniMIDIConfigurator/OmniMIDIConfigurator/packages.config +++ b/OmniMIDIConfigurator/OmniMIDIConfigurator/packages.config @@ -1,48 +1,52 @@  - - - - + + + + - - + + + - + - + - + + + - + - - + + + - + - + - + diff --git a/OmniMIDISetup.iss b/OmniMIDISetup.iss index 9968d97b..2e9e1006 100644 --- a/OmniMIDISetup.iss +++ b/OmniMIDISetup.iss @@ -20,7 +20,7 @@ #define MixerWindow "OmniMIDIMixerWindow" #define OutputName "OmniMIDISetup" #define ProductName "OmniMIDI" -#define Version '14.6.13.81' +#define Version '14.6.13.97' #define MIDIMapper 'OmniMapper' #define lib32 'external_packages\lib' diff --git a/external_packages/bassmidi.h b/external_packages/bassmidi.h index b40d3370..4e235b93 100644 --- a/external_packages/bassmidi.h +++ b/external_packages/bassmidi.h @@ -220,6 +220,8 @@ typedef struct { #define MIDI_EVENT_VIBRATO_RATE 80 #define MIDI_EVENT_VIBRATO_DEPTH 81 #define MIDI_EVENT_VIBRATO_DELAY 82 +#define MIDI_EVENT_MASTER_FINETUNE 83 +#define MIDI_EVENT_MASTER_COARSETUNE 84 #define MIDI_EVENT_MIXLEVEL 0x10000 #define MIDI_EVENT_TRANSPOSE 0x10001 #define MIDI_EVENT_SYSTEMEX 0x10002 @@ -412,7 +414,7 @@ static inline BOOL BASS_MIDI_FontPack(HSOUNDFONT handle, const WCHAR *outfile, c return BASS_MIDI_FontPack(handle, (const void*)outfile, (const void*)encoder, flags | BASS_UNICODE); } -static inline BOOL BASS_MIDI_FontUnpack(HSOUNDFONT handle, const WCHAR * outfile, DWORD flags) +static inline BOOL BASS_MIDI_FontUnpack(HSOUNDFONT handle, const WCHAR *outfile, DWORD flags) { return BASS_MIDI_FontUnpack(handle, (const void*)outfile, flags | BASS_UNICODE); } diff --git a/external_packages/bassmidi.h.old b/external_packages/bassmidi.h.old new file mode 100644 index 00000000..b40d3370 --- /dev/null +++ b/external_packages/bassmidi.h.old @@ -0,0 +1,427 @@ +/* + BASSMIDI 2.4 C/C++ header file + Copyright (c) 2006-2022 Un4seen Developments Ltd. + + See the BASSMIDI.CHM file for more detailed documentation +*/ + +#ifndef BASSMIDI_H +#define BASSMIDI_H + +#include "bass.h" + +#if BASSVERSION!=0x204 +#error conflicting BASS and BASSMIDI versions +#endif + +#ifdef __OBJC__ +typedef int BOOL32; +#define BOOL BOOL32 // override objc's BOOL +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef BASSMIDIDEF +#define BASSMIDIDEF(f) WINAPI f +#else +#define NOBASSMIDIOVERLOADS +#endif + +typedef DWORD HSOUNDFONT; // soundfont handle + +// Additional error codes returned by BASS_ErrorGetCode +#define BASS_ERROR_MIDI_INCLUDE 7000 // SFZ include file could not be opened + +// Additional BASS_SetConfig options +#define BASS_CONFIG_MIDI_COMPACT 0x10400 +#define BASS_CONFIG_MIDI_VOICES 0x10401 +#define BASS_CONFIG_MIDI_AUTOFONT 0x10402 +#define BASS_CONFIG_MIDI_IN_PORTS 0x10404 +#define BASS_CONFIG_MIDI_SAMPLETHREADS 0x10406 +#define BASS_CONFIG_MIDI_SAMPLEMEM 0x10407 +#define BASS_CONFIG_MIDI_SAMPLEREAD 0x10408 +#define BASS_CONFIG_MIDI_SAMPLELOADING 0x1040a + +// Additional BASS_SetConfigPtr options +#define BASS_CONFIG_MIDI_DEFFONT 0x10403 +#define BASS_CONFIG_MIDI_SFZHEAD 0x10409 + +// Additional sync types +#define BASS_SYNC_MIDI_MARK 0x10000 +#define BASS_SYNC_MIDI_MARKER 0x10000 +#define BASS_SYNC_MIDI_CUE 0x10001 +#define BASS_SYNC_MIDI_LYRIC 0x10002 +#define BASS_SYNC_MIDI_TEXT 0x10003 +#define BASS_SYNC_MIDI_EVENT 0x10004 +#define BASS_SYNC_MIDI_TICK 0x10005 +#define BASS_SYNC_MIDI_TIMESIG 0x10006 +#define BASS_SYNC_MIDI_KEYSIG 0x10007 + +// Additional BASS_MIDI_StreamCreateFile/etc flags +#define BASS_MIDI_NODRUMPARAM 0x400 +#define BASS_MIDI_NOSYSRESET 0x800 +#define BASS_MIDI_DECAYEND 0x1000 +#define BASS_MIDI_NOFX 0x2000 +#define BASS_MIDI_DECAYSEEK 0x4000 +#define BASS_MIDI_NOCROP 0x8000 +#define BASS_MIDI_NOTEOFF1 0x10000 +#define BASS_MIDI_ASYNC 0x400000 +#define BASS_MIDI_SINCINTER 0x800000 + +// BASS_MIDI_FontInit flags +#define BASS_MIDI_FONT_MEM 0x10000 +#define BASS_MIDI_FONT_MMAP 0x20000 +#define BASS_MIDI_FONT_XGDRUMS 0x40000 +#define BASS_MIDI_FONT_NOFX 0x80000 +#define BASS_MIDI_FONT_LINATTMOD 0x100000 +#define BASS_MIDI_FONT_LINDECVOL 0x200000 +#define BASS_MIDI_FONT_NORAMPIN 0x400000 +#define BASS_MIDI_FONT_NOLIMITS 0x800000 +#define BASS_MIDI_FONT_MINFX 0x1000000 + +typedef struct { + HSOUNDFONT font; // soundfont + int preset; // preset number (-1=all) + int bank; +} BASS_MIDI_FONT; + +typedef struct { + HSOUNDFONT font; // soundfont + int spreset; // source preset number + int sbank; // source bank number + int dpreset; // destination preset/program number + int dbank; // destination bank number + int dbanklsb; // destination bank number LSB +} BASS_MIDI_FONTEX; + +typedef struct { + HSOUNDFONT font; // soundfont + int spreset; // source preset number + int sbank; // source bank number + int dpreset; // destination preset/program number + int dbank; // destination bank number + int dbanklsb; // destination bank number LSB + DWORD minchan; // minimum channel number + DWORD numchan; // number of channels from minchan +} BASS_MIDI_FONTEX2; + +// BASS_MIDI_StreamSet/GetFonts flag +#define BASS_MIDI_FONT_EX 0x1000000 // BASS_MIDI_FONTEX +#define BASS_MIDI_FONT_EX2 0x2000000 // BASS_MIDI_FONTEX2 + +typedef struct { + const char *name; + const char *copyright; + const char *comment; + DWORD presets; // number of presets/instruments + DWORD samsize; // total size (in bytes) of the sample data + DWORD samload; // amount of sample data currently loaded + DWORD samtype; // sample format (CTYPE) if packed +} BASS_MIDI_FONTINFO; + +typedef struct { + DWORD track; // track containing marker + DWORD pos; // marker position + const char *text; // marker text +} BASS_MIDI_MARK; + +// Marker types +#define BASS_MIDI_MARK_MARKER 0 // marker +#define BASS_MIDI_MARK_CUE 1 // cue point +#define BASS_MIDI_MARK_LYRIC 2 // lyric +#define BASS_MIDI_MARK_TEXT 3 // text +#define BASS_MIDI_MARK_TIMESIG 4 // time signature +#define BASS_MIDI_MARK_KEYSIG 5 // key signature +#define BASS_MIDI_MARK_COPY 6 // copyright notice +#define BASS_MIDI_MARK_TRACK 7 // track name +#define BASS_MIDI_MARK_INST 8 // instrument name +#define BASS_MIDI_MARK_TRACKSTART 9 // track start (SMF2) +#define BASS_MIDI_MARK_TICK 0x10000 // flag: get position in ticks (otherwise bytes) + +// MIDI events +#define MIDI_EVENT_NOTE 1 +#define MIDI_EVENT_PROGRAM 2 +#define MIDI_EVENT_CHANPRES 3 +#define MIDI_EVENT_PITCH 4 +#define MIDI_EVENT_PITCHRANGE 5 +#define MIDI_EVENT_DRUMS 6 +#define MIDI_EVENT_FINETUNE 7 +#define MIDI_EVENT_COARSETUNE 8 +#define MIDI_EVENT_MASTERVOL 9 +#define MIDI_EVENT_BANK 10 +#define MIDI_EVENT_MODULATION 11 +#define MIDI_EVENT_VOLUME 12 +#define MIDI_EVENT_PAN 13 +#define MIDI_EVENT_EXPRESSION 14 +#define MIDI_EVENT_SUSTAIN 15 +#define MIDI_EVENT_SOUNDOFF 16 +#define MIDI_EVENT_RESET 17 +#define MIDI_EVENT_NOTESOFF 18 +#define MIDI_EVENT_PORTAMENTO 19 +#define MIDI_EVENT_PORTATIME 20 +#define MIDI_EVENT_PORTANOTE 21 +#define MIDI_EVENT_MODE 22 +#define MIDI_EVENT_REVERB 23 +#define MIDI_EVENT_CHORUS 24 +#define MIDI_EVENT_CUTOFF 25 +#define MIDI_EVENT_RESONANCE 26 +#define MIDI_EVENT_RELEASE 27 +#define MIDI_EVENT_ATTACK 28 +#define MIDI_EVENT_DECAY 29 +#define MIDI_EVENT_REVERB_MACRO 30 +#define MIDI_EVENT_CHORUS_MACRO 31 +#define MIDI_EVENT_REVERB_TIME 32 +#define MIDI_EVENT_REVERB_DELAY 33 +#define MIDI_EVENT_REVERB_LOCUTOFF 34 +#define MIDI_EVENT_REVERB_HICUTOFF 35 +#define MIDI_EVENT_REVERB_LEVEL 36 +#define MIDI_EVENT_CHORUS_DELAY 37 +#define MIDI_EVENT_CHORUS_DEPTH 38 +#define MIDI_EVENT_CHORUS_RATE 39 +#define MIDI_EVENT_CHORUS_FEEDBACK 40 +#define MIDI_EVENT_CHORUS_LEVEL 41 +#define MIDI_EVENT_CHORUS_REVERB 42 +#define MIDI_EVENT_USERFX 43 +#define MIDI_EVENT_USERFX_LEVEL 44 +#define MIDI_EVENT_USERFX_REVERB 45 +#define MIDI_EVENT_USERFX_CHORUS 46 +#define MIDI_EVENT_DRUM_FINETUNE 50 +#define MIDI_EVENT_DRUM_COARSETUNE 51 +#define MIDI_EVENT_DRUM_PAN 52 +#define MIDI_EVENT_DRUM_REVERB 53 +#define MIDI_EVENT_DRUM_CHORUS 54 +#define MIDI_EVENT_DRUM_CUTOFF 55 +#define MIDI_EVENT_DRUM_RESONANCE 56 +#define MIDI_EVENT_DRUM_LEVEL 57 +#define MIDI_EVENT_DRUM_USERFX 58 +#define MIDI_EVENT_SOFT 60 +#define MIDI_EVENT_SYSTEM 61 +#define MIDI_EVENT_TEMPO 62 +#define MIDI_EVENT_SCALETUNING 63 +#define MIDI_EVENT_CONTROL 64 +#define MIDI_EVENT_CHANPRES_VIBRATO 65 +#define MIDI_EVENT_CHANPRES_PITCH 66 +#define MIDI_EVENT_CHANPRES_FILTER 67 +#define MIDI_EVENT_CHANPRES_VOLUME 68 +#define MIDI_EVENT_MOD_VIBRATO 69 +#define MIDI_EVENT_MODRANGE 69 +#define MIDI_EVENT_BANK_LSB 70 +#define MIDI_EVENT_KEYPRES 71 +#define MIDI_EVENT_KEYPRES_VIBRATO 72 +#define MIDI_EVENT_KEYPRES_PITCH 73 +#define MIDI_EVENT_KEYPRES_FILTER 74 +#define MIDI_EVENT_KEYPRES_VOLUME 75 +#define MIDI_EVENT_SOSTENUTO 76 +#define MIDI_EVENT_MOD_PITCH 77 +#define MIDI_EVENT_MOD_FILTER 78 +#define MIDI_EVENT_MOD_VOLUME 79 +#define MIDI_EVENT_VIBRATO_RATE 80 +#define MIDI_EVENT_VIBRATO_DEPTH 81 +#define MIDI_EVENT_VIBRATO_DELAY 82 +#define MIDI_EVENT_MIXLEVEL 0x10000 +#define MIDI_EVENT_TRANSPOSE 0x10001 +#define MIDI_EVENT_SYSTEMEX 0x10002 +#define MIDI_EVENT_SPEED 0x10004 +#define MIDI_EVENT_DEFDRUMS 0x10006 + +#define MIDI_EVENT_END 0 +#define MIDI_EVENT_END_TRACK 0x10003 + +#define MIDI_EVENT_NOTES 0x20000 +#define MIDI_EVENT_VOICES 0x20001 + +#define MIDI_SYSTEM_DEFAULT 0 +#define MIDI_SYSTEM_GM1 1 +#define MIDI_SYSTEM_GM2 2 +#define MIDI_SYSTEM_XG 3 +#define MIDI_SYSTEM_GS 4 + +typedef struct { + DWORD event; // MIDI_EVENT_xxx + DWORD param; + DWORD chan; + DWORD tick; // event position (ticks) + DWORD pos; // event position (bytes) +} BASS_MIDI_EVENT; + +// BASS_MIDI_StreamEvents modes +#define BASS_MIDI_EVENTS_STRUCT 0 // BASS_MIDI_EVENT structures +#define BASS_MIDI_EVENTS_RAW 0x10000 // raw MIDI event data +#define BASS_MIDI_EVENTS_SYNC 0x1000000 // flag: trigger event syncs +#define BASS_MIDI_EVENTS_NORSTATUS 0x2000000 // flag: no running status +#define BASS_MIDI_EVENTS_CANCEL 0x4000000 // flag: cancel pending events +#define BASS_MIDI_EVENTS_TIME 0x8000000 // flag: delta-time info is present +#define BASS_MIDI_EVENTS_ABSTIME 0x10000000 // flag: absolute time info is present +#define BASS_MIDI_EVENTS_ASYNC 0x20000000 // flag: process asynchronously +#define BASS_MIDI_EVENTS_FILTER 0x40000000 // flag: apply filtering +#define BASS_MIDI_EVENTS_FLUSH 0x80000000 // flag: flush async events + +// BASS_MIDI_StreamGetChannel special channels +#define BASS_MIDI_CHAN_CHORUS (DWORD)-1 +#define BASS_MIDI_CHAN_REVERB (DWORD)-2 +#define BASS_MIDI_CHAN_USERFX (DWORD)-3 + +// BASS_CHANNELINFO type +#define BASS_CTYPE_STREAM_MIDI 0x10d00 + +// Additional attributes +#define BASS_ATTRIB_MIDI_PPQN 0x12000 +#define BASS_ATTRIB_MIDI_CPU 0x12001 +#define BASS_ATTRIB_MIDI_CHANS 0x12002 +#define BASS_ATTRIB_MIDI_VOICES 0x12003 +#define BASS_ATTRIB_MIDI_VOICES_ACTIVE 0x12004 +#define BASS_ATTRIB_MIDI_STATE 0x12005 +#define BASS_ATTRIB_MIDI_SRC 0x12006 +#define BASS_ATTRIB_MIDI_KILL 0x12007 +#define BASS_ATTRIB_MIDI_SPEED 0x12008 +#define BASS_ATTRIB_MIDI_REVERB 0x12009 +#define BASS_ATTRIB_MIDI_VOL 0x1200a +#define BASS_ATTRIB_MIDI_TRACK_VOL 0x12100 // + track # + +// Additional tag type +#define BASS_TAG_MIDI_TRACK 0x11000 // + track #, track text : array of null-terminated ANSI strings + +// BASS_ChannelGetLength/GetPosition/SetPosition mode +#define BASS_POS_MIDI_TICK 2 // tick position + +typedef BOOL (CALLBACK MIDIFILTERPROC)(HSTREAM handle, int track, BASS_MIDI_EVENT *event, BOOL seeking, void *user); +/* Event filtering callback function. +handle : MIDI stream handle +track : Track containing the event +event : The event +seeking: TRUE = the event is being processed while seeking, FALSE = it is being played +user : The 'user' parameter value given when calling BASS_MIDI_StreamSetFilter +RETURN : TRUE = process the event, FALSE = drop the event */ + +// BASS_MIDI_FontLoadEx flags +#define BASS_MIDI_FONTLOAD_NOWAIT 1 // don't want for the samples to load +#define BASS_MIDI_FONTLOAD_COMPACT 2 // compact samples +#define BASS_MIDI_FONTLOAD_NOLOAD 4 // don't load (only compact) +#define BASS_MIDI_FONTLOAD_TIME 8 // length is in milliseconds +#define BASS_MIDI_FONTLOAD_KEEPDEC 16 // keep decoders + +// BASS_MIDI_FontPack flags +#define BASS_MIDI_PACK_NOHEAD 1 // don't send a WAV header to the encoder +#define BASS_MIDI_PACK_16BIT 2 // discard low 8 bits of 24-bit sample data +#define BASS_MIDI_PACK_48KHZ 4 // set encoding rate to 48000 Hz (else 44100 Hz) + +typedef struct { + const char *name; // description + DWORD id; + DWORD flags; +} BASS_MIDI_DEVICEINFO; + +typedef void (CALLBACK MIDIINPROC)(DWORD device, double time, const BYTE *buffer, DWORD length, void *user); +/* MIDI input callback function. +device : MIDI input device +time : Timestamp +buffer : Buffer containing MIDI data +length : Number of bytes of data +user : The 'user' parameter value given when calling BASS_MIDI_InInit */ + +DWORD BASSMIDIDEF(BASS_MIDI_GetVersion)(void); + +HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreate)(DWORD channels, DWORD flags, DWORD freq); +HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateFile)(BOOL mem, const void *file, QWORD offset, QWORD length, DWORD flags, DWORD freq); +HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateURL)(const char *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user, DWORD freq); +HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateFileUser)(DWORD system, DWORD flags, const BASS_FILEPROCS *procs, void *user, DWORD freq); +HSTREAM BASSMIDIDEF(BASS_MIDI_StreamCreateEvents)(const BASS_MIDI_EVENT *events, DWORD ppqn, DWORD flags, DWORD freq); +BOOL BASSMIDIDEF(BASS_MIDI_StreamGetMark)(HSTREAM handle, DWORD type, DWORD index, BASS_MIDI_MARK *mark); +DWORD BASSMIDIDEF(BASS_MIDI_StreamGetMarks)(HSTREAM handle, int track, DWORD type, BASS_MIDI_MARK *marks); +BOOL BASSMIDIDEF(BASS_MIDI_StreamSetFonts)(HSTREAM handle, const void *fonts, DWORD count); +DWORD BASSMIDIDEF(BASS_MIDI_StreamGetFonts)(HSTREAM handle, void *fonts, DWORD count); +BOOL BASSMIDIDEF(BASS_MIDI_StreamLoadSamples)(HSTREAM handle); +BOOL BASSMIDIDEF(BASS_MIDI_StreamEvent)(HSTREAM handle, DWORD chan, DWORD event, DWORD param); +DWORD BASSMIDIDEF(BASS_MIDI_StreamEvents)(HSTREAM handle, DWORD mode, const void *events, DWORD length); +DWORD BASSMIDIDEF(BASS_MIDI_StreamGetEvent)(HSTREAM handle, DWORD chan, DWORD event); +DWORD BASSMIDIDEF(BASS_MIDI_StreamGetEvents)(HSTREAM handle, int track, DWORD filter, BASS_MIDI_EVENT *events); +DWORD BASSMIDIDEF(BASS_MIDI_StreamGetEventsEx)(HSTREAM handle, int track, DWORD filter, BASS_MIDI_EVENT *events, DWORD start, DWORD count); +BOOL BASSMIDIDEF(BASS_MIDI_StreamGetPreset)(HSTREAM handle, DWORD chan, BASS_MIDI_FONT *font); +HSTREAM BASSMIDIDEF(BASS_MIDI_StreamGetChannel)(HSTREAM handle, DWORD chan); +BOOL BASSMIDIDEF(BASS_MIDI_StreamSetFilter)(HSTREAM handle, BOOL seeking, MIDIFILTERPROC *proc, void *user); + +HSOUNDFONT BASSMIDIDEF(BASS_MIDI_FontInit)(const void *file, DWORD flags); +HSOUNDFONT BASSMIDIDEF(BASS_MIDI_FontInitUser)(const BASS_FILEPROCS *procs, void *user, DWORD flags); +BOOL BASSMIDIDEF(BASS_MIDI_FontFree)(HSOUNDFONT handle); +BOOL BASSMIDIDEF(BASS_MIDI_FontGetInfo)(HSOUNDFONT handle, BASS_MIDI_FONTINFO *info); +BOOL BASSMIDIDEF(BASS_MIDI_FontGetPresets)(HSOUNDFONT handle, DWORD *presets); +const char *BASSMIDIDEF(BASS_MIDI_FontGetPreset)(HSOUNDFONT handle, int preset, int bank); +BOOL BASSMIDIDEF(BASS_MIDI_FontLoad)(HSOUNDFONT handle, int preset, int bank); +BOOL BASSMIDIDEF(BASS_MIDI_FontLoadEx)(HSOUNDFONT handle, int preset, int bank, DWORD length, DWORD flags); +BOOL BASSMIDIDEF(BASS_MIDI_FontUnload)(HSOUNDFONT handle, int preset, int bank); +BOOL BASSMIDIDEF(BASS_MIDI_FontCompact)(HSOUNDFONT handle); +BOOL BASSMIDIDEF(BASS_MIDI_FontPack)(HSOUNDFONT handle, const void *outfile, const void *encoder, DWORD flags); +BOOL BASSMIDIDEF(BASS_MIDI_FontUnpack)(HSOUNDFONT handle, const void *outfile, DWORD flags); +DWORD BASSMIDIDEF(BASS_MIDI_FontFlags)(HSOUNDFONT handle, DWORD flags, DWORD mask); +BOOL BASSMIDIDEF(BASS_MIDI_FontSetVolume)(HSOUNDFONT handle, float volume); +float BASSMIDIDEF(BASS_MIDI_FontGetVolume)(HSOUNDFONT handle); + +DWORD BASSMIDIDEF(BASS_MIDI_ConvertEvents)(const BYTE *data, DWORD length, BASS_MIDI_EVENT *events, DWORD count, DWORD flags); + +BOOL BASSMIDIDEF(BASS_MIDI_InGetDeviceInfo)(DWORD device, BASS_MIDI_DEVICEINFO *info); +BOOL BASSMIDIDEF(BASS_MIDI_InInit)(DWORD device, MIDIINPROC *proc, void *user); +BOOL BASSMIDIDEF(BASS_MIDI_InFree)(DWORD device); +BOOL BASSMIDIDEF(BASS_MIDI_InStart)(DWORD device); +BOOL BASSMIDIDEF(BASS_MIDI_InStop)(DWORD device); + +#ifdef __cplusplus +} + +#ifndef NOBASSMIDIOVERLOADS + +static inline BOOL BASS_MIDI_StreamSetFonts(HSTREAM handle, const BASS_MIDI_FONTEX *fonts, DWORD count) +{ + return BASS_MIDI_StreamSetFonts(handle, (const void*)fonts, count | BASS_MIDI_FONT_EX); +} + +static inline BOOL BASS_MIDI_StreamSetFonts(HSTREAM handle, const BASS_MIDI_FONTEX2 *fonts, DWORD count) +{ + return BASS_MIDI_StreamSetFonts(handle, (const void*)fonts, count | BASS_MIDI_FONT_EX2); +} + +static inline DWORD BASS_MIDI_StreamGetFonts(HSTREAM handle, BASS_MIDI_FONTEX *fonts, DWORD count) +{ + return BASS_MIDI_StreamGetFonts(handle, (void*)fonts, count | BASS_MIDI_FONT_EX); +} + +static inline DWORD BASS_MIDI_StreamGetFonts(HSTREAM handle, BASS_MIDI_FONTEX2 *fonts, DWORD count) +{ + return BASS_MIDI_StreamGetFonts(handle, (void*)fonts, count | BASS_MIDI_FONT_EX2); +} + +#ifdef _WIN32 +static inline HSTREAM BASS_MIDI_StreamCreateFile(BOOL mem, const WCHAR *file, QWORD offset, QWORD length, DWORD flags, DWORD freq) +{ + return BASS_MIDI_StreamCreateFile(mem, (const void*)file, offset, length, flags | BASS_UNICODE, freq); +} + +static inline HSTREAM BASS_MIDI_StreamCreateURL(const WCHAR *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user, DWORD freq) +{ + return BASS_MIDI_StreamCreateURL((const char*)url, offset, flags | BASS_UNICODE, proc, user, freq); +} + +static inline HSOUNDFONT BASS_MIDI_FontInit(const WCHAR *file, DWORD flags) +{ + return BASS_MIDI_FontInit((const void*)file, flags|BASS_UNICODE); +} + +static inline BOOL BASS_MIDI_FontPack(HSOUNDFONT handle, const WCHAR *outfile, const WCHAR *encoder, DWORD flags) +{ + return BASS_MIDI_FontPack(handle, (const void*)outfile, (const void*)encoder, flags | BASS_UNICODE); +} + +static inline BOOL BASS_MIDI_FontUnpack(HSOUNDFONT handle, const WCHAR * outfile, DWORD flags) +{ + return BASS_MIDI_FontUnpack(handle, (const void*)outfile, flags | BASS_UNICODE); +} +#endif +#endif +#endif + +#ifdef __OBJC__ +#undef BOOL +#endif + +#endif