diff options
author | Guido van Rossum <guido@python.org> | 1997-04-11 15:23:52 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-11 15:23:52 (GMT) |
commit | 1e0b19e9e48164e5905f295b3140ff6949d1a7e4 (patch) | |
tree | 8420e7df2c3d1009d64b034eb1d0d54ec27e5ad5 /Modules | |
parent | a3d9e025931db00b7a774e20302c9933b6d288ee (diff) | |
download | cpython-1e0b19e9e48164e5905f295b3140ff6949d1a7e4.zip cpython-1e0b19e9e48164e5905f295b3140ff6949d1a7e4.tar.gz cpython-1e0b19e9e48164e5905f295b3140ff6949d1a7e4.tar.bz2 |
Bugfix by Sjoerd:
/* x_ocount is in bytes, wheras play.samples is in frames */
/* we want frames */
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/sunaudiodev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/sunaudiodev.c b/Modules/sunaudiodev.c index a587ac6..6155445 100644 --- a/Modules/sunaudiodev.c +++ b/Modules/sunaudiodev.c @@ -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 * |