BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-10-2008, 06:59 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2008
Model: pearl
PIN: N/A
Carrier: none
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Mp3 Playback Problem

Please Login to Remove!

Hello,

So i ran into another problem. I am trying to retrieve a mp3 file on the web it on the blackberry device. However the code that i have successfully plays all mid files but fails on mp3 giving IOException in the call manager. The code is given below. After having doen all the reading, it seems that blackberry does support mp3 as its a standard jsr from j2me. So any inputs on whats wrong ?


i use a separate thread to play the files and get the stream.
Code:
	public void run(){
		try {
	    	  
			   HttpConnection conn = (HttpConnection)Connector.open(mp3url,Connector.READ_WRITE);
			    InputStream is = conn.openInputStream();
			    _player = Manager.createPlayer(is, "audio/mpeg");
			    _player.realize();
			    VolumeControl vc = (VolumeControl) _player.getControl("VolumeControl");
			    if(vc != null)
			    {
			      vc.setLevel(100);
			    }
			    _player.prefetch();	
				_player.start();
			  }				
			  catch(Exception e)
			  {
				  e.printStackTrace();
			  }
			}
any help is appreciated. Also if you have worked with mp3 over the network ( internet) before , please post
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Aastra Telecom 6755i VoiP 6755 Office Display Phone A1755-0131-10-01
$55.0
Aastra Telecom 6755i VoiP 6755 Office Display Phone A1755-0131-10-01  pictureBroadviewMitel 5340 Voip Telephone
$120.0
BroadviewMitel 5340 Voip Telephone pictureAvaya 1608 IP Telephone VoIP Phone 1608D01A-003 Black 700415557 1608D Display
$79.0
Avaya 1608 IP Telephone VoIP Phone 1608D01A-003 Black 700415557 1608D Display pictureLot of 15 8x8 Aastra 6755i IP550 IP 335 VoiP Office Desk Phones
$239.75
Lot of 15 8x8 Aastra 6755i IP550 IP 335 VoiP Office Desk Phones pictureShoretel IP 230 VOIP Phone IP230 SEV Silver Display Warranty Excellent Condition
$99.99
Shoretel IP 230 VOIP Phone IP230 SEV Silver Display Warranty Excellent Condition picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.