Browse Source

MPEZone: added copy constructor and copy assignment operator.

tags/2021-05-28
Timur Doumler 9 years ago
parent
commit
42a3145153
2 changed files with 27 additions and 0 deletions
  1. +21
    -0
      modules/juce_audio_basics/mpe/juce_MPEZone.cpp
  2. +6
    -0
      modules/juce_audio_basics/mpe/juce_MPEZone.h

+ 21
- 0
modules/juce_audio_basics/mpe/juce_MPEZone.cpp View File

@@ -58,6 +58,27 @@ MPEZone::MPEZone (int masterChannel_,
checkAndLimitZoneParameters (0, 96, masterPitchbendRange);
}
MPEZone::MPEZone (const MPEZone& other) noexcept
: masterChannel (other.masterChannel),
numNoteChannels (other.numNoteChannels),
perNotePitchbendRange (other.perNotePitchbendRange),
masterPitchbendRange (other.masterPitchbendRange)
{
}
MPEZone& MPEZone::operator= (const MPEZone& other) noexcept
{
if (this != &other)
{
masterChannel = other.masterChannel;
numNoteChannels = other.numNoteChannels;
perNotePitchbendRange = other.perNotePitchbendRange;
masterPitchbendRange = other.masterPitchbendRange;
}
return *this;
}
//==============================================================================
int MPEZone::getMasterChannel() const noexcept
{


+ 6
- 0
modules/juce_audio_basics/mpe/juce_MPEZone.h View File

@@ -69,6 +69,12 @@ struct JUCE_API MPEZone
int perNotePitchbendRange = 48,
int masterPitchbendRange = 2) noexcept;
/** Copy constructor. */
MPEZone (const MPEZone& other) noexcept;
/** Copy assignment operator. */
MPEZone& operator= (const MPEZone& other) noexcept;
/* Returns the MIDI master channel number (in the range 1-16) of this zone. */
int getMasterChannel() const noexcept;


Loading…
Cancel
Save