Moin,
Am Sat, 18 Mar 2006 18:00:27 +0100 schrieb Fabien Chevalier
-:
> I wrote a sample program that mimics the establishment
of a Headset
> Profile like connection.
Hehe, I recently did something similar (in Python, though)
...
> The thing basically works... exect after 1or 2 minutes
playback, the
> program suddenly exits.
> Then i just have a few seconds left and *bang* . Kernel
Panic :-(
... and had similar results. Just look at the memory
consumption when
this happens. Apparently all incoming SCO data is buffered
in kernel
memory for you to read, so you *must* read it, even if you
only ever
intend to send data.
I'd also suggest you simply use select() to wait for
incoming data and
then only send something when you received (and read!)
something. This
nicely gives the right timing without guessing the delay
parameter.
For reference I've attached my headset emulator (to be used
with
pybluez): It discards incoming audio and sends a pure sine
wave.
--
Henryk Plötz
Grüße aus Berlin
~~~~~~~ Un-CDs, nein danke! http://www.heise.
de/ct/cd-register/ ~~~~~~~
~ Help Microsoft fight software piracy: Give Linux to a
friend today! ~
|