DTXManiaXG(Ver.K)4.00Series
修訂 | 38af25861ef018c2ab36546e703dd878c8090b2c (tree) |
---|---|
時間 | 2019-09-02 23:02:32 |
作者 | ![]() |
Commiter | kairera0467 |
#xxxxx DTXMania Rev:0c282febd430a19882761187d8704f9829cc36c7の修正を適用
#xxxxx DTXCreatorのapp.configを微修正
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0"?> |
2 | 2 | <configuration> |
3 | 3 | <startup useLegacyV2RuntimeActivationPolicy="true"> |
4 | - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/> | |
4 | + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/> | |
5 | 5 | <supportedRuntime version="v2.0.50727"/> |
6 | 6 | <supportedRuntime version="v1.1.4322"/> |
7 | 7 | <supportedRuntime version="v1.0.3705"/> |
@@ -11,14 +11,6 @@ | ||
11 | 11 | <loadFromRemoteSources enabled="true"/> |
12 | 12 | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
13 | 13 | <probing privatePath="dll"/> |
14 | - <dependentAssembly> | |
15 | - <assemblyIdentity name="SlimDX" | |
16 | - version="1002.0.10.43" | |
17 | - publicKeyToken="53d0e4ef1f1579f5" | |
18 | - culture="neutral" /> | |
19 | - <codeBase version="1002.0.10.43" | |
20 | - href="dll\SlimDXc_net20x86_Jun2010.dll"/> | |
21 | - </dependentAssembly> | |
22 | 14 | </assemblyBinding> |
23 | 15 | </runtime> |
24 | 16 | </configuration> |
@@ -342,23 +342,23 @@ namespace FDK | ||
342 | 342 | [return: MarshalAs( UnmanagedType.Bool )] |
343 | 343 | [DllImport( "user32.dll", CharSet = CharSet.Auto )] |
344 | 344 | public static extern bool IsZoomed( IntPtr hWnd ); |
345 | - [DllImport( "winmm.dll" )] | |
346 | - public static extern uint midiInClose( uint hMidiIn ); | |
347 | - [DllImport( "winmm.dll" )] | |
348 | - public static extern uint midiInGetDevCaps( uint uDeviceID, ref MIDIINCAPS lpMidiInCaps, uint cbMidiInCaps ); | |
349 | - [DllImport( "winmm.dll" )] | |
350 | - public static extern uint midiInGetID( uint hMidiIn, ref uint puDeviceID ); | |
351 | - [DllImport( "winmm.dll" )] | |
352 | - public static extern uint midiInGetNumDevs(); | |
353 | - [DllImport( "winmm.dll" )] | |
354 | - public static extern uint midiInOpen( ref uint phMidiIn, uint uDeviceID, MidiInProc dwCallback, int dwInstance, int fdwOpen ); | |
355 | - [DllImport( "winmm.dll" )] | |
356 | - public static extern uint midiInReset( uint hMidiIn ); | |
357 | - [DllImport( "winmm.dll" )] | |
358 | - public static extern uint midiInStart( uint hMidiIn ); | |
359 | - [DllImport( "winmm.dll" )] | |
360 | - public static extern uint midiInStop( uint hMidiIn ); | |
361 | - [DllImport( "user32.dll", CharSet = CharSet.Auto )] | |
345 | + [DllImport( "winmm.dll" )] | |
346 | + public static extern uint midiInClose( IntPtr hMidiIn ); | |
347 | + [DllImport( "winmm.dll" )] | |
348 | + public static extern uint midiInGetDevCaps( uint uDeviceID, ref MIDIINCAPS lpMidiInCaps, uint cbMidiInCaps ); | |
349 | + [DllImport( "winmm.dll" )] | |
350 | + public static extern uint midiInGetID( IntPtr hMidiIn, ref IntPtr puDeviceID ); | |
351 | + [DllImport( "winmm.dll" )] | |
352 | + public static extern uint midiInGetNumDevs(); | |
353 | + [DllImport( "winmm.dll" )] | |
354 | + public static extern uint midiInOpen( ref IntPtr phMidiIn, uint uDeviceID, MidiInProc dwCallback, IntPtr dwInstance, int fdwOpen ); | |
355 | + [DllImport( "winmm.dll" )] | |
356 | + public static extern uint midiInReset( IntPtr hMidiIn ); | |
357 | + [DllImport( "winmm.dll" )] | |
358 | + public static extern uint midiInStart( IntPtr hMidiIn ); | |
359 | + [DllImport( "winmm.dll" )] | |
360 | + public static extern uint midiInStop( IntPtr hMidiIn ); | |
361 | + [DllImport( "user32.dll", CharSet = CharSet.Auto )] | |
362 | 362 | public static extern IntPtr MonitorFromWindow( IntPtr hwnd, uint dwFlags ); |
363 | 363 | [return: MarshalAs( UnmanagedType.Bool )] |
364 | 364 | [DllImport( "user32.dll", CharSet = CharSet.Auto )] |
@@ -806,8 +806,8 @@ namespace FDK | ||
806 | 806 | } |
807 | 807 | |
808 | 808 | |
809 | - // Win32 メッセージ処理デリゲート | |
809 | + // Win32 メッセージ処理デリゲート | |
810 | 810 | |
811 | - public delegate void MidiInProc( uint hMidiIn, uint wMsg, int dwInstance, int dwParam1, int dwParam2 ); | |
812 | - } | |
811 | + public delegate void MidiInProc( IntPtr hMidiIn, uint wMsg, int dwInstance, int dwParam1, int dwParam2 ); | |
812 | + } | |
813 | 813 | } |
@@ -9,14 +9,14 @@ namespace FDK | ||
9 | 9 | { |
10 | 10 | // プロパティ |
11 | 11 | |
12 | - public uint hMidiIn; | |
12 | + public IntPtr hMidiIn; | |
13 | 13 | public List<STInputEvent> listEventBuffer; |
14 | 14 | |
15 | 15 | // コンストラクタ |
16 | 16 | |
17 | 17 | public CInputMIDI( uint nID ) |
18 | 18 | { |
19 | - this.hMidiIn = 0; | |
19 | + this.hMidiIn = IntPtr.Zero; | |
20 | 20 | this.listEventBuffer = new List<STInputEvent>( 32 ); |
21 | 21 | this.list入力イベント = new List<STInputEvent>( 32 ); |
22 | 22 | this.e入力デバイス種別 = E入力デバイス種別.MidiIn; |
@@ -61,13 +61,9 @@ namespace FDK | ||
61 | 61 | } |
62 | 62 | |
63 | 63 | |
64 | - // コンストラクタ | |
65 | - public CInput管理( IntPtr hWnd ) | |
66 | - { | |
67 | - CInput管理初期化( hWnd, true ); | |
68 | - } | |
69 | - public CInput管理( IntPtr hWnd, bool bUseMidiIn ) | |
70 | - { | |
64 | + // コンストラクタ | |
65 | + public CInput管理( IntPtr hWnd, bool bUseMidiIn = true ) | |
66 | + { | |
71 | 67 | CInput管理初期化( hWnd, bUseMidiIn ); |
72 | 68 | } |
73 | 69 |
@@ -117,8 +113,8 @@ namespace FDK | ||
117 | 113 | { |
118 | 114 | Trace.TraceError( "MIDI In: Device{0}: midiInDevCaps(): {1:X2}: ", i, num3 ); |
119 | 115 | } |
120 | - else if ( ( CWin32.midiInOpen( ref item.hMidiIn, i, this.proc, 0, 0x30000 ) == 0 ) && ( item.hMidiIn != 0 ) ) | |
121 | - { | |
116 | + else if( ( CWin32.midiInOpen( ref item.hMidiIn, i, this.proc, IntPtr.Zero, 0x30000 ) == 0 ) && ( item.hMidiIn != IntPtr.Zero ) ) | |
117 | + { | |
122 | 118 | CWin32.midiInStart( item.hMidiIn ); |
123 | 119 | Trace.TraceInformation( "MIDI In: [{0}] \"{1}\" の入力受付を開始しました。", i, lpMidiInCaps.szPname ); |
124 | 120 | } |
@@ -265,10 +261,10 @@ namespace FDK | ||
265 | 261 | private List<uint> listHMIDIIN = new List<uint>( 8 ); |
266 | 262 | private object objMidiIn排他用 = new object(); |
267 | 263 | private CWin32.MidiInProc proc; |
268 | -// private CTimer timer; | |
264 | + // private CTimer timer; | |
269 | 265 | |
270 | - private void MidiInCallback( uint hMidiIn, uint wMsg, int dwInstance, int dwParam1, int dwParam2 ) | |
271 | - { | |
266 | + private void MidiInCallback( IntPtr hMidiIn, uint wMsg, int dwInstance, int dwParam1, int dwParam2 ) | |
267 | + { | |
272 | 268 | int p = dwParam1 & 0xF0; |
273 | 269 | if( wMsg != CWin32.MIM_DATA || ( p != 0x80 && p != 0x90 && p != 0xB0 ) ) |
274 | 270 | return; |