Closed saivert closed 7 years ago
Basically what happened when I dragged the seekbar was that in a brief moment the seekbar "seeked" to the end of the track and then snapped back to the right location again.
The seeked signal is part of the MPRIS https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Signal:Seeked so it needs to be implemented.
Also I think the signal is working correctly.
The signal is supposed to emit the current microsecond seeked to. It does that with the current implementation.
Or am I missing something?
Yes and your emitSeeked function is already multiplying by 1000000.0.
void emitSeeked(float position) {
int64_t positionInMicroseconds = position * 1000000.0;
debug("Seeked to %" PRId64, positionInMicroseconds);
g_dbus_connection_emit_signal(globalConnection, NULL, OBJECT_NAME, PLAYER_INTERFACE, "Seeked",
g_variant_new("(x)", positionInMicroseconds), NULL);
}
Ahh yes. You are right.
gets rid of erratic seekbar behavior in clients.