本文整理汇总了C++中FMOD_ErrorString函数的典型用法代码示例。如果您正苦于以下问题:C++ FMOD_ErrorString函数的具体用法?C++ FMOD_ErrorString怎么用?C++ FMOD_ErrorString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FMOD_ErrorString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printf
bool BrainSoundFMODEX::checkResult(const FMOD_RESULT& result) const
{
if (result != FMOD_OK)
{
printf("ERROR/FMOD - (%d) %s\n", result, FMOD_ErrorString(result));
return false;
}
return true;
}
示例2: checkFmodResult
void checkFmodResult(FMOD_RESULT result)
{
if(result != FMOD_OK)
{
std::string message(FMOD_ErrorString(result));
GameEngine::getSingleton().getLog()->logMessage("FMOD error: " + message, Ogre::LML_CRITICAL);
throw std::runtime_error("FMOD error:" + message);
}
}
示例3: FMOD_Channel_SetVolume
//sets the actual playing sound's volume
void Sound::setVolume (float v) {
if (possible && on && v >= 0.0f && v <= 1.0f) {
FMOD_RESULT vol = FMOD_Channel_SetVolume(channel, v);
printf("%s\n", FMOD_ErrorString(vol));
if(channel) {
printf("A channel is present\n");
}
}
}
示例4: ERRCHECK_bank
void ERRCHECK_bank(FMOD_RESULT result, const char *file, int line)
{
#ifdef _DEBUG
if (result != FMOD_OK)
{
BaseSubsystems::Log::Error(FMOD_ErrorString(result));
}
#endif
}
示例5: FAIL
void SoundSystem::FSOUND_SetMute(int channel, signed char mute)
{
signed char r = ::FSOUND_SetMute(channel, mute);
#ifndef NDEBUG
if(r == FALSE)
{
if(mute)
{
FAIL("Failed to mute channel " + itos(channel) + ": " + FMOD_ErrorString(FSOUND_GetError()));
}
else
{
FAIL("Failed to unmute channel " + itos(channel) + ": " + FMOD_ErrorString(FSOUND_GetError()));
}
}
#endif
}
示例6: ERRCHECK
static void ERRCHECK(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
assert( 0 );
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
::exit(-1);
}
}
示例7: FmodErrorCheck
void FmodErrorCheck(FMOD_RESULT result) // this is an error handling function
{ // for FMOD errors
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s", result, FMOD_ErrorString(result));
std::system("Pause");
exit(-1);
}
}
示例8: ERRCHECK
bool ERRCHECK(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
return true;
}
return false;
}
示例9: printf
int Music::initSound(void) {
this->scaler=12;
this->accumSeconds=0;
FMOD_RESULT result;
result = FMOD::System_Create(&system);
if(result != FMOD_OK)
{
printf("Music: Patada! (%d) %s\n", result, FMOD_ErrorString(result));
return -1;
}
else
{
result = system->setOutput(FMOD_OUTPUTTYPE_ALSA);
result = system->setDSPBufferSize(512, 4);
result = system->init(100, FMOD_INIT_NORMAL, 0);
// FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), true); // TODO
if(result != FMOD_OK)
{
printf("Music: Ay! %s\n", FMOD_ErrorString(result));
int numDrivers;
system->getNumDrivers(&numDrivers);
printf("There are %d available drivers\n", numDrivers);
for(int i = 0; i < numDrivers; i++)
{
char driverName[255];
system->getDriverInfo(i, driverName, 255, 0);
printf("%d %s\n", i, driverName);
}
exit(-1);
}
else
{
this->musicStarted=0;
return(0);
}
}
}
示例10: FMOD_ErrorString
//For errorchecking the results of FMOD functions
void SoundManager::FMODErrorCheck(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
//Makes an stringstream with error message and send to messagebox function
std::stringstream _ss;
_ss << "FMOD error! (" << result << ") " << FMOD_ErrorString(result) << "\nGame Shutting Down";
MessageBoxAndShutDown(&_ss);
}
}
示例11: FSOUND_Sample_GetMode
void LLAudioBufferFMOD::set3DMode(bool use3d)
{
U16 current_mode = FSOUND_Sample_GetMode(mSamplep);
if (use3d)
{
if (!FSOUND_Sample_SetMode(mSamplep, (current_mode & (~FSOUND_2D))))
{
llwarns << "LLAudioBufferFMOD::set3DMode error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
}
else
{
if (!FSOUND_Sample_SetMode(mSamplep, current_mode | FSOUND_2D))
{
llwarns << "LLAudioBufferFMOD::set3DMode error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
}
}
示例12: ErrorCheck
void AudioClip::ErrorCheck(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
string errorString = "FMOD Error! ";
errorString.append(std::to_string(result));
errorString.append(" ").append(FMOD_ErrorString(result));
debugging::Debug::LogError(nullptr, errorString.c_str());
}
}
示例13: FMOD_ErrorString
bool
CFModExDriver::ERRCHECK(const FMOD_RESULT& result)
{
if (result != FMOD_OK)
{
_LOG_ERROR << "FMOD error! " << result << FMOD_ErrorString(result);
return true;
}
return false;
}
示例14: FMOD_ERRCHECK
void FMOD_ERRCHECK(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
#if defined(INTERACTIVE)
system("pause");
#endif
exit(-1);
}
}
示例15: printf
// Play the sound once
void Sound2D::Play()
{
FMOD_RESULT result;
result = mSystem->playSound(FMOD_CHANNEL_FREE, mSound, false, NULL);
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
exit(-1);
}
}