audio: Let audio_sample_to_uint64() use const samples argument

The samples are the input to convert to u64. As we should
not modify them, mark the argument const.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200505132603.8575-2-f4bug@amsat.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2020-05-05 15:25:57 +02:00 committed by Gerd Hoffmann
parent cbaf25d1f5
commit e709d2ac47
2 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ int wav_start_capture(AudioState *state, CaptureState *s, const char *path,
bool audio_is_cleaning_up(void); bool audio_is_cleaning_up(void);
void audio_cleanup(void); void audio_cleanup(void);
void audio_sample_to_uint64(void *samples, int pos, void audio_sample_to_uint64(const void *samples, int pos,
uint64_t *left, uint64_t *right); uint64_t *left, uint64_t *right);
void audio_sample_from_uint64(void *samples, int pos, void audio_sample_from_uint64(void *samples, int pos,
uint64_t left, uint64_t right); uint64_t left, uint64_t right);

View File

@ -339,10 +339,10 @@ f_sample *mixeng_clip_float[2] = {
clip_natural_float_from_stereo, clip_natural_float_from_stereo,
}; };
void audio_sample_to_uint64(void *samples, int pos, void audio_sample_to_uint64(const void *samples, int pos,
uint64_t *left, uint64_t *right) uint64_t *left, uint64_t *right)
{ {
struct st_sample *sample = samples; const struct st_sample *sample = samples;
sample += pos; sample += pos;
#ifdef FLOAT_MIXENG #ifdef FLOAT_MIXENG
error_report( error_report(