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

No available API on x86_64 linux #6

Closed
capsjac opened this issue Aug 17, 2014 · 4 comments
Closed

No available API on x86_64 linux #6

capsjac opened this issue Aug 17, 2014 · 4 comments

Comments

@capsjac
Copy link

capsjac commented Aug 17, 2014

bindings-portaudio/example$ example-portaudio 500 500
Initialization: 0
Available APIs:
Opening the default stream: -9985
example-portaudio: user error (Failed.)

The system has ALSA installed and flashplayer works well.
Any workaround?

@fumieval
Copy link
Owner

The first argument of example-portaudio is a sample rate (normally, it will be 44100 or 48000) and the second is a buffer size request (preferred range is 128~2048).

There are no audio devices that run with 500Hz sampling rate.

@capsjac
Copy link
Author

capsjac commented Aug 17, 2014

$ example-portaudio 48000 2048
Initialization: 0
Available APIs:
Opening the default stream: -9985
example-portaudio: user error (Failed.)

$ example-portaudio 44100 128
Initialization: 0
Available APIs:
Opening the default stream: -9985
example-portaudio: user error (Failed.)

$ example-portaudio 44100 2048
Initialization: 0
Available APIs:
Opening the default stream: -9985
example-portaudio: user error (Failed.)

It still doesn't work.
rate and buf are not used to list available APIs (as I see), thus there exists some issue other than mismatched arguments, I think.

@fumieval
Copy link
Owner

Did you install bindings-portauio with -fALSA?

However, this issue will not occur as soon as I remove all the builtin things for Linux/Mac.

@capsjac
Copy link
Author

capsjac commented Aug 18, 2014

$ cabal install -fALSA
example$ ghc sine
example$ ./sine 44100 2048
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:947:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:947:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only
playback stream
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only
playback stream
Initialization: 0
Available APIs:
(0,"ALSA")
Opening the default stream: 0
Starting the stream: 0
Stopping the stream: 0
Closing the stream: 0

Is it okey?
(by the way, did you checked my email?)

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

2 participants