ajout de trucs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user