i THINK that's the proper word...
what has bothered me ever since mac os 7 is the following question.
if i wanted to hand code the different sound element levels for a
particular sound or tone, how would i get this array of sound level
numbers into a sound file the machine can play?
just speaking hypothetically, if i wanted to create an array as such:
double cycle[360];
int i;
for (i = 0; i < 360; i++)
{
cycle[i] = sin((i / 360.0) * 6.28); // yeah, i know, not really two
times pi but good enough as an example
}
how would i get the cycle into a NSSound I can either write to a file or
play through NSSound's play?
> i THINK that's the proper word...
>
[quoted text clipped - 16 lines]
> how would i get the cycle into a NSSound I can either write to a file or
> play through NSSound's play?
by the way, i DO know that the data needs to be converted somehow to
some form of integer (most likely 8 or 16 bits) either signed or
unsigned with 128 as zero point (8 bit) or 32768 as zero point (16 bit).
what i need to know is where would i go to find this information or
somebody simply tell me the information. what coding does it use
(linear, logarithmic, mu-law, a-law, etc), what's the zero point, how
many bits, does it require dual channel or can one use a single channel?
from all this information i can create the data array of numbers. i
then need to know how it's supposed to be played using existing (not on
it's way out) routines.
Lawson English - 11 Feb 2007 06:44 GMT
>> i THINK that's the proper word...
>>
[quoted text clipped - 28 lines]
> then need to know how it's supposed to be played using existing (not on
> it's way out) routines.
That kind of stuff is now being handled in MacOS X by something called
Core Audio. There's plenty of built-in libraries and frameworks to
handle the issues:
http://www.apple.com/macosx/features/coreaudio/
Robert Dell - 21 Feb 2007 12:34 GMT
>>> i THINK that's the proper word...
>>>
[quoted text clipped - 34 lines]
>
> http://www.apple.com/macosx/features/coreaudio/
http://developer.apple.com/documentation/QuickTime/INMAC/SOUND/imsoundmgr.2c.htm
#pgfId=4097