Fix a few more C-style casts
This commit is contained in:
parent
14c76ca244
commit
1a9f1e0869
@ -585,7 +585,7 @@ ALCenum CoreAudioCapture::open(const ALCchar *name)
|
||||
// The output format should be the requested format, but using the hardware sample rate
|
||||
// This is because the AudioUnit will automatically scale other properties, except for sample rate
|
||||
err = AudioUnitSetProperty(mAudioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output,
|
||||
1, (void*)&outputFormat, sizeof(outputFormat));
|
||||
1, &outputFormat, sizeof(outputFormat));
|
||||
if(err != noErr)
|
||||
{
|
||||
ERR("AudioUnitSetProperty failed\n");
|
||||
|
@ -849,7 +849,7 @@ void OpenSLCapture::stop()
|
||||
}
|
||||
}
|
||||
|
||||
ALCenum OpenSLCapture::captureSamples(void* buffer, ALCuint samples)
|
||||
ALCenum OpenSLCapture::captureSamples(void *buffer, ALCuint samples)
|
||||
{
|
||||
ALsizei chunk_size = mDevice->UpdateSize * mFrameSize;
|
||||
SLAndroidSimpleBufferQueueItf bufferQueue;
|
||||
@ -866,7 +866,8 @@ ALCenum OpenSLCapture::captureSamples(void* buffer, ALCuint samples)
|
||||
for(i = 0;i < samples;)
|
||||
{
|
||||
ALCuint rem{minu(samples - i, mDevice->UpdateSize - mSplOffset)};
|
||||
memcpy((ALCbyte*)buffer + i*mFrameSize, data.first.buf + mSplOffset*mFrameSize,
|
||||
memcpy(static_cast<al::byte*>(buffer) + i*mFrameSize,
|
||||
data.first.buf + mSplOffset*mFrameSize,
|
||||
rem * mFrameSize);
|
||||
|
||||
mSplOffset += rem;
|
||||
|
@ -140,12 +140,12 @@ static inline void ApplyCoeffs(size_t /*Offset*/, float2 *RESTRICT Values, const
|
||||
|
||||
for(ALsizei c{0};c < IrSize;c += 2)
|
||||
{
|
||||
float32x4_t vals = vld1q_f32((float32_t*)&Values[c][0]);
|
||||
float32x4_t coefs = vld1q_f32((float32_t*)&Coeffs[c][0]);
|
||||
float32x4_t vals = vld1q_f32(&Values[c][0]);
|
||||
float32x4_t coefs = vld1q_f32(&Coeffs[c][0]);
|
||||
|
||||
vals = vmlaq_f32(vals, coefs, leftright4);
|
||||
|
||||
vst1q_f32((float32_t*)&Values[c][0], vals);
|
||||
vst1q_f32(&Values[c][0], vals);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ void *al_malloc(size_t alignment, size_t size)
|
||||
if(ret != nullptr)
|
||||
{
|
||||
*(ret++) = 0x00;
|
||||
while(((ptrdiff_t)ret&(alignment-1)) != 0)
|
||||
while((reinterpret_cast<ptrdiff_t>(ret)&(alignment-1)) != 0)
|
||||
*(ret++) = 0x55;
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user