attempt fix minimal build, add 7.1, try to fix speaker spacialization
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3846 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
7f1db63765
commit
c6f4994293
4 changed files with 41 additions and 10 deletions
|
@ -3405,7 +3405,9 @@ double Host_Frame (double time)
|
|||
cl.gametimemark += time;
|
||||
|
||||
idle = (cls.state == ca_disconnected) ||
|
||||
#ifdef VM_UI
|
||||
UI_MenuState() != 0 ||
|
||||
#endif
|
||||
key_dest == key_menu ||
|
||||
key_dest == key_editor ||
|
||||
cl.paused;
|
||||
|
|
|
@ -545,7 +545,16 @@ int DSOUND_InitCard (soundcardinfo_t *sc, int cardnum)
|
|||
|
||||
memset (&format, 0, sizeof(format));
|
||||
|
||||
if (sc->sn.numchannels >= 6) //5.1 surround
|
||||
if (sc->sn.numchannels >= 8) // 7.1 surround
|
||||
{
|
||||
format.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
|
||||
format.Format.cbSize = 22;
|
||||
memcpy(&format.SubFormat, &KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID));
|
||||
|
||||
format.dwChannelMask = KSAUDIO_SPEAKER_7POINT1;
|
||||
sc->sn.numchannels = 8;
|
||||
}
|
||||
else if (sc->sn.numchannels >= 6) //5.1 surround
|
||||
{
|
||||
format.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
|
||||
format.Format.cbSize = 22;
|
||||
|
|
|
@ -728,26 +728,46 @@ void S_DefaultSpeakerConfiguration(soundcardinfo_t *sc)
|
|||
sc->dist[4] = 1;
|
||||
sc->dist[5] = 1;
|
||||
|
||||
if (sc->sn.numchannels < 3)
|
||||
switch (sc->sn.numchannels)
|
||||
{
|
||||
case 1:
|
||||
VectorSet(sc->speakerdir[0], 0, 0, 0);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
VectorSet(sc->speakerdir[0], 0, -1, 0);
|
||||
VectorSet(sc->speakerdir[1], 0, 1, 0);
|
||||
}
|
||||
else if (sc->sn.numchannels < 5)
|
||||
{
|
||||
VectorSet(sc->speakerdir[2], 0, 0, 0);
|
||||
break;
|
||||
case 4: // quad
|
||||
case 5:
|
||||
VectorSet(sc->speakerdir[0], 0.7, -0.7, 0);
|
||||
VectorSet(sc->speakerdir[1], 0.7, 0.7, 0);
|
||||
VectorSet(sc->speakerdir[2], -0.7, -0.7, 0);
|
||||
VectorSet(sc->speakerdir[3], -0.7, 0.7, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorSet(sc->speakerdir[4], 0, 0, 0);
|
||||
break;
|
||||
case 6: // 5.1
|
||||
case 7:
|
||||
VectorSet(sc->speakerdir[0], 0.7, -0.7, 0);
|
||||
VectorSet(sc->speakerdir[1], 0.7, 0.7, 0);
|
||||
VectorSet(sc->speakerdir[2], 0, 0, 0);
|
||||
VectorSet(sc->speakerdir[2], 1, 0, 0);
|
||||
VectorSet(sc->speakerdir[3], 0, 0, 0);
|
||||
VectorSet(sc->speakerdir[4], -0.7, -0.7, 0);
|
||||
VectorSet(sc->speakerdir[5], -0.7, 0.7, 0);
|
||||
VectorSet(sc->speakerdir[6], 0, 0, 0);
|
||||
break;
|
||||
case 8: // 7.1
|
||||
default:
|
||||
VectorSet(sc->speakerdir[0], 0.7, -0.7, 0);
|
||||
VectorSet(sc->speakerdir[1], 0.7, 0.7, 0);
|
||||
VectorSet(sc->speakerdir[2], 1, 0, 0);
|
||||
VectorSet(sc->speakerdir[3], 0, 0, 0);
|
||||
VectorSet(sc->speakerdir[4], -0.7, -0.7, 0);
|
||||
VectorSet(sc->speakerdir[5], -0.7, 0.7, 0);
|
||||
VectorSet(sc->speakerdir[6], 0, -1, 0);
|
||||
VectorSet(sc->speakerdir[7], 0, 1, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define __SOUND__
|
||||
|
||||
// !!! if this is changed, it much be changed in asm_i386.h too !!!
|
||||
#define MAXSOUNDCHANNELS 6 //on a per device basis
|
||||
#define MAXSOUNDCHANNELS 8 //on a per device basis
|
||||
|
||||
// !!! if this is changed, it much be changed in asm_i386.h too !!!
|
||||
struct sfx_s;
|
||||
|
|
Loading…
Reference in a new issue