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

Windows - possible fix for if there is no default input or output device on a machine #1009

Closed
sensestage opened this issue Dec 20, 2013 · 2 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: Windows

Comments

@sensestage
Copy link
Contributor

Looking at the source code of scsynth [1], I see that in case that
either input device or output device is not defined, it will try and
get the default set for that in the system configuration. Since you
have no input devices, that one will fail, and you get to the fallback
option, which fails.

Suggested fix, for a Windows developer to try out:
// lines 350,351 are currently
if (mDeviceInOut[0] == paNoDevice) mDeviceInOut[0] =
Pa_GetDefaultInputDevice();
if (mDeviceInOut[1] == paNoDevice) mDeviceInOut[1] =
Pa_GetDefaultOutputDevice();

// add this line afterwards:
if (mDeviceInOut[0] == paNoDevice) mDeviceInOut[0] = mDeviceInOut[1];

Then the rest of the code should catch the problems, and real problems
only occur when there is no output device.
If you want to catch also that case, add another line:
if (mDeviceInOut[1] == paNoDevice) mDeviceInOut[1] = mDeviceInOut[0];

That way, you will always have either input or output... (only input
could be of interest to pure recording setups without monitoring).

sincerely,
Marije

[1] bool SC_PortAudioDriver::DriverSetup(int* outNumSamples, double*
outSampleRate) in SC_PortAudio.cpp around line 328

@sensestage
Copy link
Contributor Author

I see that this is probably a duplicate for Issue #844, so please try this fix

@scztt scztt added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: Windows labels Mar 15, 2015
@bagong
Copy link
Contributor

bagong commented May 8, 2015

fixed by 3f78951

@bagong bagong closed this as completed May 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: Windows
Projects
None yet
Development

No branches or pull requests

3 participants