Re: Two more questions

[email protected] Fri, 16 Nov 2012 10:22:33 -0500
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
>
> 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?

That one Device.  Can I have two, or three, or twenty Contexts opened up
on that same Device?

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?

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.

There can be only one Listener per Context. That seems clear.

Buffers are shared among contexts.  Got that.

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?

So those are the basics so far.  I'm sure there will be more as i move
forward.  As you might guess from my earlier question about loopback, one
of the goals is to stream the train sounds out to users who are
controlling their train from a smart phone app, so they can listen to
their own "cab view" sounds on headphones.  I'd also like to support
bluetooth headphones at some point as well, again having multiple users
hearing their own version of the sounds.  We'll get to all that later,
though.

Thanks a bunch!  OpenAL is very cool, and is really helping me turn this
into something fun.

- Mark (TD)


_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal