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

Added stdin/stdout backend #56

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Erhannis
Copy link

I'm trying to virtualize minimodem as a Java library via NestedVM, and it seemed like it'd work best if it could operate on stdin/stdout, so I added a simpleaudio-stdio backend. You enable it with -O or --stdio. Lemme know if I messed something up, or if you actively don't want this feature, or something.

Erhannis and others added 4 commits February 10, 2022 16:10
…ndfile doesn't like the stdout file descriptor, atm.
…ves the same output as sa-sndfile raw, except there's 4000 00s at the end of it??? Also, rx isn't doing anything for some reason.
Copy link

@jcaesar jcaesar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I was trying to compile minimodem for wasm and your PR came in handy. Thank you. I'm not otherwise affiliated with this project. Just adding a few comments on stuff I found.

It'd be nice if this error message could be rewritten to so only --file and --stdio modes are available or something and come with an additional check to not be tripped in for stdio mode.

fprintf(stderr, "E: this build of minimodem was configured without system audio support,\nE: so only the --file mode is supported.\n");

[Edit:] (Side note: plays with pacat --rate=48000 --channels=1 --format=float32ne)

#if USE_STDIO
sa_backend = SA_BACKEND_STDIO;
// Apparently the receiver wants floats, so I'mma just output floats
sample_format = SA_SAMPLE_FORMAT_FLOAT;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a --float-samples command line flag. Instead of forcing the value here, couldn't you rely on that flag?

@russinnes
Copy link

+1 having stdin. Especially for soundcard-free hardware. I'm using this to process input from an rtl sdr (with sox piped inline to deal with the floating-point conversion)

@Manawyrm
Copy link

Manawyrm commented Oct 5, 2023

This PR is very helpful -- I've been working on getting minimodem hooked up to a PBX (telephone exchange) for a communications museum. This will allow old Telex/RTTY terminals to call into a number and then receive automatic service (through minimodem).

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

Successfully merging this pull request may close these issues.

4 participants