How to play mp3 song file on SmartPnone

A

Anurag Saxena

Hello,

I have a smartphone which is basically windows mobile and has Window
CE. I want to play mp3 song file on smartphone which is very crusical
part of my project. I am able to play any .wav file but fail to play
mp3.

I am using C# and Visual Studio .NET 2003 for development.

If anyone know something about the same can send email also given
below as it is somewhat urgent for me.

Thanks,

Anurag
(e-mail address removed)
 
P

Peter Foot [MVP]

The easiest sure-fire way to play an MP3 is to use ShellExecuteEx (P/Invoke
required) to launch the specified filename, this will play the file with the
associated application e.g. WMP. The OpenNETCF.Diagnostics.Process class
(part of the SDF - www.opennetcf.org/sdf/) provides an easy way to launch
processes e.g.

Process.Start("\\My Documents\\some random rock music.mp3");

Peter
 
A

Anurag Saxena

Hi Peter,
Thanks a lot for your response.

Now I am able to play the mp3 file but I am not able to give the
interface like listbox or any other so that user can choose 1 mp3 file
from list or any other selection.
This time the program picks all mp3 files from smartphone and play one
after another but this is not required,I want that I can select file
to play.
I am using OPENNETCF classes also.

Anurag
 
G

Grynn

If you are targetting newer versions of Windows Mobile 2003, it may be
possible to use the Windows Media Player 10 OCX.

This will enable you to have pretty much whatever control you need over
the playback process.

If I find time in the next week -- I am going to write an example
application that creates and hosts a windows media player control.

Small gifts in the form of choclates may help my ability to find time
:) :)...

Vishal.
 
A

Anurag Saxena

I am using Process.Start(<MP3 file Name with path>) and able to run
the specific mp3 file but not be able to stop showing WMP. I want that
I will be able to play file but not want to display WMP interface.

I am using Win32Window.SetWindowPos() method for setting the windows
position but it vein.

Also the main part which I want to include in application is that I
will be able to find all mp3 files on smartphone and display in a list
so that I would be able to select and play it.Currently I am able to
find .wav files and display in a list and user is able to play
selected file(s).

I am making application for smartphone mobile and it windows mobile
and supported Windows CE.

Well..., Vishal, Be sure about the small gift(I am sure it would not
be small one) :)...It would be appreciable if you give some light on
use of windows media player 10 OCX.I don't its availability,use and
other details.

i am using C# and Visual Studio.NET IDE.

Thanks
 

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