I just had this problem.  It looks like setperiodsize() is more like a
request than a command---the value you pass in is the requested value,
but the value returned in what the system is actually using.  I assume
this is the fault of the underlying ALSA API.  I did this to figure out
what the valid period sizes were:

>>> import alsaaudio as aa
>>> capt = aa.PCM(aa.PCM_CAPTURE)
>>> capt.setchannels(1)
>>> capt.setrate(44100)
>>> for n in range(1, 16385):
>>>     if capt.setperiodsize(n) == n:
>>>         print n

On my system, this printed:
192
224
256
320
384
448
512
640
768
896
1024
1280
1536
1792
2048
2560
3072
3584
4096
5120
6144
7168
8192
10240
12288
14336
16384

Attempting to set any other period size resulting in 16384 being
actually selected.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/189663

Title:
  setperiodsize does not work in python-alsaaudio

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pyalsaaudio/+bug/189663/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to