24class QOhosAudioDevices :
public QPlatformAudioDevices
28 ~QOhosAudioDevices() override;
30 QPlatformAudioSource *createAudioSource(
const QAudioDevice &,
const QAudioFormat &,
31 QObject *parent) override;
32 QPlatformAudioSink *createAudioSink(
const QAudioDevice &,
const QAudioFormat &,
33 QObject *parent) override;
35 QLatin1String backendName()
const override {
return QLatin1String{
"OHAudio" }; }
36 bool hasCallbackApi()
const override {
return true; }
39 QList<QAudioDevice> findAudioInputs()
const override;
40 QList<QAudioDevice> findAudioOutputs()
const override;
43 void registerDeviceChangeCallbacks();
44 void unregisterDeviceChangeCallbacks();
46 static int32_t onInputDevicesChanged(OH_AudioDevice_ChangeType type,
47 OH_AudioDeviceDescriptorArray *devices);
48 static int32_t onOutputDevicesChanged(OH_AudioDevice_ChangeType type,
49 OH_AudioDeviceDescriptorArray *devices);
51 bool m_deviceChangeCallbacksRegistered =
false;