Update documentation

This commit is contained in:
Lars Immisch
2020-07-10 00:45:57 +02:00
parent df889b94ef
commit f07627543c
2 changed files with 74 additions and 75 deletions

View File

@@ -885,7 +885,11 @@ alsapcm_setchannels(alsapcm_t *self, PyObject *args)
{
int channels, saved;
int res;
PyErr_WarnEx(PyExc_DeprecationWarning,
"This function is deprecated. "
"Please use the named parameter `channels` to `PCM()` instead", 1);
if (!PyArg_ParseTuple(args,"i:setchannels", &channels))
return NULL;
@@ -921,9 +925,14 @@ alsapcm_setrate(alsapcm_t *self, PyObject *args)
{
int rate, saved;
int res;
if (!PyArg_ParseTuple(args,"i:setrate", &rate))
return NULL;
PyErr_WarnEx(PyExc_DeprecationWarning,
"This function is deprecated. "
"Please use the named parameter `channels` to `PCM()` instead", 1);
if (!self->handle)
{
PyErr_SetString(ALSAAudioError, "PCM device is closed");
@@ -955,6 +964,11 @@ alsapcm_setformat(alsapcm_t *self, PyObject *args)
{
int format, saved;
int res;
PyErr_WarnEx(PyExc_DeprecationWarning,
"This function is deprecated. "
"Please use the named parameter `format` to `PCM()` instead", 1);
if (!PyArg_ParseTuple(args,"i:setformat", &format))
return NULL;