Commit Graph

836 Commits

Author SHA1 Message Date
Ray Greenwell 2ff14aa456 Well then! That last bit of debugging has finally shown me the light!
Queue.append() only does a notify() if the queue was previously empty.
So when the dobj thread was requesting two sounds one after another, it
only woke up one player thread, which played the first sound and then
came back 'round to play the next sound after it was done. The next sound
was usually expired by that time.

Use queue.appendLoud(), which always wakes up a waiter thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3342 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 22:34:55 +00:00
Ray Greenwell 67521e973d Even more logging, to ensure that two different threads are indeed playing
these two different sounds.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3341 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 22:02:22 +00:00
Ray Greenwell 86757cb55e Even more verbose logging to figure out why the sound manager is being so
slow.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3340 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 20:59:14 +00:00
Ray Greenwell f027797120 Added some more info to some logging, cleaned up formatting of logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 19:55:31 +00:00
Ray Greenwell 60c5f60a23 Added additional verbose logging to figure out why some clips take
so long to get played.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3338 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-08 07:09:05 +00:00
Ray Greenwell cb6da9d5bc Playing with the sound under windows, it seems that a lot of sounds are
getting dropped because they're taking too long to play. Extended the
max delay to 1000ms, which will surely help more sounds play, but may
not be worth it. Hey, we've got a test server to test on...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3337 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-08 06:26:27 +00:00
Michael Bayne 53c3435854 Handle cases where one or the other direction does not scroll for lack of need.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3335 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-07 03:53:54 +00:00
Michael Bayne ff4f9d4a9c A helper that makes it easy to wire up scrollbars or a scrollbox to a
virtual media panel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3334 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-07 03:37:39 +00:00
Ted V f7109f64bf Was doing some debugging; opted to leave the log import checked in.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-01 23:11:42 +00:00
Ted V 66321690e6 Animation now accounts for X acceleration.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3325 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-01 20:42:21 +00:00
Ted V 6206d9f71b Added construction interface for X axis acceleration.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3324 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-01 20:22:09 +00:00
Ted V bf463e46e9 Left logging import.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3323 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-28 22:52:53 +00:00
Ted V 42fb1f095b Needed some debug information from this class; figured I'd leave the
Log import in there.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-28 21:13:27 +00:00
Ted V 81487748dc Scale animations now report when they've finished.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3319 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-28 00:07:56 +00:00
Ted V d8749a8b41 Bunch of updates to handle actual drawing of the image. Some bug fixes too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-27 23:59:39 +00:00
Ted V 4033d08113 Most of the class has been rewritten.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3317 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-27 21:17:59 +00:00
Ted V cdb7284ea2 Skeleton of a scaling animation stolen from GleamAnimation. Nothing
has been changed, except the names to protect the innocent.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3316 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-27 20:49:34 +00:00
Michael Bayne afabea71ad Big fat Bernie javadoc cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-24 23:08:21 +00:00
Ray Greenwell 05d72fb406 In the fix for the macintosh copy area bug, it's pointless to compute the
rectangle of the area that would have been copied, as we know that the
_entire_ visible area is now dirty due to the failed copy. Replace the
list of dirty rectangles with one rectangle encompassing everything, it will
cut down on the iterations in the paint() method and should improve
performance on the JVM that exhibits the copyArea bug.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-21 23:59:04 +00:00
Ray Greenwell 8f40cfa2e3 Be sure to mark all the sound playing threads as daemon.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3305 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-20 00:07:27 +00:00
Michael Bayne 64b5b856ca We need to translate mouse wheel events as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3304 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-19 16:09:17 +00:00
Ray Greenwell 2b085bd8c2 Finished a weekend project: rewrote the SoundManager.
The SoundManager used to keep the AudioSystem's Line open for up to 30
seconds after a sound was played, maybe because I thought that opening
the line was expensive, or because it makes an audible 'tick' in linux
if no other sounds are playing. Well, it turns out that the sound looping
bug is the result of some internal befuckery of Sun's caused by keeping
the line open. Restructed the sound manager so that lines are opened
every time a sound is to be played and then closed immediately after.

This also allowed me to simplify a thing or two, and sounds should actually
be more responsive, in a tiny way, since previously the dobj thread asked
to play a sound, the sound manager thread would load the clip data and
finally a data spooling thread would play the actual sound. Now there is
no sound manager thread- so the dobj thread adds a sound to the queue and
one of the playing threads wakes up, reads the data and plays the sound.

Factored out all the music stuff into a new MusicManager. There was almost
nothing shared between the two, and it was just annoying to have one
monolithic manager that had all the logic and variables for both of these
distinct functions. The music manager also no longer has a processing
queue, everything takes place on the dobj thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-17 23:30:38 +00:00
Ray Greenwell f9f3d784cf My laptop repeatedly gets the sound looping bug, and I noticed that it goes for about 30 seconds before stopping. We keep the line open for 30 seconds, waiting for another sound, and there must be a bug in the Java libraries that sometimes loops the end of the sound. Expire LineSpoolers after 1 second. If this works I may restructure things so that the threads stay around longer but the lines get closed immediately after the drain delay.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-29 21:56:58 +00:00
Michael Bayne 1fde5f69c0 Added a getter for the frame's manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3285 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:48:40 +00:00
Ray Greenwell bd80c348eb The great Interval revamp.
There is no more SafeInterval, instead Intervals can be constructed with a RunQueue to use for expiring.
PresentsDObjectMgr implements RunQueue.
Client has a getRunQueue() method to get the client side RunQueue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-22 19:23:00 +00:00
Ted V 7ea2b45d39 Changed tabs to spaces since not everyone has the same tab stops.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3259 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-03 21:38:22 +00:00
Ray Greenwell 226fe41e7c And I may as well keep the commented-out code up to date.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3233 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-24 00:57:05 +00:00
Ray Greenwell 6acbd15c2f Small fix: if we're bypassing the copyArea scrolling on a macintosh
and just dirtying the entire panel, we don't want to set _dx and _dy, as
that will trigger the actual use of copyArea and so forth during painting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3232 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-23 23:38:43 +00:00
Landon Fuller 660ff94fc1 On Mac OS X, mark the entire panel as dirty when scrolling to fix artifact issues.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3229 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-23 20:09:23 +00:00
Andrzej Kapolka 4294134954 Moved ButtonSprite up to com.threerings.media.sprite.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3222 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-18 23:39:12 +00:00
Michael Bayne 57d8d7a703 Sprites should not be initialized with coordinates, so I changed the
constructor to reflect that rather than requiring coordinates that are
then not really valid.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3214 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-12 02:16:04 +00:00
Michael Bayne 7caf2ee610 Do the right thing if we're holding onto animations while the view scrolls.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3210 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-11 23:53:06 +00:00
Michael Bayne cd51c78619 Added support for using sprites that are fixed in relation to a
potentially scrolling view. Also added a means for non-sprites and
animations to hear about view scrolls.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3209 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-11 23:52:43 +00:00
Michael Bayne 512663e482 Properly dirty ourselves if we are relocated.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3208 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-11 23:51:40 +00:00
Michael Bayne 0c5f723046 Added a method for computing the standard deviation of a set of values.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3201 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-04 04:52:31 +00:00
Michael Bayne c299e830a4 Added enumerateSprites() and removeSprites().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3192 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-30 04:33:08 +00:00
Michael Bayne 4481cd5f6c Added an import for a javadoc comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3191 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-29 19:33:16 +00:00
Michael Bayne b3de84c918 Render animations behind sprites in the back layer and in front of sprites
in the front layer which is generally what we want.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3190 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-29 17:10:46 +00:00
Michael Bayne a70efc3ffb NoLongerAnySuchNoSuchTileException. Instead we just log a warning and
return a tile with an error image so that the caller doesn't freak out and
we achieve maximal "continue to work as much as possible."


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3177 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-28 17:49:02 +00:00
Michael Bayne 69e3f857c2 Don't let crazy components ruffle our feathers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3176 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-28 17:21:56 +00:00
Michael Bayne 36a629c5e9 More ...Equal() -> ...() and ...() to ...Ref().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3171 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-23 17:36:32 +00:00
Michael Bayne 90ae3fd17e ListUtil.contains() -> ListUtil.containsRef()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3170 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-23 17:21:54 +00:00
Michael Bayne 96677211f6 Microsecond handling was totally wrong. We didn't use it until now so it
wasn't causing trouble.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3141 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-15 22:22:37 +00:00
Michael Bayne d666c75460 Two things:
1. Modified the performance metric code to use hundred microseconds rather
than milliseconds as millis are not sufficiently fine grained.

2. Switched from using an ObserverList to a hand-rolled mechanism for
frame participants. It is unfortunate that we're not reusing code (though
this turns out to be 55 fewer lines of code) but the FrameManager needs to
allow tick participants to be removed from the list while in the middle of
processing another participant's tick.

With the ObserverList we have to use SAFE_IN_ORDER_NOTIFY which adds
undesirable overhead to each tick, or FAST_UNSAFE_NOTIFY which is
efficient, but freaks out if an as-yet-unticked participant is removed
during another particpant's tick.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3140 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-15 22:21:38 +00:00
Andrzej Kapolka 97e7d9c823 Spaces after ifs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3139 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-15 18:20:28 +00:00
Andrzej Kapolka 8ad2aefdf2 Yet more formatting changes. Should be just about compliant with the standard.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3138 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-15 03:09:46 +00:00
Andrzej Kapolka 0b0fcf9d15 I had the orientations backwards.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3137 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-15 00:59:53 +00:00
Andrzej Kapolka 73f44a5ee3 Various changes for style, changes to Card recommended by Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3136 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-15 00:14:23 +00:00
Andrzej Kapolka 90af7c794d A handy orientable sprite.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3134 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-13 02:03:44 +00:00
Eric Lundberg 9927b6a684 Cleaned up import.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3130 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-05 01:08:00 +00:00