On Thu, 2 Sep 2004 03:19:43, Matthew Bevan writes: >I currently have an application which successfully streams raw PCM data in >signed 16-bit, Wintel-endian, 22kHz or 44kHz formats. Now on to the >difficult part. ... >The end goal is to generate one of the following: square, sine, or sawtooth >waves, though square is the priority. After some experimentation, I have >been unable to produce any sound with my existing square-wave algorithm - but >I have learned that the audio hardware is willing to produce pretty much any >frequency of audio. Unless it's silently wrapping it to the nearest "round" >frequency (44, 22, 11, or 8).
Don't forget to use the phase with which the previous sample buffer ended, + 1 sample phase delta, as the beginning phase for the first sample in the succeeding sampled sound buffer. Using waveform tables should allow any arbitrary periodic waveform to be produced. Table interpolation should sound reasonable if you start with high resolution waveform tables from which to copy/interpolate into the sample buffers. Multi-tap resampling filters for even lower aliasing distortion are also possible when using arm native code . Sin waves with a frequency accuracy of better than 0.1 Hz should be trivial using these methods. IMHO. YMMV. Ron Nicholson HotPaw Productions <http://www.hotpaw.com/rhn/palm/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
