Commit Graph

269 Commits

Author SHA1 Message Date
Lars Immisch eaa0e33999 Update docs to see if workflow gets triggered 2025-11-18 18:18:30 +00:00
Lars Immisch 1cd978f15f Prepare doc generation test 2025-11-18 18:18:03 +00:00
Matteo Bernardini daf38e38cf chore: use makefile for reference on building sdist and wheels 2025-09-03 13:18:03 +08:00
Matteo Bernardini 04d6f8c9d7 fix: drop py2 trove classifier 2025-09-03 12:59:57 +08:00
Matteo Bernardini f0d9d2a7a8 ci: deploy on tags only 2025-09-03 12:55:59 +08:00
Matteo Bernardini 3889f27891 ci: fix permissions 2025-09-03 12:06:49 +08:00
Matteo Bernardini e5f400866b ci: install ALSA headers 2025-09-03 12:03:45 +08:00
Matteo Bernardini 06a81377a3 ci: install uv 2025-09-03 12:00:42 +08:00
Matteo Bernardini 5e29c0dfe5 ci: automatically build docs 2025-09-03 11:58:13 +08:00
Matteo Bernardini c89faf517b chore: split dependency groups 2025-09-03 11:45:29 +08:00
Matteo Bernardini 112885e97a ci: remove unsupported setting 2025-09-03 11:30:11 +08:00
Matteo Bernardini 06e67cc533 ci: auto-detect package manager to use 2025-09-03 11:27:46 +08:00
Matteo Bernardini 1dfbc37135 ci: use legacy license definition to allow building on py3.9 2025-09-03 11:04:17 +08:00
Matteo Bernardini a3db924109 ci: enforce setuptools version 2025-09-03 10:37:56 +08:00
Matteo Bernardini 68203e9187 ci: ensure alsa headers are installed 2025-09-02 22:31:48 +08:00
Matteo Bernardini 8c693f4843 chore: stub workflow for automatic docs deployment 2025-08-24 22:04:40 +08:00
Matteo Bernardini b4e2ea4fd5 chore: top-level makefile for common dev tasks 2025-08-24 22:03:53 +08:00
Matteo Bernardini 4c75488b47 ci: workflow to automate releases on tags 2025-08-24 21:56:56 +08:00
Matteo Bernardini 39846bfb3e chore: make pyright happy on tests 2025-08-06 18:06:43 +08:00
Matteo Bernardini 0aa35bc379 fix: PCM constructor stubs not coherent with runtime 2025-08-06 18:04:28 +08:00
Matteo Bernardini fb17a4e9af fix(docs): add sphinx dep, fix version retrieval 2025-08-06 17:27:00 +08:00
Matteo Bernardini a9cb7d8437 fix: stub consistency to runtime 2025-08-06 17:17:57 +08:00
Matteo Bernardini b3730bc713 chore(deps): add mypy (for stubtest utility) 2025-08-06 17:14:31 +08:00
Matteo Bernardini 2b090f05fa fix: use Final for enum constants 2025-08-06 17:12:53 +08:00
Matteo Bernardini 177d9e147d fix: missing self in type stubs 2025-08-06 17:03:43 +08:00
Matteo Bernardini be7e203fdb chore(deps): add pyright for type-checking 2025-08-06 17:03:32 +08:00
Matteo Bernardini 1670c6b1a3 fix: add ALSAAudioError to type stubs 2025-08-06 15:45:28 +08:00
Matteo Bernardini 2e0f952475 fix: include doc/ and examples/ in sdist 2025-08-06 15:33:35 +08:00
Matteo Bernardini aea0fc62e8 chore: modernise packaging.
- use pyproject.toml to define project metadata and setuptools-specific configuration, removing the need for a setup.py file
- move sources in conventional src/ directory
- rework stubs so that they're visible downstream. PEP-561 doesn't support top-level .pyi files, so I made a dummy package instead `alsaaudio-stubs`
2025-08-06 13:05:52 +08:00
Matteo Bernardini 807c36d133 chore: move unit tests to conventional directory 2025-08-06 13:01:10 +08:00
Matteo Bernardini d86f379554 chore: move examples to dedicated directory 2025-08-06 12:59:57 +08:00
Lars Immisch 0b3f1f41c7 Prepare 0.11.0
Bump version and update changelog.
0.11.0
2024-05-30 23:15:27 +02:00
Lars Immisch 3e360b1bb7 Update MANIFEST.in for type hints 2024-05-14 20:56:51 +01:00
Lars Immisch 44ccbf839d Fix sphinx warning 2024-05-07 19:07:47 +02:00
Lars Immisch 2c2e43d3d1 Add type hints & docs 2024-05-07 19:07:47 +02:00
Lars Immisch a142b70033 Reorder for consistency between alsapcm_methods and code
getchannels/setchannels should be together IMO
2024-05-07 19:07:47 +02:00
Lars Immisch 26ba938e04 Make commands optional 2024-04-19 18:32:38 +01:00
Lars Immisch f5e9d52c74 Add missing attribute 2024-04-19 13:10:39 +01:00
Ville Viinikka 436c31f9fd Add nominal_bits and physical_bits info
Adds the information discussed in pull request #144
2024-03-13 10:59:11 +01:00
Ville Viinikka eda913b203 Use correct sample bit width
snd_pcm_hw_params_get_sbits gives the number of significant bits, not
the actual number of bits stored. Change to snd_pcm_format_physical_width.

This fixes a bug where, for example on my hardware:
format = 'S32_LE'
significant bits = 24
physical bits = 32

the program will segfault because the allocated buffer is too small.
2024-02-20 18:31:00 +01:00
Lars Immisch 0aba948277 Whitespace cleanup.
I ended up using Visual Studio Code and did a global regex replace
` +\n` -> `\n` (StackOverflow)
2024-02-20 18:08:09 +01:00
Oswald Buddenhagen 9b7b767594 fix docu typo 2024-02-06 00:39:15 +01:00
Oswald Buddenhagen db87f2ced5 document new avail() and polldescriptors_revents() PCM functions
amends 43a94b3 and 5221311.
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen f179db2d9b de-duplicate PCM.info() documentation
... and move the dumpinfo() docu.

amends 4e098da - clearly, i'm blind.
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen 420b538321 improve documentation of PCM c'tor and info() method
reformulate and redistribute the information, somewhat inspired by text
provided by Ronald van Elburg in response to issue #110.
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen ae5c4aad9b add xrun handling to the examples
it's very primitive, but it shows adequately what can happen and what to
do about it minimally (that is, complain and move on).
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen d23b26b2e5 isine example: fix stereo handling (#42)
while it's usually not actually necessary to generate a stereo signal
(alsa's default plughw device will happily duplicate it for us), we
still do it for demo purposes, just because.

a more realistic demo would actually use numpy, as that's what the
library will most likely be used with, but anyway.
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen 1d63226e56 isine example: simplify calculations in generate()
i found them a tad hard to follow ...
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen 664f81a777 isine example: simplify thread run loop
avoid code duplication.
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen eb51d11619 isine example: actually play some tones
the thread in the background actually needs time to do something
sensible. this is most easily achieved by simply sleeping in the
foreground thread.

i addition to the 440 Hz tone, also play 1 kHz, to demonstrate how
the change() function is used.
2024-02-06 00:39:15 +01:00