Make AudioSinkInterface::Data hold a const pointer to the audio buffer.
This is in preparation for https://codereview.webrtc.org/2750783004/, where requiring a non-const pointer for AudioSinkInterface would force an unmuting and zeroing of every frame. BUG=webrtc:7343 Review-Url: https://codereview.webrtc.org/2873803002 Cr-Commit-Position: refs/heads/master@{#18107}
This commit is contained in:
parent
f512c92ab2
commit
38605965bd
@ -27,7 +27,7 @@ class AudioSinkInterface {
|
||||
virtual ~AudioSinkInterface() {}
|
||||
|
||||
struct Data {
|
||||
Data(int16_t* data,
|
||||
Data(const int16_t* data,
|
||||
size_t samples_per_channel,
|
||||
int sample_rate,
|
||||
size_t channels,
|
||||
@ -38,7 +38,7 @@ class AudioSinkInterface {
|
||||
channels(channels),
|
||||
timestamp(timestamp) {}
|
||||
|
||||
int16_t* data; // The actual 16bit audio data.
|
||||
const int16_t* data; // The actual 16bit audio data.
|
||||
size_t samples_per_channel; // Number of frames in the buffer.
|
||||
int sample_rate; // Sample rate in Hz.
|
||||
size_t channels; // Number of channels in the audio data.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user