Skip to content

Commit

Permalink
Compat changes for 4.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
stechyo committed Nov 23, 2024
1 parent a7544db commit a1cec5b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "src/lib/godot-cpp"]
path = src/lib/godot-cpp
url = https://github.com/stechyo/godot-cpp
branch = 4.3-steam-audio
branch = master
[submodule "src/lib/steamaudio"]
path = src/lib/steamaudio
url = https://github.com/ValveSoftware/steam-audio
14 changes: 7 additions & 7 deletions project/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="Godot-SteamAudio Demo"
run/main_scene="res://scenes/demo.tscn"
config/features=PackedStringArray("4.3")
config/features=PackedStringArray("4.4")
config/icon="res://icon.svg"

[input]
Expand All @@ -22,40 +22,40 @@ ui_left={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
]
}
ui_right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194321,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
]
}
ui_up={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194320,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
]
}
ui_down={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
]
}
toggle_door={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null)
]
}
move_door={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
]
}
8 changes: 4 additions & 4 deletions project/scenes/demo.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ tracks/1/keys = {

[sub_resource type="AnimationLibrary" id="AnimationLibrary_b3x3w"]
_data = {
"RESET": SubResource("Animation_elb2f"),
"fade": SubResource("Animation_8pkb1")
&"RESET": SubResource("Animation_elb2f"),
&"fade": SubResource("Animation_8pkb1")
}

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_v6p4c"]
Expand Down Expand Up @@ -251,7 +251,7 @@ mesh = SubResource("SphereMesh_s7swq")

[node name="AnimationPlayer" type="AnimationPlayer" parent="Wooden House with RandomStream/Pluck Randomizer"]
libraries = {
"": SubResource("AnimationLibrary_b3x3w")
&"": SubResource("AnimationLibrary_b3x3w")
}

[node name="Door House" parent="." instance=ExtResource("3_tysju")]
Expand Down Expand Up @@ -281,7 +281,7 @@ mesh = SubResource("SphereMesh_s7swq")

[node name="AnimationPlayer" type="AnimationPlayer" parent="Door House/Pluck Randomizer"]
libraries = {
"": SubResource("AnimationLibrary_b3x3w")
&"": SubResource("AnimationLibrary_b3x3w")
}

[node name="Door" type="MeshInstance3D" parent="Door House"]
Expand Down
2 changes: 1 addition & 1 deletion src/lib/godot-cpp
Submodule godot-cpp updated 40 files
+14 −11 .github/actions/godot-cache-restore/action.yml
+6 −5 .github/actions/godot-cache-save/action.yml
+25 −21 .github/workflows/ci.yml
+21 −0 .github/workflows/runner.yml
+3 −2 .github/workflows/static_checks.yml
+4 −0 .gitignore
+15 −219 CMakeLists.txt
+225 −70 binding_generator.py
+1 −1 cmake/common_compiler_flags.cmake
+240 −0 cmake/godotcpp.cmake
+57 −0 doc/cmake.md
+3,941 −358 gdextension/extension_api.json
+100 −5 gdextension/gdextension_interface.h
+22 −18 include/godot_cpp/classes/wrapped.hpp
+12 −7 include/godot_cpp/core/class_db.hpp
+211 −9 include/godot_cpp/core/type_info.hpp
+4 −2 include/godot_cpp/godot.hpp
+1 −1 include/godot_cpp/templates/safe_refcount.hpp
+1 −1 include/godot_cpp/variant/basis.hpp
+42 −44 include/godot_cpp/variant/quaternion.hpp
+238 −0 include/godot_cpp/variant/typed_dictionary.hpp
+2 −2 include/godot_cpp/variant/variant.hpp
+4 −3 include/godot_cpp/variant/vector4.hpp
+25 −23 src/classes/wrapped.cpp
+6 −1 src/core/class_db.cpp
+8 −4 src/godot.cpp
+5 −2 src/variant/basis.cpp
+6 −0 src/variant/packed_arrays.cpp
+28 −40 src/variant/quaternion.cpp
+5 −6 src/variant/variant.cpp
+1 −0 test/CMakeLists.txt
+1 −0 test/SConstruct
+21 −2 test/project/main.gd
+54 −0 test/src/example.cpp
+16 −0 test/src/example.h
+1 −0 test/src/register_types.cpp
+1 −1 tools/common_compiler_flags.py
+1 −0 tools/godotcpp.py
+5 −1 tools/web.py
+48 −9 tools/windows.py
2 changes: 1 addition & 1 deletion src/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Ref<AudioStream> SteamAudioStream::get_stream() { return this->stream; }
SteamAudioStreamPlayback::SteamAudioStreamPlayback() {}
SteamAudioStreamPlayback::~SteamAudioStreamPlayback() {}

int32_t SteamAudioStreamPlayback::_mix(AudioFrame *buffer, double rate_scale, int32_t frames) {
int32_t SteamAudioStreamPlayback::_mix(AudioFrame *buffer, float rate_scale, int32_t frames) {
if (parent == nullptr) {
return frames;
}
Expand Down
5 changes: 1 addition & 4 deletions src/stream.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#ifndef STEAM_AUDIO_STREAM_H
#define STEAM_AUDIO_STREAM_H

#include "godot_cpp/classes/node3d.hpp"
#include "godot_cpp/classes/ref.hpp"
#include "player.hpp"
#include "steam_audio.hpp"
#include <phonon.h>
#include <godot_cpp/classes/audio_frame.hpp>
#include <godot_cpp/classes/audio_stream.hpp>
Expand Down Expand Up @@ -54,8 +52,7 @@ class SteamAudioStreamPlayback : public AudioStreamPlayback {
void set_stream(Ref<AudioStream> p_stream);
Ref<AudioStreamPlayback> get_stream_playback();

virtual int32_t _mix(AudioFrame *buffer, double rate_scale,
int32_t frames) override;
virtual int32_t _mix(AudioFrame *buffer, float rate_scale, int32_t frames) override;
int play_stream(const Ref<AudioStream> &p_stream, float p_from_offset,
float p_volume_db, float p_pitch_scale);
void _start(double from_pos) override;
Expand Down

0 comments on commit a1cec5b

Please sign in to comment.