Sending data to the audio-output device
Clearly the sundcard in a computer can handle a stream of data, since this is what happens when a .wav file is run in Windows Medium player (or whatever). I also am confident that the soundard plays a role in setting the speed at which the data arrive, otherwise the sound of the file would vary, depending on disk rotation speed, communication channel speed, and other hardware related potential bottlenecks.
Now, what Iâd like to do is create a random stream of data to send to the soundcard, to generate uninterrupted white noise.
If I had a file of white noise, I could play that through Windows Medium Player (the name that app would have if Microsoft could speak English...), and set it to loop continuously, but there is a break in the sound when it ârewinds,â and if the sound file has a different sound at the beginning and end, there is a âshiftâ in the sound as it moves from the end back to the beginning.
I want to generate the data for the sound myself. But how do I send it to the sound-playing device?
I want to create a rushing noise to mask out the drivel that those around me talk about throughout the day.
Once I get this to work, perhaps I'll add some modulation to create different effects, like a bird chirp, rainfall vs a waterfall, ocean waves or the kind of machinery background that the original Star Trek had.
But the first thing (naturally) is to establish effective communication with the sound card...
|