Modification of the SDK headers

Author
kazssym
Max Output Level: -90 dBFS
  • Total Posts : 10
  • Joined: 2003/12/21 08:19:42
  • Status: offline
2010/07/15 05:49:31 (permalink)

Modification of the SDK headers

I am trying to write an open-source MIDI FX using C++Builder.  Unfortunately, one of the SDK headers appears not conforming to the standard C++ and I must modify it to build my program.  Then, can I redistribute the modified header file with my source code?
#1

2 Replies Related Threads

    kazssym
    Max Output Level: -90 dBFS
    • Total Posts : 10
    • Joined: 2003/12/21 08:19:42
    • Status: offline
    Re:Modification of the SDK headers 2010/08/12 02:35:47 (permalink)
    If you are interested, these are my changes.

    diff -r 75d29e7a8a85 -r 8c78af1c1a60 include/MidiFilter.h
    --- a/include/MidiFilter.h    Thu Jul 15 22:02:15 2010 +0900
    +++ b/include/MidiFilter.h    Thu Jul 15 22:05:15 2010 +0900
    @@ -328,11 +328,15 @@
     
     struct MfxMuteMask
     {
    +#ifndef __BORLANDC__
         MfxMuteMask() { byte = 0; }
         MfxMuteMask(int b) { byte = BYTE(b); }
    +#endif
         BOOL AnySet() const { return byte; }
         operator BYTE() const { return byte; }
    +#ifndef __BORLANDC__
         BYTE operator=(int n) { byte = BYTE(n); return byte; }
    +#endif
         union
         {
              BYTE    byte;
    @@ -419,7 +423,7 @@
             };
             struct // m_eType == KeyAft
             {
    -            BYTE    m_byKey;    // 0..127
    +            BYTE    m_byKey1;    // 0..127
                 BYTE    m_byAmt;    // 0..127
             };
             struct // m_eType == Control
    @@ -435,7 +439,7 @@
             };
             struct // m_eType == ChanAft
             {
    -            BYTE    m_byAmt;    // 0..127
    +            BYTE    m_byAmt1;    // 0..127
             };
             struct // m_eType == Wheel
             {
    @@ -937,18 +941,18 @@
             };
             struct // ChannelMuteMask
             {
    -            MFX_CHANNEL    m_mfxChannel;
    +            MFX_CHANNEL    m_mfxChannel1;
                 MfxMuteMask    m_maskSet;
                 MfxMuteMask    m_maskClear;
             };
             struct // ChannelVelOfs, ChannelKeyOfs
             {
    -            MFX_CHANNEL    m_mfxChannel;
    +            MFX_CHANNEL    m_mfxChannel2;
                 char            m_nOfs;
             };
             struct // ChannelVelTrim, ChannelKeyTrim
             {
    -            MFX_CHANNEL    m_mfxChannel;
    +            MFX_CHANNEL    m_mfxChannel3;
                 char            m_nTrim;                // m_type == VelTrim, KeyTrim
             };
         };

    #2
    kazssym
    Max Output Level: -90 dBFS
    • Total Posts : 10
    • Joined: 2003/12/21 08:19:42
    • Status: offline
    Re:Modification of the SDK headers 2010/08/12 02:57:06 (permalink)
    For struct MfxMuteMask, since it is used as a union member, it must not have any constructors or assignment operators by the language definition.

    Other member renames are to avoid name conflicts in anonymous unions.
    #3
    Jump to:
    © 2024 APG vNext Commercial Version 5.1