Not compile tested.
Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/winecoreaudio.drv/midi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winecoreaudio.drv/midi.c b/dlls/winecoreaudio.drv/midi.c index a40ca2a3b9..edaf128312 100644 --- a/dlls/winecoreaudio.drv/midi.c +++ b/dlls/winecoreaudio.drv/midi.c @@ -148,7 +148,7 @@ LONG CoreAudio_MIDIInit(void) sources[i].source = MIDIGetSource(i);
CoreMIDI_GetObjectName(sources[i].source, szPname, sizeof(szPname)); - MultiByteToWideChar(CP_ACP, 0, szPname, -1, sources[i].caps.szPname, sizeof(sources[i].caps.szPname)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, szPname, -1, sources[i].caps.szPname, ARRAY_SIZE(sources[i].caps.szPname));
MIDIPortConnectSource(MIDIInPort, sources[i].source, &sources[i].wDevID);
@@ -164,7 +164,7 @@ LONG CoreAudio_MIDIInit(void) for (i = 0; i < MAX_MIDI_SYNTHS; i++) { snprintf(szPname, sizeof(szPname), "CoreAudio MIDI Synth %d", i); - MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, sizeof(destinations[i].caps.szPname)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, ARRAY_SIZE(destinations[i].caps.szPname));
destinations[i].caps.wTechnology = MOD_SYNTH; destinations[i].caps.wChannelMask = 0xFFFF; @@ -182,7 +182,7 @@ LONG CoreAudio_MIDIInit(void) destinations[i].dest = MIDIGetDestination(i - MAX_MIDI_SYNTHS);
CoreMIDI_GetObjectName(destinations[i].dest, szPname, sizeof(szPname)); - MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, sizeof(destinations[i].caps.szPname)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, ARRAY_SIZE(destinations[i].caps.szPname));
destinations[i].caps.wTechnology = MOD_MIDIPORT; destinations[i].caps.wChannelMask = 0xFFFF;
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Nov 15, 2018 at 08:42:21PM +0100, Michael Stefaniuc wrote:
Not compile tested.
Signed-off-by: Michael Stefaniuc mstefani@winehq.org
dlls/winecoreaudio.drv/midi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winecoreaudio.drv/midi.c b/dlls/winecoreaudio.drv/midi.c index a40ca2a3b9..edaf128312 100644 --- a/dlls/winecoreaudio.drv/midi.c +++ b/dlls/winecoreaudio.drv/midi.c @@ -148,7 +148,7 @@ LONG CoreAudio_MIDIInit(void) sources[i].source = MIDIGetSource(i);
CoreMIDI_GetObjectName(sources[i].source, szPname, sizeof(szPname));
MultiByteToWideChar(CP_ACP, 0, szPname, -1, sources[i].caps.szPname, sizeof(sources[i].caps.szPname)/sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szPname, -1, sources[i].caps.szPname, ARRAY_SIZE(sources[i].caps.szPname)); MIDIPortConnectSource(MIDIInPort, sources[i].source, &sources[i].wDevID);
@@ -164,7 +164,7 @@ LONG CoreAudio_MIDIInit(void) for (i = 0; i < MAX_MIDI_SYNTHS; i++) { snprintf(szPname, sizeof(szPname), "CoreAudio MIDI Synth %d", i);
MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, sizeof(destinations[i].caps.szPname)/sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, ARRAY_SIZE(destinations[i].caps.szPname)); destinations[i].caps.wTechnology = MOD_SYNTH; destinations[i].caps.wChannelMask = 0xFFFF;
@@ -182,7 +182,7 @@ LONG CoreAudio_MIDIInit(void) destinations[i].dest = MIDIGetDestination(i - MAX_MIDI_SYNTHS);
CoreMIDI_GetObjectName(destinations[i].dest, szPname, sizeof(szPname));
MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, sizeof(destinations[i].caps.szPname)/sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szPname, -1, destinations[i].caps.szPname, ARRAY_SIZE(destinations[i].caps.szPname)); destinations[i].caps.wTechnology = MOD_MIDIPORT; destinations[i].caps.wChannelMask = 0xFFFF;
-- 2.14.5