Ejemplo n.º 1
0
UINT32 PlayVoice( void )
{
	CHAR8 zFileName[164];

	INT32 iSlot = gGameExternalOptions.iaIMPSlots[iCurrentVoice];
	Assert( (iSlot >= 0) && (iSlot <= 999) );

	sprintf( zFileName, "Speech\\%03d_001.ogg", iSlot );
	if ( !FileExists( zFileName ) )
	{
		sprintf( zFileName, "Speech\\%03d_001.wav", iSlot );
	}

	return(PlayJA2SampleFromFile( zFileName, RATE_11025, MIDVOLUME, 1, MIDDLEPAN ));
}
Ejemplo n.º 2
0
void PlayNewMessageSound( void )
{
	// play a new message sound, if there is one playing, do nothing
	static UINT32 uiSoundId = NO_SAMPLE;

	if( uiSoundId != NO_SAMPLE )
	{
		// is sound playing?..don't play new one
		if( SoundIsPlaying( uiSoundId ) == TRUE )
		{ 
			return;
		}
	}

	// otherwise no sound playing, play one
	uiSoundId = PlayJA2SampleFromFile( "Sounds\\newbeep.wav", RATE_11025, MIDVOLUME, 1 , MIDDLEPAN );

	return;
}