[fpc-pascal] Adding a array of float in ressource and use it ?

fredvs fiens at hotmail.com
Wed Mar 8 12:47:07 CET 2017

> The first says that 8-bit is unsigned, the second says signed.
> The first does not mention floats, the second says 32-bits but only -1.0
> to 1.0.

Yes wav is nebulous and this site:


says it must set the wFormat tag in the 'fmt' chunk to

I have try but this does not work.

For recording, I will use a "custom" pcm format, using array of float
(because with fpc we are not afraid to use float).

Thanks for infos.

> @Fredvs: If your wav is noise in audacity the reason is quite sure 
> because you are writing float audio buffer with a wav 

Ho, it is not a problem, I knew that wav file prefer integers.
It was to see what Audacious has in his body.
For example, with Audacious you can export wav only as 16 bit.

But, now that I have full access to the samples, that fpc deals perfectly
array of float in TFileStream, there is no more reason to save the recording
into wav format. I will use my own one. 32 bit float. 

> I can't you have spreading incorrect information on C, can I? ;) 

Maybe but what I think is that C people always want to make things
And they should, IMO, sometimes think more "Pascalish".
The code of Sven is a perfect example.
He gives the easy-working solution in Pascal code and then translate the
pascal code into C.
And it works for c. And all other c solutions I did found on the web were
complicate-not-clear-not-working solutions, with lot of conversions.
If they could take a look at Sven code ---> 3 lines and it works.


Many thanks ;-)
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Adding-a-array-of-float-in-ressource-and-use-it-tp5727765p5727816.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

More information about the fpc-pascal mailing list