mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
Fix audio tab not supporting mono audio output. (#145)
This commit is contained in:
parent
59d8fb5d28
commit
1a4724ff21
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include <QSpinBox>
|
||||
#include <limits>
|
||||
|
||||
#include "switch-generic.hpp"
|
||||
#include "volume-control.hpp"
|
||||
|
|
@ -20,7 +21,7 @@ struct AudioSwitch : virtual SceneSwitcherEntry {
|
|||
double duration = 0;
|
||||
bool ignoreInactiveSource = true;
|
||||
unsigned int matchCount = 0;
|
||||
float peak = -1;
|
||||
float peak = -std::numeric_limits<float>::infinity();
|
||||
obs_volmeter_t *volmeter = nullptr;
|
||||
|
||||
const char *getType() { return "audio"; }
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ void AudioSwitch::setVolumeLevel(void *data,
|
|||
UNUSED_PARAMETER(inputPeak);
|
||||
AudioSwitch *s = static_cast<AudioSwitch *>(data);
|
||||
|
||||
for (int i = 1; i < MAX_AUDIO_CHANNELS; i++) {
|
||||
for (int i = 0; i < MAX_AUDIO_CHANNELS; i++) {
|
||||
if (peak[i] > s->peak) {
|
||||
s->peak = peak[i];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user