[Lazarus] Play sound in Lazarus 3.4?
Timothy Groves
the.tail.kinker at gmail.com
Fri Nov 22 21:07:49 CET 2024
Found an SDL solution. Only problem is that I have to manually copy the
SDL units into my project directory for any project that uses it...
On 2024-11-22 14:56, Kostas Michalopoulos via lazarus wrote:
> On 11/22/24 8:12 PM, Timothy Groves via lazarus wrote:
>> I cannot find an acceptable answer to this anywhere online. I've
>> been looking for an hour.
>>
>> How do I play back a wav file?
>>
>> Preferably, how do I store a bunch of them, play them back as needed
>> when called?
>>
>
> On Windows you could use PlaySound. There is no cross-platform high
> level audio support in FPC or Lazarus (fcl-sound could be a candidate
> but all it provides right now is reading WAV files, there is no
> support for audio playback).
>
> You can use OpenAL as a cross-platform audio library. The OpenAL
> bindings for Free Pascal have an example of loading and playing WAV
> files directly in packages/examples/wavopenal.pas.
>
>
More information about the lazarus
mailing list