Repository: godotengine/godot (language: cpp)

Issue:
AudioStreamInteractive breaks web exports
### Tested versions

- Repro in 4.4 rc2
- Repro in 4.4

### System information

Godot v4.4.stable - macOS Sonoma (14.6.1) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Apple M3 Pro - Apple M3 Pro (11 threads)

### Issue description

When exporting a project for the web hosted on itch.io, Godot fails to launch the game, getting stuck on initialization.

The console error shows `/MyAudioStreamPlayer is trying to play a sample from a stream that cannot be played`. When I remove the AudioStreamInteractive, the game works.

Interestingly, the audio still plays in the background

<img width="949" alt="Image" src="https://github.com/user-attachments/assets/338101ca-8eb1-497c-8a6a-f606cba0aeaa" />

### Steps to reproduce

Attempt to start a game in a web context with an AudioStreamPlayer

### Minimal reproduction project (MRP)

https://github.com/bits-by-brandon/web-interactive-audio-issue


Discussion / hints:
I know this is a tough question, but... is it even remotely possible that this will be fixed in 4.4.1?
If someone comes with a fix this week, maybe :)

CC @adamscott but he's also busy with other priorities, so anyone interested can look into this.
I don't know if it's useful, but i tried with .wav and .mp3 files and all export types - the error is the same
I'm investigating this. Just saw the issue.

Fix patch:
diff --git a/modules/interactive_music/audio_stream_interactive.h b/modules/interactive_music/audio_stream_interactive.h
index e3fc6e8a7fd6..922cf88874c7 100644
--- a/modules/interactive_music/audio_stream_interactive.h
+++ b/modules/interactive_music/audio_stream_interactive.h
@@ -182,6 +182,8 @@ class AudioStreamInteractive : public AudioStream {
 	virtual Ref<AudioStreamPlayback> instantiate_playback() override;
 	virtual String get_stream_name() const override;
 	virtual double get_length() const override { return 0; }
+	virtual bool is_meta_stream() const override { return true; }
+
 	AudioStreamInteractive();
 
 protected:
diff --git a/modules/interactive_music/audio_stream_playlist.h b/modules/interactive_music/audio_stream_playlist.h
index 8d10fbfcbb3b..9bd9d95fff4d 100644
--- a/modules/interactive_music/audio_stream_playlist.h
+++ b/modules/interactive_music/audio_stream_playlist.h
@@ -69,6 +69,7 @@ class AudioStreamPlaylist : public AudioStream {
 	virtual Ref<AudioStreamPlayback> instantiate_playback() override;
 	virtual String get_stream_name() const override;
 	virtual double get_length() const override;
+	virtual bool is_meta_stream() const override { return true; }
 
 protected:
 	static void _bind_methods();
diff --git a/modules/interactive_music/audio_stream_synchronized.h b/modules/interactive_music/audio_stream_synchronized.h
index 645e31c94137..964a5ebb7b29 100644
--- a/modules/interactive_music/audio_stream_synchronized.h
+++ b/modules/interactive_music/audio_stream_synchronized.h
@@ -65,6 +65,8 @@ class AudioStreamSynchronized : public AudioStream {
 	virtual Ref<AudioStreamPlayback> instantiate_playback() override;
 	virtual String get_stream_name() const override;
 	virtual double get_length() const override;
+	virtual bool is_meta_stream() const override { return true; }
+
 	AudioStreamSynchronized();
 
 protected:


Test patch: