I am able to record 8 channel mic audio (32bit audio but actual content is 24bit with 8 bit padding) in below format using alsa utils (pcm_read):
t0: channel 0, channel 1, channel 2, ....., channel 8
t1: channel 0, channel 1, channel 2, ....., channel 8
t2: channel 0, channel 1, channel 2, ....., channel 8
.
.
.
I am using below code to convert 32bit audio to 24bit audio but still audio played out is gibberish.
with open("input.raw", "rb") as f:
x = open("output.raw", "wb")
while f.read(1) != "":
byte = f.read(3)
x.write(byte)
x.close()
Can anyone give me some pointers if I am doing anything wrong?