caudio/Headers/cUtils.h
Joshua Jones 6b3e9c5a9d Moved sample sounds to a media folder and removed the copy of bling.ogg from bin
Updated logger to allow a user to create callbacks to receive log messages
Logger also gives more information, time the message was sent, the source, the importance, and the message itself.
User can now query playback devices and specify the device for the audio manager to use.  The audio manager is no longer a singleton, although creating multiple managers is not advised.
Clean up and optimization of manager initialization code.
IAudioCapture can now be told which device to capture audio from.  The user can also create multiple IAudioCaptures to capture audio from multiple sources at the same time.
Added additional error checking.
A seperate thread is used to capture audio now.
Defines added to allow a user to remove support for default codecs.
2009-11-20 03:39:56 +00:00

19 lines
533 B
C++

#ifndef CUTILS_H_INCLUDED
#define CUTILS_H_INCLUDED
#include <string>
//!Grabs the current extention of a given string.
static std::string getExt(const std::string& filename)
{
if(filename.find_last_of(".") == std::string::npos) return filename;
return filename.substr(filename.find_last_of(".") + 1, filename.length()-filename.find_last_of(".")-1);
}
static std::string safeCStr(const char* str)
{
if( str != NULL ) return std::string(str);
else return std::string("");
}
#endif //! CUTILS_H_INCLUDED