Mercurial > hg > dmlib
changeset 303:2b5472173355
Fix buffer length.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Oct 2012 18:07:00 +0300 |
parents | 43c985265fd5 |
children | 9a945c87f5ec |
files | testpl.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/testpl.c Thu Oct 11 18:01:15 2012 +0300 +++ b/testpl.c Thu Oct 11 18:07:00 2012 +0300 @@ -116,7 +116,6 @@ JSSModule *mod = NULL; JSSMixer *dev = NULL; JSSPlayer *plr = NULL; - int buflen = 4096; if (argc > 1) sname = argv[1]; @@ -180,7 +179,7 @@ afmt.freq = 48000; afmt.format = AUDIO_S16SYS; afmt.channels = 2; - + // Initialize mixing device fprintf(stderr, "Initializing miniJSS mixer with: %d, %d, %d\n", JSS_AUDIO_S16, afmt.channels, afmt.freq); @@ -192,7 +191,7 @@ return 3; } - afmt.samples = buflen; + afmt.samples = afmt.freq / 4; afmt.callback = audioCallback; afmt.userdata = (void *) dev;