Android Visualizer implementation crash

后端 未结 6 2009
粉色の甜心
粉色の甜心 2020-12-03 09:26

I am trying to implement the Android Visualizer class. I have looked up other trouble threads but I am still getting a fatal error. This all looks to me like it should work

6条回答
  •  醉话见心
    2020-12-03 10:11

    There are some important things for using Visualizer.

    1. minimum api level must be equal to or greater than 9.
    2. Visualizer engine, error: -1 means RECORD_AUDIO permission is missing.
    3. Visualizer engine, error: -4 means Operation failed due to bad parameter. value. something bad in the configuration of the Visualizer, you don't properly setup Visualizer.

    And also see my answer here.

    Note

    Parameters (audioSession) system wide unique audio session identifier. If audioSession is not 0, the visualizer will be attached to the MediaPlayer or AudioTrack in the same audio session. Otherwise, the Visualizer will apply to the output mix.

提交回复
热议问题