Bug 506434 - fix ogg video playback regression, add OS/2 part to sydneyaudio patch, r=pweilbacher

This commit is contained in:
Rich Walsh 2009-08-02 14:06:02 +03:00
parent 3cbcbb9787
commit 46c13739b3

View File

@ -552,10 +552,12 @@ new file mode 100644
+ /* keep os2_mixer_event() from reacting to buffer under-runs */
+ s->state = SAOS2_EXIT;
+
+ /* DART won't start playing until 2 buffers have been
+ * written, so write a dummy 2nd buffer just in case */
+ memset(buf, 0, sizeof(buf));
+ sa_stream_write(s, buf, s->nchannels * SAOS2_SAMPLE_SIZE);
+ /* DART won't start playing until 2 buffers have been written,
+ * so write a dummy 2nd buffer if any buffers are in use */
+ if (s->freeCnt < SAOS2_BUF_CNT) {
+ memset(buf, 0, sizeof(buf));
+ sa_stream_write(s, buf, s->nchannels * SAOS2_SAMPLE_SIZE);
+ }
+
+ /* write all remaining buffers to the device */
+ if (s->readyCnt)