JDK-4482243 : Detect supported sample rates for the default SourceDataLine
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2001-07-20
  • Updated: 2003-09-27
  • Resolved: 2003-09-27
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.
5.0 tigerFixed
Related Reports
Relates :  

Name: fb126949			Date: 07/20/2001

The current implementation of SourceDataLine always returns the same set of sample rates, they are hard coded. TargetDataLines do detect the set of formats.

This bug is not critical, as the SourceDataLine always accepts any sample rate. It is interpolated to match the device's sample rate.


CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b22

EVALUATION ###@###.### 2001-07-20 Detection of sample rates isn't implemented for playback. ###@###.### 2003-09-26 Fixed with availability of DirectAudio drivers on all platforms. Note that some soundcards do support a floating range of sample rates. These will still return AudioSystem.NOT_SPECIFIED as sample rate in the formats returned by the DataLine.Info.getFormats.

SUGGESTED FIX ###@###.### 2001-07-20 Requires modifications of SimpleOutputDevice.java, SimpleOutputDevice.c and the platform dependent files HAE_API_SolarisOS.c, HAE_API_WinOS, HAE_API_LinuxOS.c . The general way how to implement that is analogous to how it is done in SimpleInputDevice - the native code returns an array of AudioFormat objects. It would be good to introduce a shared native file for that, shared for Playback and Capture native code. The querying functions for playback and capture are almost the same and can be very well combined.

PUBLIC COMMENTS Detect supported sample rates for the default SourceDataLine