Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18786/src

Modified Files:
        Experimental.h Menus.cpp NoteTrack.cpp TrackArtist.cpp 
Log Message:
Replaced allegro with portsmf as part of removing the EXPERIMENTAL_NOTE_TRACK 
flag and replacing it with USE_MIDI.  Changed ImportMIDI significantly to work 
with the new library.  Although allegro is no longer used when building 
Audacity, it has not yet been removed from CVS and will be removed once it is 
determined that portsmf causes no (additional) problems for developers.  Built 
and tested on Windows XP, untested on OSX and Linux.

Index: NoteTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/NoteTrack.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- NoteTrack.cpp       9 Jul 2008 23:34:42 -0000       1.15
+++ NoteTrack.cpp       11 Jul 2008 15:39:25 -0000      1.16
@@ -155,7 +155,7 @@
    return true;
 }
 
-void NoteTrack::SetSequence(Alg_seq *seq)
+void NoteTrack::SetSequence(Alg_seq_ptr seq)
 {
    if (mSeq)
       delete mSeq;

Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.392
retrieving revision 1.393
diff -u -d -r1.392 -r1.393
--- Menus.cpp   10 Jul 2008 21:58:44 -0000      1.392
+++ Menus.cpp   11 Jul 2008 15:39:24 -0000      1.393
@@ -3875,8 +3875,7 @@
          newTrack->SetSelected(true);
 
          PushState(wxString::Format(_("Imported MIDI from '%s'"),
-                                    fileName.c_str()),
-                   _("Import MIDI"));
+                                    fileName.c_str()), _("Import MIDI"));
 
          RedrawProject();
          mTrackPanel->EnsureVisible(newTrack);

Index: Experimental.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Experimental.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- Experimental.h      3 Jul 2008 22:53:18 -0000       1.40
+++ Experimental.h      11 Jul 2008 15:39:24 -0000      1.41
@@ -129,14 +129,6 @@
    // These are 'WX' plug ins that manage their own displays using
    // wxWindows.
    //#define EXPERIMENTAL_WX_PLUG_INS
-
-       // RBD and GSW: 
-   // This flag controls MIDI playback, the updated Allegro library,
-       // and other MIDI functionality. At this point, MIDI playback and
-   // saves are not implemented, but cut, paste, undo, and copy are
-   // basically working.
-   // So far, only compiled/tested on Win32.
-       #define EXPERIMENTAL_NOTE_TRACK
 #endif
 
 //If you want any of these files, ask JKC.  They are not

Index: TrackArtist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.cpp,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- TrackArtist.cpp     8 Jul 2008 20:58:47 -0000       1.122
+++ TrackArtist.cpp     11 Jul 2008 15:39:25 -0000      1.123
@@ -471,7 +471,11 @@
 
    #ifdef USE_MIDI
    // The note track isn't drawing a ruler at all!
+   // But it needs to!
    if (t->GetKind() == Track::Note) {
+      vruler->SetBounds(r.x, r.y+1, r.x + 1, r.y + r.height-1);
+      vruler->SetOrientation(wxVERTICAL);
+      vruler->Draw(*dc);
 
       dc->SetPen(*wxTRANSPARENT_PEN);
       dc->SetBrush(*wxWHITE_BRUSH);
@@ -2390,29 +2394,29 @@
 
   // NOTE: it would be better to put this in some global initialization
   // function rather than do lookups every time.
-  char *line = symbol_table.insert_string("line");
-  char *rectangle = symbol_table.insert_string("rectangle");
-  char *triangle = symbol_table.insert_string("triangle");
-  char *polygon = symbol_table.insert_string("polygon");
-  char *oval = symbol_table.insert_string("oval");
-  char *text = symbol_table.insert_string("text");
-  char *texts = symbol_table.insert_string("texts");
-  char *x1r = symbol_table.insert_string("x1r");
-  char *x2r = symbol_table.insert_string("x2r");
-  char *y1r = symbol_table.insert_string("y1r");
-  char *y2r = symbol_table.insert_string("y2r");
-  char *linecolori = symbol_table.insert_string("linecolori");
-  char *fillcolori = symbol_table.insert_string("fillcolori");
-  char *linethicki = symbol_table.insert_string("linethicki");
-  char *filll = symbol_table.insert_string("filll");
-  char *fonta = symbol_table.insert_string("fonta");
-  char *roman = symbol_table.insert_string("roman");
-  char *swiss = symbol_table.insert_string("swiss");
-  char *modern = symbol_table.insert_string("modern");
-  char *weighta = symbol_table.insert_string("weighta");
-  char *bold = symbol_table.insert_string("bold");
-  char *sizei = symbol_table.insert_string("sizei");
-  char *justifys = symbol_table.insert_string("justifys");
+  Alg_attribute line = symbol_table.insert_string("line");
+  Alg_attribute rectangle = symbol_table.insert_string("rectangle");
+  Alg_attribute triangle = symbol_table.insert_string("triangle");
+  Alg_attribute polygon = symbol_table.insert_string("polygon");
+  Alg_attribute oval = symbol_table.insert_string("oval");
+  Alg_attribute text = symbol_table.insert_string("text");
+  Alg_attribute texts = symbol_table.insert_string("texts");
+  Alg_attribute x1r = symbol_table.insert_string("x1r");
+  Alg_attribute x2r = symbol_table.insert_string("x2r");
+  Alg_attribute y1r = symbol_table.insert_string("y1r");
+  Alg_attribute y2r = symbol_table.insert_string("y2r");
+  Alg_attribute linecolori = symbol_table.insert_string("linecolori");
+  Alg_attribute fillcolori = symbol_table.insert_string("fillcolori");
+  Alg_attribute linethicki = symbol_table.insert_string("linethicki");
+  Alg_attribute filll = symbol_table.insert_string("filll");
+  Alg_attribute fonta = symbol_table.insert_string("fonta");
+  Alg_attribute roman = symbol_table.insert_string("roman");
+  Alg_attribute swiss = symbol_table.insert_string("swiss");
+  Alg_attribute modern = symbol_table.insert_string("modern");
+  Alg_attribute weighta = symbol_table.insert_string("weighta");
+  Alg_attribute bold = symbol_table.insert_string("bold");
+  Alg_attribute sizei = symbol_table.insert_string("sizei");
+  Alg_attribute justifys = symbol_table.insert_string("justifys");
 
   //We want to draw in seconds, so we need to convert to seconds
   seq->convert_to_seconds();
@@ -2566,7 +2570,7 @@
               while (n < 20) {
                 char name[8];
                 sprintf(name, "x%dr", n);
-                char *attr = symbol_table.insert_string(name);
+                Alg_attribute attr = symbol_table.insert_string(name);
                 double xn = LookupRealAttribute(note, attr, -1000000.0);
                 if (xn == -1000000.0) break;
                 points[n].x = TIME_TO_X(xn);


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to