MediaRecorder class starts recording audio after slight delay

前端 未结 3 1654
执笔经年
执笔经年 2021-01-01 03:50

I am having an issue with the MediaRecorder class. When I call the start() method, the recorder starts recording(audio) but after some delay (The delay is quite noticeable -

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 04:29

    I tracked down the problem (not CyanogenMod related): https://github.com/CyanogenMod/android_frameworks_base/commit/d7f1c3d69274fef8772a663ce1c792fd0466fcc5

    This commit got in between Android 2.2 and 2.3. Its purpose seems to be to mute the sound of the default camera app when starting to record (although 1 second seems a bit long for that). And it should fade in the sound gradually, but the implementation does not seem to work. It's a hard cut after 1 second, you can also try this in the camera app.

    I really don't understand why they implemented it at this level, where also other applications are affected. And the behaviour is not configurable, so I see no possible workaround. We can only hope that it will be fixed in future versions.

提交回复
热议问题