ajout de trucs

This commit is contained in:
Raspbeguy
2014-05-15 21:45:20 +02:00
parent 2928c5869d
commit 13ebcd00f9
4 changed files with 20 additions and 7 deletions

View File

@@ -10,6 +10,15 @@
#include "instruments.h"
void ajouterInstrument(Instrument* tab[], int i){
tab[i]=calloc(1,sizeof(Instrument));
strcpy(tab[i]->nom,"Nouvel instrument");
}
void supprimerInstrument(Instrument* tab[], int i){
free(tab[i]);
}
int getVolume(Instrument* inst) {
return inst->volume;
}

View File

@@ -29,9 +29,13 @@ typedef struct _intrument {
Enveloppe enveloppe;
int balance;
int volume;
char* nom;
char nom[20];
} Instrument;
void ajouterInstrument(Instrument* tab[], int i);
void supprimerInstrument(Instrument* tab[], int i);
int getVolume(Instrument* inst);
int getBalance(Instrument* inst);