Example #1
0
	int DemoEntry(int argc, char *argv[])
	{
		gSoloud.init(SoLoud::Soloud::CLIP_ROUNDOFF | SoLoud::Soloud::ENABLE_VISUALIZATION);
		gSoloud.setGlobalVolume(0.75);
		gSoloud.setPostClipScaler(0.75);

		gSpeechbusHandle = gSoloud.play(gSpeechbus);
		gSfxbusHandle = gSoloud.play(gSfxbus);
		gMusicbusHandle = gSoloud.play(gMusicbus);

		gSpeech[0].setText("There is flaky pastry in my volkswagon.");
		gSpeech[1].setText("The fragmentation of empiricism is hardly influential in its interdependence.");
		gSpeech[2].setText("Sorry, my albatros is not inflatable.");
		gSpeech[3].setText("The clairvoyance of omnipotence is in fact quite closed-minded in its ecology.");
		gSpeech[4].setText("Cheese is quite nice.");
		gSpeech[5].setText("Pineapple Scones with Squash and Pastrami Sandwich");
		gSpeech[6].setText("The smart trader nowadays will be sure not to prorate OTC special-purpose entities.");
		gSpeech[7].setText("The penguins are in the toilets.");
		gSpeech[8].setText("Don't look, but there is a mountain lion stalking your children");
		gSpeech[9].setText("The train has already gone, would you like to hire a bicycle?");

		gSfxloop.load("audio/war_loop.ogg");
		gSfxloop.setLooping(1);
		gMusicloop.load("audio/algebra_loop.ogg");
		gMusicloop.setLooping(1);

		gSfxbus.play(gSfxloop);
		gMusicbus.play(gMusicloop);
		return 0;
	}
Example #2
0
int DemoEntry(int argc, char *argv[])
{
	gSoloud.init(SoLoud::Soloud::CLIP_ROUNDOFF | SoLoud::Soloud::ENABLE_VISUALIZATION);
	gSoloud.setGlobalVolume(4);
	gSoloud.setMaxActiveVoiceCount(16);
	int i;
	for (i = 0; i < VOICES; i++)
	{
		gSfx[i].loadPreset(SoLoud::Sfxr::COIN, i);
		gSfx[i].setLooping(1);
		gSfx[i].setInaudibleBehavior(false, false); // make sure we don't kill inaudible sounds
		gSfx[i].set3dMinMaxDistance(1, 100);
		gSfx[i].set3dAttenuation(SoLoud::AudioSource::LINEAR_DISTANCE, 1);
	}
	int j;
	for (i = 0; i < VOICEGRID; i++)
	{
		for (j = 0; j < VOICEGRID; j++)
		{
			gSndHandle[i * VOICEGRID + j] = gSoloud.play3d(gSfx[i * VOICEGRID + j], i * 15 + 20.0f, 0, j * 15 + 20.0f);
		}
	}
	return 0;
}