Skip to content

Commit

Permalink
Fix modulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuda-Chen committed Dec 24, 2024
1 parent 96f6d54 commit 8cb96f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virtio-snd.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ static void __virtio_snd_frame_dequeue(void *out,

/* Copy the frame to output stream */
uint32_t size = props->ring.cons.size;
uint32_t idx = cons_head & mask;
uint32_t idx = cons_head % size;
fprintf(stderr,
"cons_head %" PRIu32 " cons_next %" PRIu32 " mask %" PRIu32
" idx %" PRIu32 "\n",
Expand Down Expand Up @@ -810,7 +810,7 @@ static void __virtio_snd_frame_enqueue(void *payload,

/* Write payload to ring buffer. */
uint32_t size = props->ring.prod.size;
uint32_t idx = prod_head & mask;
uint32_t idx = prod_head % size;
fprintf(stderr,
"prod_head %" PRIu32 " prod_next %" PRIu32 " mask %" PRIu32
" idx %" PRIu32 "\n",
Expand Down

0 comments on commit 8cb96f9

Please sign in to comment.