mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-15 05:31:30 +00:00
Declines to set up audio output if none is available.
This commit is contained in:
parent
402f2ddbd9
commit
2d5e9bf1bb
@ -307,6 +307,7 @@ void MainWindow::launchMachine() {
|
||||
const auto speaker = audio_producer->get_speaker();
|
||||
if(speaker) {
|
||||
const QAudioDeviceInfo &defaultDeviceInfo = QAudioDeviceInfo::defaultOutputDevice();
|
||||
if(!defaultDeviceInfo.isNull()) {
|
||||
QAudioFormat idealFormat = defaultDeviceInfo.preferredFormat();
|
||||
|
||||
// Use the ideal format's sample rate, provide stereo as long as at least two channels
|
||||
@ -332,6 +333,7 @@ void MainWindow::launchMachine() {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set user-friendly default options.
|
||||
const auto machineType = targets[0]->machine;
|
||||
|
Loading…
x
Reference in New Issue
Block a user