forked from microsoft/Xbox-ATG-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ISACRenderer.h
47 lines (33 loc) · 1.31 KB
/
ISACRenderer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//--------------------------------------------------------------------------------------
// ISACRenderer.h
//
// Advanced Technology Group (ATG)
// Copyright (C) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#include "SpatialAudioClient.h"
#include <mmdeviceapi.h>
#pragma once
// Primary ISAC Renderering Class
class ISACRenderer :
public Microsoft::WRL::RuntimeClass< Microsoft::WRL::RuntimeClassFlags< Microsoft::WRL::ClassicCom >, Microsoft::WRL::FtmBase, IActivateAudioInterfaceCompletionHandler >
{
public:
enum RenderState {
Inactive = 0,
Active,
Resetting
};
ISACRenderer();
HRESULT InitializeAudioDeviceAsync();
bool IsActive() { return m_ISACrenderstate == RenderState::Active; };
bool IsResetting() { return m_ISACrenderstate == RenderState::Resetting; }
void Reset() { m_ISACrenderstate = RenderState::Resetting; }
STDMETHOD(ActivateCompleted)( IActivateAudioInterfaceAsyncOperation *operation );
Microsoft::WRL::ComPtr<ISpatialAudioObjectRenderStream> m_SpatialAudioStream;
HANDLE m_bufferCompletionEvent;
private:
~ISACRenderer();
Platform::String^ m_DeviceIdString;
RenderState m_ISACrenderstate;
Microsoft::WRL::ComPtr<ISpatialAudioClient> m_SpatialAudioClient;
};