/[svn]/libgig/trunk/src/DLS.cpp
ViewVC logotype

Diff of /libgig/trunk/src/DLS.cpp

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

revision 918 by persson, Sat Sep 2 08:45:37 2006 UTC revision 928 by persson, Tue Oct 24 19:32:47 2006 UTC
# Line 254  namespace DLS { Line 254  namespace DLS {
254                  LoadString(CHUNK_ID_ISRC, lstINFO, Source);                  LoadString(CHUNK_ID_ISRC, lstINFO, Source);
255                  LoadString(CHUNK_ID_ISRF, lstINFO, SourceForm);                  LoadString(CHUNK_ID_ISRF, lstINFO, SourceForm);
256                  LoadString(CHUNK_ID_ICMS, lstINFO, Commissioned);                  LoadString(CHUNK_ID_ICMS, lstINFO, Commissioned);
257                    LoadString(CHUNK_ID_ISBJ, lstINFO, Subject);
258              }              }
259          }          }
260      }      }
# Line 374  namespace DLS { Line 375  namespace DLS {
375          SaveString(CHUNK_ID_ISRC, lstINFO, Source, String(""), 128);          SaveString(CHUNK_ID_ISRC, lstINFO, Source, String(""), 128);
376          SaveString(CHUNK_ID_ISRF, lstINFO, SourceForm, String(""), 128);          SaveString(CHUNK_ID_ISRF, lstINFO, SourceForm, String(""), 128);
377          SaveString(CHUNK_ID_ICMS, lstINFO, Commissioned, String(""), 128);          SaveString(CHUNK_ID_ICMS, lstINFO, Commissioned, String(""), 128);
378            SaveString(CHUNK_ID_ISBJ, lstINFO, Subject, String(""), 128);
379      }      }
380    
381    
# Line 485  namespace DLS { Line 487  namespace DLS {
487                                                     : SamplerOptions & (~F_WSMP_NO_TRUNCATION);                                                     : SamplerOptions & (~F_WSMP_NO_TRUNCATION);
488          SamplerOptions = (NoSampleCompression) ? SamplerOptions | F_WSMP_NO_COMPRESSION          SamplerOptions = (NoSampleCompression) ? SamplerOptions | F_WSMP_NO_COMPRESSION
489                                                 : SamplerOptions & (~F_WSMP_NO_COMPRESSION);                                                 : SamplerOptions & (~F_WSMP_NO_COMPRESSION);
490            memcpy(&pData[4], &UnityNote, 2);
491            memcpy(&pData[6], &FineTune, 2);
492            memcpy(&pData[8], &Gain, 4);
493            memcpy(&pData[12], &SamplerOptions, 4);
494            memcpy(&pData[16], &SampleLoops, 4);
495          // update loop definitions          // update loop definitions
496          for (uint32_t i = 0; i < SampleLoops; i++) {          for (uint32_t i = 0; i < SampleLoops; i++) {
497              //FIXME: this does not handle extended loop structs correctly              //FIXME: this does not handle extended loop structs correctly
# Line 527  namespace DLS { Line 534  namespace DLS {
534              // PCM format specific              // PCM format specific
535              if (FormatTag == WAVE_FORMAT_PCM) {              if (FormatTag == WAVE_FORMAT_PCM) {
536                  BitDepth     = pCkFormat->ReadUint16();                  BitDepth     = pCkFormat->ReadUint16();
537                  FrameSize    = (FormatTag == WAVE_FORMAT_PCM) ? (BitDepth / 8) * Channels                  FrameSize    = (BitDepth / 8) * Channels;
                                                             : 0;  
538              } else { // unsupported sample data format              } else { // unsupported sample data format
539                  BitDepth     = 0;                  BitDepth     = 0;
540                  FrameSize    = 0;                  FrameSize    = 0;

Legend:
Removed from v.918  
changed lines
  Added in v.928

  ViewVC Help
Powered by ViewVC