Skip to content

Commit 4f49a0c

Browse files
committed
Fix tests
1 parent ed858d1 commit 4f49a0c

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

modules/yup_audio_basics/midi/ump/yup_UMPMidi1ToBytestreamTranslator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Midi1ToBytestreamTranslator
9090
if (Utils::getMessageType (firstWord) != 0x00)
9191
{
9292
const auto message = fromUmp (PacketX1 { firstWord }, time);
93-
callback (BytestreamMidiView (&message));
93+
callback (message);
9494
}
9595

9696
break;
@@ -187,7 +187,7 @@ class Midi1ToBytestreamTranslator
187187
void terminateSysExMessage (MessageCallback&& callback)
188188
{
189189
pendingSysExData.push_back (std::byte { 0xf7 });
190-
callback (BytestreamMidiView (pendingSysExData, pendingSysExTime));
190+
callback (BytestreamMidiView (pendingSysExData, pendingSysExTime).getMessage());
191191
pendingSysExData.clear();
192192
}
193193

modules/yup_audio_basics/yup_audio_basics.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@
133133
#undef YUP_USE_VDSP_FRAMEWORK
134134
#endif
135135

136+
//==============================================================================
137+
#include <chrono>
138+
136139
//==============================================================================
137140
#include "buffers/yup_AudioDataConverters.h"
138141
YUP_BEGIN_IGNORE_WARNINGS_MSVC (4661)
@@ -179,6 +182,6 @@ YUP_END_IGNORE_WARNINGS_MSVC
179182
#include "utilities/yup_AudioWorkgroup.h"
180183
#include "midi/ump/yup_UMPBytesOnGroup.h"
181184
#include "midi/ump/yup_UMPDeviceInfo.h"
182-
#include "midi/ump/yup_UMP.h"
183185
#include "midi/ump/yup_UMPPacketBuffer.h"
184186
#include "midi/ump/yup_UMPKeyboardState.h"
187+
#include "midi/ump/yup_UMP.h"

tests/yup_audio_basics/yup_UMPChannelVoice.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ TEST (UMPChannelVoiceTests, Midi2AttributesAndSensitivity)
128128

129129
TEST (UMPChannelVoiceTests, Midi2ToMidi1Translation)
130130
{
131-
const auto noteOn = Midi2ChannelVoiceMessageView { makeMidi2NoteOnMessage (4, 7, 99, Velocity { uint16_t { 0x4567 } }) };
132-
const auto noteOff = Midi2ChannelVoiceMessageView { makeMidi2NoteOffMessage (3, 9, 66, Velocity { uint16_t { 0x1234 } }) };
131+
const auto noteOnMessage = makeMidi2NoteOnMessage (4, 7, 99, Velocity { uint16_t { 0x4567 } });
132+
const auto noteOffMessage = makeMidi2NoteOffMessage (3, 9, 66, Velocity { uint16_t { 0x1234 } });
133+
const auto noteOn = Midi2ChannelVoiceMessageView { noteOnMessage };
134+
const auto noteOff = Midi2ChannelVoiceMessageView { noteOffMessage };
133135

134136
auto m1 = asMidi1ChannelVoiceMessage (noteOn);
135137
ASSERT_TRUE (m1.has_value());

0 commit comments

Comments
 (0)