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

Outputs list truncates trailing spaces #13

Closed
jwhitley opened this issue Dec 26, 2019 · 0 comments · Fixed by #14
Closed

Outputs list truncates trailing spaces #13

jwhitley opened this issue Dec 26, 2019 · 0 comments · Fixed by #14

Comments

@jwhitley
Copy link
Contributor

jwhitley commented Dec 26, 2019

tl;dr: it appears that macOS may allow trailing spaces in audio device names. 🤦‍♂ These are inadvertently stripped in this action, breaking the ability to select these ill-named devices.

Example:

>> bash ./audio.sh
{
  "currentInput": "MacBook Pro Microphone",
  "currentOutput": "USB Sound Device        ",
  "inputs": [ "CalDigit Thunderbolt 3 Audio", "LG UltraFine Display Audio", "MacBook Pro Microphone" ],
  "outputs": [ "USB Sound Device", "CalDigit Thunderbolt 3 Audio", "LG UltraFine Display Audio", "MacBook Pro Speakers" ]
}

Note that currentOutput has the correct string with trailing spaces, but that item in outputs does not. The actual device is a Matrix Audio USB audio interface, which IIRC should just be using the USB audio class driver. System Information also clearly shows the trailing spaces in its audio device list:

USB Sound Device        :

where no other device has spaces between the name and the colon, e.g.:

MacBook Pro Speakers:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant