Increase audio source count
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Increase audio source count
I can't find any results online / I don't even know if possible, but, is there a way to increase the audio source count? At the moment the limit is 64, if you try to create a sound after the limit has been reached, it won't play until a slot clears up.
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Increase audio source count
That specific limit is only for the number of simultaneous playing sources (you can have as many non-playing sources as you want, as long as you don't run out of memory.)
The maximum number of simultaneously playing Sources can't really be increased, since it's largely a platform/driver/OpenAL backend limitation.
You could stop any playing Sources that are quiet / short / far away, if the limit is closed to being reached. I believe most (AAA and other non-LÖVE) games do a similar thing.
The maximum number of simultaneously playing Sources can't really be increased, since it's largely a platform/driver/OpenAL backend limitation.
You could stop any playing Sources that are quiet / short / far away, if the limit is closed to being reached. I believe most (AAA and other non-LÖVE) games do a similar thing.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Increase audio source count
Alternative solution would be to mix them in real-time, which is probably overkill, but doable with this neat thing. Though you'd be using sounddata objects instead of sources then, which will take up quite a lot of memory if the stuff you want to mix are long... or you can even mix these two solutions as well.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Increase audio source count
Thanks for your responses.
I have built a MIDI player and was trying to play Circus Galop, but it would quickly take up all 64 slots since the song is something out of the ordinary... Worked perfect for basically anything else that didn't play all piano notes at once.
I worked around it by stopping sources if the 64 limit has been reached, otherwise it just clones the note source and plays it.
I have built a MIDI player and was trying to play Circus Galop, but it would quickly take up all 64 slots since the song is something out of the ordinary... Worked perfect for basically anything else that didn't play all piano notes at once.
I worked around it by stopping sources if the 64 limit has been reached, otherwise it just clones the note source and plays it.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Increase audio source count
Food for thought, in the olden days when trackers were just being made, on amigas mostly, they had a 4-channel hard limit because that's how many voices the current hardware (the digital-analog-converter) was capable of handling (even so, the paula was still an awesome chip)
...without software mixing, so with no CPU overhead.
After DOS was available, so were faster CPUs, and soundcards, for that matter; people started to write programs that would mix voices programmatically, and so the maximum voice limit was dependant on the speed of the processor, above the hardware limit, that is.
(OpenMPT, a tracker i still use, still has its channel limits appended by the speed (in MHz) of the CPU that can probably handle them, though ending at 256 channels with 400+ MHz CPU)
Oh, i hope you don't want to open a "black midi" file with your app
...without software mixing, so with no CPU overhead.
After DOS was available, so were faster CPUs, and soundcards, for that matter; people started to write programs that would mix voices programmatically, and so the maximum voice limit was dependant on the speed of the processor, above the hardware limit, that is.
(OpenMPT, a tracker i still use, still has its channel limits appended by the speed (in MHz) of the CPU that can probably handle them, though ending at 256 channels with 400+ MHz CPU)
Oh, i hope you don't want to open a "black midi" file with your app
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: No registered users and 16 guests