festival/festival-2.1-OGIresLPC-gcc-4.7.patch

361 lines
15 KiB
Diff
Raw Permalink Normal View History

diff -ru festival-2.1/festival/src/modules/OGIcommon/OGIcommon.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGIcommon.cc
--- festival-2.1/festival/src/modules/OGIcommon/OGIcommon.cc 2006-12-05 23:38:01.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGIcommon.cc 2012-07-17 13:44:54.871361181 +0200
@@ -111,7 +111,7 @@
// loop through items
int n=0;
- for (i0=r->first(); i0 != 0; i0=next(i0)) {
+ for (i0=r->first(); i0 != 0; i0=i0->next()) {
names.append(i0->name());
y[n] = i0->F("end");
n++;
diff -ru festival-2.1/festival/src/modules/OGIcommon/OGIduration.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGIduration.cc
--- festival-2.1/festival/src/modules/OGIcommon/OGIduration.cc 2006-12-05 23:38:01.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGIduration.cc 2012-07-17 13:46:24.807426415 +0200
@@ -36,7 +36,7 @@
// Loop thru segments
for (useg=u->relation("Segment")->head(), sseg=u->relation("SrcSeg")->head();
((useg!=0) && (sseg!=0));
- useg=next(useg), sseg=next(sseg)) {
+ useg=useg->next(), sseg=sseg->next()) {
@@ -81,7 +81,7 @@
// Loop thru segments
for (useg=u->relation("Segment")->head(), sseg=u->relation("SrcSeg")->head();
((useg!=0) && (sseg!=0));
- useg=next(useg), sseg=next(sseg)) {
+ useg=useg->next(), sseg=sseg->next()) {
if (sseg->name() != useg->name())
sseg->set_name(useg->name());
diff -ru festival-2.1/festival/src/modules/OGIcommon/OGI_file.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGI_file.cc
--- festival-2.1/festival/src/modules/OGIcommon/OGI_file.cc 2006-12-05 23:38:01.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGI_file.cc 2012-07-17 13:44:21.807704834 +0200
@@ -181,7 +181,7 @@
size_t fps = ftell(fp);
fprintf(fp, "KVL %d ", kvl.length());
- for (l=kvl.head(); l!=0; l=next(l)){
+ for (l=kvl.head(); l!=0; l=l->next()){
fprintf(fp, "%s %s ", kvl.key(l).str(), kvl.val(l).str());
}
fprintf(fp, "%s ", ENDKEY.str());
diff -ru festival-2.1/festival/src/modules/OGIcommon/OGIgain.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGIgain.cc
--- festival-2.1/festival/src/modules/OGIcommon/OGIgain.cc 2006-12-05 23:38:01.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGIgain.cc 2012-07-17 13:46:56.624095722 +0200
@@ -49,7 +49,7 @@
// remove any in region where we will insert
p_gitem = NULL;
- for (gitem=grel->head(); gitem!=0; gitem=next(gitem)){
+ for (gitem=grel->head(); gitem!=0; gitem=gitem->next()){
if (p_gitem){
p_gitem->unref_all();
}
@@ -63,7 +63,7 @@
}
p_gitem = NULL;
- for (gitem=grel->head(); gitem!=0; gitem=next(gitem)){
+ for (gitem=grel->head(); gitem!=0; gitem=gitem->next()){
if (gitem->F("pos") >= B){
break;
}
@@ -130,7 +130,7 @@
float B = ffeature(seg, "start");
float E = ffeature(seg, "end");
- for (gitem=u->relation("Gain")->head(); gitem!=0; gitem=next(gitem)){
+ for (gitem=u->relation("Gain")->head(); gitem!=0; gitem=gitem->next()){
if (gitem->f_present("pos")){
if (gitem->F("pos") >= B) {
if (gitem->F("pos") <= E){
diff -ru festival-2.1/festival/src/modules/OGIcommon/OGI_WaveChunk.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGI_WaveChunk.cc
--- festival-2.1/festival/src/modules/OGIcommon/OGI_WaveChunk.cc 2006-12-05 23:38:01.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGI_WaveChunk.cc 2012-07-17 13:45:45.779832055 +0200
@@ -22,7 +22,7 @@
int OGI_WaveChunk::which_chunk(int samp){
int out=-1;
EST_Litem *s;
- for (s=true_samp.head(); s!=0; s=next(s)){
+ for (s=true_samp.head(); s!=0; s=s->next()){
if (true_samp(s) > samp)
break;
out++;
@@ -132,22 +132,22 @@
NchunkV = true_samp.length();
true_sampV = walloc(int, true_samp.length());
- for (k=0,s=true_samp.head(); s!=0; s=next(s)){
+ for (k=0,s=true_samp.head(); s!=0; s=s->next()){
true_sampV[k++] = true_samp(s);
}
startV = walloc(int, start.length());
- for (k=0,s=start.head(); s!=0; s=next(s)){
+ for (k=0,s=start.head(); s!=0; s=s->next()){
startV[k++] = start(s);
}
endV = walloc(int, end.length());
- for (k=0,s=end.head(); s!=0; s=next(s)){
+ for (k=0,s=end.head(); s!=0; s=s->next()){
endV[k++] = end(s);
}
offsetV = walloc(int, offset.length());
- for (k=0,s=offset.head(); s!=0; s=next(s)){
+ for (k=0,s=offset.head(); s!=0; s=s->next()){
offsetV[k++] = offset(s);
}
done_setup_get = TRUE;
diff -ru festival-2.1/festival/src/modules/OGIdbase/OGIresLPC_db.cc festival-2.1.buono/festival/src/modules/OGIdbase/OGIresLPC_db.cc
--- festival-2.1/festival/src/modules/OGIdbase/OGIresLPC_db.cc 2006-12-05 23:38:05.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIdbase/OGIresLPC_db.cc 2012-07-17 13:48:38.261039341 +0200
@@ -77,7 +77,7 @@
void OGIresLPC_db::free_all_units(void){
EST_Litem *p;
- for (p = loaded_units.head(); p != 0; p = next(p)){
+ for (p = loaded_units.head(); p != 0; p = p->next()){
free_unit(loaded_units(p));
}
loaded_units.clear();
diff -ru festival-2.1/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc festival-2.1.buono/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc
--- festival-2.1/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc 2006-12-05 23:38:05.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc 2012-07-17 13:48:12.474307360 +0200
@@ -40,9 +40,9 @@
EST_Relation *dbSeg_rel = u->relation("dbUnit");
/// loop through Segment items
- for (lseg=u->relation("Segment")->head(); lseg!=0; lseg=next(lseg)) {
+ for (lseg=u->relation("Segment")->head(); lseg!=0; lseg=lseg->next()) {
- rseg = next(lseg);
+ rseg = lseg->next();
if (rseg != 0){
// Left phone name
diff -ru festival-2.1/festival/src/modules/OGIresLPC/pmark_analysis.cc festival-2.1.buono/festival/src/modules/OGIresLPC/pmark_analysis.cc
--- festival-2.1/festival/src/modules/OGIresLPC/pmark_analysis.cc 2006-12-05 23:38:17.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIresLPC/pmark_analysis.cc 2012-07-17 13:53:35.315701699 +0200
@@ -250,7 +250,7 @@
EST_IList pmlist;
EST_Litem *p;
Track2IList(pmarks, (float) sp.sample_rate(), pmlist);
- for (p = pmlist.head(); p != 0; p = next(p)){
+ for (p = pmlist.head(); p != 0; p = p->next()){
if ((pmlist(p) < 0) || pmlist(p) > sp.length())
p = pmlist.remove(p);
}
@@ -615,7 +615,7 @@
static void purge_pm_list(EST_IList &pm, EST_IList &rmlist){
// in pm, remove INDICES listed in rmlist
EST_Litem *p;
- for (p=rmlist.tail(); p != 0; p = prev(p)){
+ for (p=rmlist.tail(); p != 0; p = p->prev()){
pm.remove_nth(rmlist(p));
}
}
diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_concat.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_concat.cc
--- festival-2.1/festival/src/modules/OGIresLPC/resLPC_concat.cc 2006-12-05 23:38:17.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_concat.cc 2012-07-17 13:49:23.748566558 +0200
@@ -84,7 +84,7 @@
// Loop through the units to get size of WaveChunk -- pre-alloc
int appx_wave_size = 0; // samples
- for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=next(newUnit)){
+ for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=newUnit->next()){
indx = newUnit->f("db_indx");
appx_wave_size += udb->load_unit_udata(indx); // returns size
appx_wave_size += T0_max; // possible extra zero samples needed around each
@@ -93,7 +93,7 @@
// Loop through the units
- for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=next(newUnit)){
+ for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=newUnit->next()){
// Items in the dbUnit relation have the following features:
// - "db_indx" into dbase
// - "isNatNbL" - is the prev unit this unit's natural neighbor?
@@ -145,7 +145,7 @@
// mark voiced joins
EST_Litem *p;
- for (p = vjoin_list.head(); p != 0; p = next(p)){
+ for (p = vjoin_list.head(); p != 0; p = p->next()){
srcdata->pm.a(vjoin_list(p), "v/uv") = _V_;
}
diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_dump.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_dump.cc
--- festival-2.1/festival/src/modules/OGIresLPC/resLPC_dump.cc 2006-12-05 23:38:17.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_dump.cc 2012-07-17 13:49:51.766275351 +0200
@@ -176,9 +176,9 @@
// Loop thru SrcSeg, record 1st pmark of each segment
dbunit=u->relation("dbUnit")->head();
names.append(EST_String(dbunit->name()));
- dbunit = next(dbunit); // skip 1st one
+ dbunit = dbunit->next(); // skip 1st one
- for ( ; dbunit!=0; dbunit=next(dbunit)){
+ for ( ; dbunit!=0; dbunit=dbunit->next()){
// pmarks
srcpmR = dbunit->I("lpcpm");
diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_mod.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_mod.cc
--- festival-2.1/festival/src/modules/OGIresLPC/resLPC_mod.cc 2006-12-05 23:38:17.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_mod.cc 2012-07-17 13:51:30.175997155 +0200
@@ -166,7 +166,7 @@
EST_Item *lastseg = u->relation("Segment")->tail();
// Loop thru segments
- for (useg=u->relation("Segment")->head(); useg != 0; useg=next(useg)) {
+ for (useg=u->relation("Segment")->head(); useg != 0; useg=useg->next()) {
if (ph_is_silence(useg->name())){
@@ -180,7 +180,7 @@
incr = ffeature(useg,"segment_duration").Float()/5.0;
GtargL = seg_gain_target(u, useg, 1);
if (GtargL == 1.0)
- GtargL = seg_gain_target(u, next(useg), 0);
+ GtargL = seg_gain_target(u, useg->next(), 0);
OGIgain_targ(u, 0.0, firstseg->F("end"),
0.0, GtargL,
incr,"sin");
@@ -194,7 +194,7 @@
incr = ffeature(useg,"segment_duration").Float()/5.0;
GtargR = seg_gain_target(u, useg, 0);
if (GtargR == 1.0)
- GtargR = seg_gain_target(u, prev(useg), 1);
+ GtargR = seg_gain_target(u, useg->prev(), 1);
OGIgain_targ(u,ffeature(lastseg,"start").Float(),lastseg->F("end"),
GtargR, 0.0,
incr,"sin");
@@ -212,11 +212,11 @@
incr = ffeature(useg,"segment_duration").Float()/5.0;
GtargL = seg_gain_target(u, useg, 1);
if (GtargL == 1.0)
- GtargL = seg_gain_target(u, prev(useg), 1);
+ GtargL = seg_gain_target(u, useg->prev(), 1);
GtargR = seg_gain_target(u, useg, 0);
if (GtargR == 1.0)
- GtargR = seg_gain_target(u, next(useg), 0);
+ GtargR = seg_gain_target(u, useg->next(), 0);
OGIgain_targ(u,ffeature(useg,"start").Float(), mid,
GtargL, 0.0,
@@ -285,7 +285,7 @@
EST_Item *sseg;
// Loop thru SrcSeg, record 1st pmark of each segment
- for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=next(sseg)){
+ for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=sseg->next()){
src_end += sseg->F("dur");
@@ -365,7 +365,7 @@
// last one in the first unit
Lph = parent(as(daughtern(dbUnit),"SrcSeg"));
- for (dbUnit=next(dbUnit); dbUnit != 0; dbUnit=next(dbUnit)){
+ for (dbUnit=dbUnit->next(); dbUnit != 0; dbUnit=dbUnit->next()){
// first phone in this unit
Rph = parent(as(daughter1(dbUnit),"SrcSeg"));
@@ -384,17 +384,17 @@
M = dbUnit->I("lpcpm");
// begin point: limit to begin of unit and begin of segment the join is in
- B = max(prev(dbUnit)->I("lpcpm"), M - smoothlen);
+ B = max(dbUnit->prev()->I("lpcpm"), M - smoothlen);
B = max(B, Lph->I("lpcpm"));
// end point: limit to end of unit and end of segment the join is in
- if (next(dbUnit))
- nextpm = next(dbUnit)->I("lpcpm");
+ if (dbUnit->next())
+ nextpm = dbUnit->next()->I("lpcpm");
else
nextpm = srclpc.num_frames();
E = min(nextpm, M + smoothlen);
- if (next(Rph))
- E = min(E, next(Rph)->I("lpcpm")-1);
+ if (Rph->next())
+ E = min(E, Rph->next()->I("lpcpm")-1);
// do smoothing
if (doMatch)
@@ -459,7 +459,7 @@
Gtarg.begin_append(utt_targ->length());
// loop through targets
- for (targ=utt_targ->first(); targ != 0; targ=next(targ)) {
+ for (targ=utt_targ->first(); targ != 0; targ=targ->next()) {
if (targ->f_present("pos"))
Gtarg.append(targ->F("pos"), targ->F("gain"));
}
diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_pmark.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_pmark.cc
--- festival-2.1/festival/src/modules/OGIresLPC/resLPC_pmark.cc 2006-12-05 23:38:17.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_pmark.cc 2012-07-17 13:53:12.769935094 +0200
@@ -114,13 +114,13 @@
To_UV_sec, pm, Nexc, Fs, label_vuv);
for (b=Bvsect.tail(),e=Evsect.tail();
- ((b!=0)||(e!=0)); b=prev(b),e=prev(e)){
+ ((b!=0)||(e!=0)); b=b->prev(),e=e->prev()){
make_Vsection(Bvsect(b), Evsect(e), pm, label_vuv);
// make next UNVOICED section
- if (prev(e)){
- insert_UVsection(Bvsect, Evsect, Evsect(prev(e)), Bvsect(b),
+ if (e->prev()){
+ insert_UVsection(Bvsect, Evsect, Evsect(e->prev()), Bvsect(b),
To_UV_sec, pm, Nexc, Fs, label_vuv);
}
}
@@ -190,7 +190,7 @@
// update V/UV information to reflect added pmarks
for (b=Bvsect.head(),e=Evsect.head();
- ((b!=0)||(e!=0)); b=next(b),e=next(e)){
+ ((b!=0)||(e!=0)); b=b->next(),e=e->next()){
if (Bvsect(b) >= UVsectE){
Bvsect(b) += tvect.Nelem()-Nstrays;
diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_resyn.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_resyn.cc
--- festival-2.1/festival/src/modules/OGIresLPC/resLPC_resyn.cc 2006-12-05 23:38:17.000000000 +0100
+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_resyn.cc 2012-07-17 13:52:18.790493893 +0200
@@ -88,7 +88,7 @@
EST_Item *sseg;
// set "end" of srcseg from input "dur"
- for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=next(sseg)){
+ for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=sseg->next()){
src_end += sseg->F("dur");
sseg->set("end", src_end);
}
@@ -96,7 +96,7 @@
// readjust: start from end of wave and shrink segs that are
// beyond the end
float next_end = wavend;
- for (sseg=u->relation("SrcSeg")->tail(); sseg!=u->relation("SrcSeg")->head(); sseg=prev(sseg)){
+ for (sseg=u->relation("SrcSeg")->tail(); sseg!=u->relation("SrcSeg")->head(); sseg=sseg->prev()){
if (sseg->F("end") > next_end){
sseg->set("end", next_end);
next_end -= 0.001;
@@ -107,7 +107,7 @@
// re-set "dur"
float prev_end=0.0;
- for (sseg=u->relation("SrcSeg")->head(); sseg != 0; sseg=next(sseg)){
+ for (sseg=u->relation("SrcSeg")->head(); sseg != 0; sseg=sseg->next()){
sseg->set("dur", sseg->F("end")-prev_end);
prev_end = sseg->F("end");
}