2 using System.Runtime.InteropServices;
4 namespace Tizen.Multimedia
6 internal static partial class Interop
8 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
9 internal delegate void SoundDeviceConnectionChangedCallback(IntPtr device, bool isConnected, IntPtr userData);
11 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
12 internal delegate void SoundDeviceStateChangedCallback(IntPtr device, AudioDeviceState changedState, IntPtr userData);
14 internal static partial class AudioDevice
16 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_list")]
17 internal static extern int GetCurrentDeviceList(AudioDeviceOptions deviceMask, out IntPtr deviceList);
19 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_free_device_list")]
20 internal static extern int FreeDeviceList(IntPtr deviceList);
22 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_next_device")]
23 internal static extern int GetNextDevice(IntPtr deviceList, out IntPtr device);
25 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_type")]
26 internal static extern int GetDeviceType(IntPtr device, out AudioDeviceType type);
28 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_io_direction")]
29 internal static extern int GetDeviceIoDirection(IntPtr device, out AudioDeviceIoDirection ioDirection);
31 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_id")]
32 internal static extern int GetDeviceId(IntPtr device, out int id);
34 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_name")]
35 internal static extern int GetDeviceName(IntPtr device, out IntPtr name);
37 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_state")]
38 internal static extern int GetDeviceState(IntPtr device, out AudioDeviceState state);
40 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_add_device_connection_changed_cb")]
41 internal static extern int AddDeviceConnectionChangedCallback(AudioDeviceOptions deviceMask, SoundDeviceConnectionChangedCallback callback, IntPtr userData, out int id);
43 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_remove_device_connection_changed_cb")]
44 internal static extern int RemoveDeviceConnectionChangedCallback(int id);
46 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_add_device_state_changed_cb")]
47 internal static extern int AddDeviceStateChangedCallback(AudioDeviceOptions deviceMask, SoundDeviceStateChangedCallback callback, IntPtr userData, out int id);
49 [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_remove_device_state_changed_cb")]
50 internal static extern int RemoveDeviceStateChangedCallback(int id);