Missed one consideration when handling MI/II EFX presets
This commit is contained in:
parent
a9e2cd8e5e
commit
74408f8715
1 changed files with 50 additions and 34 deletions
22
mustang.cpp
22
mustang.cpp
|
|
@ -107,6 +107,10 @@ Mustang::handleInput( void ) {
|
|||
if ( 0==memcmp(read_buf,state_prefix,2) ) {
|
||||
// Only care about amp state messages, and not even all of them...
|
||||
int dsp_category = read_buf[2];
|
||||
|
||||
// 0 = AMP preset / DSP state, 1 = MI/II Mod preset, 2 = MI/II Delay/Reverb preset
|
||||
int preset_category = read_buf[3];
|
||||
|
||||
switch( dsp_category ) {
|
||||
// Response for DSP data and/or patch-change
|
||||
//
|
||||
|
|
@ -122,9 +126,6 @@ Mustang::handleInput( void ) {
|
|||
case 0x04:
|
||||
{
|
||||
// PRESET NAME
|
||||
// 0 = Amp preset, 1 = Mod preset, 2 = Delay/Reverb preset
|
||||
int preset_category = read_buf[3];
|
||||
|
||||
// Rank within preset category
|
||||
int idx = read_buf[4];
|
||||
|
||||
|
|
@ -152,6 +153,9 @@ Mustang::handleInput( void ) {
|
|||
case 0x05:
|
||||
{
|
||||
// AMP
|
||||
if ( 0==preset_category ) {
|
||||
// (Don't want MI/II preset data here)
|
||||
|
||||
// DSP parms (make 0x05..0x0a normal to zero)
|
||||
int idx = dsp_category - 5;
|
||||
pthread_mutex_lock( &dsp_sync[idx].lock );
|
||||
|
|
@ -160,11 +164,13 @@ Mustang::handleInput( void ) {
|
|||
updateAmpObj( read_buf );
|
||||
|
||||
pthread_mutex_unlock( &dsp_sync[idx].lock );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x06:
|
||||
{
|
||||
// STOMP
|
||||
if ( 0==preset_category ) {
|
||||
int idx = dsp_category - 5;
|
||||
pthread_mutex_lock( &dsp_sync[idx].lock );
|
||||
|
||||
|
|
@ -172,11 +178,13 @@ Mustang::handleInput( void ) {
|
|||
updateStompObj( read_buf );
|
||||
|
||||
pthread_mutex_unlock( &dsp_sync[idx].lock );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x07:
|
||||
{
|
||||
// MOD
|
||||
if ( 0==preset_category ) {
|
||||
int idx = dsp_category - 5;
|
||||
pthread_mutex_lock( &dsp_sync[idx].lock );
|
||||
|
||||
|
|
@ -184,11 +192,13 @@ Mustang::handleInput( void ) {
|
|||
updateModObj( read_buf );
|
||||
|
||||
pthread_mutex_unlock( &dsp_sync[idx].lock );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x08:
|
||||
{
|
||||
// DELAY
|
||||
if ( 0==preset_category ) {
|
||||
int idx = dsp_category - 5;
|
||||
pthread_mutex_lock( &dsp_sync[idx].lock );
|
||||
|
||||
|
|
@ -196,11 +206,13 @@ Mustang::handleInput( void ) {
|
|||
updateDelayObj( read_buf );
|
||||
|
||||
pthread_mutex_unlock( &dsp_sync[idx].lock );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x09:
|
||||
{
|
||||
// REVERB
|
||||
if ( 0==preset_category ) {
|
||||
int idx = dsp_category - 5;
|
||||
pthread_mutex_lock( &dsp_sync[idx].lock );
|
||||
|
||||
|
|
@ -208,11 +220,15 @@ Mustang::handleInput( void ) {
|
|||
updateReverbObj( read_buf );
|
||||
|
||||
pthread_mutex_unlock( &dsp_sync[idx].lock );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x0a:
|
||||
{
|
||||
// EXP PEDAL
|
||||
// (No need to guard for MI/II EFX preset here, since they
|
||||
// do not support pedals)
|
||||
//
|
||||
int idx = dsp_category - 5;
|
||||
pthread_mutex_lock( &dsp_sync[idx].lock );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue