sound is coming

Cette révision appartient à :
phyto 2019-05-27 15:15:48 +02:00
Parent 094de74445
révision 76bd00d052
2 fichiers modifiés avec 13 ajouts et 9 suppressions

Voir le fichier

@ -74,25 +74,29 @@ fprintf(stderr, "frames : %ld\n", sfinfo.frames);
fprintf(stderr, "seekable : %d\n", sfinfo.seekable);
#endif
foo = init_waveout(sfinfo.samplerate);
if (foo) {
fprintf(stderr, "init waveout -> %d\n", foo);
}
while ((lus = sf_read_short(sndf, buffer, T_BUFF_WAVES)))
{
#if DEBUG_LEVEL
fprintf(stderr, "%s : %d bytes read\n", fname, lus);
#endif
/* send all the bits to the audio output */
foo = ao_play(device, (char *)buffer, lus*2);
if (foo) {
fprintf(stderr, "ao_play -> %d\n", foo);
}
}
/* do some cleanup */
close_waveout();
sf_close(sndf);
return -1;
return 0;
}
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */

Voir le fichier

@ -3,7 +3,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include "player.h"