Browse Source

ensured breaks in switch cases

tags/v1.9.9
HeyCitizen 6 years ago
parent
commit
a671765e72
1 changed files with 10 additions and 7 deletions
  1. +10
    -7
      source/native-plugins/midi-transpose.c

+ 10
- 7
source/native-plugins/midi-transpose.c View File

@@ -26,7 +26,6 @@ typedef struct {
const NativeHostDescriptor* host;
int octaves;
int semitones;
bool invert;
} MidiTransposeHandle;

// -----------------------------------------------------------------------
@@ -101,11 +100,13 @@ static float miditranspose_get_parameter_value(NativePluginHandle handle, uint32
switch (index)
{
case 0:
return (float)handlePtr->octaves;
return (float)handlePtr->octaves;
break;
case 1:
return (float)handlePtr->semitones;
return (float)handlePtr->semitones;
break;
default:
return 0.0f;
return 0.0f;
}
}

@@ -114,11 +115,13 @@ static void miditranspose_set_parameter_value(NativePluginHandle handle, uint32_
switch (index)
{
case 0:
handlePtr->octaves = (int)value;
handlePtr->octaves = (int)value;
break;
case 1:
handlePtr->semitones = (int)value;
handlePtr->semitones = (int)value;
break;
default:
return;
return;
}

}


Loading…
Cancel
Save