Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 529 → Rev 530

/programy/C/ix86/sound/sonar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programy/C/ix86/sound/sonar.c
270,7 → 270,7
int err;
avail = snd_pcm_avail_update(handle);
while ((avail >= period_size) /*&& ((period*period_size) < (CHIRP_SIZE-100))*/ ) {
while ((avail >= period_size) && ((period*period_size) < (CHIRP_SIZE-100)) ) {
 
err = snd_pcm_writei(handle, (chirp+period*period_size), period_size);
if (err < 0) {
359,10 → 359,10
printf("Setting of hwparams failed: %s\n", snd_strerror(err));
exit(EXIT_FAILURE);
}
/* if ((err = set_swparams(capture_handle, swparams)) < 0) {
if ((err = set_swparams(capture_handle, swparams)) < 0) {
printf("Setting of swparams failed: %s\n", snd_strerror(err));
exit(EXIT_FAILURE);
}*/
}
 
// allocate memory for frame (package of samples)
frame = malloc((period_size * channels * snd_pcm_format_physical_width(format)) / 8);
446,7 → 446,7
 
/* because all other work is done in the signal handler,
suspend the process */
while(cperiod<10) {
while(cperiod<3) {
sleep(1);
}