[fpc-pascal] Is TEventobject obsolete?
Hi all, I have a doubt about Basicevent and RTLevent, according to the documentation Basicevent is obsolete and I should use RTLevent instead. I use most of the time Rtlevent but now I need to know the result of WaitFor (signaled, timeout, ect). Rtlevent don't provide this, instead TEventobject in syncobjs does it. The problem is that TEventobject is based on Basicevent, at least in fpc 2.6.1. This means that TEventobject is obsolete also? What should I do to have Events with return result in Wait calls? Thank you in advance and sorry for my poor english. Regards. -- Victor Campillo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] buffered filestream
On Sun, 10 Jun 2012 19:02:52 +0200 Martin Schreiber wrote: > On Sunday 10 June 2012 15:00:20 Mattias Gaertner wrote: > > Hi, > > > > Is there already a buffered file stream in the fpc sources? > > Or maybe a generic buffered input stream that can be used with > > TFileStream? > > > MSEgui has a bufstream too: tcustombufstream in > lib/common/kernel/msestream.pas, I don't know if it fits your needs. Looks promising. :) Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] fpimage reader for jpeg2000
Hi, Has someone already implemented a fpimage reader for jpeg2000? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpimage reader for jpeg2000
In our previous episode, Mattias Gaertner said: > Has someone already implemented a fpimage reader for jpeg2000? Not that I know. I once looked into it, but it seemed a rather big chunk. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Unit initialization in dll initialization for arm/WinCE
Hello all, Does unit initialization in libraries (.dll files) work in arm/WinCE? Somehow it seems that even code placed in the library initialization begin end block isn't executed either. I found some bug reports (e.g. 0019404) suggesting that this didn't work for arm/Linux but it has been added to the trunk. But not for arm/WinCE? If this is the case, is there a feasible workaround to call unit initialization sections manually? I am not statically linking the libraries by means of "external" clauses but I am using LoadLibrary() and GetProcAddress() to communicate with the dll from the exe, so I could create an exported function in the dll and call it manually from the exe after loading if I could somehow iterate in it the unit initialization sections and call them. Thank you in advance. Constantine. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Unit initialization in dll initialization for arm/WinCE
Am 11.06.2012 12:25, schrieb kyan: Does unit initialization in libraries (.dll files) work in arm/WinCE? From the startup code of arm-wince I don't see why it should not work... Somehow it seems that even code placed in the library initialization begin end block isn't executed either. How did you test this? I found some bug reports (e.g. 0019404) suggesting that this didn't work for arm/Linux but it has been added to the trunk. But not for arm/WinCE? Linux and Windows have different schemes for library initialization, so even if it was the case that arm-wince did not work it would not help to apply the fix for arm-linux there as well. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Playing sounds with standard components
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 complexity, probably is's possible to do much more than simply play a sound. In spite of that, it would be intersting to have something easier. The examples work with complex and for me, abstract structures. Which kind of content, do I need to study to understand Openal or SDL? 2012/6/9, luciano de souza : > Hello all, > > Bass is a very good library for sound playing and recording. However, > it's not included as an standard feature of Freepascal. For whom wich > wants to work with standard components, are there other options: (1) > to play sounds and (2) to record sounds? > > Regards, > Luciano > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
RE : [fpc-pascal] Re: Playing sounds with standard components
> 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 complexity, probably is's possible to do much > more than simply play a sound. In spite of that, it would be > intersting to have something easier. > > The examples work with complex and for me, abstract > structures. Which kind of content, do I need to study to > understand Openal or SDL? > 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; openal.SourceList.Add(wav1); wav2 := TLazOpenALWavFileSource.Create('chimes.wav'); openal.SourceList.Add(wav2); wav1.play; wav2.play; Perhaps worth looking at. Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
RE : RE : [fpc-pascal] Re: Playing sounds with standard components
> 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 http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Playing sounds with standard components
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 have SoundEngine wrapper, with which you can play sound like Buffer := SoundEngine.LoadBuffer(FileName); SoundEngine.PlaySound(Buffer, false, ...); See working example in SVN on http://svn.code.sf.net/p/castle-engine/code/trunk/castle_game_engine/examples/audio/alplay.lpr You may want to look at the source (LGPL) to see how it's done :) Michalis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Playing sounds with standard components
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 - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: RE : [fpc-pascal] Re: Playing sounds with standard components
2012/6/11 Ludo Brands : [...] > 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; > openal.SourceList.Add(wav1); > > wav2 := TLazOpenALWavFileSource.Create('chimes.wav'); > openal.SourceList.Add(wav2); > > wav1.play; > wav2.play; > > Perhaps worth looking at. > > Ludo Hello Ludo. :) Where do I find the openal_nt unit? unit1.pas(9,3) Fatal: Can not find unit openal_nt used by Unit1. -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Playing sounds with standard components
2012/6/11 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 have > SoundEngine wrapper, with which you can play sound like > > Buffer := SoundEngine.LoadBuffer(FileName); > SoundEngine.PlaySound(Buffer, false, ...); > > See working example in SVN on > http://svn.code.sf.net/p/castle-engine/code/trunk/castle_game_engine/examples/audio/alplay.lpr > > You may want to look at the source (LGPL) to see how it's done :) > > Michalis Nice project. :) castle_game_engine-3.0.0-src.zip = +-70MB. Hm... you could send only the files to play audio? :/ -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Playing sounds with standard components
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 appropriate directories from SVN. Hm... you could send only the files to play audio? :/ The directories src/base/ and src/audio/ from the engine source code should be all you need. And examples inside examples/audio/, and examples/3d_sound_game/ (only in SVN), are probably useful :) Note that if you only get a subset of src/ directories, you will need to prepare also special Lazarus package to compile them (as the default package inside packages/castle_base.lpk includes other units, to deal with 3D, images, scripting and such), or compile only with ./xxx_compile.sh scripts (Unix or Cygwin required). It will be easier to just get the full zip/tar.gz archive, and simply ignore (don't look inside :) directories that don't interest you :) Michalis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Playing sounds with standard components
2012/6/11 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 appropriate > directories from SVN. > >> Hm... you could send only the files to play audio? :/ > > > The directories src/base/ and src/audio/ from the engine source code should > be all you need. And examples inside examples/audio/, and > examples/3d_sound_game/ (only in SVN), are probably useful :) Note that if > you only get a subset of src/ directories, you will need to prepare also > special Lazarus package to compile them (as the default package inside > packages/castle_base.lpk includes other units, to deal with 3D, images, > scripting and such), or compile only with ./xxx_compile.sh scripts (Unix or > Cygwin required). It will be easier to just get the full zip/tar.gz archive, > and simply ignore (don't look inside :) directories that don't interest you > :) > > Michalis Does not seem very easy to use hehehe.., but I will try test it later. :) Thx Michalis! ^^ -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal