Early hack at emscripten compat.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4278 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
993d25620e
commit
1e9af3f441
24 changed files with 604 additions and 268 deletions
|
@ -102,12 +102,20 @@ static int SDL_InitCard(soundcardinfo_t *sc, int cardnum)
|
|||
desired.userdata = sc;
|
||||
memcpy(&obtained, &desired, sizeof(obtained));
|
||||
|
||||
|
||||
#ifdef FTE_TARGET_WEB
|
||||
if ( SDL_OpenAudio(&desired, NULL) < 0 )
|
||||
{
|
||||
Con_Printf("SDL: SNDDMA_Init: couldn't open sound device (%s).\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
obtained = desired;
|
||||
#else
|
||||
if ( SDL_OpenAudio(&desired, &obtained) < 0 )
|
||||
{
|
||||
Con_Printf("SDL: SNDDMA_Init: couldn't open sound device (%s).\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
sc->sn.numchannels = obtained.channels;
|
||||
sc->sn.speed = obtained.freq;
|
||||
sc->sn.samplebits = obtained.format&0xff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue