diff options
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r-- | Alc/dsound.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c index 2329a4d7..92ee8073 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -309,7 +309,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam memset(&DSBDescription,0,sizeof(DSBUFFERDESC)); DSBDescription.dwSize=sizeof(DSBUFFERDESC); DSBDescription.dwFlags=DSBCAPS_GLOBALFOCUS|DSBCAPS_GETCURRENTPOSITION2; - DSBDescription.dwBufferBytes=(device->UpdateSize/num_frags) * num_frags * frameSize; + DSBDescription.dwBufferBytes=(device->BufferSize/num_frags) * num_frags * frameSize; DSBDescription.lpwfxFormat=&OutputType.Format; hr = IDirectSound_CreateSoundBuffer(pData->lpDS, &DSBDescription, &pData->DSsbuffer, NULL); } @@ -339,7 +339,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam } device->Format = format; - device->UpdateSize /= num_frags; + device->UpdateSize = device->BufferSize/num_frags; return ALC_TRUE; } @@ -360,6 +360,19 @@ static void DSoundClosePlayback(ALCdevice *device) device->ExtraData = NULL; } +static ALCboolean DSoundStartContext(ALCdevice *device, ALCcontext *context) +{ + return ALC_TRUE; + (void)device; + (void)context; +} + +static void DSoundStopContext(ALCdevice *device, ALCcontext *context) +{ + (void)device; + (void)context; +} + static ALCboolean DSoundOpenCapture(ALCdevice *pDevice, const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize) { @@ -403,6 +416,8 @@ static ALCuint DSoundAvailableSamples(ALCdevice *pDevice) BackendFuncs DSoundFuncs = { DSoundOpenPlayback, DSoundClosePlayback, + DSoundStartContext, + DSoundStopContext, DSoundOpenCapture, DSoundCloseCapture, DSoundStartCapture, |