Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed May 29, 2022
1 parent 5673a02 commit c1cb00f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/aubuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ static int test_aubuf_auframe(void)
/* write first frame (filling with wish_sz) */
auframe_init(&af_in, AUFMT_FLOAT, sampv_in, 80, 48000, 2);
af_in.timestamp = 0;
err = aubuf_write_auframe(ab, &af_in);

err = aubuf_write_auframe(ab, &af_in);
TEST_ERR(err);
TEST_EQUALS(80 * sizeof(float), aubuf_cur_size(ab));

Expand All @@ -134,7 +135,8 @@ static int test_aubuf_auframe(void)
af_in.sampv = &sampv_in[80];
af_in.sampc = 80;
af_in.timestamp = dt;
err = aubuf_write_auframe(ab, &af_in);

err = aubuf_write_auframe(ab, &af_in);
TEST_ERR(err);
TEST_EQUALS(80 * sizeof(float), aubuf_cur_size(ab));

Expand All @@ -149,15 +151,17 @@ static int test_aubuf_auframe(void)
af_in.sampv = &sampv_in[160];
af_in.sampc = 80;
af_in.timestamp = dt * 2;
err = aubuf_write_auframe(ab, &af_in);

err = aubuf_write_auframe(ab, &af_in);
TEST_ERR(err);
TEST_EQUALS(120 * sizeof(float), aubuf_cur_size(ab));

/* write half frame */
af_in.sampv = &sampv_in[240];
af_in.sampc = 40;
af_in.timestamp = dt * 3;
err = aubuf_write_auframe(ab, &af_in);

err = aubuf_write_auframe(ab, &af_in);
TEST_ERR(err);
TEST_EQUALS(160 * sizeof(float), aubuf_cur_size(ab));

Expand Down

0 comments on commit c1cb00f

Please sign in to comment.