[Lazarus] Playing audio files - which package do you prefer?

Graeme Geldenhuys graemeg.lists at gmail.com
Sun Jul 29 20:44:30 CEST 2012


Hi,

> Question is: what is better, lazarus
> native components or console players?


Lazarus doesn't include sound components. The Free Pascal's FCL does
include header translations though for many different sound libraries.
So you can use a procedural method of calling the API functions to do
what you want, or you could create a class that wraps the various API
calls into an easier to use interface. A few week back I posted sample
code of how we use SDL to play sounds in our application. Below is the
link to the discussion from the fpc-pascal mailing list.

   http://free-pascal-general.1045716.n5.nabble.com/Playing-sounds-with-standard-components-td5709976.html


I would not recommend the "console player" idea. The API method should
give you much better control.

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net




More information about the Lazarus mailing list