First of all, i will only suggest several thing which you can do, trial and error basis.

By looking at your code, soundout_open, i dont know in what mode this function opening the output file. To open a output file there are several mode, in your case it will be append.

So mostprobably its opening that file only in write mode, which actually re-write the entire file.

First thing i will try, is take that function out of the first loop and call only once.

if(!(psfout = soundout_open("out.wav"))){ cout << "error opening output file\n" << endl; exit(-1);}
	else cout << "soubor <out.wav> otevren pro psani" << endl;

for(int i=0; i<n; i++){

   /*Open input file one by one and write to that output file*/

second thing i might try ( if the last one doesnt solve the issue ) is i wont use f_seek as, you are not closting file in the loop. I would do something like this:
           do {
		count1 = sf_readf_float(psfin, buffer1, def_len);
                                if(count1 <= 0)
		sf_writef_float(psfout, buffer1, count1);
                                psfout += count;
last thing is: I was looking at the library functions you are using and i didnt find the function you are using to open the sound files.

I found this one:
SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;

You may use this one with proper mode, but i am in doubt whether its solve your issue.