0
0

Hi

I found an example to play mp3 files on a Pocket PC 2003 SE. The example used some version of FMODCE. I got it to work just find playing songs and so on. But im having trouble getting the length (in MS) and position when playing the song. I guess i should use

[DllImport("fmodce.dll", EntryPoint = "FSOUND_Stream_GetLength", SetLastError = true, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
static extern int fmod_GetLength(IntPtr fstream, FMOD_TIMEUNIT FMOD_TIMEUNIT);

Where i have this enum:

enum FMOD_TIMEUNIT
{
FMOD_TIMEUNIT_MS = 0x00000001,
FMOD_TIMEUNIT_PCM = 0x00000002,
FMOD_TIMEUNIT_PCMBYTES = 0x00000004,
FMOD_TIMEUNIT_RAWBYTES = 0x00000008,
FMOD_TIMEUNIT_MODORDER = 0x00000100,
FMOD_TIMEUNIT_MODROW = 0x00000200,
FMOD_TIMEUNIT_MODPATTERN = 0x00000400,
FMOD_TIMEUNIT_SENTENCE_MS = 0x00010000,
FMOD_TIMEUNIT_SENTENCE_PCM = 0x00020000,
FMOD_TIMEUNIT_SENTENCE_PCMBYTES = 0x00040000,
FMOD_TIMEUNIT_SENTENCE = 0x00080000,
FMOD_TIMEUNIT_SENTENCE_SUBSOUND = 0x00100000,
FMOD_TIMEUNIT_BUFFERED = 0x10000000,
}

it returns fx. 5011749 which in seconds would be 5011749 / 1000 = 5011 secs, which is quite a long song 😛

What am i doing wrong?

  • You must to post comments
0
0

Im using this to get the length in MS:

length = fmod_GetLength(soundHandle, FMOD_TIMEUNIT.FMOD_TIMEUNIT_MS);

  • You must to post comments
0
0

Um, anyone?

  • You must to post comments
0
0

Why are you talking about FMOD Ex enums when fmodce is FMOD 3 and not even a compatible API.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.