-
Notifications
You must be signed in to change notification settings - Fork 763
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
SC_PortAudioDriver: PortAudio failed at Pa_OpenStream with error: 'Unanticipated host error' could not initialize audio. RESULT = -1073740791 #3976
Comments
SC's audio engine, scsynth, in Windows uses a library called PortAudio to connect to the audio hardware driver. If something goes wrong during the connection, then you'll see PortAudio errors. These errors are generally not bugs, but rather environmental factors in the system. (I feel I should emphasize that since this is logged as a bug report -- if the expectation is that a code fix in SC will resolve this, chances are that it won't.) The helpful thing about PortAudio errors is that many other audio programs also use PortAudio -- so, web searching for the error text is likely to turn up useful advice. https://answers.bitwig.com/questions/1317/engine-failed-to-connect However, I can think of one possible bug within SC. Can you try something? After launching SC from scratch:
If this succeeds where Kopfhörer failed, it would point to a class of issues that I thought had been fixed, but maybe wasn't (or is maybe not fixed in 3.9.x). My guess is that this is unlikely but it's worth testing. |
hey and i guess your try would be to Change outDevice, not inDevice? Well I do try that… very confusing, why does your s.options.inDevice = … changes the output? But anyway same result (= -1073740791) :-/ well i guess to installing another Driver for the OnBoard soundcard should Change something. hope so |
My fault (editing text on a phone), I meant:
|
man even with a new driver it does not work, i am getting mad. and a fancy 2-ugly-color-plus-grey-trayicon that is just criminal priceless. the new Output: -> localhost Device options:
Booting with: edit…. now i know that Windows does no has any Sound anymore… new driver... dude... |
no way!!!!!!!!!! TWO TRAY ICONs now!!! (and still no Sound) |
might the fact that i plugged the Stereo in the headphone socket at Tower front be the reason of my Problem? |
spare!!! i deinstalled that tray Icon program, now Windows Sound works again :) buuut… s.options.outDevice = does not work anymore. Output: "-> a ServerOptions" iirc mme never worked for any program… i mostly used wasapi what Always worked. so just s.options.outDevice = wasapi would have to work eigh? |
That's the correct output.
|
mh… but it doesnt Change the device ? |
So then you might try:
FWIW Windows audio is terribly fiddly. |
nope… still mme --> Booting with: |
i think with the Change to wasapi it would work… so please someone help me to find out how to switch the Output device. i am really too lazy to plug the saffire… so it's at you now! how to swith to wasapi here. |
Here, I need to ask other developers. I just noticed something weird in the SC code.
In Windows, we often need to specify a separate input and output device, but it seems not to be supported? Can anyone responsible for the Windows code elaborate? This seems wrong to me. In the meantime, maybe this?
|
The last thing I can think of is to set the system's default audio devices (input and output) using the Windows control panel, and don't do anything with inDevice and outDevice. That's not an ideal solution IMO but it may be the best available at the moment. |
no it always keeps being mme. sigh. |
ERROR: Variable 'systemdefault' not defined. |
No, I said "set the system's default audio devices (input and output) using the Windows control panel". |
Sorry, I was answering on a phone, I emphatically did not mean to close it. It's only because "close and comment" is too close and my phone's accuracy is not good. |
@brianlheim is there any chance that the string encoding fixes for Windows might have broken audio device selection? I'm pretty sure, in my old Windows environment, that I could use In this issue, it appears that we are specifying a device, and scsynth is searching for the device but not finding it, and then reverting to some default which (to make matters worse) PortAudio refuses to connect to. So there are two problems whose internals I don't understand and for which I have no more troubleshooting ideas.
And a third, side issue: Looking at this user's device list, options for a single I/O device are limited. How, in SC, should the user choose a specific input and a specific output of a soundcard when the input's name and the output's name are different? Currently this appears unsupported. That might not be acceptable. |
@th1sthye7 Sorry, I know this is a pain (much more than it should be), but could you confirm the exact steps you're taking? I can sort of infer some of what you're doing based on your log output, but "inferring" is not enough to evaluate the issue. Scenario 1: Using Windows system default audio.
Scenario 2: Using s.options.
Background: SC has had problems before with characters outside of ASCII 0-127, including accented characters. Supposedly this was fixed, but it's possible a bug still lingers. (Here, SC has to read the device name from the code instruction, stick it into another string for the command to launch scsynth, and then scsynth has to compare that against device names -- at least three translations: code --> string, string --> scsynth commandline, scsynth CL argument --> device comparison. I believe the first two should be safe but I'm not sure about the third.) But, to prove that this is the case, we need to be absolutely 100% certain of the instructions you're submitting. I apologize again, but the more I see, it's looking like a serious problem. I don't want it to get lost because of insufficient detail. |
@th1sthye7 One more suggestion: an ASIO driver will probably work better, e.g. https://en.softonic.com/download/asio4all/windows -- this will present one interface name for input and output and avoid some of these problems. Sorry this has been so irritating. |
Out: MME : Kopfhörer (High Definition Audi [...ah... i understand… for the Computer it's hard to know if the two dots over the o are 0's or 1's, right?] ehm… okay that really might be a reason. let's see if there could be a workaround |
asio4all had lot of Problems with it... did not work well. of Course that was in 2007 or '08... did it became better? |
@th1sthye7 Which site are you looking at? I have no way to evaluate whether you've downloaded from a good or bad source. Your screenshot is showing asio4all v2.08 and 2.09... I'm finding sites for v2.14. http://www.softpedia.com/get/Multimedia/Audio/Other-AUDIO-Tools/ASIO4ALL.shtml (I checked the site specifically -- it has 2.14 in English and 2.13 in German) https://www.majorgeeks.com/files/details/asio4all.html
(Unfortunately) Yes, it really could. If you want the backstory... strings in SC have always been encoded as 7-bit ASCII characters. If you think this is an icky problem, consider that in really old versions of SC, you couldn't even put "Kopfhörer" into a GUI view (but now you can). It was even worse for multibyte symbols like Chinese, Japanese or Korean characters. Then somebody figured out, we can treat an array of bytes as Unicode... but then there were issues in Windows where our strings are represented internally using one encoding but the Windows file system expects a different encoding. Most of those issues have been fixed. But, as I pointed out, there are a couple of key translations. Your code in the code window --> SC string should be OK. SC string containing non-ASCII characters --> Windows commandline, I'm not 100% sure. Windows commandline argument --> scsynth for checking against the device list, I'm not 100% sure (though I think, maybe, last year I had some students with Chinese characters in device names and it might have worked...? My memory is fuzzy). Full Unicode support in SC has been discussed but it would mean massive changes to the language internals, so this hasn't happened. |
your link i downloaded the .08 ...mmmh i might look for a .14. OOOh surprise Booting with: okay let's see what to do now. |
WOOPIE |
Oh, I'm silly, I saw MME and thought it was still broken 🤦 ok, I see it now, it booted last time. I'd like to close this one, then, and make a clean enhancement request for better device selection in Windows. |
yes it works now… ..what i did was to deactivate all other Outputs expect the front Panel, and all Inputs. it does not look like it uses asio. |
Great! Opened #3990, so I'll close this now. Thanks for your patience. |
Thanks @jamshark70 and @th1sthye7 for triaging this so patiently :) |
Environment
Windows 10 x64 Newest Update (1803?)
SuperCollider 3.9.0 and 3.9.3
Expected Behavior
audio
Current Behavior
no audio
Steps to reproduce (for bugs)
/
Error message (for bugs)
log:
compiling class library...
Found 695 primitives.
Compiling directory 'C:\Program Files\SuperCollider-3.9.0\SCClassLibrary'
Compiling directory 'C:\Users\x\AppData\Roaming\SuperCollider\Extensions'
Compiling directory 'C:\Users\x\AppData\Local\SuperCollider\Extensions'
numentries = 808750 / 11502548 = 0.07
5186 method selectors, 2218 classes
method table size 12343840 bytes, big table size 92020384
Number of Symbols 11733
Byte Code Size 358430
compiled 321 files in 3.19 seconds
Info: 2 methods are currently overwritten by extensions. To see which, execute:
MethodOverride.printAll
compile done
localhost : setting clientID to 0.
internal : setting clientID to 0.
Class tree inited in 0.02 seconds
*** Welcome to SuperCollider 3.9.0. *** For help press Ctrl-D.
SCDoc: Indexing help-files...
SCDoc: Indexed 1338 documents in 9.26 seconds
booting server 'localhost' on address: 127.0.0.1:57110
Device options:
Booting with:
In: MME : Mikrofon (High Definition Audio
Out: MME : Kopfhörer (High Definition Audi
SC_PortAudioDriver: PortAudio failed at Pa_OpenStream with error: 'Unanticipated host error'
could not initialize audio.
RESULT = -1073740791
The text was updated successfully, but these errors were encountered: