Howdy!

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.

Correct me if I'm wrong, but I'm currently under the impression that 8-bit PCM 
data represents a voltage on the audio hardware of 0V to 1V, in 256 
increments.  16-bit data, being signed, would be from -32,768 to 32,767, 
representing (again) voltage from 0V to 1V.  "Silence" is any frame in which 
the voltage level does not change, thus to generate sound, the voltage must 
vary.

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).  Probably it's too early in the 
oh-my-god-what-am-I-doing-up-this-late-ning to be doing this much head 
wrapping, so, I'll ask: has anyone already produced something which would 
generate a square wave of a specific frequency?  Or could someone slap 
together an appropriate example?  As I'm not reading PCM data from a 
predefined source like a VFS file, pretty much all of the existing examples 
do not help me much.

A little help would go an awful long way in my 6 hour search for an answer.  
Thanks in advance,
        Matthew Bevan

-- 
Matthew Bevan, Margin Software
 - Re-inventing the wheel, every time.

FYI - Finagle's fourth Law:
        Once a job is fouled up, anything done to improve it only makes it worse.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to