Skip to content

Commit

Permalink
Use new FOURCC macro (dfxplugin-prefix.h) instead of multi-character …
Browse files Browse the repository at this point in the history
…character constants. These give a warning on my system and are probably a bad idea since they are implementation-defined (byte order in particular). While I'm touching these files, avoid __ in #defines; it's technically reserved for system use. Fixed some cases where (probably abandoned) plugins had not updated their ids. Minor updates to transverb win32 makefile.
  • Loading branch information
tom7 authored and sophiapoirier committed Jun 29, 2020
1 parent e2bda91 commit f8336e5
Show file tree
Hide file tree
Showing 44 changed files with 128 additions and 97 deletions.
9 changes: 6 additions & 3 deletions brokenfft/brokenfft.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

/* BrokenFFT 2, featuring the Super Destroy FX Windowing System! */

#ifndef __DFX_BROKENFFT_H
#define __DFX_BROKENFFT_H
#ifndef _DFX_BROKENFFT_H
#define _DFX_BROKENFFT_H

#include <audioeffectx.h>
#include "rfftw.h"
Expand All @@ -18,9 +18,12 @@

#define MAXECHO 8192

#define FOURCC(a, b, c, d) (((unsigned int)(a) << 24) | ((unsigned int)(b) << 16) | \
((unsigned int)(c) << 8) | ((unsigned int)(d)))

/* change these for your plugins */
#define PLUGIN BrokenFFT
#define PLUGINID 'DFbf'
#define PLUGINID FOURCC('D', 'F', 'b', 'f')
#define PLUGINNAME "DFX BROKENFFT"
#define PLUGINPROGRAM BrokenFFTProgram

Expand Down
6 changes: 3 additions & 3 deletions brokenfft/oldfft.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


/* broken fft: $Id: oldfft.h,v 1.1 2002-03-25 03:14:12 tom7 Exp $ */
/* broken fft: $Id: oldfft.h,v 1.02 2020/06/29 00:45:26 tom7 Exp $ */

#ifndef __AGAIN_H
#define __AGAIN_H
#ifndef _AGAIN_H
#define _AGAIN_H

#include <audioeffectx.h>

Expand Down
2 changes: 1 addition & 1 deletion bufferoverride/bufferoverridedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/


#define PLUGIN_NAME_STRING "Buffer Override"
#define PLUGIN_ID 'buff'
#define PLUGIN_ID FOURCC('b', 'u', 'f', 'f')
#define PLUGIN_VERSION_MAJOR 2
#define PLUGIN_VERSION_MINOR 1
#define PLUGIN_VERSION_BUGFIX 0
Expand Down
4 changes: 2 additions & 2 deletions decimate/decimate.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef __DECIMATE_H
#define __DECIMATE_H
#ifndef _DFX_DECIMATE_H
#define _DFX_DECIMATE_H

#include "audioeffectx.h"

Expand Down
4 changes: 2 additions & 2 deletions dfx-library/dfxdefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ These are our general global defines and constants, to be included
somewhere in the include tree for every file for a DfxPlugin.
------------------------------------------------------------------------*/

#ifndef __DFX_DEFINES_H
#define __DFX_DEFINES_H
#ifndef _DFX_DEFINES_H
#define _DFX_DEFINES_H



Expand Down
4 changes: 2 additions & 2 deletions dfx-library/dfxplugin-audiosuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ This is our class for E-Z plugin-making and E-Z multiple-API support.
This is where we connect the AudioSuite API to our DfxPlugin system.
------------------------------------------------------------------------*/

#ifndef __DFXPLUGIN_AUDIOSUITE_H
#define __DFXPLUGIN_AUDIOSUITE_H
#ifndef _DFXPLUGIN_AUDIOSUITE_H
#define _DFXPLUGIN_AUDIOSUITE_H


/* XXX this file is a hack for AudioSuite support with a separate class hierarchy */
Expand Down
13 changes: 11 additions & 2 deletions dfx-library/dfxplugin-prefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ Destroy FX is a sovereign entity comprised of Sophia Poirier and Tom Murphy 7.
This file should be included by any prefix header that you use for your plugin.
------------------------------------------------------------------------*/

#ifndef __DFXPLUGIN_PREFIX_H
#define __DFXPLUGIN_PREFIX_H
#ifndef _DFXPLUGIN_PREFIX_H
#define _DFXPLUGIN_PREFIX_H

/*-----------------------------------------------------------------------------*/
/* General stuff */

/* Give a plugin ID using character constants, like
FOURCC('D', 'F', 'x', 'p')
The result always in big-endian order (FOURCC(1, 2, 3, 4) == 0x01020304).
*/
#define FOURCC(a, b, c, d) (((unsigned int)(a) << 24) | ((unsigned int)(b) << 16) | \
((unsigned int)(c) << 8) | ((unsigned int)(d)))

/*-----------------------------------------------------------------------------*/
/* Mac stuff */
Expand Down
16 changes: 9 additions & 7 deletions dfx-library/dfxplugindef-template.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,22 @@ To contact the author, use the contact form at http:https://destroyfx.org/
------------------------------------------------------------------------*/


#ifndef __DFXPLUGIN_DEF_TEMPLATE_H
#define __DFXPLUGIN_DEF_TEMPLATE_H
#ifndef _DFXPLUGIN_DEF_TEMPLATE_H
#define _DFXPLUGIN_DEF_TEMPLATE_H


#include "dfxplugin-prefix.h"


// required
#define PLUGIN_NAME_STRING ""
#define PLUGIN_ID ''
#define PLUGIN_VERSION_MAJOR
#define PLUGIN_VERSION_MINOR
#define PLUGIN_VERSION_BUGFIX
#define PLUGIN_VERSION_STRING
// should be unique among all plugins (!) Official Destroy FX plugins use 'D' 'F'
// for the first two characters
#define PLUGIN_ID FOURCC('A', 'B', 'C', 'D')
#define PLUGIN_VERSION_MAJOR 1
#define PLUGIN_VERSION_MINOR 0
#define PLUGIN_VERSION_BUGFIX 0
#define PLUGIN_VERSION_STRING "1.0.0"
#define PLUGIN_CLASS_NAME
#define PLUGIN_ENTRY_POINT "Entry"
#define PLUGIN_BUNDLE_IDENTIFIER DESTROYFX_BUNDLE_ID_PREFIX "" DFX_BUNDLE_ID_SUFFIX
Expand Down
4 changes: 2 additions & 2 deletions dfx-library/keys.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef __KEYS_H
#define __KEYS_H
#ifndef _KEYS_H
#define _KEYS_H

/* These are keys for the abstract GUI layer. */

Expand Down
2 changes: 1 addition & 1 deletion eqsync/eqsyncdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/


#define PLUGIN_NAME_STRING "EQ Sync"
#define PLUGIN_ID 'EQsy'
#define PLUGIN_ID FOURCC('E', 'Q', 's', 'y')
#define PLUGIN_VERSION_MAJOR 1
#define PLUGIN_VERSION_MINOR 1
#define PLUGIN_VERSION_BUGFIX 0
Expand Down
2 changes: 1 addition & 1 deletion exemplar/exemplar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define STRIDE 128

#if defined(TARGET_API_VST) && TARGET_PLUGIN_HAS_GUI
#ifndef __DFX_EXEMPLAREDITOR_H
#ifndef _DFX_EXEMPLAREDITOR_H
#include "exemplareditor.hpp"
#endif
#endif
Expand Down
4 changes: 2 additions & 2 deletions exemplar/exemplar.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

/* Windowingstub, starring the Super Destroy FX Windowing System! */

#ifndef __DFX_EXEMPLAR_H
#define __DFX_EXEMPLAR_H
#ifndef _DFX_EXEMPLAR_H
#define _DFX_EXEMPLAR_H

#include <dfxplugin.h>
#include "ANN/ANN.h"
Expand Down
2 changes: 1 addition & 1 deletion exemplar/exemplardefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
see dfxplugin.h for details. */

#define PLUGIN_NAME_STRING "DFX EXEMPLAR"
#define PLUGIN_ID 'DFex'
#define PLUGIN_ID FOURCC('D', 'F', 'e', 'x')
#define PLUGIN_VERSION 0x00010100
#define PLUGIN_ENTRY_POINT "ExemplarEntry"

Expand Down
4 changes: 2 additions & 2 deletions firefly/GUI/fireflyeditor.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef __DFX_FIREFLYEDITOR_H
#define __DFX_FIREFLYEDITOR_H
#ifndef _DFX_FIREFLYEDITOR_H
#define _DFX_FIREFLYEDITOR_H

#include "dfxgui.h"
#include "multikick.hpp"
Expand Down
9 changes: 6 additions & 3 deletions firefly/firefly.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

/* DFX Firefly : Universal FIR filter; EXTREME style. */

#ifndef __DFX_FIREFLY_H
#define __DFX_FIREFLY_H
#ifndef _DFX_FIREFLY_H
#define _DFX_FIREFLY_H

#include <audioeffectx.h>

Expand All @@ -18,9 +18,12 @@
#define fsign(f) ((f<0.0)?-1.0:1.0)
#define pi (3.1415926535)

#define FOURCC(a, b, c, d) (((unsigned int)(a) << 24) | ((unsigned int)(b) << 16) | \
((unsigned int)(c) << 8) | ((unsigned int)(d)))

/* change these for your plugins */
#define PLUGIN FireFly
#define PLUGINID 'DFff'
#define PLUGINID FOURCC('D', 'F', 'f', 'f')
#define PLUGINNAME "DFX Firefly"
#define DEFPROGRAMNAME "Lampyridae"
#define PLUGINPROGRAM FireFlyProgram
Expand Down
6 changes: 3 additions & 3 deletions geometer/geometerdef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*------------------------------------------------------------------------
Copyright (C) 2002-2018 Tom Murphy 7 and Sophia Poirier
Copyright (C) 2002-2020 Tom Murphy 7 and Sophia Poirier
This file is part of Geometer.
Expand Down Expand Up @@ -27,7 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/


#define PLUGIN_NAME_STRING "Geometer"
#define PLUGIN_ID 'DFgr'
#define PLUGIN_ID FOURCC('D', 'F', 'g', 'r')
#define PLUGIN_VERSION_MAJOR 1
#define PLUGIN_VERSION_MINOR 2
#define PLUGIN_VERSION_BUGFIX 0
Expand All @@ -41,7 +41,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/
#define PLUGIN_BACKGROUND_IMAGE_FILENAME "geometer-background.png"
//#define PLUGIN_BACKGROUND_IMAGE_FILENAME "geometer-background-short.png"
#define PLUGIN_BUNDLE_IDENTIFIER DESTROYFX_BUNDLE_ID_PREFIX PLUGIN_NAME_STRING DFX_BUNDLE_ID_SUFFIX
#define PLUGIN_COPYRIGHT_YEAR_STRING "2002-2018"
#define PLUGIN_COPYRIGHT_YEAR_STRING "2002-2020"

// optional
#define PLUGIN_DESCRIPTION_STRING "visually oriented waveform geometry"
Expand Down
6 changes: 3 additions & 3 deletions guitest/guitest.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

/* Windowingstub, starring the Super Destroy FX Windowing System! */
/* Guitest, starring the Super Destroy FX Windowing System! */

#ifndef __DFX_WINDOWINGSTUB_H
#define __DFX_WINDOWINGSTUB_H
#ifndef _DFX_GUITEST_H
#define _DFX_GUITEST_H

#include "dfxplugin.h"

Expand Down
8 changes: 4 additions & 4 deletions guitest/guitestdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/* You need to redefine this stuff in order to make your plugin.
see dfxplugin.h for details. */

#define PLUGIN_NAME_STRING "WINDOWINGSTUB"
#define PLUGIN_ID 'DFws'
#define PLUGIN_NAME_STRING "GUITEST"
#define PLUGIN_ID FOURCC('D', 'F', 'g', 't')
#define PLUGIN_VERSION 0x00010100
#define PLUGIN_ENTRY_POINT "WindowingstubEntry"
#define PLUGIN_ENTRY_POINT "GuitestEntry"

#define TARGET_PLUGIN_USES_MIDI 1
#define TARGET_PLUGIN_IS_INSTRUMENT 0
Expand All @@ -16,7 +16,7 @@
#endif

/* only necessary if using a custom GUI */
#define PLUGIN_EDITOR_ENTRY_POINT "WindowingstubEditorEntry"
#define PLUGIN_EDITOR_ENTRY_POINT "GuitestEditorEntry"

// optional
#define PLUGIN_DESCRIPTION_STRING "i forgot to change the description"
Expand Down
4 changes: 2 additions & 2 deletions guitest/guitesteditor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef __DFX_GUITESTEDITOR_H
#define __DFX_GUITESTEDITOR_H
#ifndef _DFX_GUITESTEDITOR_H
#define _DFX_GUITESTEDITOR_H

#include <audioeffectx.h>
#include <aeffeditor.hpp>
Expand Down
4 changes: 2 additions & 2 deletions intercom/intercom.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
---------------------------------------------------------------*/

#ifndef __DFX_INTERCOM_H
#define __DFX_INTERCOM_H
#ifndef _DFX_INTERCOM_H
#define _DFX_INTERCOM_H

#include "audioeffectx.h"

Expand Down
2 changes: 1 addition & 1 deletion midigater/midigaterdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/


#define PLUGIN_NAME_STRING "MIDI Gater"
#define PLUGIN_ID 'Mgat'
#define PLUGIN_ID FOURCC('M', 'g', 'a', 't')
#define PLUGIN_VERSION_MAJOR 1
#define PLUGIN_VERSION_MINOR 1
#define PLUGIN_VERSION_BUGFIX 0
Expand Down
2 changes: 1 addition & 1 deletion monomaker/monomakerdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/


#define PLUGIN_NAME_STRING "Monomaker"
#define PLUGIN_ID 'mono'
#define PLUGIN_ID FOURCC('m', 'o', 'n', 'o')
#define PLUGIN_VERSION_MAJOR 1
#define PLUGIN_VERSION_MINOR 1
#define PLUGIN_VERSION_BUGFIX 0
Expand Down
2 changes: 1 addition & 1 deletion polarizer/polarizerdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/


#define PLUGIN_NAME_STRING "Polarizer"
#define PLUGIN_ID 'pola'
#define PLUGIN_ID FOURCC('p', 'o', 'l', 'a')
#define PLUGIN_VERSION_MAJOR 1
#define PLUGIN_VERSION_MINOR 1
#define PLUGIN_VERSION_BUGFIX 0
Expand Down
2 changes: 1 addition & 1 deletion rezsynth/rezsynthdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To contact the author, use the contact form at http:https://destroyfx.org/


#define PLUGIN_NAME_STRING "Rez Synth"
#define PLUGIN_ID 'RezS'
#define PLUGIN_ID FOURCC('R', 'e', 'z', 'S')
#define PLUGIN_VERSION_MAJOR 2
#define PLUGIN_VERSION_MINOR 0
#define PLUGIN_VERSION_BUGFIX 0
Expand Down
4 changes: 2 additions & 2 deletions rmsbuddy/rmsbuddy-vst.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*----------------------- by Sophia Poirier ][ June 2001 ----------------------*/

#ifndef __RMSBUDDY_VST_H
#define __RMSBUDDY_VST_H
#ifndef _DFX_RMSBUDDY_VST_H
#define _DFX_RMSBUDDY_VST_H

#include "audioeffectx.h"

Expand Down
8 changes: 4 additions & 4 deletions rmsbuddy/rmsbuddydef.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef __RMSBUDDY_DEF_H
#define __RMSBUDDY_DEF_H
#ifndef _RMSBUDDY_DEF_H
#define _RMSBUDDY_DEF_H

#define RMS_BUDDY_VERSION 0x00010105
#define RMS_BUDDY_PLUGIN_ID 'rbud'
#define RMS_BUDDY_MANUFACTURER_ID 'DFX!'
#define RMS_BUDDY_PLUGIN_ID FOURCC('r', 'b', 'u', 'd')
#define RMS_BUDDY_MANUFACTURER_ID FOURCC('D', 'F', 'X', '!')
#define RMS_BUDDY_BUNDLE_ID "org.destroyfx.RMSBuddy"

#endif
6 changes: 3 additions & 3 deletions rmsbuddy/rmsbuddyeditor-vst.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*----------------------- by Sophia Poirier ][ June 2001 ----------------------*/

#ifndef __RMSBUDDYEDITOR_VST_H
#define __RMSBUDDYEDITOR_VST_H
#ifndef _DFX_RMSBUDDYEDITOR_VST_H
#define _DFX_RMSBUDDYEDITOR_VST_H

#include "vstgui.h"

Expand All @@ -20,7 +20,7 @@ class RMSbuddyEditor : public AEffGUIEditor, public CControlListener

virtual void valueChanged(CDrawContext* context, CControl* control);

virtual void idle();
virtual void idle();

private:
// controls
Expand Down
4 changes: 2 additions & 2 deletions rmsbuddy/rmsbuddyeditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with RMS Buddy. If not, see <http:https://www.gnu.org/licenses/>.
To contact the author, use the contact form at http:https://destroyfx.org/
------------------------------------------------------------------------*/

#ifndef __RMS_BUDDY_EDITOR_H
#define __RMS_BUDDY_EDITOR_H
#ifndef _DFX_RMS_BUDDY_EDITOR_H
#define _DFX_RMS_BUDDY_EDITOR_H


#include "AUCarbonViewBase.h"
Expand Down
6 changes: 3 additions & 3 deletions scrubby/gui/scrubbykeyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// by Sophia Poirier, May 2002
//=============================================================================

#ifndef __scrubbykeyboard
#define __scrubbykeyboard
#ifndef _DFX_SCRUBBYKEYBOARD
#define _DFX_SCRUBBYKEYBOARD

#include "dfxguimulticontrols.h"

Expand Down Expand Up @@ -50,4 +50,4 @@ class ScrubbyKeyboard : public CMultiControl
};


#endif
#endif

0 comments on commit f8336e5

Please sign in to comment.