JDK-4493775 : Sequencer method, setTickPosition(long) doesnot set the Tick position
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.0,1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_1
  • CPU: generic,sparc
  • Submitted: 2001-08-20
  • Updated: 2009-02-03
  • 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
Sequncer method, setTickPosition(long) doesnot set the Tick position. So, when getTickPosition() is invoked. it returns 0 irrespective of the value of Tick positon set. 
Failing test case is attached with the bug.

Though the hardware info specifies only SunOS, it happens on all platforms

Name: vtR10009			Date: 06/11/2002

This bug causes failure of JCK test:


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

EVALUATION ###@###.### 2002-10-31 Since this bug only occurs in specific cases, postpone the fix to tiger. The position can be well changed with setMicrosecondPosition(), as shown in the Java Sound Demo. ###@###.### 2003-09-26 Fixed anyway with new RealTimeSequencer. I suggest to modify the test case so that it allows the sequencer's tick position to advance in between the calls from setTickPosition and getTickPosition. Also, sequencers should be allowed to have a less-fine resolution that imposed by one tick. Here is an excerpt, how the modified testcase can look like: for(long theTickPosition = 0; theTickPosition < theTickLengthOfSequence; theTickPosition += (theTickLengthOfSequence / 10)) { System.out.println("Now Setting Tick Position To: " + theTickPosition); theSequencer.setTickPosition(theTickPosition); long theCurrentTickPosition = theSequencer.getTickPosition(); System.out.println("IsRunning()=" + theSequencer.isRunning()); System.out.println("Now Current Tick Position Is: " + theCurrentTickPosition); System.out.println(""); try { Thread.sleep(800); } catch (InterruptedException ie) {} // last time, set tick pos to 0 if (theTickPosition>0 && theTickPosition<(theTickLengthOfSequence / 10)) { theTickPosition=(theTickLengthOfSequence / 10); } // 30 = 1/4 * 120, the resolution of the sequence if(Math.abs(theCurrentTickPosition - theTickPosition) > 30) { System.out.println("theCurrentTickPosition != theTickPosition!"); testPassed = false; } }

PUBLIC COMMENTS Sequencer method, setTickPosition(long) doesnot set the Tick position