HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
WinAudioBase.h
Go to the documentation of this file.
1#pragma once
2#if defined(_WIN32)
3#include "HephAudioShared.h"
4#include "NativeAudio.h"
7#include "StringHelpers.h"
8#include <wrl.h>
9#include <mmeapi.h>
10#include <mmreg.h>
11#include <comdef.h>
12
15namespace HephAudio
16{
17 namespace Native
18 {
24 {
25 public:
28
29 WinAudioBase(const WinAudioBase&) = delete;
30 WinAudioBase& operator=(const WinAudioBase&) = delete;
31
33 virtual ~WinAudioBase() = default;
34
35 protected:
40 void InitializeCOM() const;
41
46 static AudioFormatInfo WFX2AFI(const WAVEFORMATEXTENSIBLE& wfx);
47
52 static WAVEFORMATEXTENSIBLE AFI2WFX(const AudioFormatInfo& afi);
53
58 static std::string GetComErrorMessage(HRESULT hr);
59 };
60 }
61}
62#endif
#define HEPH_API
Definition HephShared.h:132
base class for the classes that interact with the native audio APIs.
Definition NativeAudio.h:28
base class for classes that interact with the Windows audio APIs.
Definition WinAudioBase.h:24
static std::string GetComErrorMessage(HRESULT hr)
static AudioFormatInfo WFX2AFI(const WAVEFORMATEXTENSIBLE &wfx)
static WAVEFORMATEXTENSIBLE AFI2WFX(const AudioFormatInfo &afi)
virtual ~WinAudioBase()=default
stores the properties of the audio signals
Definition AudioFormatInfo.h:20