~ubuntu-branches/ubuntu/utopic/muse/utopic

« back to all changes in this revision

Viewing changes to synti/fluidsynth/fluidsynti.cpp

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2013-01-07 10:27:14 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20130107102714-fajkwjbz02aqupbh
Tags: 2.1-1
* New upstream release.
* Refresh 1001-buildsystem.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
#include <QFileInfo>
36
36
#include <QFileDialog>
 
37
#include <QString>
37
38
 
38
39
//#include "common_defs.h"
39
40
#include "fluidsynti.h"
615
616
      else
616
617
      {
617
618
 
618
 
          // TODO: Strings should be translated, this does
619
 
          //       however require the class to be derived from qobject
620
 
          //       tried in vain to make the call in the gui object
621
 
          //       could'nt get it to work due to symbol missing in .so ...
622
 
          QString newName = QFileDialog::getOpenFileName(0,
623
 
                                  QString("Can't find soundfont: %1 - Choose soundfont").arg(filename),
624
 
                                  filename,
625
 
                                  QString("Soundfonts (*.sf2);;All files (*)"));
626
 
          helper->filename = newName.toStdString();
 
619
          //printf("current path: %s \nmuseProject %s\nfilename %s\n",QDir::currentPath().toLatin1().data(), MusEGlobal::museProject.toLatin1().data(), filename);
 
620
          QFileInfo fi(filename);
 
621
          if (QFile::exists(fi.fileName()))
 
622
              helper->filename = QDir::currentPath().toStdString() + "/" + fi.fileName().toStdString();
 
623
          else {
 
624
              // TODO: Strings should be translated, this does
 
625
              //       however require the class to be derived from qobject
 
626
              //       tried in vain to make the call in the gui object
 
627
              //       could'nt get it to work due to symbol missing in .so ...
 
628
              QString newName = QFileDialog::getOpenFileName(0,
 
629
                                      QString("Can't find soundfont: %1 - Choose soundfont").arg(filename),
 
630
                                      filename,
 
631
                                      QString("Soundfonts (*.sf2);;All files (*)"));
 
632
              helper->filename = newName.toStdString();
 
633
          }
627
634
      }
628
635
 
629
636
      if (pthread_create(&fontThread, attributes, ::fontLoadThread, (void*) helper))
1220
1227
//---------------------------------------------------------
1221
1228
//   getPatchName
1222
1229
//---------------------------------------------------------
1223
 
const char* FluidSynth::getPatchName(int i, int, bool /*drum*/) const
 
1230
QString FluidSynth::getPatchName(int i, int, bool /*drum*/) const
1224
1231
      {
1225
1232
      if (channels[i].font_intid == FS_UNSPECIFIED_FONT ||
1226
1233
          channels[i].font_intid == FS_UNSPECIFIED_ID)