Skip to content

termux-microphone-record -d twice will got wrong outputFile #808

@yurenchen000

Description

@yurenchen000

Problem description
run termux-microphone-record -d twice will got wrong outputFile

Steps to reproduce

//1. check current recording
~ $ termux-microphone-record -i
{
  "isRecording": true,
  "outputFile": "\/storage\/emulated\/0\/TermuxAudioRecording_2025-09-30_21-00-01.ogg"
}

//2. call recording again
~ $ termux-microphone-record -d -e opus

Recording already in progress!

//3. info tell current file is changed, wrongly (acturely old recording still use old file)
~ $ termux-microphone-record -i
{
  "isRecording": true,
  "outputFile": "\/storage\/emulated\/0\/TermuxAudioRecording_2025-09-30_21-07-05.ogg"
}
~ $ ls -lhtr /sdcard/TermuxAudioRecording_2025-09-30_* | tail -2
-rw-rw----. 1 root everybody 2.2M Sep 30 21:00 /sdcard/TermuxAudioRecording_2025-09-30_20-45-01.ogg
-rw-rw----. 1 root everybody 1.1M Sep 30 21:07 /sdcard/TermuxAudioRecording_2025-09-30_21-00-01.ogg

//4. `ls -lh` multi times, we can see old file still growing, that's meaning old file still in-use.

Expected behavior
outputFile should return the old file which really in-use.

Additional information

  • termux-api application version: com.termux.api versionCode:1002
  • termux-api package version (installed through apt): 0.59.1-1
  • Android OS version: 10
  • Device model: MI 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions