Current support of audio playback in Java applets makes the task quite simple, but support in applications is lacking. This tip shows you how to play audio clips in your Java applications. (650 words)
In this first installment of the Media Programming column, author Bill Day introduces the Java Media and Communication APIs. Day also discusses the major issues facing potential Java Media developers and supplies a roadmap for upcoming articles in this new monthly JavaWorld column. (1,900 words)
The Service Provider Interface (SPI), a new feature in Java 2 1.3, allows developers to transparently add new functions to the JVM. That allows older Java programs, even Java 1.02 programs, to take advantage of the newly added functions with no changes and no recompiling. For instance, Java Sound uses the SPI at runtime to provide sound mixers, file readers and writers, and format conversion utilities to a Java sound program. Indeed, more functions can be added to Java Sound to take advantage of new file formats. In this article, Dan Becker introduces the SPI by way of a real-world example: MP3 sound files. (3,000 words)
The Java Media Framework (JMF) enables you to program multimedia functions without having to worry about its underlying complexity. The API's interfaces are simple to use, yet so versatile that you can do anything imaginable with multimedia. In this article, the second of a two-part series, Budi Kurniawan shows you how to create multimedia programs with only a few lines of code. (2,700 words)
The Java Media Framework (JMF) enables you to process multimedia resources with just a few lines of code. Indeed, the JMF architecture resembles your stereo system, with its own Player, DataSource, CaptureDevice, and so on. In this article, the first of two, Budi Kurniawan shows you how to become a multimedia expert in no time, and have fun with sound and movie files. (3,000 words)
In this article, Tony Loton shows how to implement a simple speech engine with less than 150 lines of Java code, no hardware, and no native calls. Further, he supplies a small zip file containing everything you need to make your Java applications talk -- just for fun or for more serious applications. And if you're new to the Java Sound API, this article will serve as a handy introduction. (1,800 words)
Used judiciously, audio can be a useful addition to even the most practical Java apps. In this article, author Dan Becker details three ways to produce sound in Java applications and applets: Using the Applet class with the play method; using the AudioClip class with the play, loop, and stop methods; and using the AudioStream class with the play, loop, stop, and restart methods. You'll learn the advantages and disadvantages of each of these three approaches. Plus: Find out how to package sounds in a JAR file so users can replace the sounds in your program with their own. (2,500 words)
The recent versions of JDK (above 1.1) have overcome serious limitations in terms of audio capabilities. JDK 1.2 has extended its audio support from the low quality .au format only to encompass all high-quality audio formats such as .wave. In this article, Samudra Gupta discusses how to implement those audio formats through applets and presents the communication possibilities between JavaScript and Java 2 applets. (1,500 words)
The Java Media Player API, a portion of the Java Media Framework (JMF), lets Java programmers easily embed audio and video within applets and applications. Both static and streaming multimedia are supported from any valid URL. JMF players may be controlled by other players, providing for synchronous playback of multiple audio and video samples. This article gives an overview of the Java Media Framework and the JMF Player API. The fundamental classes and methods needed to create and use a player are outlined, with sample code for an example JMF applet. It includes an introduction to advanced issues, an outline of future development work, and some general conclusions. (2,500 words)
The Service Provider Interface (SPI), a new feature in Java 2 1.3, allows developers to transparently add new functions to the JVM. That allows older Java programs, even Java 1.02 programs, to take advantage of the newly added functions with no changes and no recompiling. For instance, Java Sound uses the SPI at runtime to provide sound mixers, file readers and writers, and format conversion utilities to a Java sound program. Indeed, more functions can be added to Java Sound to take advantage of new file formats. In this article, Dan Becker introduces the SPI by way of a real-world example: MP3 sound files. (3,000 words)
In this first installment of the Media Programming column, author Bill Day introduces the Java Media and Communication APIs. Day also discusses the major issues facing potential Java Media developers and supplies a roadmap for upcoming articles in this new monthly JavaWorld column. (1,900 words)