mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-03 16:01:18 -05:00
2b1a57aa0e
to enable compiling MAP65.EXE under Windows, using gcc and g95. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@594 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
31 lines
639 B
C
31 lines
639 B
C
#include <stdio.h>
|
|
//#ifdef Win32
|
|
#include "samplerate.h"
|
|
//#else
|
|
//#include <samplerate.h>
|
|
//#endif
|
|
|
|
int resample_(float din[], int *jzin, int *conv_type, int *channels,
|
|
double *samfac, float dout[], int *jzout)
|
|
{
|
|
SRC_DATA src_data;
|
|
int input_len;
|
|
int output_len;
|
|
int ierr;
|
|
double src_ratio;
|
|
|
|
src_ratio=*samfac;
|
|
input_len=*jzin;
|
|
output_len=(int) (input_len*src_ratio);
|
|
|
|
src_data.data_in=din;
|
|
src_data.data_out=dout;
|
|
src_data.src_ratio=src_ratio;
|
|
src_data.input_frames=input_len;
|
|
src_data.output_frames=output_len;
|
|
|
|
ierr=src_simple(&src_data,*conv_type,*channels);
|
|
*jzout=output_len;
|
|
return ierr;
|
|
}
|