-
Notifications
You must be signed in to change notification settings - Fork 19
set3DSpatialize #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is OpenAL Soft being used in both of these cases? The device name should have
|
OpenAL uses in both of cases. Device name has OpenAL Soft on . . alIsExtension ("AL_SOFT_direct_channels") gives false, |
That doesn't make much sense. What OpenAL Soft version are you using? What does
The results should be fairly similar when the buffer format matches the output format.
If you're playing a 7.1 buffer with the device configured for 5.1 and connected to a 7.1 speaker setup, there can be a number of transforms at play. With I 8000 f there's no output on the surround channels when it's off, that could mean OpenAL Soft is just producing a stereo mix (though if it did that, I'd not expect the surround channels to be used at all when direct channels is on either), or the input 7.1 signal is such that it's managing to phase cancel on the surround channel mix, leaving the side and rear channels audible only on the front outputs. |
Thaank you. I'll think it over and investigate on the sound card. I probably have some kind of misunderstanding. But if possible I will ask the question differently. What is the most direct way for a buffer prepared for example for a 5.1 or 7.1 channel configuration (AL_FORMAT_51CHN16/AL_FORMAT_71CHN!16), to sound at the output in its pure form as it is without any processing? |
With alSourcei(source, AL_DIRECT_CHANNELS_SOFT, AL_REMIX_UNMATCHED_SOFT); will play each input channel on its matching output channel, and remix input channels that don't have a matching output to other "nearby" channels. Otherwise, if you don't want that remixing behavior, or if only alSourcei(source, AL_DIRECT_CHANNELS_SOFT, AL_DROP_UNMATCHED_SOFT);
// or equivalently
alSourcei(source, AL_DIRECT_CHANNELS_SOFT, AL_TRUE); will play each input channel on its matching output channel, and drop/silence input channels that don't have a matching output channel. |
In my program, I create about 100 - 150 static sound buffers. As soon as the volume of a sound becomes > 0 I create a source and associate it with the buffer that I want to play. With such a dynamic source selection in my case approximately 8 - 15 sources are simultaneously involved. In alure you declare that you can create a conditionally unlimited number of sources. Does it means that this number may exceed the ALC_MONO_SOURCES obtained by calling alcGetIntegerv (device, ALC_ALL_ATTRIBUTES, size, attrs)? My value is 256. Are alure's Context :: createSource, Source :: destroy methods similar to the OpenAL functions alGenSources / alDeleteSources or is there some algorithm that frees a non-playing source or a source with zero gain? Could you please explain how mAllSources and mFreeSources work? |
Yes.
Alure virtualizes OpenAL sources. When you play an A source with 0 gain still plays, in case the gain is increased while playing (so it'll be at the correct playback offset when it becomes audible). But a non-playing
|
This means, if I understand correctly, at each moment in time all alure :: Source looping sources regardless of their volume and all alure :: Source unlooping sources that have not reached the end of its buffer regardless of their volume, will have internal OpenAL sources unless it were called Source :: destroy or Source::stop methods? |
Or the |
With this everything is clear. I have come to the conclusion that my program logic is "struggling" with perhaps the most important feature of OpenAL: simulating the position of a sound source in a 3D sound system. I am trying to do the same but by calculating the volume of each channel in a multi-channel buffer. But for this I just need to make my buffer sound unchanged at the output. Perhaps I will achieve the result I want more efficiently if I leave the buffer alone and simulate the position of each of my sources by specifying properties such as position and orientation for them. |
I use in my program Open AL and in particular the flag AL_DIRECT_CHANNELS_SOFT = true. Moreover, this flag for some reason does not have an effect for the configuration 5.1 of my sound card, but it works great for 7.1 (SB Audigy 5/Rx). Am I correct in understanding that if I need a similar capability when using Alure, then I can use set3DSpatialize ()? Thank you.
The text was updated successfully, but these errors were encountered: