本文整理汇总了C++中QAudioEngineFactoryInterface::createInput方法的典型用法代码示例。如果您正苦于以下问题:C++ QAudioEngineFactoryInterface::createInput方法的具体用法?C++ QAudioEngineFactoryInterface::createInput怎么用?C++ QAudioEngineFactoryInterface::createInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QAudioEngineFactoryInterface
的用法示例。
在下文中一共展示了QAudioEngineFactoryInterface::createInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createInputDevice
QAbstractAudioInput* QAudioDeviceFactory::createInputDevice(QAudioDeviceInfo const& deviceInfo, QAudioFormat const &format)
{
if (deviceInfo.isNull())
return new QNullInputDevice();
#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA))
if (deviceInfo.realm() == QLatin1String("builtin"))
return new QAudioInputPrivate(deviceInfo.handle(), format);
#endif
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
if (plugin)
return plugin->createInput(deviceInfo.handle(), format);
return new QNullInputDevice();
}
示例2: createInputDevice
QAbstractAudioInput* QAudioDeviceFactory::createInputDevice(QAudioDeviceInfo const& deviceInfo, QAudioFormat const &format)
{
if (deviceInfo.isNull())
return new QNullInputDevice();
#ifndef QT_NO_AUDIO_BACKEND
#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN))
if (deviceInfo.realm() == QLatin1String("builtin"))
return new QAudioInputPrivate(deviceInfo.handle(), format);
#endif
#endif
#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
if (plugin)
return plugin->createInput(deviceInfo.handle(), format);
#endif
return new QNullInputDevice();
}