loads, but the sound manager wants to load things directly from the
classpath, so we need to allow it to use the classpath that the resource
manager was configured with to ensure that it did the right thing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3379 542714f4-19e9-0310-aa3c-eee0fc999fb1
another instance of append() that needed to be changed to appendLoud().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3343 542714f4-19e9-0310-aa3c-eee0fc999fb1
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
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
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
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
- Removed the RuntimeAdjust for tweaking the Line's buffer size.
- Feed data to the Line in chunks the same size as its buffer.
- Rather than sleeping 3 seconds, calculate how long it would take to play
the line's entire buffer and sleep that long. It turns out that with
the buffer size I'm using and the sample rates our sounds are encoded at,
this is less than 400 ms.
- Went ahead and increased the maximum number of simultaneous line spoolers
to 12.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2966 542714f4-19e9-0310-aa3c-eee0fc999fb1
when I set it to 24? Let's try it like this for a spell.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2734 542714f4-19e9-0310-aa3c-eee0fc999fb1
is turned on.
- Expire PLAY requests if they are not processed within 400ms.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2376 542714f4-19e9-0310-aa3c-eee0fc999fb1
- allow random picks from among some variants when using test sounds
- fixed default sound for JWS users so that it loads from a bundle
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2319 542714f4-19e9-0310-aa3c-eee0fc999fb1
being loaded out of the classpath.
- enabled sound. I want to test at home with my old linux machine and see
how things are.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2249 542714f4-19e9-0310-aa3c-eee0fc999fb1
locked items and non-locked items in the same cache will screw up an
otherwise healthy cache by forcing it to flush otherwise frequently used
items because there's no room left by locked items.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2168 542714f4-19e9-0310-aa3c-eee0fc999fb1