Comments (3)
So, you probably need the Timed play music call, right? The Chunks API had timed functions, but music lacks that, so, yeah, I'll try add that at evening.
from sdl-mixer-x.
Ahh, I didn't even see that Timed channel functions! Yes, the equivalent functionality for music would be perfect.
from sdl-mixer-x.
Thinking about timed play, maybe each stream (and music stream) can have a their own data consumption count-down value instead of relying on SDL timers/ticks.
Their data consumption values would be calculated once when their play function is called with the desire play duration.
The data count depends on us knowing the particular stream's sample rate, bytes per sample, and number of channels (if we support mono/5.1, etc..). So when the user opens the file/RW the first time, we'd want to query the decoder and save those properties.
Every time the callback fires, all the streams' data consumed values would be decremented by their given decoded amount of data (prior to mixing/interpolating up to a common sample rate, bit depth, and number of channel); which would allow each stream to have a unique count-down.
Once a stream's data countdown hits 0 (or less), that stream is no longer played.
from sdl-mixer-x.
Related Issues (20)
- Disable GPL components by default HOT 3
- [Feature request] Support VGMStream format? HOT 3
- One GME issue on SPC HOT 13
- [BUG] Window freezes when playing via Native MIDI HOT 2
- Compatibility with Android? HOT 3
- Request to add wav gsm format support HOT 1
- "Gain / Volume Argument" for Tracker Music? HOT 1
- [MIDI] Ability to combine synthesizers on playback
- WAV File opens in SDL2_Mixer but not Mixer X HOT 31
- Cannot build `pxtone` due to invalid character when system codepage is 936 HOT 6
- Cannot compile under Archlinux. HOT 11
- /usr/bin/ld : cannot found -lSDL2_mixer_ext_Static : File not found. HOT 5
- Error when attempting to play .WAV files exported with the popular PS2 audio extracting program MFAudio HOT 4
- Support More File Format HOT 2
- Issue compiling on Asahi Linux HOT 1
- MixerX returns cryptic error when SDL2 is already included in the library HOT 3
- music->interface->GetAudio null dereference exception HOT 7
- Effect handler which changes buffer length HOT 1
- Do you have a library that allows you to drive a bunch of different soft synths directly? HOT 1
- Gain (Volume) parameter for stream musics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdl-mixer-x.