diff options
author | Chris Robinson <[email protected]> | 2009-10-31 17:59:30 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-10-31 17:59:30 -0700 |
commit | ae63ca481d9f926bbf3bcfc2fc20aff88180246a (patch) | |
tree | 22b05ecf4a2b2de1e5e841c9b469004404a5128b /Alc/pulseaudio.c | |
parent | 8e599103b61e056ac5aa1233f9081daec0a725d3 (diff) |
Mix all updates PulseAudio requests
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r-- | Alc/pulseaudio.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index 3962a27c..cbd53476 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -261,12 +261,14 @@ static void stream_write_callback(pa_stream *stream, size_t len, void *pdata) // { ALCdevice *Device = pdata; pulse_data *data = Device->ExtraData; - void *buf = ppa_xmalloc0(data->attr.minreq); - (void)len; - aluMixData(Device, buf, data->attr.minreq/data->frame_size); - ppa_stream_write(stream, buf, data->attr.minreq, ppa_xfree, 0, - PA_SEEK_RELATIVE); + len -= len&data->attr.minreq; + if(len > 0) + { + void *buf = ppa_xmalloc0(len); + aluMixData(Device, buf, len/data->frame_size); + ppa_stream_write(stream, buf, len, ppa_xfree, 0, PA_SEEK_RELATIVE); + } } //}}} static void stream_read_callback(pa_stream *stream, size_t length, void *pdata) //{{{ |