Use XrTime for all time data
This commit is contained in:
@@ -260,7 +260,7 @@ void pipewire_device::speaker_process(void * self_v)
|
||||
return;
|
||||
|
||||
audio_data packet{
|
||||
.timestamp = uint64_t(self->session.get_offset().to_headset(os_monotonic_get_ns()).count()),
|
||||
.timestamp = self->session.get_offset().to_headset(os_monotonic_get_ns()),
|
||||
.payload = std::span(
|
||||
(uint8_t *)data.data + data.chunk->offset,
|
||||
data.chunk->size),
|
||||
|
||||
@@ -336,7 +336,7 @@ struct pulse_device : public audio_device
|
||||
remainder = size % sample_size; // data to keep for next iteration
|
||||
size -= remainder; // size of data to send
|
||||
packet.payload = std::span<uint8_t>(buffer.begin(), size);
|
||||
packet.timestamp = session.get_offset().to_headset(os_monotonic_get_ns()).count();
|
||||
packet.timestamp = session.get_offset().to_headset(os_monotonic_get_ns());
|
||||
session.send_stream(packet);
|
||||
// put the remaining data at the beginning of the buffer
|
||||
memmove(buffer.data(), buffer.data() + size, remainder);
|
||||
|
||||
Reference in New Issue
Block a user