/*
- * Copyright (C) 2015 Tim Mayberry <mojofunk@gmail.com>
+ * Copyright (C) 2015-2016 Tim Mayberry <mojofunk@gmail.com>
+ * Copyright (C) 2015 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "winmmemidi_output_device.h"
#include "pbd/debug.h"
#include "pbd/compose.h"
+#include "pbd/pthread_utils.h"
#include "pbd/windows_timer_utils.h"
#include "pbd/windows_mmcss.h"
-#include "rt_thread.h"
#include "midi_util.h"
#include "debug.h"
, m_enabled(false)
, m_thread_running(false)
, m_thread_quit(false)
- , m_midi_buffer(new RingBuffer<uint8_t>(MIDI_BUFFER_SIZE))
+ , m_midi_buffer(new PBD::RingBuffer<uint8_t>(MIDI_BUFFER_SIZE))
{
DEBUG_MIDI (string_compose ("Creating midi output device index: %1\n", index));
size_t stacksize = 100000;
// TODO Use native threads
- if (_realtime_pthread_create (SCHED_FIFO, -21, stacksize,
+ if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -21, stacksize,
&m_output_thread_handle, midi_output_thread, this)) {
return false;
}
switch (h.size) {
case 3:
message |= (((DWORD)data[2]) << 16);
- // Fallthrough on purpose.
+ /* fallthrough */
case 2:
message |= (((DWORD)data[1]) << 8);
- // Fallthrough on purpose.
+ /* fallthrough */
case 1:
message |= (DWORD)data[0];
result = midiOutShortMsg (m_handle, message);