aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/dsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-24 21:51:30 -0700
committerChris Robinson <[email protected]>2010-05-24 21:51:30 -0700
commit37190b2cafdec52a23034194a3e63d8d33bdc544 (patch)
tree99dada718dcb76d94223b62392f0181b5a3314ba /Alc/dsound.c
parentc6b948323ebc8632e0b763f090cdcd19255d0ac2 (diff)
Add a function to get the frame size from a format
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r--Alc/dsound.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index c6083d5b..3ce45874 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -175,8 +175,7 @@ static ALuint DSoundProc(ALvoid *ptr)
return 1;
}
- FrameSize = aluChannelsFromFormat(pDevice->Format) *
- aluBytesFromFormat(pDevice->Format);
+ FrameSize = aluFrameSizeFromFormat(pDevice->Format);
FragSize = pDevice->UpdateSize * FrameSize;
IDirectSoundBuffer_GetCurrentPosition(pData->DSsbuffer, &LastCursor, NULL);
@@ -406,7 +405,7 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device)
}
else
format = device->Format;
- frameSize = aluBytesFromFormat(format) * aluChannelsFromFormat(format);
+ frameSize = aluFrameSizeFromFormat(format);
OutputType.Format.wFormatTag = WAVE_FORMAT_PCM;
OutputType.Format.nChannels = aluChannelsFromFormat(format);