|
45 | 45 | #define MOD_MONITOR_STEREO_HANDLING
|
46 | 46 | #endif
|
47 | 47 |
|
| 48 | +#if defined(_DARKGLASS_DEVICE_PABLITO) |
| 49 | +#define MOD_MONITOR_VOLUME_MUTE -60.f |
| 50 | +#define MOD_MONITOR_VOLUME_WAIT 0.02f |
| 51 | +#else |
| 52 | +#define MOD_MONITOR_VOLUME_MUTE -30.f |
| 53 | +#define MOD_MONITOR_VOLUME_WAIT 0.03f |
| 54 | +#endif |
| 55 | + |
48 | 56 | #if defined(_MOD_DEVICE_DUOX) || defined(_MOD_DEVICE_DWARF)
|
49 | 57 | #define MOD_IO_PROCESSING_ENABLED
|
50 | 58 | #endif
|
@@ -352,7 +360,8 @@ static int ProcessMonitor(jack_nframes_t nframes, void *arg)
|
352 | 360 |
|
353 | 361 | mon->apply_volume = floats_differ_enough(smooth_volume, 1.0f);
|
354 | 362 | mon->smooth_volume = smooth_volume;
|
355 |
| - mon->muted = smooth_volume <= db2lin(-30.f) || !floats_differ_enough(smooth_volume, db2lin(-30.0f)); |
| 363 | + mon->muted = smooth_volume <= db2lin(MOD_MONITOR_VOLUME_MUTE) || |
| 364 | + ! floats_differ_enough(smooth_volume, db2lin(MOD_MONITOR_VOLUME_MUTE)); |
356 | 365 |
|
357 | 366 | if (mon->wait_volume && fabsf(volume - smooth_volume) < 0.000001f)
|
358 | 367 | {
|
@@ -435,7 +444,7 @@ int jack_initialize(jack_client_t* client, const char* load_init)
|
435 | 444 | #elif defined(_MOD_DEVICE_DUOX)
|
436 | 445 | const uint32_t numports = mon->extra_active ? 4 : 2;
|
437 | 446 | #elif defined(_DARKGLASS_DEVICE_PABLITO)
|
438 |
| - const uint32_t numports = 2; |
| 447 | + const uint32_t numports = 6; |
439 | 448 | #else
|
440 | 449 | uint32_t numports = 0;
|
441 | 450 |
|
@@ -671,9 +680,10 @@ bool monitor_client_setup_volume(float volume)
|
671 | 680 |
|
672 | 681 | // local variables for calculations before changing the real struct values
|
673 | 682 | const float final_volume = db2lin(volume);
|
674 |
| - const float step_volume = fabsf(final_volume - mon->smooth_volume) / (0.03f * jack_get_sample_rate(mon->client)); |
| 683 | + const float step_volume = fabsf(final_volume - mon->smooth_volume) |
| 684 | + / (MOD_MONITOR_VOLUME_WAIT * jack_get_sample_rate(mon->client)); |
675 | 685 | const bool apply_volume = floats_differ_enough(final_volume, 1.0f);
|
676 |
| - const bool unmute = volume > -30.f; |
| 686 | + const bool unmute = volume > MOD_MONITOR_VOLUME_MUTE; |
677 | 687 |
|
678 | 688 | mon->volume = final_volume;
|
679 | 689 | mon->step_volume = step_volume;
|
|
0 commit comments