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

[help needed] failure in opening stream (ffffd8f2) #428

Closed
ghost opened this issue Dec 28, 2021 · 16 comments
Closed

[help needed] failure in opening stream (ffffd8f2) #428

ghost opened this issue Dec 28, 2021 · 16 comments

Comments

@ghost
Copy link

ghost commented Dec 28, 2021

I'm on macOS I have installed cava using brew. The config dir wasn't there so I manually put it there. Background Music is running and I changed everything I could to
method = portaudio
source = "Background Music"
When running cava it displays that error and brakes my session.

@karlstav
Copy link
Owner

karlstav commented Dec 28, 2021

if I'm not mistaken ffffd8f2 means paInvalidChannelCount

cava hardcode this value to two here:

inputParameters.channelCount = 2;

could you have more or less channels on your device?

@karlstav
Copy link
Owner

there is also a known issue with background music that

Only 2-channel (stereo) audio devices are currently supported for output.

might be related

@ghost
Copy link
Author

ghost commented Dec 29, 2021

I don't really understand what that means but I assume it means for each headphone, I tried changing the output of background music to vb-cable (and it indicated that there is only 2-channels) and at the beginning my terminal was blank but after some time it gave me same error. Now it gives me that error without being blank.

@karlstav
Copy link
Owner

karlstav commented Jan 30, 2022

hi @life-the-user,

sorry for the late reply, finally got around to actually test portaudio on mac and this does indeed happen. Luckily it is a known bug in portaudio. Just reinstall it and it should work fine.

brew reinstall portaudio

a simple brew upgrade might also solve it. I should have tried that first, too late now.

@cybardev
Copy link

cybardev commented Mar 24, 2022

I installed and set up everything, and this Error was resolved. But now whenever I start cava, it shows the same visualization, regardless of whether something is playing or not.

Is that normal, or is the expected behaviour when nothing is playing, a flat visualizer will be shown, and when something is playing, the audio output will be visualized?

PS: I'm on an M1 Macbook Air

This could also be an issue with my installation of BackgroundMusic, and I've created an issue there too: #592

@karlstav
Copy link
Owner

it shows the same visualization, regardless of whether something is playing or not.

elaborate, what is "the same"? screenshot?

is the expected behaviour when nothing is playing, a flat visualizer will be shown

yes.

@cybardev
Copy link

cybardev commented Mar 25, 2022

Like this:

image

I'm not playing any music, and this appears. I think it's because of my BackgroundMusic installation going wrong. I can't try Sunflower because I'm on M1.

@cybardev
Copy link

Nvm, it suddenly started working. From what I see (for my case), it's definitely because of BackgroundMusic, not cava.

@karlstav
Copy link
Owner

karlstav commented Apr 7, 2022

this is an issue with portaudio not cava.

to solve this issue reinstall portaudio:

brew reinstall portaudio

@karlstav karlstav closed this as completed Apr 7, 2022
@satyajit-ink
Copy link

I have the same error on macOS, i've tried brew reinstall portaudio

@karlstav
Copy link
Owner

what is your macos and portaudio version? cava config? is the error code the same?

@satyajit-ink
Copy link

macOS 12.3.1
portaudio 19.7.0

Error: failure in opening stream (ffffd8f2)

Config

method = portaudio
source = "Background Music"

@karlstav
Copy link
Owner

works fine for me on macOS 11.6.4 (no time to upgrade at the moment)

that error code actually means "invalid number of channels". I just pushed a commit to print the portaudio errors as strings instead of hex number. Could there be something with your audio setup. The source needs to be two channels.

@domogami
Copy link

domogami commented Jul 8, 2022

I'm actually also getting the same error with
Cava Version: 0.8.2.-17-g4515856-dirty
Portaudio Version: stable 19.7.0 (bottled), HEAD
Background Music Version: 0.4.0
MacOS: 12.4
M1 Max 16 inch
I have already reinstalled all of the packages and upgraded them with brew upgrade and I can't seem to figure out the source of this error Error: failure in opening stream (Invalid number of channels). If anyone who has had this error and fixed it can provide a more detailed report of how they were able to debug this it would be greatly appreciated 🙏

My ~/.config/canva/config

# ...
[input]
; method = portaudio
; source = "Background Music"

; method = alsa
; source = hw:Loopback,1

; method = fifo
; source = /tmp/mpd.fifo
; sample_rate = 44100
; sample_bits = 16

; method = shmem
; source = /squeezelite-AA:BB:CC:DD:EE:FF
# ...

@karlstav
Copy link
Owner

karlstav commented Jul 9, 2022

Your relevant config option is comented out. Try to remove the semicolon before

source = "Background Music"

If it still fails, you could try spundflower instead of background music. I recall there was some issues with background music in recent macos versions.

@domogami
Copy link

domogami commented Jul 9, 2022

Your relevant config option is comented out. Try to remove the semicolon before

source = "Background Music"

If it still fails, you could try spundflower instead of background music. I recall there was some issues with background music in recent macos versions.

Oh my god thank you so much. I cannot believe I didn't realize that the semicolon was a comment! It's working perfectly now! Thank you again for noticing that!

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

No branches or pull requests

4 participants