mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fix debug assertion, cleanup vestigial A_PlaySound addition
This commit is contained in:
parent
9e5444f8ae
commit
178cf40428
4 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue