/[svn]/linuxsampler/trunk/src/engines/gig/Synthesizer.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Synthesizer.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1484 by senoner, Thu Nov 15 13:24:41 2007 UTC revision 1485 by senoner, Thu Nov 15 23:35:45 2007 UTC
# Line 134  namespace LinuxSampler { namespace gig { Line 134  namespace LinuxSampler { namespace gig {
134                  return 1;                  return 1;
135              }              }
136    
137              inline static int getSample(sample_t* src, int pos) {              inline static int32_t getSample(sample_t* src, int pos) {
138                  if (BITDEPTH24) {                  if (BITDEPTH24) {
139                      pos *= 3;                      pos *= 3;
140                      #if WORDS_BIGENDIAN                      #if WORDS_BIGENDIAN
# Line 143  namespace LinuxSampler { namespace gig { Line 143  namespace LinuxSampler { namespace gig {
143                      #else                      #else
144                      // 24bit read optimization:                      // 24bit read optimization:
145                      // a misaligned 32bit read and subquent 8 bit shift is faster (on x86)  than reading 3 single bytes and shifting them                      // a misaligned 32bit read and subquent 8 bit shift is faster (on x86)  than reading 3 single bytes and shifting them
146                      return (*((int *)(&((char *)(src))[pos])))<<8;                      return (*((int32_t *)(&((char *)(src))[pos])))<<8;
147                      #endif                      #endif
148                  } else {                  } else {
149                      return src[pos];                      return src[pos];

Legend:
Removed from v.1484  
changed lines
  Added in v.1485

  ViewVC Help
Powered by ViewVC