If termux-microphone-record -f is run twice with different arguments, then termux-microphone-record -q will report it finished recording to a file that won't exist
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 920
- PR merge metrics
- No merged PRs in 30d
Description
Problem description
I first noticed this when trying to make timestamped recordings using: termux-microphone-record -f $(date '+%Y-%m-%d_%H-%M-%S') but I can reproduce it under other conditions:
If termux-microphone-record -f fileA is executed and then termux-microphone-record -f fileB, the user will get the error Recording already in progress! and only fileA is created. However when the user stops recording via termux-microphone-record -q, it will report Recording finished: /path/to/fileB, which won't exist. This is a minor cosmetic issue unless an user is parsing the output when stopping the recording.
Steps to reproduce
/sdcard/TODO_audio_files $ termux-microphone-record -f fileA
Recording started: /storage/emulated/0/TODO_audio_files/fileA Max Duration: 15:00
/sdcard/TODO_audio_files $ termux-microphone-record -f fileB
Recording already in progress!
/sdcard/TODO_audio_files $ termux-microphone-record -q
Recording finished: /storage/emulated/0/TODO_audio_files/fileB
/sdcard/TODO_audio_files $ ls
fileA
Expected behavior
termux-microphone-record -q should report the correct file
**Additional information**
* termux-api application version:
* termux-api package version (installed through apt):
* Android OS version:
* Device model:
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=4741
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.org/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.39.6
Android version:
11
Kernel build information:
Linux localhost 4.4.223-g52750b8f2138-ab6846512 #1 SMP PREEMPT Fri Sep 18 09:49:34 UTC 2020 aarch64 Android
Device manufacturer:
Google
Device model:
Pixel 2
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.boot versionCode:7
com.termux.widget versionCode:13
com.termux.window versionCode:15
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the termux-microphone-record command entry point and trace how the requested output filename is retained after a recording starts. Reproduce the fileA, fileB, and -q sequence from the issue; done means -q reports fileA, the file that was actually created, after the second start is rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100