Ça compile et ça plante pas. Mais ça lit pas encore. Sous linux, bidouillez le makefile.
This commit is contained in:
parent
7bcbce77be
commit
34614a2918
|
@ -1660,7 +1660,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="lecture" swapped="no"/>
|
||||
<signal name="clicked" handler="lancerLecture" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage" id="image6">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
all : ponytracker clean
|
||||
|
||||
ponytracker : main.o lecture.o motifs.o melodie.o
|
||||
gcc -L/opt/local/lib -lsdl -lsdl_mixer -lsdlmain -Wall main.o lecture.o motifs.o melodie.o -o ponytracker `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0`
|
||||
# gcc -std=c99 -L=/home/ebrunet/temp/SDL-2.0.3-8621/installation/lib -lsdl2 -lsdl_mixer -lsdlmain -Wall main.o lecture.o motifs.o melodie.o -o ponytracker `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0`
|
||||
gcc -std=c99 -L/opt/local/lib -Wall main.o lecture.o motifs.o melodie.o -o ponytracker `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0` -lSDL2 -lSDL2main -lSDL2_mixer
|
||||
|
||||
main.o : main.c
|
||||
gcc -L/opt/local/lib -lsdl -lsdl_mixer -lsdlmain -Wall -c main.c `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0`
|
||||
gcc -std=c99 -I/opt/local/include -Wall -c main.c `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0`
|
||||
|
||||
motifs.o : motifs/motifs.c motifs/motifs.h
|
||||
gcc -Wall -c motifs/motifs.c
|
||||
gcc -std=c99 -I/opt/local/include -Wall -c motifs/motifs.c
|
||||
|
||||
melodie.o : melodie/melodie.c melodie/melodie.h
|
||||
gcc -Wall -c melodie/melodie.c
|
||||
gcc -std=c99 -I/opt/local/include -Wall -c melodie/melodie.c
|
||||
|
||||
lecture.o : lecture/lecture.c lecture/lecture.h
|
||||
gcc -L/opt/local/lib -lsdl -lsdl_mixer -lsdlmain -Wall -c lecture/lecture.c
|
||||
gcc -std=c99 -I/opt/local/include -Wall -c lecture/lecture.c
|
||||
|
||||
clean :
|
||||
rm -f *.o
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include "../melodie/melodie.h"
|
||||
// #include "../instruments/instrument.h"
|
||||
|
||||
#include "/opt/local/include/SDL/SDL.h"
|
||||
#include "/opt/local/include/SDL/SDL_mixer.h"
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include "motifs/motifs.h"
|
||||
#include "melodie/melodie.h"
|
||||
#include "lecture/lecture.h"
|
||||
#include "/opt/local/include/SDL/SDL.h"
|
||||
#include "/opt/local/include/SDL/SDL_mixer.h"
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
|
||||
#define DEF_NBR_TMP 16
|
||||
#define MAX_PATTERNS 256
|
||||
|
@ -29,30 +29,19 @@ void debut(Motif* melodie[], Motif* liste, int nbrPortees){
|
|||
ajouterMotif(&liste, DEF_NBR_TMP, nbrPortees);
|
||||
Motif* m = liste;
|
||||
definirNote(m,0,4,5);
|
||||
definirNote(m,1,2,9);
|
||||
definirNote(m,0,2,9);
|
||||
ajouterMotif(&liste, DEF_NBR_TMP, nbrPortees);
|
||||
Motif* n = liste;
|
||||
definirNote(n,0,10,3);
|
||||
definirNote(n,1,6,7);
|
||||
definirNote(n,0,6,7);
|
||||
ajouterMotifVirtuel(melodie,0,m);
|
||||
ajouterMotifVirtuel(melodie,1,n);
|
||||
ajouterMotifVirtuel(melodie,2,m);
|
||||
ajouterMotifVirtuel(melodie,3,n);
|
||||
}
|
||||
|
||||
/*void lecture ()
|
||||
{
|
||||
gtk_main_quit();
|
||||
}*/
|
||||
|
||||
int main( int argc, char *argv[] ){
|
||||
Motif* melodie[MAX_PATTERNS] = {NULL};
|
||||
Motif* liste = NULL;
|
||||
int nbrPortees = 2;
|
||||
courant = 0;
|
||||
taille = 0;
|
||||
|
||||
debut(melodie, liste, nbrPortees);
|
||||
//lecture(nbrPortee, melodie);
|
||||
|
||||
// insérer code GTK ici
|
||||
|
@ -123,3 +112,14 @@ void fenetreMotif ( int argc, char *argv[] )
|
|||
|
||||
gtk_widget_show_all (maFenetreMotif);
|
||||
}
|
||||
|
||||
void lancerLecture ()
|
||||
{
|
||||
Motif* melodie[MAX_PATTERNS] = {NULL};
|
||||
Motif* liste = NULL;
|
||||
int nbrPortees = 1;
|
||||
courant = 0;
|
||||
taille = 0;
|
||||
debut(melodie, liste, nbrPortees);
|
||||
//lecture(nbrPortees,melodie);*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue