Sampling Audio Signal
If your code is working correctly, than there should be no aliasing.

Most likely this is a problem with your playback system. Most sound cards in computers are terrible and will create a lot of noise and other artifacts. Since the 19 kHz tone is inaudible for most people, you just hear the artifacts. 

It's also possible that you turn up the volume too high. The 19 kHz may easily clip your playback hardware. You can't tell if it's "too loud" since your auditory sensitivity  at 19 kHz is basically zero. You may have also clipped the sine wave when sending it to the sound card.

There is also the software stack: On Windows, most sound will go through the kernel mixer, which often applies sample rate conversion and other processing. It's default behavior is quite bad, so this is also likely to create a lot of artifacts and noise.

Playing sine waves cleanly requires decent equipment. Typically a good external sound card and a dedicated SW driver that bypasses the operating system. You can try saving it as a wave file and play it over some "known good" hardware.