(02-22-2025, 08:56 PM)Petr Wrote: If I understand correctly, you want to encode data into sound. Well, it could probably work. What do you need for that? You need to encode 256 different frequencies, each representing one byte.
That makes sense. Back in the cassette days, if one tape player's motor was slower than another's, wouldn't the pitch / frequency of the sounds be slightly different depending on the tape machine used? How did they get around this?
(02-22-2025, 08:56 PM)Petr Wrote: The second program opens the data file and converts it back to data. If this works, the only question is what the distortion will be during transmission in practice.
Yes, that's why I was wondering what kind of checksum or redundancy might be used.
(02-22-2025, 08:56 PM)Petr Wrote: To transfer data between two computers in the form of sound, you will need a good quality microphone, or connect the SPK output of one computer to the LineIn of the other computer with a cable. But here we run into a problem, because so far I don't know of anything in QB64PE that can record sound from LineIn. It is probably necessary to use winmm.dll, but I currently don't have a program that can communicate with LineIn.
This might be something a @SpriggsySpriggs API solution could help with?
I guess for now we could record the audio with some other program and save it to a WAV file, and the decoding program could extract the data from that?
Thanks for your answer, I will try running your code later!