This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 85e40379d6f151fc7757dc6e70c6b9a5a3e15a3d
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Wed Mar 12 00:30:27 2014 +0000

    All: Don't mix sfx with NULL soundData / DMA 44kHz needs more memory for 
sound buffers
---
 MP/code/client/snd_mem.c | 2 +-
 MP/code/client/snd_mix.c | 4 ++++
 SP/code/client/snd_mem.c | 2 +-
 SP/code/client/snd_mix.c | 4 ++++
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/MP/code/client/snd_mem.c b/MP/code/client/snd_mem.c
index c5bc8db..93f9c7d 100644
--- a/MP/code/client/snd_mem.c
+++ b/MP/code/client/snd_mem.c
@@ -81,7 +81,7 @@ void SND_setup(void) {
 
        cv = Cvar_Get( "com_soundMegs", DEF_COMSOUNDMEGS, CVAR_LATCH | 
CVAR_ARCHIVE );
 
-       scs = (cv->integer*1536);
+       scs = (cv->integer*1536*dma.speed/22050.0f);
 
        buffer = malloc(scs*sizeof(sndBuffer) );
        // allocate the stack based hunk allocator
diff --git a/MP/code/client/snd_mix.c b/MP/code/client/snd_mix.c
index 38bd0aa..f4fa01a 100644
--- a/MP/code/client/snd_mix.c
+++ b/MP/code/client/snd_mix.c
@@ -711,6 +711,10 @@ void S_PaintChannels( int endtime ) {
                        ltime = s_paintedtime;
                        sc = ch->thesfx;
 
+                       if (sc->soundData==NULL || sc->soundLength==0) {
+                               continue;
+                       }
+
                        sampleOffset = ltime - ch->startSample;
                        count = end - ltime;
                        if ( sampleOffset + count > sc->soundLength ) {
diff --git a/SP/code/client/snd_mem.c b/SP/code/client/snd_mem.c
index b5b8500..f6c59ba 100644
--- a/SP/code/client/snd_mem.c
+++ b/SP/code/client/snd_mem.c
@@ -81,7 +81,7 @@ void SND_setup(void) {
 
        cv = Cvar_Get( "com_soundMegs", DEF_COMSOUNDMEGS, CVAR_LATCH | 
CVAR_ARCHIVE );
 
-       scs = (cv->integer*1536);
+       scs = (cv->integer*1536*dma.speed/22050.0f);
 
        buffer = malloc(scs*sizeof(sndBuffer) );
        // allocate the stack based hunk allocator
diff --git a/SP/code/client/snd_mix.c b/SP/code/client/snd_mix.c
index d86fa0d..d61f712 100644
--- a/SP/code/client/snd_mix.c
+++ b/SP/code/client/snd_mix.c
@@ -970,6 +970,10 @@ void S_PaintChannels( int endtime ) {
                                S_memoryLoad( sc );
                        }
 
+                       if (sc->soundData==NULL || sc->soundLength==0) {
+                               continue;
+                       }
+
                        sampleOffset = ltime - ch->startSample;
                        count = end - ltime;
                        if ( sampleOffset + count > sc->soundLength ) {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to