Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP3Stream does not properly abstract over its source stream #21

Open
Drake53 opened this issue Oct 22, 2022 · 1 comment
Open

MP3Stream does not properly abstract over its source stream #21

Drake53 opened this issue Oct 22, 2022 · 1 comment

Comments

@Drake53
Copy link

Drake53 commented Oct 22, 2022

The Position and Length properties and the Seek() method of MP3Stream use the underlying source stream instead of the output PCM bytes. I know the summaries mention this, but it's still confusing and inconsistent with the Read() method.

@Drake53
Copy link
Author

Drake53 commented Nov 5, 2022

Made an example implementation here: Drake53@814acf0
I'm not really familiar with the MP3 format so I don't know if it's possible to determine the length and frame offsets without reading the entire file first, so for now I throw NotSupportedException for Length and I build the frame offsets dict as they're being read. This is enough to support loop points, for which I only needed a working Seek() implementation that can seek backwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant