B
Balint Toth
Hi all,
I got FMOD from www.fmod.org. I wrote the following simple code, but
unfortunately nothing happens:
[DllImport("fmodce.dll")]
public static extern bool FSOUND_Init(
int mixrate,
int maxsoftwarechannels,
uint flags);
[DllImport("fmodce.dll") ]
public static extern IntPtr FSOUND_Stream_Open(
string name_or_data,
uint mode, int offset, int length);
[DllImport("fmodce.dll") ]
public static extern int FSOUND_Stream_Play(
int channel,
IntPtr stream
);
.....
if (!FSOUND_Init(44100, 32, 0)) {ApplicationEx.Exit(); }
IntPtr a = new IntPtr();
a = FSOUND_Stream_Open("\\Storage\a.mp3",304,0,0);
MessageBox.Show(a.ToString());
int i = FSOUND_Stream_Play(-1,a);
MessageBox.Show(i.ToString());
----
The first messagebox displays 0, the secund -1.
What can be the problem, I cannot figure it out.
Thanks in advance,
Bálint Tóth
I got FMOD from www.fmod.org. I wrote the following simple code, but
unfortunately nothing happens:
[DllImport("fmodce.dll")]
public static extern bool FSOUND_Init(
int mixrate,
int maxsoftwarechannels,
uint flags);
[DllImport("fmodce.dll") ]
public static extern IntPtr FSOUND_Stream_Open(
string name_or_data,
uint mode, int offset, int length);
[DllImport("fmodce.dll") ]
public static extern int FSOUND_Stream_Play(
int channel,
IntPtr stream
);
.....
if (!FSOUND_Init(44100, 32, 0)) {ApplicationEx.Exit(); }
IntPtr a = new IntPtr();
a = FSOUND_Stream_Open("\\Storage\a.mp3",304,0,0);
MessageBox.Show(a.ToString());
int i = FSOUND_Stream_Play(-1,a);
MessageBox.Show(i.ToString());
----
The first messagebox displays 0, the secund -1.
What can be the problem, I cannot figure it out.
Thanks in advance,
Bálint Tóth