extends Node

var music_player: AudioStreamPlayer

func _ready():
	music_player = AudioStreamPlayer.new()
	music_player.bus = "Music"
	add_child(music_player)

func play(stream: AudioStream):
	if music_player.stream == stream and music_player.playing:
		return  # läuft schon, nichts tun
	music_player.stream = stream
	music_player.play()

func stop():
	music_player.stop()
