-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.3.0
-
x86
-
windows_95
Name: rlT66838 Date: 04/06/2000
java version "1.3.0rc2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc2-Y)
Java HotSpot(TM) Client VM (build 1.3.0rc2-Y, mixed mode)
Exactly the same as described in bug report 4105620:
> Make an 8-bit, 8000 Hz, mono, mu-law sound file
> named mysound.au, and then run the following
> program. Only half the duration of the sound
> is heard. The problem disappears if .wav format
> is used or if a different sample rate is used
> for the .au format.
-------------------------------------------------------
//----- try this code to play a 6-second sound file
import sun.audio.*;
import java.io.*;
public class soundtest {
public static void main(String argv[])
{
soundtest me = new soundtest();
try {
FileInputStream in = new FileInputStream("mysound.au");
AudioStream as = new AudioStream(in);
System.out.println("Start audio");
AudioPlayer.player.start(as);
try { Thread.sleep(12000); }
catch (Exception e) {}
System.out.println("Stop audio");
AudioPlayer.player.stop(as);
}
catch(FileNotFoundException e){
System.out.println("Couldn't find sound file");
}
catch(java.io.IOException e){
System.out.println("Couldn't build audio stream");
}
}
}
(Review ID: 103376)
======================================================================
- duplicates
-
JDK-4303617 Animator Demos produce a coarse staticy sound when run on browsers w/ JRE RC2 W
-
- Closed
-