Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include "soloud.h"
- #include "soloud_speech.h"
- #include "soloud_wav.h"
- #include "soloud_thread.h"
- // Entry point
- int main(int argc, char *argv[])
- {
- // Define a couple of variables
- SoLoud::Soloud soloud; // SoLoud engine core
- SoLoud::Speech speech; // A sound source (speech, in this case)
- SoLoud::Wav sound;
- sound.load("Kalimba.mp3");
- // Configure sound source
- speech.setText("1 2 3 1 2 3 Hello world. Welcome to So-Loud.");
- // initialize SoLoud.
- soloud.init();
- // Play the sound source (we could do this several times if we wanted)
- soloud.play(sound);
- // Wait until sounds have finished
- while (soloud.getActiveVoiceCount() > 0)
- {
- // Still going, sleep for a bit
- SoLoud::Thread::sleep(100);
- }
- // Clean up SoLoud
- soloud.deinit();
- // All done.
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement