JDK-6261423 : Dropouts in audio recordings
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 5.0,6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2005-04-26
  • Updated: 2011-02-16
  • Resolved: 2005-09-20
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 JDK 6
5.0u7Fixed 6 b53Fixed
Description
FULL PRODUCT VERSION :
1.5.0
1.5.0_01-b08

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Windows 2000 SP4

EXTRA RELEVANT SYSTEM CONFIGURATION :
Tested audio cards (interfaces):
SoundBlaster 64 AWE
M-Audio MobilePre USB
M-Audio FireWire 410

A DESCRIPTION OF THE PROBLEM :
The JavaSound DirectSound TargetDataLine sometimes drops some audio data.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
We used a slightly modified version of SimpleAudioRecorder.java from jsresources.org and
recorded 50 audio files with 20 seconds length each. Audio format was: PCM_SIGNED 44.1 kHz 16bit  stereo. We connected a sine wave generator with 377 Hz to the input of the audio interfaces.
The dropouts are visible in the signal plot of the recordings and they produce hearable klicks.

  To automate the tests we used a script for the signal and speech analysis program Praat (www.praat.org). The script applys a high-pass filter with cut-off frequency 500 Hz, which mainly filters the recorded sine wave. Next it measuers the intensity of the whole file. Dropouts in the signal cause some energy in the upper frequncy bands, so the intensity of broken files is much higher. Tested platforms are Windows 2000 and XP and three different audio interfaces. With line.available() we checked for bufferoverruns, but the buffer was appr. filled 60 % at most.
Using an own JavaSound mixer adapter for the ASIO interface the recordings are correct even with higher OS loads. So I think it is a bug in the DirectSound to javaSound code.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
We expected clear recordings.
ACTUAL -
Some audio files have dropouts.

REPRODUCIBILITY :
This bug can be reproduced occasionally.

---------- BEGIN SOURCE ----------
SimpleAudioRecorder.java from www.jsresources.org
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Use JRE 1.4.2 for audio recording.
###@###.### 2005-04-26 14:12:24 GMT

Comments
EVALUATION Bug in DirectSound TargetDataLine implementation that can drop little pieces of captured data near DirectSound buffer bound
06-09-2005

EVALUATION annoying bug cause is not known required investigating & fixing ###@###.### 2005-07-18 09:47:29 GMT
18-07-2005