diff options
author | Chris Robinson <[email protected]> | 2018-11-19 04:11:21 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-19 04:11:21 -0800 |
commit | a14f39ea06a458e6b3b70e0428264967847da7f4 (patch) | |
tree | 9177828a3223568349a7e1b9e01560b7a45d181d /Alc/backends | |
parent | c01743fe5df8ba4778950176ea38d95c65f25309 (diff) |
Make ll_ringbuffer_write/read take void*/const void*
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/coreaudio.cpp | 5 | ||||
-rw-r--r-- | Alc/backends/dsound.cpp | 8 | ||||
-rw-r--r-- | Alc/backends/portaudio.cpp | 4 | ||||
-rw-r--r-- | Alc/backends/winmm.cpp | 2 |
4 files changed, 8 insertions, 11 deletions
diff --git a/Alc/backends/coreaudio.cpp b/Alc/backends/coreaudio.cpp index 158331f1..ff02a706 100644 --- a/Alc/backends/coreaudio.cpp +++ b/Alc/backends/coreaudio.cpp @@ -420,8 +420,7 @@ static OSStatus ALCcoreAudioCapture_RecordProc(void *inRefCon, return err; } - ll_ringbuffer_write(self->ring, static_cast<const char*>(self->bufferList->mBuffers[0].mData), - inNumberFrames); + ll_ringbuffer_write(self->ring, self->bufferList->mBuffers[0].mData, inNumberFrames); return noErr; } @@ -433,7 +432,7 @@ static OSStatus ALCcoreAudioCapture_ConvertCallback(AudioConverterRef UNUSED(inA ALCcoreAudioCapture *self = reinterpret_cast<ALCcoreAudioCapture*>(inUserData); // Read from the ring buffer and store temporarily in a large buffer - ll_ringbuffer_read(self->ring, static_cast<char*>(self->resampleBuffer), *ioNumberDataPackets); + ll_ringbuffer_read(self->ring, self->resampleBuffer, *ioNumberDataPackets); // Set the input data ioData->mNumberBuffers = 1; diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp index 6a8b0754..085dab90 100644 --- a/Alc/backends/dsound.cpp +++ b/Alc/backends/dsound.cpp @@ -893,7 +893,7 @@ void ALCdsoundCapture_stop(ALCdsoundCapture *self) ALCenum ALCdsoundCapture_captureSamples(ALCdsoundCapture *self, ALCvoid *buffer, ALCuint samples) { - ll_ringbuffer_read(self->Ring, reinterpret_cast<char*>(buffer), samples); + ll_ringbuffer_read(self->Ring, buffer, samples); return ALC_NO_ERROR; } @@ -921,11 +921,9 @@ ALCuint ALCdsoundCapture_availableSamples(ALCdsoundCapture *self) } if(SUCCEEDED(hr)) { - ll_ringbuffer_write(self->Ring, reinterpret_cast<const char*>(ReadPtr1), - ReadCnt1/FrameSize); + ll_ringbuffer_write(self->Ring, ReadPtr1, ReadCnt1/FrameSize); if(ReadPtr2 != nullptr) - ll_ringbuffer_write(self->Ring, reinterpret_cast<const char*>(ReadPtr2), - ReadCnt2/FrameSize); + ll_ringbuffer_write(self->Ring, ReadPtr2, ReadCnt2/FrameSize); hr = self->DSCbuffer->Unlock(ReadPtr1, ReadCnt1, ReadPtr2, ReadCnt2); self->Cursor = (LastCursor+ReadCnt1+ReadCnt2) % BufferBytes; } diff --git a/Alc/backends/portaudio.cpp b/Alc/backends/portaudio.cpp index 1a74250e..1c87f2c8 100644 --- a/Alc/backends/portaudio.cpp +++ b/Alc/backends/portaudio.cpp @@ -377,7 +377,7 @@ int ALCportCapture_ReadCallback(const void *inputBuffer, void *UNUSED(outputBuff size_t writable = ll_ringbuffer_write_space(self->ring); if(framesPerBuffer > writable) framesPerBuffer = writable; - ll_ringbuffer_write(self->ring, static_cast<const char*>(inputBuffer), framesPerBuffer); + ll_ringbuffer_write(self->ring, inputBuffer, framesPerBuffer); return 0; } @@ -472,7 +472,7 @@ ALCuint ALCportCapture_availableSamples(ALCportCapture *self) ALCenum ALCportCapture_captureSamples(ALCportCapture *self, ALCvoid *buffer, ALCuint samples) { - ll_ringbuffer_read(self->ring, static_cast<char*>(buffer), samples); + ll_ringbuffer_read(self->ring, buffer, samples); return ALC_NO_ERROR; } diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp index 9da3e4c3..f17b5d1f 100644 --- a/Alc/backends/winmm.cpp +++ b/Alc/backends/winmm.cpp @@ -653,7 +653,7 @@ void ALCwinmmCapture_stop(ALCwinmmCapture *self) ALCenum ALCwinmmCapture_captureSamples(ALCwinmmCapture *self, ALCvoid *buffer, ALCuint samples) { - ll_ringbuffer_read(self->Ring, static_cast<char*>(buffer), samples); + ll_ringbuffer_read(self->Ring, buffer, samples); return ALC_NO_ERROR; } |