aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-05 00:29:20 -0800
committerChris Robinson <[email protected]>2007-12-05 00:29:20 -0800
commit15019b3871efa27782703ee216aa910927427801 (patch)
treedfa6c6e9fd677160b605fcf9ed91421ade76f41d /Alc/alsa.c
parent86cced248be365c3e7597deeab53d6c25636bc54 (diff)
Allow aluMixData to accept a NULL context for silence
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index fb13ecf1..98dd1531 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -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);