{
using_flags = p;
locked_vm = false;
- #if 1 /* Note: Below are new sound driver. */
- m_sound_driver.reset(
- new SOUND_OUTPUT_MODULE::M_QT_MULTIMEDIA(this,
- nullptr,
- 48000,
- 100,
- 2,
- nullptr,
- 0));
- #else /* Note: */
+ #if 0 /* Note: Below are new sound driver. */
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
m_audioOutputDevice = QMediaDevices::defaultAudioOutput();
m_audioInputDevice = QMediaDevices::defaultAudioInput();
//m_audioOutputSink = std::shared_ptr<QAudioSink>(new QAudioSink(m_audioOutputDevice, m_audioOutputDevice.preferredFormat()));
m_audioOutputSink.reset(new QAudioSink(m_audioOutputDevice, m_audioOutputDevice.preferredFormat()));
- m_audioInputSource.reset();
#elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_audioOutputDevice = QAudioDeviceInfo::defaultOutputDevice();
m_audioInputDevice = QAudioDeviceInfo::defaultInputDevice();
m_audioOutputSink.reset(new QAudioOutput(m_audioOutputDevice, m_audioOutputDevice.preferredFormat()));
- m_audioInputSource.reset();
#endif
+ m_audioInputSource.reset();
//m_audioOutputSink->moveToThread(this->thread());
m_audioOutput = nullptr;
m_audioInput = nullptr;
is_glcontext_shared = false;
glContext = NULL;
+ #if 1 /* Note: Below are new sound driver. */
+ m_sound_driver.reset(
+ new SOUND_OUTPUT_MODULE::M_QT_MULTIMEDIA(this,
+ nullptr,
+ 48000,
+ 100,
+ 2,
+ nullptr,
+ 0));
+
+ #endif /* END Note: */
get_sound_device_list();
}
}
m_fileio.reset(new SOUND_BUFFER_QT(m_samples * (qint64)m_channels * sizeof(int16_t) * 4));
m_driver_fileio = m_fileio;
-
+ debug_log(_T("M_QT_MULTIMEDIA::%s status=%s"), __func__ , (m_config_ok) ? _T("OK") : _T("NG"));
return result;
}
#endif
}
}
+ debug_log(_T("M_QT_MULTIMEDIA::%s desired_driver=%s using=%s"), __func__ , driver_name, dest_device.description().toLocal8Bit().constData());
+
bool req_reinit = false;
if(dest_device != m_audioOutputDevice) {
req_reinit = true;
#endif
m_device_name = _tmpname.toLocal8Bit().toStdString();
m_config_ok = true;
+ req_restart = true;
} else {
m_device_name.clear();
m_config_ok = false;