pcm/Volume: Open() returns output sample format
Prepare for a new mode which may convert to a different sample format when applying volume, to reduce dithering.
This commit is contained in:
@@ -77,7 +77,7 @@ public:
|
||||
mixer(_mixer), base(_base) {
|
||||
info.Clear();
|
||||
|
||||
pv.Open(out_audio_format.format);
|
||||
out_audio_format.format = pv.Open(out_audio_format.format);
|
||||
}
|
||||
|
||||
void SetInfo(const ReplayGainInfo *_info) {
|
||||
|
@@ -30,7 +30,7 @@ class VolumeFilter final : public Filter {
|
||||
public:
|
||||
explicit VolumeFilter(const AudioFormat &audio_format)
|
||||
:Filter(audio_format) {
|
||||
pv.Open(out_audio_format.format);
|
||||
out_audio_format.format = pv.Open(out_audio_format.format);
|
||||
}
|
||||
|
||||
unsigned GetVolume() const noexcept {
|
||||
|
Reference in New Issue
Block a user