7.1 Surround Sound needs to be adjustable, and to select hdmi and or Interface channels.. {UI Example (Free))

Arduous

New Member
7.1 Surround Sound needs to be adjustable, and to select hdmi and or Interface channels.. {UI Example (Free))

the picture should be self-explanatory... i guess ignore the extra drop downs at the top...
Screenshot 2025-07-10 153710.png
 

Arduous

New Member
""""
import sys
from PyQt5.QtWidgets import (
QApplication, QWidget, QVBoxLayout, QHBoxLayout, QLabel,
QComboBox, QListWidget, QGroupBox
)
# Mock data
audio_modes = ["Stereo", "Mono", "5.1", "7.1"]
devices_71 = {
"Focusrite Scarlett 18i20": ["Input 1", "Input 2", "Input 3", "Input 4", "Input 5", "Input 6", "Input 7", "Input 8"],
"Behringer UMC1820": ["Input 1", "Input 2", "Input 3", "Input 4", "Input 5", "Input 6", "Input 7", "Input 8"],
"MOTU 828x": ["Mic 1", "Mic 2", "Line 3", "Line 4", "Line 5", "Line 6", "Line 7", "Line 8"]
}
class OBSMockup(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("OBS Mockup - Audio Settings")
self.setGeometry(100, 100, 600, 300)
self.init_ui()
def init_ui(self):
main_layout = QVBoxLayout()
# Audio Mode Selection
mode_group = QGroupBox("Audio Mode")
mode_layout = QHBoxLayout()
self.mode_combo = QComboBox()
self.mode_combo.addItems(audio_modes)
self.mode_combo.currentTextChanged.connect(self.on_mode_change)
mode_layout.addWidget(QLabel("Select Audio Mode:"))
mode_layout.addWidget(self.mode_combo)
mode_group.setLayout(mode_layout)
main_layout.addWidget(mode_group)
# Device Selection (only for 7.1)
self.device_group = QGroupBox("Device Selection")
device_layout = QHBoxLayout()
self.device_combo = QComboBox()
self.device_combo.addItems(list(devices_71.keys()))
self.device_combo.currentTextChanged.connect(self.on_device_change)
device_layout.addWidget(QLabel("Select Device:"))
device_layout.addWidget(self.device_combo)
self.device_group.setLayout(device_layout)
main_layout.addWidget(self.device_group)
# Mono Inputs Dropdown (sub-categorical)
self.inputs_group = QGroupBox("Mono Inputs")
inputs_layout = QHBoxLayout()
self.inputs_combo = QComboBox()
inputs_layout.addWidget(QLabel("Select Mono Input:"))
inputs_layout.addWidget(self.inputs_combo)
self.inputs_group.setLayout(inputs_layout)
main_layout.addWidget(self.inputs_group)
self.setLayout(main_layout)
self.update_visibility()
def on_mode_change(self, mode):
self.update_visibility()
def on_device_change(self, device):
self.inputs_combo.clear()
if device in devices_71:
self.inputs_combo.addItems(devices_71[device])
def update_visibility(self):
mode = self.mode_combo.currentText()
is_71 = mode == "7.1"
self.device_group.setVisible(is_71)
self.inputs_group.setVisible(is_71)
if is_71:
self.on_device_change(self.device_combo.currentText())

//// Dot Py


if __name__ == "__main__":
app = QApplication(sys.argv)
window = OBSMockup()
window.show()
sys.exit(app.exec_())
# ...existing code...
def on_device_selected(device):
available_modes = query_device_modes(device)
update_mode_dropdown(available_modes)

def on_mode_selected(mode):
if mode == "7.1 Surround":
channels = query_device_channels(selected_device)
update_channel_mapping_ui(channels)
# ...existing code... import sounddevice as sd

def get_surround_channels(device_index):
info = sd.query_devices(device_index)
channels = info['max_input_channels']
if channels >= 8:
# Standard 7.1 channel names
surround_channels = [
"Front Left", "Front Right", "Center", "LFE",
"Surround Left", "Surround Right",
"Rear Left", "Rear Right"
]
return surround_channels
return []

def on_device_selected(device_index):
channels = get_surround_channels(device_index)
if channels:
print("Detected 7.1 Surround Channels:")
for ch in channels:
print(ch)
else:
print("Device does not support 7.1 surround.")

# Example usage:
selected_device = 0 # Replace with actual device index from dropdown
on_device_selected(selected_device)
# ...existing code...

/// dot cpp

#include <iostream>
#include <vector>
#include <string>
#include "portaudio.h"

std::vector<std::string> getSurroundChannels(int deviceIndex) {
const PaDeviceInfo* info = Pa_GetDeviceInfo(deviceIndex);
if (info && info->maxInputChannels >= 8) {
return {
"Front Left", "Front Right", "Center", "LFE",
"Surround Left", "Surround Right",
"Rear Left", "Rear Right"
};
}
return {};
}

void onDeviceSelected(int deviceIndex) {
auto channels = getSurroundChannels(deviceIndex);
if (!channels.empty()) {
std::cout << "Detected 7.1 Surround Channels:\n";
for (const auto& ch : channels) {
std::cout << ch << std::endl;
}
} else {
std::cout << "Device does not support 7.1 surround.\n";
}
}

// Example usage:
// int selectedDevice = 0; // Replace with actual device index from dropdown
// onDeviceSelected(selectedDevice);
// ...existing code...

""""



//// some code you can have that might help you out... otherwise, I can't go much further with out trying to hard...
 
Top