dsp: code style tweak.
This commit is contained in:
parent
a0fd557baf
commit
9e82b28f07
30
nonlib/dsp.C
30
nonlib/dsp.C
|
@ -48,9 +48,9 @@ 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
|
||||||
|
@ -58,9 +58,9 @@ 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
|
||||||
|
@ -79,9 +79,9 @@ buffer_copy_and_apply_gain_buffer ( sample_t * __restrict__ dst, const sample_t
|
||||||
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);
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue