using System; using MaplayWrapper; namespace MaplayWrapper.Plugin { [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct MAP_PLUGIN_EQ { /// BOOL->int [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)] public bool bEnable; /// int public int nPreamp; // 0 - 64 (center: 31) /// int[10] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = System.Runtime.InteropServices.UnmanagedType.I4)] public int[] nEq; // 0 - 64 (center: 31) } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct MAP_PLUGIN_FILE_INFO { /// int public int nChannels; /// int public int nSampleRate; /// int public int nBitsPerSample; /// int public int nAvgBitrate; /// int public int nDuration; } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct MAP_PLUGIN_STREMING_INFO { /// int public int nChannels; /// int public int nSampleRate; /// int public int nBitsPerSample; /// int public int nAvgBitrate; } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Auto)] public struct MAP_PLUGIN_FILETAG { /// TCHAR[255] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 255)] public string szTrack; /// TCHAR[255] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 255)] public string szArtist; /// TCHAR[255] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 255)] public string szAlbum; /// TCHAR[255] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 255)] public string szComment; /// TCHAR[255] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 255)] public string szGenre; /// int public int nYear; /// int public int nTrackNum; } /* /// Return Type: void public delegate void _MAP_DEC_PLUGIN_Init(); /// Return Type: void public delegate void _MAP_DEC_PLUGIN_Quit(); /// Return Type: DWORD->unsigned int public delegate uint _MAP_DEC_PLUGIN_GetFunc(); /// Return Type: BOOL->int ///pszName: LPTSTR->LPWSTR->WCHAR* public delegate int _MAP_DEC_PLUGIN_GetPluginName([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)] System.Text.StringBuilder pszName); /// Return Type: BOOL->int ///pEQ: MAP_PLUGIN_EQ* public delegate int _MAP_DEC_PLUGIN_SetEqualizer(ref MAP_PLUGIN_EQ pEQ); /// Return Type: void ///hwndParent: HWND->HWND__* public delegate void _MAP_DEC_PLUGIN_ShowConfigDlg(System.IntPtr hwndParent); /// Return Type: BOOL->int public delegate int _MAP_DEC_PLUGIN_GetFileExtCount(); /// Return Type: BOOL->int ///nIndex: int ///pszExt: LPTSTR->LPWSTR->WCHAR* ///pszExtDesc: LPTSTR->LPWSTR->WCHAR* public delegate int _MAP_DEC_PLUGIN_GetFileExt(int nIndex, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)] System.Text.StringBuilder pszExt, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)] System.Text.StringBuilder pszExtDesc); /// Return Type: BOOL->int ///pszFile: LPCTSTR->LPCWSTR->WCHAR* public delegate int _MAP_DEC_PLUGIN_IsValidFile([System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPTStr)] string pszFile); /// Return Type: BOOL->int ///pszFile: LPCTSTR->LPCWSTR->WCHAR* ///pInfo: MAP_PLUGIN_FILE_INFO* public delegate int _MAP_DEC_PLUGIN_OpenFile([System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPTStr)] string pszFile, ref MAP_PLUGIN_FILE_INFO pInfo); /// Return Type: int ///lTime: int public delegate int _MAP_DEC_PLUGIN_SeekFile(int lTime); /// Return Type: BOOL->int public delegate int _MAP_DEC_PLUGIN_StartDecodeFile(); /// Return Type: int ///pHdr: WAVEHDR* public delegate int _MAP_DEC_PLUGIN_DecodeFile(ref WAVEHDR pHdr); /// Return Type: void public delegate void _MAP_DEC_PLUGIN_StopDecodeFile(); /// Return Type: void public delegate void _MAP_DEC_PLUGIN_CloseFile(); /// Return Type: BOOL->int ///pTag: MAP_PLUGIN_FILETAG* public delegate int _MAP_DEC_PLUGIN_GetTag(ref MAP_PLUGIN_FILETAG pTag); /// Return Type: BOOL->int ///pszFile: LPCTSTR->LPCWSTR->WCHAR* ///pTag: MAP_PLUGIN_FILETAG* public delegate int _MAP_DEC_PLUGIN_GetFileTag([System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPTStr)] string pszFile, ref MAP_PLUGIN_FILETAG pTag); /// Return Type: BOOL->int ///pbBuf: LPBYTE->BYTE* ///cbBuf: DWORD->unsigned int ///pInfo: MAP_PLUGIN_STREMING_INFO* public delegate int _MAP_DEC_PLUGIN_OpenStreaming(ref byte pbBuf, uint cbBuf, ref MAP_PLUGIN_STREMING_INFO pInfo); /// Return Type: int ///pbInBuf: LPBYTE->BYTE* ///cbInBuf: DWORD->unsigned int ///pcbInUsed: DWORD* ///pHdr: WAVEHDR* public delegate int _MAP_DEC_PLUGIN_DecodeStreaming(ref byte pbInBuf, uint cbInBuf, ref uint pcbInUsed, ref WAVEHDR pHdr); /// Return Type: void public delegate void _MAP_DEC_PLUGIN_CloseStreaming(); * * */ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] /*unsafe*/ public struct _MAP_DEC_PLUGIN { /// DWORD->unsigned int public uint dwVersion; /// DWORD->unsigned int public uint dwChar; /// DWORD->unsigned int public uint dwUser; /* /// _MAP_DEC_PLUGIN_Init [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.FunctionPtr)] public _MAP_DEC_PLUGIN_Init Init; /// _MAP_DEC_PLUGIN_Quit public _MAP_DEC_PLUGIN_Quit Quit; /// _MAP_DEC_PLUGIN_GetFunc public _MAP_DEC_PLUGIN_GetFunc GetFunc; /// _MAP_DEC_PLUGIN_GetPluginName public _MAP_DEC_PLUGIN_GetPluginName GetPluginName; /// _MAP_DEC_PLUGIN_SetEqualizer public _MAP_DEC_PLUGIN_SetEqualizer SetEqualizer; /// _MAP_DEC_PLUGIN_ShowConfigDlg public _MAP_DEC_PLUGIN_ShowConfigDlg ShowConfigDlg; /// _MAP_DEC_PLUGIN_GetFileExtCount public _MAP_DEC_PLUGIN_GetFileExtCount GetFileExtCount; /// _MAP_DEC_PLUGIN_GetFileExt public _MAP_DEC_PLUGIN_GetFileExt GetFileExt; /// _MAP_DEC_PLUGIN_IsValidFile public _MAP_DEC_PLUGIN_IsValidFile IsValidFile; /// _MAP_DEC_PLUGIN_OpenFile public _MAP_DEC_PLUGIN_OpenFile OpenFile; /// _MAP_DEC_PLUGIN_SeekFile public _MAP_DEC_PLUGIN_SeekFile SeekFile; /// _MAP_DEC_PLUGIN_StartDecodeFile public _MAP_DEC_PLUGIN_StartDecodeFile StartDecodeFile; /// _MAP_DEC_PLUGIN_DecodeFile public _MAP_DEC_PLUGIN_DecodeFile DecodeFile; /// _MAP_DEC_PLUGIN_StopDecodeFile public _MAP_DEC_PLUGIN_StopDecodeFile StopDecodeFile; /// _MAP_DEC_PLUGIN_CloseFile public _MAP_DEC_PLUGIN_CloseFile CloseFile; /// _MAP_DEC_PLUGIN_GetTag public _MAP_DEC_PLUGIN_GetTag GetTag; /// _MAP_DEC_PLUGIN_GetFileTag public _MAP_DEC_PLUGIN_GetFileTag GetFileTag; /// _MAP_DEC_PLUGIN_OpenStreaming public _MAP_DEC_PLUGIN_OpenStreaming OpenStreaming; /// _MAP_DEC_PLUGIN_DecodeStreaming public _MAP_DEC_PLUGIN_DecodeStreaming DecodeStreaming; /// _MAP_DEC_PLUGIN_CloseStreaming public _MAP_DEC_PLUGIN_CloseStreaming CloseStreaming; * */ //public fixed uint funcs[20]; public IntPtr func1; public IntPtr func2; public IntPtr func3; public IntPtr func4; public IntPtr func5; public IntPtr func6; public IntPtr func7; public IntPtr func8; public IntPtr func9; public IntPtr func10; public IntPtr func11; public IntPtr func12; public IntPtr func13; public IntPtr func14; public IntPtr func15; public IntPtr func16; public IntPtr func17; public IntPtr func18; public IntPtr func19; public IntPtr func20; } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct WAVEHDR { /// LPSTR->CHAR* [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] public string lpData; /// DWORD->unsigned int public uint dwBufferLength; /// DWORD->unsigned int public uint dwBytesRecorded; /// DWORD_PTR->ULONG_PTR->unsigned int public uint dwUser; /// DWORD->unsigned int public uint dwFlags; /// DWORD->unsigned int public uint dwLoops; /// wavehdr_tag* public System.IntPtr lpNext; /// DWORD_PTR->ULONG_PTR->unsigned int public uint reserved; } }