
Play a Sound with QuickTime for Java #73
Chapter 10, Audio
|
371
HACK
The one thing that’s really different is that you can play many more file for-
mats than you can with just JavaSound. Or maybe you can’t. It all depends
on what operating system you’re running on. The JMF install offers an all-
Java version and “performance packs” for some operating systems, which
use native code. The latter offer not only better performance for the media
formats supported by the all-Java version, they also integrate with the native
media library on the host operating system to play other media files, ones
that couldn’t be opened with the all-Java version alone.
This might make you deceive yourself: if you develop a JMF application on
Windows and it works with your media, it won’t necessarily work on
another operating system, either because Sun never made a performance
pack for that system (Mac OS X), or because even with the performance
pack, the native libraries don’t support that format. If you go the JMF route,
you need to rigorously test cross-platform, or you may very well have an
application that really only works on one OS.
H A C K
#73
Play a Sound with QuickTime for Java Hack #73
Using QuickTime, you can play even more kinds of sounds, but only on two
operating systems.
QuickTime for Java offers another way to significantly improve the media
capabilities of your application. Its list of supported formats is ...