diff --git a/Makefile b/Makefile index caa649f..14de948 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,9 @@ install-steam-audio: release: scons platform=linux target=template_debug && scons platform=windows target=template_debug - cp -r ./project ./godot-steam-audio - rm -rI ./godot-steam-audio/.godot ./godot-steam-audio/.gitignore ./godot-steam-audio/.gitattributes ./godot-steam-audio/bin/libphonon.so + mkdir godot-steam-audio + cp -r ./project ./godot-steam-audio/demo + rm -rI ./godot-steam-audio/demo/.godot ./godot-steam-audio/demo/.gitignore ./godot-steam-audio/demo/.gitattributes ./godot-steam-audio/demo/addons/godot-steam-audio/bin/libphonon.so + cp -r ./godot-steam-audio/demo/addons ./godot-steam-audio/addons zip -r ./godot-steam-audio-vX.Y.Z.zip godot-steam-audio README.md rm -rI ./godot-steam-audio diff --git a/README.md b/README.md index 080a772..98bbe2e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # godot-steam-audio -This is a GDExtension that integrates the [steam-audio](https://valvesoftware.github.io/steam-audio/) library into Godot 4.2. +This is a GDExtension that integrates the [steam-audio](https://valvesoftware.github.io/steam-audio/) library +into Godot 4.2. This adds sound effects such as occlusion and reverb into the engine. ### [Demo Video](https://www.youtube.com/watch?v=vRnzfnb93Gw) ![A picture of the editor screen with some godot-steam-audio nodes.](doc/imgs/editor.png) @@ -22,10 +23,10 @@ are currently working. Mac probably works, but I don't have the time nor the mon - Download the [latest release](https://github.com/stechyo/godot/releases/tag/steam-audio) or clone and build [my fork of Godot](https://github.com/stechyo/godot/tree/4.2-gdext/audio-stream-funcs). - Download the [latest release](https://github.com/stechyo/godot-steam-audio/releases/latest) of the extension or build it yourself. - Download the [latest supported release](https://github.com/ValveSoftware/steam-audio/releases/tag/v4.5.0) of steam-audio, and copy the binaries - that you find in the `lib` folder for your operating system to the `bin/` folder of your project, which + that you find in the `lib` folder for your operating system to the `addons/godot-steam-audio/bin/` folder of your project, which should contain a `libgodot-steam-audio` library (.dll or .so) and a .gdextension file. Note that, since your OS is likely 64-bit, you'll want the x64 version (e.g. `windows-x64`). -Your project should have a `bin/` folder with: +Your project should have an `addons/godot-steam-audio/bin/` folder with: - `libgodot-steam-audio.gdextension` - `libgodot-steam-audio.linux.template_debug.x86_64` for Linux, or a similar .dll for Windows - `libphonon.so` for Linux, or `phonon.dll`, `phonon.lib` and some other files for Windows - these are the diff --git a/SConstruct b/SConstruct index 5e461a2..1a7690e 100644 --- a/SConstruct +++ b/SConstruct @@ -15,7 +15,7 @@ elif env["platform"] == "windows": library = env.SharedLibrary( - "project/bin/godot-steam-audio{}{}".format(env["suffix"], env["SHLIBSUFFIX"]), + "project/addons/godot-steam-audio/bin/godot-steam-audio{}{}".format(env["suffix"], env["SHLIBSUFFIX"]), source=sources, ) diff --git a/project/addons/godot-steam-audio/bin/libgodot-steam-audio.gdextension b/project/addons/godot-steam-audio/bin/libgodot-steam-audio.gdextension new file mode 100644 index 0000000..68af13b --- /dev/null +++ b/project/addons/godot-steam-audio/bin/libgodot-steam-audio.gdextension @@ -0,0 +1,22 @@ +[configuration] + +entry_symbol = "init_extension" +compatibility_minimum = 4.2 + +[libraries] + +linux.x86_64.debug ="res://addons/godot-steam-audio/bin/libgodot-steam-audio.linux.template_debug.x86_64.so" +linux.x86_64.release = "res://addons/godot-steam-audio/bin/libgodot-steam-audio.linux.template_release.x86_64.so" +linux.debug.arm64 = "res://addons/godot-steam-audio/bin/libgodot-steam-audio.linux.template_debug.arm64.so" +linux.release.arm64 = "res://addons/godot-steam-audio/bin/libgodot-steam-audio.linux.template_release.arm64.so" +windows.x86_64.debug = "res://addons/godot-steam-audio/bin/libgodot-steam-audio.windows.template_debug.x86_64.dll" +windows.x86_64.release = "res://addons/godot-steam-audio/bin/libgodot-steam-audio.windows.template_release.x86_64.dll" +macos.debug = "res://addons/godot-steam-audio/bin/libgodot-steam-audio.macos.template_debug.framework" +macos.release = "res://addons/godot-steam-audio/bin/libgodot-steam-audio.macos.template_release.framework" + +[icons] + +SteamAudioPlayer = "res://addons/godot-steam-audio/icons/steam_audio_player.svg" +SteamAudioListener = "res://addons/godot-steam-audio/icons/steam_audio_listener.svg" +SteamAudioConfig = "res://addons/godot-steam-audio/icons/steam_audio_config.svg" +SteamAudioGeometry = "res://addons/godot-steam-audio/icons/steam_audio_geometry.svg" diff --git a/project/addons/godot-steam-audio/bin/libgodot-steam-audio.linux.template_debug.x86_64.so b/project/addons/godot-steam-audio/bin/libgodot-steam-audio.linux.template_debug.x86_64.so new file mode 100755 index 0000000..967c51a Binary files /dev/null and b/project/addons/godot-steam-audio/bin/libgodot-steam-audio.linux.template_debug.x86_64.so differ diff --git a/project/addons/godot-steam-audio/bin/libgodot-steam-audio.windows.template_debug.x86_64.dll b/project/addons/godot-steam-audio/bin/libgodot-steam-audio.windows.template_debug.x86_64.dll new file mode 100755 index 0000000..9816084 Binary files /dev/null and b/project/addons/godot-steam-audio/bin/libgodot-steam-audio.windows.template_debug.x86_64.dll differ diff --git a/project/addons/godot-steam-audio/bin/libphonon.so b/project/addons/godot-steam-audio/bin/libphonon.so new file mode 100644 index 0000000..36578c3 Binary files /dev/null and b/project/addons/godot-steam-audio/bin/libphonon.so differ diff --git a/project/addons/steamaudio/icons/steam_audio_config.svg b/project/addons/godot-steam-audio/icons/steam_audio_config.svg similarity index 100% rename from project/addons/steamaudio/icons/steam_audio_config.svg rename to project/addons/godot-steam-audio/icons/steam_audio_config.svg diff --git a/project/addons/steamaudio/icons/steam_audio_config.svg.import b/project/addons/godot-steam-audio/icons/steam_audio_config.svg.import similarity index 71% rename from project/addons/steamaudio/icons/steam_audio_config.svg.import rename to project/addons/godot-steam-audio/icons/steam_audio_config.svg.import index c637d05..25f7e03 100644 --- a/project/addons/steamaudio/icons/steam_audio_config.svg.import +++ b/project/addons/godot-steam-audio/icons/steam_audio_config.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://csacya4jxkknl" -path="res://.godot/imported/steam_audio_config.svg-0d8717c30b9c45cf3ef033d13603954f.ctex" +path="res://.godot/imported/steam_audio_config.svg-c39e3c278ccb02a7385dfd8ee32eba0f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://addons/steamaudio/icons/steam_audio_config.svg" -dest_files=["res://.godot/imported/steam_audio_config.svg-0d8717c30b9c45cf3ef033d13603954f.ctex"] +source_file="res://addons/godot-steam-audio/icons/steam_audio_config.svg" +dest_files=["res://.godot/imported/steam_audio_config.svg-c39e3c278ccb02a7385dfd8ee32eba0f.ctex"] [params] diff --git a/project/addons/steamaudio/icons/steam_audio_geometry.svg b/project/addons/godot-steam-audio/icons/steam_audio_geometry.svg similarity index 100% rename from project/addons/steamaudio/icons/steam_audio_geometry.svg rename to project/addons/godot-steam-audio/icons/steam_audio_geometry.svg diff --git a/project/addons/steamaudio/icons/steam_audio_geometry.svg.import b/project/addons/godot-steam-audio/icons/steam_audio_geometry.svg.import similarity index 70% rename from project/addons/steamaudio/icons/steam_audio_geometry.svg.import rename to project/addons/godot-steam-audio/icons/steam_audio_geometry.svg.import index 5bc5d62..d498f10 100644 --- a/project/addons/steamaudio/icons/steam_audio_geometry.svg.import +++ b/project/addons/godot-steam-audio/icons/steam_audio_geometry.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dv5ap5spg12x2" -path="res://.godot/imported/steam_audio_geometry.svg-de64e4f733d5b3b90b79c9211a0fee5c.ctex" +path="res://.godot/imported/steam_audio_geometry.svg-94d5a72b9710b48d2c973dbf6258de3d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://addons/steamaudio/icons/steam_audio_geometry.svg" -dest_files=["res://.godot/imported/steam_audio_geometry.svg-de64e4f733d5b3b90b79c9211a0fee5c.ctex"] +source_file="res://addons/godot-steam-audio/icons/steam_audio_geometry.svg" +dest_files=["res://.godot/imported/steam_audio_geometry.svg-94d5a72b9710b48d2c973dbf6258de3d.ctex"] [params] diff --git a/project/addons/steamaudio/icons/steam_audio_listener.svg b/project/addons/godot-steam-audio/icons/steam_audio_listener.svg similarity index 100% rename from project/addons/steamaudio/icons/steam_audio_listener.svg rename to project/addons/godot-steam-audio/icons/steam_audio_listener.svg diff --git a/project/addons/steamaudio/icons/steam_audio_listener.svg.import b/project/addons/godot-steam-audio/icons/steam_audio_listener.svg.import similarity index 70% rename from project/addons/steamaudio/icons/steam_audio_listener.svg.import rename to project/addons/godot-steam-audio/icons/steam_audio_listener.svg.import index 8f2e88a..0506726 100644 --- a/project/addons/steamaudio/icons/steam_audio_listener.svg.import +++ b/project/addons/godot-steam-audio/icons/steam_audio_listener.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b1xs3k1lbekcq" -path="res://.godot/imported/steam_audio_listener.svg-2cc3a2b41ab495425bbfd4d03636196d.ctex" +path="res://.godot/imported/steam_audio_listener.svg-3c2b796a9296ff66889083f90ca46d02.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://addons/steamaudio/icons/steam_audio_listener.svg" -dest_files=["res://.godot/imported/steam_audio_listener.svg-2cc3a2b41ab495425bbfd4d03636196d.ctex"] +source_file="res://addons/godot-steam-audio/icons/steam_audio_listener.svg" +dest_files=["res://.godot/imported/steam_audio_listener.svg-3c2b796a9296ff66889083f90ca46d02.ctex"] [params] diff --git a/project/addons/steamaudio/icons/steam_audio_player.svg b/project/addons/godot-steam-audio/icons/steam_audio_player.svg similarity index 100% rename from project/addons/steamaudio/icons/steam_audio_player.svg rename to project/addons/godot-steam-audio/icons/steam_audio_player.svg diff --git a/project/addons/steamaudio/icons/steam_audio_player.svg.import b/project/addons/godot-steam-audio/icons/steam_audio_player.svg.import similarity index 71% rename from project/addons/steamaudio/icons/steam_audio_player.svg.import rename to project/addons/godot-steam-audio/icons/steam_audio_player.svg.import index 70182a4..a1bc902 100644 --- a/project/addons/steamaudio/icons/steam_audio_player.svg.import +++ b/project/addons/godot-steam-audio/icons/steam_audio_player.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b2n2sbpyufp36" -path="res://.godot/imported/steam_audio_player.svg-14906bd5a4e3338b1ce8113ef44a3f73.ctex" +path="res://.godot/imported/steam_audio_player.svg-1e7b97ef042863ef810c9575eafab08d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://addons/steamaudio/icons/steam_audio_player.svg" -dest_files=["res://.godot/imported/steam_audio_player.svg-14906bd5a4e3338b1ce8113ef44a3f73.ctex"] +source_file="res://addons/godot-steam-audio/icons/steam_audio_player.svg" +dest_files=["res://.godot/imported/steam_audio_player.svg-1e7b97ef042863ef810c9575eafab08d.ctex"] [params] diff --git a/project/addons/steamaudio/icons/steam_audio_stream.svg b/project/addons/godot-steam-audio/icons/steam_audio_stream.svg similarity index 100% rename from project/addons/steamaudio/icons/steam_audio_stream.svg rename to project/addons/godot-steam-audio/icons/steam_audio_stream.svg diff --git a/project/addons/steamaudio/icons/steam_audio_stream.svg.import b/project/addons/godot-steam-audio/icons/steam_audio_stream.svg.import similarity index 71% rename from project/addons/steamaudio/icons/steam_audio_stream.svg.import rename to project/addons/godot-steam-audio/icons/steam_audio_stream.svg.import index 5fd03c9..201c7cb 100644 --- a/project/addons/steamaudio/icons/steam_audio_stream.svg.import +++ b/project/addons/godot-steam-audio/icons/steam_audio_stream.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dmu8epd0rc1wu" -path="res://.godot/imported/steam_audio_stream.svg-f068aaf23d589c4102d4b2cc306e8a08.ctex" +path="res://.godot/imported/steam_audio_stream.svg-7782f4d258b821087a4f303dd0c2c2d7.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://addons/steamaudio/icons/steam_audio_stream.svg" -dest_files=["res://.godot/imported/steam_audio_stream.svg-f068aaf23d589c4102d4b2cc306e8a08.ctex"] +source_file="res://addons/godot-steam-audio/icons/steam_audio_stream.svg" +dest_files=["res://.godot/imported/steam_audio_stream.svg-7782f4d258b821087a4f303dd0c2c2d7.ctex"] [params] diff --git a/project/addons/steamaudio/materials/brick_material.tres b/project/addons/godot-steam-audio/materials/brick_material.tres similarity index 100% rename from project/addons/steamaudio/materials/brick_material.tres rename to project/addons/godot-steam-audio/materials/brick_material.tres diff --git a/project/addons/steamaudio/materials/carpet_material.tres b/project/addons/godot-steam-audio/materials/carpet_material.tres similarity index 100% rename from project/addons/steamaudio/materials/carpet_material.tres rename to project/addons/godot-steam-audio/materials/carpet_material.tres diff --git a/project/addons/steamaudio/materials/ceramic_material.tres b/project/addons/godot-steam-audio/materials/ceramic_material.tres similarity index 100% rename from project/addons/steamaudio/materials/ceramic_material.tres rename to project/addons/godot-steam-audio/materials/ceramic_material.tres diff --git a/project/addons/steamaudio/materials/concrete_material.tres b/project/addons/godot-steam-audio/materials/concrete_material.tres similarity index 100% rename from project/addons/steamaudio/materials/concrete_material.tres rename to project/addons/godot-steam-audio/materials/concrete_material.tres diff --git a/project/addons/steamaudio/materials/default_material.tres b/project/addons/godot-steam-audio/materials/default_material.tres similarity index 100% rename from project/addons/steamaudio/materials/default_material.tres rename to project/addons/godot-steam-audio/materials/default_material.tres diff --git a/project/addons/steamaudio/materials/glass_material.tres b/project/addons/godot-steam-audio/materials/glass_material.tres similarity index 100% rename from project/addons/steamaudio/materials/glass_material.tres rename to project/addons/godot-steam-audio/materials/glass_material.tres diff --git a/project/addons/steamaudio/materials/gravel_material.tres b/project/addons/godot-steam-audio/materials/gravel_material.tres similarity index 100% rename from project/addons/steamaudio/materials/gravel_material.tres rename to project/addons/godot-steam-audio/materials/gravel_material.tres diff --git a/project/addons/steamaudio/materials/metal_material.tres b/project/addons/godot-steam-audio/materials/metal_material.tres similarity index 100% rename from project/addons/steamaudio/materials/metal_material.tres rename to project/addons/godot-steam-audio/materials/metal_material.tres diff --git a/project/addons/steamaudio/materials/plaster_material.tres b/project/addons/godot-steam-audio/materials/plaster_material.tres similarity index 100% rename from project/addons/steamaudio/materials/plaster_material.tres rename to project/addons/godot-steam-audio/materials/plaster_material.tres diff --git a/project/addons/steamaudio/materials/rock_material.tres b/project/addons/godot-steam-audio/materials/rock_material.tres similarity index 100% rename from project/addons/steamaudio/materials/rock_material.tres rename to project/addons/godot-steam-audio/materials/rock_material.tres diff --git a/project/addons/steamaudio/materials/wood_material.tres b/project/addons/godot-steam-audio/materials/wood_material.tres similarity index 100% rename from project/addons/steamaudio/materials/wood_material.tres rename to project/addons/godot-steam-audio/materials/wood_material.tres diff --git a/project/bin/libgodot-steam-audio.gdextension b/project/bin/libgodot-steam-audio.gdextension deleted file mode 100644 index e811016..0000000 --- a/project/bin/libgodot-steam-audio.gdextension +++ /dev/null @@ -1,22 +0,0 @@ -[configuration] - -entry_symbol = "init_extension" -compatibility_minimum = 4.2 - -[libraries] - -linux.x86_64.debug ="res://bin/libgodot-steam-audio.linux.template_debug.x86_64.so" -linux.x86_64.release = "res://bin/libgodot-steam-audio.linux.template_release.x86_64.so" -linux.debug.arm64 = "res://bin/libgodot-steam-audio.linux.template_debug.arm64.so" -linux.release.arm64 = "res://bin/libgodot-steam-audio.linux.template_release.arm64.so" -windows.x86_64.debug = "res://bin/libgodot-steam-audio.windows.template_debug.x86_64.dll" -windows.x86_64.release = "res://bin/libgodot-steam-audio.windows.template_release.x86_64.dll" -macos.debug = "res://bin/libgodot-steam-audio.macos.template_debug.framework" -macos.release = "res://bin/libgodot-steam-audio.macos.template_release.framework" - -[icons] - -SteamAudioPlayer = "res://addons/steamaudio/icons/steam_audio_player.svg" -SteamAudioListener = "res://addons/steamaudio/icons/steam_audio_listener.svg" -SteamAudioConfig = "res://addons/steamaudio/icons/steam_audio_config.svg" -SteamAudioGeometry = "res://addons/steamaudio/icons/steam_audio_geometry.svg" diff --git a/project/scenes/demo.tscn b/project/scenes/demo.tscn index ba63111..487bc5e 100644 --- a/project/scenes/demo.tscn +++ b/project/scenes/demo.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=36 format=3 uid="uid://bilxmr83dwsgw"] [ext_resource type="Script" path="res://src/player.gd" id="1_c2adp"] -[ext_resource type="SteamAudioMaterial" uid="uid://dbai50r63k346" path="res://addons/steamaudio/materials/rock_material.tres" id="1_wtcfy"] +[ext_resource type="SteamAudioMaterial" uid="uid://dbai50r63k346" path="res://addons/godot-steam-audio/materials/rock_material.tres" id="1_wtcfy"] [ext_resource type="AudioStream" uid="uid://badsntcuvwx3t" path="res://sound/2.mp3" id="3_0iivb"] [ext_resource type="PackedScene" uid="uid://6sgtpvtg5aic" path="res://scenes/wooden_house.tscn" id="3_tysju"] [ext_resource type="AudioStream" uid="uid://ca6667b63t1vv" path="res://sound/pluck1.mp3" id="5_00edw"] [ext_resource type="AudioStream" uid="uid://4axfbe53b587" path="res://sound/pluck2.mp3" id="6_dw5dv"] -[ext_resource type="SteamAudioMaterial" uid="uid://cexuij8fef5ay" path="res://addons/steamaudio/materials/carpet_material.tres" id="6_ph4pe"] +[ext_resource type="SteamAudioMaterial" uid="uid://cexuij8fef5ay" path="res://addons/godot-steam-audio/materials/carpet_material.tres" id="6_ph4pe"] [ext_resource type="Script" path="res://src/random_pluck.gd" id="7_gx8pe"] [sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_nkwlr"] diff --git a/project/sound/1.mp3 b/project/sound/1.mp3 deleted file mode 100644 index 2e0790c..0000000 Binary files a/project/sound/1.mp3 and /dev/null differ diff --git a/project/sound/1.mp3.import b/project/sound/1.mp3.import deleted file mode 100644 index 2b793dc..0000000 --- a/project/sound/1.mp3.import +++ /dev/null @@ -1,19 +0,0 @@ -[remap] - -importer="mp3" -type="AudioStreamMP3" -uid="uid://dv4y870s0caeb" -path="res://.godot/imported/1.mp3-b1a46e151b985e344e0087306c1875ab.mp3str" - -[deps] - -source_file="res://sound/1.mp3" -dest_files=["res://.godot/imported/1.mp3-b1a46e151b985e344e0087306c1875ab.mp3str"] - -[params] - -loop=false -loop_offset=0 -bpm=0 -beat_count=0 -bar_beats=4