Lines Matching refs:a2dp
237 EXPECT_EQ(768, a2dpio->a2dp.samples); in TEST_F()
249 EXPECT_EQ(768, a2dpio->a2dp.samples); in TEST_F()
836 int init_a2dp(struct a2dp_info* a2dp, a2dp_sbc_t* sbc) { in init_a2dp() argument
838 memset(a2dp, 0, sizeof(*a2dp)); in init_a2dp()
839 a2dp->frame_length = FAKE_A2DP_FRAME_LENGTH; in init_a2dp()
840 a2dp->codesize = FAKE_A2DP_CODE_SIZE; in init_a2dp()
844 void destroy_a2dp(struct a2dp_info* a2dp) { in destroy_a2dp() argument
848 int a2dp_codesize(struct a2dp_info* a2dp) { in a2dp_codesize() argument
849 return a2dp->codesize; in a2dp_codesize()
852 int a2dp_block_size(struct a2dp_info* a2dp, int encoded_bytes) { in a2dp_block_size() argument
853 return encoded_bytes / a2dp->frame_length * a2dp->codesize; in a2dp_block_size()
856 int a2dp_queued_frames(const struct a2dp_info* a2dp) { in a2dp_queued_frames() argument
857 return a2dp->samples; in a2dp_queued_frames()
860 void a2dp_reset(struct a2dp_info* a2dp) { in a2dp_reset() argument
862 a2dp->samples = 0; in a2dp_reset()
865 int a2dp_encode(struct a2dp_info* a2dp, in a2dp_encode() argument
873 if (a2dp->a2dp_buf_used + a2dp->frame_length > link_mtu) in a2dp_encode()
875 if (pcm_buf_size < a2dp->codesize) in a2dp_encode()
878 processed += a2dp->codesize; in a2dp_encode()
879 a2dp->a2dp_buf_used += a2dp->frame_length; in a2dp_encode()
880 a2dp->samples += processed / format_bytes; in a2dp_encode()
885 int a2dp_write(struct a2dp_info* a2dp, int stream_fd, size_t link_mtu) { in a2dp_write() argument
887 if (a2dp->frame_length + a2dp->a2dp_buf_used < link_mtu) in a2dp_write()
894 samples = a2dp->samples; in a2dp_write()
895 a2dp->samples = 0; in a2dp_write()
896 a2dp->a2dp_buf_used = 0; in a2dp_write()