| 1 | #cxx . . $ `<file>/external/mp3/mp3.h`/ifndef __MP3_H |
| 2 | #define __MP3_Hcxx . . $ `external/mp3/mp3.h:2:9`! |
| 3 | |
| 4 | /* |
| 5 | * Praat wrappers for libMAD (MPEG Audio Decoder) |
| 6 | * Copyright 2007 Erez Volk |
| 7 | * |
| 8 | * This code is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or (at |
| 11 | * your option) any later version. |
| 12 | * |
| 13 | * This code is distributed in the hope that it will be useful, but |
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 16 | * See the GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | |
| 22 | #include "../../melder/melder.h"cxx . . $ `<file>/melder/melder.h`/ // for integer |
| 23 | |
| 24 | /* The following function is used to identify MP3 files */ |
| 25 | int mp3_recognizecxx . . $ mp3_recognize(95e580389a7cc305). (int nread, const char *data); |
| 26 | |
| 27 | /* Actual decoding is done with an MP3_FILE object */ |
| 28 | typedef struct _MP3_FILEcxx . . $ _MP3_FILE# *MP3_FILEcxx . . $ MP3_FILE#; |
| 29 | |
| 30 | typedef int MP3F_SAMPLEcxx . . $ MP3F_SAMPLE#; |
| 31 | #if defined (_OFF_T) || defined (__off_t_definedcxx . . $ `<external>/232824719582829767/stdio.h:68:10`!) |
| 32 | typedef off_t MP3F_OFFSETcxx . . $ MP3F_OFFSET#; |
| 33 | #else |
| 34 | typedef unsigned long MP3F_OFFSET; |
| 35 | #endif |
| 36 | |
| 37 | #define MP3F_MAX_CHANNELScxx . . $ `external/mp3/mp3.h:37:9`! 2 |
| 38 | #define MP3F_MAX_SAMPLEScxx . . $ `external/mp3/mp3.h:38:9`! 1152 /* Per callback */ |
| 39 | |
| 40 | typedef void (*MP3F_CALLBACKcxx . . $ MP3F_CALLBACK#) ( |
| 41 | const MP3F_SAMPLEcxx . . $ MP3F_SAMPLE# *channels [MP3F_MAX_CHANNELScxx . . $ `external/mp3/mp3.h:37:9`!], |
| 42 | integercxx . . $ integer# num_samples, |
| 43 | void *context); |
| 44 | |
| 45 | MP3_FILEcxx . . $ MP3_FILE# mp3f_newcxx . . $ mp3f_new(4ebb9e873e5fabfd). (); |
| 46 | void mp3f_deletecxx . . $ mp3f_delete(b5973ac325583f8). (MP3_FILEcxx . . $ MP3_FILE# mp3f); |
| 47 | |
| 48 | void mp3f_set_filecxx . . $ mp3f_set_file(9e493fed6a4921d4). (MP3_FILEcxx . . $ MP3_FILE# mp3f, FILE *f); |
| 49 | |
| 50 | int mp3f_analyzecxx . . $ mp3f_analyze(2ffd7d1cadc1f948). (MP3_FILEcxx . . $ MP3_FILE# mp3f); |
| 51 | unsigned mp3f_channelscxx . . $ mp3f_channels(c7c40c1de569578d). (MP3_FILEcxx . . $ MP3_FILE# mp3f); |
| 52 | unsigned mp3f_frequencycxx . . $ mp3f_frequency(c7c40c1de569578d). (MP3_FILEcxx . . $ MP3_FILE# mp3f); |
| 53 | MP3F_OFFSETcxx . . $ MP3F_OFFSET# mp3f_samplescxx . . $ mp3f_samples(db59e78e5de7dfd4). (MP3_FILEcxx . . $ MP3_FILE# mp3f); |
| 54 | |
| 55 | void mp3f_set_callbackcxx . . $ mp3f_set_callback(663816e73508bfcf). (MP3_FILEcxx . . $ MP3_FILE# mp3f, |
| 56 | MP3F_CALLBACKcxx . . $ MP3F_CALLBACK# callback, void *context); |
| 57 | int mp3f_seekcxx . . $ mp3f_seek(843f2f4d3233e485). (MP3_FILEcxx . . $ MP3_FILE# mp3f, MP3F_OFFSETcxx . . $ MP3F_OFFSET# sample); |
| 58 | int mp3f_readcxx . . $ mp3f_read(843f2f4d3233e485). (MP3_FILEcxx . . $ MP3_FILE# mp3f, MP3F_OFFSETcxx . . $ MP3F_OFFSET# num_samples); |
| 59 | |
| 60 | #define mp3f_sample_to_floatcxx . . $ `external/mp3/mp3.h:60:9`!(s) ((float)((s) / (float)(1L << 28))) |
| 61 | short mp3f_sample_to_shortcxx . . $ mp3f_sample_to_short(60050ad348e56ea6). (MP3F_SAMPLEcxx . . $ MP3F_SAMPLE# sample); |
| 62 | |
| 63 | #endif /* __MP3_H */ |
| 64 |