mirror of https://github.com/odrling/Aegisub
Fix off-by-one error in DummyAudioProvider::GetAudio
Originally committed to SVN as r6102.
This commit is contained in:
parent
0892de62a8
commit
a5fce1d1be
|
@ -66,11 +66,11 @@ void DummyAudioProvider::GetAudio(void *buf, int64_t, int64_t count) const {
|
|||
short *workbuf = (short*)buf;
|
||||
|
||||
if (noise) {
|
||||
while (--count > 0)
|
||||
while (count-- > 0)
|
||||
*workbuf++ = (rand() - RAND_MAX/2) * 10000 / RAND_MAX;
|
||||
}
|
||||
else {
|
||||
while (--count > 0)
|
||||
while (count-- > 0)
|
||||
*workbuf++ = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue