-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathBackEndAudio.h
More file actions
executable file
·78 lines (61 loc) · 2.28 KB
/
Copy pathBackEndAudio.h
File metadata and controls
executable file
·78 lines (61 loc) · 2.28 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// This is the source code of Telegram for Windows Phone v. 3.x.x.
// It is licensed under GNU GPL v. 2 or later.
// You should have received a copy of the license in this archive (see LICENSE).
//
// Copyright Evgeny Nadymov, 2013-present.
//
#pragma once
#include "windows.h"
#define MAX_RAW_BUFFER_SIZE 1024*128
#include <synchapi.h>
#include <audioclient.h>
#include <phoneaudioclient.h>
#include "BackEndTransport.h"
namespace PhoneVoIPApp
{
namespace BackEnd
{
//public ref class BackEndAudio sealed
//{
//public:
// // Constructor
// BackEndAudio();
// // Destructor
// virtual ~BackEndAudio();
// void SetTransport(BackEndTransport^ transport);
//
// void Start();
// void Stop();
//private:
// HRESULT InitRender();
// HRESULT InitCapture();
// HRESULT StartAudioThreads();
// void CaptureThread(Windows::Foundation::IAsyncAction^ operation);
// void OnTransportMessageReceived(Windows::Storage::Streams::IBuffer^ stream, UINT64, UINT64);
//
// BackEndTransport^ transportController;
// PhoneVoIPApp::BackEnd::MessageReceivedEventHandler^ onTransportMessageReceivedHandler;
// Windows::Foundation::EventRegistrationToken onTransportMessageReceivedHandlerToken;
// int m_sourceFrameSizeInBytes;
// WAVEFORMATEX* m_pwfx;
// // Devices
// IAudioClient2* m_pDefaultRenderDevice;
// IAudioClient2* m_pDefaultCaptureDevice;
// // Actual render and capture objects
// IAudioRenderClient* m_pRenderClient;
// IAudioCaptureClient* m_pCaptureClient;
// // Misc interfaces
// IAudioClock* m_pClock;
// ISimpleAudioVolume* m_pVolume;
// // Audio buffer size
// UINT32 m_nMaxFrameCount;
// HANDLE hCaptureEvent;
// // Event for stopping audio capture/render
// HANDLE hShutdownEvent;
// Windows::Foundation::IAsyncAction^ m_CaptureThread;
// // Has audio started?
// bool started;
//};
}
}