Skip to content

Commit

Permalink
Version 14.6.13 (PR97)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaleidonKep99 committed May 13, 2022
1 parent bcced08 commit 141e5a0
Show file tree
Hide file tree
Showing 17 changed files with 655 additions and 184 deletions.
6 changes: 3 additions & 3 deletions OmniMIDI/BufferSystem.h
Expand Up @@ -159,7 +159,7 @@ void __inline SendToBASSMIDI(DWORD dwParam1) {
}
}

_BMSEs(OMStream, BASS_MIDI_EVENTS_RAW, &dwParam1, len);
_BMSEs(OMStream, BMSEsRAWFlags, &dwParam1, len);
return;
}
}
Expand All @@ -183,15 +183,15 @@ 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;
}
else if ((dwParam1 & 0xF0) == MIDI_NOTEOFF) {
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;
Expand Down
3 changes: 3 additions & 0 deletions OmniMIDI/DriverInit.h
Expand Up @@ -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;
Expand Down
Binary file modified OmniMIDI/Resource.aps
Binary file not shown.
Binary file modified OmniMIDI/Resource.rc
Binary file not shown.
4 changes: 3 additions & 1 deletion OmniMIDI/SoundFontLoader.h
Expand Up @@ -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...");
Expand Down
1 change: 1 addition & 0 deletions OmniMIDI/Values.h
Expand Up @@ -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;
Expand Down
55 changes: 30 additions & 25 deletions OmniMIDIConfigurator/OmniMIDIConfigurator/App.config
Expand Up @@ -9,7 +9,7 @@
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<userSettings>
<OmniMIDIConfigurator.Properties.Settings>
Expand Down Expand Up @@ -37,22 +37,6 @@
<setting name="AutoLoadList" serializeAs="String">
<value>False</value>
</setting>
<setting name="SFColumnsSize" serializeAs="Xml">
<value>
<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>
</value>
</setting>
<setting name="ShowChangelogStartUp" serializeAs="String">
<value>True</value>
</setting>
Expand All @@ -74,13 +58,32 @@
<setting name="DoNotShowDonation" serializeAs="String">
<value>False</value>
</setting>
<setting name="SFColumnsSize" serializeAs="Xml">
<value>
<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>
</value>
</setting>
</OmniMIDIConfigurator.Properties.Settings>
</userSettings>
<applicationSettings>
<OmniMIDIConfigurator.Properties.Settings>
<setting name="ProjectLink" serializeAs="String">
<value>https://github.com/KeppySoftware/OmniMIDI</value>
</setting>
<setting name="SFColumnsDefSize" serializeAs="Xml">
<value>
<ArrayOfInt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<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>
Expand All @@ -93,38 +96,36 @@
</ArrayOfInt>
</value>
</setting>
<setting name="ProjectLink" serializeAs="String">
<value>https://github.com/KeppySoftware/OmniMIDI</value>
</setting>
<setting name="SupportedFormats" serializeAs="Xml">
<value>
<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>.sf1</string>
<string>.sf2</string>
<string>.sf2pack</string>
<string>.sf3</string>
<string>.sfz</string>
</ArrayOfString>
</value>
</setting>
<setting name="PreReleaseBranch" serializeAs="Xml">
<value>
<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>
</value>
</setting>
<setting name="StableBranch" serializeAs="Xml">
<value>
<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>
</value>
</setting>
<setting name="SlowBranch" serializeAs="Xml">
<value>
<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>
Expand All @@ -142,6 +143,10 @@
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Expand Up @@ -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;
Expand All @@ -40,6 +43,12 @@ public struct SYSTEM_INFO
public short wProcessorRevision;
}

public enum SymbolicLink
{
File = 0,
Directory = 1
}

public enum FILE_ARCH
{
UNK,
Expand Down Expand Up @@ -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;

Expand All @@ -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);

Expand All @@ -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);

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 141e5a0

Please sign in to comment.