2015-09-09 Fred Gleason <fredg@paravelsystems.com>

* Added 'src_float_to_int()' and 'src_int_to_float()' functions in
	'cae/cae.cpp' and 'cae/cae.h'.
This commit is contained in:
Fred Gleason
2015-09-09 10:39:11 -04:00
parent 88d32bc856
commit 97581a04dd
3 changed files with 25 additions and 0 deletions

View File

@@ -14878,3 +14878,6 @@
'cae/cae_alsa.cpp' and 'cae/cae.h'.
2015-09-08 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 2.10.3pcm24.1.
2015-09-09 Fred Gleason <fredg@paravelsystems.com>
* Added 'src_float_to_int()' and 'src_int_to_float()' functions in
'cae/cae.cpp' and 'cae/cae.h'.

View File

@@ -57,6 +57,23 @@ extern jack_client_t *jack_client;
#define PRINT_COMMANDS
#ifndef HAVE_SRC_CONV
void src_int_to_float_array (const int *in, float *out, int len)
{
for(int i=0;i<len;i++) {
out[i]=(double)in[i]/2147483648.0;
}
}
void src_float_to_int_array (const float *in, int *out, int len)
{
for(int i=0;i<len;i++) {
out[i]=(int)(in[i]*2147483648.0);
}
}
#endif // HAVE_SRC_CONV
void LogLine(RDConfig::LogPriority prio,const QString &line)
{
FILE *file;

View File

@@ -79,6 +79,11 @@ struct alsa_format {
#include <rdconfig.h>
#include <rdstation.h>
#ifndef HAVE_SRC_CONV
void src_int_to_float_array (const int *in, float *out, int len);
void src_float_to_int_array (const float *in, int *out, int len);
#endif // HAVE_SRC_CONV
//
// Debug Options
//