Commit Graph

375 Commits

Author SHA1 Message Date
Dave Hoover 1daf5c206b And of course, if I were thinking this morning, I would've rerun the organize imports
thing before committing instead of just going "oh yeah, I've been having this stuff
sitting around uncommitted for a while waiting on it to be blessed" and missing
out on things that'd changed in the meantime.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@665 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-26 17:35:27 +00:00
Dave Hoover b473318b12 More import cleanups to go with r662, along with a little bit of foreaching, widening, etc.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@664 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-26 17:29:23 +00:00
Charlie Groves b481c48791 Only log native library loading errors if we attempt to use it
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@663 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-26 00:34:23 +00:00
Michael Bayne 8e69ff612e Some import cleanups from Dave.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@662 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-25 22:16:10 +00:00
Charlie Groves 4b038fb8e1 Keep updating the tick time even if the sound manager is null
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@659 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-23 20:09:36 +00:00
Charlie Groves 62740fe546 Rather than trying to restrict the drift adjustment into a sane range, just stop applying it if it's huge or tiny.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@656 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-14 23:27:29 +00:00
Dave Hoover 1c864bf169 Javadoc warnings cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@655 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-12 18:04:58 +00:00
Michael Bayne e284b6cfc1 Unused import patrol.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@654 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-11 17:54:45 +00:00
Andrzej Kapolka 89f1f1938e Some changes to bring OpenAL code in line with OpenGL code: use a
Java object to represent each OpenAL object (listener, sources, 
and buffers) and delete the OpenAL object if the Java object is 
garbage-collected.  Added the full range of listener and source 
settings.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@653 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-10 23:55:25 +00:00
Andrzej Kapolka 5df6f85014 I don't think anything is using this. I'm moving it so that I
can extend it with Clyde-specific bits.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@652 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-10 00:50:46 +00:00
Andrzej Kapolka 5d3f025b7a Uncommented line after updating samskivert with the required
method.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@651 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-28 22:57:32 +00:00
Andrzej Kapolka adeab3efa2 Added methods to observe resource files for changes to their
last-modified timestamps (by manual polling).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@650 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-26 23:12:13 +00:00
Charlie Groves 60d2febeda Allow streams and sounds to have their gain controlled individually as well as from the overall control
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@649 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-26 22:17:11 +00:00
Charlie Groves e4cdad7741 Start up streams on the sound queue thread and handle OpenAL barfing on startup
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@648 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-26 20:23:02 +00:00
Charlie Groves fff73d94cc Expose the SoundLoader
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@647 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-23 21:07:47 +00:00
Charlie Groves aa171bdd0e Expose sound types being enabled or disabled
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@646 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-23 19:42:54 +00:00
Charlie Groves 135b25516e Hey, let's not just completely break locking and unlocking sounds
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@645 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-22 02:38:57 +00:00
Charlie Groves 329bedd523 Choose a random sound from multi-option sounds in the SoundLoader when told to
play a particular key.
Set the gain on streams before returning them in addition to during each update.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@644 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-22 02:02:54 +00:00
Michael Bayne a2f5bd532e In this case I think the helper function reduces clarity rather than adds.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@643 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-21 18:30:01 +00:00
Charlie Groves c06de7d51f Add ogg streaming to OpenALSoundPlayer
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@642 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-21 05:33:19 +00:00
Charlie Groves 81a2d3d104 Clean up some possible nulls to quiet Eclipse
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@641 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-21 01:50:06 +00:00
Charlie Groves 99fc1ddbf7 Uhh, probably makes sense to actually hook the volume setting up to the sound manager
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@640 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-21 01:43:08 +00:00
Charlie Groves 0abacd42d3 Give OpenALSoundPlayer its own thread and queue to keep it from sharing with the EDT and possibly blocking
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@639 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-20 23:31:21 +00:00
Andrzej Kapolka e399b4dd15 Avoid pesky stack overflows.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@635 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-19 21:11:32 +00:00
Dave Hoover 754566d011 Pedanticism police.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@632 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-15 23:19:44 +00:00
Charlie Groves 8a3c6c8614 There's no way to genericize the Comparable while using the static
ClipBuffer.makeKey to create them, and non-genericized Comparables make the
Baby Jesus(Nate) cry, so just drop the pretense and use String.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@631 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-15 22:38:46 +00:00
Charlie Groves 4aefa977b4 Expose shouldPlay
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@629 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-14 19:02:17 +00:00
Charlie Groves 8febded3b3 Nip a compiler warning
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@628 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-14 18:29:09 +00:00
Charlie Groves fbf539580e Readd a deprecated SoundManager that just extends JavaSoundPlayer to keep it around with its original name
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@626 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-14 00:51:34 +00:00
Charlie Groves fc32634412 Rename all the media.SoundManager stuff to variants on SoundPlayer to conflict
less with openal.SoundManager.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@625 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-14 00:50:17 +00:00
Michael Bayne 5c234af875 This needs to live in the openal package because all the OpenAL must not be
visible to things that don't want or care about OpenAL. Also, the openal
package is conditionally compiled, so this would have broken a Narya build that
didn't use the OpenAL libraries.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@624 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-13 22:49:34 +00:00
Charlie Groves e678d36262 Look at the big smart programmer using the library code instead of rolling his own, hacked-up shit
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@623 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-13 22:12:25 +00:00
Charlie Groves e4801b954f Pull the generic sound playing api from SoundManager up into
AbstractSoundManager and implement the actual sound playing with Java sound in
SoundManager and with OpenAL in OpenALSoundManager.  I left the SoundManager
name alone so nothing using it will need to change, but if nothing besides
yohoho is using it, I can refactor it to a more sane naming scheme.

Rip out all the music and alternative format stuff since it didn't work anyway.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@622 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-13 21:47:42 +00:00
Charlie Groves 7266e22085 Widening, modernization
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@620 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-11 04:34:50 +00:00
Charlie Groves 1949014c76 Exploratory house cleaning
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@611 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-07 18:11:31 +00:00
Dave Hoover 3122ae7e65 Checking if (foo = bar) is begging for disaster.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@610 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 21:13:41 +00:00
Charlie Groves 7386c62a68 Calculate the drain time using a long as a decent sized clip can overflow an int
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@609 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 20:28:15 +00:00
Charlie Groves db0e6f93e1 Document the return on play
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@608 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 18:49:33 +00:00
Charlie Groves 2e25cb021f Add a music sound type
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@607 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 18:46:01 +00:00
Charlie Groves e8103138e5 Add a run queue to dispatch the various key processing runnables on to keep them off the spooler threads
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@606 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 18:45:45 +00:00
Charlie Groves 66d476dcb3 Allow play, loop and unlock to pass in a Runnable to be called when they're processed to match lock
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@605 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 01:13:21 +00:00
Charlie Groves 2b5a96b147 A for effort on the auto-naming Eclipse, but there's no need to drag the underscore along. Too bad you can't make generic arrays not suck.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@601 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-04 23:51:07 +00:00
Charlie Groves 5567dcf2a1 Only dirty regions in the MediaOverlay corresponding to its actual media.
Since its dirty regions propagate out to the repaint manager, a big update
there would lead to dirty calls ping-ponging back and forth for a few cycles.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@600 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-04 23:38:12 +00:00
Charlie Groves ee6bf4a5b9 Whoops, that was supposed to be a regular loop. Caught by the Raydar.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@598 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-02 00:06:51 +00:00
Charlie Groves 4432a9d6f8 Add a second looping mode, LOOP_TO_COMPLETION, that finishes playing its
current run through the sound when stop is called before actually stopping.

Add a runnable to the lock method that will be called on the spooler thread
when locking is complete.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@597 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 23:46:17 +00:00
Mike Thomas d1de5f411d Rollback the sound manager change - it's causing significant slowdown.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@596 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 20:49:10 +00:00
Mike Thomas 8fd2dffd13 And, don't need this import either.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@595 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 17:23:12 +00:00
Mike Thomas a2324b526e Add a clarifying comment, and remove unnecessary assignment. I don't honestly recall if this was even intentionally included or a copy-paste error, but it does seem like knowing your image is busted at compile time is much better than not knowing til runtime.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@594 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 17:18:37 +00:00
Michael Bayne 659f5bc5e2 Code hygiene. Not as pedantic as I'd like, but I couldn't resist the huge time
saver that is Eclipse's "Infer generic types" which leaves HashMap and
ArrayList as the declared type where I would normally prefer to change those to
Map and List and use Maps and Lists to instantiate them.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@593 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 15:56:37 +00:00
Michael Bayne 60622c3590 Some code hygiene.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@592 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 14:39:57 +00:00