0
0

Hi,
I try to code a simple mp3 player for winCe. So I use fmodce.dll. But it is not working. Here is my code:
[code:lxma0e8x]

region Native Methods

[DllImport("fmodce.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
public static extern SByte FSOUND_Init(int mixrate, int maxsoftwarechannels, uint flags);

[DllImport("fmodce.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
public static extern IntPtr FSOUND_Stream_Open([MarshalAs(UnmanagedType.LPWStr)]string name_or_data, uint mode, int offset, int length);

[DllImport("fmodce.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
public static extern int FSOUND_Stream_Play(int channel, IntPtr stream);

endregion

private void button1_Click(object sender, EventArgs e) {
FSOUND_Init(44100, 16, 0);
IntPtr handle = FSOUND_Stream_Open("test.mp3", 16 | 32 | 256, 0, 0);
FSOUND_Stream_Play(-1, handle);
}[/code:lxma0e8x]

Handle is still empty. It cant load that mp3 file. Why?

  • You must to post comments
0
0

[code:16mmray3]IntPtr handle = FSOUND_Stream_Open("test.mp3", 16 | 32 | 256, 0, 0);
int err = FSOUND_GetError();[/code:16mmray3]

err = 0
file test.mp3 is in the same folder as .exe file and fmodce.dll

  • You must to post comments
0
0

I’m using your code to try out myself, but I got a different problem.
The program seems not to find the fmodce.dll even though I placed it at the .exe and test.mp3 file. Please could anyone look at this problem? I use vs2005, NCF 2.0

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.