midi playback

All your problems with Audio, Video and Images.

midi playback

Postby Rodka » Sun May 18, 2008 3:39 am

Hi guys!
I'm a novice Android programmer, so sorry if my question just seems newbie. I'd like to know if, and how, I can playback MIDI files on the Android emulator.
In the case that I can't play MIDI files, could you point to some good tutorial on playing .MP3 files?

Thanks a bunch!
Rodka
Once Poster
Once Poster
 
Posts: 1
Joined: Sun May 18, 2008 3:32 am

Top

Postby ligi » Sun May 18, 2008 4:05 pm

I'm Doing it with MP3's that way:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.  
  3.  
  4.         try {
  5.  
  6.             player=MediaPlayer.create(root,  R.raw.<filename_in_raw_dir>);     
  7.  
  8.             player.start();
  9.  
  10.         }
  11.  
  12.         catch (Exception e)  { // handle errors ..      }
  13.  
  14.    
  15.  
  16.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


should work with midi's too - but i never tested it.
ligi
Freshman
Freshman
 
Posts: 5
Joined: Wed Apr 16, 2008 1:47 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 20 guests