2006-04-23 16:14:18 -07:00
|
|
|
/**
|
|
|
|
|
* =========================================================================
|
|
|
|
|
* File : snd.cpp
|
|
|
|
|
* Project : 0 A.D.
|
|
|
|
|
* Description : sound card detection.
|
|
|
|
|
* =========================================================================
|
|
|
|
|
*/
|
|
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
// license: GPL; see lib/license.txt
|
2006-04-23 16:14:18 -07:00
|
|
|
|
|
|
|
|
#include "precompiled.h"
|
2007-01-01 13:25:47 -08:00
|
|
|
#include "snd.h"
|
2006-04-23 16:14:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
char snd_card[SND_CARD_LEN];
|
|
|
|
|
char snd_drv_ver[SND_DRV_VER_LEN];
|
|
|
|
|
|
|
|
|
|
void snd_detect()
|
|
|
|
|
{
|
2007-05-26 08:34:10 -07:00
|
|
|
// note: OpenAL alGetString is worthless: it only returns
|
|
|
|
|
// OpenAL API version and renderer (e.g. "Software").
|
|
|
|
|
|
2006-04-23 16:14:18 -07:00
|
|
|
#if OS_WIN
|
|
|
|
|
extern LibError win_get_snd_info();
|
|
|
|
|
win_get_snd_info();
|
|
|
|
|
#else
|
2007-05-26 08:34:10 -07:00
|
|
|
// At least reset the values for unhandled platforms.
|
2006-04-23 16:14:18 -07:00
|
|
|
debug_assert(SND_CARD_LEN >= 8 && SND_DRV_VER_LEN >= 8); // protect strcpy
|
|
|
|
|
SAFE_STRCPY(snd_card, "Unknown");
|
|
|
|
|
SAFE_STRCPY(snd_drv_ver, "Unknown");
|
|
|
|
|
#endif
|
2006-11-07 05:28:03 -08:00
|
|
|
}
|