コード例 #1
0
// start playing the sound, all ambient sounds loop
bool JAmbientSound::Loop(JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv))
{
	ISoundItem*	aSnd = g_SoundManager->LoadItem(m_FileName);

	if (aSnd)
		aSnd->PlayAsAmbient();
	else
		debug_printf(L"sound item could not be loaded to loop: %ls\n", m_FileName.string().c_str());

	return true;
}
コード例 #2
0
// start playing the sound, all ambient sounds loop
bool JAmbientSound::Loop(JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv))
{
#if CONFIG2_AUDIO
	if ( g_SoundManager ) {
		ISoundItem*	aSnd = g_SoundManager->LoadItem(m_FileName);

		if (aSnd)
			aSnd->PlayAsAmbient();
	}
#endif // CONFIG2_AUDIO
	return true;
}