/[svn]/qsampler/trunk/src/qsamplerChannel.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannel.cpp

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

revision 2563 by capela, Tue May 20 10:59:37 2014 UTC revision 2567 by capela, Tue May 20 14:47:53 2014 UTC
# Line 830  bool Channel::isSf2InstrumentFile ( cons Line 830  bool Channel::isSf2InstrumentFile ( cons
830    
831          QFile file(sInstrumentFile);          QFile file(sInstrumentFile);
832          if (file.open(QIODevice::ReadOnly)) {          if (file.open(QIODevice::ReadOnly)) {
833                  char achHeader[8];                  char achHeader[12];
834                  if (file.read(achHeader, 8) > 0) {                  if (file.read(achHeader, 12) > 0) {
835                          bResult = (::memcmp(&achHeader[0], "RIFF", 4) == 0                          bResult = (::memcmp(&achHeader[0], "RIFF", 4) == 0
836                                          && ::memcmp(&achHeader[4], "sfbk", 4) == 0);                                          && ::memcmp(&achHeader[8], "sfbk", 4) == 0);
837                  }                  }
838                  file.close();                  file.close();
839          }          }
# Line 843  bool Channel::isSf2InstrumentFile ( cons Line 843  bool Channel::isSf2InstrumentFile ( cons
843    
844    
845  // Retrieve the instrument list of a instrument file (.gig).  // Retrieve the instrument list of a instrument file (.gig).
846  QStringList Channel::getInstrumentList(  QStringList Channel::getInstrumentList (
847          const QString& sInstrumentFile, bool bInstrumentNames )          const QString& sInstrumentFile, bool bInstrumentNames )
848  {  {
849          QStringList instlist;          QStringList instlist;
# Line 859  QStringList Channel::getInstrumentList( Line 859  QStringList Channel::getInstrumentList(
859                  if (isDlsInstrumentFile(sInstrumentFile)) {                  if (isDlsInstrumentFile(sInstrumentFile)) {
860                          RIFF::File *pRiff                          RIFF::File *pRiff
861                                  = new RIFF::File(sInstrumentFile.toUtf8().constData());                                  = new RIFF::File(sInstrumentFile.toUtf8().constData());
862                          gig::File  *pGig  = new gig::File(pRiff);                          gig::File *pGig = new gig::File(pRiff);
863                  #if HAVE_LIBGIG_SETAUTOLOAD                  #if HAVE_LIBGIG_SETAUTOLOAD
864                          // prevent sleepy response time on large .gig files                          // prevent sleepy response time on large .gig files
865                          pGig->SetAutoLoad(false);                          pGig->SetAutoLoad(false);

Legend:
Removed from v.2563  
changed lines
  Added in v.2567

  ViewVC Help
Powered by ViewVC