Playing Wav or mp3 files

G

Guest

I am using VS.Net 2005, is there any way to play wav or mp3 files in pocket
pc without using DLL done by third party? if no, so from where could i
download DLL for playing sound?
Thanks in advance..
 
P

Peter Foot [MVP]

To play a WAV you can use the PlaySound API - you'll find many references in
the archives of this group - or use the SoundPlayer class in the SDF -
www.opennetcf.org/sdf/.
To play MP3 you'll need to either create a new process with the filename
which will launch Windows Media Player, or if you are using .NETCF v2.0 and
a device with Windows Media Player 10, you can use Alex Feinman's ActiveX
hosting implementation:-
http://blog.opennetcf.org/afeinman/CommentView,guid,1dfc3c39-d3cc-4faa-b5f6-cb5c9aed61dd.aspx

Peter
 
G

Guest

Thanks Peter ..;)


Peter Foot said:
To play a WAV you can use the PlaySound API - you'll find many references in
the archives of this group - or use the SoundPlayer class in the SDF -
www.opennetcf.org/sdf/.
To play MP3 you'll need to either create a new process with the filename
which will launch Windows Media Player, or if you are using .NETCF v2.0 and
a device with Windows Media Player 10, you can use Alex Feinman's ActiveX
hosting implementation:-
http://blog.opennetcf.org/afeinman/CommentView,guid,1dfc3c39-d3cc-4faa-b5f6-cb5c9aed61dd.aspx

Peter
 
L

Lonifasiko

Thanks Peter.

I still can't believe there is not another way to play MP3 with files
in CF 2.0 without launching Media Player? What about launching Media
Player in "silent mode"?

Please could anybody confirm me there is another way to play MP3 files
in CF 2.0. There must be lots of people needing this feature?

Regards.
 
L

Lonifasiko

Thanks Chris, but fmodce.dll does not work with CF 2.0. Worked very
well with CF 1.0 but I can sincerely tell you that does not work with
CF 2.0. Same code to play MP3 files does not work.
Besides, guys from fmod.org don't seem interested in implementing
another DLL to play music everytime MS changed CF's version. That is
what I've read in theis forums. I've made some posts in their forums
but nobody replies :-(

Any other way for playing MP3 with CF 2.0?

Thanks anyway.
 
C

Chris Tacke, eMVP

Right, but the source is there. If there's no out-of-the-box solution, well
the option is to write one. If FMOD works with CF 1.0, then it's should be
pretty simple to get going on 2.0, as you've got 99% of the code done.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 
L

Lonifasiko

I'll try but I think can't be so easy. The code I used to play MP3
files with CF 1.0 was just a code snippet with 3/4 basic P/Invokes to
external DLLs of fmodce.dll.

This same code simply doesn't work and does not throw any exception.
The MP3 file is just not played.

Do you know somebody that has achieved playing MP3 with CF 2.0 and
fmode.dll. If you do, let me know please.

I think you did also participate in my previous post:
http://groups.google.es/group/micro...93914d4c60d/a05b0b1c4bf531bd#a05b0b1c4bf531bd

There you can see a sample of the static extern DLLs I'm calling in
order to play MP3 files. The library is the same therefore I understand
the calls to these DLLs should work also with CF 2.0. Has something
changed in the way of calling this extern DLLs? Peter took a rapid look
and found the return type of the DLLs a bit odd.

Did you also mean to compile fmodce source code (C++ I guess) using CF
2.0? I'll try and I'll post the results, I promise. I hope it does not
take me a lof of time because I'm not very fond of C++.

Thanks and regards.
 

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