aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/sound
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/sound')
-rw-r--r--src/jake2/sound/S.java9
-rw-r--r--src/jake2/sound/Sound.java13
2 files changed, 17 insertions, 5 deletions
diff --git a/src/jake2/sound/S.java b/src/jake2/sound/S.java
index 8a3e133..716e854 100644
--- a/src/jake2/sound/S.java
+++ b/src/jake2/sound/S.java
@@ -2,7 +2,7 @@
* S.java
* Copyright (C) 2003
*
- * $Id: S.java,v 1.11 2005-05-26 16:56:33 hzi Exp $
+ * $Id: S.java,v 1.12 2005-12-04 17:26:14 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -30,6 +30,7 @@ import jake2.game.cvar_t;
import jake2.qcommon.Com;
import jake2.qcommon.Cvar;
+import java.nio.ByteBuffer;
import java.util.Vector;
/**
@@ -198,9 +199,13 @@ public class S {
Cinematic streaming and voice over network
============
*/
- public static void RawSamples(int samples, int rate, int width, int channels, byte[] data) {
+ public static void RawSamples(int samples, int rate, int width, int channels, ByteBuffer data) {
impl.RawSamples(samples, rate, width, channels, data);
}
+
+ public static void disableStreaming() {
+ impl.disableStreaming();
+ }
/*
==================
diff --git a/src/jake2/sound/Sound.java b/src/jake2/sound/Sound.java
index 30bd8c6..c25895d 100644
--- a/src/jake2/sound/Sound.java
+++ b/src/jake2/sound/Sound.java
@@ -3,7 +3,7 @@
*
* Copyright (C) 2003
*
- * $Id: Sound.java,v 1.1 2004-07-08 20:56:49 hzi Exp $
+ * $Id: Sound.java,v 1.2 2005-12-04 17:26:14 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -26,13 +26,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.sound;
+import jake2.Defines;
+
+import java.nio.ByteBuffer;
+
/**
* Sound
*
* @author cwei
*/
public interface Sound {
-
+
+ static final int MAX_SFX = Defines.MAX_SOUNDS * 2;
+ static final int STREAM_QUEUE = 4;
String getName();
@@ -93,8 +99,9 @@ public interface Sound {
Cinematic streaming and voice over network
============
*/
- void RawSamples(int samples, int rate, int width, int channels, byte[] data);
+ void RawSamples(int samples, int rate, int width, int channels, ByteBuffer data);
+ void disableStreaming();
/*
==================
S_StopAllSounds