+++ /dev/null
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
-using System.Runtime.InteropServices;\r
-using System.IO;\r
-using System.Diagnostics;\r
-using System.Threading;\r
-\r
-\r
-namespace FDK\r
-{\r
- public unsafe class Cmp3 : SoundDecoder\r
- {\r
-// static byte[] FOURCC = Encoding.ASCII.GetBytes( "SggO" ); // OggS の little endian\r
-\r
-\r
- #region [ SoundDecoder.dll インポート(mpr 関連)]\r
- //-----------------\r
- [DllImport( "SoundDecoder.dll" )]\r
- private static extern void mp3Close( int nHandle );\r
- [DllImport( "SoundDecoder.dll" )]\r
- private static extern int mp3Decode( int nHandle, IntPtr pDest, uint szDestSize, int bLoop );\r
- [DllImport( "SoundDecoder.dll" )]\r
- private static extern int mp3GetFormat( int nHandle, ref CWin32.WAVEFORMATEX wfx );\r
- [DllImport( "SoundDecoder.dll" )]\r
- private static extern uint mp3GetTotalPCMSize( int nHandle );\r
- [DllImport( "SoundDecoder.dll" )]\r
- private static extern int mp3Open( string fileName );\r
- [DllImport( "SoundDecoder.dll" )]\r
- private static extern int mp3Seek( int nHandle, uint dwPosition );\r
- //-----------------\r
- #endregion\r
-\r
-\r
- public override int Open( string filename )\r
- {\r
- return mp3Open( filename );\r
- }\r
- public override int GetFormat( int nHandle, ref CWin32.WAVEFORMATEX wfx )\r
- {\r
- return mp3GetFormat( nHandle, ref wfx );\r
- }\r
- public override uint GetTotalPCMSize( int nHandle )\r
- {\r
- return mp3GetTotalPCMSize( nHandle );\r
- }\r
- public override int Seek( int nHandle, uint dwPosition )\r
- {\r
- return mp3Seek( nHandle, dwPosition );\r
- }\r
- public override int Decode( int nHandle, IntPtr pDest, uint szDestSize, int bLoop )\r
- {\r
- return mp3Decode( nHandle, pDest, szDestSize, bLoop );\r
- }\r
-\r
- public override void Close( int nHandle )\r
- {\r
- mp3Close( nHandle );\r
- }\r
-\r
- }\r
-}\r