Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcmrecord --catmode writes error message into stream #113

Closed
argilo opened this issue Feb 11, 2025 · 1 comment
Closed

pcmrecord --catmode writes error message into stream #113

argilo opened this issue Feb 11, 2025 · 1 comment

Comments

@argilo
Copy link
Contributor

argilo commented Feb 11, 2025

If multicast is not enabled on the loopback interface, then pcmrecord --catmode writes an error message to stdout, which gets mixed in with the data stream. (It has an odd number of characters, so it corrupts the samples.) The error messages come from loopback.c, lines 526 and 529:

ka9q-radio/multicast.c

Lines 525 to 529 in 14ac7cf

if (ioctl(fd, SIOCSIFFLAGS, &ifr) < 0) {
printf("Can't enable multicast option on loopback interface %s\n",ifr.ifr_name);
perror("ioctl (set flags)");
} else {
printf("Multicast enabled on loopback interface %s\n",ifr.ifr_name);

These messages also corrupt the display of the monitor utility.

@ka9q
Copy link
Owner

ka9q commented Feb 11, 2025

oops, I'll send it to standard error. I thought I'd done that.

ncurses display corruption is hard to fix, it's a longstanding problem. You can always refresh the screen with control-L.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants