mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-26 05:40:49 +00:00
fix alsa driver with custom callback
This commit is contained in:
parent
c4f0b19c64
commit
b46998ba04
1 changed files with 5 additions and 2 deletions
|
@ -457,8 +457,8 @@ static fluid_thread_return_t fluid_alsa_audio_run_float(void *d)
|
||||||
{
|
{
|
||||||
while(dev->cont)
|
while(dev->cont)
|
||||||
{
|
{
|
||||||
FLUID_MEMSET(left, 0, buffer_size * sizeof(float));
|
FLUID_MEMSET(left, 0, buffer_size * sizeof(*left));
|
||||||
FLUID_MEMSET(right, 0, buffer_size * sizeof(float));
|
FLUID_MEMSET(right, 0, buffer_size * sizeof(*right));
|
||||||
|
|
||||||
handle[0] = left;
|
handle[0] = left;
|
||||||
handle[1] = right;
|
handle[1] = right;
|
||||||
|
@ -563,6 +563,9 @@ static fluid_thread_return_t fluid_alsa_audio_run_s16(void *d)
|
||||||
|
|
||||||
while(dev->cont)
|
while(dev->cont)
|
||||||
{
|
{
|
||||||
|
FLUID_MEMSET(left, 0, buffer_size * sizeof(*left));
|
||||||
|
FLUID_MEMSET(right, 0, buffer_size * sizeof(*right));
|
||||||
|
|
||||||
(*dev->callback)(dev->data, buffer_size, 0, NULL, 2, handle);
|
(*dev->callback)(dev->data, buffer_size, 0, NULL, 2, handle);
|
||||||
|
|
||||||
/* convert floating point data to 16 bit (with dithering) */
|
/* convert floating point data to 16 bit (with dithering) */
|
||||||
|
|
Loading…
Reference in a new issue