mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +08:00
[AFV] Select audio device based on situational need
For AFV itself, a low latency device is required (which on Windows most likely will pick WASAPI). For notifications and effects, the most compatible device is required (which on Windows will most likely fall back to QWindowsAudio).
This commit is contained in:
committed by
Mat Sutcliffe
parent
18ec101391
commit
90e87835fc
@@ -12,6 +12,9 @@
|
||||
#define BLACKSOUND_AUDIOUTILITIES_H
|
||||
|
||||
#include "blacksound/blacksoundexport.h"
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
|
||||
#include <QAudioDeviceInfo>
|
||||
#include <QByteArray>
|
||||
#include <QVector>
|
||||
|
||||
@@ -24,6 +27,10 @@ namespace BlackSound
|
||||
BLACKSOUND_EXPORT QVector<float> convertFromMonoToStereo(const QVector<float> &mono);
|
||||
BLACKSOUND_EXPORT QVector<qint16> convertFromStereoToMono(const QVector<qint16> &stereo);
|
||||
BLACKSOUND_EXPORT QVector<float> convertFromShortToFloat(const QVector<qint16> &input);
|
||||
|
||||
BLACKSOUND_EXPORT QAudioDeviceInfo getLowestLatencyDevice(const BlackMisc::Audio::CAudioDeviceInfo &device, QAudioFormat &format);
|
||||
BLACKSOUND_EXPORT QAudioDeviceInfo getHighestCompatibleOutputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device, QAudioFormat &format);
|
||||
|
||||
//! @}
|
||||
} // ns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user