Skip to content

Commit

Permalink
RecorderThread.kt: Set priority to THREAD_PRIORITY_URGENT_AUDIO
Browse files Browse the repository at this point in the history
Issue: #39 #54
Signed-off-by: Andrew Gunnerson <[email protected]>
  • Loading branch information
chenxiaolong committed Jun 4, 2022
1 parent acf0117 commit e82e46d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/chiller3/bcr/RecorderThread.kt
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class RecorderThread(
*/
@SuppressLint("MissingPermission")
private fun recordUntilCancelled(pfd: ParcelFileDescriptor) {
AndroidProcess.setThreadPriority(AndroidProcess.THREAD_PRIORITY_AUDIO)
AndroidProcess.setThreadPriority(AndroidProcess.THREAD_PRIORITY_URGENT_AUDIO)

val audioFormat = AudioFormat.Builder().run {
setEncoding(ENCODING)
Expand Down

0 comments on commit e82e46d

Please sign in to comment.