Plugin Architecture
eshaz opened this issue · 0 comments
eshaz commented
This library would benefit from a more modular / plugin architecture so that the common code can be reused across decoders.
- Tree shaking common code used across modules for smaller build size
- Simpler code structure (less duplicated scaffolding code, easier to maintain)
- Common interface for new audio decoders to implement
New library layout might look like:
- @wasm-audio-decoders/decoder-api -> contains the shared scaffolding code for Web Worker / general decoding API.
- @wasm-audio-decoders/mpeg
- @wasm-audio-decoders/opus
- @wasm-audio-decoders/ogg-opus
- @wasm-audio-decoders/flac
- @wasm-audio-decoders/ogg-flac
- @wasm-audio-decoders/vorbis
- @wasm-audio-decoders/ogg-vorbis