void digi_play_sample_3d( int sndnum, int angle, int volume, int no_dups ) { int vol; int i = sndnum, demo_angle; if (Newdemo_state == ND_STATE_RECORDING) { demo_angle = fixmuldiv(angle, F1_0, 255); if (no_dups) newdemo_record_sound_3d_once(sndnum, demo_angle, volume); else newdemo_record_sound_3d(sndnum, demo_angle, volume); } 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(volume, digi_volume, F1_0); ChangeSoundVolume( i, vol ); BeginSound(i, SOUND_RATE_11k); ChangeSoundStereoPosition(i, angle); }
void digi_play_sample_3d( int soundno, int angle, int volume, int no_dups ) // Volume from 0-0x7fff { no_dups = 1; if ( Newdemo_state == ND_STATE_RECORDING ) { if ( no_dups ) newdemo_record_sound_3d_once( soundno, angle, volume ); else newdemo_record_sound_3d( soundno, angle, volume ); } if (!digi_initialised) return; if (digi_xlat_sound(soundno) < 0 ) return; if (volume < MIN_VOLUME ) return; digi_start_sound(soundno, volume, angle); }
void digi_play_sample_3d( int soundno, int angle, int volume, int no_dups ) { no_dups = 1; if ( Newdemo_state == ND_STATE_RECORDING ) { if ( no_dups ) newdemo_record_sound_3d_once( soundno, angle, volume ); else newdemo_record_sound_3d( soundno, angle, volume ); } soundno = digi_xlat_sound(soundno); if (soundno < 0 ) return; if (volume < 10 ) return; // start the sample playing digi_start_sound( soundno, volume, angle, 0, -1, -1, -1 ); }