1. Please try multiple files for reproducing such problem (if you did not already)
2. I am surprised that the change to nTag=*pc; didnt render it broken as i would have expected that to pass only one byte of the tag data.
-- use this instead for a test: nTag=*(unsigned long *)&pc[0];
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I changed all the files that had this that were involved in the decoding process (including Adpcm.cpp)
It wont work because i found out that sparc expects integers to be always 4 byte aligned, cannot do:
char c[5];
char *cp = c+1;
long l = *(unsigned long*)cp;
One solution i can think of is:
union {
char data[4];
unsigned long ldata;
} tmp;
memcpy(tmp.data, inp, 4);
inputbuffer = tmp.ldata;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=559680
Originator: NO
1. Please try multiple files for reproducing such problem (if you did not already)
2. I am surprised that the change to nTag=*pc; didnt render it broken as i would have expected that to pass only one byte of the tag data.
-- use this instead for a test: nTag=*(unsigned long *)&pc[0];
Logged In: YES
user_id=1926381
Originator: YES
I changed all the files that had this that were involved in the decoding process (including Adpcm.cpp)
It wont work because i found out that sparc expects integers to be always 4 byte aligned, cannot do:
char c[5];
char *cp = c+1;
long l = *(unsigned long*)cp;
One solution i can think of is:
union {
char data[4];
unsigned long ldata;
} tmp;
memcpy(tmp.data, inp, 4);
inputbuffer = tmp.ldata;
Logged In: YES
user_id=559680
Originator: NO
Hmm, a memcpy to a properly aligned integer seems to be the only way then... darn, that sux!
Wouldnt a simple memcpy (without creating a union) be enough?
char c[5];
char *cp=c+1;
long l;
memcpy (&l,cp);
Logged In: YES
user_id=1926381
Originator: YES
sure its enough... i was tripping
Logged In: YES
user_id=559680
Originator: NO
started to fix those issues - that issue is mostly affecting the decoders, hardly any encoder.
Following decoders are fixed by now on CVS and should work fine on SPARC machines;
SMAF
WAV