Skip to content

Encode opus and support functions

Jake Durham requested to merge encodeOpus into main
  • *Small note for building, you must install OPUS (ubuntu is sudo apt install libopus-dev)

With these changes I have implemented OPUS encoding and decoding in the msio pipeline. Data is encoded when received and put into queues with timestamp information. You can pull the payloads from the queue, but I currently have not set up pushing as I will need to do some mixing with the timestamp information. I have also added some support functions, such as the ability to list and select io devices and the ability to manually clear the buffers for testing. I have noticed some odd behaviors with delay, so I wonder if you can spot anything. I have done some testing and it seems that when doing playback and recording at the same time, there is a "ramp up period" or some odd phenomenon where the number of packets in the queue ramps up to some fixed(ish) amount (fluctuates between 3 numbers). If I clear the queue after the ramp up, the delay goes away, but otherwise it will stay at some large delay. It seems to be related to how long it has been since I stopped the streams. If I run the test, it should run with expected delay, however, if I close the test and run it again pretty fast, there will be the wind up with lots of delay. If I leave it closed for a bit, the delay will go away when I run it next. Also, if I start the stream, stop it and then run it again without closing the program, the delay problem occurs.

Edited by Jake Durham

Merge request reports

Loading