1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Further refactoring to AudioDriver implementations after #69120.

- Rename all instances of `capture_start()` and `capture_end()` to their new
  names. Fixes #72892.
- More internal renames to match what was started in #69120.
- Use `override` consistently so that such refactoring bugs can be caught.
- Harmonize the order of definition of the overridden virtual methods in each
  audio driver.
- Harmonize prototype for `set_output_device` and `set_input_device`.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
Emmanouil Papadeas
2023-02-08 17:40:15 +02:00
committed by Rémi Verschelde
parent d69809cab6
commit c36460060e
22 changed files with 227 additions and 215 deletions

View File

@@ -186,17 +186,17 @@ const GodotAudio = {
}
},
godot_audio_capture_start__proxy: 'sync',
godot_audio_capture_start__sig: 'i',
godot_audio_capture_start: function () {
godot_audio_input_start__proxy: 'sync',
godot_audio_input_start__sig: 'i',
godot_audio_input_start: function () {
return GodotAudio.create_input(function (input) {
input.connect(GodotAudio.driver.get_node());
});
},
godot_audio_capture_stop__proxy: 'sync',
godot_audio_capture_stop__sig: 'v',
godot_audio_capture_stop: function () {
godot_audio_input_stop__proxy: 'sync',
godot_audio_input_stop__sig: 'v',
godot_audio_input_stop: function () {
if (GodotAudio.input) {
const tracks = GodotAudio.input['mediaStream']['getTracks']();
for (let i = 0; i < tracks.length; i++) {