blackberry implement audio player

Posted by Prasad on Stack Overflow See other posts from Stack Overflow or by Prasad
Published on 2010-05-11T10:00:03Z Indexed on 2010/05/11 10:04 UTC
Read the original article Hit count: 373

Filed under:
|
|
|
|

Hi,

I am developing an application which let users to hear songs online. And I used Blackberry Player and Manager APIs. My application works fine and I can play songs. Now I wan't to add more controls to it. As an example I want pause, play songs. Mute the sound, Control the volume. Display the progress of the play back. Display the current time position of the song like that. I started research on that. And I tried to do that with PlayerListener. But unfortunately all the time I am getting IllegalStateException. So I can't go ahead with that research.

As a help can someone please tell me how can I implement above kind of controls for a player. Appreciate if someone can post a sample code to do that. Further I will put my playback source code here.

public void run() { try { p = Manager.createPlayer(requestedSong + SystemSettings.strNetwork); p.setLoopCount(1); p.start(); } catch (IOException ioe) { } catch (MediaException me) { } }

public void run()
{
try
{
p = Manager.createPlayer(strSongURL);
p.setLoopCount(1);
p.start();
}
catch (IOException ioe)
{ }
catch (MediaException me)
{ }
}

Thank you very much.

Prasad

© Stack Overflow or respective owner

Related posts about blackberry

Related posts about audio