xiRetimer

fit recorded audio to a tempo
git clone https://git.ce9e.org/xiRetimer.git

commit
f1a6e775faa4498733596b95623a213a556f0de7
parent
89e3b7cd1f8d0b88ca17c60577ac509305a9dad3
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2010-11-17 20:58
first makefile

Diffstat

A makefile 18 ++++++++++++++++++
M src/curve.cpp 2 --
R src/main.cpp -> src/gui/main.cpp 0
R src/main.h -> src/gui/main.h 2 +-
M src/gui/retimer_wx.cpp 18 +++++++++---------
D src/make 3 ---
M src/sample.cpp 8 ++------
M xiRetimer 0

8 files changed, 30 insertions, 21 deletions


diff --git a/makefile b/makefile

@@ -0,0 +1,18 @@
   -1     1 VERSION = 0.2
   -1     2 CC      = /usr/bin/g++
   -1     3 CFLAGS  = -DMODE_RUBBERBAND -DICONS_GNOME -DVERSION=\"$(VERSION)\"
   -1     4 LDFLAGS = `sdl-config --cflags --libs` `pkg-config --cflags --libs rubberband sndfile`
   -1     5 
   -1     6 xiRetimer: gui back
   -1     7 	$(CC) $(CFLAGS) -o xiRetimer *.o $(LDFLAGS) `wx-config --cxxflags --libs`
   -1     8 
   -1     9 back: src/*.cpp src/*.h
   -1    10 	$(CC) $(CFLAGS) -c src/*.cpp src/*.h $(LDFLAGS)
   -1    11 
   -1    12 gui: back src/gui/*.cpp src/gui/*.h
   -1    13 	$(CC) $(CFLAGS) -c src/gui/*.cpp src/gui/*.h $(LDFLAGS) `wx-config --cxxflags --libs`
   -1    14 
   -1    15 .PHONY: clean
   -1    16 clean:
   -1    17 	rm -f *.o src/*.gch src/gui/*.gch
   -1    18 

diff --git a/src/curve.cpp b/src/curve.cpp

@@ -1,7 +1,5 @@
    1     1 #include "curve.h"
    2     2 
    3    -1 #include <cmath>
    4    -1 
    5     3 Curve::Curve(Marker* m, Sample* s, Playback* p) {
    6     4   marker=m;
    7     5   sample=s;

diff --git a/src/main.cpp b/src/gui/main.cpp

diff --git a/src/main.h b/src/gui/main.h

@@ -2,7 +2,7 @@
    2     2 #define __WXWIDGETSAPP_H
    3     3 
    4     4 #include <wx/wx.h>
    5    -1 #include "gui/RetimerMainFrame.h"
   -1     5 #include "RetimerMainFrame.h"
    6     6 
    7     7 class wxWidgetsApp : public wxApp
    8     8 {

diff --git a/src/gui/retimer_wx.cpp b/src/gui/retimer_wx.cpp

@@ -26,14 +26,14 @@ wxInitAllImageHandlers();
   26    26 	wxMenuItem* m_open;
   27    27 	m_open = new wxMenuItem( m_file, wxID_ANY, wxString( wxT("open") ) + wxT('\t') + wxT("CTRL+f"), wxEmptyString, wxITEM_NORMAL );
   28    28 	#ifdef ICONS_GNOME
   29    -1 	m_open->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/fileopen.png"), wxBITMAP_TYPE_ANY ) );
   -1    29 	m_open->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/fileopen.png"), wxBITMAP_TYPE_ANY ) );
   30    30 	#endif
   31    31 	m_file->Append( m_open );
   32    32 	
   33    33 	wxMenuItem* m_export;
   34    34 	m_export = new wxMenuItem( m_file, wxID_ANY, wxString( wxT("export") ) + wxT('\t') + wxT("CTRL+s"), wxEmptyString, wxITEM_NORMAL );
   35    35 	#ifdef ICONS_GNOME
   36    -1 	m_export->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/document-save.png"), wxBITMAP_TYPE_ANY ) );
   -1    36 	m_export->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/document-save.png"), wxBITMAP_TYPE_ANY ) );
   37    37 	#endif
   38    38 	m_file->Append( m_export );
   39    39 	
@@ -43,7 +43,7 @@ wxInitAllImageHandlers();
   43    43 	wxMenuItem* m_prefs;
   44    44 	m_prefs = new wxMenuItem( m_file, wxID_ANY, wxString( wxT("preferences") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
   45    45 	#ifdef ICONS_GNOME
   46    -1 	m_prefs->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/document-properties.png"), wxBITMAP_TYPE_ANY ) );
   -1    46 	m_prefs->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/document-properties.png"), wxBITMAP_TYPE_ANY ) );
   47    47 	#endif
   48    48 	m_file->Append( m_prefs );
   49    49 	
@@ -53,7 +53,7 @@ wxInitAllImageHandlers();
   53    53 	wxMenuItem* b_exit;
   54    54 	b_exit = new wxMenuItem( m_file, wxID_ANY, wxString( wxT("Exit") ) , wxEmptyString, wxITEM_NORMAL );
   55    55 	#ifdef ICONS_GNOME
   56    -1 	b_exit->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/window-close.png"), wxBITMAP_TYPE_ANY ) );
   -1    56 	b_exit->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/window-close.png"), wxBITMAP_TYPE_ANY ) );
   57    57 	#endif
   58    58 	m_file->Append( b_exit );
   59    59 	
@@ -63,14 +63,14 @@ wxInitAllImageHandlers();
   63    63 	wxMenuItem* m_play;
   64    64 	m_play = new wxMenuItem( m_edit, wxID_ANY, wxString( wxT("play/pause") ) + wxT('\t') + wxT("SPACE"), wxEmptyString, wxITEM_NORMAL );
   65    65 	#ifdef ICONS_GNOME
   66    -1 	m_play->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/media-playback-start.png"), wxBITMAP_TYPE_ANY ) );
   -1    66 	m_play->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/media-playback-start.png"), wxBITMAP_TYPE_ANY ) );
   67    67 	#endif
   68    68 	m_edit->Append( m_play );
   69    69 	
   70    70 	wxMenuItem* m_start;
   71    71 	m_start = new wxMenuItem( m_edit, wxID_ANY, wxString( wxT("start") ) + wxT('\t') + wxT("CTRL+LEFT"), wxEmptyString, wxITEM_NORMAL );
   72    72 	#ifdef ICONS_GNOME
   73    -1 	m_start->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/media-skip-backward.png"), wxBITMAP_TYPE_ANY ) );
   -1    73 	m_start->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/media-skip-backward.png"), wxBITMAP_TYPE_ANY ) );
   74    74 	#endif
   75    75 	m_edit->Append( m_start );
   76    76 	
@@ -80,14 +80,14 @@ wxInitAllImageHandlers();
   80    80 	wxMenuItem* m_clear;
   81    81 	m_clear = new wxMenuItem( m_edit, wxID_ANY, wxString( wxT("clear markers") ) + wxT('\t') + wxT("CTRL+c"), wxEmptyString, wxITEM_NORMAL );
   82    82 	#ifdef ICONS_GNOME
   83    -1 	m_clear->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/edit-clear.png"), wxBITMAP_TYPE_ANY ) );
   -1    83 	m_clear->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/edit-clear.png"), wxBITMAP_TYPE_ANY ) );
   84    84 	#endif
   85    85 	m_edit->Append( m_clear );
   86    86 	
   87    87 	wxMenuItem* m_process;
   88    88 	m_process = new wxMenuItem( m_edit, wxID_ANY, wxString( wxT("update audio data") ) + wxT('\t') + wxT("CTRL+u"), wxEmptyString, wxITEM_NORMAL );
   89    89 	#ifdef ICONS_GNOME
   90    -1 	m_process->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/stock_refresh.png"), wxBITMAP_TYPE_ANY ) );
   -1    90 	m_process->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/stock_refresh.png"), wxBITMAP_TYPE_ANY ) );
   91    91 	#endif
   92    92 	m_edit->Append( m_process );
   93    93 	
@@ -97,7 +97,7 @@ wxInitAllImageHandlers();
   97    97 	wxMenuItem* m_about;
   98    98 	m_about = new wxMenuItem( m_help, wxID_ANY, wxString( wxT("about") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
   99    99 	#ifdef ICONS_GNOME
  100    -1 	m_about->SetBitmaps( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/help-about.png"), wxBITMAP_TYPE_ANY ) );
   -1   100 	m_about->SetBitmap( wxBitmap( wxT("/usr/share/icons/gnome/16x16/actions/help-about.png"), wxBITMAP_TYPE_ANY ) );
  101   101 	#endif
  102   102 	m_help->Append( m_about );
  103   103 	

diff --git a/src/make b/src/make

@@ -1,3 +0,0 @@
    1    -1 g++ *.h *.cpp gui/*.h gui/*.cpp `wx-config --cxxflags --libs` `sdl-config --cflags --libs` `pkg-config --cflags --libs rubberband sndfile` -o ../xiRetimer
    2    -1 rm *.gch
    3    -1 rm gui/*.gch

diff --git a/src/sample.cpp b/src/sample.cpp

@@ -1,9 +1,6 @@
    1     1 #include "sample.h"
    2     2 #include <pthread.h>
    3     3 
    4    -1 // TODO create configure/make
    5    -1 #define MODE_RUBBERBAND
    6    -1 
    7     4 #include "rbprocess.h"
    8     5 
    9     6 Sample::Sample(Marker* m) {
@@ -117,11 +114,9 @@ int Sample::process() {
  117   114 //  process_bg();
  118   115   if (_processing) return 1;
  119   116   setFinished(0);
  120    -1 /*
  121   117   pthread_t thread;
  122   118   pthread_create(&thread, NULL, Sample::EntryPoint, (void*)this);
  123    -1 */
  124    -1   process_bg();
   -1   119 //  process_bg();
  125   120   return 0;
  126   121 }
  127   122 
@@ -155,6 +150,7 @@ Therefore it reads data from odata and writes to data.
  155   150   }
  156   151   setFinished(1);
  157   152   _processing=false;
   -1   153   return 0;
  158   154 }
  159   155 
  160   156 bool Sample::getProcessing() {return _processing;}

diff --git a/xiRetimer b/xiRetimer

Binary files differ.