virtio-sound / vhost-device

Code merged in https://github.com/rust-vmm/vhost-device
https://github.com/rust-vmm/vhost-device
Apache License 2.0
5 stars 1 forks source link

Add a comment to indicate why latency is "0" #30

Closed MatiasVara closed 1 year ago

MatiasVara commented 1 year ago

Based on crosvm comment, the latency of an used buffer is the number of bytes before the current buffer is played:

/// It returns how many bytes need to be consumed
/// before the current playback buffer will be played.

My guess is that Crosvm is using "0" because it notifies the guest after the current period has been consumed. We should add a comment to explain that too at
https://github.com/virtio-sound/vhost-device/blob/428d349516b9eb465a411c86704b141fad69bdd9/crates/sound/src/lib.rs#L255C30-L255C30

MatiasVara commented 1 year ago

I close this issue to continue at https://github.com/rust-vmm/vhost-device/issues/501.