From a6d104090ef752126766ef237db1ff1dc6b966f0 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 7 Apr 2025 12:37:15 -0400 Subject: cmc cleanup and testing - Add waveform drawing notes. Signed-off-by: Andrew Opalach --- src/libclient/client.c | 8 ++++---- src/libclient/client.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libclient') diff --git a/src/libclient/client.c b/src/libclient/client.c index 525b26e..7350df2 100644 --- a/src/libclient/client.c +++ b/src/libclient/client.c @@ -73,8 +73,8 @@ static void connection_closed_callback(void *userdata, struct nn_rpc_connection client->conn = NULL; } -bool camu_client_login(struct camu_client *client, struct nn_event_loop *loop, - u8 type, str *addr, u16 port, str *username) +bool camu_client_login(struct camu_client *client, str *username, + struct nn_event_loop *loop, u8 type, str *addr, u16 port) { client->loop = loop; al_str_clone(&client->username, username); @@ -145,14 +145,14 @@ void camu_client_skipto(struct camu_client *client, str *list, s32 i) nn_rpc_connection_command(client->conn, packet, NULL, NULL); } -void camu_client_seek(struct camu_client *client, str *list, u32 id, f64 percent) +void camu_client_seek(struct camu_client *client, str *list, u32 id, u64 pos) { struct nn_packet *packet = nn_rpc_get_packet(&client->client, CAMU_SERVER_LIST_ACTION); nn_packet_write_str(packet, list); nn_packet_write_u8(packet, CAMU_LIST_SEEK); nn_packet_write_s32(packet, LIANA_SEQUENCE_ANY); nn_packet_write_u32(packet, id); - nn_packet_write_f64(packet, percent); + nn_packet_write_u64(packet, pos); nn_rpc_connection_command(client->conn, packet, NULL, NULL); } diff --git a/src/libclient/client.h b/src/libclient/client.h index e6e80c8..892bf0d 100644 --- a/src/libclient/client.h +++ b/src/libclient/client.h @@ -18,8 +18,8 @@ struct camu_client { void *userdata; }; -bool camu_client_login(struct camu_client *client, struct nn_event_loop *loop, - u8 type, str *addr, u16 port, str *username); +bool camu_client_login(struct camu_client *client, str *username, + struct nn_event_loop *loop, u8 type, str *addr, u16 port); void camu_client_create_list(struct camu_client *client, str *name, void (*callback)(void *, struct nn_rpc_connection *conn, struct nn_packet *), void *userdata); @@ -30,6 +30,6 @@ void camu_client_create_search(struct camu_client *client, str *module, str *que void camu_client_get_page(struct camu_client *client, s32 id, u32 num); void camu_client_skipto(struct camu_client *client, str *list, s32 i); -void camu_client_seek(struct camu_client *client, str *list, u32 id, f64 percent); +void camu_client_seek(struct camu_client *client, str *list, u32 id, u64 pos); void camu_client_disconnect(struct camu_client *client); -- cgit v1.2.3-101-g0448