Playing mp3 in CF

P

Per Rasmussen

We are trying to add mp3 support to our CF application. So far we have not
exactly been successful. From what we have been able to gather we either
have to use fmod or directshow.

Fmod costs 6000& for a commercial license (which we will need) and that is
way too steep for our bugdet. Does anybody know a cheaper alternative? We do
not all the fancy capabilities of Fmod. Just an SDK that can play mp3 files.

We have not been able to find any dotnet wrapper for DirectShow and we have
not been able to find any sample code in c++ that can compile.

Any help will be appreciated.

Thanks in advance,
Per Rasmussen.
 
P

Per Rasmussen

Not if that involves some sort of GUI on the screen.

Our application is much like a fullscreen game (in this regard, anyway)
meaning that everything must be handled from code. The media player must be
completely invisible to the user.

I am not really familiar with "windows media player component", though. Do
you have a link to an example?
 
L

Lonifasiko

I also asked in the past if there was a way to launch Media Player in
"silent mode" or something similar, wihout UI, and the answer was no.

I therefore went to FMODCE. I also needed mainly MP3 support.

What I didn't know was the 3000$ (I understand 6000$ is for FMOD Ex
while fmodce.dll costs 3000$) you have to pay when distributing the dll
along with your application (if you've got commercial purposes). I
hadn't read it till today!

Maybe we have to switch to another solution Per.

I'm sure many CF programmers have dealt in the past with sound
management, specially MP3 playing. Something free out there?

Regards.
 
G

Guest

Hi there,

if you your device supports the windows media player
at all, you can simply use the non-gui mode of it.

In one project of mine (mobile 5 device), i am referencing
the wmp.dll (via com interop), and use the following code
to play .mp3 files in the background. Keep in mind though,
that this method is not very performant when it comes
to many source file changes, because loading .mp3 files
with it takes its time. In my case, playing music in the background,
it fitted the case though.

[c# snipped begin]
...
using WMPLib;
...
WindowsMediaPlayer wmp;
wmp = new WindowsMediaPlayer();
wmp.uiMode = "none";
wmp.settings.volume = 80;
wmp.settings.autoStart = false;
wmp.settings.setMode("loop", false);
wmp.URL = @"\your.mp3";
[c# snipped end]

Kind regards,
Sascha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top