aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-10-20 12:58:19 -0700
committerChris Robinson <[email protected]>2009-10-20 12:58:19 -0700
commitcd695d7f152831fab2d19d78e80ae8e7982eea72 (patch)
treeaef515280e75b730cb417cf27576f070aba37cde /Alc/ALc.c
parent9c0ae597cd371fdd047500abea879cd1d090a36d (diff)
Allow creating multiple contexts on a device
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 6eeb3bd8..b4463050 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1138,12 +1138,13 @@ ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, const ALCint
// Reset Context Last Error code
g_eLastContextError = ALC_NO_ERROR;
- // Current implementation only allows one Context per Device
+ // If a context is already running on the device, stop playback so the
+ // device attributes can be updated
if(device->NumContexts > 0)
{
- alcSetError(ALC_INVALID_VALUE);
ProcessContext(NULL);
- return NULL;
+ ALCdevice_StopPlayback(device);
+ SuspendContext(NULL);
}
// Check for attributes