Merge pull request #52237 from ellenhp/polyphony
Add optional polyphonic playback to built-in audio player nodes
This commit is contained in:
@@ -214,6 +214,10 @@ float AudioStreamMP3::get_length() const {
|
||||
return length;
|
||||
}
|
||||
|
||||
bool AudioStreamMP3::is_monophonic() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void AudioStreamMP3::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamMP3::set_data);
|
||||
ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamMP3::get_data);
|
||||
|
||||
@@ -103,6 +103,8 @@ public:
|
||||
|
||||
virtual float get_length() const override;
|
||||
|
||||
virtual bool is_monophonic() const override;
|
||||
|
||||
AudioStreamMP3();
|
||||
virtual ~AudioStreamMP3();
|
||||
};
|
||||
|
||||
@@ -252,6 +252,10 @@ float AudioStreamOGGVorbis::get_length() const {
|
||||
return length;
|
||||
}
|
||||
|
||||
bool AudioStreamOGGVorbis::is_monophonic() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void AudioStreamOGGVorbis::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamOGGVorbis::set_data);
|
||||
ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamOGGVorbis::get_data);
|
||||
|
||||
@@ -105,6 +105,8 @@ public:
|
||||
|
||||
virtual float get_length() const override; //if supported, otherwise return 0
|
||||
|
||||
virtual bool is_monophonic() const override;
|
||||
|
||||
AudioStreamOGGVorbis();
|
||||
virtual ~AudioStreamOGGVorbis();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user