| 506 |
1 << hw->info.shift |
1 << hw->info.shift |
| 507 |
); |
); |
| 508 |
if (!oss->pcm_buf) { |
if (!oss->pcm_buf) { |
| 509 |
dolog ("Could not allocate DAC buffer (%d bytes)\n", |
dolog ( |
| 510 |
hw->samples << hw->info.shift); |
"Could not allocate DAC buffer (%d samples, each %d bytes)\n", |
| 511 |
|
hw->samples, |
| 512 |
|
1 << hw->info.shift |
| 513 |
|
); |
| 514 |
oss_anal_close (&fd); |
oss_anal_close (&fd); |
| 515 |
return -1; |
return -1; |
| 516 |
} |
} |
| 600 |
hw->samples = (obt.nfrags * obt.fragsize) >> hw->info.shift; |
hw->samples = (obt.nfrags * obt.fragsize) >> hw->info.shift; |
| 601 |
oss->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift); |
oss->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift); |
| 602 |
if (!oss->pcm_buf) { |
if (!oss->pcm_buf) { |
| 603 |
dolog ("Could not allocate ADC buffer (%d bytes)\n", |
dolog ("Could not allocate ADC buffer (%d samples, each %d bytes)\n", |
| 604 |
hw->samples << hw->info.shift); |
hw->samples, 1 << hw->info.shift); |
| 605 |
oss_anal_close (&fd); |
oss_anal_close (&fd); |
| 606 |
return -1; |
return -1; |
| 607 |
} |
} |
| 660 |
|
|
| 661 |
if (nread > 0) { |
if (nread > 0) { |
| 662 |
if (nread & hw->info.align) { |
if (nread & hw->info.align) { |
| 663 |
dolog ("warning: Misaligned read %d (requested %d), " |
dolog ("warning: Misaligned read %zd (requested %d), " |
| 664 |
"alignment %d\n", nread, bufs[i].add << hwshift, |
"alignment %d\n", nread, bufs[i].add << hwshift, |
| 665 |
hw->info.align + 1); |
hw->info.align + 1); |
| 666 |
} |
} |