/* Copyright (C) 2019 * swift project Community / Contributors * * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level * directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated, * or distributed except according to the terms contained in the LICENSE file. */ //! \file #ifndef BLACKSOUND_AUDIOUTILITIES_H #define BLACKSOUND_AUDIOUTILITIES_H #include "blacksound/blacksoundexport.h" #include "blackmisc/audio/audiodeviceinfo.h" #include #include #include namespace BlackSound { //! Conversion functions @{ BLACKSOUND_EXPORT QVector convertBytesTo32BitFloatPCM(const QByteArray input); BLACKSOUND_EXPORT QVector convertBytesTo16BitPCM(const QByteArray input); BLACKSOUND_EXPORT QVector convertFloatBytesTo16BitPCM(const QByteArray input); BLACKSOUND_EXPORT QVector convertFromMonoToStereo(const QVector &mono); BLACKSOUND_EXPORT QVector convertFromStereoToMono(const QVector &stereo); BLACKSOUND_EXPORT QVector convertFromShortToFloat(const QVector &input); BLACKSOUND_EXPORT QAudioDeviceInfo getLowestLatencyDevice(const BlackMisc::Audio::CAudioDeviceInfo &device, QAudioFormat &format); BLACKSOUND_EXPORT QAudioDeviceInfo getHighestCompatibleOutputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device, QAudioFormat &format); BLACKSOUND_EXPORT QString toQString(const QAudioFormat &format); BLACKSOUND_EXPORT const QString &toQString(QAudioFormat::Endian e); BLACKSOUND_EXPORT const QString &toQString(QAudioFormat::SampleType s); //! @} } // ns #endif // guard