I have two avb board and I connected them using avdecc on windows over ethernet.
I used winpcap to capture packets over ethernet.
But I have no idea how to access the audio samples from packets (packets in ethernet).
Here is part of codes
Code: Select all
data = (u_char *)(packetData + 14 + 20 + 20);
/* Grab a packet */
//packetData = pcap_next(adapterHandle, &packetHeader);
// we print some information about the captured packet
// we print only the length of the packet here
/*for (unsigned int indexSample = 0; indexSample <128; indexSample++)
{
for (unsigned int indexChannel = 0; indexChannel < 4; indexChannel++)
{
channs[indexChannel][indexSample] = ((float)*(data++)) / 32768.0;
}
chan1[indexSample] = channs[0][indexSample];
Please help me.
Thank you.