I am trying to understand one of the CoreAudio examples and I am
really having a hard time. In the utils.cpp file, there is a method
called str2OSType.
if (len <= 8) {
if (sscanf (inString, "%lx", &outType) == 0) {
printf ("* * Bad conversion for OSType\n");
UsageString(1);
}
return;
}
printf ("* * Bad conversion for OSType\n");
UsageString(1);
}
First, I don't understand the need to convert a 4 byte string into a 4
byte OSType. That being said, where is there any documentation on
OSTypes. I found a definition in wikipedia that says that it is a 4
byte sequence used as a File/Directory identifier. However, I can't
find anything beyond that. For instance, what are the accepted values
for the identifiers? Furthermore, is the type definition in
CoreFoundation or does it reside deeper than that? I can't find
anything to give me any guidance on this.
Beyond my inability to locate documentation on OSType, I am having a
hard time with the assignment of "outType". I generally don't have an
appreciation for bit mathematics. If inString is a 4 character string
and workingString is a 4 character array, what is the function of the
bit shift and the bit Or? I don't understand what this section of code
is trying to do.
Any guidance would be greatly appreciated.
Thanks,
Will DeShazer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden