Hi Davie,
The basic methodology for reproducing a spoken number is to pass the
number as a string to your speak number function then have the string be
parced in to individual pieces.
You would fstart by getting the string length wich would determin if you
are dealing with a single digit, double digit, triple digit, and so on.
You would then pass that info on to a special function that then breaks
downt he string in to ones, tens, hundres, etc and speaks each part of
the string array in sequence. It would look something like this.
void SpeakNumber(string number)
{
switch (number.Length())
{
case 1:
SpeakOnes(number);
break;
case 2:
SpeakTens(number);
break;
case 3:
SpeakHundreds((number);
break;
}
}
void SpeakOnes(string number)
{
if (number == 1)
{
number1.Play(0, BufferPlayFlags.Default);
while (number1.Status.Playing == true)
{
application.DoEvents();
}
}
}
For more complex numbers like hundreds, thousands, etc the code gets
allot more complex as you have to check each part of the array by
searshing for the index, and returning what value is stored there.
If you are having issues with loading and playing wav files the nuimber
code is still a ways off before you can skillfully create a method to
handle this.
Davy Kager wrote:
> Can someone maybe give me some clue about how to produce numbers like
> one-thousand-two-hundred-twenty-five? At the moment I even can't load a
> sound into a buffer, but I'm sure it will become very useful to know how to
> produce scores...
>
_______________________________________________
Gamers mailing list .. [email protected]
To unsubscribe send E-mail to [EMAIL PROTECTED] You can visit
http://audyssey.org/mailman/listinfo/gamers_audyssey.org to make
any subscription changes via the web.