dechamps / FlexASIO

A flexible universal ASIO driver that uses the PortAudio sound I/O library. Supports WASAPI (shared and exclusive), KS, DirectSound and MME.
Other
1.29k stars 70 forks source link

Failed to initialize with Behringer UMC202HD interface #214

Closed Nightquaker closed 4 months ago

Nightquaker commented 4 months ago

Hey! So I just bought a Behringer UMC202HD interface, installed its drivers, etc. The interface and its ASIO driver is working good, but when I try to switch to FlexASIO it fails to initialize. Prior to that, without the interface, FlexASIO worked fine. I enabled logging, but the logs end up empty after the errors. I ran the self-test program, same thing. In Ableton it says "failed to initialize ASIO device", while in FL it says something like "not enough outputs to initialize the device, minimum of 2 outputs are required", which I assume is pretty much the same thing. Also, I tried adjusting the outputs in the FlexASIO config, and that didn't help.

Would appreciate any advice as FlexASIO is the only way for me to capture Ableton and such with OBS, which is not possible (so far) with the interface's native hardware ASIO driver.

Nightquaker commented 4 months ago

UPDATE!!! I was able to produce a log. Attached. FlexASIO.log

dechamps commented 4 months ago

Your device has only 1 input channel, but you're trying to use 2:

2024-02-10T11:38:35.8790552+02:00 3652 8488 Configuration file successfully parsed as valid TOML: backend = "Windows WASAPI"
bufferSizeSamples = 256

[input]
channels = 2
…
2024-02-10T11:38:35.9445543+02:00 3652 8488 Searching for a PortAudio device named `IN 2 (BEHRINGER UMC 202HD 192k)`
2024-02-10T11:38:35.9445749+02:00 3652 8488 Found a match with device 21
2024-02-10T11:38:35.9445890+02:00 3652 8488 Selected input device: PortAudio device index 21 (name: 'IN 2 (BEHRINGER UMC 202HD 192k)', host API: 2, default sample rate: 48000, max input channels: 1, max output channels: 0, input latency: 0.003 (low) 0.01 (high), output latency: 0 (low) 0 (high))
…
2024-02-10T11:38:35.9448871+02:00 3652 8488 Input channel count: 2
2024-02-10T11:38:35.9449005+02:00 3652 8488 WARNING: input channel count is higher than the max channel count for this device. Input device initialization might fail.
…
2024-02-10T11:38:35.9455403+02:00 3652 8488 Opening PortAudio stream with...
2024-02-10T11:38:35.9455646+02:00 3652 8488 ...input parameters: PortAudio stream parameters for device index 21, 2 channels, sample format 2147483649 [Float32, NonInterleaved], suggested latency 0.016s, host API specific: 56 bytes structure, type 13 [WASAPI], version 1, WASAPI specific: flags 32 [ExplicitSampleFormat], channel mask 0, host processor output 0000000000000000, host processor input 0000000000000000, thread priority 0 [None], stream category 0 [Other], stream option 0 [None]
2024-02-10T11:38:35.9455986+02:00 3652 8488 ...output parameters: PortAudio stream parameters for device index 18, 2 channels, sample format 2147483649 [Float32, NonInterleaved], suggested latency 0.016s, host API specific: 56 bytes structure, type 13 [WASAPI], version 1, WASAPI specific: flags 32 [ExplicitSampleFormat], channel mask 0, host processor output 0000000000000000, host processor input 0000000000000000, thread priority 0 [None], stream category 0 [Other], stream option 0 [None]
2024-02-10T11:38:35.9456249+02:00 3652 8488 ...sample rate: 48000 Hz
2024-02-10T11:38:35.9456397+02:00 3652 8488 ...frames per buffer: 256
2024-02-10T11:38:35.9456531+02:00 3652 8488 ...stream flags: 8 [PrimeOutputBuffersUsingStreamCallback]
2024-02-10T11:38:35.9456673+02:00 3652 8488 ...stream callback: 00007FFED8F53A71 (user data 00000000299EA2D0)
2024-02-10T11:38:35.9456900+02:00 3652 8488 [PortAudio] WASAPI ERROR PAERROR: -9998 : Invalid number of channels
 [FUNCTION: OpenStream FILE: D:\a\FlexASIO\FlexASIO\src\portaudio\src\hostapi\wasapi\pa_win_wasapi.c {LINE: 3906}]

It should work if you remove channels = 2 from the [input] section of your configuration file.

If you did not expect this device to only have 1 input channel, you may want to take a look at this FAQ.

Nightquaker commented 4 months ago

@dechamps Yep, turned out to be input channel issue. Everything works now. Thank you! :) Love FlexASIO btw, it's great.