mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Bugfix by Sjoerd:
/* x_ocount is in bytes, wheras play.samples is in frames */ /* we want frames */
This commit is contained in:
parent
a3d9e02593
commit
1e0b19e9e4
1 changed files with 5 additions and 1 deletions
|
|
@ -271,7 +271,11 @@ sad_obufcount(self, args)
|
|||
PyErr_SetFromErrno(SunAudioError);
|
||||
return NULL;
|
||||
}
|
||||
return PyInt_FromLong(self->x_ocount - ai.play.samples);
|
||||
/* x_ocount is in bytes, wheras play.samples is in frames */
|
||||
/* we want frames */
|
||||
return PyInt_FromLong(self->x_ocount / (ai.play.channels *
|
||||
ai.play.precision / 8) -
|
||||
ai.play.samples);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue