[fpc-pascal] Re: Playing sounds with standard components

silvioprog silvioprog at gmail.com
Mon Jun 11 23:27:01 CEST 2012


2012/6/11 Michalis Kamburelis <michalis.kambi at gmail.com>:
> 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

Nice project. :)

castle_game_engine-3.0.0-src.zip = +-70MB.

Hm... you could send only the files to play audio? :/

-- 
Silvio Clécio
My public projects - github.com/silvioprog



More information about the fpc-pascal mailing list