diff options
author | Chris Robinson <[email protected]> | 2018-03-02 12:46:31 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-03-02 13:01:11 -0800 |
commit | 03274a5b95146675c05b5b6a0340f45a7b122c50 (patch) | |
tree | 02c6bec8667f888742c79a5538995e82797e2fd2 /Alc/backends/winmm.c | |
parent | 6f62fed65c4dcdf999a612e258cca59a22355f3c (diff) |
Ensure at least the specified ringbuffer size is writable
Previously, all but one of the specified size could be written (so for a size
of n, only n-1 was guaranteed writable). All users pretty much compensated for
this, but it makes more sense to fix it at the source.
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r-- | Alc/backends/winmm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c index 787ba8e4..2f4c65df 100644 --- a/Alc/backends/winmm.c +++ b/Alc/backends/winmm.c @@ -626,7 +626,7 @@ static ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *name) if(CapturedDataSize < (self->Format.nSamplesPerSec / 10)) CapturedDataSize = self->Format.nSamplesPerSec / 10; - self->Ring = ll_ringbuffer_create(CapturedDataSize+1, self->Format.nBlockAlign, false); + self->Ring = ll_ringbuffer_create(CapturedDataSize, self->Format.nBlockAlign, false); if(!self->Ring) goto failure; InitRef(&self->WaveBuffersCommitted, 0); |