Skip to content

Commit e3a5c5e

Browse files
committed
(XAudio2) Don't make xa_use_float hardcoded anymore
1 parent 31e54ca commit e3a5c5e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

audio/drivers/xaudio.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,12 @@ static bool xa_start(void *data, bool is_shutdown)
552552
return true;
553553
}
554554

555-
static bool xa_use_float(void *data) { return true; }
555+
static bool xa_use_float(void *data)
556+
{
557+
xa_t *xa = (xa_t*)data;
558+
xaudio2_t *handle = xa->xa;
559+
return (handle && handle->wf.wBitsPerSample == 32);
560+
}
556561

557562
static void xa_free(void *data)
558563
{

0 commit comments

Comments
 (0)