[SOLVED]playsound bis lazarus / 31-LCL ---------------------------------------------------------------------- MVD · 2017-10-01 09:33 Hi, when the application is playing a sound with playsound I can not do anything, I have to wait the sound is finished. Is it not possible to play a music in the background and have all the components from the form active? How can I stop the sound? ---------------------------------------------------------------------- Jurassic Pork · 2017-10-01 12:24 hello, yes it is possible but with the PlayStyle property to psAsync    No control on the music  playing with this option. to play audio files you can also try the audio libraries uos or acs. ---------------------------------------------------------------------- MVD · 2017-10-01 19:14 I get an error while installing ACS cannot find akrip32 used by acs_cdrom of package laz_acs. Where can I find it and how can I install it. ---------------------------------------------------------------------- MVD · 2017-10-01 19:59 I downloaded the missing files but now I got a compiler error in flac.pas fatal : Syntax error, "identifier" expected but "VAR" found this is a part of the flac.pas i downloaded unit flac; interface uses   {$IFDEF WIN32}    Windows, ACS_Classes;   {$ENDIF}   {$IFDEF LINUX}   dynlibs, ACS_Procs;   {$ENDIF} var    LibFLACLoaded : Boolean = False; type   {$ifdef WINDOWS}     //{$PackRecords NORMAL}   {$else}     {$ifdef LINUX}       //{$PackRecords C}       {$PackRecords 2}     {$endif}   {$endif}   unsigned = LongWord;   long = Integer; ---------------------------------------------------------------------- RAW · 2017-10-01 23:30 This is a very easy way to play your sounds or music: BASS.dll (free of charge for personal use...) If you need more take a look at NEMP MP3 PLAYER: Nice Player + full source code !!! ---------------------------------------------------------------------- Eugene Loza · 2017-10-02 04:31 You may try SoundEngine from Castle Game Engine - easy to install, cross-platform, lightweight and easy to use. https://github.com/castle-engine/castle- engine/blob/master/examples/audio/alplay.lpr You can also start/stop/fade music relatively easily. ---------------------------------------------------------------------- Jurassic Pork · 2017-10-02 05:13 hello, Quote from: MVD date=1506721915I am working in windows 10. if you are working in windows, you can use the MCI (Media Control Interface). The Media Control Interface is a high-level API developed by Microsoft and IBM for controlling multimedia peripherals connected to a Microsoft Windows. With it, you can play mp3, wav etc.. files. You have only to add the MMSystem unit in your uses. No need thirdpart units or packages or dlls. In attachment a small Lazarus project to discover how to use MCI in Lazarus. With this project : - You can play the sound files which are in a ListBox. - You can stop playing sound. - You can loop playing all the sounds. - You can load sound files from an opendialog window. In this project, i use a notify procedure. The MM_MCINOTIFY message notifies an application that an MCI device has completed an operation. You can have a long delay time between the open command and the play command. To avoid this, open your sound file for example in the form create. Then you can play the sound of the file loaded.  If you want to play more than one time this file instead of close and reopen the file, use the command seek audio to start (to "rewind" the sound if audio is your alias) Friendly, J.P ---------------------------------------------------------------------- serbod · 2017-10-02 11:20 Quote from: MVD on October 01, 2017, 09:14:07 pmI get an error while installing ACS cannot find akrip32 used by acs_cdrom of package laz_acs. Looks like, you use 64-bit Lazarus, but ACS 32 bit only. ---------------------------------------------------------------------- MVD · 2017-10-02 14:02 Quote from: serbod on October 02, 2017, 01:20:42 pmQuote from: MVD on October 01, 2017, 09:14:07 pmI get an error while installing ACS cannot find akrip32 used by acs_cdrom of package laz_acs. Looks like, you use 64-bit Lazarus, but ACS 32 bit only. I installes a 32_bit Lazarus and now it works like a charm. Thanks a lot.