Comments (2)
If you request a higher number of sources at context creation, you can allocate more:
ALCint attributes[] = {
ALC_MONO_SOURCES, 1024,
0 /* end of list */
};
context = alcCreateContext(device, attributes);
You can then query the device with alcGetIntegerv
to see how many ALC_MONO_SOURCES
and ALC_STEREO_SOURCES
are available. (OpenAL Soft treats all sources equally; it doesn't matter how many are set to be "mono" or "stereo", if you have a source you can play a buffer of any available channel configuration with it).
However, it's generally a good idea to use a dynamic source pool, where you have a pool of available sources and take a source when a sound needs to be played, and put it back when it's done playing, rather than assigning a source to an object for the lifetime of the object. Especially given a distance threshold (you don't need to play sounds that are far enough away that you can't hear them) and a priority system (where more important sounds can preempt/stop less important ones and take their source if there are none available), you won't normally need more than a few dozen or maybe a hundred sources playing simultaneously.
from openal-soft.
Thank you so much for your support and suggestion. I'll look for dynamic source pool to see how to use it.
from openal-soft.
Related Issues (20)
- Capture buffer size doesn't affect latency HOT 1
- Is alGetError() error state independent for each thread? HOT 4
- Resampled delay exceeds max (84.50 > 63) when at 96k (non-issue) HOT 1
- Prioritize soft_oal in the router DLL / Make the router only load "wrap_oal" as a fallback HOT 1
- undefined hardware_destructive_interference_size HOT 5
- Calling alGetError after dynamically loading Win64/soft_oal.dll procs returns 0xA004 (AL_INVALID_OPERATION) HOT 2
- PFFFT compile failure in Windows ARM64 HOT 2
- Error when opening a device with multiple devices HOT 4
- Sending multichannel samples directly to speakers HOT 2
- [question] about loading "AL_EXT_direct_context" functions (posted here because openal.org mailing list is dead apparently) HOT 2
- [Question]Obtaining Ambisonic output in Windows HOT 12
- Muffled sound with Cubic resampler ever since using Gaussian filter. HOT 6
- [Possibly bug] Failed to compile on GCC 8.3.0 HOT 5
- New language binding: Freepascal/Lazarus
- Eager detection and usage of sndio can be problematic on Linux HOT 7
- Build failure when compiling as a CMake subdirectory with MinGW. HOT 1
- [Question] Is there any reason why SND_PCM_STATE_PRIVATE1 enumeration value unhandled? HOT 2
- [Suggestion] add airtable HRTF database link HOT 1
- No matching function for call HOT 2
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 openal-soft.