Browse Source

[1.25.15] Callback in AUDIO_OUTPUT_PLAYBACK mode gives a zero-terminated list of events.

espeak_SetSynthCallback() can be called either before or after espeak_Initialize().


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@31 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 18 years ago
parent
commit
97b217c26a

+ 8
- 3
dictsource/hu_list View File

@@ -31,9 +31,9 @@ _2M1 k'e:t,EzER
_0M2 m'illio:
_1M2 m'illio:
_2M2 k'e:tm,illio:
_0M3 m'illia:rd
_1M3 m'illia:rd
_1M3 k'e:tm,illia:rd
_0M3 m'illia:Rd
_1M3 m'illia:Rd
_1M3 k'e:tm,illia:Rd
_0M4 b'illio:
_1M4 b'illio:
_2M4 k'e:tb,illio:
@@ -152,6 +152,11 @@ szer $u
ször $u


// word pairs

(hogy az) hoJ,Az


// Verbs

vagyok $u // to be, present

+ 2
- 2
dictsource/hu_rules View File

@@ -176,8 +176,8 @@ _minde) gy (ik J:
r R
A) r (A *
C) r (A R
r (C r
rr R
r (C R
rr R*

.group s
s S

+ 1
- 0
dictsource/is_rules View File

@@ -230,6 +230,7 @@
r (B r#
r (_ r#
r R
rr R*
rl dl
rl (K rtl#
rn rdn#

+ 1
- 1
phsource/compile_report View File

@@ -609,7 +609,7 @@
1 w/wu base
5 w/xw base
20 x/b base hi ro is
2 x/b_ base is
1 x/b_ base
9 x/d base hi hr el is
14 x/d_ base fi fr hi pl hr ru it ro el is sw
23 x/d_dnt base fi fr hi hu pl ru it ro sw

BIN
phsource/dzh/dz_pzd_ View File


BIN
phsource/dzh/xdz_pzd View File


+ 3
- 3
phsource/ph_icelandic View File

@@ -223,11 +223,11 @@ endphoneme

phoneme b
vls blb stop
vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk
vowelin f1=2 f2=1000 -300 -200 f3=-200 80 rms=30
vowelin f1=1 f2=1000 -300 -200 f3=-200 80 rms=27
vowelout f1=2 f2=1000 -300 -300 f3=-300 80 brk
lengthmod 5
wave x/b
before _ x/b_
// before _ x/b_
endphoneme



BIN
phsource/vdiph/y#i_2 View File


+ 11
- 4
src/event.cpp View File

@@ -74,12 +74,15 @@ static void* polling_thread(void*);

//>
//<event_init
void event_init(t_espeak_callback* SynthCallback)
{
ENTER("event_init");

void event_set_callback(t_espeak_callback* SynthCallback)
{
my_callback = SynthCallback;
SHOW("event_init > my_callback=0x%x\n", my_callback);
}

void event_init(void)
{
ENTER("event_init");

my_event_is_running=0;

@@ -193,6 +196,10 @@ ENTER("event_notify");

static unsigned int a_old_uid = 0;

espeak_EVENT events[2];
memcpy(&events[0],event,sizeof(espeak_EVENT)); // the event parameter in the callback function should be an array of eventd
events[1].type = espeakEVENT_LIST_TERMINATED; // ... terminated by an event type=0

if (event && my_callback)
{
event_display(event);

+ 2
- 1
src/event.h View File

@@ -27,7 +27,8 @@ Note: the timeout is checked against the real progress of the audio stream, whic
// First function to be called.
// the callback will be called when the event actually occurs.
// The callback is detailled in speak_lib.h .
void event_init(t_espeak_callback* cb);
void event_init(void);
void event_set_callback(t_espeak_callback* cb);

// Clear any pending event.
//

+ 4
- 1
src/speak_lib.cpp View File

@@ -225,7 +225,7 @@ static void select_output(espeak_AUDIO_OUTPUT output_type)
wave_init();
wave_set_callback_is_output_enabled( fifo_is_command_enabled);
my_audio = wave_open("alsa");
event_init(synth_callback);
event_init();
#endif
break;

@@ -624,6 +624,9 @@ ESPEAK_API void espeak_SetSynthCallback(t_espeak_callback* SynthCallback)
{//======================================================================
ENTER("espeak_SetSynthCallback");
synth_callback = SynthCallback;
#ifdef USE_ASYNC
event_set_callback(synth_callback);
#endif
}

ESPEAK_API void espeak_SetUriCallback(int (* UriCallback)(int, const char*, const char *))

+ 1
- 1
src/synthdata.cpp View File

@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"

const char *version_string = "1.25.14 31.May.07";
const char *version_string = "1.25.15 01.Jun.07";
const int version_phdata = 0x012514;

int option_device_number = -1;

+ 1
- 1
src/tr_languages.cpp View File

@@ -343,7 +343,7 @@ Translator *SelectTranslator(const char *name)
case L('i','s'): // Icelandic
{
static int stress_amps_is[] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_is[8] = {180,155, 200,200, 0,0, 240,250};
static int stress_lengths_is[8] = {180,160, 200,200, 0,0, 240,250};
static const wchar_t is_lettergroup_B[] = {'c','f','h','k','p','t','x',0xfe,0}; // voiceless conants, including 'þ' ?? 's'

tr = new Translator();

Loading…
Cancel
Save