JDK-5029790 : Synthesizer.getLatency returns wrong value
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-04-09
  • Updated: 2004-04-22
  • Resolved: 2004-04-22
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 b48Fixed

Name: fb126949			Date: 04/09/2004

Previous versions of the JDK never implemented Synthesizer.getLatency -- it always returned 0. For tiger, this was fixed, but unfortunately the method returns the latency in sample frames and not, as specified, in microseconds. 

Since the latency of the synthesizer was essentially *increased* with tiger (in order to have constant latency), some JCK tests fail due to this unexpected long latency (see e.g. bug 4987585: Some MidiChannel methods are asynchronous.


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

SUGGESTED FIX return latency in microseconds, not in milliseconds.

PUBLIC COMMENTS Synthesizer.getLatency should be fixed for tiger.

EVALUATION Indeed, the synthesizer returns latency in sample frames, and not in microseconds (e.g. 3072 microseconds, instead of e.g. 50000). The fix is riskless (replacing the call to HAE_GetMaxSamplePerSlice with a call to HAE_GetSliceTimeInMicroseconds). ###@###.### 2004-04-09