Git Product home page Git Product logo

audiostore's Introduction

AudioStore

I made this fork to add a playback rate function to this lib. Code is quite messy and probably wrong and/or inefficient, despite it still working, so use at your own risk.

Launch the demo with npm start and visit http://localhost:8000.

DB

Generic IndexedDB wrapper. Doesn't care about audio, just gets/sets data.

AudioStore

Audio-aware storage interface. Takes AudioBuffer instances, breaks them into chunks, and saves them to with db.js.

Allows consumers to read AudioBuffers of arbitrary length and position by reading multiple chunks out of db.js and stitching them together.

Essentially, consumers of AudioStore don't need to care about how things are stored. They simply ask for an AudioBuffer of a given length and offset, and AudioStore will make one on the fly.

Streamer

Responsible for loading an audio asset via AJAX, saving it to an AudioStore, and then streaming audio back out of the AudioStore.

When the in-memory buffer starts to get low, it requests a new AudioBuffer from the AudioStore and schedules playback with sample-level accuracy.

The idea is that this only holds about ~10s of audio in memory at any given time.

StreamCoordinator

Responsible for managing and synchronizing multiple Streamer instances.

Provides a nearly identical API to Streamer so that it can be used with a Player instance.

Note: this is not fully fleshed out, and was mostly built as a demonstration for someone I'm helping out with a related project.

Player

The UI for a Streamer or StreamCoordinator. Pretty standard stuff.

audiostore's People

Contributors

bforest-ariadne avatar kevincennis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.