dsp: code style tweak.

This commit is contained in:
Jonathan Moore Liles 2020-11-22 14:29:42 -08:00
parent a0fd557baf
commit 9e82b28f07
1 changed files with 15 additions and 15 deletions

View File

@ -49,8 +49,8 @@ buffer_apply_gain ( sample_t * __restrict__ buf, nframes_t nframes, float g )
if ( g == 1.0f ) if ( g == 1.0f )
return; return;
for ( nframes_t i = 0; i < nframes; i++ ) while ( nframes-- )
buf_[i] *= g; *buf_++ *= g;
} }
void void
@ -59,8 +59,8 @@ buffer_apply_gain_unaligned ( sample_t * __restrict__ buf, nframes_t nframes, fl
if ( g == 1.0f ) if ( g == 1.0f )
return; return;
for ( nframes_t i = 0; i < nframes; i++ ) while ( nframes-- )
buf[i] *= g; *buf++ *= g;
} }
void void
@ -69,8 +69,8 @@ buffer_apply_gain_buffer ( sample_t * __restrict__ buf, const sample_t * __restr
sample_t * buf_ = (sample_t*) assume_aligned(buf); sample_t * buf_ = (sample_t*) assume_aligned(buf);
const sample_t * gainbuf_ = (const sample_t*) assume_aligned(gainbuf); const sample_t * gainbuf_ = (const sample_t*) assume_aligned(gainbuf);
for ( nframes_t i = 0; i < nframes; i++ ) while ( nframes-- )
buf_[i] *= gainbuf_[i]; *buf_++ *= *gainbuf_++;
} }
void void
@ -80,8 +80,8 @@ buffer_copy_and_apply_gain_buffer ( sample_t * __restrict__ dst, const sample_t
const sample_t * src_ = (const sample_t*) assume_aligned(src); const sample_t * src_ = (const sample_t*) assume_aligned(src);
const sample_t * gainbuf_ = (const sample_t*) assume_aligned(gainbuf); const sample_t * gainbuf_ = (const sample_t*) assume_aligned(gainbuf);
for ( nframes_t i = 0; i < nframes; i++ ) while ( nframes-- )
dst_[i] = src_[i] * gainbuf_[i]; *dst_++ = *src_++ * *gainbuf_++;
} }
void void
@ -90,8 +90,8 @@ buffer_mix ( sample_t * __restrict__ dst, const sample_t * __restrict__ src, nfr
sample_t * dst_ = (sample_t*) assume_aligned(dst); sample_t * dst_ = (sample_t*) assume_aligned(dst);
const sample_t * src_ = (const sample_t*) assume_aligned(src); const sample_t * src_ = (const sample_t*) assume_aligned(src);
for ( nframes_t i = 0; i < nframes; i++ ) while ( nframes-- )
dst_[i] += src_[i]; *dst_++ += *src_++;
} }
void void
@ -100,8 +100,8 @@ buffer_mix_with_gain ( sample_t * __restrict__ dst, const sample_t * __restrict_
sample_t * dst_ = (sample_t*) assume_aligned(dst); sample_t * dst_ = (sample_t*) assume_aligned(dst);
const sample_t * src_ = (const sample_t*) assume_aligned(src); const sample_t * src_ = (const sample_t*) assume_aligned(src);
for ( nframes_t i = 0; i < nframes; i++ ) while ( nframes-- )
dst_[i] += src_[i] * g; *dst_++ = *src_++ * g;
} }
void void