Skip to content
Snippets Groups Projects
Commit b009bda6 authored by Lioncash's avatar Lioncash
Browse files

audio_core/buffer: Make const and non-const getter for samples consistent

This way proper const/non-const selection can occur.
parent 99da6362
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ public: ...@@ -21,7 +21,7 @@ public:
Buffer(Tag tag, std::vector<s16>&& samples) : tag{tag}, samples{std::move(samples)} {} Buffer(Tag tag, std::vector<s16>&& samples) : tag{tag}, samples{std::move(samples)} {}
/// Returns the raw audio data for the buffer /// Returns the raw audio data for the buffer
std::vector<s16>& Samples() { std::vector<s16>& GetSamples() {
return samples; return samples;
} }
......
...@@ -95,7 +95,7 @@ void Stream::PlayNextBuffer() { ...@@ -95,7 +95,7 @@ void Stream::PlayNextBuffer() {
active_buffer = queued_buffers.front(); active_buffer = queued_buffers.front();
queued_buffers.pop(); queued_buffers.pop();
VolumeAdjustSamples(active_buffer->Samples()); VolumeAdjustSamples(active_buffer->GetSamples());
sink_stream.EnqueueSamples(GetNumChannels(), active_buffer->GetSamples()); sink_stream.EnqueueSamples(GetNumChannels(), active_buffer->GetSamples());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment