diff options
| author | Lioncash <mathew1800@gmail.com> | 2022-09-16 09:29:28 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2022-09-16 09:31:33 -0400 |
| commit | a278fa6e2a8e06bf20b608ec6a79a53c32321d9b (patch) | |
| tree | 9cfa8b7247494d8ea71754571fd0981eaffc5c74 /src/audio_core/device/device_session.h | |
| parent | e85bda5f31763359b69fbcad5c121995e1ad7074 (diff) | |
device_session: Pass arguments by const-ref in relevant functions
These functions don't modify the passed in audio buffers, so we can
signify that in the interface.
Diffstat (limited to 'src/audio_core/device/device_session.h')
| -rw-r--r-- | src/audio_core/device/device_session.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/audio_core/device/device_session.h b/src/audio_core/device/device_session.h index 53b649c61..74f4dc085 100644 --- a/src/audio_core/device/device_session.h +++ b/src/audio_core/device/device_session.h @@ -62,14 +62,14 @@ public: * * @param buffers - The buffers to play. */ - void AppendBuffers(std::span<AudioBuffer> buffers) const; + void AppendBuffers(std::span<const AudioBuffer> buffers) const; /** * (Audio In only) Pop samples from the backend, and write them back to this buffer's address. * * @param buffer - The buffer to write to. */ - void ReleaseBuffer(AudioBuffer& buffer) const; + void ReleaseBuffer(const AudioBuffer& buffer) const; /** * Check if the buffer for the given tag has been consumed by the backend. @@ -78,7 +78,7 @@ public: * * @return true if the buffer has been consumed, otherwise false. */ - bool IsBufferConsumed(AudioBuffer& buffer) const; + bool IsBufferConsumed(const AudioBuffer& buffer) const; /** * Start this device session, starting the backend stream. |
