SAMPLEsample[2][2][576];// if this isn't kept per stream then the decode breaks up
// the 4k version of these 2 seems to work for everything, but I'm reverting to original 8k for safety jic.
//
#define NBUF (8*1024)
#define BUF_TRIGGER (NBUF-1500)
// #define NBUF (4096) // 2048 works for all except 133+ kbps VBR files, 4096 copes with these
// #define BUF_TRIGGER ((NBUF/4)*3)
unsignedcharbuf[NBUF];
intbuf_ptr0;
intbuf_ptr1;
intmain_pos_bit;
intband_limit_nsb;
intnBand[2][22];/* [long/short][cb] */
intsfBandIndex[2][22];/* [long/short][cb] */
inthalf_outbytes;
intcrcbytes;
intnchan;
intms_mode;
intis_mode;
unsignedintzero_level_pcm;
intmpeg25_flag;
intband_limit;
intband_limit21;
intband_limit12;
intgain_adjust;
intncbl_mixed;
};//L3;
};
// from csbt.c...
//
// if this isn't kept per stream then the decode breaks up
signedintvb_ptr;//
signedintvb2_ptr;//
floatvbuf[512];//
floatvbuf2[512];// this can be lost if we stick to mono samples
// L3 only...
//
intsr_index;// L3 only (99%)
intid;
// any type...
//
intoutvalues;
intoutbytes;
intframebytes;
intpad;
intnsb_limit;
// stuff added now that the game uses streaming MP3s...
//
byte*pbSourceData;// a useful dup ptr only, this whole struct will be owned by an sfx_t struct that has the actual data ptr field
intiSourceBytesRemaining;
intiSourceReadIndex;
intiSourceFrameBytes;
#ifdef _DEBUG
intiSourceFrameCounter;// not really important
#endif
intiBytesDecodedTotal;
intiBytesDecodedThisPacket;// not sure how useful this will be, it's only per-frame, so will always be full frame size (eg 2304 or below for mono) except possibly for the last frame?
intiRewind_FinalReductionCode;
intiRewind_FinalConvertCode;
intiRewind_SourceBytesRemaining;
intiRewind_SourceReadIndex;
bytebDecodeBuffer[2304*2];// *2 to allow for stereo now
intiCopyOffset;// used for painting to DMA-feeder, since 2304 won't match the size it wants
// some new stuff added for dynamic music, to allow "how many seconds left to play" queries...