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

2010-06-16 Thread Vit Kavan
On Tue, Jun 15, 2010 at 10:28 AM, Henry Vermaak wrote: > On 15 June 2010 08:37, Alexander Grau wrote: > > > > For Linux, I think it can be simple as opening a file and writing the raw > > audio data to it - using a simple WAV header reader or even an MP3 > decoder > > for FPC, it should be possib

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

2010-06-15 Thread Michalis Kamburelis
Graeme Geldenhuys wrote: I can't find an example for loading a .wav file. [...] Any hints or sample code. The sample included in FCL 2.4.1 loads MAD, A52, OGG and ModPlug only. Google revealed a tutorial using AlutLoadWavFile(), but that is in the "unofficial utilities library", it's not part

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

2010-06-15 Thread dmitry boyarintsev
On Tue, Jun 15, 2010 at 3:29 PM, Graeme Geldenhuys wrote: > I can't find an example for loading a .wav file. I managed to extract the > initialization and finalization code for OpenAL from the FCL examples, but > now the main part is the call  alSourcePlay(buffer) , but I don't know how > to popul

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

2010-06-15 Thread Graeme Geldenhuys
Op 2010-06-15 13:30, vt...@volny.cz het geskryf: > If you can wait a few days, I'll extract a working windows/linux demo > from my sourcode for you. Right now I'm really busy. That would be great thanks. I can wait... the sound support is for a new project that has no official starting date yet.

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

2010-06-15 Thread vtech
If you can wait a few days, I'll extract a working windows/linux demo from my sourcode for you. Right now I'm really busy. - PŮVODNÍ ZPRÁVA - Od: "Graeme Geldenhuys" Komu: "FPC-Pascal users discussions" Předmět: Re: [fpc-pascal] playing sound files (linux

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

2010-06-15 Thread Graeme Geldenhuys
Op 2010-06-14 18:28, dmitry boyarintsev het geskryf: > > There's proper example in FCL how to use OpenAL to play .wav, .ogg .mp3 files. I can't find an example for loading a .wav file. I managed to extract the initialization and finalization code for OpenAL from the FCL examples, but now the main

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

2010-06-15 Thread Graeme Geldenhuys
Some more feedback. I found ACS in Lazarus wiki sight and in Lazarus-CCR subversion repository. This is very old and outdated. It requires libc (kylix compatibility) unit and is x86 and 32-bit only. It has some ASM code in there (yuck!). So this was a non-starter for me. Regards, - Graeme - --

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

2010-06-15 Thread Graeme Geldenhuys
Op 2010-06-14 18:26, Vladimir Zhirov het geskryf: > > One more option I know of is Audorra (http://audorra.sourceforge.net/). > I have not used it though, so no idea about its advantages/drawbacks. Some feedback for general FPC users thinking of using Audorra. It's 32-bit only and after some hac

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

2010-06-15 Thread Henry Vermaak
On 15 June 2010 09:30, Marco van de Voort wrote: > In our previous episode, Henry Vermaak said: >> >> > I think for getting a simple playSoundFile() API to FPC/LCL on all >> > platforms, dependencies to 3rd-party libs can be avoided. >> >> If you want you program to be a good desktop citizen, you

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

2010-06-15 Thread Marco van de Voort
In our previous episode, Henry Vermaak said: > > > I think for getting a simple playSoundFile() API to FPC/LCL on all > > platforms, dependencies to 3rd-party libs can be avoided. > > If you want you program to be a good desktop citizen, you should talk > directly to the sound daemon (pulse on gn

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

2010-06-15 Thread Henry Vermaak
On 15 June 2010 08:37, Alexander Grau wrote: > > For Linux, I think it can be simple as opening a file and writing the raw > audio data to it - using a simple WAV header reader or even an MP3 decoder > for FPC, it should be possible to directly use the sound device  (/dev/dsp): Note that OSS is d

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

2010-06-15 Thread Henry Vermaak
On 15 June 2010 07:44, Graeme Geldenhuys wrote: > Op 2010-06-14 15:37, Graeme Geldenhuys het geskryf: >> >> Has anybody managed to play sound files under both Linux and Windows? > > Thanks for everybody's responses. I'll work my way through all of them > today. Now I understand all the comments on

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

2010-06-15 Thread Alexander Grau
dmitry boyarintsev schrieb: On Tue, Jun 15, 2010 at 11:37 AM, Alexander Grau wrote: This is not the most elegant (or easiest) solution, however it has no dependencies to any libraries :) The solution still depends upon decompression libraries. However, they can be statically linked.

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

2010-06-15 Thread dmitry boyarintsev
On Tue, Jun 15, 2010 at 11:37 AM, Alexander Grau wrote: > This is not the most elegant (or easiest) solution, however it has no > dependencies to any libraries :) The solution still depends upon decompression libraries. However, they can be statically linked. thanks, dmitry _

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

2010-06-15 Thread Alexander Grau
Graeme Geldenhuys schrieb: On 14/06/2010, Alexander Grau wrote: If someone would like to add a PlaySoundFile API to LCL/FPC, drop me a note and we will donate the Mac code for it :-) ... Thanks for that. A quick test removing the SND_ASYNC option plays multiple sound files in quick suc

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

2010-06-15 Thread dmitry boyarintsev
On Tue, Jun 15, 2010 at 10:44 AM, Graeme Geldenhuys wrote: > Op 2010-06-14 15:37, Graeme Geldenhuys het geskryf: > Has anybody tried SDL (Simple-Direct-Media)?  I know SDL Graphics works > well with Free Pascal, but not sure about the Audio part. Audio works just fine. You can use SDL_Mixer libra

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

2010-06-14 Thread Graeme Geldenhuys
Op 2010-06-14 15:37, Graeme Geldenhuys het geskryf: > > Has anybody managed to play sound files under both Linux and Windows? Thanks for everybody's responses. I'll work my way through all of them today. Now I understand all the comments on the net about the state of audio (and gaming) on Linux.

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

2010-06-14 Thread Graeme Geldenhuys
Op 2010-06-14 17:31, Henry Vermaak het geskryf: > > Note that the fpc libsndfile example is outdated (it uses oss). There Outdated is correct. The version in FPC 2.4.1 doesn't currently compile, and references data structures not defined in the libsndfile unit. I have a ESD (Esound daemon) head

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

2010-06-14 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > Has anybody managed to play sound files under both Linux and Windows? > Does FPC have a cross-platform API or FCL class for this? > > If so, what sound format's are supported? ogg, wav, mp3? KDE's phonon also has OS X and Windows packages: h

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] playing sound files (linux and windows)

2010-06-14 Thread Ingemar Ragnemalm
dmitry boyarintsev wrote: On Mon, Jun 14, 2010 at 5:37 PM, Graeme Geldenhuys wrote: Has anybody managed to play sound files under both Linux and Windows? Does FPC have a cross-platform API or FCL class for this? I'd offer using OpenAL, however it requires proper libraries to be installed o

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

2010-06-14 Thread Vladimir Zhirov
> Has anybody managed to play sound files under both Linux and Windows? One more option I know of is Audorra (http://audorra.sourceforge.net/). I have not used it though, so no idea about its advantages/drawbacks. -- Regards, Vladimir Zhirov ___ fpc-pa

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

2010-06-14 Thread dmitry boyarintsev
On Mon, Jun 14, 2010 at 5:37 PM, Graeme Geldenhuys wrote: > Has anybody managed to play sound files under both Linux and Windows? > Does FPC have a cross-platform API or FCL class for this? I'd offer using OpenAL, however it requires proper libraries to be installed on Linux (afaik installed by de

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

2010-06-14 Thread Schindler Karl-Michael
Hi Graeme Am 14.06.2010 um 15:37 schrieb Graeme Geldenhuys: > Hi, > > Has anybody managed to play sound files under both Linux and Windows? > Does FPC have a cross-platform API or FCL class for this? UltraStarDeluxe uses ffmpeg for decoding and portaudio, a C library, for playback of the strea

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

2010-06-14 Thread Henry Vermaak
On 14 June 2010 15:59, Graeme Geldenhuys wrote: > On 14/06/2010, Alexander Grau wrote: >> >> If someone would like to add a PlaySoundFile API to LCL/FPC, drop me a >> note and we will donate the Mac code for it :-) ... > > Thanks for that. A quick test removing the SND_ASYNC option plays > multipl

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

2010-06-14 Thread Graeme Geldenhuys
On 14/06/2010, Alexander Grau wrote: > > If someone would like to add a PlaySoundFile API to LCL/FPC, drop me a > note and we will donate the Mac code for it :-) ... Thanks for that. A quick test removing the SND_ASYNC option plays multiple sound files in quick succession - just what I wanted. I'

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

2010-06-14 Thread Alexander Grau
Graeme Geldenhuys schrieb: Hi, Has anybody managed to play sound files under both Linux and Windows? Does FPC have a cross-platform API or FCL class for this? If so, what sound format's are supported? ogg, wav, mp3? We have developed some kind of API to play a .wav file on both Windows an

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

2010-06-14 Thread Henry Vermaak
On 14 June 2010 14:37, Graeme Geldenhuys wrote: > Hi, > > Has anybody managed to play sound files under both Linux and Windows? > Does FPC have a cross-platform API or FCL class for this? fpc has bindings for libsndfile, which according to the website can read/write wav and ogg, among others. He