Remix.run Logo
MichaelApproved 8 hours ago

One of the programs I enjoyed writing the most with VB6 was a telephony capable IM program. Over dial up!

The IM portion was simple logic but the real-time voice was a challenge back then because audio compression was in its infancy. The few real-time compression libraries that existed were expensive to license and some even required royalties. Way out of my league.

At the same time, writing a compression algorithm myself was beyond my abilities. There weren't any VHS courses on that topic yet haha.

My solution was to use the recording control that came with VB6. I couldn't set the audio bitrate with that control but, if I had the recorder append the recording to an existing file, it would use the bitrate defined in that existing file.

So I created a teeny tiny wave file with 0 seconds of audio, included it with the program binary, and used a copy of it to seed & set the bitrate of each conversation.

Since they weren't compressed, the file integrity was very forgiving. I was able to pull out a chunk of data from anywhere in the audio file, put it into its own file, and it would play the extracted chunk of audio just fine.

So, that's what I did. I used the VB6 recording control with my low bitrate seed file to record their voice, had my code grab 1 second chunks of audio from that file, "stream" it to the other end of the line, write the data to disk, and use another VB6 control to play it for the recipient.

Surprisingly, the sound wasn't choppy at all. The audio quality was low, since the bitrate was in the low dozens but the conveyer belt of 1 second wave files being played back to back to back was not noticeable at all.

Ended up selling a bunch of copies.

Fun times =D