Skip to content

Commit c15ff3d

Browse files
committed
Added clear_conditions function
1 parent 55ffb29 commit c15ff3d

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

oamlGodotModule.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ void oamlGodotModule::AddTension(int value) {
5050
oaml->AddTension(value);
5151
}
5252

53+
void oamlGodotModule::ClearConditions() {
54+
if (oaml == NULL)
55+
return;
56+
57+
oaml->ClearConditions();
58+
}
59+
5360
void oamlGodotModule::EnableDynamicCompressor(bool enable, double thresholdDb, double ratio) {
5461
if (oaml == NULL)
5562
return;
@@ -255,6 +262,7 @@ void oamlGodotModule::LoadState(String state) {
255262

256263
void oamlGodotModule::_bind_methods() {
257264
ClassDB::bind_method(D_METHOD("add_tension", "value"), &oamlGodotModule::AddTension);
265+
ClassDB::bind_method(D_METHOD("clear_conditions"), &oamlGodotModule::ClearConditions);
258266
ClassDB::bind_method(D_METHOD("enable_dynamic_compressor", "enable", "thresholdDb", "ratio"), &oamlGodotModule::EnableDynamicCompressor, true, -3.0, 4.0);
259267
ClassDB::bind_method(D_METHOD("get_layer_gain", "layer"), &oamlGodotModule::GetLayerGain);
260268
ClassDB::bind_method(D_METHOD("get_layer_random_chance", "layer"), &oamlGodotModule::GetLayerRandomChance);

oamlGodotModule.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class oamlGodotModule : public Reference {
3232
~oamlGodotModule();
3333

3434
void AddTension(int value);
35+
void ClearConditions();
3536
void EnableDynamicCompressor(bool enable = true, double thresholdDb = -3.0, double ratio = 4.0);
3637
float GetLayerGain(String layer);
3738
int GetLayerRandomChance(String layer);
@@ -44,6 +45,7 @@ class oamlGodotModule : public Reference {
4445
bool IsPaused();
4546
bool IsPlaying();
4647
bool IsTrackPlaying(String name);
48+
void LoadState(String state);
4749
void LoadTrack(String name);
4850
float LoadTrackProgress(String name);
4951
void Pause();
@@ -60,7 +62,6 @@ class oamlGodotModule : public Reference {
6062
void SetVolume(float vol);
6163
void StopPlaying();
6264
String SaveState();
63-
void LoadState(String state);
6465
};
6566

6667
#endif

0 commit comments

Comments
 (0)