stabpaokara
stabpaokara

Reputation: 5

Does the print of readframes(n) of wave library show the audio samples in hexadecimal?

When I print the result of the first audio frame by doing track.readframes(1), I get b'\xfb\xff\xfb\xfe'. My track is stereo so we know that we have 2 channels where each channel has 1 sample. Does it mean that the left channel sample is : 'fbff' and the right one is 'fbfe'?

Upvotes: 0

Views: 29

Answers (1)

J_H
J_H

Reputation: 20540

Yes, that's right.

But they don't come back in hexadecimal ascii format. They're returned to you in raw binary format, which can be displayed in several ways, including hex.

If you prefer to see 'fbff' and 'fbfe', then write a simple helper function to appropriately format the return value.

Upvotes: 0

Related Questions