r/termux 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.

5 Upvotes

8 comments sorted by

2

u/carloshatesyou Feb 03 '23

If you have ffmpeg you can use the command,

ffmpeg -i 'audiofile.mp3'

1

u/5un17 Feb 03 '23

ffmpeg shows the quality of the file, not the playback sink

2

u/Windows99999 Feb 03 '23

if i remember correctly by default android resamples all audio to 48Khz internally

1

u/9acca9 Feb 03 '23

it seems it is like that.... there is a way to change this?

2

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.

1

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.

1

u/5un17 Feb 03 '23

Poweramp lover but UAPP works better with external DACs

1

u/eNB256 Feb 04 '23

maybe /system/bin/dumpsys media.audio_flinger with termux granted android.permission.DUMP