use bswap correctly

This commit is contained in:
itsmattkc 2024-11-15 19:03:00 -08:00
parent e1e9128fb1
commit 7524130b7a

View file

@ -1,6 +1,7 @@
#include "audio.h"
#include <arpa/inet.h>
#include <byteswap.h>
#include <pthread.h>
#include <stdint.h>
@ -47,7 +48,7 @@ void handle_audio_packet(gamepad_context_t *ctx, unsigned char *data, size_t len
// ap->format = reverse_bits(ap->format, 3);
// ap->seq_id = reverse_bits(ap->seq_id, 10);
ap->payload_size = __bswap_16(ap->payload_size);
ap->payload_size = bswap_16(ap->payload_size);
// ap->timestamp = reverse_bits(ap->timestamp, 32);
if (ap->type == TYPE_VIDEO) {