JDK-4948663 : JavaSoundDemo cannot playback loaded wav files
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9,windows_2000
  • CPU: x86,sparc
  • Submitted: 2003-11-04
  • Updated: 2003-11-24
  • Resolved: 2003-11-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b30Fixed
Related Reports
Duplicate :  
Description
Name: rmT116609			Date: 11/04/2003


FULL PRODUCT VERSION :
java version "1.4.2_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

FULL OS VERSION :
Microsoft Windows 2000 [Version 5.00.2195

A DESCRIPTION OF THE PROBLEM :
JavaSoundDemo cannot playback sample wav file or any recorded and then saved wav file.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open JavaSounddemo. Go to capture/playback tab.
Load file "1-Welcome.wav" from the samples.
It is displayed properly.
But clicking on Play causes the following console output:
  Unable to reset the stream
  java.io.IOException: mark/reset not supported

Tested on three machines, two with JDK 1.4.2, one with JRE 1.4.2: Failed on all.
Tested with JRE 1.4.1 and JDK 1.4.1: works.

I have an app which uses code similar to the SoundDemo, and so this app is broken, too. That's why I consider the problem critical.


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Using 1.4.1 instead.
(Incident Review ID: 223124) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b30 tiger-beta
14-06-2004

EVALUATION This bug is caused primarily by a recent change in PushBackInputStream: AudioInputStream used PushBackInputStream internally in order to cope with irregular frame size reads of the underlying input stream. The fix removes usage of PushBackInputStream. This has the added benefit of one less layer when reading from the stream, and therefore better performance. Fix is very low risk, since only AudioInputStream is affected, easy to test correct behavior with the existing unit tests and TCK tests. ###@###.### 2003-11-13 Note that the Java Sound Demo uses an undocumented feature of AudioInputStream: calling reset() will rewind it to the start position of audio data. This is NOT a recommended way of rewinding. If your program uses that code, reconsider using something portable. The Java Sound Examples (http://www.jsresources.org/examples/) show how to correctly do such tasks. ###@###.### 2003-11-17
17-11-2003