修订版 | 4c26ea0cf7f452f1a0ab20b8e15191a09f6216e6 (tree) |
---|---|
时间 | 2018-01-11 10:05:11 |
作者 | Starg <starg@user...> |
Commiter | Starg |
Import UnkoTim213
@@ -405,6 +405,7 @@ | ||
405 | 405 | #define DEFAULT_AUDIO_BUFFER_NUM 32 /* 370ms over */ |
406 | 406 | #define DEFAULT_COMPUTE_BUFFER_BITS 6 /* ratio 1.45ms (44.1kHz) */ |
407 | 407 | #define TWSYNG32INI 1 // use twsyng32.ini or timpp32g.ini ?? |
408 | +#define USE_TWSYN_BRIDGE 1 | |
408 | 409 | #undef ANOTHER_MAIN |
409 | 410 | //#undef __W32G__ /* for Win32 GUI */ |
410 | 411 | #undef IA_W32GUI /* for Win32 GUI */ |
@@ -442,6 +443,7 @@ | ||
442 | 443 | #define DEFAULT_AUDIO_BUFFER_BITS 9 /* 512sample 11ms (44.1kHz) */ |
443 | 444 | #define DEFAULT_AUDIO_BUFFER_NUM 32 /* 370ms over */ |
444 | 445 | #define DEFAULT_COMPUTE_BUFFER_BITS 6 /* ratio 1.45ms (44.1kHz) */ |
446 | +#undef USE_TWSYN_BRIDGE | |
445 | 447 | /* #undef AU_NPIPE */ |
446 | 448 | #undef AU_VORBIS |
447 | 449 | #undef AU_VORBIS_DLL |
@@ -478,6 +480,7 @@ | ||
478 | 480 | #define DEFAULT_COMPUTE_BUFFER_BITS 6 /* ratio 1.45ms (44.1kHz) */ |
479 | 481 | #define TIMDRVINI 1 // use timdrv.ini or twsyng32.ini or timpp32g.ini ?? |
480 | 482 | #define IA_WINSYN |
483 | +#undef USE_TWSYN_BRIDGE | |
481 | 484 | //#undef AU_WASAPI |
482 | 485 | #undef AU_VORBIS |
483 | 486 | #undef AU_VORBIS_DLL |
@@ -623,6 +626,7 @@ | ||
623 | 626 | #define DEFAULT_COMPUTE_BUFFER_BITS 6 /* ratio 1.45ms (44.1kHz) */ |
624 | 627 | #define TIMDRVINI 1 // use timdrv.ini or twsyng32.ini or timpp32g.ini ?? |
625 | 628 | #define IA_WINSYN |
629 | +#undef USE_TWSYN_BRIDGE | |
626 | 630 | #define WINDRV 1 |
627 | 631 | #define AU_W32 1 |
628 | 632 | #define AU_WASAPI 1 |
@@ -71,13 +71,14 @@ | ||
71 | 71 | <PropertyGroup> |
72 | 72 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
73 | 73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
74 | - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</OutDir> | |
74 | + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> | |
75 | 75 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
76 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</IntDir> | |
76 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
77 | 77 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
78 | 78 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
79 | 79 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
80 | 80 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir> |
81 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
81 | 82 | </PropertyGroup> |
82 | 83 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
83 | 84 | <ClCompile> |
@@ -74,6 +74,10 @@ | ||
74 | 74 | #include "timer.h" |
75 | 75 | |
76 | 76 | #include "rtsyn.h" |
77 | +#ifdef USE_TWSYN_BRIDGE | |
78 | +#include "twsyn_bridge_common.h" | |
79 | +#include "twsyn_bridge_host.h" | |
80 | +#endif | |
77 | 81 | |
78 | 82 | int rtsyn_portnumber=1; |
79 | 83 | unsigned int portID[MAX_PORT]; |
@@ -108,17 +112,29 @@ CRITICAL_SECTION mim_section; | ||
108 | 112 | |
109 | 113 | double mim_start_time; |
110 | 114 | |
111 | -void CALLBACK MidiInProc(HMIDIIN,UINT,DWORD,DWORD,DWORD); | |
115 | +void CALLBACK MidiInProc(HMIDIIN hMidiInL, UINT wMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2); | |
112 | 116 | |
113 | 117 | void rtsyn_get_port_list(){ |
114 | 118 | int i; |
115 | 119 | MIDIINCAPS InCaps; |
116 | - InNum = midiInGetNumDevs(); | |
117 | - for (i=1;i <=InNum && i<=32;i++){ | |
118 | - midiInGetDevCaps(i-1,(LPMIDIINCAPSA) &InCaps,sizeof(InCaps)); | |
119 | - sprintf(rtsyn_portlist[i-1],"%d:%s",i,(LPSTR)InCaps.szPname); | |
120 | + | |
121 | +#ifdef USE_TWSYN_BRIDGE | |
122 | + if(opt_use_twsyn_bridge){ | |
123 | + InNum = get_bridge_midi_devs(); | |
124 | + for (i=1;i <=InNum && i<=32;i++){ | |
125 | + sprintf(rtsyn_portlist[i-1],"%d:%s",i,(LPSTR)get_bridge_midi_dev_name(i)); | |
126 | + } | |
127 | + rtsyn_nportlist=i-1; | |
128 | + }else | |
129 | +#endif | |
130 | + { | |
131 | + InNum = midiInGetNumDevs(); | |
132 | + for (i=1;i <=InNum && i<=32;i++){ | |
133 | + midiInGetDevCaps(i-1,(LPMIDIINCAPSA) &InCaps,sizeof(InCaps)); | |
134 | + sprintf(rtsyn_portlist[i-1],"%d:%s",i,(LPSTR)InCaps.szPname); | |
135 | + } | |
136 | + rtsyn_nportlist=i-1; | |
120 | 137 | } |
121 | - rtsyn_nportlist=i-1; | |
122 | 138 | } |
123 | 139 | |
124 | 140 | int rtsyn_synth_start(){ |
@@ -132,42 +148,49 @@ int rtsyn_synth_start(){ | ||
132 | 148 | |
133 | 149 | |
134 | 150 | port=0; |
135 | - sleep(2); | |
136 | - for(port=0;port<rtsyn_portnumber;port++){ | |
137 | - for (i=0;i<MAX_EXBUF;i++){ | |
138 | - IMidiHdr[port][i] = (MIDIHDR *)sIMidiHdr[port][i]; | |
139 | - memset(IMidiHdr[port][i],0,sizeof(MIDIHDR)); | |
140 | - IMidiHdr[port][i]->lpData = sImidiHdr_data[port][i]; | |
141 | - memset((IMidiHdr[port][i]->lpData),0,BUFF_SIZE); | |
142 | - IMidiHdr[port][i]->dwBufferLength = BUFF_SIZE; | |
143 | - } | |
144 | - } | |
145 | 151 | evbwpoint=0; |
146 | 152 | evbrpoint=0; |
147 | 153 | mvbuse=0; |
154 | + sleep(1); | |
155 | +#ifdef USE_TWSYN_BRIDGE | |
156 | + if(opt_use_twsyn_bridge){ | |
157 | + open_bridge_midi_dev(rtsyn_portnumber, portID); | |
158 | + }else | |
159 | +#endif | |
160 | + { | |
161 | + for(port=0;port<rtsyn_portnumber;port++){ | |
162 | + for (i=0;i<MAX_EXBUF;i++){ | |
163 | + IMidiHdr[port][i] = (MIDIHDR *)sIMidiHdr[port][i]; | |
164 | + memset(IMidiHdr[port][i],0,sizeof(MIDIHDR)); | |
165 | + IMidiHdr[port][i]->lpData = sImidiHdr_data[port][i]; | |
166 | + memset((IMidiHdr[port][i]->lpData),0,BUFF_SIZE); | |
167 | + IMidiHdr[port][i]->dwBufferLength = BUFF_SIZE; | |
168 | + } | |
169 | + } | |
148 | 170 | |
149 | - for(port=0;port<rtsyn_portnumber;port++){ | |
150 | - midiInOpen(&hMidiIn[port],portID[port],(DWORD_PTR)MidiInProc,(DWORD_PTR)port,CALLBACK_FUNCTION); | |
151 | - for (i=0;i<MAX_EXBUF;i++){ | |
152 | - midiInUnprepareHeader(hMidiIn[port],IMidiHdr[port][i],sizeof(MIDIHDR)); | |
153 | - midiInPrepareHeader(hMidiIn[port],IMidiHdr[port][i],sizeof(MIDIHDR)); | |
154 | - midiInAddBuffer(hMidiIn[port],IMidiHdr[port][i],sizeof(MIDIHDR)); | |
171 | + for(port=0;port<rtsyn_portnumber;port++){ | |
172 | + midiInOpen(&hMidiIn[port],portID[port],(DWORD_PTR)MidiInProc,(DWORD_PTR)port,CALLBACK_FUNCTION); | |
173 | + for (i=0;i<MAX_EXBUF;i++){ | |
174 | + midiInUnprepareHeader(hMidiIn[port],IMidiHdr[port][i],sizeof(MIDIHDR)); | |
175 | + midiInPrepareHeader(hMidiIn[port],IMidiHdr[port][i],sizeof(MIDIHDR)); | |
176 | + midiInAddBuffer(hMidiIn[port],IMidiHdr[port][i],sizeof(MIDIHDR)); | |
177 | + } | |
155 | 178 | } |
156 | - } | |
157 | 179 | |
158 | 180 | #ifdef __W32__ |
159 | - // HACK:midiInOpen()でリセットされてしまうため、再設定 | |
160 | - SetPriorityClass(GetCurrentProcess(), processPriority); | |
181 | + // HACK:midiInOpen()でリセットされてしまうため、再設定 | |
182 | + SetPriorityClass(GetCurrentProcess(), processPriority); | |
161 | 183 | #endif |
162 | - for(port=0;port<rtsyn_portnumber;port++){ | |
163 | - if(MMSYSERR_NOERROR !=midiInStart(hMidiIn[port])){ | |
164 | - int i; | |
165 | - for(i=0;i<port;i++){ | |
166 | - midiInStop(hMidiIn[i]); | |
167 | - midiInReset(hMidiIn[i]); | |
168 | - midiInClose(hMidiIn[i]); | |
184 | + for(port=0;port<rtsyn_portnumber;port++){ | |
185 | + if(MMSYSERR_NOERROR !=midiInStart(hMidiIn[port])){ | |
186 | + int i; | |
187 | + for(i=0;i<port;i++){ | |
188 | + midiInStop(hMidiIn[i]); | |
189 | + midiInReset(hMidiIn[i]); | |
190 | + midiInClose(hMidiIn[i]); | |
191 | + } | |
192 | + goto winmmerror; | |
169 | 193 | } |
170 | - goto winmmerror; | |
171 | 194 | } |
172 | 195 | } |
173 | 196 | mim_start_time = get_current_calender_time(); |
@@ -181,15 +204,19 @@ winmmerror: | ||
181 | 204 | |
182 | 205 | void rtsyn_synth_stop(){ |
183 | 206 | rtsyn_stop_playing(); |
184 | - // play_mode->close_output(); | |
207 | + // play_mode->close_output(); | |
185 | 208 | rtsyn_midiports_close(); |
186 | 209 | DeleteCriticalSection(&mim_section); |
187 | - | |
188 | 210 | return; |
189 | 211 | } |
190 | 212 | void rtsyn_midiports_close(void){ |
191 | 213 | UINT port; |
192 | - | |
214 | + | |
215 | +#ifdef USE_TWSYN_BRIDGE | |
216 | + if(opt_use_twsyn_bridge) | |
217 | + close_bridge_midi_dev(); | |
218 | + else | |
219 | +#endif | |
193 | 220 | for(port=0;port<rtsyn_portnumber;port++){ |
194 | 221 | if( MMSYSERR_NOERROR!=midiInStop(hMidiIn[port]) ) |
195 | 222 | ctl->cmsg( CMSG_ERROR, VERB_NORMAL,"MIDI Stop Error\n"); |
@@ -246,19 +273,28 @@ int rtsyn_play_some_data(void){ | ||
246 | 273 | rtsyn_play_one_data (port, dwParam1, mim_start_time+(double)dwParam2 * DIV_1000); |
247 | 274 | break; |
248 | 275 | case MIM_LONGDATA: |
249 | - IIMidiHdr = (MIDIHDR *) dwParam1; | |
250 | - exlen=(int)IIMidiHdr->dwBytesRecorded; | |
251 | - sysexbuffer=IIMidiHdr->lpData; | |
252 | - rtsyn_play_one_sysex (sysexbuffer,exlen, mim_start_time+(double)dwParam2 * DIV_1000); | |
253 | - if (MMSYSERR_NOERROR != midiInUnprepareHeader( | |
254 | - hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR))) | |
255 | - ctl->cmsg( CMSG_ERROR, VERB_NORMAL,"error1\n"); | |
256 | - if (MMSYSERR_NOERROR != midiInPrepareHeader( | |
257 | - hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR))) | |
258 | - ctl->cmsg( CMSG_ERROR, VERB_NORMAL,"error5\n"); | |
259 | - if (MMSYSERR_NOERROR != midiInAddBuffer( | |
260 | - hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR))) | |
261 | - ctl->cmsg( CMSG_ERROR, VERB_NORMAL,"error6\n"); | |
276 | +#ifdef USE_TWSYN_BRIDGE | |
277 | + if(opt_use_twsyn_bridge){ | |
278 | + exlen = get_bridge_mim_databytes((int)dwParam1); | |
279 | + sysexbuffer = get_bridge_mim_longdata((int)dwParam1); | |
280 | + rtsyn_play_one_sysex(sysexbuffer, exlen, mim_start_time + (double)dwParam2 * DIV_1000); | |
281 | + }else | |
282 | +#endif | |
283 | + { | |
284 | + IIMidiHdr = (MIDIHDR *) dwParam1; | |
285 | + exlen=(int)IIMidiHdr->dwBytesRecorded; | |
286 | + sysexbuffer=IIMidiHdr->lpData; | |
287 | + rtsyn_play_one_sysex (sysexbuffer,exlen, mim_start_time+(double)dwParam2 * DIV_1000); | |
288 | + if (MMSYSERR_NOERROR != midiInUnprepareHeader( | |
289 | + hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR))) | |
290 | + ctl->cmsg( CMSG_ERROR, VERB_NORMAL,"error1\n"); | |
291 | + if (MMSYSERR_NOERROR != midiInPrepareHeader( | |
292 | + hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR))) | |
293 | + ctl->cmsg( CMSG_ERROR, VERB_NORMAL,"error5\n"); | |
294 | + if (MMSYSERR_NOERROR != midiInAddBuffer( | |
295 | + hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR))) | |
296 | + ctl->cmsg( CMSG_ERROR, VERB_NORMAL,"error6\n"); | |
297 | + } | |
262 | 298 | break; |
263 | 299 | } |
264 | 300 | }while(rtsyn_buf_check()); |
@@ -302,3 +338,4 @@ void CALLBACK MidiInProc(HMIDIIN hMidiInL, UINT wMsg, DWORD_PTR dwInstance, | ||
302 | 338 | break; |
303 | 339 | } |
304 | 340 | } |
341 | + |
@@ -529,7 +529,8 @@ void LoadIniFile(SETTING_PLAYER *sp, SETTING_TIMIDITY *st) | ||
529 | 529 | IniGetKeyInt(INI_SEC_TIMIDITY,"opt_rtsyn_latency",&(st->opt_rtsyn_latency)); |
530 | 530 | if ( st->opt_rtsyn_latency < 1 ) st->opt_rtsyn_latency = 1; |
531 | 531 | if ( st->opt_rtsyn_latency > 1000 ) st->opt_rtsyn_latency = 1000; |
532 | - IniGetKeyInt(INI_SEC_TIMIDITY,"opt_rtsyn_skip_aq",&(st->opt_rtsyn_skip_aq)); | |
532 | + IniGetKeyInt(INI_SEC_TIMIDITY,"opt_rtsyn_skip_aq",&(st->opt_rtsyn_skip_aq)); | |
533 | + IniGetKeyInt(INI_SEC_TIMIDITY,"opt_use_twsyn_bridge",&(st->opt_use_twsyn_bridge)); | |
533 | 534 | #else |
534 | 535 | IniGetKeyInt(INI_SEC_TIMIDITY,"processPriority",&(st->processPriority)); |
535 | 536 | #endif |
@@ -765,6 +766,7 @@ SaveIniFile(SETTING_PLAYER *sp, SETTING_TIMIDITY *st) | ||
765 | 766 | IniPutKeyInt(INI_SEC_TIMIDITY,"SynShTime",&(st->SynShTime)); |
766 | 767 | IniPutKeyInt(INI_SEC_TIMIDITY,"opt_rtsyn_latency",&(st->opt_rtsyn_latency)); |
767 | 768 | IniPutKeyInt(INI_SEC_TIMIDITY,"opt_rtsyn_skip_aq",&(st->opt_rtsyn_skip_aq)); |
769 | + IniPutKeyInt(INI_SEC_TIMIDITY,"opt_use_twsyn_bridge",&(st->opt_use_twsyn_bridge)); | |
768 | 770 | #else |
769 | 771 | IniPutKeyInt(INI_SEC_TIMIDITY,"processPriority",&(st->processPriority)); |
770 | 772 | #endif |
@@ -1386,37 +1386,67 @@ PrefPlayerDialogProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
1386 | 1386 | return FALSE; |
1387 | 1387 | } |
1388 | 1388 | #else |
1389 | + | |
1390 | +#if defined(TWSYNG32) && !defined(TWSYNSRV) && defined(USE_TWSYN_BRIDGE) | |
1391 | +#include "twsyn_bridge_common.h" | |
1392 | +#include "twsyn_bridge_host.h" | |
1393 | +#endif | |
1394 | + | |
1389 | 1395 | extern int syn_ThreadPriority; |
1390 | 1396 | static TCHAR **MidiINDrivers = NULL; |
1397 | +static int midi_in_max = 0; | |
1391 | 1398 | // 0 MIDI Mapper -1 |
1392 | 1399 | // 1 MIDI IN Driver 0 |
1393 | 1400 | // 2 MIDI IN Driver 1 |
1394 | 1401 | static TCHAR **GetMidiINDrivers( void ) |
1395 | 1402 | { |
1396 | 1403 | int i; |
1397 | - int max = midiInGetNumDevs (); | |
1398 | - if ( MidiINDrivers != NULL ) { | |
1399 | - for ( i = 0; MidiINDrivers[i] != NULL; i ++ ) { | |
1400 | - safe_free ( MidiINDrivers[i] ); | |
1404 | + | |
1405 | +#if defined(TWSYNG32) && !defined(TWSYNSRV) && defined(USE_TWSYN_BRIDGE) | |
1406 | + if(st_temp->opt_use_twsyn_bridge){ | |
1407 | + midi_in_max = get_bridge_midi_devs(); | |
1408 | + if ( MidiINDrivers != NULL ) { | |
1409 | + for ( i = 0; MidiINDrivers[i] != NULL; i ++ ) { | |
1410 | + safe_free ( MidiINDrivers[i] ); | |
1411 | + } | |
1412 | + safe_free ( MidiINDrivers ); | |
1413 | + MidiINDrivers = NULL; | |
1401 | 1414 | } |
1402 | - safe_free ( MidiINDrivers ); | |
1403 | - MidiINDrivers = NULL; | |
1404 | - } | |
1405 | - MidiINDrivers = ( TCHAR ** ) malloc ( sizeof ( TCHAR * ) * ( max + 2 ) ); | |
1406 | - if ( MidiINDrivers == NULL ) return MidiINDrivers; | |
1407 | - MidiINDrivers[0] = safe_strdup ( "MIDI Mapper" ); | |
1408 | - for ( i = 1; i <= max; i ++ ) { | |
1409 | - MIDIINCAPS mic; | |
1410 | - if ( midiInGetDevCaps ( i - 1, &mic, sizeof ( MIDIINCAPS ) ) == 0 ) { | |
1411 | - MidiINDrivers[i] = strdup ( mic.szPname ); | |
1415 | + MidiINDrivers = ( TCHAR ** ) malloc ( sizeof ( TCHAR * ) * ( midi_in_max + 2 ) ); | |
1416 | + if ( MidiINDrivers == NULL ) return MidiINDrivers; | |
1417 | + for (i = 0; i <= midi_in_max; i ++ ) { | |
1418 | + MidiINDrivers[i] = strdup (get_bridge_midi_dev_name(i)); | |
1412 | 1419 | if ( MidiINDrivers[i] == NULL ) |
1413 | 1420 | break; |
1414 | - } else { | |
1415 | - MidiINDrivers[i] = NULL; | |
1416 | - break; | |
1417 | 1421 | } |
1422 | + MidiINDrivers[midi_in_max+1] = NULL; | |
1423 | + }else | |
1424 | +#endif | |
1425 | + { | |
1426 | + midi_in_max = midiInGetNumDevs (); | |
1427 | + if ( MidiINDrivers != NULL ) { | |
1428 | + for ( i = 0; MidiINDrivers[i] != NULL; i ++ ) { | |
1429 | + safe_free ( MidiINDrivers[i] ); | |
1430 | + } | |
1431 | + safe_free ( MidiINDrivers ); | |
1432 | + MidiINDrivers = NULL; | |
1433 | + } | |
1434 | + MidiINDrivers = ( TCHAR ** ) malloc ( sizeof ( TCHAR * ) * ( midi_in_max + 2 ) ); | |
1435 | + if ( MidiINDrivers == NULL ) return MidiINDrivers; | |
1436 | + MidiINDrivers[0] = safe_strdup ( "MIDI Mapper" ); | |
1437 | + for ( i = 1; i <= midi_in_max; i ++ ) { | |
1438 | + MIDIINCAPS mic; | |
1439 | + if ( midiInGetDevCaps ( i - 1, &mic, sizeof ( MIDIINCAPS ) ) == 0 ) { | |
1440 | + MidiINDrivers[i] = strdup ( mic.szPname ); | |
1441 | + if ( MidiINDrivers[i] == NULL ) | |
1442 | + break; | |
1443 | + } else { | |
1444 | + MidiINDrivers[i] = NULL; | |
1445 | + break; | |
1446 | + } | |
1447 | + } | |
1448 | + MidiINDrivers[midi_in_max+1] = NULL; | |
1418 | 1449 | } |
1419 | - MidiINDrivers[max+1] = NULL; | |
1420 | 1450 | return MidiINDrivers; |
1421 | 1451 | } |
1422 | 1452 |
@@ -1477,7 +1507,13 @@ PrefSyn1DialogProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
1477 | 1507 | DI_DISABLE(IDC_COMBO_IDPORT1); |
1478 | 1508 | DI_DISABLE(IDC_COMBO_IDPORT2); |
1479 | 1509 | DI_DISABLE(IDC_COMBO_IDPORT3); |
1510 | + DI_DISABLE(IDC_CHECK_USE_TWSYN_BRIDGE); | |
1480 | 1511 | #else |
1512 | +#if defined(TWSYNG32) && !defined(TWSYNSRV) && defined(USE_TWSYN_BRIDGE) | |
1513 | + DLG_FLAG_TO_CHECKBUTTON(hwnd, IDC_CHECK_USE_TWSYN_BRIDGE, st_temp->opt_use_twsyn_bridge); | |
1514 | +#else | |
1515 | + DI_DISABLE(IDC_CHECK_USE_TWSYN_BRIDGE); | |
1516 | +#endif | |
1481 | 1517 | GetMidiINDrivers(); |
1482 | 1518 | |
1483 | 1519 | for ( i = 0; i <= MAX_PORT; i ++ ) { |
@@ -1500,18 +1536,20 @@ PrefSyn1DialogProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
1500 | 1536 | } |
1501 | 1537 | safe_free ( MidiINDrivers ); |
1502 | 1538 | MidiINDrivers = NULL; |
1503 | - } | |
1504 | - | |
1505 | - SendDlgItemMessage(hwnd, IDC_COMBO_PORT_NUM, | |
1506 | - CB_SETCURSEL, (WPARAM) st_temp->SynPortNum, (LPARAM) 0 ); | |
1507 | - SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT0, | |
1508 | - CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[0], (LPARAM) 0 ); | |
1509 | - SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT1, | |
1510 | - CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[1], (LPARAM) 0 ); | |
1511 | - SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT2, | |
1512 | - CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[2], (LPARAM) 0 ); | |
1513 | - SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT3, | |
1514 | - CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[3], (LPARAM) 0 ); | |
1539 | + } | |
1540 | + if(st_temp->SynIDPort[0] > midi_in_max) | |
1541 | + st_temp->SynIDPort[0] = 0; // reset | |
1542 | + if(st_temp->SynIDPort[1] > midi_in_max) | |
1543 | + st_temp->SynIDPort[1] = 0; // reset | |
1544 | + if(st_temp->SynIDPort[2] > midi_in_max) | |
1545 | + st_temp->SynIDPort[2] = 0; // reset | |
1546 | + if(st_temp->SynIDPort[3] > midi_in_max) | |
1547 | + st_temp->SynIDPort[3] = 0; // reset | |
1548 | + SendDlgItemMessage(hwnd, IDC_COMBO_PORT_NUM, CB_SETCURSEL, (WPARAM) st_temp->SynPortNum, (LPARAM) 0 ); | |
1549 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT0, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[0], (LPARAM) 0 ); | |
1550 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT1, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[1], (LPARAM) 0 ); | |
1551 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT2, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[2], (LPARAM) 0 ); | |
1552 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT3, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[3], (LPARAM) 0 ); | |
1515 | 1553 | #endif |
1516 | 1554 | |
1517 | 1555 | #if defined(WINDRV_SETUP) |
@@ -1560,6 +1598,44 @@ PrefSyn1DialogProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
1560 | 1598 | break; |
1561 | 1599 | case WM_COMMAND: |
1562 | 1600 | switch (LOWORD(wParam)) { |
1601 | + | |
1602 | +#if defined(TWSYNG32) && !defined(TWSYNSRV) && defined(USE_TWSYN_BRIDGE) | |
1603 | + case IDC_CHECK_USE_TWSYN_BRIDGE: | |
1604 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT0, CB_RESETCONTENT, 0,0); | |
1605 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT1, CB_RESETCONTENT, 0,0); | |
1606 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT2, CB_RESETCONTENT, 0,0); | |
1607 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT3, CB_RESETCONTENT, 0,0); | |
1608 | + | |
1609 | + DLG_CHECKBUTTON_TO_FLAG(hwnd, IDC_CHECK_USE_TWSYN_BRIDGE, st_temp->opt_use_twsyn_bridge); | |
1610 | + tmp = SendDlgItemMessage ( hwnd, IDC_COMBO_PORT_NUM, CB_GETCURSEL, 0, 0 ); | |
1611 | + if ( tmp != CB_ERR ) st_temp->SynPortNum = tmp; | |
1612 | + GetMidiINDrivers(); | |
1613 | + | |
1614 | + if ( MidiINDrivers != NULL ) { | |
1615 | + for ( i = 0; MidiINDrivers[i] != NULL; i ++ ) { | |
1616 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT0, | |
1617 | + CB_INSERTSTRING, (WPARAM) -1, (LPARAM) MidiINDrivers[i] ); | |
1618 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT1, | |
1619 | + CB_INSERTSTRING, (WPARAM) -1, (LPARAM) MidiINDrivers[i] ); | |
1620 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT2, | |
1621 | + CB_INSERTSTRING, (WPARAM) -1, (LPARAM) MidiINDrivers[i] ); | |
1622 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT3, | |
1623 | + CB_INSERTSTRING, (WPARAM) -1, (LPARAM) MidiINDrivers[i] ); | |
1624 | + safe_free ( MidiINDrivers[i] ); | |
1625 | + } | |
1626 | + safe_free ( MidiINDrivers ); | |
1627 | + MidiINDrivers = NULL; | |
1628 | + } | |
1629 | + st_temp->SynIDPort[0] = 0; // reset | |
1630 | + st_temp->SynIDPort[1] = 0; // reset | |
1631 | + st_temp->SynIDPort[2] = 0; // reset | |
1632 | + st_temp->SynIDPort[3] = 0; // reset | |
1633 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT0, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[0], (LPARAM) 0 ); | |
1634 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT1, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[1], (LPARAM) 0 ); | |
1635 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT2, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[2], (LPARAM) 0 ); | |
1636 | + SendDlgItemMessage(hwnd, IDC_COMBO_IDPORT3, CB_SETCURSEL, (WPARAM) st_temp->SynIDPort[3], (LPARAM) 0 ); | |
1637 | + break; | |
1638 | +#endif | |
1563 | 1639 | case IDC_BUTTON_CONFIG_FILE: |
1564 | 1640 | { |
1565 | 1641 | TCHAR filename[FILEPATH_MAX]; |
@@ -1613,7 +1689,10 @@ PrefSyn1DialogProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
1613 | 1689 | sp_temp->PlayerLanguage = LANGUAGE_JAPANESE; |
1614 | 1690 | } |
1615 | 1691 | |
1616 | -#if !defined(WINDRV_SETUP) | |
1692 | +#if !defined(WINDRV_SETUP) | |
1693 | +#if defined(TWSYNG32) && !defined(TWSYNSRV) && defined(USE_TWSYN_BRIDGE) | |
1694 | + DLG_CHECKBUTTON_TO_FLAG(hwnd, IDC_CHECK_USE_TWSYN_BRIDGE, st_temp->opt_use_twsyn_bridge); | |
1695 | +#endif | |
1617 | 1696 | DLG_CHECKBUTTON_TO_FLAG(hwnd, IDC_CHECK_SYN_AUTOSTART, st_temp->syn_AutoStart); |
1618 | 1697 | tmp = SendDlgItemMessage ( hwnd, IDC_COMBO_PORT_NUM, CB_GETCURSEL, 0, 0 ); |
1619 | 1698 | if ( tmp != CB_ERR ) st_temp->SynPortNum = tmp; |
@@ -18,6 +18,7 @@ | ||
18 | 18 | #define IDD_DIALOG_PREF_EN 114 |
19 | 19 | #define IDD_DIALOG_PLAYLIST_EN 115 |
20 | 20 | #define IDD_DIALOG_PLAYLIST 116 |
21 | +#define IDD_DIALOG_TWSYN_BRIDGE 117 | |
21 | 22 | |
22 | 23 | #define IDD_PREF_PLAYER_EN 121 |
23 | 24 | #define IDD_PREF_TIMIDITY1_EN 122 |
@@ -197,13 +198,14 @@ | ||
197 | 198 | #define IDC_COMBO_IDPORT1 3952 |
198 | 199 | #define IDC_COMBO_IDPORT2 3953 |
199 | 200 | #define IDC_COMBO_IDPORT3 3954 |
201 | +#define IDC_CHECK_USE_TWSYN_BRIDGE 3955 | |
200 | 202 | // syn |
201 | -#define IDC_CHECK_SYN_AUTOSTART 3955 | |
202 | -#define IDC_EDIT_SYN_SH_TIME 3956 | |
203 | -#define IDC_EDIT_RTSYN_LATENCY 3957 | |
204 | -#define IDC_CHECK_RTSYN_SKIP_AQ 3958 | |
203 | +#define IDC_CHECK_SYN_AUTOSTART 3965 | |
204 | +#define IDC_EDIT_SYN_SH_TIME 3966 | |
205 | +#define IDC_EDIT_RTSYN_LATENCY 3967 | |
206 | +#define IDC_CHECK_RTSYN_SKIP_AQ 3968 | |
205 | 207 | // priority |
206 | -#define IDC_COMBO_SYN_THREAD_PRIORITY 3970 | |
208 | +#define IDC_COMBO_SYN_THREAD_PRIORITY 3980 | |
207 | 209 | |
208 | 210 | //// effect |
209 | 211 | // midi |
@@ -187,7 +187,15 @@ FONT 8, "Tahoma" | ||
187 | 187 | EDITTEXT IDC_EDIT, 0, 0, 240, 160, WS_HSCROLL | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY | ES_WANTRETURN |
188 | 188 | } |
189 | 189 | |
190 | - | |
190 | +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | |
191 | +IDD_DIALOG_TWSYN_BRIDGE DIALOGEX 0, 0, 115, 25 | |
192 | +STYLE DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU | |
193 | +CAPTION "TWSYN Bridge (host)" | |
194 | +FONT 8, "Tahoma" | |
195 | +{ | |
196 | + DEFPUSHBUTTON "OK", IDOK, 5, 5, 50, 15 | |
197 | + PUSHBUTTON "Cancel", IDCANCEL, 60, 5, 50, 15 | |
198 | +} | |
191 | 199 | |
192 | 200 | LANGUAGE LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN |
193 | 201 | IDD_DIALOG_DOC DIALOGEX 0, 0, 300, 251 |
@@ -769,7 +777,7 @@ FONT 9, "MS UI Gothic", 0, 0, 1 | ||
769 | 777 | GROUPBOX "Flags", IDC_STATIC, 5, 85, 50, 45, WS_GROUP |
770 | 778 | AUTORADIOBUTTON "Event", IDC_RADIOBUTTON_WASAPI_EVENT, 10, 100, 33, 8, WS_GROUP | WS_TABSTOP |
771 | 779 | AUTORADIOBUTTON "Polling", IDC_RADIOBUTTON_WASAPI_POLLING, 10, 115, 40, 8, WS_TABSTOP |
772 | - LTEXT "-", IDC_STATIC, 133, 115, 4, 8, SS_LEFT | |
780 | + LTEXT "-", IDC_STATIC, 133, 115, 8, 8, SS_LEFT | |
773 | 781 | } |
774 | 782 | |
775 | 783 |
@@ -3092,6 +3100,7 @@ FONT 9, "MS UI Gothic", 0, 0, 1 | ||
3092 | 3100 | GROUPBOX "コンソール", IDC_STATIC, 235, 110, 110, 35, WS_GROUP |
3093 | 3101 | COMBOBOX IDC_COMBO_CTL_VEBOSITY, 268, 123, 70, 146, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT |
3094 | 3102 | AUTOCHECKBOX "オーディオキューをスキップ", IDC_CHECK_RTSYN_SKIP_AQ, 10, 190, 83, 8 |
3103 | + AUTOCHECKBOX "Use TWSYN Bridge", IDC_CHECK_USE_TWSYN_BRIDGE, 130, 40, 80, 8 | |
3095 | 3104 | } |
3096 | 3105 | |
3097 | 3106 |
@@ -3140,6 +3149,7 @@ FONT 8, "Tahoma", 400, 0, 0 | ||
3140 | 3149 | LTEXT "Level", IDC_STATIC, 240, 125, 18, 8, SS_LEFT |
3141 | 3150 | COMBOBOX IDC_COMBO_CTL_VEBOSITY, 270, 123, 70, 146, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT |
3142 | 3151 | AUTOCHECKBOX "Skip Audio Queue", IDC_CHECK_RTSYN_SKIP_AQ, 10, 190, 72, 8 |
3152 | + AUTOCHECKBOX "Use TWSYNG Bridge", IDC_CHECK_USE_TWSYN_BRIDGE, 130, 40, 80, 8 | |
3143 | 3153 | } |
3144 | 3154 | |
3145 | 3155 |
@@ -96,6 +96,11 @@ WINAPI void InitCommonControls(void); | ||
96 | 96 | |
97 | 97 | #ifdef IA_W32G_SYN |
98 | 98 | |
99 | +#ifdef USE_TWSYN_BRIDGE | |
100 | +#include "twsyn_bridge_common.h" | |
101 | +#include "twsyn_bridge_host.h" | |
102 | +#endif | |
103 | + | |
99 | 104 | typedef struct w32g_syn_t_ { |
100 | 105 | UINT nid_uID; |
101 | 106 | #ifndef TWSYNSRV |
@@ -169,7 +174,7 @@ char *w32g_output_dir = NULL; | ||
169 | 174 | int playlist_max = 1; |
170 | 175 | int playlist_max_ini = 1; |
171 | 176 | int ConsoleClearFlag = 0; |
172 | - | |
177 | +int opt_use_twsyn_bridge = 0; | |
173 | 178 | extern void CmdLineToArgv(LPSTR lpCmdLine, int *argc, CHAR ***argv); |
174 | 179 | |
175 | 180 | static int start_syn_thread(void); |
@@ -471,7 +476,7 @@ static int w32g_syn_main(void) | ||
471 | 476 | while (w32g_syn.quit_state < 2) { |
472 | 477 | Sleep(300); |
473 | 478 | } |
474 | - | |
479 | + | |
475 | 480 | return 0; |
476 | 481 | } |
477 | 482 |
@@ -664,6 +669,9 @@ SynWinProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
664 | 669 | PostQuitMessage(0); |
665 | 670 | return -1; |
666 | 671 | } |
672 | +#ifdef USE_TWSYN_BRIDGE | |
673 | + init_bridge(); | |
674 | +#endif | |
667 | 675 | #ifdef VST_LOADER_ENABLE |
668 | 676 | if (!hVSTHost) { |
669 | 677 | #ifdef _WIN64 |
@@ -699,6 +707,9 @@ SynWinProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | ||
699 | 707 | hVSTHost = NULL; |
700 | 708 | } |
701 | 709 | #endif |
710 | +#ifdef USE_TWSYN_BRIDGE | |
711 | + close_bridge(); | |
712 | +#endif | |
702 | 713 | DeleteTasktrayIcon(hwnd); |
703 | 714 | PostQuitMessage(0); |
704 | 715 | break; |
@@ -568,6 +568,7 @@ extern int w32g_syn_port_num; | ||
568 | 568 | #elif defined(IA_W32G_SYN) |
569 | 569 | extern int w32g_syn_id_port[]; |
570 | 570 | extern int syn_AutoStart; |
571 | +extern int opt_use_twsyn_bridge; | |
571 | 572 | //extern DWORD processPriority; |
572 | 573 | extern DWORD syn_ThreadPriority; |
573 | 574 | extern int w32g_syn_port_num; |
@@ -795,6 +796,7 @@ ApplySettingTiMidity(SETTING_TIMIDITY *st) | ||
795 | 796 | rtsyn_set_latency((double)opt_rtsyn_latency * 0.001); |
796 | 797 | opt_rtsyn_skip_aq = st->opt_rtsyn_skip_aq; |
797 | 798 | rtsyn_set_skip_aq(opt_rtsyn_skip_aq); |
799 | + opt_use_twsyn_bridge = st->opt_use_twsyn_bridge; | |
798 | 800 | #endif |
799 | 801 | ///r |
800 | 802 | processPriority = st->processPriority; |
@@ -1050,6 +1052,7 @@ SaveSettingTiMidity(SETTING_TIMIDITY *st) | ||
1050 | 1052 | st->SynShTime = stream_max_compute; |
1051 | 1053 | st->opt_rtsyn_latency = opt_rtsyn_latency; |
1052 | 1054 | st->opt_rtsyn_skip_aq = opt_rtsyn_skip_aq; |
1055 | + st->opt_use_twsyn_bridge = opt_use_twsyn_bridge; | |
1053 | 1056 | #endif |
1054 | 1057 | ///r |
1055 | 1058 | st->processPriority = processPriority; |
@@ -250,6 +250,7 @@ typedef struct SETTING_TIMIDITY_ { | ||
250 | 250 | int SynShTime; |
251 | 251 | uint32 opt_rtsyn_latency; // --rtsyn-latency |
252 | 252 | int opt_rtsyn_skip_aq; // --rtsyn-skip-aq |
253 | + int opt_use_twsyn_bridge; | |
253 | 254 | #endif |
254 | 255 | int processPriority; // --process-priority |
255 | 256 | int compute_thread_num; |
@@ -70,13 +70,14 @@ | ||
70 | 70 | <PropertyGroup> |
71 | 71 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
72 | 72 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
73 | - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</OutDir> | |
73 | + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> | |
74 | 74 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
75 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</IntDir> | |
75 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
76 | 76 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
77 | 77 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
78 | 78 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
79 | 79 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir> |
80 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
80 | 81 | </PropertyGroup> |
81 | 82 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
82 | 83 | <ClCompile> |
@@ -70,13 +70,14 @@ | ||
70 | 70 | <PropertyGroup> |
71 | 71 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
72 | 72 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
73 | - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</OutDir> | |
73 | + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> | |
74 | 74 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
75 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</IntDir> | |
75 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
76 | 76 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
77 | 77 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
78 | 78 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
79 | 79 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir> |
80 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
80 | 81 | </PropertyGroup> |
81 | 82 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
82 | 83 | <ClCompile> |
@@ -93,7 +93,7 @@ | ||
93 | 93 | /> |
94 | 94 | <Tool |
95 | 95 | Name="VCPostBuildEventTool" |
96 | - CommandLine="cp ../Debug\pdcurses.lib ../Debug\panel.lib" | |
96 | + CommandLine="" | |
97 | 97 | /> |
98 | 98 | </Configuration> |
99 | 99 | <Configuration |
@@ -175,7 +175,7 @@ | ||
175 | 175 | /> |
176 | 176 | <Tool |
177 | 177 | Name="VCPostBuildEventTool" |
178 | - CommandLine="cp ../Release\pdcurses.lib ../Release\panel.lib" | |
178 | + CommandLine="" | |
179 | 179 | /> |
180 | 180 | </Configuration> |
181 | 181 | </Configurations> |
@@ -47,6 +47,7 @@ | ||
47 | 47 | <ConfigurationType>StaticLibrary</ConfigurationType> |
48 | 48 | <UseOfMfc>false</UseOfMfc> |
49 | 49 | <CharacterSet>MultiByte</CharacterSet> |
50 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
50 | 51 | </PropertyGroup> |
51 | 52 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
52 | 53 | <ImportGroup Label="ExtensionSettings"> |
@@ -72,15 +73,17 @@ | ||
72 | 73 | <PropertyGroup> |
73 | 74 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
74 | 75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
75 | - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</OutDir> | |
76 | + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> | |
76 | 77 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
77 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</IntDir> | |
78 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
78 | 79 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
79 | 80 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
80 | 81 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
81 | 82 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir> |
82 | 83 | <PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</PostBuildEventUseInBuild> |
83 | 84 | <PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</PostBuildEventUseInBuild> |
85 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
86 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
84 | 87 | </PropertyGroup> |
85 | 88 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
86 | 89 | <ClCompile> |
@@ -47,6 +47,7 @@ | ||
47 | 47 | <ConfigurationType>StaticLibrary</ConfigurationType> |
48 | 48 | <UseOfMfc>false</UseOfMfc> |
49 | 49 | <CharacterSet>MultiByte</CharacterSet> |
50 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
50 | 51 | </PropertyGroup> |
51 | 52 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
52 | 53 | <ImportGroup Label="ExtensionSettings"> |
@@ -71,13 +72,15 @@ | ||
71 | 72 | <PropertyGroup> |
72 | 73 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
73 | 74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
74 | - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</OutDir> | |
75 | + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> | |
75 | 76 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
76 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</IntDir> | |
77 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
77 | 78 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
78 | 79 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
79 | 80 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
80 | 81 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir> |
82 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
83 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
81 | 84 | </PropertyGroup> |
82 | 85 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
83 | 86 | <ClCompile> |
@@ -39,6 +39,7 @@ | ||
39 | 39 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
40 | 40 | <ConfigurationType>StaticLibrary</ConfigurationType> |
41 | 41 | <CharacterSet>MultiByte</CharacterSet> |
42 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
42 | 43 | </PropertyGroup> |
43 | 44 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
44 | 45 | <ConfigurationType>StaticLibrary</ConfigurationType> |
@@ -69,11 +70,12 @@ | ||
69 | 70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
70 | 71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
71 | 72 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
72 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Debug\</IntDir> | |
73 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
73 | 74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
74 | 75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
75 | 76 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
76 | 77 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir> |
78 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
77 | 79 | </PropertyGroup> |
78 | 80 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
79 | 81 | <ClCompile> |
@@ -152,7 +154,7 @@ | ||
152 | 154 | <DisableSpecificWarnings>4244;4305;4311;4100;4127;%(DisableSpecificWarnings)</DisableSpecificWarnings> |
153 | 155 | <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> |
154 | 156 | <FloatingPointModel>Fast</FloatingPointModel> |
155 | - <MultiProcessorCompilation>false</MultiProcessorCompilation> | |
157 | + <MultiProcessorCompilation>true</MultiProcessorCompilation> | |
156 | 158 | </ClCompile> |
157 | 159 | <Lib> |
158 | 160 | <OutputFile>../Release\libspeex.lib</OutputFile> |
@@ -47,6 +47,7 @@ | ||
47 | 47 | <ConfigurationType>Application</ConfigurationType> |
48 | 48 | <UseOfMfc>false</UseOfMfc> |
49 | 49 | <CharacterSet>MultiByte</CharacterSet> |
50 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
50 | 51 | </PropertyGroup> |
51 | 52 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
52 | 53 | <ImportGroup Label="ExtensionSettings"> |
@@ -86,7 +87,8 @@ | ||
86 | 87 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">timidity</TargetName> |
87 | 88 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">timidity_x64</TargetName> |
88 | 89 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;</LibraryPath> |
89 | - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)_x64</TargetName> | |
90 | + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">timidity_x64</TargetName> | |
91 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
90 | 92 | </PropertyGroup> |
91 | 93 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
92 | 94 | <Midl> |
@@ -184,9 +186,8 @@ | ||
184 | 186 | <AdditionalIncludeDirectories>..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
185 | 187 | </ResourceCompile> |
186 | 188 | <Link> |
187 | - <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> | |
188 | 189 | <AdditionalDependencies>comctl32.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
189 | - <OutputFile>./Debug/tim_cui.exe</OutputFile> | |
190 | + <OutputFile>$(TargetPath)</OutputFile> | |
190 | 191 | <SuppressStartupBanner>true</SuppressStartupBanner> |
191 | 192 | <IgnoreSpecificDefaultLibraries>libcd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> |
192 | 193 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -33,6 +33,7 @@ | ||
33 | 33 | <ConfigurationType>Application</ConfigurationType> |
34 | 34 | <UseDebugLibraries>true</UseDebugLibraries> |
35 | 35 | <CharacterSet>MultiByte</CharacterSet> |
36 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
36 | 37 | </PropertyGroup> |
37 | 38 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
38 | 39 | <ConfigurationType>Application</ConfigurationType> |
@@ -86,6 +87,7 @@ | ||
86 | 87 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
87 | 88 | <LinkIncremental>true</LinkIncremental> |
88 | 89 | <TargetName>$(ProjectName)_x64</TargetName> |
90 | + <LibraryPath>$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
89 | 91 | </PropertyGroup> |
90 | 92 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
91 | 93 | <ClCompile> |
@@ -146,7 +148,7 @@ | ||
146 | 148 | </ClCompile> |
147 | 149 | <Link> |
148 | 150 | <GenerateDebugInformation>true</GenerateDebugInformation> |
149 | - <OutputFile>../Debug/timdrvsetup.exe</OutputFile> | |
151 | + <OutputFile>$(TargetPath)</OutputFile> | |
150 | 152 | <RandomizedBaseAddress>false</RandomizedBaseAddress> |
151 | 153 | <DataExecutionPrevention> |
152 | 154 | </DataExecutionPrevention> |
@@ -46,6 +46,7 @@ | ||
46 | 46 | <ConfigurationType>StaticLibrary</ConfigurationType> |
47 | 47 | <UseOfMfc>false</UseOfMfc> |
48 | 48 | <CharacterSet>MultiByte</CharacterSet> |
49 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
49 | 50 | </PropertyGroup> |
50 | 51 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
51 | 52 | <ImportGroup Label="ExtensionSettings"> |
@@ -70,9 +71,9 @@ | ||
70 | 71 | <PropertyGroup> |
71 | 72 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
72 | 73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
73 | - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</OutDir> | |
74 | + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> | |
74 | 75 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
75 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</IntDir> | |
76 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
76 | 77 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
77 | 78 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
78 | 79 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
@@ -84,7 +85,7 @@ | ||
84 | 85 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(DXSDK_DIR)Lib\x86;C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86;</LibraryPath> |
85 | 86 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(VCInstallDir)atlmfc\lib\amd64;$(VCInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;$(FrameworkSDKDir)\lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;</LibraryPath> |
86 | 87 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(DXSDK_DIR)\Lib\x86;</LibraryPath> |
87 | - <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(DXSDK_DIR)\ILib\x86;</LibraryPath> | |
88 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib\x64;$(FrameworkSDKDir)\lib;$(DXSDK_DIR)\ILib\x86;</LibraryPath> | |
88 | 89 | </PropertyGroup> |
89 | 90 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
90 | 91 | <ClCompile> |
@@ -84,6 +84,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timdrvsetup", "timdrvsetup\ | ||
84 | 84 | {8DC8ADE3-145A-4C63-80DD-0C93B6587B80} = {8DC8ADE3-145A-4C63-80DD-0C93B6587B80} |
85 | 85 | EndProjectSection |
86 | 86 | EndProject |
87 | +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "twsyn_bridge", "twsyn_bridge\twsyn_bridge.vcproj", "{4D6B6788-F7B8-4FFB-B15F-DC5C665ABB5C}" | |
88 | +EndProject | |
87 | 89 | Global |
88 | 90 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
89 | 91 | Debug|Win32 = Debug|Win32 |
@@ -166,6 +168,10 @@ Global | ||
166 | 168 | {DB5B22F9-4721-460B-9770-2855CA33E232}.Debug|Win32.Build.0 = Debug|Win32 |
167 | 169 | {DB5B22F9-4721-460B-9770-2855CA33E232}.Release|Win32.ActiveCfg = Release|Win32 |
168 | 170 | {DB5B22F9-4721-460B-9770-2855CA33E232}.Release|Win32.Build.0 = Release|Win32 |
171 | + {4D6B6788-F7B8-4FFB-B15F-DC5C665ABB5C}.Debug|Win32.ActiveCfg = Debug|Win32 | |
172 | + {4D6B6788-F7B8-4FFB-B15F-DC5C665ABB5C}.Debug|Win32.Build.0 = Debug|Win32 | |
173 | + {4D6B6788-F7B8-4FFB-B15F-DC5C665ABB5C}.Release|Win32.ActiveCfg = Release|Win32 | |
174 | + {4D6B6788-F7B8-4FFB-B15F-DC5C665ABB5C}.Release|Win32.Build.0 = Release|Win32 | |
169 | 175 | EndGlobalSection |
170 | 176 | GlobalSection(SolutionProperties) = preSolution |
171 | 177 | HideSolutionNode = FALSE |
@@ -48,6 +48,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tim_cui", "tim_cui\tim_cui. | ||
48 | 48 | EndProject |
49 | 49 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timdrvsetup", "timdrvsetup\timdrvsetup.vcxproj", "{1A91001F-E3EF-4FC1-925B-C00013BB6C98}" |
50 | 50 | EndProject |
51 | +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "twsyn_bridge", "twsyn_bridge\twsyn_bridge.vcxproj", "{D6D9295A-4A29-4753-88E9-A9D8B589A3D0}" | |
52 | +EndProject | |
51 | 53 | Global |
52 | 54 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
53 | 55 | Debug|Win32 = Debug|Win32 |
@@ -224,6 +226,14 @@ Global | ||
224 | 226 | {1A91001F-E3EF-4FC1-925B-C00013BB6C98}.Release|Win32.Build.0 = Release|Win32 |
225 | 227 | {1A91001F-E3EF-4FC1-925B-C00013BB6C98}.Release|x64.ActiveCfg = Release|x64 |
226 | 228 | {1A91001F-E3EF-4FC1-925B-C00013BB6C98}.Release|x64.Build.0 = Release|x64 |
229 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Debug|Win32.ActiveCfg = Debug|Win32 | |
230 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Debug|Win32.Build.0 = Debug|Win32 | |
231 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Debug|x64.ActiveCfg = Debug|x64 | |
232 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Debug|x64.Build.0 = Debug|x64 | |
233 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Release|Win32.ActiveCfg = Release|Win32 | |
234 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Release|Win32.Build.0 = Release|Win32 | |
235 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Release|x64.ActiveCfg = Release|x64 | |
236 | + {D6D9295A-4A29-4753-88E9-A9D8B589A3D0}.Release|x64.Build.0 = Release|x64 | |
227 | 237 | EndGlobalSection |
228 | 238 | GlobalSection(SolutionProperties) = preSolution |
229 | 239 | HideSolutionNode = FALSE |
@@ -90,8 +90,8 @@ | ||
90 | 90 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(VCInstallDir)atlmfc\lib\amd64;$(VCInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;$(FrameworkSDKDir)\lib\x64;$(WindowsSdkDir)\lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;</LibraryPath> |
91 | 91 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(DXSDK_DIR)\ILib\x86;</LibraryPath> |
92 | 92 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(VCInstallDir)atlmfc\lib\amd64;$(VCInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;$(FrameworkSDKDir)\lib\x64;$(WindowsSdkDir)\lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;</LibraryPath> |
93 | - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">timw32g_c212</TargetName> | |
94 | - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">timw32g_x64_c212</TargetName> | |
93 | + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">timw32g_c213</TargetName> | |
94 | + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">timw32g_x64_c213</TargetName> | |
95 | 95 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)_x64</TargetName> |
96 | 96 | </PropertyGroup> |
97 | 97 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
@@ -0,0 +1,198 @@ | ||
1 | +<?xml version="1.0" encoding="shift_jis"?> | |
2 | +<VisualStudioProject | |
3 | + ProjectType="Visual C++" | |
4 | + Version="9.00" | |
5 | + Name="twsyng_bridge" | |
6 | + ProjectGUID="{4D6B6788-F7B8-4FFB-B15F-DC5C665ABB5C}" | |
7 | + RootNamespace="twsyng_bridge" | |
8 | + TargetFrameworkVersion="196613" | |
9 | + > | |
10 | + <Platforms> | |
11 | + <Platform | |
12 | + Name="Win32" | |
13 | + /> | |
14 | + </Platforms> | |
15 | + <ToolFiles> | |
16 | + </ToolFiles> | |
17 | + <Configurations> | |
18 | + <Configuration | |
19 | + Name="Debug|Win32" | |
20 | + OutputDirectory="$(SolutionDir)$(ConfigurationName)" | |
21 | + IntermediateDirectory="$(ConfigurationName)" | |
22 | + ConfigurationType="1" | |
23 | + CharacterSet="2" | |
24 | + > | |
25 | + <Tool | |
26 | + Name="VCPreBuildEventTool" | |
27 | + /> | |
28 | + <Tool | |
29 | + Name="VCCustomBuildTool" | |
30 | + /> | |
31 | + <Tool | |
32 | + Name="VCXMLDataGeneratorTool" | |
33 | + /> | |
34 | + <Tool | |
35 | + Name="VCWebServiceProxyGeneratorTool" | |
36 | + /> | |
37 | + <Tool | |
38 | + Name="VCMIDLTool" | |
39 | + /> | |
40 | + <Tool | |
41 | + Name="VCCLCompilerTool" | |
42 | + Optimization="0" | |
43 | + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;" | |
44 | + MinimalRebuild="true" | |
45 | + BasicRuntimeChecks="3" | |
46 | + RuntimeLibrary="3" | |
47 | + WarningLevel="3" | |
48 | + DebugInformationFormat="4" | |
49 | + /> | |
50 | + <Tool | |
51 | + Name="VCManagedResourceCompilerTool" | |
52 | + /> | |
53 | + <Tool | |
54 | + Name="VCResourceCompilerTool" | |
55 | + /> | |
56 | + <Tool | |
57 | + Name="VCPreLinkEventTool" | |
58 | + /> | |
59 | + <Tool | |
60 | + Name="VCLinkerTool" | |
61 | + AdditionalDependencies="winmm.lib" | |
62 | + OutputFile="$(OutDir)\$(ProjectName)_x86.exe" | |
63 | + GenerateDebugInformation="true" | |
64 | + TargetMachine="1" | |
65 | + /> | |
66 | + <Tool | |
67 | + Name="VCALinkTool" | |
68 | + /> | |
69 | + <Tool | |
70 | + Name="VCManifestTool" | |
71 | + /> | |
72 | + <Tool | |
73 | + Name="VCXDCMakeTool" | |
74 | + /> | |
75 | + <Tool | |
76 | + Name="VCBscMakeTool" | |
77 | + /> | |
78 | + <Tool | |
79 | + Name="VCFxCopTool" | |
80 | + /> | |
81 | + <Tool | |
82 | + Name="VCAppVerifierTool" | |
83 | + /> | |
84 | + <Tool | |
85 | + Name="VCPostBuildEventTool" | |
86 | + /> | |
87 | + </Configuration> | |
88 | + <Configuration | |
89 | + Name="Release|Win32" | |
90 | + OutputDirectory="$(SolutionDir)$(ConfigurationName)" | |
91 | + IntermediateDirectory="$(ConfigurationName)" | |
92 | + ConfigurationType="1" | |
93 | + CharacterSet="2" | |
94 | + WholeProgramOptimization="1" | |
95 | + > | |
96 | + <Tool | |
97 | + Name="VCPreBuildEventTool" | |
98 | + /> | |
99 | + <Tool | |
100 | + Name="VCCustomBuildTool" | |
101 | + /> | |
102 | + <Tool | |
103 | + Name="VCXMLDataGeneratorTool" | |
104 | + /> | |
105 | + <Tool | |
106 | + Name="VCWebServiceProxyGeneratorTool" | |
107 | + /> | |
108 | + <Tool | |
109 | + Name="VCMIDLTool" | |
110 | + /> | |
111 | + <Tool | |
112 | + Name="VCCLCompilerTool" | |
113 | + Optimization="3" | |
114 | + InlineFunctionExpansion="2" | |
115 | + EnableIntrinsicFunctions="true" | |
116 | + FavorSizeOrSpeed="1" | |
117 | + OmitFramePointers="true" | |
118 | + EnableFiberSafeOptimizations="true" | |
119 | + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOW" | |
120 | + RuntimeLibrary="2" | |
121 | + StructMemberAlignment="5" | |
122 | + EnableFunctionLevelLinking="true" | |
123 | + EnableEnhancedInstructionSet="2" | |
124 | + FloatingPointModel="2" | |
125 | + WarningLevel="3" | |
126 | + DebugInformationFormat="3" | |
127 | + /> | |
128 | + <Tool | |
129 | + Name="VCManagedResourceCompilerTool" | |
130 | + /> | |
131 | + <Tool | |
132 | + Name="VCResourceCompilerTool" | |
133 | + /> | |
134 | + <Tool | |
135 | + Name="VCPreLinkEventTool" | |
136 | + /> | |
137 | + <Tool | |
138 | + Name="VCLinkerTool" | |
139 | + AdditionalDependencies="winmm.lib" | |
140 | + OutputFile="$(OutDir)\$(ProjectName)_x86.exe" | |
141 | + LinkIncremental="2" | |
142 | + GenerateDebugInformation="false" | |
143 | + SubSystem="2" | |
144 | + LargeAddressAware="2" | |
145 | + OptimizeReferences="2" | |
146 | + EnableCOMDATFolding="2" | |
147 | + TargetMachine="1" | |
148 | + /> | |
149 | + <Tool | |
150 | + Name="VCALinkTool" | |
151 | + /> | |
152 | + <Tool | |
153 | + Name="VCManifestTool" | |
154 | + /> | |
155 | + <Tool | |
156 | + Name="VCXDCMakeTool" | |
157 | + /> | |
158 | + <Tool | |
159 | + Name="VCBscMakeTool" | |
160 | + /> | |
161 | + <Tool | |
162 | + Name="VCFxCopTool" | |
163 | + /> | |
164 | + <Tool | |
165 | + Name="VCAppVerifierTool" | |
166 | + /> | |
167 | + <Tool | |
168 | + Name="VCPostBuildEventTool" | |
169 | + /> | |
170 | + </Configuration> | |
171 | + </Configurations> | |
172 | + <References> | |
173 | + </References> | |
174 | + <Files> | |
175 | + <File | |
176 | + RelativePath=".\twsyng_bridge_common.h" | |
177 | + > | |
178 | + </File> | |
179 | + <File | |
180 | + RelativePath=".\twsyng_bridge_exe.c" | |
181 | + > | |
182 | + </File> | |
183 | + <File | |
184 | + RelativePath=".\twsyng_bridge_exe.h" | |
185 | + > | |
186 | + </File> | |
187 | + <File | |
188 | + RelativePath=".\twsyng_bridge_exe.rc" | |
189 | + > | |
190 | + </File> | |
191 | + <File | |
192 | + RelativePath=".\twsyng_bridge_exe_res.h" | |
193 | + > | |
194 | + </File> | |
195 | + </Files> | |
196 | + <Globals> | |
197 | + </Globals> | |
198 | +</VisualStudioProject> |
@@ -0,0 +1,188 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | + <ItemGroup Label="ProjectConfigurations"> | |
4 | + <ProjectConfiguration Include="Debug|Win32"> | |
5 | + <Configuration>Debug</Configuration> | |
6 | + <Platform>Win32</Platform> | |
7 | + </ProjectConfiguration> | |
8 | + <ProjectConfiguration Include="Debug|x64"> | |
9 | + <Configuration>Debug</Configuration> | |
10 | + <Platform>x64</Platform> | |
11 | + </ProjectConfiguration> | |
12 | + <ProjectConfiguration Include="Release|Win32"> | |
13 | + <Configuration>Release</Configuration> | |
14 | + <Platform>Win32</Platform> | |
15 | + </ProjectConfiguration> | |
16 | + <ProjectConfiguration Include="Release|x64"> | |
17 | + <Configuration>Release</Configuration> | |
18 | + <Platform>x64</Platform> | |
19 | + </ProjectConfiguration> | |
20 | + </ItemGroup> | |
21 | + <PropertyGroup Label="Globals"> | |
22 | + <ProjectGuid>{D6D9295A-4A29-4753-88E9-A9D8B589A3D0}</ProjectGuid> | |
23 | + <Keyword>Win32Proj</Keyword> | |
24 | + <RootNamespace>twsyng_run</RootNamespace> | |
25 | + <ProjectName>twsyn_bridge</ProjectName> | |
26 | + </PropertyGroup> | |
27 | + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | |
28 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | |
29 | + <ConfigurationType>Application</ConfigurationType> | |
30 | + <UseDebugLibraries>true</UseDebugLibraries> | |
31 | + <CharacterSet>MultiByte</CharacterSet> | |
32 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
33 | + </PropertyGroup> | |
34 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | |
35 | + <ConfigurationType>Application</ConfigurationType> | |
36 | + <UseDebugLibraries>true</UseDebugLibraries> | |
37 | + <CharacterSet>MultiByte</CharacterSet> | |
38 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
39 | + </PropertyGroup> | |
40 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | |
41 | + <ConfigurationType>Application</ConfigurationType> | |
42 | + <UseDebugLibraries>false</UseDebugLibraries> | |
43 | + <WholeProgramOptimization>true</WholeProgramOptimization> | |
44 | + <CharacterSet>MultiByte</CharacterSet> | |
45 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
46 | + </PropertyGroup> | |
47 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | |
48 | + <ConfigurationType>Application</ConfigurationType> | |
49 | + <UseDebugLibraries>false</UseDebugLibraries> | |
50 | + <WholeProgramOptimization>true</WholeProgramOptimization> | |
51 | + <CharacterSet>MultiByte</CharacterSet> | |
52 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
53 | + </PropertyGroup> | |
54 | + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | |
55 | + <ImportGroup Label="ExtensionSettings"> | |
56 | + </ImportGroup> | |
57 | + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |
58 | + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
59 | + </ImportGroup> | |
60 | + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | |
61 | + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
62 | + </ImportGroup> | |
63 | + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |
64 | + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
65 | + </ImportGroup> | |
66 | + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | |
67 | + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
68 | + </ImportGroup> | |
69 | + <PropertyGroup Label="UserMacros" /> | |
70 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |
71 | + <LinkIncremental>true</LinkIncremental> | |
72 | + <TargetName>$(ProjectName)_x86</TargetName> | |
73 | + </PropertyGroup> | |
74 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | |
75 | + <LinkIncremental>true</LinkIncremental> | |
76 | + <TargetName>$(ProjectName)_x64</TargetName> | |
77 | + <OutDir>$(SolutionDir)$(Configuration)\</OutDir> | |
78 | + <IntDir>$(Platform)$(Configuration)\</IntDir> | |
79 | + <LibraryPath>$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
80 | + </PropertyGroup> | |
81 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |
82 | + <LinkIncremental>false</LinkIncremental> | |
83 | + <TargetName>$(ProjectName)_x86</TargetName> | |
84 | + </PropertyGroup> | |
85 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |
86 | + <LinkIncremental>false</LinkIncremental> | |
87 | + <TargetName>$(ProjectName)_x64</TargetName> | |
88 | + <OutDir>$(SolutionDir)$(Configuration)\</OutDir> | |
89 | + <LibraryPath>$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
90 | + </PropertyGroup> | |
91 | + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |
92 | + <ClCompile> | |
93 | + <PrecompiledHeader> | |
94 | + </PrecompiledHeader> | |
95 | + <WarningLevel>Level3</WarningLevel> | |
96 | + <Optimization>Disabled</Optimization> | |
97 | + <PreprocessorDefinitions>WIN32;USE_BRIDGE;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
98 | + <MultiProcessorCompilation>true</MultiProcessorCompilation> | |
99 | + </ClCompile> | |
100 | + <Link> | |
101 | + <SubSystem>Windows</SubSystem> | |
102 | + <GenerateDebugInformation>true</GenerateDebugInformation> | |
103 | + <OutputFile>$(TargetPath)</OutputFile> | |
104 | + <LargeAddressAware>true</LargeAddressAware> | |
105 | + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> | |
106 | + </Link> | |
107 | + </ItemDefinitionGroup> | |
108 | + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | |
109 | + <ClCompile> | |
110 | + <PrecompiledHeader> | |
111 | + </PrecompiledHeader> | |
112 | + <WarningLevel>Level3</WarningLevel> | |
113 | + <Optimization>Disabled</Optimization> | |
114 | + <PreprocessorDefinitions>_WIN64;WIN32;USE_BRIDGE;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
115 | + <MultiProcessorCompilation>true</MultiProcessorCompilation> | |
116 | + </ClCompile> | |
117 | + <Link> | |
118 | + <SubSystem>Windows</SubSystem> | |
119 | + <GenerateDebugInformation>true</GenerateDebugInformation> | |
120 | + <OutputFile>$(TargetPath)</OutputFile> | |
121 | + <LargeAddressAware>true</LargeAddressAware> | |
122 | + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> | |
123 | + </Link> | |
124 | + </ItemDefinitionGroup> | |
125 | + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |
126 | + <ClCompile> | |
127 | + <WarningLevel>Level3</WarningLevel> | |
128 | + <PrecompiledHeader> | |
129 | + </PrecompiledHeader> | |
130 | + <Optimization>Full</Optimization> | |
131 | + <FunctionLevelLinking>true</FunctionLevelLinking> | |
132 | + <IntrinsicFunctions>true</IntrinsicFunctions> | |
133 | + <PreprocessorDefinitions>WIN32;USE_BRIDGE;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
134 | + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> | |
135 | + <FloatingPointModel>Fast</FloatingPointModel> | |
136 | + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> | |
137 | + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | |
138 | + <MultiProcessorCompilation>true</MultiProcessorCompilation> | |
139 | + </ClCompile> | |
140 | + <Link> | |
141 | + <SubSystem>Windows</SubSystem> | |
142 | + <GenerateDebugInformation>false</GenerateDebugInformation> | |
143 | + <EnableCOMDATFolding>true</EnableCOMDATFolding> | |
144 | + <OptimizeReferences>true</OptimizeReferences> | |
145 | + <OutputFile>$(TargetPath)</OutputFile> | |
146 | + <LargeAddressAware>true</LargeAddressAware> | |
147 | + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> | |
148 | + </Link> | |
149 | + </ItemDefinitionGroup> | |
150 | + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |
151 | + <ClCompile> | |
152 | + <WarningLevel>Level3</WarningLevel> | |
153 | + <PrecompiledHeader> | |
154 | + </PrecompiledHeader> | |
155 | + <Optimization>Full</Optimization> | |
156 | + <FunctionLevelLinking>true</FunctionLevelLinking> | |
157 | + <IntrinsicFunctions>true</IntrinsicFunctions> | |
158 | + <PreprocessorDefinitions>_WIN64;WIN32;USE_BRIDGE;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
159 | + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> | |
160 | + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | |
161 | + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> | |
162 | + <FloatingPointModel>Fast</FloatingPointModel> | |
163 | + <MultiProcessorCompilation>true</MultiProcessorCompilation> | |
164 | + </ClCompile> | |
165 | + <Link> | |
166 | + <SubSystem>Windows</SubSystem> | |
167 | + <GenerateDebugInformation>true</GenerateDebugInformation> | |
168 | + <EnableCOMDATFolding>true</EnableCOMDATFolding> | |
169 | + <OptimizeReferences>true</OptimizeReferences> | |
170 | + <OutputFile>$(TargetPath)</OutputFile> | |
171 | + <LargeAddressAware>true</LargeAddressAware> | |
172 | + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> | |
173 | + </Link> | |
174 | + </ItemDefinitionGroup> | |
175 | + <ItemGroup> | |
176 | + <ClInclude Include="twsyn_bridge_common.h" /> | |
177 | + <ClInclude Include="twsyn_bridge_exe_res.h" /> | |
178 | + </ItemGroup> | |
179 | + <ItemGroup> | |
180 | + <ClCompile Include="twsyn_bridge_exe.c" /> | |
181 | + </ItemGroup> | |
182 | + <ItemGroup> | |
183 | + <ResourceCompile Include="twsyn_bridge_exe.rc" /> | |
184 | + </ItemGroup> | |
185 | + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | |
186 | + <ImportGroup Label="ExtensionTargets"> | |
187 | + </ImportGroup> | |
188 | +</Project> | |
\ No newline at end of file |
@@ -0,0 +1,51 @@ | ||
1 | + | |
2 | +#pragma once | |
3 | + | |
4 | + | |
5 | + | |
6 | + | |
7 | + | |
8 | +#define COMMON_FM_NAME "twsyn_bridge_file_mapping" | |
9 | +#define COMMON_MUTEX_NAME "twsyn_bridge_mutex" | |
10 | + | |
11 | +#define BRIDGE_MAX_PORT 4 // see rtsyn.h MAX_PORT | |
12 | +#define BRIDGE_MAX_EXBUF 32 | |
13 | +#define BRIDGE_TOTAL_EXBUF (BRIDGE_MAX_PORT * BRIDGE_MAX_EXBUF) | |
14 | +#define BRIDGE_BUFF_SIZE 512 | |
15 | + | |
16 | +typedef struct _fm_bridge_t { | |
17 | + // exit flag | |
18 | + long exit; | |
19 | + // host | |
20 | + long PrcsIdHost; // processID | |
21 | + long PrcsVerHost; // processVersion | |
22 | + unsigned long long hControlWndHost; // window handle | |
23 | + unsigned long uControlMessHost; // window message number | |
24 | + // bridge | |
25 | + long PrcsId; // processID | |
26 | + long PrcsVer; // processVersion | |
27 | + unsigned long long hControlWnd; // window handle | |
28 | + unsigned long uControlMess; // window message number | |
29 | + // midi in | |
30 | + unsigned long long hMidiWnd[BRIDGE_MAX_PORT]; // window handle | |
31 | + long midi_dev_num; | |
32 | + char midi_devs[33][256]; | |
33 | + long portnumber; | |
34 | + unsigned int portID[BRIDGE_MAX_PORT]; | |
35 | + long open_midi_dev; | |
36 | + unsigned long wMsg; | |
37 | + unsigned long long dwInstance; | |
38 | + unsigned long long dwParam1; | |
39 | + unsigned long long dwParam2; | |
40 | + unsigned long dwBytes[BRIDGE_TOTAL_EXBUF]; | |
41 | + char lpData[BRIDGE_TOTAL_EXBUF][BRIDGE_BUFF_SIZE]; | |
42 | +} fm_bridge_t; | |
43 | + | |
44 | +enum { | |
45 | + WMC_CLOSE_BRIDGE = 4096, // 0でもいいけど | |
46 | + WMC_GET_MIDI_DEVS, | |
47 | + WMC_OPEN_MIDI_DEVS, | |
48 | + WMC_CLOSE_MIDI_DEVS, | |
49 | + WMC_MIM_DATA, | |
50 | + WMC_MIM_LONGDATA, | |
51 | +}; |
@@ -0,0 +1,371 @@ | ||
1 | + | |
2 | + | |
3 | + | |
4 | +#include <stdlib.h> | |
5 | +#include <io.h> | |
6 | +#include <windows.h> | |
7 | +#include <process.h> | |
8 | +#include <windows.h> | |
9 | +#include <windowsx.h> | |
10 | +#include <winuser.h> | |
11 | +#include <windef.h> | |
12 | +#include <stdio.h> | |
13 | +#include <string.h> | |
14 | +#include <fcntl.h> | |
15 | +#include <tchar.h> | |
16 | +#include <mmsystem.h> | |
17 | + | |
18 | +#include "twsyn_bridge_common.h" | |
19 | +#include "twsyn_bridge_exe_res.h" | |
20 | + | |
21 | +#define FILEPATH_MAX 32000 | |
22 | + | |
23 | +#ifdef _WIN64 | |
24 | +const char WinTitle[] = "twsyn bridge x64"; | |
25 | +#else | |
26 | +const char WinTitle[] = "twsyn bridge x86"; | |
27 | +#endif | |
28 | + | |
29 | +// host | |
30 | +static DWORD PrcsIdHost = 0; | |
31 | +static DWORD PrcsVerHost = 0; | |
32 | +static HWND hControlWndHost = NULL; | |
33 | +static UINT uControlMessHost = 0; | |
34 | +// bridge | |
35 | +static HWND hControlWnd = NULL; | |
36 | +static UINT uControlMess = 0; | |
37 | +static HANDLE hMutex = NULL; | |
38 | +static HANDLE hFileMap = NULL; | |
39 | +static fm_bridge_t *shared_data = NULL; | |
40 | +static int thread_exit = 0; | |
41 | +static HANDLE hThread = NULL; | |
42 | +// midi in | |
43 | +HMIDIIN hMidiIn[BRIDGE_MAX_PORT]; | |
44 | +MIDIHDR *IMidiHdr[BRIDGE_MAX_PORT][BRIDGE_MAX_EXBUF]; | |
45 | +char sIMidiHdr[BRIDGE_MAX_PORT][BRIDGE_MAX_EXBUF][sizeof(MIDIHDR)]; | |
46 | +char sImidiHdr_data[BRIDGE_MAX_PORT][BRIDGE_MAX_EXBUF][BRIDGE_BUFF_SIZE]; | |
47 | +static int exbuf_count = 0; | |
48 | + | |
49 | +static void ErrorMessageBox(const char *text) | |
50 | +{ | |
51 | + const char title[] = "twsyn_bridge(exe)"; | |
52 | + char buf[0x800]; | |
53 | + | |
54 | + wsprintfA(buf,"%s", text); | |
55 | + MessageBox(NULL, buf, title, MB_OK | MB_ICONEXCLAMATION); | |
56 | +} | |
57 | + | |
58 | +static void uninit_bridge(void) | |
59 | +{ | |
60 | + thread_exit = 1; | |
61 | + if(hThread){ | |
62 | + switch(WaitForSingleObject(hThread, 500)) { | |
63 | + case WAIT_OBJECT_0: | |
64 | + break; | |
65 | + default: | |
66 | + TerminateThread(hThread, 0); | |
67 | + break; | |
68 | + } | |
69 | + CloseHandle(hThread); | |
70 | + hThread = NULL; | |
71 | + } | |
72 | + if(shared_data) { | |
73 | + UnmapViewOfFile(shared_data); | |
74 | + shared_data = NULL; | |
75 | + } | |
76 | + if(hFileMap) { | |
77 | + CloseHandle(hFileMap); | |
78 | + hFileMap = NULL; | |
79 | + } | |
80 | + if(hMutex){ | |
81 | + CloseHandle(hMutex); | |
82 | + hMutex = NULL; | |
83 | + } | |
84 | +} | |
85 | + | |
86 | +static void get_midi_devs(void) | |
87 | +{ | |
88 | + int i, max; | |
89 | + | |
90 | + if(shared_data == NULL) | |
91 | + return; | |
92 | + memset(shared_data->midi_devs, 0, sizeof(shared_data->midi_devs)); | |
93 | + max = midiInGetNumDevs(); | |
94 | + if(max > 32) | |
95 | + max = 32; | |
96 | + shared_data->midi_dev_num = max; | |
97 | +#ifdef _WIN64 | |
98 | + _snprintf(shared_data->midi_devs[0], 255, "MIDI Mapper (x64)"); | |
99 | +#else | |
100 | + _snprintf(shared_data->midi_devs[0], 255, "MIDI Mapper (x86)"); | |
101 | +#endif | |
102 | + for(i = 1; i <= max; i++){ | |
103 | + MIDIINCAPS mic; | |
104 | + if(midiInGetDevCaps(i - 1, &mic, sizeof(MIDIINCAPS)) == 0){ | |
105 | +#ifdef _WIN64 | |
106 | + _snprintf(shared_data->midi_devs[i], 255, "%s (x64)", mic.szPname); | |
107 | +#else | |
108 | + _snprintf(shared_data->midi_devs[i], 255, "%s (x86)", mic.szPname); | |
109 | +#endif | |
110 | + } else { | |
111 | +#ifdef _WIN64 | |
112 | + _snprintf(shared_data->midi_devs[i], 255, "MIDI IN dev:%d (x64)", i - 1); | |
113 | +#else | |
114 | + _snprintf(shared_data->midi_devs[i], 255, "MIDI IN dev:%d (x86)", i - 1); | |
115 | +#endif | |
116 | + } | |
117 | + } | |
118 | +} | |
119 | + | |
120 | +void CALLBACK MidiInProc(HMIDIIN hMidiIn_, UINT wMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2) | |
121 | +{ | |
122 | + MIDIHDR *IIMidiHdr; | |
123 | + unsigned int port, bytes; | |
124 | + const int total_exbuf = BRIDGE_TOTAL_EXBUF; | |
125 | + | |
126 | + if(shared_data == NULL) | |
127 | + return; | |
128 | + switch(wMsg){ | |
129 | + case MIM_DATA: | |
130 | + shared_data->wMsg = wMsg; | |
131 | + shared_data->dwInstance = dwInstance; | |
132 | + shared_data->dwParam1 = dwParam1; | |
133 | + shared_data->dwParam2 = dwParam2; | |
134 | + SendMessage(hControlWndHost, uControlMessHost, WMC_MIM_DATA, (LPARAM)NULL); | |
135 | + break; | |
136 | + case MIM_LONGDATA: | |
137 | + IIMidiHdr = (MIDIHDR *) dwParam1; | |
138 | + shared_data->wMsg = wMsg; | |
139 | + shared_data->dwInstance = dwInstance; | |
140 | + shared_data->dwParam1 = exbuf_count; | |
141 | + shared_data->dwParam2 = dwParam2; | |
142 | + bytes = (UINT)IIMidiHdr->dwBytesRecorded; | |
143 | + shared_data->dwBytes[exbuf_count] = bytes; | |
144 | + memcpy(shared_data->lpData[exbuf_count], IIMidiHdr->lpData, bytes); | |
145 | + if(++exbuf_count >= total_exbuf) | |
146 | + exbuf_count -= total_exbuf; | |
147 | + port = (UINT)dwInstance; | |
148 | + midiInUnprepareHeader(hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR)); | |
149 | + midiInPrepareHeader(hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR)); | |
150 | + midiInAddBuffer(hMidiIn[port], IIMidiHdr, sizeof(MIDIHDR)); | |
151 | + SendMessage(hControlWndHost, uControlMessHost, WMC_MIM_LONGDATA, (LPARAM)NULL); | |
152 | + break; | |
153 | + case MIM_OPEN: | |
154 | + case MIM_CLOSE: | |
155 | + case MIM_LONGERROR: | |
156 | + case MIM_ERROR: | |
157 | + case MIM_MOREDATA: | |
158 | + break; | |
159 | + } | |
160 | +} | |
161 | + | |
162 | +static void close_midi_devs(void) | |
163 | +{ | |
164 | + int i; | |
165 | + | |
166 | + for(i = 0; i < shared_data->portnumber; i++){ | |
167 | + midiInStop(hMidiIn[i]); | |
168 | + midiInReset(hMidiIn[i]); | |
169 | + midiInClose(hMidiIn[i]); | |
170 | + } | |
171 | + shared_data->open_midi_dev = 0; | |
172 | +} | |
173 | + | |
174 | +static void open_midi_devs(void) | |
175 | +{ | |
176 | + int i, port; | |
177 | + | |
178 | + if(shared_data == NULL) | |
179 | + return; | |
180 | + exbuf_count = 0; | |
181 | + shared_data->wMsg; | |
182 | + shared_data->dwInstance; | |
183 | + shared_data->dwParam1; | |
184 | + shared_data->dwParam2; | |
185 | + memset(shared_data->dwBytes, 0, sizeof(shared_data->dwBytes)); | |
186 | + memset(shared_data->lpData, 0, sizeof(shared_data->lpData)); | |
187 | + for(port = 0; port < shared_data->portnumber; port++){ | |
188 | + for(i = 0; i < BRIDGE_MAX_EXBUF; i++){ | |
189 | + IMidiHdr[port][i] = (MIDIHDR *)sIMidiHdr[port][i]; | |
190 | + memset(IMidiHdr[port][i], 0, sizeof(MIDIHDR)); | |
191 | + IMidiHdr[port][i]->lpData = sImidiHdr_data[port][i]; | |
192 | + memset(IMidiHdr[port][i]->lpData, 0, BRIDGE_BUFF_SIZE); | |
193 | + IMidiHdr[port][i]->dwBufferLength = BRIDGE_BUFF_SIZE; | |
194 | + } | |
195 | + } | |
196 | + for(port = 0; port < shared_data->portnumber; port++){ | |
197 | + midiInOpen(&hMidiIn[port], shared_data->portID[port], (DWORD_PTR)MidiInProc, (DWORD_PTR)port, CALLBACK_FUNCTION); | |
198 | + for (i = 0; i < BRIDGE_MAX_EXBUF; i++){ | |
199 | + midiInUnprepareHeader(hMidiIn[port], IMidiHdr[port][i], sizeof(MIDIHDR)); | |
200 | + midiInPrepareHeader(hMidiIn[port], IMidiHdr[port][i], sizeof(MIDIHDR)); | |
201 | + midiInAddBuffer(hMidiIn[port], IMidiHdr[port][i], sizeof(MIDIHDR)); | |
202 | + } | |
203 | + } | |
204 | + for(port = 0; port < shared_data->portnumber; port++){ | |
205 | + if(midiInStart(hMidiIn[port]) != MMSYSERR_NOERROR) | |
206 | + goto winmmerror; | |
207 | + } | |
208 | + shared_data->open_midi_dev = 1; | |
209 | + return; | |
210 | +winmmerror: | |
211 | + close_midi_devs(); | |
212 | + return; | |
213 | +} | |
214 | + | |
215 | +LRESULT APIENTRY CALLBACK CtrlWndProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | |
216 | +{ | |
217 | + if(uMess == uControlMess){ | |
218 | + switch(wParam){ | |
219 | + case WMC_CLOSE_BRIDGE: | |
220 | + uninit_bridge(); | |
221 | + EndDialog(hwnd, FALSE); | |
222 | + PostQuitMessage(0); | |
223 | + return TRUE; | |
224 | + case WMC_GET_MIDI_DEVS: | |
225 | + get_midi_devs(); | |
226 | + return TRUE; | |
227 | + case WMC_OPEN_MIDI_DEVS: | |
228 | + open_midi_devs(); | |
229 | + return TRUE; | |
230 | + case WMC_CLOSE_MIDI_DEVS: | |
231 | + close_midi_devs(); | |
232 | + return TRUE; | |
233 | + } | |
234 | + }else switch (uMess){ | |
235 | + case WM_COMMAND: | |
236 | + switch(LOWORD(wParam)){ | |
237 | + case IDOK: | |
238 | + return TRUE; | |
239 | + case IDCANCEL: | |
240 | + return TRUE; | |
241 | + } | |
242 | + break; | |
243 | + case WM_INITDIALOG: | |
244 | + return TRUE; | |
245 | + default: | |
246 | + break; | |
247 | + } | |
248 | + return FALSE; | |
249 | +} | |
250 | + | |
251 | +static unsigned int WINAPI CheckProcessThread(void *args) | |
252 | +{ | |
253 | + for(;;){ | |
254 | + DWORD ver = 0; | |
255 | + Sleep(500); | |
256 | + if(thread_exit) break; | |
257 | + if(shared_data->exit){ | |
258 | + // ErrorMessageBox("recieve exit process."); | |
259 | + PostMessage(hControlWnd, uControlMess, WMC_CLOSE_BRIDGE, (LPARAM)NULL); | |
260 | + break; | |
261 | + } | |
262 | + else if(GetProcessVersion(PrcsIdHost) != PrcsVerHost){ | |
263 | + // ErrorMessageBox("lost host process."); | |
264 | + PostMessage(hControlWnd, uControlMess, WMC_CLOSE_BRIDGE, (LPARAM)NULL); | |
265 | + break; | |
266 | + } | |
267 | + } | |
268 | + _endthread(); | |
269 | + return 0; | |
270 | +} | |
271 | + | |
272 | +// Create Window & init bridge | |
273 | +BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) | |
274 | +{ | |
275 | + char buffer[FILEPATH_MAX] = {0}; | |
276 | + char *errortext; | |
277 | + HICON hIcon; | |
278 | + unsigned int dwThreadID = 0; | |
279 | + | |
280 | + // resister ctrl message | |
281 | + uControlMess = RegisterWindowMessage("twsyn_bridge_exe"); | |
282 | + if(!uControlMess){ | |
283 | + errortext = "bridge.exe error : RegisterWindowMessage."; | |
284 | + goto error; | |
285 | + } | |
286 | + // create window | |
287 | + hControlWnd = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DIALOG_DUMMY), NULL, (DLGPROC)CtrlWndProc); | |
288 | + if(!hControlWnd){ | |
289 | + errortext = "bridge.exe error : CreateDialog."; | |
290 | + goto error; | |
291 | + } | |
292 | + // create mutex | |
293 | + hMutex = CreateMutex(NULL, TRUE, COMMON_MUTEX_NAME); | |
294 | + if(!hMutex){ | |
295 | + errortext = "bridge.exe error : CreateMutex."; | |
296 | + goto error; | |
297 | + } | |
298 | + if(GetLastError() == ERROR_ALREADY_EXISTS){ // 二重起動防止 この時点で古いブリッジは終了しているかも? | |
299 | + errortext = "bridge.exe error : CreateMutex ALREADY_EXISTS."; | |
300 | + goto error; | |
301 | + } | |
302 | + // set icon | |
303 | + hIcon = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_ICON_BRIDGE16), IMAGE_ICON, 16, 16, 0); | |
304 | + if(hIcon != NULL) | |
305 | + SendMessage(hControlWnd, WM_SETICON, FALSE, (LPARAM)hIcon); | |
306 | + ShowWindow(hControlWnd, SW_HIDE); | |
307 | +// ShowWindow(hControlWnd, SW_SHOW); | |
308 | + // open file mapping | |
309 | + hFileMap = OpenFileMapping(FILE_MAP_ALL_ACCESS, TRUE, COMMON_FM_NAME); | |
310 | + if(!hFileMap){ | |
311 | + errortext = "bridge.exe error : OpenFileMapping."; | |
312 | + goto error; | |
313 | + } | |
314 | + // open shared_data | |
315 | + shared_data = (fm_bridge_t *)MapViewOfFile(hFileMap, FILE_MAP_ALL_ACCESS, 0, 0, 0); | |
316 | + if(!shared_data){ | |
317 | + errortext = "bridge.exe error : MapViewOfFile."; | |
318 | + goto error; | |
319 | + } | |
320 | + // open shared_data | |
321 | + if(shared_data->PrcsIdHost == 0){ | |
322 | + errortext = "bridge.exe error : recieve processID."; | |
323 | + goto error; | |
324 | + } | |
325 | + // | |
326 | + PrcsIdHost = shared_data->PrcsIdHost; | |
327 | + PrcsVerHost = shared_data->PrcsVerHost; | |
328 | + hControlWndHost = (HWND)shared_data->hControlWndHost; | |
329 | + uControlMessHost = shared_data->uControlMessHost; | |
330 | + // create thread | |
331 | + shared_data->exit = 0; // 解除 (ロードで時間かかるのでSleepは不要 | |
332 | + thread_exit = 0; | |
333 | + hThread = (HANDLE)_beginthreadex(NULL, 0, CheckProcessThread, (void *)0, 0, &dwThreadID); | |
334 | + if(!hThread){ | |
335 | + errortext = "bridge.exe error : CreateThread."; | |
336 | + goto error; | |
337 | + } | |
338 | + // send processID | |
339 | + shared_data->PrcsId = GetCurrentProcessId(); | |
340 | + // send process Version | |
341 | + shared_data->PrcsVer = GetProcessVersion(shared_data->PrcsId); | |
342 | + // send ctrl message | |
343 | + shared_data->uControlMess = uControlMess; | |
344 | + // send win handle | |
345 | + shared_data->hControlWnd = (unsigned long long)hControlWnd; // winhandleをhost側へ渡す 初期化完了フラグ | |
346 | + return TRUE; | |
347 | +error: | |
348 | + uninit_bridge(); | |
349 | + ErrorMessageBox(errortext); | |
350 | + return FALSE; | |
351 | +} | |
352 | + | |
353 | +int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) | |
354 | +{ | |
355 | + static int init = 0; | |
356 | + MSG msg; | |
357 | + | |
358 | + if(init++) return FALSE; | |
359 | + if (!InitInstance(hInstance, nCmdShow)){ | |
360 | + return FALSE; | |
361 | + } | |
362 | + // PeekMessage(&msg, NULL, WM_COMMAND, WM_COMMAND, PM_NOREMOVE); | |
363 | + while( GetMessage(&msg,NULL,0,0) ){ // message loop | |
364 | + TranslateMessage(&msg); | |
365 | + DispatchMessage(&msg); | |
366 | + } | |
367 | + uninit_bridge(); | |
368 | + return (int) msg.wParam; | |
369 | +} | |
370 | + | |
371 | + |
@@ -0,0 +1,72 @@ | ||
1 | +// Generated by ResEdit 1.5.11 | |
2 | +// Copyright (C) 2006-2012 | |
3 | +// http://www.resedit.net | |
4 | + | |
5 | +#include <windows.h> | |
6 | +#include <commctrl.h> | |
7 | +#include <richedit.h> | |
8 | +#include "twsyn_bridge_exe_res.h" | |
9 | + | |
10 | + | |
11 | + | |
12 | + | |
13 | + | |
14 | +// | |
15 | +// Dialog resources | |
16 | +// | |
17 | +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | |
18 | +IDD_DIALOG_DUMMY DIALOG 0, 0, 115, 25 | |
19 | +STYLE DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU | |
20 | +CAPTION "TWSYN Bridge" | |
21 | +FONT 8, "Tahoma" | |
22 | +{ | |
23 | + DEFPUSHBUTTON "OK", IDOK, 5, 5, 50, 15 | |
24 | + PUSHBUTTON "Cancel", IDCANCEL, 60, 5, 50, 15 | |
25 | +} | |
26 | + | |
27 | + | |
28 | + | |
29 | +// | |
30 | +// Icon resources | |
31 | +// | |
32 | +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | |
33 | +IDI_ICON_BRIDGE16 ICON "bridge-16.ico" | |
34 | + | |
35 | + | |
36 | +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | |
37 | +IDI_ICON_BRIDGE32 ICON "bridge-32.ico" | |
38 | + | |
39 | + | |
40 | + | |
41 | +// | |
42 | +// Version Information resources | |
43 | +// | |
44 | +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | |
45 | +1 VERSIONINFO | |
46 | + FILEVERSION 1,1,0,1 | |
47 | + PRODUCTVERSION 1,1,0,1 | |
48 | + FILEOS VOS__WINDOWS32 | |
49 | + FILETYPE VFT_APP | |
50 | + FILESUBTYPE VFT2_UNKNOWN | |
51 | + FILEFLAGSMASK 0x00000000 | |
52 | + FILEFLAGS 0x00000000 | |
53 | +{ | |
54 | + BLOCK "StringFileInfo" | |
55 | + { | |
56 | + BLOCK "041104B0" | |
57 | + { | |
58 | + VALUE "CompanyName", "nullpo" | |
59 | + VALUE "FileDescription", "TWSYN Bridge" | |
60 | + VALUE "FileVersion", "1, 1, 0, 1" | |
61 | + VALUE "InternalName", "twsyn_bridge" | |
62 | + VALUE "LegalCopyright", "Copyright (C) 2018" | |
63 | + VALUE "OriginalFilename", "twsyn_bridge_x86.exe twsyn_bridge_x64.exe" | |
64 | + VALUE "ProductName", "TWSYN Bridge" | |
65 | + VALUE "ProductVersion", "1, 1, 0, 1" | |
66 | + } | |
67 | + } | |
68 | + BLOCK "VarFileInfo" | |
69 | + { | |
70 | + VALUE "Translation", 0x0411, 0x04B0 | |
71 | + } | |
72 | +} |
@@ -0,0 +1,6 @@ | ||
1 | + | |
2 | + | |
3 | + | |
4 | +#define IDD_DIALOG_DUMMY 101 | |
5 | +#define IDI_ICON_BRIDGE16 900 | |
6 | +#define IDI_ICON_BRIDGE32 901 |
@@ -0,0 +1,306 @@ | ||
1 | + | |
2 | + | |
3 | +#ifdef HAVE_CONFIG_H | |
4 | +#include "config.h" | |
5 | +#endif /* HAVE_CONFIG_H */ | |
6 | + | |
7 | +#ifdef USE_TWSYN_BRIDGE | |
8 | + | |
9 | +#define _DLLC | |
10 | +#define STRICT | |
11 | +#include <stdlib.h> | |
12 | +#include <io.h> | |
13 | +#include <windows.h> | |
14 | +#include <process.h> | |
15 | +#include <windows.h> | |
16 | +#include <winuser.h> | |
17 | +#include <windef.h> | |
18 | +#include <stdio.h> | |
19 | +#include <string.h> | |
20 | +#include <fcntl.h> | |
21 | +#include <tchar.h> | |
22 | +#pragma comment(lib, "shlwapi.lib") | |
23 | +#include <shlwapi.h> | |
24 | +#include <mmsystem.h> | |
25 | +#include "w32g_res.h" | |
26 | +#include "twsyn_bridge_common.h" | |
27 | +#include "twsyn_bridge_host.h" | |
28 | +#pragma hdrstop | |
29 | + | |
30 | +// bridge | |
31 | +static DWORD PrcsId = 0; | |
32 | +static DWORD PrcsVer = 0; | |
33 | +static HWND hControlWnd = NULL; | |
34 | +static UINT uControlMess = 0; | |
35 | +// host | |
36 | +static HWND hControlWndHost = NULL; | |
37 | +static UINT uControlMessHost = 0; | |
38 | +static char ExePath[FILEPATH_MAX + 4] = ""; | |
39 | +static HANDLE hFileMap = NULL; | |
40 | +static fm_bridge_t *shared_data = NULL; | |
41 | +static PROCESS_INFORMATION pi; | |
42 | +static int run_bridge = 0; | |
43 | +static int error_bridge = 0; | |
44 | + | |
45 | +static void ErrorMessageBox(const char *text,DWORD errorcode) | |
46 | +{ | |
47 | + const char title[] = "twsyn_bridge(host)"; | |
48 | + char buf[0x800]; | |
49 | + | |
50 | + wsprintfA(buf,"%s (code:%d)", text, errorcode); | |
51 | + MessageBox(NULL, buf, title, MB_OK | MB_ICONEXCLAMATION); | |
52 | +} | |
53 | + | |
54 | +static void uninit_bridge(void) | |
55 | +{ | |
56 | + if(hControlWndHost){ | |
57 | + EndDialog(hControlWndHost, FALSE); | |
58 | + hControlWndHost = NULL; | |
59 | + } | |
60 | + if(shared_data != NULL) { | |
61 | + UnmapViewOfFile(shared_data); | |
62 | + shared_data = NULL; | |
63 | + } | |
64 | + if(hFileMap != NULL) { | |
65 | + CloseHandle(hFileMap); | |
66 | + hFileMap = NULL; | |
67 | + } | |
68 | + if(pi.hProcess){ | |
69 | + WaitForInputIdle(pi.hProcess, 100); | |
70 | + TerminateProcess(pi.hProcess, 0); | |
71 | + CloseHandle(pi.hProcess); | |
72 | + } | |
73 | + run_bridge = 0; | |
74 | + error_bridge = 0; | |
75 | +} | |
76 | + | |
77 | +static int check_bridge(void) | |
78 | +{ | |
79 | + if(!run_bridge) | |
80 | + return 1; | |
81 | + if(GetProcessVersion(PrcsId) == PrcsVer) | |
82 | + return 0; | |
83 | + ErrorMessageBox("bridge host error : lost twsyn bridge process.", 0); | |
84 | + uninit_bridge(); | |
85 | + return 1; | |
86 | +} | |
87 | + | |
88 | +LRESULT APIENTRY CALLBACK CtrlWndProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam) | |
89 | +{ | |
90 | + if(!run_bridge) | |
91 | + return FALSE; | |
92 | + if(uMess == uControlMessHost){ | |
93 | + switch(wParam){ | |
94 | + case WMC_MIM_DATA: | |
95 | + case WMC_MIM_LONGDATA: | |
96 | + MidiInProc(NULL, shared_data->wMsg, shared_data->dwInstance, shared_data->dwParam1, shared_data->dwParam2); | |
97 | + return TRUE; | |
98 | + } | |
99 | + }else switch (uMess){ | |
100 | + case WM_COMMAND: | |
101 | + switch(LOWORD(wParam)){ | |
102 | + case IDOK: | |
103 | + return TRUE; | |
104 | + case IDCANCEL: | |
105 | + return TRUE; | |
106 | + } | |
107 | + break; | |
108 | + case WM_INITDIALOG: | |
109 | + return TRUE; | |
110 | + default: | |
111 | + break; | |
112 | + } | |
113 | + return FALSE; | |
114 | +} | |
115 | + | |
116 | +int get_bridge_midi_devs(void) | |
117 | +{ | |
118 | + if(check_bridge()) | |
119 | + return 0; | |
120 | + SendMessage(hControlWnd, uControlMess, WMC_GET_MIDI_DEVS, (LPARAM)NULL); | |
121 | + return shared_data->midi_dev_num; | |
122 | +} | |
123 | + | |
124 | +char *get_bridge_midi_dev_name(int num) | |
125 | +{ | |
126 | + if(!run_bridge) | |
127 | + return NULL; | |
128 | + if(num < 0) | |
129 | + num = 0; | |
130 | + if(num > shared_data->midi_dev_num) | |
131 | + num = shared_data->midi_dev_num; | |
132 | + return shared_data->midi_devs[num]; | |
133 | +} | |
134 | + | |
135 | +int get_bridge_mim_databytes(int num) | |
136 | +{ | |
137 | + if(!run_bridge) | |
138 | + return 0; | |
139 | + return shared_data->dwBytes[num]; | |
140 | +} | |
141 | + | |
142 | +char *get_bridge_mim_longdata(int num) | |
143 | +{ | |
144 | + if(!run_bridge) | |
145 | + return NULL; | |
146 | + return shared_data->lpData[num]; | |
147 | +} | |
148 | + | |
149 | +void open_bridge_midi_dev(int portnumber, unsigned int *portID) | |
150 | +{ | |
151 | + int i; | |
152 | + if(check_bridge()) | |
153 | + return; | |
154 | + shared_data->portnumber = portnumber; | |
155 | + for(i = 0; i < BRIDGE_MAX_PORT; i++) | |
156 | + shared_data->portID[i] = portID[i]; | |
157 | + SendMessage(hControlWnd, uControlMess, WMC_OPEN_MIDI_DEVS, (LPARAM)NULL); | |
158 | +} | |
159 | + | |
160 | +void close_bridge_midi_dev(void) | |
161 | +{ | |
162 | + int i; | |
163 | + if(!run_bridge) | |
164 | + return; | |
165 | + SendMessage(hControlWnd, uControlMess, WMC_CLOSE_MIDI_DEVS, (LPARAM)NULL); | |
166 | +} | |
167 | + | |
168 | +void close_bridge(void) | |
169 | +{ | |
170 | + if(!run_bridge) | |
171 | + return; | |
172 | + SendMessage(hControlWnd, uControlMess, WMC_CLOSE_BRIDGE, (LPARAM)NULL); // close_bridge | |
173 | + uninit_bridge(); | |
174 | +} | |
175 | + | |
176 | +void init_bridge(void) | |
177 | +{ | |
178 | + STARTUPINFO si; | |
179 | + WNDCLASSEX wc; | |
180 | + HINSTANCE hInstance = NULL; | |
181 | + HANDLE hfile = NULL; | |
182 | + char *errortext; | |
183 | + int result, count, error = 0; | |
184 | + | |
185 | + if(run_bridge) | |
186 | + return; | |
187 | + if(error_bridge) | |
188 | + return; | |
189 | + // get instance | |
190 | + hInstance = GetModuleHandle(0); | |
191 | + // bridge exe path | |
192 | + if(GetModuleFileName(hInstance, ExePath, FILEPATH_MAX - 1)){ | |
193 | + PathRemoveFileSpec(ExePath); | |
194 | + strcat(ExePath,"\\"); | |
195 | + }else{ | |
196 | + ExePath[0] = '.'; | |
197 | + ExePath[1] = '\\'; | |
198 | + ExePath[2] = '\0'; | |
199 | + } | |
200 | + strcat(ExePath, EXE_NAME); | |
201 | + // check bridge exe | |
202 | + hfile = CreateFile(ExePath, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); | |
203 | + if(hfile == INVALID_HANDLE_VALUE){ | |
204 | + // errortext = "host error : bridge.exe not exist."; | |
205 | + // goto error; | |
206 | + error_bridge = 1; | |
207 | + return; | |
208 | + } | |
209 | + CloseHandle(hfile); | |
210 | + hfile = NULL; | |
211 | + // CreateFileMapping | |
212 | + hFileMap = CreateFileMapping(FILE_HANDLE, NULL, PAGE_READWRITE, 0, sizeof(fm_bridge_t), COMMON_FM_NAME); | |
213 | + if(hFileMap == NULL){ | |
214 | + errortext = "bridge host error : CreateFileMapping."; | |
215 | + goto error; | |
216 | + } | |
217 | + if(GetLastError() == ERROR_ALREADY_EXISTS){ // 二重起動防止 | |
218 | + errortext = "bridge host error : CreateFileMapping ALREADY_EXISTS."; | |
219 | + goto error; | |
220 | + } | |
221 | + // open FileMap | |
222 | + shared_data = (fm_bridge_t *)MapViewOfFile(hFileMap, FILE_MAP_ALL_ACCESS, 0, 0, 0); | |
223 | + if(shared_data == NULL){ | |
224 | + errortext = "bridge host error : MapViewOfFile."; | |
225 | + goto error; | |
226 | + } | |
227 | + memset(shared_data, 0, sizeof(shared_data)); | |
228 | + // send exsit flag | |
229 | + shared_data->exit = 1; // 二重起動防止 (古いブリッジを終了 ブリッジ側でスレッド起動前に解除 | |
230 | + // send processID | |
231 | + shared_data->PrcsIdHost = GetCurrentProcessId(); | |
232 | + // send process Version | |
233 | + shared_data->PrcsVerHost = GetProcessVersion(shared_data->PrcsIdHost); | |
234 | + // resister ctrl message | |
235 | + uControlMessHost = RegisterWindowMessage("twsyn_bridge_host"); | |
236 | + if(!uControlMessHost){ | |
237 | + errortext = "bridge host error : RegisterWindowMessage."; | |
238 | + goto error; | |
239 | + } | |
240 | + // send ctrl message | |
241 | + shared_data->uControlMessHost = uControlMessHost; | |
242 | + // create window | |
243 | + hControlWndHost = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DIALOG_TWSYN_BRIDGE), NULL, (DLGPROC)CtrlWndProc); | |
244 | + if(!hControlWndHost){ | |
245 | + errortext = "bridge host error : CreateDialog."; | |
246 | + goto error; | |
247 | + } | |
248 | + ShowWindow(hControlWndHost, SW_HIDE); | |
249 | +// ShowWindow(hControlWndHost, SW_SHOW); | |
250 | + // send win handle | |
251 | + shared_data->hControlWndHost = hControlWndHost; | |
252 | + // run bridge | |
253 | + si.cb = sizeof(si); | |
254 | + si.lpReserved = NULL; | |
255 | + si.lpDesktop = NULL; | |
256 | + si.lpTitle = NULL; | |
257 | + si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; | |
258 | + si.cbReserved2 = 0; | |
259 | + si.lpReserved2 = NULL; | |
260 | + si.wShowWindow = SW_HIDE; | |
261 | + si.hStdError = GetStdHandle(STD_ERROR_HANDLE); | |
262 | + if(CreateProcess(ExePath,NULL,NULL,NULL,TRUE, | |
263 | + CREATE_DEFAULT_ERROR_MODE,NULL,NULL,&si,&pi) == FALSE ){ | |
264 | + errortext = "host error : run bridge.exe."; | |
265 | + goto error; | |
266 | + } | |
267 | + // recieve bridge hControlWnd | |
268 | + count = 0; | |
269 | + while(!shared_data->hControlWnd){ | |
270 | + Sleep(100); | |
271 | + if((count++) > 50){ // wait max 5sec | |
272 | + errortext = "host error : hControlWnd timeout."; | |
273 | + goto error; | |
274 | + } | |
275 | + } | |
276 | + uControlMess = (UINT)shared_data->uControlMess; | |
277 | + hControlWnd = (HWND)shared_data->hControlWnd; | |
278 | + // recieve processID | |
279 | + PrcsId = shared_data->PrcsId; | |
280 | + // recieve process Version | |
281 | + PrcsVer = shared_data->PrcsVer; | |
282 | + run_bridge = 1; | |
283 | + return; | |
284 | +error: | |
285 | + result = GetLastError(); | |
286 | + CloseWindow(hControlWndHost); | |
287 | + if(shared_data != NULL) { | |
288 | + UnmapViewOfFile(shared_data); | |
289 | + shared_data = NULL; | |
290 | + } | |
291 | + if(hFileMap != NULL) { | |
292 | + CloseHandle(hFileMap); | |
293 | + hFileMap = NULL; | |
294 | + } | |
295 | + if(pi.hProcess){ | |
296 | + WaitForInputIdle(pi.hProcess, 100); | |
297 | + TerminateProcess(pi.hProcess, 0); | |
298 | + CloseHandle(pi.hProcess); | |
299 | + } | |
300 | + ErrorMessageBox(errortext,result); | |
301 | + run_bridge = 0; | |
302 | + error_bridge = 1; | |
303 | + return; | |
304 | +} | |
305 | + | |
306 | +#endif // USE_BRIDGE | |
\ No newline at end of file |
@@ -0,0 +1,43 @@ | ||
1 | + | |
2 | +#pragma once | |
3 | + | |
4 | +#ifdef HAVE_CONFIG_H | |
5 | +#include "config.h" | |
6 | +#endif /* HAVE_CONFIG_H */ | |
7 | + | |
8 | +#ifdef USE_TWSYN_BRIDGE | |
9 | + | |
10 | +#define EXE_NAME32 "twsyn_bridge_x86.exe" | |
11 | +#define EXE_NAME64 "twsyn_bridge_x64.exe" | |
12 | + | |
13 | +#ifdef _WIN64 | |
14 | +#define EXE_NAME EXE_NAME32 | |
15 | +#define BRD_EXE_NAME EXE_NAME64 | |
16 | +#define FILE_HANDLE ((HANDLE)0xffffffffffffffff) | |
17 | +#else | |
18 | +#define EXE_NAME EXE_NAME64 | |
19 | +#define BRD_EXE_NAME EXE_NAME32 | |
20 | +#define FILE_HANDLE ((HANDLE)0xffffffff) | |
21 | +#endif | |
22 | + | |
23 | +#define FILEPATH_MAX 32000 | |
24 | + | |
25 | + | |
26 | +extern int opt_use_twsyn_bridge; | |
27 | +extern void close_bridge(void); | |
28 | +extern void init_bridge(void); | |
29 | +extern int get_bridge_midi_devs(void); | |
30 | +extern char *get_bridge_midi_dev_name(int num); | |
31 | +extern void open_bridge_midi_dev(int portnumber, unsigned int *portID); | |
32 | +extern void close_bridge_midi_dev(void); | |
33 | +extern int get_bridge_mim_databytes(int num); | |
34 | +extern char *get_bridge_mim_longdata(int num); | |
35 | + | |
36 | +extern void CALLBACK MidiInProc(HMIDIIN hMidiInL, UINT wMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2); | |
37 | + | |
38 | +#endif // USE_BRIDGE | |
39 | + | |
40 | + | |
41 | + | |
42 | + | |
43 | + |
@@ -51,7 +51,7 @@ | ||
51 | 51 | EnableIntrinsicFunctions="true" |
52 | 52 | FavorSizeOrSpeed="1" |
53 | 53 | OmitFramePointers="true" |
54 | - AdditionalIncludeDirectories="..\interface,..\libarc,..\libunimod,..\timidity,..\utils,..,..\..\include,..\portaudio\pa_common" | |
54 | + AdditionalIncludeDirectories="..\twsyn_bridge,..\interface,..\libarc,..\libunimod,..\timidity,..\utils,..,..\..\include,..\portaudio\pa_common" | |
55 | 55 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_CONFIG_H;_MT;TWSYNG32" |
56 | 56 | StringPooling="true" |
57 | 57 | ExceptionHandling="0" |
@@ -151,7 +151,7 @@ | ||
151 | 151 | <Tool |
152 | 152 | Name="VCCLCompilerTool" |
153 | 153 | Optimization="0" |
154 | - AdditionalIncludeDirectories="..\interface,..\libarc,..\libunimod,..\timidity,..\utils,..,..\..\include,..\portaudio\pa_common" | |
154 | + AdditionalIncludeDirectories="..\twsyn_bridge,..\interface,..\libarc,..\libunimod,..\timidity,..\utils,..,..\..\include,..\portaudio\pa_common" | |
155 | 155 | PreprocessorDefinitions="WIN32;__DEBUG;_WINDOWS;HAVE_CONFIG_H;_MT;TWSYNG32" |
156 | 156 | StringPooling="true" |
157 | 157 | MinimalRebuild="true" |
@@ -453,6 +453,10 @@ | ||
453 | 453 | > |
454 | 454 | </File> |
455 | 455 | <File |
456 | + RelativePath="..\twsyn_bridge\twsyn_bridge_host.c" | |
457 | + > | |
458 | + </File> | |
459 | + <File | |
456 | 460 | RelativePath="..\timidity\version.c" |
457 | 461 | > |
458 | 462 | </File> |
@@ -31,6 +31,7 @@ | ||
31 | 31 | <ConfigurationType>Application</ConfigurationType> |
32 | 32 | <UseOfMfc>false</UseOfMfc> |
33 | 33 | <CharacterSet>MultiByte</CharacterSet> |
34 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
34 | 35 | </PropertyGroup> |
35 | 36 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
36 | 37 | <ConfigurationType>Application</ConfigurationType> |
@@ -80,10 +81,11 @@ | ||
80 | 81 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> |
81 | 82 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
82 | 83 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> |
83 | - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">twsyng_c212</TargetName> | |
84 | - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">twsyng_x64_c212</TargetName> | |
84 | + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">twsyng_c213</TargetName> | |
85 | + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">twsyng_x64_c213</TargetName> | |
85 | 86 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;</LibraryPath> |
86 | 87 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)_x64</TargetName> |
88 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
87 | 89 | </PropertyGroup> |
88 | 90 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
89 | 91 | <Midl> |
@@ -98,7 +100,7 @@ | ||
98 | 100 | <IntrinsicFunctions>true</IntrinsicFunctions> |
99 | 101 | <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |
100 | 102 | <OmitFramePointers>true</OmitFramePointers> |
101 | - <AdditionalIncludeDirectories>..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
103 | + <AdditionalIncludeDirectories>..\twsyn_bridge;..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
102 | 104 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;HAVE_CONFIG_H;_MT;TWSYNG32;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
103 | 105 | <StringPooling>true</StringPooling> |
104 | 106 | <ExceptionHandling> |
@@ -154,7 +156,7 @@ | ||
154 | 156 | <IntrinsicFunctions>true</IntrinsicFunctions> |
155 | 157 | <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> |
156 | 158 | <OmitFramePointers>true</OmitFramePointers> |
157 | - <AdditionalIncludeDirectories>..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
159 | + <AdditionalIncludeDirectories>..\twsyn_bridge;..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
158 | 160 | <PreprocessorDefinitions>_WIN64;WIN32;NDEBUG;_WINDOWS;HAVE_CONFIG_H;_MT;TWSYNG32;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
159 | 161 | <StringPooling>true</StringPooling> |
160 | 162 | <ExceptionHandling> |
@@ -168,7 +170,7 @@ | ||
168 | 170 | <AssemblerListingLocation>.\Release/</AssemblerListingLocation> |
169 | 171 | <ObjectFileName>.\Release/</ObjectFileName> |
170 | 172 | <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> |
171 | - <WarningLevel>TurnOffAllWarnings</WarningLevel> | |
173 | + <WarningLevel>Level1</WarningLevel> | |
172 | 174 | <SuppressStartupBanner>true</SuppressStartupBanner> |
173 | 175 | <CompileAs>CompileAsC</CompileAs> |
174 | 176 | <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> |
@@ -205,7 +207,7 @@ | ||
205 | 207 | </Midl> |
206 | 208 | <ClCompile> |
207 | 209 | <Optimization>Disabled</Optimization> |
208 | - <AdditionalIncludeDirectories>..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
210 | + <AdditionalIncludeDirectories>..\twsyn_bridge;..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
209 | 211 | <PreprocessorDefinitions>WIN32;__DEBUG;_WINDOWS;HAVE_CONFIG_H;_MT;TWSYNG32;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
210 | 212 | <StringPooling>true</StringPooling> |
211 | 213 | <MinimalRebuild>true</MinimalRebuild> |
@@ -245,6 +247,7 @@ | ||
245 | 247 | <RandomizedBaseAddress>false</RandomizedBaseAddress> |
246 | 248 | <DataExecutionPrevention> |
247 | 249 | </DataExecutionPrevention> |
250 | + <LargeAddressAware>true</LargeAddressAware> | |
248 | 251 | </Link> |
249 | 252 | </ItemDefinitionGroup> |
250 | 253 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
@@ -256,8 +259,8 @@ | ||
256 | 259 | </Midl> |
257 | 260 | <ClCompile> |
258 | 261 | <Optimization>Disabled</Optimization> |
259 | - <AdditionalIncludeDirectories>..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
260 | - <PreprocessorDefinitions>_WIN64;WIN32;__DEBUG;_WINDOWS;HAVE_CONFIG_H;_MT;TWSYNG32;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
262 | + <AdditionalIncludeDirectories>..\twsyn_bridge;..\interface;..\libarc;..\libunimod;..\timidity;..\utils;..;..\..\include;..\portaudio\pa_common;..\libspeex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
263 | + <PreprocessorDefinitions>_WIN64;WIN32;_DEBUG;_WINDOWS;HAVE_CONFIG_H;_MT;TWSYNG32;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
261 | 264 | <StringPooling>true</StringPooling> |
262 | 265 | <ExceptionHandling> |
263 | 266 | </ExceptionHandling> |
@@ -285,9 +288,8 @@ | ||
285 | 288 | <Culture>0x0411</Culture> |
286 | 289 | </ResourceCompile> |
287 | 290 | <Link> |
288 | - <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> | |
289 | 291 | <AdditionalDependencies>odbc32.lib;odbccp32.lib;winmm.lib;wsock32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
290 | - <OutputFile>./Debug/twsyng.exe</OutputFile> | |
292 | + <OutputFile>$(TargetPath)</OutputFile> | |
291 | 293 | <SuppressStartupBanner>true</SuppressStartupBanner> |
292 | 294 | <GenerateDebugInformation>true</GenerateDebugInformation> |
293 | 295 | <ProgramDatabaseFile>.\Debug/twsyng.pdb</ProgramDatabaseFile> |
@@ -295,6 +297,7 @@ | ||
295 | 297 | <RandomizedBaseAddress>false</RandomizedBaseAddress> |
296 | 298 | <DataExecutionPrevention> |
297 | 299 | </DataExecutionPrevention> |
300 | + <LargeAddressAware>true</LargeAddressAware> | |
298 | 301 | </Link> |
299 | 302 | </ItemDefinitionGroup> |
300 | 303 | <ItemGroup> |
@@ -373,6 +376,7 @@ | ||
373 | 376 | <ClCompile Include="..\interface\winsyn_c.c" /> |
374 | 377 | <ClCompile Include="..\timidity\wrd_read.c" /> |
375 | 378 | <ClCompile Include="..\timidity\wrdt.c" /> |
379 | + <ClCompile Include="..\twsyn_bridge\twsyn_bridge_host.c" /> | |
376 | 380 | </ItemGroup> |
377 | 381 | <ItemGroup> |
378 | 382 | <ResourceCompile Include="..\interface\w32g_res.rc"> |
@@ -43,6 +43,7 @@ | ||
43 | 43 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
44 | 44 | <ConfigurationType>Application</ConfigurationType> |
45 | 45 | <CharacterSet>MultiByte</CharacterSet> |
46 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
46 | 47 | </PropertyGroup> |
47 | 48 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
48 | 49 | <ImportGroup Label="ExtensionSettings"> |
@@ -81,6 +82,7 @@ | ||
81 | 82 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">twsynsrv_x64</TargetName> |
82 | 83 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;</LibraryPath> |
83 | 84 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)_x64</TargetName> |
85 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
84 | 86 | </PropertyGroup> |
85 | 87 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
86 | 88 | <ClCompile> |
@@ -150,7 +152,7 @@ | ||
150 | 152 | </ClCompile> |
151 | 153 | <Link> |
152 | 154 | <AdditionalDependencies>odbc32.lib;odbccp32.lib;winmm.lib;wsock32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
153 | - <OutputFile>../Debug/twsynsrv.exe</OutputFile> | |
155 | + <OutputFile>$(TargetPath)</OutputFile> | |
154 | 156 | <GenerateDebugInformation>true</GenerateDebugInformation> |
155 | 157 | <ProgramDatabaseFile>$(OutDir)twsynsrv.pdb</ProgramDatabaseFile> |
156 | 158 | <SubSystem>Windows</SubSystem> |
@@ -46,6 +46,7 @@ | ||
46 | 46 | <ConfigurationType>StaticLibrary</ConfigurationType> |
47 | 47 | <UseOfMfc>false</UseOfMfc> |
48 | 48 | <CharacterSet>MultiByte</CharacterSet> |
49 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
49 | 50 | </PropertyGroup> |
50 | 51 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
51 | 52 | <ImportGroup Label="ExtensionSettings"> |
@@ -70,13 +71,14 @@ | ||
70 | 71 | <PropertyGroup> |
71 | 72 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
72 | 73 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
73 | - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</OutDir> | |
74 | + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir> | |
74 | 75 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> |
75 | - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\Debug\</IntDir> | |
76 | + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir> | |
76 | 77 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> |
77 | 78 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir> |
78 | 79 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> |
79 | 80 | <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir> |
81 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
80 | 82 | </PropertyGroup> |
81 | 83 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
82 | 84 | <ClCompile> |
@@ -44,6 +44,7 @@ | ||
44 | 44 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
45 | 45 | <ConfigurationType>DynamicLibrary</ConfigurationType> |
46 | 46 | <CharacterSet>MultiByte</CharacterSet> |
47 | + <PlatformToolset>Windows7.1SDK</PlatformToolset> | |
47 | 48 | </PropertyGroup> |
48 | 49 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
49 | 50 | <ImportGroup Label="ExtensionSettings"> |
@@ -84,6 +85,7 @@ | ||
84 | 85 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">timiditydrv</TargetName> |
85 | 86 | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64;</LibraryPath> |
86 | 87 | <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">timiditydrv</TargetName> |
88 | + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath> | |
87 | 89 | </PropertyGroup> |
88 | 90 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
89 | 91 | <ClCompile> |
@@ -160,7 +162,7 @@ | ||
160 | 162 | </ClCompile> |
161 | 163 | <Link> |
162 | 164 | <AdditionalDependencies>winmm.lib;wsock32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
163 | - <OutputFile>..\Debug\timiditydrv.dll</OutputFile> | |
165 | + <OutputFile>$(TargetPath)</OutputFile> | |
164 | 166 | <ModuleDefinitionFile>.\timiditydrv.def</ModuleDefinitionFile> |
165 | 167 | <MergedIDLBaseFileName>timiditydrv.idl</MergedIDLBaseFileName> |
166 | 168 | <GenerateDebugInformation>true</GenerateDebugInformation> |