termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

termux-microphone-record: cannot record into fifo or block device files

Open BasedUser opened this issue 2 years ago • 1 comments

Problem description termux-microphone-record isn't capable of writing to nonstandard files. This is caused by MicRecorderAPI.java:254 checking if the target file exists, which for fifos and block devices under current file handling, it does.

Steps to reproduce

mkfifo myFifo
termux-microphone-record -f myFifo # File: myFifo already exists! Please specify a different filename
termux-microphone-record -f /dev/stdout # File: stdout already exists! Please specify a different filename

Expected behavior The module should be able to write to fifo/block device files. This would also allow directly processing output using other applications, as well as streaming over the network.

Additional information

  • termux-api application version: 0.50.1
  • termux-api package version (installed through apt): 0.57
  • Android OS version: 11 (lineage_twolip-userdebug 11 RQ3A.211001.001 1003680)
  • Device model: Redmi Note 6 Pro

BasedUser avatar Jun 25 '23 20:06 BasedUser

Also doesn't work on Samsung Galaxy S23 Ultra (Android Version: 14). Same error.

Technerd-SG avatar Apr 30 '24 20:04 Technerd-SG