Coder Social home page Coder Social logo

rpvelloso / libjukebox Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 4.0 69.69 MB

Plataform independent (windows/linux) C++ audio playback library (uses DirectSound under Windows and Alsa under Linux)

C++ 28.07% Shell 0.04% C 70.77% CMake 0.11% Lua 0.08% Makefile 0.72% Starlark 0.20% Batchfile 0.01%
alsa audio directsound effects flac midi mp3 ogg playback sound vorbis

libjukebox's People

Contributors

rpvelloso avatar thinlizzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

libjukebox's Issues

refactor decoder

expose only the decoder to the soundimpl, remove soundfile from it. This will ease decoration at the decoder for resampling, resolution change, etc.

Sound files should support loading by chunks

Now they are reading and decoding the entire files, which can drain the application memory if there are too many objects and start causing memory trashing!

Both wav and ogg files have this behavior.

We need a way to specify a maximum chunk size and design some sort of streaming when playing Sound objects.

TODO: refactor sound states

  • move state transitions outside the states, make transitions explicit;
  • do not detach playing thread and join it upon state destruction/transition.

prevent more than one decoder when loading SoundFile from stream

When a soundfile is loaded from a stream, chunk by chunk, it can't be played simultaneously by multiple sound objects (i.e., it can't be shared) because the stream pointer can't be shared (it could be shared using mutex and alike, but we want to avoid this). So a stream soundfile should be allowed to instantiate only one decoder. If sharing is needed then the soundfile should be loaded to memory so it can be played simultaneously by several sound objects (or, if the file is too big, multiples soundfile should be created for the same disk file).

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.