Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-14 Thread Roland Schaefer
[I don't know if a previous email of similar content got through. Sorry if this is a double post.] As libsndfile has already been recommended, I would just add that the simplest and most fool-proof way of playing back audio (once you have figured out how to load it) is PortAudio. It abstracts away

Re: [fpc-pascal] Main thread wait and CheckSynchronize

2010-05-16 Thread Roland Schaefer
On 16.05.2010 16:01, Jonas Maebe wrote: > > On 14 May 2010, at 00:18, Roland Schaefer wrote: > >> Now, instead of busy waiting in the main thread loop (even with a Sleep >> inserted), I'd rather have it idle wait until another thread needs to >&g

Re: [fpc-pascal] Main thread wait and CheckSynchronize

2010-05-16 Thread Roland Schaefer
Allow me to bump this. I'd appreciate any comments, even if it's "Why on earth do you want to do that!?" or something. Thanks Roland On 14.05.2010 00:18, Roland Schaefer wrote: > Hello, > > I have a seemingly simple question which nevertheless is giving me >

[fpc-pascal] Main thread wait and CheckSynchronize

2010-05-13 Thread Roland Schaefer
Hello, I have a seemingly simple question which nevertheless is giving me headaches: I have a main thread which does nothing but [1] execute CheckSynchronize, then [2] check whether some other things have to be done as a result of the synchronization (and do those things if necessary), then go bac

[fpc-pascal] DirectFB 1.2.7 support available + question about fpc wiki

2010-04-24 Thread Roland Schaefer
a release of directfb bindings with support for both 1.4 and (new) 1.2.7 binaries (as included in ubuntu karmic, for example) is now available: http://sourceforge.net/projects/wiseslap/files/ (look for: 'fpc-directfb-1.4+1.2.7.tar.gz') anyone wishing to experiment with directfb on a standard deskt

Re: [fpc-pascal] Comedi hardware support

2010-03-31 Thread Roland Schaefer
Hello, Hartmut Eilers skrev: > Hi everybody, > > I want to support the comedi hardware lib to access > I/O hardware from my project OpenMSR. > ( http://www.comedi.org ) > I googled for anything regards that but had no success. > So I decided to write a unit which interfaces to the c library. > >

Re: [fpc-pascal] fpGUI Toolkit v0.7-rc1 for FPC 2.4

2010-03-16 Thread Roland Schaefer
On 16.03.2010 00:31, Jorge Aldo G. de F. Junior wrote: > "I'm maintaining FPC-bindings for DFB. Right now, they work with the 1.4 > line of DFB binaries only. If anyone has a need for 1.2 bindings (which > is the version that ships with most GNU/Linux distributions these days), > I'd actually provi

Re: [fpc-pascal] fpGUI Toolkit v0.7-rc1 for FPC 2.4

2010-03-14 Thread Roland Schaefer
On 14.03.2010 19:01, Graeme Geldenhuys wrote: >> You may want to look at directfb instead of working with the >> framebuffer directly. > > That is actually what I was going to look at first. As far as I > understand DirectFB is bit higher level than /dev/fb directly, so > should make implementatio

[fpc-pascal] fpcmake targets and $defines

2009-12-09 Thread Roland Schaefer
Hi, do the standard targets set up by fpcmake come with any defines which allow conditional compilation depending on the target (like extra code to be compiled only when doing 'make debug', for example)? If not, can I get fpcmake to insert defines for such symbols into the generated Makefile someho

Re: [fpc-pascal] How does inline work?

2009-11-22 Thread Roland Schaefer
Jonas Maebe wrote: > unit tt; > > interface > > {$Inline on} > type > TForm1 = class > private > procedure DebugInfo; inline; > public > procedure DoSomething; > end; > > Implementation > > procedure TForm1.DebugInfo; > begin > {$ifdef debug} >DebugInfo > {$endif} > end; > > pr

[fpc-pascal] setting a custom driver in TReader

2009-11-05 Thread Roland Schaefer
Hi, I'm wondering how to set a custom driver object for TReader instances. Both in TReader and TWriter the Driver property is read-only, but in TWriter I can at least use the alternative constructor which takes a TAbstractObjectWriter. TReader only has the constructor which takes a TStream and a b

Re: [fpc-pascal] streaming child components

2009-10-25 Thread Roland Schaefer
> The lazarus sources contain a complete example of how to write a > TComponent descendant with Parent+Childs. The class TMyWidget can > be found under examples/designnonlcl/mywidgetset.pas. Thanks a lot! This cleared things up, and it seems I mostly got it right. Best Roland

[fpc-pascal] streaming child components

2009-10-25 Thread Roland Schaefer
Hi, I have another question regarding serialization. I need to stream child components, and here: http://wiki.freepascal.org/Streaming_components it says that "TComponent extends TPersistent by the ability to have child components". The rest I figured from reading the RTL sources, and I'm wondering

Re: [fpc-pascal] streaming functions in LResources

2009-10-24 Thread Roland Schaefer
Ok, it *was* trivial, and I found it myself. Forgot to set the "Name" property. Sry Roland Roland Schaefer wrote: > Hi, > I am trying to figure out property streaming a little more in-depth and > have a question. I have just started fiddling with it, so please bear > wi

[fpc-pascal] streaming functions in LResources

2009-10-24 Thread Roland Schaefer
Hi, I am trying to figure out property streaming a little more in-depth and have a question. I have just started fiddling with it, so please bear with me if I just missed something trivial. When I use functions from LResources like WriteComponentAsBinaryToStream(MyStream,MyComponent) or CreateLFMF

[fpc-pascal] How to find the byte offset of the n-th character in an UTF-8 string?

2009-09-08 Thread Roland Schaefer
Hi all, I have a situation where I internally work with AnsiStrings but need to convert them to UTF-8 before passing them to libpango, which I do with AnsiToUtf8(). I then need the byte offset of one specific (varying) character in the UTF-8 string, which is not trivially available since some chara

[fpc-pascal] advanced macros?

2009-07-07 Thread Roland Schaefer
Hi, reading the Programmer's Manual, I get the impression that C-style macros with {$MACRO ON} cannot do things like C #define MY_MACRO(param1,param2...) code_with ( param1 && param 2 ); i.e., passing strings macros for in-macro insertion. Is this true? If yes, are there any plans to include

Re: [fpc-pascal] DirectFB for FPC beta tarball

2009-06-01 Thread Roland Schaefer
Michael Van Canneyt wrote: >> As Micha said in his reply, since Gtk can be used with DFB without X, >> you can have Lazarus w/o X anyway. > > I really doubt it: > > home: >ldd lazarus | grep libX > libX11.so.6 => /usr/lib/libX11.so.6 (0x7fe7531d8000) > libXext.so.6 => /usr/lib

Re: [fpc-pascal] DirectFB for FPC beta tarball

2009-06-01 Thread Roland Schaefer
etset for Lazarus. Is there any good starting point in the docs or the sources where I could take a look to give a more precise estimate about the required steps? Cheers Roland Michael Van Canneyt wrote: > > > On Sun, 31 May 2009, Roland Schaefer wrote: > >> Hello. There wasn

[fpc-pascal] DirectFB for FPC beta tarball

2009-05-31 Thread Roland Schaefer
Hello. There wasn't much feedback to our previous anouncement. Anyway, now there is an FPC-DirectFB tarball which can be downloaded from our SourceForge page: http://sourceforge.net/projects/wiseslap/ Please have DFB 1.0.1 or higher installed. One sample program is included. The known major bugs o

[fpc-pascal] DirectFB for FPC (SVN)

2009-04-28 Thread Roland Schaefer
Hello everyone, first of all, since I'm new to the list, I'd like to say my official hello. FPC is great, and it has recently contributed to renewing my interest in Pascal. Thanks to everyone involved! In our spare time, a friend and I are now working on a small lightweight toolkit, called WiSeSL