Skip to content

Commit 91a1c7f

Browse files
committed
Debug
1 parent 3e42d75 commit 91a1c7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

virtio-snd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,15 +638,15 @@ static void virtio_snd_cb(struct CNFADriver *dev,
638638
fprintf(stderr, "start to play\n");
639639
int channels = dev->channelsPlay;
640640
uint32_t id = v_ptr->stream_id;
641-
int out_buf_sz = framesp * channels;
641+
uint32_t out_buf_sz = framesp * channels;
642642

643643
/*if (!(playing)) {
644644
memset(out, 0, sizeof(short) * out_buf_sz);
645645
return;
646646
}*/
647647

648648
/* TODO: add single consumer */
649-
__virtio_snd_frame_dequeue(&out, out_buf_sz, id);
649+
__virtio_snd_frame_dequeue((void **) &out, out_buf_sz, id);
650650
#if 0
651651
for (int i = 0; i < framesp; i++) {
652652
// Shift phase, so we run at 440 Hz (A4)
@@ -772,9 +772,9 @@ static void __virtio_snd_frame_enqueue(void *payload,
772772
* prod_head > cons_tail). So 'free_entries' is always between 0
773773
* and size(ring)-1. */
774774
free_entries = mask + cons_tail - prod_head;
775-
/*fprintf(stderr,
775+
fprintf(stderr,
776776
"mask %" PRIu32 " cons_tail %" PRIu32 " prod_head %" PRIu32 "\n",
777-
mask, cons_tail, prod_head);*/
777+
mask, cons_tail, prod_head);
778778

779779
/* Move prod_head. */
780780
if (n > free_entries)

0 commit comments

Comments
 (0)