Skip to content

Commit cf9b995

Browse files
committed
win-asio: Enable monitoring track for output
This enables a monitoring track for output. Signed-off-by: pkv <[email protected]>
1 parent ec1a4d7 commit cf9b995

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

plugins/win-asio/data/locale/en-US.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,11 @@ Track5.4=" Track 6 Channel 5"
100100
Track5.5=" Track 6 Channel 6"
101101
Track5.6=" Track 6 Channel 7"
102102
Track5.7=" Track 6 Channel 8"
103+
Track6.0=" Monitoring Track Channel 1"
104+
Track6.1=" Monitoring Track Channel 2"
105+
Track6.2=" Monitoring Track Channel 3"
106+
Track6.3=" Monitoring Track Channel 4"
107+
Track6.4=" Monitoring Track Channel 5"
108+
Track6.5=" Monitoring Track Channel 6"
109+
Track6.6=" Monitoring Track Channel 7"
110+
Track6.7=" Monitoring Track Channel 8"

plugins/win-asio/win-asio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static void asio_output_update(void *vptr, obs_data_t *settings)
595595
data->asio_device->obs_track[i] = -1; // device does not use track i
596596
data->asio_device->obs_track_channel[i] = -1; // device does not use any channel from track i
597597
if (data->out_mix_channels[i] >= 0) {
598-
for (int j = 0; j < MAX_AUDIO_MIXES; j++) {
598+
for (int j = 0; j < MAX_AUDIO_MIXES_NEW; j++) {
599599
for (int k = 0; k < data->obs_track_channels; k++) {
600600
int64_t idx = (int64_t)k + (1LL << (j + 4));
601601
if (data->out_mix_channels[i] == idx) {
@@ -633,8 +633,8 @@ static void *asio_output_create(obs_data_t *settings, obs_output_t *output)
633633
for (int i = 0; i < MAX_DEVICE_CHANNELS; i++)
634634
data->out_mix_channels[i] = -1;
635635

636-
// allow all tracks for asio output
637-
obs_output_set_mixers(output, (1 << 6) - 1);
636+
// allow all tracks for asio output + extra monitoring track
637+
obs_output_set_mixers(output, (1 << 7) - 1);
638638

639639
os_atomic_set_bool(&data->active, true);
640640
os_atomic_set_bool(&data->stopping, false);
@@ -801,7 +801,7 @@ static bool on_asio_output_device_changed(void *priv, obs_properties_t *props, o
801801
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
802802
obs_property_set_long_description(p, obs_module_text("ASIO.Output.Hint"));
803803
obs_property_list_add_int(p, obs_module_text("Mute"), -1);
804-
for (int j = 0; j < MAX_AUDIO_MIXES; j++) {
804+
for (int j = 0; j < MAX_AUDIO_MIXES_NEW; j++) {
805805
for (int k = 0; k < global_output_asio_data->obs_track_channels; k++) {
806806
long long idx = k + (1ULL << (j + 4));
807807
char label[32];

0 commit comments

Comments
 (0)