thanks a lot for quick response.
Yes, you are right, the proper way of opening files is quite different, from what you can find in that code, Victor Lazzarini, has succesfully rewritten the files to make them more simple in use.
This is the function prototype, that you could not find:

SNDFILE *soundin_open(char* name, int chans, float sr){
SF_INFO info;
SNDFILE *sf = sf_open(name, SFM_READ, &info);
*sr = (float) info.samplerate;
*chans = info.channels;
return sf;

I am sorry, that I did not write it before.
Your code seems to be very interesting to me, but I do not understand one thing in it.
how you know, or determine, the size of psfout in that do loop? it is pointer, isn't it?
I can not compile such a solution, because of the error:
error C2036: 'SNDFILE *' : unknown size
I think this is related to the psfout...

count1 = sf_readf_float(psfin, buffer1, 1024);
if(count1 <= 0)
sf_writef_float(psfout, buffer1, count1);
psfout += count1;

thank you very much...