~ubuntu-branches/ubuntu/edgy/muse/edgy

« back to all changes in this revision

Viewing changes to muse/audiotrack.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2006-01-03 20:18:47 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060103201847-r9poqt6y5gu9hnji
Tags: 0.7.1+0.7.2pre5-1
* New upstream version.
* Updated patches:
  + [20_allow_system_timer]
    Rediffed for 0.7.2pre5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//=========================================================
2
2
//  MusE
3
3
//  Linux Music Editor
4
 
//  $Id: audiotrack.cpp,v 1.14 2004/07/14 15:27:26 wschweer Exp $
 
4
//  $Id: audiotrack.cpp,v 1.14.2.1 2006/01/02 23:15:08 spamatica Exp $
5
5
//
6
6
//  (C) Copyright 2004 Werner Schweer (ws@seh.de)
7
7
//=========================================================
8
8
 
9
9
#include <values.h>
 
10
#include <qmessagebox.h>
10
11
 
11
12
#include "track.h"
12
13
#include "event.h"
657
658
//    gui part (executed in gui thread)
658
659
//---------------------------------------------------------
659
660
 
660
 
void AudioTrack::setRecordFlag1(bool f)
 
661
bool AudioTrack::setRecordFlag1(bool f)
661
662
      {
662
663
      if (f == _recordFlag)
663
 
            return;
 
664
            return true;
664
665
      if (f) {
665
666
            if (_recFile == 0) {
666
667
                  //
681
682
                     SF_FORMAT_WAV | SF_FORMAT_FLOAT,
682
683
                     _channels, sampleRate);
683
684
                  }
684
 
            _recFile->openWrite();
 
685
            if(_recFile->openWrite())
 
686
                  {
 
687
                  QMessageBox::critical(NULL, "MusE write error.", "Error creating target wave file\n" 
 
688
                                                                  "Check your configuration.");
 
689
                  return false;
 
690
 
 
691
                  }
685
692
            if (debugMsg)
686
693
                  printf("AudioNode::setRecordFlag1: create internal file %s\n",
687
694
                     _recFile->path().latin1());
697
704
                  _recFile = 0;
698
705
                  }
699
706
            }
 
707
      return true;
700
708
      }
701
709
double AudioTrack::auxSend(int idx) const
702
710
      {