Re: Two more questions
Jason Daly <[email protected]> Fri, 16 Nov 2012 12:13:38 -0500
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
On 11/16/2012 10:22 AM, [email protected] wrote: >> Yes, this is the right list for those type of questions. >> >> There's also the openal-devel list for questions about the internals of >> OpenAL itself. >> >> --"J" >> > Oh, good. Thank you. Now, prepared to be driven bananas by all my > questions. > > Let me first introduce my project. I'm working with JMRI, which is a > software suite for doing computer-related things with model trains. So my > application is a little bit different from the usual gaming application of > OpenAL, but it seems to be working well so far. > > My part is called "Virtual Sound Decoder", or "VSD" for short. What it > does is keep track of a model train's position and speed, and plays train > sounds (engine rumble, bell, whistle, horn, etc.) in response to the train > engineer's throttle inputs. I have a video demo of an early prototype of > the code on YouTube here: http://www.youtube.com/watch?v=-Tgzz72Y0ao > > First up, I have read the Programmer's Guide, but I'd like to make sure I > understand it correctly. > > Let's say I have a PC, and it has a sound card. That's one Device, right? Yes, for the most part (some fancy hardware might end up having multiple "devices", but you probably won't need to worry about that) > That one Device. Can I have two, or three, or twenty Contexts opened up > on that same Device? In theory yes. That's probably one of the less-used features of OpenAL, so you may run into issues, but it's supposed to work the way you describe. > Can those Contexts be in different modes (one in Stereo, another in 5.1 > Surround)? Does the answer depend on the capabilities of the device? "It depends" is probably the best answer. Mainly, it will depend on the capabilities of the back-end audio system that you're using (MMSYSTEM, DirectSound, WASAPI, ALSA, Pulse, etc.). Chris could probably answer this point better than me, though. > The reason for this question is that there are other parts of JMRI that > also generate sounds (things like ambient noises, control panel beeps and > clicks, and so on), and I would like to know how much independence VSD can > have in controlling its own Context vs. having to share with the other > sound-generating parts of JMRI. I'd plan on dealing with a common mixing format between all contexts, if possible. It will probably avoid some headaches. > > There can be only one Listener per Context. That seems clear. Correct > Do I understand correctly that Sources cannot be shared... i.e. if I want > to play the same buffer in two different Contexts, I have to have a > separate Source in each Context, with those two (or more) Sources linked > to the same Buffer, right? Sources are per-context, from what I remember, so yes, you'd have to duplicate any sources that you'd want to appear in multiple contexts > Thanks a bunch! OpenAL is very cool, and is really helping me turn this > into something fun. Sounds like a fun project. Good luck! --"J" _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal