removed _X and _Y symbols from aflibConverter files, which caused

a naming collision on Solaris
This commit is contained in:
darkeye 2004-02-15 12:25:14 +00:00
parent 21f3ad142e
commit f6c57ac8a8
5 changed files with 35 additions and 28 deletions

View File

@ -19,4 +19,5 @@ with contributions by:
John Hay <jhay@icomtek.csir.co.za> John Hay <jhay@icomtek.csir.co.za>
Christian Forster <forster@like.e-technik.uni-erlangen.de> Christian Forster <forster@like.e-technik.uni-erlangen.de>
John Deeny <taqueso@dilapidated.org> John Deeny <taqueso@dilapidated.org>
Robert Lunnon <bobl@optushome.com.au>

View File

@ -5,6 +5,9 @@ DarkIce next release
o added fix to enable downsampling from stereo to mono of mp3 streams o added fix to enable downsampling from stereo to mono of mp3 streams
when streaming to an icecast2 server. thanks to John Deeny when streaming to an icecast2 server. thanks to John Deeny
<taqueso@dilapidated.org> <taqueso@dilapidated.org>
o removed _X and _Y symbols from aflibConverter files, which caused
a naming collision on Solaris. thanks to Robert Lunnon,
<bobl@optushome.com.au>
07-01-2004: DarkIce 0.13.2 released 07-01-2004: DarkIce 0.13.2 released

View File

@ -1,4 +1,4 @@
.TH darkice 1 "January 7, 2004" "DarkIce" "DarkIce live audio streamer" .TH darkice 1 "February 15, 2004" "DarkIce" "DarkIce live audio streamer"
.SH NAME .SH NAME
darkice \- an icecast / shoutcast live audio streamer darkice \- an icecast / shoutcast live audio streamer
.SH SYNOPSIS .SH SYNOPSIS
@ -85,6 +85,9 @@ Developed with contributions by
Atsuhiko Yamanaka <ymnk@jcraft.com> Atsuhiko Yamanaka <ymnk@jcraft.com>
Ricardo Galli <gallir@uib.es> Ricardo Galli <gallir@uib.es>
John Hay <jhay@icomtek.csir.co.za> John Hay <jhay@icomtek.csir.co.za>
Christian Forster <forster@like.e-technik.uni-erlangen.de>
John Deeny <taqueso@dilapidated.org>
Robert Lunnon <bobl@optushome.com.au>
.SH LINKS .SH LINKS
Project homepage: Project homepage:

View File

@ -123,8 +123,8 @@ aflibConverter::aflibConverter(
largeFilter = high_quality; largeFilter = high_quality;
linearInterp = linear_interpolation; linearInterp = linear_interpolation;
_X = NULL; _I = NULL;
_Y = NULL; _J = NULL;
_vol = 1.0; _vol = 1.0;
} }
@ -140,19 +140,19 @@ aflibConverter::deleteMemory()
int i; int i;
// Delete memory for the input and output arrays // Delete memory for the input and output arrays
if (_X != NULL) if (_I != NULL)
{ {
for (i = 0; i < _nChans; i++) for (i = 0; i < _nChans; i++)
{ {
delete [] _X[i]; delete [] _I[i];
_X[i] = NULL; _I[i] = NULL;
delete [] _Y[i]; delete [] _J[i];
_Y[i] = NULL; _J[i] = NULL;
} }
delete [] _X; delete [] _I;
_X = NULL; _I = NULL;
delete [] _Y; delete [] _J;
_Y = NULL; _J = NULL;
} }
} }
@ -180,15 +180,15 @@ aflibConverter::initialize(
_vol = volume; _vol = volume;
// Allocate all new memory // Allocate all new memory
_X = new short * [_nChans]; _I = new short * [_nChans];
_Y = new short * [_nChans]; _J = new short * [_nChans];
for (i = 0; i < _nChans; i++) for (i = 0; i < _nChans; i++)
{ {
// Add extra to allow of offset of input data (Xoff in main routine) // Add extra to allow of offset of input data (Xoff in main routine)
_X[i] = new short[IBUFFSIZE + 256]; _I[i] = new short[IBUFFSIZE + 256];
_Y[i] = new short[(int)(((double)IBUFFSIZE)*_factor)]; _J[i] = new short[(int)(((double)IBUFFSIZE)*_factor)];
memset(_X[i], 0, sizeof(short) * (IBUFFSIZE + 256)); memset(_I[i], 0, sizeof(short) * (IBUFFSIZE + 256));
} }
} }
@ -467,7 +467,7 @@ aflibConverter::resampleFast( /* number of output samples returned */
do { do {
if (!last) /* If haven't read last sample yet */ if (!last) /* If haven't read last sample yet */
{ {
last = readData(inCount, inArray, _X, last = readData(inCount, inArray, _I,
IBUFFSIZE, (int)Xread,first_pass); IBUFFSIZE, (int)Xread,first_pass);
first_pass = FALSE; first_pass = FALSE;
if (last && (last-Xoff<Nx)) { /* If last sample has been read... */ if (last && (last-Xoff<Nx)) { /* If last sample has been read... */
@ -487,7 +487,7 @@ aflibConverter::resampleFast( /* number of output samples returned */
orig_Nx = Nx; orig_Nx = Nx;
Time2 = _Time; Time2 = _Time;
/* Resample stuff in input buffer */ /* Resample stuff in input buffer */
Nout=SrcLinear(_X[c],_Y[c],_factor,&Time2,orig_Nx,maxOutput); Nout=SrcLinear(_I[c],_J[c],_factor,&Time2,orig_Nx,maxOutput);
} }
Nx = orig_Nx; Nx = orig_Nx;
_Time = Time2; _Time = Time2;
@ -504,7 +504,7 @@ aflibConverter::resampleFast( /* number of output samples returned */
for (c = 0; c < _nChans; c++) for (c = 0; c < _nChans; c++)
{ {
for (i=0; i<IBUFFSIZE-Xp+Xoff; i++) { /* Copy part of input signal */ for (i=0; i<IBUFFSIZE-Xp+Xoff; i++) { /* Copy part of input signal */
_X[c][i] = _X[c][i+Xp-Xoff]; /* that must be re-used */ _I[c][i] = _I[c][i+Xp-Xoff]; /* that must be re-used */
} }
} }
if (last) { /* If near end of sample... */ if (last) { /* If near end of sample... */
@ -526,7 +526,7 @@ aflibConverter::resampleFast( /* number of output samples returned */
for (c = 0; c < _nChans; c++) for (c = 0; c < _nChans; c++)
for (i = 0; i < Nout; i++) for (i = 0; i < Nout; i++)
outArray[c * outCount + i + Ycount - Nout] = _Y[c][i]; outArray[c * outCount + i + Ycount - Nout] = _J[c][i];
total_inCount += Nx; total_inCount += Nx;
@ -583,7 +583,7 @@ aflibConverter::resampleWithFilter( /* number of output samples returned */
do { do {
if (!last) /* If haven't read last sample yet */ if (!last) /* If haven't read last sample yet */
{ {
last = readData(inCount, inArray, _X, last = readData(inCount, inArray, _I,
IBUFFSIZE, (int)Xread,first_pass); IBUFFSIZE, (int)Xread,first_pass);
first_pass = FALSE; first_pass = FALSE;
if (last && (last-Xoff<Nx)) { /* If last sample has been read... */ if (last && (last-Xoff<Nx)) { /* If last sample has been read... */
@ -604,11 +604,11 @@ aflibConverter::resampleWithFilter( /* number of output samples returned */
Time2 = _Time; Time2 = _Time;
/* Resample stuff in input buffer */ /* Resample stuff in input buffer */
if (_factor >= 1) { /* SrcUp() is faster if we can use it */ if (_factor >= 1) { /* SrcUp() is faster if we can use it */
Nout=SrcUp(_X[c],_Y[c],_factor, Nout=SrcUp(_I[c],_J[c],_factor,
&Time2,Nx,maxOutput,Nwing,LpScl,Imp,ImpD,interpFilt); &Time2,Nx,maxOutput,Nwing,LpScl,Imp,ImpD,interpFilt);
} }
else { else {
Nout=SrcUD(_X[c],_Y[c],_factor, Nout=SrcUD(_I[c],_J[c],_factor,
&Time2,Nx,maxOutput,Nwing,LpScl,Imp,ImpD,interpFilt); &Time2,Nx,maxOutput,Nwing,LpScl,Imp,ImpD,interpFilt);
} }
} }
@ -642,7 +642,7 @@ aflibConverter::resampleWithFilter( /* number of output samples returned */
{ {
for (i = 0; i < Nout; i++) for (i = 0; i < Nout; i++)
{ {
outArray[c * outCount + i + Ycount - Nout] = _Y[c][i]; outArray[c * outCount + i + Ycount - Nout] = _J[c][i];
} }
} }
@ -651,7 +651,7 @@ aflibConverter::resampleWithFilter( /* number of output samples returned */
for (c = 0; c < _nChans; c++) for (c = 0; c < _nChans; c++)
{ {
for (i=0; i<IBUFFSIZE-act_incount+Xoff; i++) { /* Copy part of input signal */ for (i=0; i<IBUFFSIZE-act_incount+Xoff; i++) { /* Copy part of input signal */
_X[c][i] = _X[c][i+act_incount]; /* that must be re-used */ _I[c][i] = _I[c][i+act_incount]; /* that must be re-used */
} }
} }
Xread = IBUFFSIZE - Nx; /* Pos in input buff to read new data into */ Xread = IBUFFSIZE - Nx; /* Pos in input buff to read new data into */

View File

@ -222,8 +222,8 @@ static short LARGE_FILTER_IMP[];
bool interpFilt; bool interpFilt;
bool largeFilter; bool largeFilter;
bool linearInterp; bool linearInterp;
short ** _X; short ** _I;
short ** _Y; short ** _J;
unsigned int _Time; unsigned int _Time;
double _factor; double _factor;
int _nChans; int _nChans;