Fixed bug 1679 - Error in buffer size setting in Haiku/BeOS audio driver
PulkoMandy Just like in SDL, audio buffer sizes for BeOS and Haiku BSoundPlayer are sized in bytes, not frames. SDL was feeding the wrong value, leading to buffers smaller than expected and weird behaviour in some unsuspecting programs (noticed it in HivelyTracker but others are likely affected as well. The fix is fortunately very simple
This commit is contained in:
parent
b836001559
commit
78b69734b8
1 changed files with 2 additions and 2 deletions
|
@ -151,8 +151,6 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
|
|||
}
|
||||
}
|
||||
|
||||
format.buffer_size = _this->spec.samples;
|
||||
|
||||
if (!valid_datatype) { /* shouldn't happen, but just in case... */
|
||||
BEOSAUDIO_CloseDevice(_this);
|
||||
SDL_SetError("Unsupported audio format");
|
||||
|
@ -162,6 +160,8 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
|
|||
/* Calculate the final parameters for this audio specification */
|
||||
SDL_CalculateAudioSpec(&_this->spec);
|
||||
|
||||
format.buffer_size = _this->spec.size;
|
||||
|
||||
/* Subscribe to the audio stream (creates a new thread) */
|
||||
sigset_t omask;
|
||||
SDL_MaskSignals(&omask);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue