Add stop_callable to AudioStreamPlayerInternal
(cherry picked from commit 8c7dd3cb61)
This commit is contained in:
@ -242,7 +242,7 @@ void AudioStreamPlayer2D::seek(float p_seconds) {
|
||||
|
||||
void AudioStreamPlayer2D::stop() {
|
||||
setplay.set(-1);
|
||||
internal->stop();
|
||||
internal->stop_basic();
|
||||
}
|
||||
|
||||
bool AudioStreamPlayer2D::is_playing() const {
|
||||
@ -430,7 +430,7 @@ void AudioStreamPlayer2D::_bind_methods() {
|
||||
}
|
||||
|
||||
AudioStreamPlayer2D::AudioStreamPlayer2D() {
|
||||
internal = memnew(AudioStreamPlayerInternal(this, callable_mp(this, &AudioStreamPlayer2D::play), true));
|
||||
internal = memnew(AudioStreamPlayerInternal(this, callable_mp(this, &AudioStreamPlayer2D::play), callable_mp(this, &AudioStreamPlayer2D::stop), true));
|
||||
cached_global_panning_strength = GLOBAL_GET("audio/general/2d_panning_strength");
|
||||
set_hide_clip_children(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user