AR: SR_DMTYPE=254 => UDP sound receive only (experimental)
additional dmtype = 254 "driver" that keeps AR enabled in "sound sync only" mode.
This commit is contained in:
@@ -1235,16 +1235,24 @@ class AudioReactive : public Usermod {
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
case 254: // dummy "network receive only" mode
|
||||||
|
if (audioSource) delete audioSource; audioSource = nullptr;
|
||||||
|
disableSoundProcessing = true;
|
||||||
|
audioSyncEnabled = 2; // force udp sound receive mode
|
||||||
|
enabled = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case 255: // 255 = -1 = no audio source
|
case 255: // 255 = -1 = no audio source
|
||||||
// falls through to default
|
// falls through to default
|
||||||
default:
|
default:
|
||||||
if (audioSource) delete audioSource; audioSource = nullptr;
|
if (audioSource) delete audioSource; audioSource = nullptr;
|
||||||
|
disableSoundProcessing = true;
|
||||||
enabled = false;
|
enabled = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
delay(250); // give microphone enough time to initialise
|
delay(250); // give microphone enough time to initialise
|
||||||
|
|
||||||
if (!audioSource) enabled = false; // audio failed to initialise
|
if (!audioSource && (dmType != 254)) enabled = false;// audio failed to initialise
|
||||||
#endif
|
#endif
|
||||||
if (enabled) onUpdateBegin(false); // create FFT task, and initialize network
|
if (enabled) onUpdateBegin(false); // create FFT task, and initialize network
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user