Add some missing files to SVN repository.

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@245 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2010-06-25 18:50:41 +00:00
parent 18240ae109
commit 5a4cbf98ec
64 changed files with 2163 additions and 1727 deletions
+2
View File
@@ -1,3 +1,5 @@
# Makefile for 'espeak', 'speak', and 'libespeak'
# remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM)
PREFIX=/usr
+3 -29
View File
@@ -253,9 +253,9 @@ static int DoSample2(int index, int which, int std_length, int control, int leng
else
{
// increase consonant amplitude at high speeds, depending on the peak consonant amplitude
x = ((35 - wav_scale) * speed.loud_consonants);
if(x < 0) x = 0;
wav_scale = (wav_scale * (x+256))/256;
// x = ((35 - wav_scale) * speed.loud_consonants);
// if(x < 0) x = 0;
// wav_scale = (wav_scale * (x+256))/256;
}
if(std_length > 0)
@@ -383,32 +383,6 @@ static int DoSample2(int index, int which, int std_length, int control, int leng
} // end of DoSample2
#ifdef deleted
int DoSample(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int length_mod, int amp)
{//====================== ==========================================================
int index;
int match_level;
int amp2;
int result;
EndPitch(1);
index = LookupSound(ph1,ph2,which & 0xff,&match_level,0);
if((index & 0x800000) == 0)
return(0); // not wavefile data
amp2 = wavefile_amp;
if(amp != 0)
amp2 = (amp * wavefile_amp)/20;
if(amp == -1)
amp2 = amp;
result = DoSample2(index,which,length_mod,0,amp2);
last_frame = NULL;
return(result);
} // end of DoSample
#endif
int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp)
{//=========================================================
-21
View File
@@ -1,21 +0,0 @@
/***************************************************************************
* Copyright (C) 2005 to 2007 by Jonathan Duddington *
* email: jonsd@users.sourceforge.net *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write see: *
* <http://www.gnu.org/licenses/>. *
***************************************************************************/
#include "StdAfx.h"
-1
View File
@@ -881,7 +881,6 @@ SetLengthMods(tr,3); // all equal
static const short stress_lengths_nl[8] = {160,135, 210,210, 0, 0, 260,280};
tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.vowel_pause = 1;
tr->langopts.vowel_pause = 0x30; // ??
tr->langopts.param[LOPT_DIERESES] = 1;
tr->langopts.param[LOPT_PREFIXES] = 1;
+75 -75
View File
@@ -168,89 +168,89 @@ static int pa_callback(void *inputBuffer, void *outputBuffer,
PaStreamCallbackFlags flags, void *userData )
#endif
{
int aResult=0; // paContinue
char* aWrite = myWrite;
size_t n = out_channels*sizeof(uint16_t)*framesPerBuffer;
int aResult=0; // paContinue
char* aWrite = myWrite;
size_t n = out_channels*sizeof(uint16_t)*framesPerBuffer;
myReadPosition += framesPerBuffer;
SHOW("pa_callback > myReadPosition=%u, framesPerBuffer=%lu (n=0x%x) \n",(int)myReadPosition, framesPerBuffer, n);
myReadPosition += framesPerBuffer;
SHOW("pa_callback > myReadPosition=%u, framesPerBuffer=%lu (n=0x%x) \n",(int)myReadPosition, framesPerBuffer, n);
if (aWrite >= myRead)
{
if((size_t)(aWrite - myRead) >= n)
if (aWrite >= myRead)
{
memcpy(outputBuffer, myRead, n);
myRead += n;
if((size_t)(aWrite - myRead) >= n)
{
memcpy(outputBuffer, myRead, n);
myRead += n;
}
else
{
SHOW_TIME("pa_callback > underflow");
aResult=1; // paComplete;
mInCallbackFinishedState = true;
size_t aUsedMem=0;
aUsedMem = (size_t)(aWrite - myRead);
if (aUsedMem)
{
memcpy(outputBuffer, myRead, aUsedMem);
}
char* p = (char*)outputBuffer + aUsedMem;
memset(p, 0, n - aUsedMem);
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t));
myRead = aWrite;
}
}
else
else // myRead > aWrite
{
SHOW_TIME("pa_callback > underflow");
aResult=1; // paComplete;
mInCallbackFinishedState = true;
size_t aUsedMem=0;
aUsedMem = (size_t)(aWrite - myRead);
if (aUsedMem)
{
memcpy(outputBuffer, myRead, aUsedMem);
}
char* p = (char*)outputBuffer + aUsedMem;
memset(p, 0, n - aUsedMem);
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t));
myRead = aWrite;
}
}
else // myRead > aWrite
{
if ((size_t)(myBuffer + BUFFER_LENGTH - myRead) >= n)
{
memcpy(outputBuffer, myRead, n);
myRead += n;
}
else if ((size_t)(aWrite + BUFFER_LENGTH - myRead) >= n)
{
int aTopMem = myBuffer + BUFFER_LENGTH - myRead;
if (aTopMem)
{
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem);
memcpy(outputBuffer, myRead, aTopMem);
}
int aRest = n - aTopMem;
if (aRest)
{
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest);
char* p = (char*)outputBuffer + aTopMem;
memcpy(p, myBuffer, aRest);
}
myRead = myBuffer + aRest;
}
else
{
SHOW_TIME("pa_callback > underflow");
aResult=1; // paComplete;
if ((size_t)(myBuffer + BUFFER_LENGTH - myRead) >= n)
{
memcpy(outputBuffer, myRead, n);
myRead += n;
}
else if ((size_t)(aWrite + BUFFER_LENGTH - myRead) >= n)
{
int aTopMem = myBuffer + BUFFER_LENGTH - myRead;
if (aTopMem)
{
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem);
memcpy(outputBuffer, myRead, aTopMem);
}
int aRest = n - aTopMem;
if (aRest)
{
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest);
char* p = (char*)outputBuffer + aTopMem;
memcpy(p, myBuffer, aRest);
}
myRead = myBuffer + aRest;
}
else
{
SHOW_TIME("pa_callback > underflow");
aResult=1; // paComplete;
int aTopMem = myBuffer + BUFFER_LENGTH - myRead;
if (aTopMem)
{
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem);
memcpy(outputBuffer, myRead, aTopMem);
}
int aRest = aWrite - myBuffer;
if (aRest)
{
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest);
char* p = (char*)outputBuffer + aTopMem;
memcpy(p, myBuffer, aRest);
}
int aTopMem = myBuffer + BUFFER_LENGTH - myRead;
if (aTopMem)
{
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem);
memcpy(outputBuffer, myRead, aTopMem);
}
int aRest = aWrite - myBuffer;
if (aRest)
{
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest);
char* p = (char*)outputBuffer + aTopMem;
memcpy(p, myBuffer, aRest);
}
size_t aUsedMem = aTopMem + aRest;
char* p = (char*)outputBuffer + aUsedMem;
memset(p, 0, n - aUsedMem);
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t));
myRead = aWrite;
size_t aUsedMem = aTopMem + aRest;
char* p = (char*)outputBuffer + aUsedMem;
memset(p, 0, n - aUsedMem);
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t));
myRead = aWrite;
}
}
}
SHOW("pa_callback > myRead=%x\n",(int)myRead);
SHOW("pa_callback > myRead=%x\n",(int)myRead);
// #if USE_PORTAUDIO == 18
@@ -288,7 +288,7 @@ static int pa_callback(void *inputBuffer, void *outputBuffer,
#endif
return(aResult);
return(aResult);
//#endif
} // end of WaveCallBack