You Are Here:

Community: Developer Discussion Boards

#1 Old Question image and audio in background - simultaneous? - 2008-03-29, 01:46

Join Date: Mar 2008
Posts: 13
js001
Offline
Registered User
hello everybdy....

am developing a small application wherein I need to display a image in foreground and play audio in background....Is it possible to do so in J2ME using media API and 2 threads in bkgnd?

On same lines is it possible to display text with audio in background?

any tips will be quite helpful...
tx
Reply With Quote

#2 Old Re: image and audio in background - simultaneous? - 2008-03-29, 03:59

Join Date: Sep 2007
Posts: 874
honest_success's Avatar
honest_success
Offline
Forum Nokia Champion
Frist create image using method createImage() and then display it and then create new theread in which you should write the code for audio.

Write following code to play audio.

try
{
InputStreamin=getClass().getResourceAsStream("/honesty.wav");
Player player=Manager.createPlayer(in,"audio/X-Wav");
player.start();

}
catch(Exception e)
{
System.out.println("In Catch");
}
Reply With Quote

#3 Old Re: image and audio in background - simultaneous? - 2008-03-29, 04:42

Join Date: Mar 2008
Posts: 13
js001
Offline
Registered User
hi honest_success...

thnx 4 a quick reply :).......i was just wondering that we can display an image in canvas and play audio thru the player....is this wat u mean..right?
Reply With Quote

#4 Old Re: image and audio in background - simultaneous? - 2008-03-29, 06:11

Join Date: Sep 2007
Posts: 874
honest_success's Avatar
honest_success
Offline
Forum Nokia Champion
Ya you can definitely do that. Draw the image in paint() using following code

public void paint(Graphics g)
{
g.drawImage(paramiters);

}

and do audio part by other therad.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Image and audio comment to server from MIDlet pauspling Mobile Java Networking & Messaging & Security 3 2008-02-19 00:36
How to copy image and audio from a theme? supercampson General Browsing 0 2006-06-04 13:03
Simultaneous audio stream and image download disgustipated23 Mobile Java Media (Graphics & Sounds) 0 2004-02-16 19:56
Simultaneous audio stream and image download disgustipated23 General Symbian C++ 0 2004-02-16 19:50
Storing Audio/ image files as byte arrays in flat files(eg. bin files) anantharaj1999 Mobile Java General 0 2003-06-09 12:57

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ