Michael Bayne
d4c4596403
Build our new unsafe library (on Linux at least) and some other random
...
viztool crap that doesn't really matter.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2561 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-09 03:24:12 +00:00
Ray Greenwell
9643db4632
Use RunAnywhere.isLinux() to determine if we should skip draining.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2538 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-03 00:13:04 +00:00
Ray Greenwell
46b8aace97
Don't log a bunch of crap for sounds that are missing during a LOCK
...
unless verbose logging is turned on.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2392 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-08 20:30:44 +00:00
Ray Greenwell
77633366cc
Handle not finding a music player for a song gracefully.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-08 01:46:16 +00:00
Michael Bayne
8663535d5a
Exclude the experimental music players.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-06 04:36:01 +00:00
Ray Greenwell
728ddcf575
only log that the queue is full (and the full damn contents of the queue)
...
when verbose logging is on.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-05 20:48:04 +00:00
Michael Bayne
628bc34eef
Make sure we have clips before we try to pick one at random.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-05 19:00:28 +00:00
Ray Greenwell
02081105c8
cut down on the amount of logging we do for missing sounds
...
(unless verbose logging is turned on.)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2378 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-05 03:38:41 +00:00
Ray Greenwell
2c4c2d6b92
- only play the default sound for missing sounds if verbose sound event logging
...
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
2003-04-04 22:34:59 +00:00
Ray Greenwell
2c7c0107e2
- don't "lock" sounds when we're using the test sound directory
...
- 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
2003-03-24 19:35:18 +00:00
Ray Greenwell
153ed8d1b9
Added a runtime adjust for verbose logging of sound playing
...
(useful when working with testsounds).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-23 04:10:50 +00:00
Ray Greenwell
639e08b36a
Specify a fallback sound path in the constructor to be used if
...
a sound cannot be found.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2315 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-22 18:14:00 +00:00
Ray Greenwell
632366d019
Fixed bug that may occaisionally cause sound to not shut down,
...
removed unnecessary synchronization.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-17 18:50:18 +00:00
Ray Greenwell
d1d538376f
removed vestigial variable
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2306 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-17 05:28:26 +00:00
Michael Bayne
ff600ddb66
Log more information if the queue is full since I saw that when entering a
...
sword fighting puzzle just now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2305 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-13 18:35:03 +00:00
Ray Greenwell
b0f351769c
Good night Wesley, I added a runtime adjust for the output buffer size.
...
I'll surely remove it in the morning.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2304 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-12 00:28:05 +00:00
Ray Greenwell
3489a23603
Added hacked-together support for playing .ogg files.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2255 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 01:44:44 +00:00
Ray Greenwell
ffa840c5ac
- fixed grievous bug that NPE'd when a sound was in a bundle rather than
...
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
2003-02-07 02:53:49 +00:00
Ray Greenwell
8515b2dd04
Use a RuntimeAdjust for the test sound directory pref.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2197 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-20 20:07:05 +00:00
Michael Bayne
07b9dc3177
Changed sound manager not to use LockableLRUHashMap because intermixing
...
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
2003-01-17 00:21:10 +00:00
Michael Bayne
1ce6951cb6
Repackaged a few things in media: sounds stuff went into media.sound and
...
image stuff went into media.image.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2100 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-08 04:09:03 +00:00
Michael Bayne
df30c37892
Log a more informative message when we catch an exception.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2059 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 19:00:25 +00:00
Michael Bayne
a2c3741b2b
A few things:
...
- Use Constant objects for the command constants because the toString()
output on those is more sensible.
- Fall back to the classpath if we don't find our resource in a bundle
- Don't make the sound manager thread a daemon thread as it provides a
shutdown() which is a more civilized way to make it go away anyhow and
allows the sound manager to be used in one-shot tools and test
programs. At the moment, the sound manager (on Linux at least) seems to
start up some threads that refuse to go away anyway but that's a problem
for another time.
- Report if a command is queued up that we don't know about.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-10 21:36:33 +00:00
Walter Korman
ee83234bee
Removed unused imports.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 04:42:54 +00:00
Michael Bayne
6caca5fe5a
Added code to easily disable the sound manager.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2039 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 22:41:10 +00:00
Ray Greenwell
83d9cf3363
added versions of lock() and unlock() that take a list of sound keys to
...
operate on.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2023 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 21:42:34 +00:00
Ray Greenwell
c321f7eb33
- added debug logging so that we can see the time elapsed between the
...
moment that a sound is requested to just before the LineSpooler object
that it was given to starts writing the data to a line.
- Turned drain() back on, but only if we're not running under linux.
If we're in linux, we instead sleep for 3 seconds, and gosh darn it, the
sound should be finished after that.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2019 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 02:14:12 +00:00
Ray Greenwell
d5cc64aa87
Went back to only draining when we detect that the line is active.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 21:22:46 +00:00
Ray Greenwell
0403db5e73
catch NPE. A song can be the top song on the stack and not be playing
...
if musicvolume is 0.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2001 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 21:41:53 +00:00
Ray Greenwell
2895b65909
- always drain again
...
- increased buffer size to 24k
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1999 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 00:12:14 +00:00
Ray Greenwell
dd87f55b45
Fuck the windows file separator character.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1998 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 00:08:36 +00:00
Ray Greenwell
f901cb3041
When testing, allow sounds to be cached if they're locked.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1997 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 21:14:11 +00:00
Ray Greenwell
54c486710d
When music is stopped because the volume is turned to 0, don't
...
remove it from the playing music stack.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1996 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 18:54:39 +00:00
Ray Greenwell
a4923a6151
bugfix
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1992 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 02:46:52 +00:00
Ray Greenwell
917ba53c59
- new sound loading jimmy where a package path and key specify a set of
...
sounds.
- added test sound directory setting.
- mp3 player needs more fixing, but allow some volume adjustment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1990 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 02:39:40 +00:00
Ray Greenwell
7b6f4893a2
cleanup
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1988 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-25 20:02:31 +00:00
Ray Greenwell
963ebdf137
Added note about the drain() bug.
...
Don't play clips or music if the appropriate volume is zero.
If music is turned off, stop current playback immediately, but also
start it back up if the volume is turned up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1987 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-23 03:24:26 +00:00
Ray Greenwell
ef2c1ccd8b
don't play sounds with clips, instead have threads that spool sound
...
data to open lines. Joy.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1986 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-23 02:09:36 +00:00
Michael Bayne
2c681d7291
A base class for our sound repository classes.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1985 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-22 21:54:49 +00:00
Ray Greenwell
f63d7cbe09
cleanup/commenting
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1984 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-22 19:21:12 +00:00
Ray Greenwell
1953e5686c
genericized music playing, made transitioning from any music type to any
...
other clean and good.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1983 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-22 04:23:31 +00:00
Ray Greenwell
4c19a90642
Music volume adjusts the mod player.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1979 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 23:06:33 +00:00
Ray Greenwell
2178d75392
mod playing capabilities.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1974 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 04:03:09 +00:00
Ray Greenwell
80c81b77c2
Load clips (just them for now) from a specific resource set.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 02:41:38 +00:00
Ray Greenwell
7da8317928
mp3 playing capabilities.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1964 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 01:33:34 +00:00
Ray Greenwell
20e9ccae57
Went back to not initing midi until the first song is played (and doing it
...
on the sound manager thread).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1963 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-19 21:17:35 +00:00
Ray Greenwell
b0aabf1478
Added support for attempting to use an alternate device to play midi,
...
even thought the java sequencer ignores the new Receiver.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1962 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-19 02:24:35 +00:00
Ray Greenwell
01b203fd13
added support for specifying # of loops for a song,
...
fixed up song stack handling with loop logic.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1956 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-16 03:17:41 +00:00
Ray Greenwell
125ef04e87
cleanup, figured out what's needed to loop midis consistently. More soon.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1954 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-16 00:13:47 +00:00
Ray Greenwell
1d602849f0
- removed verbose logging.
...
- when stopping a midi, remove the meta listener first so that we
don't get the event after we've tossed the sequencer.
- changed some variable names for clarity.
- added code to shutdown the midi system when we shutdown the rest.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1952 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-15 21:38:31 +00:00