diff options
author | Carsten Weisse <[email protected]> | 2005-12-04 17:26:55 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-12-04 17:26:55 +0000 |
commit | c380482161384f099d299993eea1b76b176fae7d (patch) | |
tree | 713c3eead2cd1fba130b65bac354be1b00001294 /src | |
parent | e3799171af42cb853e54177dda8022487ba0940c (diff) |
new interface
Diffstat (limited to 'src')
-rw-r--r-- | src/jake2/sound/DummyDriver.java | 11 | ||||
-rw-r--r-- | src/jake2/sound/jsound/JSoundImpl.java | 11 | ||||
-rw-r--r-- | src/jake2/sound/jsound/SND_DMA.java | 5 |
3 files changed, 18 insertions, 9 deletions
diff --git a/src/jake2/sound/DummyDriver.java b/src/jake2/sound/DummyDriver.java index e663d09..8f85ff0 100644 --- a/src/jake2/sound/DummyDriver.java +++ b/src/jake2/sound/DummyDriver.java @@ -3,7 +3,7 @@ * * Copyright (C) 2003 * - * $Id: DummyDriver.java,v 1.1 2004-07-08 20:56:49 hzi Exp $ + * $Id: DummyDriver.java,v 1.2 2005-12-04 17:26:33 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -26,6 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package jake2.sound; +import java.nio.ByteBuffer; + /** * DummyDriver * @@ -93,10 +95,13 @@ public final class DummyDriver implements Sound { /* (non-Javadoc) * @see jake2.sound.Sound#RawSamples(int, int, int, int, byte[]) */ - public void RawSamples(int samples, int rate, int width, int channels, byte[] data) { + public void RawSamples(int samples, int rate, int width, int channels, ByteBuffer data) { } - /* (non-Javadoc) + public void disableStreaming() { + } + + /* (non-Javadoc) * @see jake2.sound.Sound#StopAllSounds() */ public void StopAllSounds() { diff --git a/src/jake2/sound/jsound/JSoundImpl.java b/src/jake2/sound/jsound/JSoundImpl.java index 3a3cc46..d69424c 100644 --- a/src/jake2/sound/jsound/JSoundImpl.java +++ b/src/jake2/sound/jsound/JSoundImpl.java @@ -2,13 +2,13 @@ * JSoundImpl.java * Copyright (C) 2004 * - * $Id: JSoundImpl.java,v 1.1 2004-07-09 06:50:48 hzi Exp $ + * $Id: JSoundImpl.java,v 1.2 2005-12-04 17:26:55 cawe Exp $ */ package jake2.sound.jsound; +import java.nio.ByteBuffer; + import jake2.sound.*; -import jake2.sound.Sound; -import jake2.sound.sfx_t; /** * JSoundImpl @@ -91,8 +91,11 @@ public class JSoundImpl implements Sound { /* (non-Javadoc) * @see jake2.sound.Sound#RawSamples(int, int, int, int, byte[]) */ - public void RawSamples(int samples, int rate, int width, int channels, byte[] data) { + public void RawSamples(int samples, int rate, int width, int channels, ByteBuffer data) { SND_DMA.RawSamples(samples, rate, width, channels, data); } + + public void disableStreaming() { + } } diff --git a/src/jake2/sound/jsound/SND_DMA.java b/src/jake2/sound/jsound/SND_DMA.java index daadb57..455a256 100644 --- a/src/jake2/sound/jsound/SND_DMA.java +++ b/src/jake2/sound/jsound/SND_DMA.java @@ -2,7 +2,7 @@ * S_DMA.java * Copyright (C) 2004 * - * $Id: SND_DMA.java,v 1.2 2004-09-22 19:22:09 salomo Exp $ + * $Id: SND_DMA.java,v 1.3 2005-12-04 17:26:55 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -44,6 +44,7 @@ import jake2.util.Vargs; import java.io.IOException; import java.io.RandomAccessFile; +import java.nio.ByteBuffer; /** * SND_DMA TODO implement sound system @@ -878,7 +879,7 @@ public class SND_DMA extends SND_MIX { * Cinematic streaming and voice over network ============ */ static void RawSamples(int samples, int rate, int width, int channels, - byte[] data) { + ByteBuffer data) { //TODO RawSamples int i; int src, dst; |