Comment on Tutorial - Play a multimedia file in J2ME Program (Audio/Video) using MMAPI By Vikram Goyal
Comment Added by : Rowan
Comment Added at : 2014-07-17 10:26:02
Comment on Tutorial : Play a multimedia file in J2ME Program (Audio/Video) using MMAPI By Vikram Goyal
public void playSound(String filename) {
//stop current playing sound
try {
if (player != null) {
player.stop();
player.close();
player.deallocate();
player = null;
}
} catch (Exception ex) {
ex.printStackTrace();
}
//play new sound
try {
inStream = getClass().getResourceAsStream(filename);
player = Manager.createPlayer(inStream, "audio/x-wav");
player.realize();
player.prefetch();
//player.setMediaTime(-1);
//player.setTimeBase(null);
player.start();
} catch (Exception ex) {
ex.printStackTrace();
}
}
View Tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Subscribe to Tutorials
Related Tutorials
Program using concept of byte long short and int in java
Update contents of a file within a jar file
Tomcat and httpd configured in port 8080 and 80
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
MultiLevel Inheritance sample in Java
Archived Comments
1. "If you enter zero, the assert() macro forces
View Tutorial By: czx at 2010-09-17 07:23:20
2. can anyone send me how 2 sms from java code......<
View Tutorial By: ramesh at 2009-02-07 04:26:06
3. plz can u give me code for key excange b/n pda &am
View Tutorial By: visnas at 2009-05-04 20:18:32
4. thanks man really very nice and helpful...........
View Tutorial By: Bakhtawar khan at 2012-12-05 05:54:18
5. good explanation
View Tutorial By: Naresh Kumar at 2010-10-25 00:28:18
6. thnks lot 4 helping me
View Tutorial By: sandeep dudi at 2011-11-17 06:06:03
7. as we write:
ob1.t.join();
Does t
View Tutorial By: abc123 at 2011-04-03 13:33:33
8. Why not a simple array list of threads?
wha
View Tutorial By: Ranadheer Machineni at 2011-08-18 12:30:35
9. Hi,
I am using the code files for s
View Tutorial By: Utsav at 2009-07-14 01:29:06
10. Superb
many thanks to you Mashoud.
View Tutorial By: orchidouest at 2009-05-10 12:58:53