Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename references to audio device, capture_device to output_device, input_device respectively #69120

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

souplamp
Copy link
Contributor

@souplamp souplamp commented Nov 24, 2022

Implements: #5893.

This PR changes many audio properties and methods so that they better reflect their purpose (a 'device' is an audio output device, while a 'capture device' is an audio input device).


AudioServer

Properties:

  • device > output_device
  • capture_device > input_device

Methods:

  • set_device(value) > set_output_device(value)
  • get_device() > get_output_device()
  • get_device_list() > get_output_device_list()
  • capture_set_device(value) > set_input_device(value)
  • capture_get_device() > get_input_device()
  • capture_get_device_list() > get_input_device_list()

In addition to the changes above, the 3-to-4 converter will convert instances of the old names to the new names (one exception: 'device' was left out since the name is too vague and may replace user variables).

Most references in the audio drivers have been changed to maintain consistency as well; the only exceptions are drivers that use 'device' interchangeably at times (WASAPI, ALSA), and certain internal references in WASAPI, including eRender and eCapture that are out of scope for this PR.

This is a change that breaks compatibility for this particular feature if used in previous betas.

@Chaosus Chaosus modified the milestones: 4.0, 4.x Nov 26, 2022
@souplamp souplamp force-pushed the audio-function-rename branch 2 times, most recently from 7be6a9e to c7b5ade Compare November 26, 2022 20:38
@souplamp souplamp changed the title Rename AudioServer's device, capture_device to output_device, input_device respectively Rename references to audio device, capture_device to output_device, input_device respectively Nov 26, 2022
@souplamp souplamp force-pushed the audio-function-rename branch 5 times, most recently from 3601f28 to 01b4d94 Compare November 27, 2022 00:48
@souplamp souplamp marked this pull request as ready for review November 27, 2022 01:12
@souplamp souplamp requested review from a team as code owners November 27, 2022 01:12
@souplamp souplamp force-pushed the audio-function-rename branch from 01b4d94 to 09a8c2b Compare November 27, 2022 01:20
@akien-mga akien-mga modified the milestones: 4.x, 4.0 Jan 24, 2023
@YuriSizov
Copy link
Contributor

@souplamp This needs a rebase

Change instances of audio properties 'device' to 'output_device',
and instances of audio properties 'capture_device' to 'input_device',
as well as their subsequent getter & setter functions.

Update the docs to reflect these changes, as well as the
3-to-4 converter for GDScript and CSharp to make proper
conversions (only exception is 'device' since that name
is too vague and might replace non-AudioServer related
instances, such as user comments and variables).

This does not change internal references to references like
'Render Client' and 'Capture Client' in WASAPI; such is outside the
scope of this commit. This also does not change ALSA's references,
considering that it uses 'device' to mean input and output
interchangeably.

Other references are changed, however where applicable,
to be consistent with the new AudioServer methods and property
names.
@akien-mga akien-mga force-pushed the audio-function-rename branch from 09a8c2b to 5300daa Compare January 31, 2023 17:25
@akien-mga
Copy link
Member

I did the rebase and updated the PR.

@akien-mga akien-mga merged commit ea3566f into godotengine:master Jan 31, 2023
@akien-mga
Copy link
Member

Thanks!

@souplamp
Copy link
Contributor Author

souplamp commented Feb 1, 2023

Yuri! Sorry I missed the notification. Thank you Rémi for the rebase!!

akien-mga added a commit to OverloadedOrama/godot that referenced this pull request Feb 9, 2023
…69120.

- Rename all instances of `capture_start()` and `capture_end()` to their new
  names. Fixes godotengine#72892.
- More internal renames to match what was started in godotengine#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 <[email protected]>
akien-mga added a commit that referenced this pull request Feb 9, 2023
Further refactoring to AudioDriver implementations after #69120, fixes PulseAudio microphone input
JeffVenancius pushed a commit to JeffVenancius/godot that referenced this pull request Mar 3, 2023
…69120.

- Rename all instances of `capture_start()` and `capture_end()` to their new
  names. Fixes godotengine#72892.
- More internal renames to match what was started in godotengine#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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants