pcm/Volume: use 0x69 to generate DSD silence
This commit is contained in:
@@ -134,9 +134,11 @@ PcmVolume::Apply(ConstBuffer<void> src)
|
|||||||
|
|
||||||
if (volume == 0) {
|
if (volume == 0) {
|
||||||
/* optimized special case: 0% volume = memset(0) */
|
/* optimized special case: 0% volume = memset(0) */
|
||||||
/* TODO: is this valid for all sample formats? What
|
uint8_t pattern = 0;
|
||||||
about floating point? */
|
if (format == SampleFormat::DSD)
|
||||||
memset(data, 0, src.size);
|
pattern = 0x69;
|
||||||
|
|
||||||
|
memset(data, pattern, src.size);
|
||||||
return { data, src.size };
|
return { data, src.size };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user