File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ int main(int parc, char ** pars)
4040
4141 printf ("Playing..\n" );
4242
43- while (Soloud_getActiveVoiceCount (soloud ) > 0 )
43+ while (Soloud_getVoiceCount (soloud ) > 0 )
4444 {
4545 float * v = Soloud_calcFFT (soloud );
4646 printf ("\r%c " , (int )("|\\-/" [spin & 3 ]));
Original file line number Diff line number Diff line change @@ -82,13 +82,15 @@ int main(int argc, char *argv[])
8282 // Configure sound source
8383 printf (" %s\n >" , " What is your name?" );
8484 char name[512 ];
85- scanf ( " %511s " , name);
85+ fgets ( name, 511 , stdin);
8686 speech.setText (name);
87+ speech.setVolume (5 );
8788 // Play the sound source (we could do this several times if we wanted)
8889 soloud.play (speech);
8990
91+
9092 // Wait for voice to finish
91- while (soloud.getActiveVoiceCount () > 1 )
93+ while (soloud.getVoiceCount () > 1 )
9294 {
9395 // Still going, sleep for a bit
9496 SoLoud::Thread::sleep (100 );
You can’t perform that action at this time.
0 commit comments