From 2aea36ece0881e0ee0885ae1ddc656f2260de57a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 2 Nov 2022 13:00:57 +0100 Subject: Rename event.h to engineevent.h to avoid nameclash with system include files. --- drumgizmo/drumgizmoc.cc | 2 -- drumgizmo/input/midifile.h | 2 +- drumgizmo/input/test.cc | 1 - drumgizmo/input/test.h | 1 - src/Makefile.am | 2 +- src/audioinputengine.h | 2 +- src/drumgizmo.cc | 1 - src/engineevent.h | 46 ++++++++++++++++++++++++++++++++++++++++ src/event.h | 46 ---------------------------------------- src/inputfilter.h | 2 +- src/inputprocessor.h | 2 +- test/dgreftest/midiinputengine.h | 8 +++---- 12 files changed, 55 insertions(+), 60 deletions(-) create mode 100644 src/engineevent.h delete mode 100644 src/event.h diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc index 8eba4c9..bca55d2 100644 --- a/drumgizmo/drumgizmoc.cc +++ b/drumgizmo/drumgizmoc.cc @@ -46,8 +46,6 @@ #include "enginefactory.h" #include "bytesizeparser.h" -#include "event.h" - #include "nolocale.h" struct ParmToken diff --git a/drumgizmo/input/midifile.h b/drumgizmo/input/midifile.h index 5756718..a8cf574 100644 --- a/drumgizmo/input/midifile.h +++ b/drumgizmo/input/midifile.h @@ -25,9 +25,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #pragma once + #include -#include #include #include "audioinputenginemidi.h" diff --git a/drumgizmo/input/test.cc b/drumgizmo/input/test.cc index 955d218..bc88c48 100644 --- a/drumgizmo/input/test.cc +++ b/drumgizmo/input/test.cc @@ -27,7 +27,6 @@ #include #include -#include "event.h" #include "test.h" TestInputEngine::TestInputEngine() diff --git a/drumgizmo/input/test.h b/drumgizmo/input/test.h index baf7c95..f1e0b42 100644 --- a/drumgizmo/input/test.h +++ b/drumgizmo/input/test.h @@ -27,7 +27,6 @@ #pragma once #include -#include "event.h" #include "audioinputengine.h" class TestInputEngine diff --git a/src/Makefile.am b/src/Makefile.am index a5cc5f7..ff02883 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -107,7 +107,7 @@ EXTRA_DIST = \ drumgizmoconf.h \ drumkit.h \ drumkitloader.h \ - event.h \ + engineevent.h \ events.h \ events_ds.h \ grid.h \ diff --git a/src/audioinputengine.h b/src/audioinputengine.h index 71a86c2..55a06ae 100644 --- a/src/audioinputengine.h +++ b/src/audioinputengine.h @@ -29,7 +29,7 @@ #include #include -#include +#include "engineevent.h" #include "instrument.h" diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index abe57be..9828c6b 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/src/engineevent.h b/src/engineevent.h new file mode 100644 index 0000000..9c60a4a --- /dev/null +++ b/src/engineevent.h @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/*************************************************************************** + * engineevent.h + * + * Fri Jun 3 12:10:50 CEST 2011 + * Copyright 2011 Bent Bisballe Nyeng + * deva@aasimon.org + ****************************************************************************/ + +/* + * This file is part of DrumGizmo. + * + * DrumGizmo is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DrumGizmo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with DrumGizmo; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ +#pragma once + +#include + +//! Event types +enum class EventType +{ + OnSet, + Choke, + Stop, +}; + +//! POD datatype for input event transport. +struct event_t +{ + EventType type; //!< The type of the event. + std::size_t instrument; //!< The instrument number. + std::size_t offset; //!< The offset position in the input buffer + float velocity; //!< The velocity if the type is a note on [0; 1] +}; diff --git a/src/event.h b/src/event.h deleted file mode 100644 index 737fb18..0000000 --- a/src/event.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/*************************************************************************** - * event.h - * - * Fri Jun 3 12:10:50 CEST 2011 - * Copyright 2011 Bent Bisballe Nyeng - * deva@aasimon.org - ****************************************************************************/ - -/* - * This file is part of DrumGizmo. - * - * DrumGizmo is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DrumGizmo is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with DrumGizmo; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#pragma once - -#include - -//! Event types -enum class EventType -{ - OnSet, - Choke, - Stop, -}; - -//! POD datatype for input event transport. -struct event_t -{ - EventType type; //!< The type of the event. - std::size_t instrument; //!< The instrument number. - std::size_t offset; //!< The offset position in the input buffer - float velocity; //!< The velocity if the type is a note on [0; 1] -}; diff --git a/src/inputfilter.h b/src/inputfilter.h index 45dd01e..128dfb0 100644 --- a/src/inputfilter.h +++ b/src/inputfilter.h @@ -26,7 +26,7 @@ */ #pragma once -#include +#include "engineevent.h" //! An abstract filter component for the InputProcessor class filter chain. class InputFilter diff --git a/src/inputprocessor.h b/src/inputprocessor.h index 971cc85..18bb583 100644 --- a/src/inputprocessor.h +++ b/src/inputprocessor.h @@ -30,13 +30,13 @@ #include #include -#include #include "drumkit.h" #include "events.h" #include "events_ds.h" #include "id.h" #include "inputfilter.h" +#include "engineevent.h" struct Settings; class Random; diff --git a/test/dgreftest/midiinputengine.h b/test/dgreftest/midiinputengine.h index ffd22f8..e76a182 100644 --- a/test/dgreftest/midiinputengine.h +++ b/test/dgreftest/midiinputengine.h @@ -26,15 +26,15 @@ */ #pragma once -#include -#include -#include #include #include -#include #include +#include +#include +#include + class MidifileInputEngine : public AudioInputEngineMidi { -- cgit v1.2.3