What is the best way to play audio utilzing the J2ME Media libary? For example, should I make use of the MMAPI or should I just use the Midlet's platformRequest(String s) method?
相关问题
- Can we recover audio from MFCC coefficients?
- Is there a way to play audio on a mobile browser w
- windows phone 8.1 music library get current media
- Is it possible to know the duration of an MP3 befo
- Playing specific system sound with Qt
相关文章
- Android Visualizer class throwing runtime exceptio
- Simulate Microphone (virtual mic)
- Android Studio Mediaplayer how to fade in and out
- Detect or Approximate Bluetooth Latency on Android
- How to play a specific frequency with Javascript?
- Failed to load because no supported source was fou
- Cross platform audio analysis library
- Button Image Problem
Local audio (in Jar file) is easier to support as explained in Shane's reply above. For content over the web it becomes much harder as a lot of factors like server connectivity issues, handsets memory etc come into play. If you will be required to support a large number of handsets then its advisable to work on 2-3 implementation techniques and use accordingly.
The following code should work for 90-95% of handsets out there that support JSR-135. Ordering of all the various method calls is key for this to be portable. This is for sounds local to your JAR. Any streamed audio would be another problem altogether :)
By best, what do you mean? Highest quality? Best user experience? Most standards-compliant?
Basically (this isn't the best kind of answer I know), it depends on the platform - something that's a familiar theme with J2ME - since implementations can vary widely and the MMAPI usually leverages some native media player software/hardware. On BlackBerry the MMAPI works great, with a few quirks.
My advice is to use the MMAPI where it works well - it'll give you the most portable application. Experiment or browse the developer boards for your specific target device set to see how well it functions on the handsets you want to support.
On some devices using a platform request will cause your application to close and on others certain platform requests will crash the device (anything other than HTTP URLs on some devices).
So you may need to use both approaches, choosing which one to use based on device testing.