Skip to content

Added stdin/stdout backend#56

Open
Erhannis wants to merge 4 commits intokamalmostafa:masterfrom
Erhannis:feature/stdio
Open

Added stdin/stdout backend#56
Erhannis wants to merge 4 commits intokamalmostafa:masterfrom
Erhannis:feature/stdio

Conversation

@Erhannis
Copy link
Copy Markdown

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
Copy Markdown

@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
Copy Markdown

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
Copy Markdown

+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
Copy Markdown

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