mirror of https://github.com/odrling/Aegisub
Fix #580 - DSound playback stops before end of selection. Only happened with selections longer than 150 ms and up to 150*BytesPerSample ms, that is, 300 ms for the most common 16 bit audio. The condition used to test whether streaming or one-shot mode should be used didn't take sampledepth into account and compared a number of samples with a buffer length in bytes.
Originally committed to SVN as r1602.
This commit is contained in:
parent
b77918f832
commit
509732b0c2
|
@ -338,7 +338,7 @@ void DirectSoundPlayer::Play(int64_t start,int64_t count) {
|
|||
FillBuffer(true);
|
||||
|
||||
DWORD play_flag = 0;
|
||||
if (count > bufSize) {
|
||||
if (count*provider->GetBytesPerSample() > bufSize) {
|
||||
// Start thread
|
||||
thread = new DirectSoundPlayerThread(this);
|
||||
thread->Create();
|
||||
|
|
Loading…
Reference in New Issue