Browse Source

Add some missing files to SVN repository.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@245 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 15 years ago
parent
commit
5a4cbf98ec
64 changed files with 2165 additions and 1729 deletions
  1. 17
    18
      dictsource/da_list
  2. 389
    102
      dictsource/da_rules
  3. 3
    3
      dictsource/dict_phonemes
  4. 4
    0
      dictsource/en_list
  5. 3
    3
      dictsource/fr_list
  6. 1460
    1457
      dictsource/fr_rules
  7. 3
    1
      dictsource/ta_rules
  8. BIN
      phsource/b/br
  9. BIN
      phsource/b/xbr
  10. 5
    1
      phsource/compile_report
  11. 11
    0
      phsource/envelope/i_risefall
  12. 6
    0
      phsource/envelope/i_risefall2
  13. BIN
      phsource/g/gr
  14. BIN
      phsource/g/xgr
  15. 124
    0
      phsource/intonation
  16. BIN
      phsource/klatt/b
  17. BIN
      phsource/klatt/bh
  18. BIN
      phsource/klatt/dz_pzd
  19. BIN
      phsource/klatt/dz_pzd_
  20. BIN
      phsource/klatt/m
  21. BIN
      phsource/klatt/m-syl
  22. BIN
      phsource/klatt/m_
  23. BIN
      phsource/klatt/n
  24. BIN
      phsource/klatt/n-syl
  25. BIN
      phsource/klatt/n^
  26. BIN
      phsource/klatt/n^@
  27. BIN
      phsource/klatt/nn
  28. BIN
      phsource/klatt/nr
  29. BIN
      phsource/klatt/qq
  30. BIN
      phsource/klatt/qqh
  31. BIN
      phsource/klatt/qqh_
  32. BIN
      phsource/klatt/tap2
  33. BIN
      phsource/klatt/v
  34. BIN
      phsource/klatt/v_
  35. BIN
      phsource/klatt/x_tap
  36. BIN
      phsource/klatt/zh
  37. BIN
      phsource/klatt/zh_
  38. 7
    0
      phsource/ph_danish
  39. 2
    2
      phsource/ph_english
  40. 2
    2
      phsource/ph_english_n
  41. 2
    2
      phsource/ph_english_wm
  42. 19
    8
      phsource/ph_french
  43. 16
    0
      phsource/ph_nahuatl
  44. 4
    1
      phsource/ph_tamil
  45. 6
    1
      phsource/phonemes
  46. BIN
      phsource/r/@_
  47. BIN
      phsource/r/V_
  48. BIN
      phsource/r/V_2_
  49. BIN
      phsource/r/aa
  50. BIN
      phsource/r3/r_ru.wav
  51. BIN
      phsource/r3/r_ru2
  52. BIN
      phsource/ustop/t_short_.wav
  53. BIN
      phsource/vdiph/aau_6
  54. BIN
      phsource/vwl_de/uu_@
  55. BIN
      phsource/vwl_en_us/aU@
  56. BIN
      phsource/vwl_fr/br
  57. BIN
      phsource/vwl_fr/e_2r
  58. BIN
      phsource/vwl_fr/r
  59. BIN
      phsource/vwl_ru/ii-
  60. 2
    0
      src/Makefile
  61. 3
    29
      src/synthesize.cpp
  62. 0
    21
      src/tr_english.cpp
  63. 0
    1
      src/tr_languages.cpp
  64. 77
    77
      src/wave.cpp

+ 17
- 18
dictsource/da_list View File

@@ -1,4 +1,4 @@
// PB = Peter Bjarkov - [email protected]
// PB = Peter Bjarkov - [email protected]

// This file is UTF8 encoded
// Spelling-to-phoneme words for Danish
@@ -111,7 +111,7 @@ _19 n'ed@-n
_2X t'y:w
_3X tR'&#Dv@ //PB [tR'ADv@] changed to [tR'&#Dv@]
_4X f'WRV //PB [f'W:*3] changed to [ f'WRV]
_5X hal't*es
_5X h&l't*es // PB [a] changed to [&]
_6X t*'es
_7X halfj'&rs
_8X f'irs
@@ -163,6 +163,7 @@ en e:n $u
et ed $u
her $u
kun $u
vel $u+

// conjunctions
og V $u+ $pause // and
@@ -187,6 +188,7 @@ med $u+ // with
af & // PB changed from [a?] to [&] - sound too short in a sentence
// Also removed $u from 'af' and other words. They disappeared.
ad &: // PB added 'ad'
ad &D $atend $sentence // PB "Det må ikke skille os ad."
at &: $u // PB changed from [at] to [&:]
hos // at - PB: removed [$u+]
som sVm // which / that - PB: removed [$u+]
@@ -202,7 +204,7 @@ dét de
vi $u
i _i $u+
mig maj $u // me
dig daj $u
dig daj_| $u
dem $u
ham $u
hende $u
@@ -335,13 +337,11 @@ password _^_EN
penthouse _^_EN
pickup _^_EN
pidgin _^_EN
producer _^_EN
ranger _^_EN
receiver _^_EN
research _^_EN
remake _^_EN
roadie _^_EN
roastbeef _^_EN
run _^_EN
scanner _^_EN
science _^_EN
@@ -356,7 +356,6 @@ small _^_EN
snob _^_EN
song _^_EN
source _^_EN
spam _^_EN
spirit _^_EN
squaw _^_EN
sweatshirt _^_EN
@@ -2398,7 +2397,6 @@ lupin $alt
magasin $alt
mandarin $alt
mandolin $alt
mannequin m&n@k'EN $alt
margin $alt
marin $alt
marocain mAro'kEN $alt
@@ -5046,6 +5044,7 @@ adstringer $alt
adviser $alt
advoker $alt
afficer $alt
aflever $alt
afmarcher $alt
afrikaniser $alt
agere $alt
@@ -5188,7 +5187,7 @@ bronzere $alt
brunere $alt
brutaliser $alt
bruyere bryj'E:r $alt
budgetter $alt
budgettere $alt
bugser $alt
bureaukratiser $alt
cadmier $alt
@@ -5274,7 +5273,7 @@ deputer $alt
dereguler $alt
deriver $alt
desarmer $alt
deserter $alt
desertere $alt
designere $alt
desinficer $alt
destiller $alt
@@ -5434,7 +5433,7 @@ farser $alt
fasciner $alt
favoriser $alt
feminiser $alt
ferier $alt
feriere $alt
fermenter $alt
ferniser $alt
fertiliser $alt
@@ -5890,7 +5889,6 @@ laminer $alt
lancer $alt
lasere $alt
latiniser $alt
//lavere $alt
lavpasteuriser $alt
legaliser $alt
leger $alt
@@ -6119,7 +6117,7 @@ plakater $alt
planere $alt
plastificer $alt
platiner $alt
pletter $alt
plettere $alt
plisser $alt
plomber $alt
plæder $alt
@@ -6153,7 +6151,7 @@ privileger $alt
prober $alt
problematiser $alt
proceder $alt
producer $alt
producere $alt
profaner $alt
professionaliser $alt
profeter $alt
@@ -6218,7 +6216,7 @@ ramponer $alt
ranger $alt
rappeller $alt
rapportere $alt
raser $alt
rasere $alt
ratificer $alt
ratihaber $alt
rationaliser $alt
@@ -6256,7 +6254,7 @@ reimporter $alt
reinvester $alt
rejicer $alt
rekapituler $alt
reklamer $alt
reklamere $alt
rekognoscer $alt
rekommander $alt
rekompenser $alt
@@ -6418,7 +6416,7 @@ stabiliser $alt
staffer $alt
stagner $alt
standardiser $alt
stationer $alt
stationere $alt
statuere $alt
stenciler $alt
stenografer $alt
@@ -6494,7 +6492,7 @@ teoretiser $alt
termografer $alt
terrasser $alt
terroriser $alt
testamenter $alt
testamentere $alt
testere $alt
tiere $alt
titrer $alt
@@ -6565,7 +6563,7 @@ verbaliser $alt
verificer $alt
verser $alt
versificer $alt
versioner $alt
versionere $alt
vibrer $alt
vidimer $alt
vikarier $alt
@@ -10439,6 +10437,7 @@ sig si $capital //PB Sig = si with capital S - Sig det med blom
(vi steg) vi||st'e
(de steg) di||st'e
(alle steg) &l3||st'e
steg sdaj $atend $sentence
steget ste@d
// PB problem with noun "hav" = ocean and verb "hav(e)" = to have [hAu]/[h&v]
(et hav) ed||h'Au // PB "et hav" = an ocean - not "hav en god dag" - have a nice day

+ 389
- 102
dictsource/da_rules
File diff suppressed because it is too large
View File


+ 3
- 3
dictsource/dict_phonemes View File

@@ -56,13 +56,13 @@ x z
Dictionary da_dict

& &# 0 3 @ @- a A
e E i o O u V W
W# y Y
aI e E i o O u V
W W# y Y

* - : ? b B d D
dZ f g h j J k l
l/2 l/3 m n N p r R
s S t T tS v w
s S t T tS v w z


Dictionary hu_dict

+ 4
- 0
dictsource/en_list View File

@@ -1003,6 +1003,7 @@ dose doUs
dosage doUsI2dZ
dramatic dr@matIk
drawer drO@
dreamt drEmpt
drier draI3
driest draI|@st
duet dju:'Et
@@ -1221,6 +1222,7 @@ havoc hav@k
hasty heIstI
hatred heItrI2d
hazardous haz3d@s
headfirst $2
heh hEh
hehe hi:h'i:
heifer hEf@
@@ -1759,6 +1761,7 @@ preset pri:sEt
prestige prEst'i:Z
?3 pretense pri:tEns
pretext pri:tEkst
pretrial pri:tr'aI|@L
pretty prItI
privation praIv'eIS@n
privilege prIvI2lI2dZ
@@ -3096,6 +3099,7 @@ thy ,DaI
thine ,DaIn

me ,mi: $only
me mi: $atstart $atend
him ,hIm $only
us ,Vz $only
us $abbrev $allcaps

+ 3
- 3
dictsource/fr_list View File

@@ -24,7 +24,7 @@

// 2006-11-18 Gilles Casse <[email protected]>
//
// Updated 2010-06-11 Michel Such <[email protected]>
// Updated 2010-06-15 Michel Such <[email protected]>
//
// * Numbers, a few abbreviations and exceptions.
//
@@ -778,7 +778,7 @@ zut zyt
exocet E2gzosEt
fret fr'Et
budget bydZE2
hamlet hamlEt
hamlet _|amlEt
knesset knesEt
lazaret lazarE2
margaret margarEt
@@ -884,7 +884,7 @@ contentions kO~tA~tjO~z2
dations datjO~z2
désertions dezErtjO~z2 $verb
exploitions EksplwatjO~z2
heurtions hYrtjO~z2
heurtions _|WrtjO~z2
partions partjO~z2
rations ratjO~z2 $verb
tentions tA~tjO~z2

+ 1460
- 1457
dictsource/fr_rules
File diff suppressed because it is too large
View File


+ 3
- 1
dictsource/ta_rules View File

@@ -393,7 +393,7 @@
_) ட (வல t.V
_) ட (வர t.V
_) ட (ேப t.
_) ட (ாக்ஸி t.
_) டாக (்ஸி t.a:k

.group ண
ண n.V
@@ -597,6 +597,7 @@
_) த (ொம் d
_) த (ோசை d
_) த (ோஷ d
_) த (ுபாய d
//endsort

//sort
@@ -671,6 +672,7 @@ _பார்வ) த (ி t
ச) த (்ரு t
த) த (்ரூப t
பா) த (்ரூம t
_ப) த (ஞ்சலி tV
//endsort



BIN
phsource/b/br View File


BIN
phsource/b/xbr View File


+ 5
- 1
phsource/compile_report View File

@@ -53,7 +53,7 @@ consonants 9 115
id 15 125
sq 33 126
hy 23 117
da 23 119
da 24 120
rw 15 130
ml 13 150
ne 18 156
@@ -82,6 +82,7 @@ b/bu [b] base
b/xb [b] base
[b] fr
[bh] hi
b/xbr [b] fr
d/d [d] base
[d[] base
[d] base2
@@ -139,6 +140,7 @@ d/xd [d] base
[d] sq
d/xd3 [dh] hi
d/xd_pzd [d;] pl
d/xdr [d] fr
d/xdz [dz] consonants
d/x_tap [t#] en
[*] pt
@@ -220,6 +222,7 @@ g/xg [g] base
[g] cy
[g] fr
[g] es
g/xgr [g] fr
h/h_ [h] base
[h] fi
[<h>] la
@@ -923,6 +926,7 @@ vdiph/ai [aI] base2
[a:I] vi
[aI] id
[aI] hy
[aI] da
vdiph/ai_2 [aI] en
[aI] cy
[aY] cy

+ 11
- 0
phsource/envelope/i_risefall View File

@@ -0,0 +1,11 @@
ENVELOPE
0 60
5 63
22 92
31 100
41 95
85 12
90 5
100 0



+ 6
- 0
phsource/envelope/i_risefall2 View File

@@ -0,0 +1,6 @@
ENVELOPE
0 0
45 95
100 0



BIN
phsource/g/gr View File


BIN
phsource/g/xgr View File


+ 124
- 0
phsource/intonation View File

@@ -0,0 +1,124 @@
tune s1
prehead 46 57
headenv fall 16
head 4 80 50 -8 -5
headextend 0 63 38 13 0
nucleus0 fall 64 8
nucleus fall 70 18 24 12
endtune

tune c1
prehead 46 57
headenv fall 16
head 4 80 46 -8 -5
headextend 0 63 38 13 0
nucleus0 fall-rise 80 18
nucleus fall-rise2 78 22 34 52
endtune

tune q1
prehead 46 57
headenv fall 16
head 4 75 43 -7 0
headextend 25 63 38 13 0
nucleus0 fall-rise 88 22
nucleus fall-rise2 82 22 34 66
endtune

tune e1
prehead 46 57
headenv fall 16
head 3 90 50 -9 0
headextend 16 82 50 32 16
nucleus0 fall 92 8
nucleus fall 92 80 76 8
endtune


// PB Tunes for the Danish intonation
// full-stop "." - punktum
tune s2
prehead 46 57
headenv fall 16
head 4 65 60 -8 -5
headextend 0 53 38 13 0
nucleus0 fall 44 28
nucleus fall 50 42 34 28 // sidste ord før punktu

onset 75 -5 -5
endtune

// comma "," - komma
tune c2
prehead 46 57
headenv fall 16
head 4 65 50 -8 -5
headextend 0 63 38 13 0
nucleus0 rise 60 42
nucleus rise 55 42 34 52 // sidste tal: slutniveau
endtune

// question mark "?" - spørgsmålste

tune q2
prehead 40 75
headenv fall 16
head 4 75 43 -7 0 //head 4 35 43 -7 0
headextend 25 63 38 13 0
nucleus0 rise 70 50 // første tal: slutniveaue

nucleus rise 35 45 60 70 // sidste tal: slutniveau
endtune

// exclamation mark "!" - udråbsteg

tune e2
prehead 46 57
headenv fall 16
head 3 90 50 -9 0
headextend 16 82 50 32 16
nucleus0 fall 92 8
nucleus fall 92 80 76 8
endtune



// Tunes for the French intonation
// full-stop "." - point
tune s3
prehead 46 57
headenv fall 16
head 4 80 50 -8 -5
headextend 0 63 38 13 0
nucleus0 fall 64 8
nucleus fall 70 18 24 12
endtune

// comma "," - virgule
tune c3
prehead 46 57
headenv fall 16
head 4 80 30 -5 -15
headextend 25 63 38 13 0
nucleus0 fall-rise 75 40
endtune

// question mark "?" - point d'interrogation
tune q3
prehead 46 57
headenv fall 16
head 4 75 43 -7 0
headextend 25 63 38 13 0
nucleus0 fall-rise 88 22
nucleus fall-rise2 82 22 34 66
endtune

// exclamation mark "!" - point d'exclamation
tune e3
prehead 46 57
headenv fall 16
head 3 90 50 -9 0
headextend 16 82 50 32 16
nucleus0 fall 92 8
nucleus fall 92 80 76 8
endtune

BIN
phsource/klatt/b View File


BIN
phsource/klatt/bh View File


BIN
phsource/klatt/dz_pzd View File


BIN
phsource/klatt/dz_pzd_ View File


BIN
phsource/klatt/m View File


BIN
phsource/klatt/m-syl View File


BIN
phsource/klatt/m_ View File


BIN
phsource/klatt/n View File


BIN
phsource/klatt/n-syl View File


BIN
phsource/klatt/n^ View File


BIN
phsource/klatt/n^@ View File


BIN
phsource/klatt/nn View File


BIN
phsource/klatt/nr View File


BIN
phsource/klatt/qq View File


BIN
phsource/klatt/qqh View File


BIN
phsource/klatt/qqh_ View File


BIN
phsource/klatt/tap2 View File


BIN
phsource/klatt/v View File


BIN
phsource/klatt/v_ View File


BIN
phsource/klatt/x_tap View File


BIN
phsource/klatt/zh View File


BIN
phsource/klatt/zh_ View File


+ 7
- 0
phsource/ph_danish View File

@@ -114,6 +114,13 @@ phoneme W#
FMT(vowel/V)
endphoneme

phoneme aI
vowel starttype #a endtype #i
length 250
FMT(vdiph/ai)
endphoneme


// CONSONANTS

// PB added l/3

+ 2
- 2
phsource/ph_english View File

@@ -383,7 +383,7 @@ endphoneme

phoneme aI@
vowel starttype #a endtype #@
length 270
length 280
IfNextVowelAppend(r-)
FMT(vwl_en/aI@)
endphoneme
@@ -391,7 +391,7 @@ endphoneme

phoneme aU@
vowel starttype #a endtype #@
length 270
length 280
IfNextVowelAppend(r-)
FMT(vwl_en/aU@)
endphoneme

+ 2
- 2
phsource/ph_english_n View File

@@ -239,7 +239,7 @@ endphoneme

phoneme aI@
vowel starttype #a endtype #@
length 270
length 280
IfNextVowelAppend(r-)
FMT(vwl_en/aI@)
endphoneme
@@ -247,7 +247,7 @@ endphoneme

phoneme aU@
vowel starttype #a endtype #@
length 270
length 280
IfNextVowelAppend(r-)
FMT(vwl_en/aU@)
endphoneme

+ 2
- 2
phsource/ph_english_wm View File

@@ -222,7 +222,7 @@ endphoneme

phoneme aI@
vowel starttype #a endtype #@
length 270
length 280
IfNextVowelAppend(r-)
FMT(vwl_en/ooi@)
endphoneme
@@ -230,7 +230,7 @@ endphoneme

phoneme aU@
vowel starttype #a endtype #@
length 270
length 280
IfNextVowelAppend(r-)
FMT(vwl_en/aU@)
endphoneme

+ 19
- 8
phsource/ph_french View File

@@ -1,7 +1,7 @@
//====================================================
// French
//====================================================
// Updated 2010-06-12 Michel Such <[email protected]>
// Updated 2010-06-16 Michel Such <[email protected]>

phoneme #l virtual
// Used for l and l/
@@ -80,8 +80,7 @@ phoneme r
vcd uvl frc nopause
rhotic
starttype #r endtype #r
Vowelin f1=1 f2=1600 -500 500 f3=-200 100 len=65
Vowelout f1=1 f2=1200 -400 800 f3=200 100 len=60
Vowelin f1=0 f2=1500 -400 400 f3=-400 80
lengthmod 7

IF nextPh(isNotVowel) THEN
@@ -148,7 +147,7 @@ endphoneme
phoneme r/2
liquid rhotic uvl nopause
starttype #r endtype #r
Vowelin f1=1 f2=1600 -500 500 f3=-200 100 len=65 amp=8
Vowelin f1=0 f2=1500 -400 400 f3=-400 80

CALL post_r
IF prevPhW(f) OR prevPhW(k) OR prevPhW(p) OR prevPhW(s) OR prevPhW(t) OR prevPhW(S) THEN
@@ -163,7 +162,7 @@ endphoneme


phoneme l
liquid nopause
liquid
starttype #l endtype #l
lengthmod 7

@@ -639,7 +638,11 @@ phoneme b
ENDIF

IF PreVoicing THEN
FMT(b/xb)
IF nextPhW(#r) THEN
FMT(b/xbr)
ELSE
FMT(b/xb)
ENDIF
ENDIF

IF nextPh(isPause2) OR nextPh(l) THEN
@@ -663,7 +666,11 @@ phoneme d
Vowelout f1=2 f2=1700 -300 300 f3=-100 80

IF PreVoicing THEN
FMT(d/xd)
IF nextPhW(#r) THEN
FMT(d/xdr)
ELSE
FMT(d/xd)
ENDIF
ENDIF

IF nextPh(isPause2) THEN
@@ -699,7 +706,11 @@ phoneme g
Vowelout f1=1 f2=2300 250 300 f3=-300 80 brk

IF PreVoicing THEN
FMT(g/xg)
IF nextPhW(#r) THEN
FMT(g/xgr)
ELSE
FMT(g/xg)
ENDIF
ENDIF

IF nextPh(isPause2) THEN

+ 16
- 0
phsource/ph_nahuatl View File

@@ -0,0 +1,16 @@
//====================================================
// Nahuatl (classical)
//====================================================
phoneme : // lengthens the previous vowel by 'length'
virtual
length 300
endphoneme
phoneme e
vowel starttype #e endtype #e
length 170
FMT(vowel/e_mid2)
endphoneme

+ 4
- 1
phsource/ph_tamil View File

@@ -80,7 +80,10 @@ endphoneme
phoneme u
vowel starttype #u endtype #u
length 110
ChangeIfNotStressed(U)
IF prevPhW(isVel) THEN
ELSE
ChangeIfNotStressed(U)
ENDIF
FMT(vowel/u_6)
endphoneme


+ 6
- 1
phsource/phonemes View File

@@ -1720,6 +1720,12 @@ phonemetable da base
include ph_danish




// The following lines are experimental, for future additions.
// These langauges are not in a usable state.
// These lines can be deleted.

phonemetable rw base2
include ph_kinyarwanda

@@ -1738,7 +1744,6 @@ include ph_nepali
//phonemetable mr hi
//include ph_marathi


//phonemetable eu base2
//include ph_basque


BIN
phsource/r/@_ View File


BIN
phsource/r/V_ View File


BIN
phsource/r/V_2_ View File


BIN
phsource/r/aa View File


BIN
phsource/r3/r_ru.wav View File


BIN
phsource/r3/r_ru2 View File


BIN
phsource/ustop/t_short_.wav View File


BIN
phsource/vdiph/aau_6 View File


BIN
phsource/vwl_de/uu_@ View File


BIN
phsource/vwl_en_us/aU@ View File


BIN
phsource/vwl_fr/br View File


BIN
phsource/vwl_fr/e_2r View File


BIN
phsource/vwl_fr/r View File


BIN
phsource/vwl_ru/ii- View File


+ 2
- 0
src/Makefile 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
src/synthesize.cpp 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)
{//=========================================================

+ 0
- 21
src/tr_english.cpp View File

@@ -1,21 +0,0 @@
/***************************************************************************
* Copyright (C) 2005 to 2007 by Jonathan Duddington *
* email: [email protected] *
* *
* 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"


+ 0
- 1
src/tr_languages.cpp 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;

+ 77
- 77
src/wave.cpp 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)
{
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 // myRead > aWrite
{
if ((size_t)(myBuffer + BUFFER_LENGTH - 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 if ((size_t)(aWrite + BUFFER_LENGTH - myRead) >= n)
else // myRead > aWrite
{
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);
}

size_t aUsedMem = aTopMem + aRest;
char* p = (char*)outputBuffer + aUsedMem;
memset(p, 0, n - aUsedMem);
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t));
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;

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;
}
}
}

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

Loading…
Cancel
Save