Skip to content

Commit

Permalink
Merge branch 'master' of asb2m10/dexed (updated) into 3_alignedbuf_de…
Browse files Browse the repository at this point in the history
…xedtheme
  • Loading branch information
FulopNandor committed Jul 16, 2024
2 parents a9b9277 + 971f695 commit 08dae46
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 17 deletions.
12 changes: 3 additions & 9 deletions Source/PluginData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,12 @@ void Cartridge::packProgram(uint8_t *src, int idx, String name, char *opSwitch)
* This function normalize data that comes from corrupted sysex.
* It used to avoid engine crashing upon extreme values
*/
char normparm(char value, char max, int id) {
if ( value <= max && value >= 0 )
uint8_t normparm(uint8_t value, char max, int id) {
if ( value <= max )
return value;

// if this is beyond the max, we expect a 0-255 range, normalize this
// to the expected return value; and this value as a random data.

value = abs(value);

char v = ((float)value)/255 * max;

return v;
return ((float)value)/255 * max;
}

void Cartridge::unpackProgram(uint8_t *unpackPgm, int idx) {
Expand Down
8 changes: 4 additions & 4 deletions Source/PluginProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ enum DexedEngineResolution {
};

/// Maximum allowed size for SCL and KBM files.
/// (COMMENT: Since none of the 5175 .scl files in the Scala archive
/// at https://www.huygens-fokker.org/scala/downloads.html#scales
/// exceed 6 KB (in 25th Mar 2024), a maximum size of 16 KB appears
/// (COMMENT: Since none of the 5175 .scl files in the Scala archive
/// at https://www.huygens-fokker.org/scala/downloads.html#scales
/// exceed 6 KB (in 25th Mar 2024), a maximum size of 16 KB appears
/// to be a practical choice.)
const int MAX_SCL_KBM_FILE_SIZE = 16384;

Expand Down Expand Up @@ -129,7 +129,7 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public
EngineOpl engineOpl;

char clipboard[161];
char clipboardContent;
signed char clipboardContent;

void resolvAppDir();

Expand Down
2 changes: 1 addition & 1 deletion libs/JUCE
Submodule JUCE updated 470 files
2 changes: 1 addition & 1 deletion libs/MTS-ESP
2 changes: 1 addition & 1 deletion libs/vst3sdk

0 comments on commit 08dae46

Please sign in to comment.