提交 702804c0 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

Merge branch 'master' of git@gitcode.net:coloreaglestdio/taskbus.git

......@@ -110,25 +110,19 @@ void DialogSoundCard::InitMonitor()
mFormatSound.setCodec("audio/pcm"); //set codec as simple audio/pcm
mFormatSound.setSampleRate(ui->spinbox_sprate->value());
mFormatSound.setChannelCount(ui->spinbox_channels->value());
QAudioDeviceInfo infoIn;
//QAudioDeviceInfo infoOut(QAudioDeviceInfo::defaultOutputDevice());
QAudioDeviceInfo infoOut;
if (ui->comboBox_audioDevices->currentIndex()>=0 &&
ui->comboBox_audioDevices->currentIndex()<m_devOutputModule->rowCount())
infoIn = m_devOutputlist[ui->comboBox_audioDevices->currentIndex()];
infoOut = m_devOutputlist[ui->comboBox_audioDevices->currentIndex()];
else
infoIn = QAudioDeviceInfo::defaultInputDevice();
if (!infoIn.isFormatSupported(mFormatSound))
{
//Default format not supported - trying to use nearest
mFormatSound = infoIn.nearestFormat(mFormatSound);
}
QAudioDeviceInfo infoOut(QAudioDeviceInfo::defaultOutputDevice());
infoOut = QAudioDeviceInfo::defaultOutputDevice();
if (!infoOut.isFormatSupported(mFormatSound))
{
//Default format not supported - trying to use nearest
mFormatSound = infoOut.nearestFormat(mFormatSound);
//mFormatSound = infoOut.nearestFormat(mFormatSound);
}
CreateAudioOutput();
mpOutDevSound = mpAudioOutputSound->start();
connect(ui->horizontalSlider, SIGNAL(valueChanged(int)),
......
......@@ -118,14 +118,7 @@ void DialogSoundCard::InitMonitor()
if (!infoIn.isFormatSupported(mFormatSound))
{
//Default format not supported - trying to use nearest
mFormatSound = infoIn.nearestFormat(mFormatSound);
}
QAudioDeviceInfo infoOut(QAudioDeviceInfo::defaultOutputDevice());
if (!infoOut.isFormatSupported(mFormatSound))
{
//Default format not supported - trying to use nearest
mFormatSound = infoOut.nearestFormat(mFormatSound);
//mFormatSound = infoIn.nearestFormat(mFormatSound);
}
CreateAudioInput();
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册