Search Unity

Audio Audio Popping at High CPU usage - HoloLens MicStream

Discussion in 'Audio & Video' started by MDoelle, Dec 18, 2017.

  1. MDoelle

    MDoelle

    Joined:
    Nov 23, 2016
    Posts:
    10
    Dear Unity Community,


    We are currently working on a VOIP feature for one of our HoloLens apps and are encountering a challenge using the MicStreamSelector (https://github.com/Microsoft/MixedR...icStreamSelector/Source/MicStreamSelector.cpp) as part of the Mixed Reality Toolkit

    We are using the High_Quality_Voice category which works well under normal circumstances. However, when we encounter high CPU load (90%+), we start to hear popping in the audio which is frame rate independent. We believe that the problem is that the OS is trying to post-process the microphone data in order to filter out the ambient noise and provide the High_Quality_Voice to the buffer. We have verified this by using the default Unity microphone and do not hear popping sounds during high CPU load.

    We believe that since the CPU is being used heavily by other processes, it can't fill the buffer fast enough and therefore popping occurs. I've attached a sample of the popping noise encountered.

    Our best guess to a solution is to implement run the High_Quality_Voice in a separate thread and prioritise the process/thread using SetPriorityClass to high in order to ensure that the buffer is always full.

    You can find a sample of the popping sound here: https://vocaroo.com/i/s0VASamSTL5p

    Two questions:

    1. Do you guys agree that the problem is that the buffer is not being filled fast enough?
    2. Do you guys agree that the solution would be to use multi-threading and prioritise the microphone related thread?

    Not sure if this is the right place but in case someone can help with this problem, am happy to remunerate them for their time.


    Best,

    Max
     
  2. ixdeveloper

    ixdeveloper

    Joined:
    Jan 5, 2016
    Posts:
    14
    Hi Max,
    Did you manage to go to the bottom with this?
    We just started implementing voice chat using MicStream and seem to hit the same issue.