I don't believe the code is even being touched.

This alone tells me your test environment is way too complicated, withy far too much untested code, any or all of which may be broken with unknown symptoms.

Why not just add a trivial main to the Sound class to create a new instance, just keep ines 43-58 for now, on line 47 declare out directly as a file output stream, and change the while loop to exit and close the file when you have written a few k bytes. That will give you something for a meaningful first test. You can restore the other bits one at a time, testing as you go, once that's working.

Here's a useful rule of thumb: if, while you are still coding, one run of a test reveals more than one new bug, you need to be running more and simpler tests.

Alright, I did what you recommended and ended up writing 1.34MB of audio to an mp3 file. The file will not play in any audio programs. Which in a way I understand. But how would I play this to see if it actually worked?

That sounds like a sensible start - something is being captured!If it's a valid mp3 file then it should play in almost anything - Windows Media Player, iTunes etc. I would try a few different apps to see if any gives a sensible error message as to why the file's not playable.

Honestly I had to manually create it. In code I haven't specified a file format, I assume I have to do that?

Any ideas?

I know that this is an old topic, but maybe somebody will be interested:
For Java I can recommend the mizu java sip client as it has a very simple to use API and everything needed for VoIP in a single jar file, easily to embed into any project.
Hope this will help.