SoundInstance range and input.Release (#761)
This commit is contained in:
@@ -1787,5 +1787,31 @@ namespace wi::scene
|
||||
_flags &= ~PLAYING;
|
||||
wi::audio::Stop(&soundinstance);
|
||||
}
|
||||
void SoundComponent::SetLooped(bool value)
|
||||
{
|
||||
soundinstance.SetLooped(value);
|
||||
if (value)
|
||||
{
|
||||
_flags |= LOOPED;
|
||||
wi::audio::CreateSoundInstance(&soundResource.GetSound(), &soundinstance);
|
||||
}
|
||||
else
|
||||
{
|
||||
_flags &= ~LOOPED;
|
||||
wi::audio::ExitLoop(&soundinstance);
|
||||
}
|
||||
}
|
||||
void SoundComponent::SetDisable3D(bool value)
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
_flags |= DISABLE_3D;
|
||||
}
|
||||
else
|
||||
{
|
||||
_flags &= ~DISABLE_3D;
|
||||
}
|
||||
wi::audio::CreateSoundInstance(&soundResource.GetSound(), &soundinstance);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user