Improving Squeak's Mutlimedia

Mark P. McCahill mpm at umn.edu
Mon Feb 21 20:08:19 UTC 2005


On Feb 20, 2005, at 4:40 PM, Brad Fuller wrote:

> Sure it does, and thanks for contributing.
> I'm on the Croquet dist-list and I've been reading the progress.
>
> I think OpenAL would be especially useful for games and tools that I 
> am developing. AFAIK, though, OpenAL hasn't been meet with a large 
> amount of approval (maybe enthusiasm) by the audio development 
> community, but that's just my peripheral assessment from lists such as 
> Alsa, Linux-audio-user, etc.
>

I suppose we could look at some other library, but OpenAL
seemed good enough for now in the Croquet context, is on the
platforms we need, and had licensing terms we could live with.
Do you have some ideas for alternatives?


> Question: will OpenAL support be added to the base 3.x image?

I'm a little unclear on who decides what goes into the
base 3.x image and the process to get something in.
Maybe someone can enlighten me?


> If not, why not?
>

it's OK with me...

> I would like to know more about it, and how you have integrated it 
> into squeak. I'm going to go thru your threads on Croquet. Can you 
> also give us a run down here?
>

The OpenAL plugin and some Croquet examples are in the Croquet
changesets 214 - 220. We did the same thing for OpenAL as was
done for OpenGL in Croquet. We provides both a 'native'
API and a keyword API so people reading documentation
written for C programmers can make sense of the API. For example:

   alBufferData: buffer with: format with: data with: size with: freq

and

   alBufferData(buffer, format, data, size, freq)

For how to actually use it, see the OpenALTeapotMorph and look at 
TUserCameraOpenAL (which sets the listener's position as your avatar
moves through the space). The ToyHelicopter is an example of playing
a looped sound. For an example of playing a streamed sound see
TUserCameraOpenAL>>playSoundBuffer, and play with having sounds
picked up by your PCs microphone sent to other people in the scene.


Class comments for OpenAL:

This is the OpenAL object containing methods for all of the
primitive C functions in the OpenAL plugin. We've attempted
to stay as close as possible to the original C functions,
which causes some problems for functions that return data
through an argument passed by reference. To work around
this when necessary we've adopted the strategy of passing
an array with a single element. There are a few "helper"
methods meant to be more smalltalk friendly (see newSource,
newBuffer).




More information about the Squeak-dev mailing list