2 * FreeRDP: A Remote Desktop Protocol client.
3 * Audio Output Virtual Channel
5 * Copyright 2010-2011 Vic Lee
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #ifndef __RDPSND_MAIN_H
21 #define __RDPSND_MAIN_H
23 typedef struct rdpsnd_plugin rdpsndPlugin;
25 typedef struct rdpsnd_format rdpsndFormat;
30 uint32 nSamplesPerSec;
32 uint16 wBitsPerSample;
37 typedef struct rdpsnd_device_plugin rdpsndDevicePlugin;
39 typedef boolean (*pcFormatSupported) (rdpsndDevicePlugin* device, rdpsndFormat* format);
40 typedef void (*pcOpen) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency);
41 typedef void (*pcSetFormat) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency);
42 typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, uint32 value);
43 typedef void (*pcPlay) (rdpsndDevicePlugin* device, uint8* data, int size);
44 typedef void (*pcStart) (rdpsndDevicePlugin* device);
45 typedef void (*pcClose) (rdpsndDevicePlugin* device);
46 typedef void (*pcFree) (rdpsndDevicePlugin* device);
48 struct rdpsnd_device_plugin
50 pcFormatSupported FormatSupported;
52 pcSetFormat SetFormat;
53 pcSetVolume SetVolume;
60 #define RDPSND_DEVICE_EXPORT_FUNC_NAME "FreeRDPRdpsndDeviceEntry"
62 typedef void (*PREGISTERRDPSNDDEVICE)(rdpsndPlugin* rdpsnd, rdpsndDevicePlugin* device);
64 struct _FREERDP_RDPSND_DEVICE_ENTRY_POINTS
67 PREGISTERRDPSNDDEVICE pRegisterRdpsndDevice;
68 RDP_PLUGIN_DATA* plugin_data;
70 typedef struct _FREERDP_RDPSND_DEVICE_ENTRY_POINTS FREERDP_RDPSND_DEVICE_ENTRY_POINTS;
71 typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS;
73 typedef int (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints);
75 #endif /* __RDPSND_MAIN_H */