@@ -457,6 +457,16 @@ const PackedByteArray& AudioStreamMPT::get_data() const {
457
457
return this ->data ;
458
458
}
459
459
460
+ void AudioStreamMPT::select_subsong (int32_t subsong) {
461
+ CHECK_MOD_LOADED_RETV ();
462
+ this ->mpt_module ->select_subsong (subsong);
463
+ }
464
+
465
+ int32_t AudioStreamMPT::get_selected_subsong () const {
466
+ CHECK_MOD_LOADED_RET (0 );
467
+ return this ->mpt_module ->get_selected_subsong ();
468
+ }
469
+
460
470
TypedArray<String> AudioStreamMPT::get_channel_names () const {
461
471
CHECK_MOD_LOADED_RET (TypedArray<String>());
462
472
TypedArray<String> result;
@@ -582,6 +592,31 @@ TypedArray<String> AudioStreamMPT::get_subsong_names() const {
582
592
return result;
583
593
}
584
594
595
+ uint8_t AudioStreamMPT::get_pattern_row_channel_command (int32_t pattern, int32_t row, int32_t channel, CommandIndex command) const {
596
+ CHECK_MOD_LOADED_RET (0 );
597
+ return this ->mpt_module ->get_pattern_row_channel_command (pattern, row, channel, (int )command);
598
+ }
599
+
600
+ String AudioStreamMPT::format_pattern_row_channel_command (int32_t pattern, int32_t row, int32_t channel, CommandIndex command) const {
601
+ CHECK_MOD_LOADED_RET (" " );
602
+ return this ->mpt_module ->format_pattern_row_channel_command (pattern, row, channel, (int )command).c_str ();
603
+ }
604
+
605
+ String AudioStreamMPT::highlight_pattern_row_channel_command (int32_t pattern, int32_t row, int32_t channel, CommandIndex command) const {
606
+ CHECK_MOD_LOADED_RET (" " );
607
+ return this ->mpt_module ->highlight_pattern_row_channel_command (pattern, row, channel, (int )command).c_str ();
608
+ }
609
+
610
+ String AudioStreamMPT::format_pattern_row_channel (int32_t pattern, int32_t row, int32_t channel, int64_t width, bool pad) const {
611
+ CHECK_MOD_LOADED_RET (" " );
612
+ return this ->mpt_module ->format_pattern_row_channel (pattern, row, channel, (size_t )width, pad).c_str ();
613
+ }
614
+
615
+ String AudioStreamMPT::highlight_pattern_row_channel (int32_t pattern, int32_t row, int32_t channel, int64_t width, bool pad) const {
616
+ CHECK_MOD_LOADED_RET (" " );
617
+ return this ->mpt_module ->highlight_pattern_row_channel (pattern, row, channel, (size_t )width, pad).c_str ();
618
+ }
619
+
585
620
Error AudioStreamMPT::get_module_error () const {
586
621
return module_error;
587
622
}
@@ -618,6 +653,9 @@ void AudioStreamMPT::_bind_methods() {
618
653
ClassDB::bind_method (D_METHOD (" set_data" , " data" ), &AudioStreamMPT::set_data);
619
654
ClassDB::bind_method (D_METHOD (" get_data" ), &AudioStreamMPT::get_data);
620
655
656
+ ClassDB::bind_method (D_METHOD (" select_subsong" , " subsong" ), &AudioStreamMPT::select_subsong);
657
+ ClassDB::bind_method (D_METHOD (" get_selected_subsong" ), &AudioStreamMPT::get_selected_subsong);
658
+
621
659
ClassDB::bind_method (D_METHOD (" get_channel_names" ), &AudioStreamMPT::get_channel_names);
622
660
ClassDB::bind_method (D_METHOD (" get_instrument_names" ), &AudioStreamMPT::get_instrument_names);
623
661
@@ -645,6 +683,12 @@ void AudioStreamMPT::_bind_methods() {
645
683
ClassDB::bind_method (D_METHOD (" get_sample_names" ), &AudioStreamMPT::get_sample_names);
646
684
ClassDB::bind_method (D_METHOD (" get_subsong_names" ), &AudioStreamMPT::get_subsong_names);
647
685
686
+ ClassDB::bind_method (D_METHOD (" get_pattern_row_channel_command" , " pattern" , " row" , " channel" , " command" ), &AudioStreamMPT::get_pattern_row_channel_command);
687
+ ClassDB::bind_method (D_METHOD (" format_pattern_row_channel_command" , " pattern" , " row" , " channel" , " command" ), &AudioStreamMPT::format_pattern_row_channel_command);
688
+ ClassDB::bind_method (D_METHOD (" highlight_pattern_row_channel_command" , " pattern" , " row" , " channel" , " command" ), &AudioStreamMPT::highlight_pattern_row_channel_command);
689
+ ClassDB::bind_method (D_METHOD (" format_pattern_row_channel" , " pattern" , " row" , " channel" , " width" , " pad" ), &AudioStreamMPT::format_pattern_row_channel);
690
+ ClassDB::bind_method (D_METHOD (" highlight_pattern_row_channel" , " pattern" , " row" , " channel" , " width" , " pad" ), &AudioStreamMPT::highlight_pattern_row_channel);
691
+
648
692
ClassDB::bind_method (D_METHOD (" get_module_error" ), &AudioStreamMPT::get_module_error);
649
693
650
694
ADD_PROPERTY (PropertyInfo (Variant::PACKED_BYTE_ARRAY, " data" , PROPERTY_HINT_NONE, " " , PROPERTY_USAGE_NO_EDITOR), " set_data" , " get_data" );
@@ -653,6 +697,13 @@ void AudioStreamMPT::_bind_methods() {
653
697
654
698
BIND_ENUM_CONSTANT (LOOP_DISABLED);
655
699
BIND_ENUM_CONSTANT (LOOP_ENABLED);
700
+
701
+ BIND_ENUM_CONSTANT (COMMAND_NOTE);
702
+ BIND_ENUM_CONSTANT (COMMAND_INSTRUMENT);
703
+ BIND_ENUM_CONSTANT (COMMAND_VOLUMEFFECT);
704
+ BIND_ENUM_CONSTANT (COMMAND_EFFECT);
705
+ BIND_ENUM_CONSTANT (COMMAND_VOLUME);
706
+ BIND_ENUM_CONSTANT (COMMAND_PARAMETER);
656
707
}
657
708
658
709
AudioStreamMPT::AudioStreamMPT () {
0 commit comments