Adding sound

Is there anyway that I can add sound to the collisions of certain objects.

For instance, if I have dominoes falling over, would I be able to have a sound stored in the library that would be triggered each time a domino hits another domino?

Thanks

Stefan
Yes. Please read the section of the manual about contact listeners to see how Box2D raises events you can respond to. You can even have the force of the collision determine the volume of the sound, which adds another layer of realism (using normalForce). But how to get sound working is your own department, Box2D has nothing to do with that.
for actually playing sound look into openAl, its like openGl but for sound (openGraphicsLayer and openAudioLayer)
Crowley wrote:
for actually playing sound look into openAl, its like openGl but for sound (openGraphicsLayer and openAudioLayer)




"Layer"? I think you want to say "Library"

BTW, I prefer FMOD (high level) rather than OpenAL (low level), despite the fact OpenAL is free.
oops, sorry, my mistake, I just assumed it was layer

Original thread: https://box2d.org/forum/viewtopic.php?t=713