-
Notifications
You must be signed in to change notification settings - Fork 757
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
scsynth: CoreAudio: don't complain about mismatched sample rates if numInputBusChannels == 0 #2610
Conversation
The scsynth CoreAudio driver checks to make sure that the sample rates of the input and output devices are the same, and if they are not, an error message is produced and scsynth refuses to boot. This commit skips the check if the number of input bus channels is 0. This allows the command-line option "-i 0" to serve as a simple workaround if the user would prefer to simply ignore the input device.
inputStreamDesc.mSampleRate != outputStreamDesc.mSampleRate | ||
) { | ||
scprintf( | ||
"ERROR: Input sample rate is %g, but output is %g. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe s/output/output rate/ for clarity?
) { | ||
scprintf( | ||
"ERROR: Input sample rate is %g, but output is %g. " | ||
"Mismatched sample rates are not supported. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's SC's style regarding adjacent strings for concatenation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen it in other places in our codebase, but I'm too lazy to check where.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++ will concatenate these just fine. SC does the same thing, no added spaces.
Other than my little stylistic questions, looks good to me (although I'm another person who can't test -- just go off @samaaron 's word that it works correctly) |
Fix for #2608. The scsynth CoreAudio driver checks to make sure that the sample rates of the input and output devices are the same, and if they are not, an error message is produced and scsynth refuses to boot. This commit skips the check if the number of input bus channels is 0. This allows the command-line option "-i 0" to serve as a simple workaround if the user would prefer to simply ignore the input device.
The driver still queries some information about the input device, so this is sort of a bandage. Also, I'm committing blind, so please test.