mirror of
https://github.com/larsimmisch/pyalsaaudio.git
synced 2026-04-16 16:15:31 +00:00
Update periodsize only after alsapcm_setup succeeded
This commit is contained in:
@@ -743,7 +743,6 @@ alsapcm_setperiodsize(alsapcm_t *self, PyObject *args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
self->periodsize = periodsize;
|
||||
res = alsapcm_setup(self);
|
||||
if (res < 0)
|
||||
{
|
||||
@@ -752,6 +751,8 @@ alsapcm_setperiodsize(alsapcm_t *self, PyObject *args)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
self->periodsize = periodsize;
|
||||
return PyLong_FromLong(self->periodsize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user