On 13 June 2012 04:26, silvioprog <silviop...@gmail.com> wrote:
>
> I tried playing a wav file with this demo in attached, no errors, but
> no sound came out. :(


You are releasing the TSoundEngine instance to quickly, and don't give
SDL chance to initialize fully and play the sound. Simply add a
sleep(1000)  call [just for demonstration purposes] after you called
PlayingStart(), then you will hear the sound.

A better idea would be to change your code as the attached unit. Keep
the TSoundEngine instance in the form (or as a global variable), so
then playing any sounds are instant.


-- 
Regards,
  - Graeme -


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

Attachment: unit1.pas
Description: Binary data

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

Reply via email to