rpvelloso / libjukebox Goto Github PK
View Code? Open in Web Editor NEWPlataform independent (windows/linux) C++ audio playback library (uses DirectSound under Windows and Alsa under Linux)
Plataform independent (windows/linux) C++ audio playback library (uses DirectSound under Windows and Alsa under Linux)
to reproduce:
auto sound = jukebox::factory::makeSound(soundFileWithSomeLength);
sound.play();
// sleep or busy wait a little bit, but not too much
sound.play(); // this will be ignored
tested on Windows
=)
you can reproduce it with a small wav file. play it with looping, wait it to be looped and then use .stop() and .play() afterwards
it won't play again even using loop(true)
to gradually stop playing a sound object
expose only the decoder to the soundimpl, remove soundfile from it. This will ease decoration at the decoder for resampling, resolution change, etc.
dr_mp3 has better API
๐ฅ
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.
Amalgamate source into a single file.
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).
๐ฏโโ๏ธ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.