0
0

Hi ,,

I have been trying to use fmod on my Ipaq 4150 but with no success. I use FSOUND_Stream_Open but keep getting zero for the handle. As the file name, I used an opendialog to select the file then get the path using FileName property. I then used FSOUND_GetError() to find out what’s the problem and I got err 9.

The very same code works perfectly on PC (not Emulator), so I know i am not missing any thing. I am using fmodce.dll in api\wince4\armv4

I tried the fmod wrappers in [url:hcw4a3vl]http://www.fmod.org/forum/viewtopic.php?t=2585[/url:hcw4a3vl] but got the same result.

someone somewhere mentioned that you need to add a terminating character to the file name but I wasn’t sure what that meant. I tried to append “\n”, “\r”, “\t” and even a space but no luck!

I would really appreciate it if someone could help me here 😥

Thanks in advance,

-Moayad

moayad _ j at hotmail dot com

  • You must to post comments
0
0

HI,

First, thanks for replying.

Actually what you have written is almost exactly the same thing I am trying. This alone does not work on pocket pc. Here is my code:

[code:2pxyb2fi]
bool loaded = Initialization.FSOUND_Init(44100, 16, 0);

if (loaded)
{
DialogResult r = openFileDialog1.ShowDialog();

if (r = DialogResult.OK)
{
     textBox1.Text = openFileDialog1.FileName;

     IntPtr i = .Sample.FSOUND_Sample_Load(1, textBox1.Text, FSOUND_MODES.FSOUND_NORMAL, 0, 0);

     if (i == IntPtr.Zero)
     {
           MessageBox.Show(Information.FSOUND_GetError().ToString());

           System.IO.FileInfo f = new System.IO.FileInfo(textBox1.Text);

            if (f.Exists)
                  MessageBox.Show("File exists!");
     }
     else
     {
           Channels.FSOUND_PlaySound(1, i);
     }
}

}
[/code:2pxyb2fi]

Please note that I am using the FmodManaged wrapper that is posted in General Discussion and it is imported.

If you try out this code on a pocket pc , although you selects a file from you device, and it gives you a confirmation that the file exists, you get i to be zero pointer and Error #9

I hope you see my problem clearer now.

and thanks again

  • You must to post comments
0
0

HELLLPPP !!! 😥

Did anyone succeed in playing a file within PPC2003 either with a device or emulator using fmod ?!

I have tried everything but no luck so far. My latest trial was the code I posted above. PLEASE can anyone try it. I need this for my university project

contribution is very appreciated..

Moayad

  • You must to post comments
0
0

Hi.

Thanks man. I found out how to do it. Appearantly it has to do with the difference in string encoding used in fMOD and .NET, ANSI and UNICODE repectively.

Someone has, thankfully, posted this [url=http://www.fmod.org/forum/viewtopic.php?p=15386#15386:1r2kb6hf]here[/url:1r2kb6hf] plus a sample code

Thanks for all the help

  • You must to post comments
0
0

Ive tried that code and I still cant get the open file to work and return a non zero handle. What am I doing wrong?

        fmod = new FMOD();

        soundstream = new FSOUND_Stream();

        string soundfile = "malc.mp3";

        string currentpath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
        currentpath+=soundfile;
        musicmodule = new FMUSIC_Module();
        musicmodule.Open(currentpath, (uint)FSOUND_MODE.FSOUND_LOOP_NORMAL, 0, 0);
        fmod.Music_Play(musicmodule);
  • You must to post comments
0
0

oops I meant

string soundfile = “\malc.mp3”;

trying this on an ipaq 5550 ppc 2003. I think I’ll have to try it from native code first to try and understand whats going on.

  • You must to post comments
0
0

Oops sorry I downloaded the feautre stripped version by accident. Its working now.

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.