<div dir="ltr"><div>Hi <br><br></div>I am developing a phone app using pulseaudio 6.0 with asynchronous API<br>using Bluetooth Headset.<br><br><div><div>I create a record stream with pa_stream_new() with this parameter.<br></div><div>
<div> static pa_sample_spec samplespec = {</div><div>     .format = 
PA_SAMPLE_S16LE, /* Linear 16bit */<br></div><div>     .rate = 16000, /* 16000Hz */<br></div><div>     .channels = 1 /* mono */<br></div><div> }<br>
</div>

</div><div>And I set a callback function by pa_stream_set_read_callback().</div><div>After the stream created, I could get a voice data by 96byte per 10ms in this callback.I checked a log with clock_gettime() in this callback.<br></div><div><br></div>I think I get voice packet by 320Byte per 10ms.<br></div><div>16000Hz * 1 * 16bit = 256kbps = 32KBps</div><div>This means that I can get 320Byte per 10ms.</div>So I need to get 320Byte per 10ms.<br><div><div><div><br></div><div>I set sample format above, but I got different voice packet from callback.<br></div><div>I would like to get a voice with Linear 16bit 16kHz mono.</div><div>Is there additional configuration to this codec?<br></div><div><br></div><div>For confirmation, when I use a bluetooth headset, Is this correct the pulseaudio convert codec from SBC to Linear as follows? <br></div><div>My app <- Linear 16bit 16kHz <- Pulseaudio  <- SBC codec <- Bluetooth Headset<br></div><div><br></div><div>And addition to that, After stream connected, CPU load for pulseaudio <br></div><div>rose up 50%-60%.CPU load for MyAPP rose up 20%-30%.<br></div><div>In order to reduce CPU load, I conigure as follows:</div><div> high-priority = no<br> realtime-scheduling = no<br> resample-method=trivial<br><br></div><div>Best Regards,</div>Shinnosuke Suzuki<br><div><br>
</div></div></div></div>