luciano de souza wrote:
I took a look in Openal examples. I need to confess that I expected
something easier. Perhaps, something like:

PlaySound('file.wav', 0)


You need to wrap OpenAL a little to get something so simple.

In my Castle Game Engine (http://castle-engine.sourceforge.net/), I have SoundEngine wrapper, with which you can play sound like

  Buffer := SoundEngine.LoadBuffer(FileName);
  SoundEngine.PlaySound(Buffer, false, ...);

See working example in SVN on http://svn.code.sf.net/p/castle-engine/code/trunk/castle_game_engine/examples/audio/alplay.lpr

You may want to look at the source (LGPL) to see how it's done :)

Michalis
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to