mirror of https://github.com/AxioDL/boo.git
const_cast is a nicer statement
This commit is contained in:
parent
e45c3feef6
commit
ceedda9e1f
|
@ -551,8 +551,8 @@ struct WASAPIAudioVoiceEngine : BaseAudioVoiceEngine
|
|||
|
||||
size_t send(const void* buf, size_t len) const
|
||||
{
|
||||
memcpy(((MIDIOut*)this)->m_buf, buf, std::min(len, size_t(512)));
|
||||
((MIDIOut*)this)->m_hdr.dwBytesRecorded = len;
|
||||
memcpy(const_cast<MIDIOut*>(this)->m_buf, buf, std::min(len, size_t(512)));
|
||||
const_cast<MIDIOut*>(this)->m_hdr.dwBytesRecorded = len;
|
||||
midiStreamOut(m_strm, LPMIDIHDR(&m_hdr), sizeof(m_hdr));
|
||||
return len;
|
||||
}
|
||||
|
@ -609,8 +609,8 @@ struct WASAPIAudioVoiceEngine : BaseAudioVoiceEngine
|
|||
|
||||
size_t send(const void* buf, size_t len) const
|
||||
{
|
||||
memcpy(((MIDIOut*)this)->m_buf, buf, std::min(len, size_t(512)));
|
||||
((MIDIOut*)this)->m_hdr.dwBytesRecorded = len;
|
||||
memcpy(const_cast<MIDIOut*>(this)->m_buf, buf, std::min(len, size_t(512)));
|
||||
const_cast<MIDIOut*>(this)->m_hdr.dwBytesRecorded = len;
|
||||
midiStreamOut(m_strm, LPMIDIHDR(&m_hdr), sizeof(m_hdr));
|
||||
return len;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue