- fix debug assertion, cleanup vestigial A_PlaySound addition

This commit is contained in:
Rachael Alexanderson 2020-03-03 22:50:01 -05:00
parent 9e5444f8ae
commit 178cf40428
4 changed files with 5 additions and 5 deletions

View file

@ -179,7 +179,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_PlaySound, A_PlaySound)
PARAM_FLOAT(attenuation); PARAM_FLOAT(attenuation);
PARAM_BOOL(local); PARAM_BOOL(local);
PARAM_FLOAT(pitch); PARAM_FLOAT(pitch);
A_PlaySound(self, soundid, channel, volume, looping, attenuation, local, pitch, 0.0f); A_PlaySound(self, soundid, channel, volume, looping, attenuation, local, pitch);
return 0; return 0;
} }

View file

@ -479,11 +479,11 @@ void A_StartSound(AActor *self, int soundid, int channel, int flags, double volu
S_PlaySoundPitch(self, channel, EChanFlags::FromInt(flags), soundid, (float)volume, (float)attenuation, (float)pitch, (float)startTime); S_PlaySoundPitch(self, channel, EChanFlags::FromInt(flags), soundid, (float)volume, (float)attenuation, (float)pitch, (float)startTime);
} }
void A_PlaySound(AActor* self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch, double startTime) void A_PlaySound(AActor* self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch)
{ {
if (looping) channel |= CHANF_LOOP | CHANF_NOSTOP; if (looping) channel |= CHANF_LOOP | CHANF_NOSTOP;
if (local) channel |= CHANF_LOCAL; if (local) channel |= CHANF_LOCAL;
A_StartSound(self, soundid, channel & 7, channel & ~7, volume, attenuation, pitch, startTime); A_StartSound(self, soundid, channel & 7, channel & ~7, volume, attenuation, pitch, 0.0f);
} }

View file

@ -56,7 +56,7 @@ void S_ChangeActorSoundPitch(AActor *actor, int channel, double pitch);
// Stores/retrieves playing channel information in an archive. // Stores/retrieves playing channel information in an archive.
void S_SerializeSounds(FSerializer &arc); void S_SerializeSounds(FSerializer &arc);
void A_PlaySound(AActor *self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch, double startTime = 0.); void A_PlaySound(AActor *self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch);
void A_StartSound(AActor* self, int soundid, int channel, int flags, double volume, double attenuation, double pitch, double startTime = 0.); void A_StartSound(AActor* self, int soundid, int channel, int flags, double volume, double attenuation, double pitch, double startTime = 0.);
static void S_SetListener(AActor *listenactor); static void S_SetListener(AActor *listenactor);
void S_SoundReset(); void S_SoundReset();

View file

@ -445,7 +445,7 @@ class Object native
return level.PickPlayerStart(pnum, flags); return level.PickPlayerStart(pnum, flags);
} }
deprecated("4.3") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0); deprecated("4.3") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0);
native static void S_StartSound (Sound sound_id, int channel, int flags = 0, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0); native static void S_StartSound (Sound sound_id, int channel, int flags = 0, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0, float startTime = 0.0);
native static void S_PauseSound (bool notmusic, bool notsfx); native static void S_PauseSound (bool notmusic, bool notsfx);
native static void S_ResumeSound (bool notsfx); native static void S_ResumeSound (bool notsfx);
native static bool S_ChangeMusic(String music_name, int order = 0, bool looping = true, bool force = false); native static bool S_ChangeMusic(String music_name, int order = 0, bool looping = true, bool force = false);