FreeRDP
tsmf_audio.h
1 
20 #ifndef FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
21 #define FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
22 
23 #include "tsmf_types.h"
24 
25 typedef struct s_ITSMFAudioDevice ITSMFAudioDevice;
26 
28 {
29  /* Open the audio device. */
30  BOOL (*Open)(ITSMFAudioDevice* audio, const char* device);
31  /* Set the audio data format. */
32  BOOL(*SetFormat)
33  (ITSMFAudioDevice* audio, UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample);
34  /* Play audio data. */
35  BOOL (*Play)(ITSMFAudioDevice* audio, const BYTE* data, UINT32 data_size);
36  /* Get the latency of the last written sample, in 100ns */
37  UINT64 (*GetLatency)(ITSMFAudioDevice* audio);
38  /* Change the playback volume level */
39  BOOL (*ChangeVolume)(ITSMFAudioDevice* audio, UINT32 newVolume, UINT32 muted);
40  /* Flush queued audio data */
41  BOOL (*Flush)(ITSMFAudioDevice* audio);
42  /* Free the audio device */
43  void (*Free)(ITSMFAudioDevice* audio);
44 };
45 
46 #define TSMF_AUDIO_DEVICE_EXPORT_FUNC_NAME "TSMFAudioDeviceEntry"
47 typedef UINT(VCAPITYPE* TSMF_AUDIO_DEVICE_ENTRY)(ITSMFAudioDevice** dev);
48 
49 ITSMFAudioDevice* tsmf_load_audio_device(const char* name, const char* device);
50 
51 #endif /* FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H */