ponytracker/sources/samples/samples.c

38 lines
639 B
C
Raw Normal View History

/**
* @file samples.c
*
* Implémentation de samples.h
*
* @version 1
* @author Guy
* @date Mai 2014
*/
#include "samples.h"
void ajouterSample(Sample* tab[], int i, char* chemin) {
tab[i] = calloc(1,sizeof(Sample));
sprintf(tab[i]->nom,"Sample %d",i);
2014-05-21 18:08:47 +02:00
strcpy(tab[i]->chemin,chemin);
}
2014-05-21 18:08:47 +02:00
void supprimerSample(Sample* tab[], int i) {
free(tab[i]);
}
void setNom(Sample* sample, char nom[]) {
strcpy(sample->nom,nom);
}
void setHauteur(Sample* sample, float hauteur) {
sample->hauteur_ref = hauteur;
}
char* getNom(Sample* sample) {
return sample->nom;
}
float getHauteur(Sample* sample) {
return sample->hauteur_ref;
}