当前位置: 首页>>代码示例>>C++>>正文


C++ FMOD_ErrorString函数代码示例

本文整理汇总了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;
}
开发者ID:Zitrax,项目名称:brainblast,代码行数:9,代码来源:BrainSoundFMODEX.cpp

示例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);
	}
}
开发者ID:mikoro,项目名称:ramparted,代码行数:9,代码来源:SoundManager.cpp

示例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");
      }
    }
}
开发者ID:AlexTalker,项目名称:glPortal,代码行数:10,代码来源:Sound.cpp

示例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
}
开发者ID:albmarvil,项目名称:The-Eternal-Sorrow,代码行数:9,代码来源:Bank.cpp

示例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
}
开发者ID:foxostro,项目名称:heroman,代码行数:18,代码来源:SoundSystem.cpp

示例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);
		}
	}
开发者ID:uvbs,项目名称:GameProject,代码行数:9,代码来源:AudioPlayer.cpp

示例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);
		}
	}
开发者ID:YuMao1993,项目名称:XRealityRender,代码行数:9,代码来源:XRSoundManager.cpp

示例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;
}
开发者ID:DanMacDonald,项目名称:LoomSDK,代码行数:9,代码来源:FmodAudioPlayer.cpp

示例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);
		}
	}
}
开发者ID:imclab,项目名称:demoscene,代码行数:44,代码来源:Music_fmod.cpp

示例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);
	}
}
开发者ID:NiceGuyAndersson,项目名称:S.A.M,代码行数:11,代码来源:SoundManager.cpp

示例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;
		}
	}
}
开发者ID:PixelTomsen,项目名称:SingularityViewer,代码行数:19,代码来源:llaudioengine_fmod.cpp

示例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());
		}
	}
开发者ID:Ossadtchii,项目名称:PIXEL2D,代码行数:10,代码来源:AudioClip.cpp

示例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;
}
开发者ID:teto,项目名称:bluecosmos,代码行数:10,代码来源:CFModExDriver.cpp

示例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);
	}
}
开发者ID:pulkomandy,项目名称:.theRush-,代码行数:11,代码来源:main.cpp

示例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);
		}
	}
开发者ID:thomasjevskij,项目名称:Pacman,代码行数:12,代码来源:Sound2D.cpp


注:本文中的FMOD_ErrorString函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。