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

2012-06-14 Thread Graeme Geldenhuys
Hi, On 14 June 2012 02:19, silvioprog silviop...@gmail.com wrote: Y!! Worked fine with this demo in attached! Glad you got it working in the end. I found this demo in: ...and if you look carefully, my sample code called the exact same SDL API's in the

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

2012-06-13 Thread Graeme Geldenhuys
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

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

2012-06-13 Thread Graeme Geldenhuys
On 13 June 2012 11:36, silvioprog silviop...@gmail.com wrote: With: {.$define UseMusic} I do not hear sound ... :/ I don't know what to say, other than It works here - with or without the UseMusic define. And as I mentioned, we have a project that uses SDL a lot, on Linux and Windows,

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

2012-06-12 Thread Ludo Brands
Where do I find the openal_nt unit? unit1.pas(9,3) Fatal: Can not find unit openal_nt used by Unit1. At the bottom of the forum page is a link to a complete demo project openaltest.zip that includes the units laz_openal and OpenAL_NT. Ludo ___

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

2012-06-12 Thread Reinier Olislagers
On 9-6-2012 23:18, Jorge Aldo G. de F. Junior wrote: You can use OpenAL or SDL... Found a framework that apparently uses SDL. Says it plays OGG and WAV. Haven't tried it.. https://github.com/freezedev/elysion Regards, Reinier ___ fpc-pascal maillist

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

2012-06-12 Thread michael . vancanneyt
On Tue, 12 Jun 2012, Reinier Olislagers wrote: On 9-6-2012 23:18, Jorge Aldo G. de F. Junior wrote: You can use OpenAL or SDL... Found a framework that apparently uses SDL. Says it plays OGG and WAV. Haven't tried it.. https://github.com/freezedev/elysion SDL is so easy, it's hardly

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

2012-06-12 Thread Graeme Geldenhuys
On 12 June 2012 09:49, michael.vancann...@wisa.be wrote: SDL is so easy, it's hardly necessary to create a wrapper. +1 And because SDL is a cross platform framework, there is nothing special to do in your code to get it to work on multiple platforms. -- Regards,   - Graeme -

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

2012-06-12 Thread silvioprog
2012/6/12 Graeme Geldenhuys graemeg.li...@gmail.com: On 12 June 2012 09:49,  michael.vancann...@wisa.be wrote: SDL is so easy, it's hardly necessary to create a wrapper. +1 And because SDL is a cross platform framework, there is nothing special to do in your code to get it to work on

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

2012-06-12 Thread Graeme Geldenhuys
On 12 June 2012 16:17, silvioprog silviop...@gmail.com wrote: So, how to play audio (wav/mp3) with only SDL framework in Free Pascal? Simply reading a SDL tutorial or two, will quickly let you understand the following code. TSoundEngine is just an convenience class we created to add extra

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

2012-06-12 Thread silvioprog
2012/6/12 Graeme Geldenhuys graemeg.li...@gmail.com: On 12 June 2012 16:17, silvioprog silviop...@gmail.com wrote: So, how to play audio (wav/mp3) with only SDL framework in Free Pascal? Simply reading a SDL tutorial or two, will quickly let you understand the following code. TSoundEngine

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

2012-06-11 Thread luciano de souza
I took a look in Openal examples. I need to confess that I expected something easier. Perhaps, something like: PlaySound('file.wav', 0) In MMSystem, we have something like that, but it's not cross platform. The examples present hundreds of lines. It's something frightful! Regarding the

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

2012-06-11 Thread Ludo Brands
I took a look in Openal examples. I need to confess that I expected something easier. Perhaps, something like: PlaySound('file.wav', 0) In MMSystem, we have something like that, but it's not cross platform. The examples present hundreds of lines. It's something frightful! Regarding

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

2012-06-11 Thread Ludo Brands
On the lazarus forum, kpjcomp made a wrapper for Openal. Forgot the link: http://www.lazarus.freepascal.org/index.php/topic,17164.msg94588.html#msg945 88 Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

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

2012-06-11 Thread Michalis Kamburelis
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

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

2012-06-11 Thread silvioprog
Hello, Please see this demo too: https://github.com/silvioprog/lazsolutions/tree/master/Demos/LSPlayWAV It is a cross function to play wav files. -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist -

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

2012-06-11 Thread silvioprog
2012/6/11 Ludo Brands ludo.bra...@free.fr: [...] On the lazarus forum, kpjcomp made a wrapper for Openal. Haven't tested it but his example code is as simple as:  openAl := TLazOpenAL.Create;  wav1 := TLazOpenALWavFileSource.Create('drumloop.wav');  wav1.looping := true;  

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

2012-06-11 Thread silvioprog
2012/6/11 Michalis Kamburelis michalis.ka...@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

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

2012-06-11 Thread Michalis Kamburelis
silvioprog wrote: Nice project. :) castle_game_engine-3.0.0-src.zip = +-70MB. Most of the size comes from the examples, they contain also example 3D data files (models, animations etc.). I prefer to give people full package :) For those who want to get parts, they can always check out

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

2012-06-11 Thread silvioprog
2012/6/11 Michalis Kamburelis michalis.ka...@gmail.com: silvioprog wrote: Nice project. :) castle_game_engine-3.0.0-src.zip = +-70MB. Most of the size comes from the examples, they contain also example 3D data files (models, animations etc.). I prefer to give people full package :) For