1
0
forked from 0ad/0ad
0ad/source/lib/sysdep/snd.cpp
janwas 0bb0df5b2c # new year's cleanup (reduce dependencies, clean up headers)
- remove headers always included from PCH
- nommgr.h is only included ifdef REDEFINED_NEW (allows leaving out the
mmgr stuff)
- in lib/*.cpp, moved the corresponding include file to right behind the
PCH (catches headers that aren't compilable by themselves)
- byte_order no longer depends on SDL
- add debug_level (another means of filtering debug output; needed for
thesis)
- split posix stuff up into subdirs (lib/posix and sysdep/win/wposix).
makes including only some of the modules (e.g. sockets, time) much
easier.

This was SVN commit r4728.
2007-01-01 21:25:47 +00:00

44 lines
1.2 KiB
C++

/**
* =========================================================================
* File : snd.cpp
* Project : 0 A.D.
* Description : sound card detection.
*
* @author Jan.Wassenberg@stud.uni-karlsruhe.de
* =========================================================================
*/
/*
* Copyright (c) 2003-2005 Jan Wassenberg
*
* Redistribution and/or modification are also permitted under the
* terms of the GNU General Public License as published by the
* Free Software Foundation (version 2 or later, at your option).
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include "precompiled.h"
#include "snd.h"
#include "lib/lib.h"
char snd_card[SND_CARD_LEN];
char snd_drv_ver[SND_DRV_VER_LEN];
void snd_detect()
{
#if OS_WIN
extern LibError win_get_snd_info();
win_get_snd_info();
#else
// At least reset the values for unhandled platforms. Should perhaps do
// something like storing the OpenAL version or similar.
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
}