Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sfzero/SFZReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ const char *sfzero::Reader::readPathInto(juce::String *pathOut, const char *pIn,
}
else
{
*pathOut = juce::String::empty;
*pathOut = juce::String();
}
return p;
}
Expand Down Expand Up @@ -546,11 +546,11 @@ int sfzero::Reader::triggerValue(const juce::String &str)
{
return sfzero::Region::release;
}
if (str == "first")
else if (str == "first")
{
return sfzero::Region::first;
}
if (str == "legato")
else if (str == "legato")
{
return sfzero::Region::legato;
}
Expand All @@ -563,15 +563,15 @@ int sfzero::Reader::loopModeValue(const juce::String &str)
{
return sfzero::Region::no_loop;
}
if (str == "one_shot")
else if (str == "one_shot")
{
return sfzero::Region::one_shot;
}
if (str == "loop_continuous")
else if (str == "loop_continuous")
{
return sfzero::Region::loop_continuous;
}
if (str == "loop_sustain")
else if (str == "loop_sustain")
{
return sfzero::Region::loop_sustain;
}
Expand Down
2 changes: 1 addition & 1 deletion sfzero/SFZSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ sfzero::Region *sfzero::Sound::regionAt(int index) { return regions_[index]; }

int sfzero::Sound::numSubsounds() { return 1; }

juce::String sfzero::Sound::subsoundName(int /*whichSubsound*/) { return juce::String::empty; }
juce::String sfzero::Sound::subsoundName(int /*whichSubsound*/) { return juce::String(); }

void sfzero::Sound::useSubsound(int /*whichSubsound*/) {}

Expand Down
4 changes: 2 additions & 2 deletions sfzero/SFZSound.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Sample;
class Sound : public juce::SynthesiserSound
{
public:
explicit Sound(const juce::File &file);
Sound(const juce::File &file);
virtual ~Sound();

typedef juce::ReferenceCountedObjectPtr<Sound> Ptr;
Expand All @@ -26,7 +26,7 @@ class Sound : public juce::SynthesiserSound
bool appliesToChannel(int midiChannel) override;

void addRegion(Region *region); // Takes ownership of the region.
Sample *addSample(juce::String path, juce::String defaultPath = juce::String::empty);
Sample *addSample(juce::String path, juce::String defaultPath = juce::String());
void addError(const juce::String &message);
void addUnsupportedOpcode(const juce::String &opcode);

Expand Down
4 changes: 2 additions & 2 deletions sfzero/SFZSynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void sfzero::Synth::noteOn(int midiChannel, int midiNoteNumber, float velocity)
// First, stop any currently-playing sounds in the group.
//*** Currently, this only pays attention to the first matching region.
int group = 0;
sfzero::Sound *sound = dynamic_cast<sfzero::Sound *>(getSound(0));
sfzero::Sound *sound = dynamic_cast<sfzero::Sound *>(getSound(0).get());

if (sound)
{
Expand Down Expand Up @@ -107,7 +107,7 @@ void sfzero::Synth::noteOff(int midiChannel, int midiNoteNumber, float velocity,
Synthesiser::noteOff(midiChannel, midiNoteNumber, velocity, allowTailOff);

// Start release region.
sfzero::Sound *sound = dynamic_cast<sfzero::Sound *>(getSound(0));
sfzero::Sound *sound = dynamic_cast<sfzero::Sound *>(getSound(0).get());
if (sound)
{
sfzero::Region *region = sound->getRegionFor(midiNoteNumber, noteVelocities_[midiNoteNumber], sfzero::Region::release);
Expand Down