Hi, a few years ago I wrote a program in C that did various bits of processing on a wave file. Originally I wanted to use
Java but a part of the file format for a 8-bit wave file contains a stucture that is based on various unsigned types:
typedef struct {
ID chunkID;
long chunkSize;
short wFormatTag;
unsigned short wChannels;
unsigned long dwSamplesPerSec;
unsigned long dwAvgBytesPerSec;
unsigned short wBlockAlign;
unsigned short wBitsPerSample;
/* Note: there may be additional fields here, depending upon wFormatTag. */
} FormatChunk;
My questions are these:
How do you deal with such file format constraints in Java?
Is it just that "well, some things are better suited for some languages and others for other languages"?
Why are there no unsigned longs and shorts in Java? Doesn't it make sense for Java to incorporate these, especially as it tries to be so ubiquitous in so many different ways. Even the audio api isn't all that robust since it doesn't allow for 16 bit or larger wave files or surround sound etc.; it seems there are a such a wide range of applications (look at the pro-audio section of any music store) that java is missing out on. I had hoped that in new versions of Java unsigned types would be incorportated. What's up with that?
Thanks in advance!
-Andreas
[ March 19, 2002: Message edited by: Andreas Falley ]