Re: [Bluez-devel] audio problems with a2play

Brad Midgley
2004-11-24T03:16:55Z

Guys,

If I'm understanding right, the payload should include the sbc_info
header. I thought all along that was just for the purpose of storing the
sbc in a file, but it sounds like the headset needs it.

Is this closer? It doesn't sound right yet, but maybe we really do need
to load up the packet to be closer to the mtu in order for the headset
to be happy.

memcpy(buf + sizeof(packet_header), &payload_header,
sizeof(payload_header));
- size = read(fd, buf + sizeof(packet_header) +
sizeof(payload_header), frame_len);
+ memcpy(buf + sizeof(packet_header) +
sizeof(payload_header), &sbc_info, sizeof(sbc_info));
+ size = read(fd, buf + sizeof(packet_header) +
sizeof(payload_header) + sizeof(sbc_info), frame_len);
seq_num++;
if (size != frame_len) {
terminate = 1;
} else {
- write(streamfd, buf, size +
sizeof(packet_header) + sizeof(payload_header));
+ write(streamfd, buf, size +
sizeof(packet_header) + sizeof(payload_header) + sizeof(sbc_info));
}

Brad