When you say a frequency, how precise does this have to be. If you are doing a hearing test I’m not sure how accurately a sound card is going to be at producing a pure frequency. You would have to perform some testing to ensure it meets your needs. I agree with Markus that a series of sound files with each frequency is likely the easiest option.
Thank you, Markus. That was my first thought too, and ChatGPT provided me with the Xojo code to create a wave file. The code was very compact and worked flawlessly after swapping the low and high words in the header. However, I foresee issues with wave files when dealing with a constantly and rapidly changing frequency.