igorski / MWEngine

Audio engine and DSP library for Android, written in C++ providing low latency performance within a musical context, while providing a Java/Kotlin API. Supports both OpenSL and AAudio.
MIT License
257 stars 45 forks source link

Screen recording while engine running leads to something terrible #136

Closed bobrokrol closed 2 years ago

bobrokrol commented 2 years ago

Hi there. I just launched you example. Amazing work! But there is seems some critical bug

*Upd: It happens only for AAudio driver

its what logcat showing while recording 9-04 09:48:33.179 945 1783 D audio_hw_primary: out_standby: exit 9-04 09:48:33.183 1369 5480 I system_server: oneway function results will be dropped but finished with status OK and parcel s 9-04 09:48:33.188 29460 29460 I wpa_supplicant: Heartbeat 3452 9-04 09:48:33.196 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.196 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.216 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.216 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.236 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.236 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.256 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.256 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.276 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.276 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.297 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.297 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.316 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.316 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.335 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.336 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.356 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.356 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.363 22471 22471 I [SC_ScreenRecorder]_FloatingButtonView: 00:00:04 9-04 09:48:33.376 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.376 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.396 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.396 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.416 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.416 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.436 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.436 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.456 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.456 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.459 677 677 I io_stats: !@ 8,0 r 8372644 165027844 w 6914912 151843872 d 4168084 177737948 f 4275563 500217 9-04 09:48:33.476 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.476 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.494 962 8399 I sensors-hal: handle_sns_std_sensor_event:268, [SSC_LIGHT] P: 18(18),m:1,c:4,b:78,ch:190,r:72,bl 9-04 09:48:33.494 962 8285 I sensors-hal: handle_sns_std_sensor_event:131, [SSC_LIGHT] A: 18(18),m:1,c:4,b:78,ch:190,r:72,bl 9-04 09:48:33.496 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.496 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.496 1369 1621 D SensorManager: TYPE_LIGHT (5): 18.000000 9-04 09:48:33.516 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.516 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.536 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.536 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.556 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.556 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.576 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.576 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.592 1369 2082 D BatteryService: Sending ACTION_BATTERY_CHANGED. scale:100, info:{.chargerAcOnline = false, .cha ChargingVoltage = 0, .batteryStatus = CHARGING, .batteryHealth = GOOD, .batteryPresent = true, .batteryLevel = 47, .batteryVolt 0, .batteryFullCharge = 4500000, .batteryChargeCounter = 1936620, .batteryTechnology = Li-ion} 9-04 09:48:33.592 1369 2082 D BatteryService: online:5, current avg:65, charge type:1, POGO powered:false, power sharing:fals current_event:0x20008000, current_now:126 9-04 09:48:33.594 1369 1969 D MotionRecognitionService: onReceive : ACTION_BATTERY_CHANGED, Plugged: 2 9-04 09:48:33.594 1369 1969 I MotionRecognitionService: [TA] In/out: true, curr state: 1 9-04 09:48:33.594 1067 1067 D SurfaceFlinger: GPIS:: requestGPIS 9-04 09:48:33.594 1067 3476 D NativeSemDvfsManager: acquire:: timeout = 1000 mIsAcquired = 1 mTagName : SurfaceFlinger 9-04 09:48:33.595 1369 1369 D PhoneWindowManagerExt: ACTION_BATTERY_CHANGED - Level=47, status=2 9-04 09:48:33.595 1369 1369 D SemWifiApBroadcastReceiver: Received : android.intent.action.BATTERY_CHANGED 9-04 09:48:33.595 1067 3476 E NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::acquire() 9-04 09:48:33.595 1369 1369 D AdaptiveBrightnessLongtermModelBuilder: Received android.intent.action.BATTERY_CHANGED 9-04 09:48:33.596 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.596 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.596 2363 2363 D SemBigDataInfoController: Intent : android.intent.action.BATTERY_CHANGED 9-04 09:48:33.597 2363 2363 D SemBigDataInfoController: Intent : android.intent.action.BATTERY_CHANGED 9-04 09:48:33.597 2387 2387 I AODBatteryManager: updateBatteryData: ACTION_BATTERY_CHANGED 9-04 09:48:33.597 965 1025 I HYPER-HAL: [RequestManager.cpp]acquire(): Acquired ID : 2138278 [1067 / 1000] HINT : l 9-04 09:48:33.601 2387 2387 I AODBatteryManager: saveBatteryData : AOD BatteryData [mBatteryLevel=47, mBatteryStatus=CHARGING ryChargingType=1, mBatteryChargerType=NORMAL, mBatteryOnline=NOT_DEFINED, mBatterySwellingMode=NONE] 9-04 09:48:33.601 2387 2387 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED 9-04 09:48:33.601 2387 2387 I PowerUI : BATTERY_HEALTH_CHECK extraHealth=2 mBatteryMiscEvent=65536 9-04 09:48:33.601 2387 2387 D PowerUI : priorPlugType = 2 mPlugType = 2 priorBatteryStatus = 2 mBatteryStatus = 2 9-04 09:48:33.602 2387 2387 D PowerUI.Notification: showChargingNotice oldChargingType : 1 currentChargingType : 1 oldChargin 9-04 09:48:33.602 2387 2387 D PowerUI.Notification: There is no change about charging status, so return! 9-04 09:48:33.602 2387 2387 D PowerUI : Battery swelling mode - priorBatterySwellingMode = 0 mBatterySwellingMode = 0 mBatter 9-04 09:48:33.602 2387 2387 I PowerUI : mBatteryMiscEvent = 65536 9-04 09:48:33.603 2387 2387 D KeyguardUpdateMonitor: handleBatteryUpdate 9-04 09:48:33.612 2387 2387 D MediaControlPanel: mActionButtonNumCollapsed = 3, mActionButtonNumExpand = 4 9-04 09:48:33.612 2387 2387 D MediaControlPanel: mActionButtonNumCollapsed = 3, mActionButtonNumExpand = 4 9-04 09:48:33.619 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.619 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.636 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.636 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.655 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.656 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.675 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.676 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.695 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.695 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.716 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.716 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.736 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.736 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.756 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.756 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.776 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.776 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.795 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.795 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.816 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.816 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.835 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.836 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.855 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.855 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.876 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.876 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.896 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.896 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.916 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.916 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.936 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.936 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.956 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.956 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.975 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.976 1051 1751 V AF::WQ : clear 0 9-04 09:48:33.976 1231 9429 I OMX-VENC: venc_dev: stats: avg. fps 2.34, bitrate 83223 9-04 09:48:33.996 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:33.996 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.016 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.016 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.036 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.036 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.056 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.056 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.076 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.076 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.096 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.096 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.111 1067 1067 D SurfaceFlinger: GPIS:: requestGPIS 9-04 09:48:34.112 1067 3476 D NativeSemDvfsManager: acquire:: timeout = 1000 mIsAcquired = 1 mTagName : SurfaceFlinger 9-04 09:48:34.113 1067 3476 E NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::acquire() 9-04 09:48:34.113 965 1025 I HYPER-HAL: [RequestManager.cpp]acquire(): Acquired ID : 2138278 [1067 / 1000] HINT : l 9-04 09:48:34.116 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.116 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.135 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.136 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.156 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.156 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.175 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.176 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.196 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.196 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.216 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.216 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.236 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.236 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.256 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.256 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.275 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.276 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.295 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.296 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.315 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.316 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.336 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.336 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.356 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.356 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.362 22471 22471 I [SC_ScreenRecorder]_FloatingButtonView: 00:00:05 9-04 09:48:34.376 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.376 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.396 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.396 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.416 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.416 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.435 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.436 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.456 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.456 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.475 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.475 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.496 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.496 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.516 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.516 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.536 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.536 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.556 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.556 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.576 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.576 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.595 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.596 1051 1751 V AF::WQ : clear 0 9-04 09:48:34.615 1051 1751 D HiddenSound: checkAndSetCurOutput : curOutput was changed to 21 9-04 09:48:34.615 1051 1751 V AF::WQ : clear 0