Commit e451aead authored by Guido van Rossum's avatar Guido van Rossum

Bugfix by Sjoerd:

	/* x_ocount is in bytes, wheras play.samples is in frames */
	/* we want frames */
parent 67a0a136
...@@ -271,7 +271,11 @@ sad_obufcount(self, args) ...@@ -271,7 +271,11 @@ sad_obufcount(self, args)
PyErr_SetFromErrno(SunAudioError); PyErr_SetFromErrno(SunAudioError);
return NULL; 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 * static PyObject *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment