Merge branch 'master' into android

This commit is contained in:
Reece H. Dunn
2013-09-16 12:26:33 +01:00
10 changed files with 103 additions and 46 deletions
+2 -4
View File
@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2007, Gilles Casse <gcasse@oralux.org> *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -16,11 +17,10 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "speech.h"
#ifdef USE_ASYNC
// This source file is only used for asynchronious modes
#include "speech.h"
#include "espeak_command.h"
#include <stdlib.h>
#include <string.h>
@@ -702,6 +702,4 @@ void display_espeak_command( t_espeak_command* the_command)
}
#endif
}
#endif
//>
+2 -6
View File
@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2007, Gilles Casse <gcasse@oralux.org> *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -17,9 +18,6 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "speech.h"
#ifdef USE_ASYNC
// This source file is only used for asynchronious modes
@@ -33,6 +31,7 @@
#include <sys/time.h>
#include <errno.h>
#include "speech.h"
#include "speak_lib.h"
#include "event.h"
#include "wave.h"
@@ -723,7 +722,4 @@ ENTER("event_terminate");
init(); // purge event
}
}
#endif
//>
+2 -6
View File
@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2007, Gilles Casse <gcasse@oralux.org> *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -16,12 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "speech.h"
#ifdef USE_ASYNC
// This source file is only used for asynchronious modes
//<includes
#include <unistd.h>
@@ -35,6 +33,7 @@
#include <sys/time.h>
#include <time.h>
#include "speech.h"
#include "fifo.h"
#include "wave.h"
#include "debug.h"
@@ -601,7 +600,4 @@ void fifo_terminate()
init(0); // purge fifo
}
#endif
//>
+1 -5
View File
@@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2008 by Jonathan Duddington *
* email: jonsd@users.sourceforge.net *
* Copyright (C) 2013 Reece H. Dunn *
* *
* Based on a re-implementation by: *
* (c) 1993,94 Jon Iles and Nick Ing-Simmons *
@@ -38,8 +38,6 @@
#include "synthesize.h"
#include "voice.h"
#ifdef INCLUDE_KLATT // conditional compilation for the whole file
extern unsigned char *out_ptr; // **JSD
extern unsigned char *out_start;
extern unsigned char *out_end;
@@ -1409,5 +1407,3 @@ for(ix=0; ix<256; ix++)
kt_frame.AVpdb = 0;
kt_frame.Gain0 = 62; // 60
} // end of KlattInit
#endif // INCLUDE_KLATT
+1 -3
View File
@@ -3,6 +3,7 @@
* providing a subset of the API from the Windows mbrola DLL.
*
* Copyright (C) 2010 by Nicolas Pitre <nico@fluxnic.net>
* Copyright (C) 2013 Reece H. Dunn
*
* 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
@@ -16,7 +17,6 @@
*/
#include "speech.h"
#ifdef INCLUDE_MBROLA
#include <stdarg.h>
#include <stdio.h>
@@ -609,5 +609,3 @@ void resetError_MBR(void)
{
mbr_errorbuf[0] = 0;
}
#endif // INCLUDE_MBROLA
-2
View File
@@ -28,7 +28,6 @@
#include "speech.h"
#include "sonic.h"
#ifdef INCLUDE_SONIC
struct sonicStreamStruct {
short *inputBuffer;
@@ -969,4 +968,3 @@ int sonicChangeShortSpeed(
sonicDestroyStream(stream);
return numSamples;
}
#endif // INCLUDE_SONIC
+12 -1
View File
@@ -1,6 +1,7 @@
/***************************************************************************
* Copyright (C) 2005 to 2007 by Jonathan Duddington *
* email: jonsd@users.sourceforge.net *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -35,13 +36,15 @@
#define MAX_HARMONIC 400 // 400 * 50Hz = 20 kHz, more than enough
#ifdef INCLUDE_KLATT
extern void SetSynth_Klatt(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v, int control);
extern int Wavegen_Klatt(int resume);
extern void KlattReset(int control);
#endif
extern void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v);
extern int Wavegen();
extern void CloseWaveFile2();
extern void KlattReset(int control);
extern FILE *f_wave;
static int frame_width;
@@ -115,9 +118,11 @@ void MakeWaveFile(int synthesis_method)
out_ptr = out_start = wav_outbuf;
out_end = &wav_outbuf[sizeof(wav_outbuf)];
#ifdef INCLUDE_KLATT
if(synthesis_method == 1)
result = Wavegen_Klatt(resume);
else
#endif
result = Wavegen();
if(f_wave != NULL)
@@ -972,7 +977,9 @@ static void SetSynth_mS(int length_mS, SpectFrame *sp1, SpectFrame *sp2, peak_t
if(voice->klattv[0])
{
#ifdef INCLUDE_KLATT
SetSynth_Klatt((length_mS * samplerate) / 1000, 0, &fr1, &fr2, voice, control); // convert mS to samples
#endif
}
else
{
@@ -1004,7 +1011,9 @@ void SpectSeq::MakeWave(int start, int end, PitchEnvelope &pitch)
if(voice->klattv[0])
{
synthesizer_type = 1;
#ifdef INCLUDE_KLATT
KlattReset(2);
#endif
}
SpeakNextClause(NULL,NULL,2); // stop speaking file
@@ -1120,7 +1129,9 @@ void SpectFrame::MakeWaveF(int control, PitchEnvelope &pitche, int amplitude, in
if(voice->klattv[0])
{
synthesizer_type = 1;
#ifdef INCLUDE_KLATT
KlattReset(2);
#endif
}
SpeakNextClause(NULL,NULL,2); // stop speaking file
+1 -10
View File
@@ -1,6 +1,7 @@
/***************************************************************************
* Copyright (C) 2005 to 2007 by Jonathan Duddington *
* email: jonsd@users.sourceforge.net *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -22,11 +23,6 @@
#include <sys/types.h>
// conditional compilation options
#define INCLUDE_KLATT
#define INCLUDE_MBROLA
#define INCLUDE_SONIC
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
#define ARCH_BIG
#endif
@@ -46,12 +42,7 @@
#define __cdecl
//#define ESPEAK_API extern "C"
#ifdef LIBRARY
#define USE_ASYNC
#endif
#ifdef _ESPEAKEDIT
#define USE_ASYNC
#define LOG_FRAMES // write keyframe info to log-espeakedit
#endif