refactor: use explicit pointer casts to clarify type conversions

Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-09 14:46:09 +00:00
parent 934843e9b1
commit 20c0820910
2 changed files with 9 additions and 7 deletions

View File

@@ -79,11 +79,13 @@ int process_callback(jack_nframes_t nframes, void *arg) {
switch (state) {
case STATE_RECORD:
if (in) {
float *f_out = (float *)out;
const float *f_in = (const float *)in;
for (i = 0; i < nframes; i++) {
if (channels[c].record_pos < LOOP_BUF_SIZE)
channels[c].loop_buffer[channels[c].record_pos++] =
((const float *)in)[i];
((float *)out)[i] = ((const float *)in)[i]; // cppcheck-suppress unreadVariable
f_in[i];
f_out[i] = f_in[i];
}
} else {
memset(out, 0, sizeof(jack_default_audio_sample_t) * nframes);