Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

mp3 player application on samrtphone

Back to Forum: Tech Off
  • User profile image

    i'm trying to build a mp3 player application on smartphone.
    i wish to import WMPLib and using it to build one. but i encounter few question, how can i add a media player control into Toolbox??

    when building a windows application, there's no problem to add media player control, but i can't add one when build a samrtphone applicaition.

    or is there other way to do this, to build a application to play mp3 on smartphone??


  • User profile image

    ...but Windows Media Player for Smartphone, which has been around since 2002 already plays MP3s though.

  • User profile image
  • User profile image

    thx for above example code, but i'm trying to build one using C#
    and kinda dont know how to start with C++

    I've noticed that, it seems can't import WMPLib into the Smartphone 2003, so I turn to New a Smartphone Magneto Project with Device Application which is using Windows Mobile 5.0 as OS, and successfully to build one by using Windows Media control.

    I deployed on Windows Mobile 5.0 Smartphone Emulator. and when i play the mp3, there's no sound.

    but when i go to the bin directory and into the Debug directory to execute the exe file that i build, it dose come out the sound of the music.

    i've try on a pocket pc and proof it's no sound when i try my program.

    so...I'm thinking the problem is occur when i embaded the resource.
    (so far, I'm trying to play just one mp3, and try to embaded into the program)

    below is partial code,
    can anyone tell me where is the problem??
    or how to play a embaded resource or
    how to embaded mp3 as the resource?  thx alot...Sad


    if (menuItem1.Text == "Play")
                    Player = new WMPLib.WindowsMediaPlayer();
                    Player.PlayStateChange +=
                        new WMPLib._WMPOCXEvents_PlayStateChangeEventHandler(Player_PlayStateChange);
                    Player.MediaError +=
                        new WMPLib._WMPOCXEvents_MediaErrorEventHandler(Player_MediaError);

                    //execAssem = System.Reflection.Assembly.GetExecutingAssembly();
                    Player.URL = @"05_-_Dancing_Into_The_Moonlight.mp3";
                    //Player.URL = execAssem.GetManifestResourceStream(@"05_-_Dancing_Into_The_Moonlight.mp3");
                    Player.settings.volume = vol;

                    label1.Text = "Now Playing\n" +;
                    label2.Text = "Vol." + vol;
                    menuItem1.Text = "Pause";
                    timer1.Enabled = true;


    ps. I've changed the mp3's Build Action to Embaded Resource

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.