Chris Diamand 3f6fb9844d Support decibel, percentage, and raw volumes in getvolume, setvolume, and getrange (#109)
* Use `pcmtype` keyword for range

Update methods that accept a `direction` argument (i.e.
capture/playback) to get this via positional _or_ keyword arguments.

Code using keyword arguments can be more robust; however the main reason
for this change is to prepare the way for an extra `units` argument to
many of these methods.

Update documentation to consistently use `pcmtype` instead of
a mixture of that and `direction`.

* Support units
2022-03-28 21:46:40 +02:00
2021-04-06 09:09:49 +02:00
2020-07-09 21:22:06 +02:00
2020-07-13 20:42:25 +01:00
2015-05-14 01:42:13 +02:00
2021-04-07 12:12:10 +02:00
2020-07-09 21:22:06 +02:00
2020-07-13 20:51:59 +02:00

PyAlsaAudio

For documentation, see http://larsimmisch.github.io/pyalsaaudio/

Author: Casper Wilstrup (cwi@aves.dk)
Maintainer: Lars Immisch (lars@ibp.de)

This package contains wrappers for accessing the ALSA API from Python. It is currently fairly complete for PCM devices, and has some support for mixers.

If you find bugs in the wrappers please open an issue in the issue tracker. Please don't send bug reports regarding ALSA specifically. There are several bugs in the ALSA API, and those should be reported to the ALSA team - not me.

This software is licensed under the PSF license - the same one used by the majority of the python distribution. Basically you can use it for anything you wish (even commercial purposes). There is no warranty whatsoever.

Installation

PyPI

To install pyalsaaudio via pip (or easy_install):

  $ pip install pyalsaaudio

Manual installation

Note: the wrappers need a kernel with ALSA support, and the ALSA library and headers. The installation of these varies from distribution to distribution.

On Debian or Ubuntu, make sure to install libasound2-dev. On Arch, install alsa-lib. When in doubt, search your distribution for a package that contains libasound.so and asoundlib.h.

First, get the sources and change to the source directory:

  $ git clone https://github.com/larsimmisch/pyalsaaudio.git
  $ cd pyalsaaudio

Then, build:

  $ python setup.py build

And install:

  $ sudo python setup.py install

Using the API

The API documentation is included in the doc subdirectory of the source distribution; it is also online on http://larsimmisch.github.io/pyalsaaudio/.

There are some example programs included with the source:

Description
No description provided
Readme 1.1 MiB
Languages
C 88%
Python 11.3%
Shell 0.4%
Makefile 0.3%