Ronald van Elburg
3168833b4e
Merge remote-tracking branch 'upstream/master' into add_timestamp_function
...
# Conflicts:
# alsaaudio.c
2021-04-02 22:54:18 +02:00
Lars Immisch
c74669850b
Merge pull request #92 from soundappraisal/pcm_info_function
...
Add an PCM.info function: returns pcm properties as a dict
2021-04-02 20:57:15 +02:00
Ronald van Elburg
1a4c0541d7
Change name timestamp_raw fuinction to htimestamp to follow the convention used in the rest of the library: that's the current convention (prefix the name with alsapcm_ for PCM methods).
2021-04-02 13:42:51 +02:00
Ronald van Elburg
e6a6445375
Move creation of dictionary to a point after error handling, when it is relatively certain that the function will succeed.
...
(cherry picked from commit 1820716a4bc018bb903b95bcf5d7cf83a5ebda9c)
2021-04-02 13:24:55 +02:00
Ronald van Elburg
97f2abcb30
Remove debugging print statement.
...
(cherry picked from commit dcc43f3da7bf4d083cc6cab18ae464261fadc53f)
2021-04-02 13:24:55 +02:00
Ronald van Elburg
a53ffd0d4f
Fix potential memory leaks on new info function.
...
(cherry picked from commit ade9dd5923edd65c1fcdf2298e8ad024daf66e2a)
2021-04-02 13:24:55 +02:00
Ronald van Elburg
da71e01f9c
Remove unused code from timestamp_raw function.
2021-03-31 16:27:55 +02:00
Ronald van Elburg
f6736ec43a
first version timestamp function
...
(cherry picked from commit 21d0527c7b91723b3bfc87ea889bd599dff12576)
# Conflicts:
# alsaaudio.c
2020-11-02 19:32:34 +01:00
Ronald van Elburg
e48b294b84
PCM.info function: added format, mode and type fields. Also added a doc string describing the info function.
2020-10-28 22:01:04 +01:00
Ronald van Elburg
c8e7261e94
Add an PCM.info function returning the information now printed by dumpinfo as a dictionary. Removed double entry from dumpinfo.
2020-10-27 12:41:59 +01:00
Ronald van Elburg
5c481b4094
Fix #51 : Only return valid part of the buffer in the read function; avoid unnecesssary work by only changing size when needed
2020-09-30 15:58:19 +02:00
Ronald van Elburg
1e3c7f3fd0
Fix #51 : Only return valid part of the buffer in the read function
2020-09-30 15:11:10 +02:00
Lars Immisch
0ae60f80f3
Better pcm_type deduction in alsamixer_getvolume
...
Closes #87
2020-07-16 23:36:50 +02:00
Lars Immisch
5302dc524d
Cleanup warnings
2020-07-13 20:59:49 +02:00
Lars Immisch
0224c8a308
Inline documentation (and .gitignore)
2020-07-10 00:54:24 +02:00
Lars Immisch
f07627543c
Update documentation
2020-07-10 00:45:57 +02:00
Lars Immisch
2a21bf6c42
Support all essential parameters in alsapcm_new.
2020-07-08 22:39:46 +02:00
stalkerg
8fbc04e18d
fix generate switch capabilities
2020-05-21 17:21:40 +09:00
Lars Immisch
8ed9f924cd
Attempt to fix #45
2020-04-23 21:36:29 +01:00
Lars Immisch
046e7c4e87
Get rid of warnings, adjust CHANGES
2020-04-01 22:47:11 +02:00
Lars Immisch
a4c4c7cb62
Consistent indentation and some code style changes (whould be ws only)
2020-03-09 22:28:08 +01:00
Lars Immisch
f478797f6f
Merge branch 'dev/card-detail' of https://github.com/jdstmporter/pyalsaaudio into jdstmporter-dev/card-detail
2020-03-09 22:07:23 +01:00
Julian Porter
f244a70111
tidied up
2020-03-06 20:06:59 +00:00
Julian Porter
be1b3e131d
demo
2020-03-05 00:50:30 +00:00
Danny
8abf06bedf
Prevent hang on close after capturing audio
...
Currently, after recording audio using pyalsaaudio, the client is unable to close the device.
The reason is that PulseAudio client tries to drain the pipe to the PulseAudio server (presumably in order to prevent Broken Pipe error) on closing. That will never finish since new data will always arrive in the pipe.
Worse, the __del__ handler was auto-closing and thus auto-hanging.
Therefore, pause before de-allocating.
2019-12-02 21:39:44 +00:00
Lars Immisch
dcc831e607
Merge pull request #44 from Oranos25/contribution
...
add support for snd_pcm_drop function
2019-11-14 13:24:36 +01:00
Lars Immisch
25717020ef
Transactional semantics for the alsapcm_set* calls
2018-02-28 09:52:53 +00:00
Lars Immisch
1aae655d24
Update periodsize only after alsapcm_setup succeeded
2018-02-28 00:35:26 +01:00
Jesus Cea
f2fb61d324
Unlimited setperiod buffer size when reading frames
2018-02-20 11:52:47 +01:00
Anthony Piau
9e79494a95
add support for snd_pcm_drop function
2017-12-28 16:30:32 +00:00
Michał Šrajer
40a1219dac
Support 24bit audio
...
SND_PCM_FORMAT_S24_LE and similar are for 24bit ints packed in 4-bytes each.
There is a similar family of formats for 3-bytes packed data (as stored in 24bit wave files).
This commit:
- adds S24_3LE, S24_3BE, U24_3LE, U24_3BE PCM formats to the alsaaudio.c
- updates documentation
- updates playwav.py to correctly play typical 24Bit PCM wave files
Closes #38
2017-08-29 19:09:54 +02:00
Lars Immisch
f19d139f64
Fix C-API usage for Python 3. Closes #29
2017-02-24 13:25:36 +01:00
Lars Immisch
88f38284bb
Update documentation. Closes #18
...
Make sure no other setup.py from `sys.path` is accidentally loaded
2017-02-22 19:41:57 +01:00
Chris Diamand
2314aaeb7e
Add functions for listing cards and their names
...
The cards() method does not guarantee that the index in its return
value is the same as the actual card index. Provide a way to get this
information in the form of a card_indexes() function, returning a
list of available card indexes.
Add another method, card_name(), which, given a card index, returns
the short and long names of that card.
2017-02-08 21:48:49 +00:00
Chris Diamand
bf24ec65ca
Add a method for setting enums
...
Add a method, setenum(), for setting the value of an enumerated mixer
element. The argument is an integer index into the list of possible
values returned by getenum().
2017-02-08 20:50:23 +00:00
Paul Donohue
891a30eb08
Add Mixer.handleevents() to acknowledge events identified by select.poll
2016-10-21 12:21:14 -04:00
Jurgen Kramer
fa10bf6999
Make DSD support depend on ALSA lib version
...
This patch makes ALSA DSD sample format support depend on the ALSA lib version.
2015-09-25 15:07:49 +02:00
Jurgen Kramer
7de446c3c7
Add DSD sample formats
...
This patch adds support for using the ALSA DSD sample formats avaiable in
recents kernel/ALSA versions.
2015-09-25 13:34:10 +02:00
Lars Immisch
0e84b51a08
device=None is an error
2015-05-12 09:34:10 +02:00
Lars Immisch
8de9c92791
Undo the argument name/order incompatibility
...
(Most of it, anyway - the mixers functions have slightly different
defaults now)
Improve the documentation
2015-05-12 09:24:11 +02:00
Lars Immisch
a83979a71e
Fix get_pcmtype for Python2.7
2015-05-11 08:18:40 +00:00
Lars Immisch
750140c278
Fix compatibility with Python 2.7
2015-05-10 01:02:10 +00:00
Lars Immisch
d28b117c22
Whitespace
2015-05-10 02:22:24 +02:00
Lars Immisch
ed5ecccc97
Fix logic error, whitespace
2015-05-10 02:21:44 +02:00
Lars Immisch
369b202e04
Unify handling of pcmtype/direction
2015-05-10 02:07:15 +02:00
Lars Immisch
3e5f3bd14b
Improve error messages
2015-05-10 00:22:40 +02:00
Lars Immisch
cb6fc6231c
Add pcms function, unify arguments.
...
Also, fix some memory leaks in error cases
2015-05-09 21:39:00 +02:00
Lars Immisch
7e2e99d072
Better (but not 100% backward compatible) device selection for mixers/PCM
2015-05-09 05:52:50 +00:00
Lars Immisch
5e8a08bc26
Fix memory leak on Python 3. Closes #2
2015-05-08 13:27:30 +02:00
Lars Immisch
08b80110b0
Fix channel selection error. Closes #1
2015-05-04 21:18:46 +00:00