Esempio n. 1
0
// Play the given sound number.
// Volume is max at F1_0.
void digi_play_sample( int soundno, fix max_volume )
{
	if ( Newdemo_state == ND_STATE_RECORDING )
		newdemo_record_sound( soundno );

	if (!digi_initialised) return;

        if (digi_xlat_sound(soundno) < 0 ) return;

	digi_start_sound(soundno, max_volume, F0_5);
}
Esempio n. 2
0
void digi_play_sample( int soundno, fix max_volume )
{
	if ( Newdemo_state == ND_STATE_RECORDING )
		newdemo_record_sound( soundno );

	soundno = digi_xlat_sound(soundno);

	if (soundno < 0 ) return;

   // start the sample playing
	digi_start_sound( soundno, max_volume, 0xffff/2, 0, -1, -1, -1 );
}
Esempio n. 3
0
// Play the given sound number.
// Volume is max at F1_0.
void digi_play_sample( int soundno, fix max_volume )
{
#ifdef NEWDEMO
	if ( Newdemo_state == ND_STATE_RECORDING )
		newdemo_record_sound( soundno );
#endif
	soundno = digi_xlat_sound(soundno);

	if (!digi_initialised) return;

	if (soundno < 0 ) return;

	digi_start_sound(soundno, max_volume, F0_5, 0, 0, 0, 0);
}
Esempio n. 4
0
// Play the given sound number. If the sound is already playing,
// restart it.
void digi_play_sample_once( int soundno, fix max_volume )
{
	int i;

	if ( Newdemo_state == ND_STATE_RECORDING )
		newdemo_record_sound( soundno );

	if (!digi_initialised) return;

        if (digi_xlat_sound(soundno) < 0 ) return;

	LOCK();
        for (i=0; i < MAX_SOUND_SLOTS; i++)
          if (SoundSlots[i].soundno == soundno)
            SoundSlots[i].playing = 0;
	UNLOCK();
	digi_start_sound(soundno, max_volume, F0_5);
}
Esempio n. 5
0
// Play the given sound number. If the sound is already playing,
// restart it.
void digi_play_sample_once( int soundno, fix max_volume )
{
	int i;

#ifdef NEWDEMO
	if ( Newdemo_state == ND_STATE_RECORDING )
		newdemo_record_sound( soundno );
#endif
	soundno = digi_xlat_sound(soundno);

	if (!digi_initialised) return;

	if (soundno < 0 ) return;

        for (i=0; i < MAX_SOUND_SLOTS; i++)
          if (SoundSlots[i].soundno == soundno)
            SoundSlots[i].playing = 0;
	digi_start_sound(soundno, max_volume, F0_5, 0, 0, 0, 0);

}
Esempio n. 6
0
// Play the given sound number. If the sound is already playing,
// restart it.
void digi_play_sample_once( int soundno, fix max_volume )
{
 int i;

#ifdef NEWDEMO
   if ( Newdemo_state == ND_STATE_RECORDING )
    newdemo_record_sound( soundno );
#endif
   if (!digi_initialised)
    return;
   if (digi_xlat_sound(soundno) < 0 )
    return;

   for (i=0; i < MAX_SOUND_SLOTS; i++)
    if (SoundSlots[i].soundno == soundno)
     {
       DS_release_slot(i,1);
     }

  digi_start_sound(soundno, max_volume, F0_5);
}
Esempio n. 7
0
void digi_play_sample( int sndnum, fix max_volume )
{
	OSErr err;
	int i, vol;

	if (Newdemo_state == ND_STATE_RECORDING)
		newdemo_record_sound(sndnum);

	if (!digi_initialized) return;
	if (digi_paused) {
		digi_resume_all();
		if (digi_paused)
			return;
	}
	if ( sndnum < 0 ) return;

	i = digi_xlat_sound(sndnum);
	if (i == -1) return;

	vol = fixmuldiv(max_volume, digi_volume, F1_0);
	ChangeSoundVolume(i, vol );
	err = BeginSound(i, SOUND_RATE_11k);
	ChangeSoundStereoPosition(i, 0);
}