Backend producing padded byte arrays
- Dominant language
- Python
- Stars
- 538
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
When working with mp3 files of indeterminate length, or ones that end on an odd number of PCM frames when decoded, as would be the case for variable bit rate MP3 streams, the yield statement occassionally returns zero.
```
with audioread.audio_open('workfile.mp3') as input_file:
for data in input_file:
# data is zero padded
```
Sample output for the above function might look like the following:
`\xecD\xe4\xe2\xee\xd7\xe6\xd3\xf1\x9b\xe8\x99\xf4K\xe8S\xf5X\xe7\x8b\xf3\xe0\xe5\xd7\xf0\xf5\xe3\xf5\xee\xc8\xe3\xb3\xee\xa6\xe6\x0f\x0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00`
This issue either needs documentation, or consideration for any "streaming" solution.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the behavior with audioread.audio_open on the provided variable-length MP3 example, then inspect the backend iteration paths that yield decoded byte arrays. Determine whether zero padding is expected, should be removed, or needs documentation; the issue is complete only when that behavior and the chosen handling are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100