Skip to main content
GameDev.net gamedev.net
🔒 Locked

WaveOut functions

Started by Yanroy Sep 11, 2000 at 10:23 AM 1 replies 350+ views
Original Post
Yanroy
Yanroy
I am making (made, actually, but it doesn't work too well) a text to speech synthesizer (sp?). I chose the not-so-recommended but easy way of making each phenome a wave file. I have the phenome interpreter in the program use PlaySound() to play the appropriate phenome. Just one problem: it is very VERY choppy. Other than that, it works quite well. I was looking up the PlaySound function and came across a link to the Wave Audio Functions or whatever. I have figured out that I need WaveOut*() but I don't know which functions of the family to use when and where and how, or for that matter why. Will this fix PlaySound()'s choppiness? If so, could someone either post some example code or point me to a tutorial? Edited by - Yanroy on 9/11/00 10:26:58 AM
--------------------

You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor
outRider
outRider
Theres always lag when you play sounds, one after the other, especially when reading them from the HD, so I'd use DSound, then you can just stream everything. I think WaveOut*() can do the same, but I only know DSound so I can't help you...

Edited by - outRider on September 11, 2000 4:06:24 PM
felisandria
felisandria
I''m going to agree on the "use DSound" suggestion.

Your PlaySound is being choppy most likely because every time you call it your computer has to reload the sound. DSound allows you to create buffers for the sounds you wish to use in memory. Once you''re loaded into one of the DSound buffers, the delay between the call to play and an actual sound output should be minimal. If it''s still "choppy", you can use the buffers of the sound clips to construct a buffer of your entire "sentence" before playing it for the user.
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.