FreeRDP
mf_rdpsnd.h
1 
20 #ifndef FREERDP_SERVER_MAC_RDPSND_H
21 #define FREERDP_SERVER_MAC_RDPSND_H
22 
23 #include <CoreAudio/CoreAudio.h>
24 #include <AudioToolbox/AudioToolbox.h>
25 
26 #include <freerdp/freerdp.h>
27 #include <freerdp/listener.h>
28 #include <freerdp/server/rdpsnd.h>
29 
30 #include "mf_types.h"
31 #include "mfreerdp.h"
32 
33 void mf_rdpsnd_derive_buffer_size(AudioQueueRef audioQueue,
34  AudioStreamBasicDescription* ASBDescription, Float64 seconds,
35  UInt32* outBufferSize);
36 
37 void mf_peer_rdpsnd_input_callback(void* inUserData, AudioQueueRef inAQ,
38  AudioQueueBufferRef inBuffer, const AudioTimeStamp* inStartTime,
39  UInt32 inNumberPacketDescriptions,
40  const AudioStreamPacketDescription* inPacketDescs);
41 
42 #define SND_NUMBUFFERS 3
43 typedef struct
44 {
45  AudioStreamBasicDescription dataFormat;
46  AudioQueueRef queue;
47  AudioQueueBufferRef buffers[SND_NUMBUFFERS];
48  AudioFileID audioFile;
49  UInt32 bufferByteSize;
50  SInt64 currentPacket;
51  bool isRunning;
52  RdpsndServerContext* snd_context;
54 
55 BOOL mf_peer_rdpsnd_init(mfPeerContext* context);
56 BOOL mf_peer_rdpsnd_stop(void);
57 
58 #endif /* FREERDP_SERVER_MAC_RDPSND_H */