Guys, I put a rough proof-of-concept implementation together using setitimer. (Yes, it's gross and the signal handler doesn't actually do any work, just indicates that the interval is over) The music seems to be timed right but it's a very "noisy" signal on the hp headset. Any ideas? I didn't commit it because it's so ugly. Brad Marcel Holtmann wrote: > Hi Henryk, > > >>>So the best thing is too encode two or three full AVDTP frames in >>>advance and have them ready to send. The sending can't be controlled >>>be usleep(). We need a time that kicks in every whatever msec and >>>makes us to transmit the next frame. >> >>That's what I would favour. According to the libc manual setitimer() >>would be the function of choice, if nobody else has a better idea (RTC, >>anyone?). > > > so in general the time that a SBC frame is calculated for, is always the > same if we don't change the parameters, right? > > Using the ITIMER_REAL domain may works and since you can setup your > timer in microseconds, then this would be the way to go.