How TO Produce animal voices.. In c++ code

as we know about
 
Beep(523,500);

But How it will produce animal like horse voice
Try mixing the infinite frequencyes and lasts of beeps ;)
What would you like the horse to say???
Hello World :)
You'd need a library that supports sound output.
You need to load the audio stream, and then play it.

Here's an example in SFML-2.0:
1
2
3
4
5
6
7
8
9
10
#include <SFML/Audio.hpp>

int main()
{
    sf::Music fluttershy; // Since you wanted horse sounds.
    fluttershy.openFromFile("squee.ogg");
    fluttershy.play();
    std::this_thread::sleep_for(std::chrono::seconds(3)); // Just wait for the sound to finish.
    return 0;
}


Core C++ offers no such facilities, Beep is also not part of the core language.
Topic archived. No new replies allowed.