diff --git a/src/frontend-common/cubeb_audio_stream.cpp b/src/frontend-common/cubeb_audio_stream.cpp index 19eaef062..d0e61748f 100644 --- a/src/frontend-common/cubeb_audio_stream.cpp +++ b/src/frontend-common/cubeb_audio_stream.cpp @@ -126,7 +126,7 @@ long CubebAudioStream::DataCallback(cubeb_stream* stm, void* user_ptr, const voi long nframes) { CubebAudioStream* const this_ptr = static_cast(user_ptr); - this_ptr->ReadFrames(reinterpret_cast(output_buffer), static_cast(nframes), true); + this_ptr->ReadFrames(reinterpret_cast(output_buffer), static_cast(nframes), false); return nframes; } @@ -139,6 +139,12 @@ void CubebAudioStream::StateCallback(cubeb_stream* stream, void* user_ptr, cubeb void CubebAudioStream::FramesAvailable() {} +void CubebAudioStream::SetOutputVolume(u32 volume) +{ + AudioStream::SetOutputVolume(volume); + cubeb_stream_set_volume(m_cubeb_stream, static_cast(m_output_volume) / 100.0f); +} + void CubebAudioStream::DestroyContext() { cubeb_destroy(m_cubeb_context); diff --git a/src/frontend-common/cubeb_audio_stream.h b/src/frontend-common/cubeb_audio_stream.h index a58f1431c..830e044a7 100644 --- a/src/frontend-common/cubeb_audio_stream.h +++ b/src/frontend-common/cubeb_audio_stream.h @@ -18,6 +18,7 @@ protected: void PauseDevice(bool paused) override; void CloseDevice() override; void FramesAvailable() override; + void SetOutputVolume(u32 volume) override; void DestroyContext();