João Alberto wrote:
> 
> I wrote a peace of code that do this :
> 
> 1 - The user writes a number
> 2 - That number is converted to its soundable equivalent
> 3 - The resulting string is broken in peaces of text
> 4 - To each peace of text we have a file named 'PeaceOfText.Wav', like
>     ONE.WAV, HUNDRED.WAV, CENT.WAV, CENTS.WAV and so.
> 5 - This several 'PeacesOfText.wav' are loaded to a
>     MediaPlayer's FileName Property and then played

There's part of the problem right there.  Using the media player for
anything more complex than playing a single sound is A Bad Idea(tm) in my
opionion.

Have a look at the waveOutXxx functions in the multimedia API.  It's not
that difficult to get a sound playing through the APIs, and it'll sound a
hell of a lot better.  When you go direct to the API you get a lot more
control - like being able to pre-queue a list of wavs rather than waiting on
one to end before loading the next.


Another option is to create a temporary wav file by concatenating the sound
pieces together to create a file containing the entire string.  This is a
little simpler than handling waveOut yourself, and should give approximately
the same results.

-- 
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur!"
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"

Reply via email to