jamie@50: /* libxtract feature extraction library jamie@50: * jamie@50: * Copyright (C) 2006 Jamie Bullock jamie@50: * jamie@50: * This program is free software; you can redistribute it and/or modify jamie@50: * it under the terms of the GNU General Public License as published by jamie@50: * the Free Software Foundation; either version 2 of the License, or jamie@50: * (at your option) any later version. jamie@50: * jamie@50: * This program is distributed in the hope that it will be useful, jamie@50: * but WITHOUT ANY WARRANTY; without even the implied warranty of jamie@50: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jamie@50: * GNU General Public License for more details. jamie@50: * jamie@50: * You should have received a copy of the GNU General Public License jamie@50: * along with this program; if not, write to the Free Software jamie@50: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, jamie@50: * USA. jamie@50: */ jamie@50: jamie@50: #include "xtract/libxtract.h" jamie@50: #include jamie@50: #include jamie@50: #define XTRACT jamie@50: jamie@50: void *xtract_make_descriptors(){ jamie@52: jamie@50: t_function_descriptor *fd, *d; jamie@51: t_type *type; jamie@50: int f , F; jamie@51: char *name, *p_name, *desc, *p_desc, *author; jamie@51: int *argc, *year; jamie@52: jamie@50: f = F = XTRACT_FEATURES; jamie@50: jamie@50: fd = malloc(XTRACT_FEATURES * sizeof(t_function_descriptor)); jamie@50: jamie@51: jamie@50: while(f--){ jamie@51: jamie@50: d = &fd[f]; jamie@51: argc = &d->argc; jamie@51: type = &d->argv.type; jamie@51: jamie@50: switch(f){ jamie@52: jamie@50: case MEAN: jamie@50: case VARIANCE: jamie@50: case STANDARD_DEVIATION: jamie@50: case AVERAGE_DEVIATION: jamie@52: case SPECTRAL_MEAN: jamie@52: case SPECTRAL_VARIANCE: jamie@52: case SPECTRAL_STANDARD_DEVIATION: jamie@52: case SPECTRAL_AVERAGE_DEVIATION: jamie@50: case ROLLOFF: jamie@52: case SPECTRAL_INHARMONICITY: jamie@50: case MAGNITUDE_SPECTRUM: jamie@50: case ODD_EVEN_RATIO: jamie@50: case LOWEST_VALUE: jamie@50: case F0: jamie@50: case FAILSAFE_F0: jamie@50: case TONALITY: jamie@51: *argc = 1; jamie@52: *type = FLOAT; jamie@50: break; jamie@50: case SKEWNESS: jamie@50: case KURTOSIS: jamie@52: case SPECTRAL_SKEWNESS: jamie@52: case SPECTRAL_KURTOSIS: jamie@52: case PEAK_SPECTRUM: jamie@52: case HARMONIC_SPECTRUM: jamie@50: case NOISINESS: jamie@50: case CREST: jamie@51: *argc = 2; jamie@52: *type = FLOAT; jamie@50: break; jamie@50: case MFCC: jamie@51: *argc = 1; jamie@52: *type = MEL_FILTER; jamie@50: break; jamie@50: case BARK_COEFFICIENTS: jamie@51: *argc = BARK_BANDS; jamie@52: *type = INT; jamie@50: break; jamie@52: case SPECTRAL_CENTROID: jamie@50: case IRREGULARITY_K: jamie@50: case IRREGULARITY_J: jamie@50: case TRISTIMULUS_1: jamie@50: case TRISTIMULUS_2: jamie@50: case TRISTIMULUS_3: jamie@50: case SMOOTHNESS: jamie@50: case FLATNESS: jamie@50: case SPREAD: jamie@50: case ZCR: jamie@50: case LOUDNESS: jamie@50: case HIGHEST_VALUE: jamie@50: case SUM: jamie@50: case RMS_AMPLITUDE: jamie@50: case POWER: jamie@50: case SHARPNESS: jamie@52: case SPECTRAL_SLOPE: jamie@50: case HPS: jamie@50: case FLUX: jamie@50: case ATTACK_TIME: jamie@50: case DECAY_TIME: jamie@50: case DELTA_FEATURE: jamie@50: case AUTOCORRELATION_FFT: jamie@50: case DCT: jamie@50: case AUTOCORRELATION: jamie@50: case AMDF: jamie@50: case ASDF: jamie@51: *argc = 0; jamie@50: break; jamie@50: default: jamie@51: *argc = 0; jamie@50: break; jamie@50: } jamie@51: jamie@50: name = d->algo.name; jamie@51: p_name = d->algo.p_name; jamie@51: desc = d->algo.desc; jamie@51: p_desc = d->algo.p_desc; jamie@51: author = d->algo.author; jamie@51: year = &d->algo.year; jamie@51: jamie@51: *year = 0; jamie@51: jamie@50: switch(f){ jamie@50: case MEAN: jamie@50: strcpy(name, "mean"); jamie@52: strcpy(p_name, "Mean"); jamie@51: strcpy(desc, "Extract the mean of an input vector"); jamie@52: strcpy(p_desc, "Extract the mean of a range of values"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case VARIANCE: jamie@50: strcpy(name, "variance"); jamie@51: strcpy(p_name, "Variance"); jamie@51: strcpy(desc, "Extract the variance of an input vector"); jamie@52: strcpy(p_desc, "Extract the variance of a range of values"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case STANDARD_DEVIATION: jamie@50: strcpy(name, "standard_deviation"); jamie@51: strcpy(p_name, "Standard Deviation"); jamie@52: strcpy(desc, jamie@52: "Extract the standard deviation of an input vector"); jamie@52: strcpy(p_desc, jamie@52: "Extract the standard deviation of a range of values"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case AVERAGE_DEVIATION: jamie@50: strcpy(name, "average_deviation"); jamie@51: strcpy(p_name, "Average Deviation"); jamie@52: strcpy(desc, jamie@52: "Extract the average deviation of an input vector"); jamie@52: strcpy(p_desc, jamie@52: "Extract the average deviation of a range of values"); jamie@52: strcpy(author, ""); jamie@52: break; jamie@52: case SPECTRAL_MEAN: jamie@52: strcpy(name, "spectral_mean"); jamie@52: strcpy(p_name, "Spectral Mean"); jamie@52: strcpy(desc, "Extract the mean of an input spectrum"); jamie@52: strcpy(p_desc, "Extract the mean of an audio spectrum"); jamie@52: strcpy(author, ""); jamie@52: break; jamie@52: case SPECTRAL_VARIANCE: jamie@52: strcpy(name, "spectral_variance"); jamie@52: strcpy(p_name, "Spectral Variance"); jamie@52: strcpy(desc, "Extract the variance of an input spectrum"); jamie@52: strcpy(p_desc, "Extract the variance of an audio spectrum"); jamie@52: strcpy(author, ""); jamie@52: break; jamie@52: case SPECTRAL_STANDARD_DEVIATION: jamie@52: strcpy(name, "spectral_standard_deviation"); jamie@52: strcpy(p_name, "Spectral Standard Deviation"); jamie@52: strcpy(desc, jamie@52: "Extract the standard deviation of an input spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the standard deviation of an audio spectrum"); jamie@52: strcpy(author, ""); jamie@52: break; jamie@52: case SPECTRAL_AVERAGE_DEVIATION: jamie@52: strcpy(name, "spectral_average_deviation"); jamie@52: strcpy(p_name, "Spectral Average Deviation"); jamie@52: strcpy(desc, jamie@52: "Extract the average deviation of an input spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the average deviation of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case ROLLOFF: jamie@52: strcpy(name, "spectral_rolloff"); jamie@51: strcpy(p_name, "Spectral Rolloff"); jamie@52: strcpy(desc, jamie@52: "Extract the rolloff point of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the rolloff point of an audio spectrum"); jamie@52: strcpy(author, "Bee Suan Ong"); jamie@52: *year = 2005; jamie@50: break; jamie@52: case SPECTRAL_INHARMONICITY: jamie@52: strcpy(name, "spectral_inharmonicity"); jamie@51: strcpy(p_name, "Inharmonicity"); jamie@51: strcpy(desc, "Extract the inharmonicity of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the inharmonicity of an audio spectrum"); jamie@50: break; jamie@50: case MAGNITUDE_SPECTRUM: jamie@50: strcpy(name, "magnitude_spectrum"); jamie@51: strcpy(p_name, "Magnitude Spectrum"); jamie@52: strcpy(desc, jamie@52: "Extract the magnitude spectrum of an input vector"); jamie@52: strcpy(p_desc, jamie@52: "Extract the magnitude spectrum of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case ODD_EVEN_RATIO: jamie@50: strcpy(name, "odd_even_ratio"); jamie@51: strcpy(p_name, "Odd/Even Harmonic Ratio"); jamie@52: strcpy(desc, jamie@52: "Extract the odd-to-even harmonic ratio of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the odd-to-even harmonic ratio of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case LOWEST_VALUE: jamie@50: strcpy(name, "lowest_value"); jamie@51: strcpy(p_name, "Lowest Value"); jamie@51: strcpy(desc, "Extract the lowest value from an input vector"); jamie@51: strcpy(p_desc, "Extract the lowest value from a given range"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case F0: jamie@50: strcpy(name, "f0"); jamie@51: strcpy(p_name, "Fundamental Frequency"); jamie@51: strcpy(desc, "Extract the fundamental frequency of a signal"); jamie@52: strcpy(p_desc, jamie@52: "Extract the fundamental frequency of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case FAILSAFE_F0: jamie@50: strcpy(name, "failsafe_f0"); jamie@51: strcpy(p_name, "Fundamental Frequency (failsafe)"); jamie@51: strcpy(desc, "Extract the fundamental frequency of a signal"); jamie@52: strcpy(p_desc, jamie@52: "Extract the fundamental frequency of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case TONALITY: jamie@50: strcpy(name, "tonality"); jamie@51: strcpy(p_name, "Tonality"); jamie@51: strcpy(desc, "Extract the tonality of a spectrum"); jamie@51: strcpy(p_desc, "Extract the tonality an audio spectrum"); jamie@52: strcpy(author, "Tristan Jehan"); jamie@52: *year = 2005; jamie@50: break; jamie@52: case SPECTRAL_SKEWNESS: jamie@52: strcpy(name, "spectral_skewness"); jamie@51: strcpy(p_name, "Spectral Skewness"); jamie@52: strcpy(desc, "Extract the skewness of an input spectrum"); jamie@51: strcpy(p_desc, "Extract the skewness of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@52: case SPECTRAL_KURTOSIS: jamie@52: strcpy(name, "spectral_kurtosis"); jamie@51: strcpy(p_name, "Spectral Kurtosis"); jamie@52: strcpy(desc, "Extract the kurtosis of an input spectrum"); jamie@51: strcpy(p_desc, "Extract the kurtosis of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@52: case PEAK_SPECTRUM: jamie@52: strcpy(name, "peak_spectrum"); jamie@52: strcpy(p_name, "Peak Spectrum"); jamie@51: strcpy(desc, "Extract the spectral peaks from of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral peaks from an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@52: case HARMONIC_SPECTRUM: jamie@52: strcpy(p_name, "harmonic_spectrum"); jamie@52: strcpy(p_name, "Harmonic Spectrum"); jamie@51: strcpy(desc, "Extract the harmonics from a spectrum"); jamie@51: strcpy(p_desc, "Extract the harmonics from an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case NOISINESS: jamie@50: strcpy(name, "noisiness"); jamie@51: strcpy(p_name, "Noisiness"); jamie@51: strcpy(desc, "Extract the noisiness of a spectrum"); jamie@51: strcpy(p_desc, "Extract the noisiness of an audio spectrum"); jamie@52: strcpy(author, "Tae Hong Park"); jamie@52: *year = 2000; jamie@50: break; jamie@50: case CREST: jamie@50: strcpy(name, "crest"); jamie@51: strcpy(p_name, "Spectral Crest Measure"); jamie@52: strcpy(desc, jamie@52: "Extract the spectral crest measure of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral crest measure of a audio spectrum"); jamie@52: strcpy(author, "Peeters"); jamie@52: *year = 2003; jamie@50: break; jamie@50: case MFCC: jamie@50: strcpy(name, "mfcc"); jamie@52: strcpy(p_name, "Mel-Frequency Cepstral Coefficients"); jamie@51: strcpy(desc, "Extract MFCC from a spectrum"); jamie@51: strcpy(p_desc, "Extract MFCC from an audio spectrum"); jamie@52: strcpy(author, "Rabiner"); jamie@50: break; jamie@50: case BARK_COEFFICIENTS: jamie@50: strcpy(name, "bark_coefficients"); jamie@51: strcpy(p_name, "Bark Coefficients"); jamie@51: strcpy(desc, "Extract bark coefficients from a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract bark coefficients from an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@52: case SPECTRAL_CENTROID: jamie@52: strcpy(name, "spectral_centroid"); jamie@51: strcpy(p_name, "Spectral Centroid"); jamie@51: strcpy(desc, "Extract the spectral centroid of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral centroid of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case IRREGULARITY_K: jamie@50: strcpy(name, "irregularity_k"); jamie@51: strcpy(p_name, "Irregularity I"); jamie@51: strcpy(desc, "Extract the irregularity of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the irregularity of an audio spectrum"); jamie@52: strcpy(author, "Krimphoff"); jamie@52: *year = 1994; jamie@50: break; jamie@50: case IRREGULARITY_J: jamie@50: strcpy(name, "irregularity_j"); jamie@51: strcpy(p_name, "Irregularity II"); jamie@51: strcpy(desc, "Extract the irregularity of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the irregularity of an audio spectrum"); jamie@52: strcpy(author, "Jensen"); jamie@52: *year = 1999; jamie@50: break; jamie@50: case TRISTIMULUS_1: jamie@50: strcpy(name, "tristimulus_1"); jamie@51: strcpy(p_name, "Tristimulus I"); jamie@51: strcpy(desc, "Extract the tristimulus (type I) of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the tristimulus (type I) of an audio spectrum"); jamie@52: strcpy(author, "Pollard and Jansson"); jamie@52: *year = 1982; jamie@50: break; jamie@50: case TRISTIMULUS_2: jamie@50: strcpy(name, "tristimulus_2"); jamie@51: strcpy(p_name, "Tristimulus II"); jamie@51: strcpy(desc, "Extract the tristimulus (type II) of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the tristimulus (type II) of an audio spectrum"); jamie@52: strcpy(author, "Pollard and Jansson"); jamie@52: *year = 1982; jamie@50: break; jamie@50: case TRISTIMULUS_3: jamie@50: strcpy(name, "tristimulus_3"); jamie@51: strcpy(p_name, "Tristimulus III"); jamie@52: strcpy(desc, jamie@52: "Extract the tristimulus (type III) of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the tristimulus (type III) of an audio spectrum"); jamie@52: strcpy(author, "Pollard and Jansson"); jamie@52: *year = 1982; jamie@50: break; jamie@50: case SMOOTHNESS: jamie@50: strcpy(name, "smoothness"); jamie@51: strcpy(p_name, "Spectral Smoothness"); jamie@51: strcpy(desc, "Extract the spectral smoothness of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral smoothness of an audio spectrum"); jamie@52: strcpy(author, "McAdams"); jamie@52: *year = 1999; jamie@50: break; jamie@50: case FLATNESS: jamie@50: strcpy(name, "flatness"); jamie@51: strcpy(p_name, "Spectral Flatness"); jamie@51: strcpy(desc, "Extract the spectral flatness of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral flatness of an audio spectrum"); jamie@52: strcpy(author, "Tristan Jehan"); jamie@52: *year = 2005; jamie@50: break; jamie@50: case SPREAD: jamie@50: strcpy(name, "spread"); jamie@51: strcpy(p_name, "Spectral Spread"); jamie@51: strcpy(desc, "Extract the spectral spread of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral spread of an audio spectrum"); jamie@52: strcpy(author, "Norman Casagrande"); jamie@52: *year = 2005; jamie@50: break; jamie@50: case ZCR: jamie@50: strcpy(name, "zcr"); jamie@51: strcpy(p_name, "Zero Crossing Rate"); jamie@51: strcpy(desc, "Extract the zero crossing rate of a vector"); jamie@52: strcpy(p_desc, jamie@52: "Extract the zero crossing rate of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case LOUDNESS: jamie@50: strcpy(name, "loudness"); jamie@51: strcpy(p_name, "Loudness"); jamie@52: strcpy(desc, jamie@52: "Extract the loudness of a signal from its spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the loudness of an audio signal from its spectrum"); jamie@52: strcpy(author, "Moore, Glasberg et al"); jamie@52: *year = 2005; jamie@50: break; jamie@50: case HIGHEST_VALUE: jamie@50: strcpy(name, "highest_value"); jamie@51: strcpy(p_name, "Highest Value"); jamie@51: strcpy(desc, "Extract the highest value from an input vector"); jamie@51: strcpy(p_desc, "Extract the highest value from a given range"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case SUM: jamie@50: strcpy(name, "sum"); jamie@51: strcpy(p_name, "Sum of Values"); jamie@52: strcpy(desc, jamie@52: "Extract the sum of the values in an input vector"); jamie@52: strcpy(p_desc, jamie@52: "Extract the sum of the values in a given range"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case RMS_AMPLITUDE: jamie@50: strcpy(name, "rms_amplitude"); jamie@51: strcpy(p_name, "RMS Amplitude"); jamie@51: strcpy(desc, "Extract the RMS amplitude of a signal"); jamie@51: strcpy(p_desc, "Extract the RMS amplitude of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case POWER: jamie@50: strcpy(name, "power"); jamie@51: strcpy(p_name, "Spectral Power"); jamie@51: strcpy(desc, "Extract the spectral power of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral power of an audio spectrum"); jamie@52: strcpy(author, "Bee Suan Ong"); jamie@52: *year = 2005; jamie@50: break; jamie@50: case SHARPNESS: jamie@50: strcpy(name, "sharpness"); jamie@51: strcpy(p_name, "Spectral Sharpness"); jamie@51: strcpy(desc, "Extract the spectral sharpness of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral sharpness of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@52: case SPECTRAL_SLOPE: jamie@52: strcpy(name, "spectral_slope"); jamie@51: strcpy(p_name, "Spectral Slope"); jamie@51: strcpy(desc, "Extract the spectral slope of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral slope of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case HPS: jamie@50: strcpy(name, "hps"); jamie@51: strcpy(p_name, "Harmonic Product Spectrum"); jamie@52: strcpy(desc, jamie@52: "Extract the harmonic product spectrum of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the harmonic product spectrum of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case FLUX: jamie@50: strcpy(name, "flux"); jamie@51: strcpy(p_name, "Spectral Flux"); jamie@51: strcpy(desc, "Extract the spectral flux of a spectrum"); jamie@52: strcpy(p_desc, jamie@52: "Extract the spectral flux of an audio spectrum"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case ATTACK_TIME: jamie@50: strcpy(name, "attack_time"); jamie@51: strcpy(p_name, "Attack Time"); jamie@51: strcpy(desc, "Extract the attack time of a signal"); jamie@51: strcpy(p_desc, "Extract the attack time of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case DECAY_TIME: jamie@50: strcpy(name, "decay_time"); jamie@51: strcpy(p_name, "Decay Time"); jamie@51: strcpy(desc, "Extract the decay time of a signal"); jamie@51: strcpy(p_desc, "Extract the decay time of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case DELTA_FEATURE: jamie@50: strcpy(name, "delta_feature"); jamie@51: strcpy(p_name, "Delta Feature"); jamie@51: strcpy(desc, "Extract the time derivative of a feature"); jamie@51: strcpy(p_desc, "Extract the time derivative of a feature"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case AUTOCORRELATION_FFT: jamie@50: strcpy(name, "autocorrelation_fft"); jamie@51: strcpy(p_name, "Autocorrelation (FFT method)"); jamie@51: strcpy(desc, "Extract the autocorrelation of a signal"); jamie@51: strcpy(p_desc, "Extract the autocorrelation of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case DCT: jamie@50: strcpy(name, "dct"); jamie@51: strcpy(p_name, "Discrete Cosine Transform"); jamie@51: strcpy(desc, "Extract the DCT of a signal"); jamie@51: strcpy(p_desc, "Extract the DCT of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case AUTOCORRELATION: jamie@50: strcpy(name, "autocorrelation"); jamie@51: strcpy(p_name, "Autocorrelation"); jamie@51: strcpy(desc, "Extract the autocorrelation of a signal"); jamie@52: strcpy(p_desc, jamie@52: "Extract the autocorrelation of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case AMDF: jamie@50: strcpy(name, "amdf"); jamie@51: strcpy(p_name, "Average Magnitude Difference Function"); jamie@51: strcpy(desc, "Extract the AMDF of a signal"); jamie@51: strcpy(p_desc, "Extract the AMDF of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: case ASDF: jamie@50: strcpy(name, "asdf"); jamie@51: strcpy(p_name, "Average Squared Difference Function"); jamie@51: strcpy(desc, "Extract the ASDF of a signal"); jamie@51: strcpy(p_desc, "Extract the ASDF of an audio signal"); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: default: jamie@51: strcpy(name, ""); jamie@52: strcpy(p_name, ""); jamie@51: strcpy(desc, ""); jamie@51: strcpy(p_desc, ""); jamie@51: strcpy(author, ""); jamie@50: break; jamie@50: } jamie@50: } jamie@50: jamie@50: return fd; jamie@50: } jamie@50: jamie@50: int xtract_free_descriptors(void *fd){ jamie@50: jamie@50: if (fd != NULL) { jamie@50: free(fd); jamie@50: } jamie@50: jamie@50: return SUCCESS; jamie@50: } jamie@50: jamie@50: jamie@50: jamie@50: jamie@50: