Skip to content

Commit

Permalink
Merge pull request mixxxdj#11050 from daschuer/portmidi_fix
Browse files Browse the repository at this point in the history
Fix building with portmidi 2.0.4
  • Loading branch information
Swiftb0y authored Nov 9, 2022
2 parents 5fa2f16 + b3faa7a commit dba50e2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/test/portmidicontroller_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,19 @@ class PortMidiControllerTest : public MixxxTest {
PortMidiControllerTest()
: m_mockInput(new MockPortMidiDevice(&m_inputDeviceInfo, 0)),
m_mockOutput(new MockPortMidiDevice(&m_outputDeviceInfo, 0)) {
m_inputDeviceInfo.name = "Test Input Device";
m_inputDeviceInfo.interf = "Test";
// PmDeviceInfo::name is non const since portmidi 2.0.1
// We maintain the memory here in place of Pm_GetDeviceInfo()
char inputDeviceName[] = "Test Input Device";
char outputDeviceName[] = "Test Output Device";
constexpr const char interf[] = "Test";
m_inputDeviceInfo.name = inputDeviceName;
m_inputDeviceInfo.interf = interf;
m_inputDeviceInfo.input = 1;
m_inputDeviceInfo.output = 0;
m_inputDeviceInfo.opened = 0;

m_outputDeviceInfo.name = "Test Output Device";
m_outputDeviceInfo.interf = "Test";
m_outputDeviceInfo.name = outputDeviceName;
m_outputDeviceInfo.interf = interf;
m_outputDeviceInfo.input = 0;
m_outputDeviceInfo.output = 1;
m_outputDeviceInfo.opened = 0;
Expand Down

0 comments on commit dba50e2

Please sign in to comment.