-
Notifications
You must be signed in to change notification settings - Fork 118
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
base: master
Are you sure you want to change the base?
Conversation
…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.
There was a problem hiding this 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.
Line 797 in bb2f34c
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; |
There was a problem hiding this comment.
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?
+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) |
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). |
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.