aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDan Glastonbury <[email protected]>2018-03-23 08:28:30 +1000
committerMatthew Gregan <[email protected]>2018-03-23 11:35:57 +1300
commit2b368ccfd45ef7da860355e7d5d635106111f6e9 (patch)
tree34ca8bf7cfd6b1822a2882d9d948fbbc881af29d
parent13d9e2874cb13ece4d14efcf34b086770f0bd624 (diff)
downloadcubeb-2b368ccfd45ef7da860355e7d5d635106111f6e9.tar.gz
cubeb-2b368ccfd45ef7da860355e7d5d635106111f6e9.zip
Change cubeb_mixer_mix input to be const void *
-rw-r--r--src/cubeb_mixer.cpp8
-rw-r--r--src/cubeb_mixer.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cubeb_mixer.cpp b/src/cubeb_mixer.cpp
index 1a8cf99..4b22add 100644
--- a/src/cubeb_mixer.cpp
+++ b/src/cubeb_mixer.cpp
@@ -544,7 +544,7 @@ struct cubeb_mixer
}
int mix(size_t frames,
- void * input_buffer,
+ const void * input_buffer,
size_t input_buffer_size,
void * output_buffer,
size_t output_buffer_size) const
@@ -575,7 +575,7 @@ struct cubeb_mixer
} else {
assert(_context._format == CUBEB_SAMPLE_S16NE);
copy_and_trunc(frames,
- static_cast<int16_t*>(input_buffer),
+ static_cast<const int16_t*>(input_buffer),
reinterpret_cast<int16_t*>(output_buffer));
}
return 0;
@@ -651,9 +651,9 @@ void cubeb_mixer_destroy(cubeb_mixer * mixer)
int cubeb_mixer_mix(cubeb_mixer * mixer,
size_t frames,
- void* input_buffer,
+ const void * input_buffer,
size_t input_buffer_size,
- void* output_buffer,
+ void * output_buffer,
size_t output_buffer_size)
{
return mixer->mix(
diff --git a/src/cubeb_mixer.h b/src/cubeb_mixer.h
index dd84b87..d43a237 100644
--- a/src/cubeb_mixer.h
+++ b/src/cubeb_mixer.h
@@ -23,7 +23,7 @@ cubeb_mixer * cubeb_mixer_create(cubeb_sample_format format,
void cubeb_mixer_destroy(cubeb_mixer * mixer);
int cubeb_mixer_mix(cubeb_mixer * mixer,
size_t frames,
- void * input_buffer,
+ const void * input_buffer,
size_t input_buffer_size,
void * output_buffer,
size_t output_buffer_size);