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

Roadmap towards 2.x #33

Open
1 of 11 tasks
mewmew opened this issue Aug 18, 2018 · 2 comments
Open
1 of 11 tasks

Roadmap towards 2.x #33

mewmew opened this issue Aug 18, 2018 · 2 comments
Labels

Comments

@mewmew
Copy link
Member

mewmew commented Aug 18, 2018

Version 1.x

Before move to github.com/ljud. (see #19)

Version 2.x

After move to github.com/ljud. (see #19)

  • Split flac package into low-level (back-end) and high-level (front-end) packages.
    • The low-level package will handle encoding and decoding on the bit-level, not hiding any FLAC details in the API. The low-level package is intended for users who require full control of FLAC streams, e.g. those who want to write highly optimizing FLAC encoders.
    • The high-level package is intended for end-users and will provide convenient API for accessing audio samples, along with seek support with time.Duration and sample number offsets.
  • Make Header and SubHeader of frame.Frame and frame.Subframe pointers instead of values?
  • Rename frame.SubHeader.Wasted to WastedBits?
  • Check if we could add a Decoder analogous to Encoder, and remove unexported readers from flac.Stream, frame.Frame and frame.Subframe.
  • Take the opportunity to reduce repository size? Currently it's at 13 MB.
  • Investigate how to update the API to avoid having to duplicating the slice of audio samples for different use cases (ref High bitrate, small devices  #34). E.g. playing sound needs samples to be zipped from each channel. Interacting with zc sound.Source requires samples from each channel to be placed after each other; e.g. n samples of the first channel in samples[0:n] and n samples of the second channel in samples[n:2*n].
    • The subframe API should probably be updated to accept a slice to read into, rather than allocating it's own slice. Exactly how to do this while catering towards both zipped and unzipped data is not yet determined.
@mewmew mewmew changed the title Roadmap Roadmap towards 2.x Aug 18, 2018
@wsc1
Copy link

wsc1 commented Aug 18, 2018

Just curious, why seek with time.Duration? the frame number is more precise, and necessary in the context of DAWs splicing, etc, which might use a flac backend.

@mewmew
Copy link
Member Author

mewmew commented Aug 18, 2018

Just curious, why seek with time.Duration? the frame number is more precise, and necessary in the context of DAWs splicing, etc, which might use a flac backend.

I've updated the seek bullet item now to include sample numbers as well. The time.Duration version of seek is mainly intended for end-users wishing to implement music players and the like, where sample number perfection is less important than the intuition of API to say, seek to the time point 01:00 in the song.

As of late, @mehrvarz has been playing around with getting a FLAC music player to work on raspberry pi. Thus helping to uncover where the API falls short for such use cases.

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

No branches or pull requests

2 participants