diff options
author | Chris Robinson <[email protected]> | 2007-12-05 00:29:20 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-05 00:29:20 -0800 |
commit | 15019b3871efa27782703ee216aa910927427801 (patch) | |
tree | dfa6c6e9fd677160b605fcf9ed91421ade76f41d /Alc/alsa.c | |
parent | 86cced248be365c3e7597deeab53d6c25636bc54 (diff) |
Allow aluMixData to accept a NULL context for silence
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r-- | Alc/alsa.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -190,17 +190,9 @@ static ALuint ALSAProc(ALvoid *ptr) } SuspendContext(NULL); - if(pDevice->Context) - { - // If we have an active context, mix data directly into output - // buffer - WritePtr = (char*)areas->addr + (offset * areas->step / 8); - WriteCnt = psnd_pcm_frames_to_bytes(data->pcmHandle, frames); - - aluMixData(pDevice->Context, WritePtr, WriteCnt, pDevice->Format); - } - else - psnd_pcm_areas_silence(areas, offset, pDevice->Channels, frames, data->format); + WritePtr = (char*)areas->addr + (offset * areas->step / 8); + WriteCnt = psnd_pcm_frames_to_bytes(data->pcmHandle, frames); + aluMixData(pDevice->Context, WritePtr, WriteCnt, pDevice->Format); ProcessContext(NULL); commitres = psnd_pcm_mmap_commit(data->pcmHandle, offset, frames); |