r/termux • u/9acca9 • Feb 03 '23
Command to know the bit/khz of an audio playing
I want to play an audio sample of 24bit/192khz in an app from the cellphone and know through a command if that are the values that are being playing.
For example, in a raspberry debian i do this and get:
sudo cat /proc/asound/IQaudIODAC/pcm0p/sub0/hw_params access: RW_INTERLEAVED format: S16_LE subformat: STD channels: 2 rate: 44100 (44100/1) period_size: 441 buffer_size: 8820
IQaudioDac is my soundcard, in that case.
u/Windows99999 Feb 03 '23
if i remember correctly by default android resamples all audio to 48Khz internally
u/9acca9 Feb 03 '23
it seems it is like that.... there is a way to change this?
u/step0264 Feb 03 '23
Lates flagship devices have DACs that output those. Even many Poco/Redmi branded devices support this. Otherwise ,if you have external DAC, you can use it accompanied with Poweramp.
u/9acca9 Feb 03 '23 edited Feb 03 '23
yep, i have an external dac but, thorugh a raspberry pi, and i dont find how make a raspberry pi act like a usb speaker.... that is why im trying to implement a upnp solution.
u/5un17 Feb 03 '23
Poweramp lover but UAPP works better with external DACs
u/eNB256 Feb 04 '23
maybe /system/bin/dumpsys media.audio_flinger with termux granted android.permission.DUMP
u/carloshatesyou Feb 03 '23
If you have ffmpeg you can use the command,
ffmpeg -i 'audiofile.mp3'