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
This commit is contained in:
+10
-14
@@ -1,7 +1,7 @@
|
|||||||
package com.threerings.media.sound;
|
//
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
package com.threerings.openal;
|
||||||
import static com.threerings.media.Log.log;
|
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -13,13 +13,11 @@ import com.google.common.collect.Maps;
|
|||||||
|
|
||||||
import com.samskivert.util.RunQueue;
|
import com.samskivert.util.RunQueue;
|
||||||
|
|
||||||
import com.threerings.media.sound.SoundManager.Frob;
|
import com.threerings.media.sound.SoundLoader;
|
||||||
import com.threerings.openal.Clip;
|
import com.threerings.media.sound.SoundManager;
|
||||||
import com.threerings.openal.ClipBuffer;
|
import com.threerings.media.sound.AbstractSoundManager;
|
||||||
import com.threerings.openal.ClipProvider;
|
|
||||||
import com.threerings.openal.Sound;
|
import static com.threerings.media.Log.log;
|
||||||
import com.threerings.openal.SoundGroup;
|
|
||||||
import com.threerings.openal.Stream;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plays sounds via OpenAL.
|
* Plays sounds via OpenAL.
|
||||||
@@ -77,11 +75,11 @@ public class OpenALSoundManager extends AbstractSoundManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Frob loop (String pkgPath, String key, float pan)
|
protected SoundManager.Frob loop (String pkgPath, String key, float pan)
|
||||||
{
|
{
|
||||||
final Sound sound = _group.getSound(pkgPath + key);
|
final Sound sound = _group.getSound(pkgPath + key);
|
||||||
sound.loop(true);
|
sound.loop(true);
|
||||||
return new Frob(){
|
return new SoundManager.Frob(){
|
||||||
public float getPan () {
|
public float getPan () {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -133,9 +131,7 @@ public class OpenALSoundManager extends AbstractSoundManager
|
|||||||
protected Map<String, ClipBuffer> _locked = Maps.newHashMap();
|
protected Map<String, ClipBuffer> _locked = Maps.newHashMap();
|
||||||
|
|
||||||
protected final SoundLoader _loader;
|
protected final SoundLoader _loader;
|
||||||
|
|
||||||
protected final SoundGroup _group;
|
protected final SoundGroup _group;
|
||||||
|
|
||||||
protected final com.threerings.openal.SoundManager _alSoundManager;
|
protected final com.threerings.openal.SoundManager _alSoundManager;
|
||||||
|
|
||||||
/** Number of sounds that can be played simultaneously. */
|
/** Number of sounds that can be played simultaneously. */
|
||||||
Reference in New Issue
Block a user