mirror of https://github.com/encounter/SDL.git
bsdaudio: this appears to be using the wrong variable...?
(We probably never noticed because this is meant to block until it fully writes a buffer, and would only trigger an issue if we had a short write that wasn't otherwise an error condition.)
This commit is contained in:
parent
ecbd625c4b
commit
d30a2f5ad8
|
@ -182,11 +182,15 @@ BSDAUDIO_PlayDevice(_THIS)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p < written
|
#ifdef DEBUG_AUDIO
|
||||||
|
fprintf(stderr, "Wrote %d bytes of audio data\n", written);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (p < this->hidden->mixlen
|
||||||
|| ((written < 0) && ((errno == 0) || (errno == EAGAIN)))) {
|
|| ((written < 0) && ((errno == 0) || (errno == EAGAIN)))) {
|
||||||
SDL_Delay(1); /* Let a little CPU time go by */
|
SDL_Delay(1); /* Let a little CPU time go by */
|
||||||
}
|
}
|
||||||
} while (p < written);
|
} while (p < this->hidden->mixlen);
|
||||||
|
|
||||||
/* If timer synchronization is enabled, set the next write frame */
|
/* If timer synchronization is enabled, set the next write frame */
|
||||||
if (this->hidden->frame_ticks) {
|
if (this->hidden->frame_ticks) {
|
||||||
|
@ -197,9 +201,6 @@ BSDAUDIO_PlayDevice(_THIS)
|
||||||
if (written < 0) {
|
if (written < 0) {
|
||||||
SDL_OpenedAudioDeviceDisconnected(this);
|
SDL_OpenedAudioDeviceDisconnected(this);
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_AUDIO
|
|
||||||
fprintf(stderr, "Wrote %d bytes of audio data\n", written);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Uint8 *
|
static Uint8 *
|
||||||
|
|
Loading…
Reference in New Issue