ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48637] sound task either does nothing or endlessly loops sound.
Date Fri, 29 Jan 2010 16:02:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48637

Ed Brannin <edbrannin@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24905|0                           |1
        is obsolete|                            |

--- Comment #3 from Ed Brannin <edbrannin@gmail.com> 2010-01-29 08:02:54 UTC ---
Created an attachment (id=24906)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24906)
Patch against 1.8.0RC1 to fix both issues (and fix some comment spelling) -
PLUS no more busy-waits.

The original code (and my original fix) would busy-wait for the sound to finish
playing.  On my system, the "empty" loops (now with "waits += 1") ran about 940
million times.

This patch reduces the wait-count to around 2-20.  Higher wait-counts are from 
the lag between clip.getMicrosecondLength() == clip.getMicrosecondPosition()
and clip.isRunning() going back to false.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message