mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
fix snd_numspeakers 1, put DOOMWADS define stuff around doom sounds again
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2255 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
469fb50e57
commit
6cbf2b2f32
2 changed files with 6 additions and 2 deletions
|
@ -202,6 +202,7 @@ void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, qbyte *data)
|
|||
}
|
||||
|
||||
//=============================================================================
|
||||
#ifdef DOOMWADS
|
||||
// needs fine tuning.. educated guesses
|
||||
#define DSPK_RATE 128
|
||||
#define DSPK_FREQ 31
|
||||
|
@ -318,6 +319,7 @@ sfxcache_t *S_LoadDoomSound (sfx_t *s, qbyte *data, int datalen, int sndspeed)
|
|||
|
||||
return sc;
|
||||
}
|
||||
#endif
|
||||
|
||||
sfxcache_t *S_LoadWavSound (sfx_t *s, qbyte *data, int datalen, int sndspeed)
|
||||
{
|
||||
|
@ -360,8 +362,10 @@ S_LoadSound_t AudioInputPlugins[10] =
|
|||
S_LoadOVSound,
|
||||
#endif
|
||||
S_LoadWavSound,
|
||||
#ifdef DOOMWADS
|
||||
S_LoadDoomSound,
|
||||
S_LoadDoomSpeakerSound,
|
||||
#endif
|
||||
};
|
||||
|
||||
qboolean S_RegisterSoundInputPlugin(S_LoadSound_t loadfnc)
|
||||
|
|
|
@ -315,11 +315,11 @@ void S_TransferPaintBuffer(soundcardinfo_t *sc, int endtime)
|
|||
p = (int *) paintbuffer;
|
||||
count = (endtime - sc->paintedtime) * sc->sn.numchannels;
|
||||
out_mask = sc->sn.samples - 1;
|
||||
out_idx = sc->paintedtime * sc->sn.numchannels & out_mask;
|
||||
out_idx = (sc->paintedtime * sc->sn.numchannels) & out_mask;
|
||||
if (sc->sn.numchannels>2)
|
||||
step = 1;
|
||||
else
|
||||
step = 3 - sc->sn.numchannels;
|
||||
step = 6;
|
||||
snd_vol = volume.value*256;
|
||||
|
||||
pbuf = sc->Lock(sc);
|
||||
|
|
Loading…
Reference in a new issue