【发布时间】:2015-12-03 09:43:40
【问题描述】:
我在没有 jack 的 Ubuntu 14.04 上安装了 pyo 并运行 Python 2.7。我遵循了 pyo wiki 中编写的 Debian-based installing instructions。 这是我使用的代码(在pyo introduction page):
from pyo import *
s = Server().boot()
s.start()
a = Sine(mul=0.01).out()
结果如下:
pyo version 0.6.8 (uses single precision)
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
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
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1514
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2818
portaudio error in Pa_OpenStream: Invalid number of channels
Portaudio error: Invalid number of channels
Server not booted.
The Server must be booted!
Traceback (most recent call last):
File "/host/Python/Synth/synther.py", line 4, in <module>
a = Sine(mul=0.01).out()
File "/usr/lib/python2.7/dist-packages/pyolib/generators.py", line 58, in __init__
PyoObject.__init__(self, mul, add)
File "/usr/lib/python2.7/dist-packages/pyolib/_core.py", line 376, in __init__
PyoObjectBase.__init__(self)
File "/usr/lib/python2.7/dist-packages/pyolib/_core.py", line 262, in __init__
raise PyoServerStateException("The Server must be booted before creating any audio object.")
pyolib._core.PyoServerStateException: The Server must be booted before creating any audio object.
PS:对使用jack没兴趣,已经遇到问题了。
【问题讨论】:
-
我刚刚遇到了同样的问题。我已尝试明确限制通道数 (
s = Server(nchnls=2).boot()),但这会导致相同的错误。
标签: python python-2.7 ubuntu ubuntu-14.04 pyo