forked from nicksellen/audiotags
-
Notifications
You must be signed in to change notification settings - Fork 1
/
audiotags.h
57 lines (48 loc) · 3.16 KB
/
audiotags.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/***************************************************************************
copyright : (C) 2003 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
copyright : (C) 2014 by Nick Sellen
email : code@nicksellen.co.uk
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
* USA *
***************************************************************************/
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct { void *fileRef; void *ioStream; } TagLib_FileRefRef;
typedef struct { int dummy; } TagLib_AudioProperties;
extern void go_map_put(int id, char *key, char *val);
TagLib_FileRefRef *audiotags_file_new(const char *filename);
TagLib_FileRefRef *audiotags_file_memory(const char *data, unsigned int length);
TagLib_FileRefRef *audiotags_file_memory_with_name(const char *fileName, const char *data, unsigned int length);
void audiotags_file_close(TagLib_FileRefRef *file);
void audiotags_file_properties(const TagLib_FileRefRef *file, int id);
const TagLib_AudioProperties *audiotags_file_audioproperties(const TagLib_FileRefRef *file);
bool audiotags_write_property(TagLib_FileRefRef *file, const char *field_c, const char *value_c);
bool audiotags_write_properties(TagLib_FileRefRef *file, unsigned int len, const char *fields_c[], const char *values_c[]);
int audiotags_audioproperties_length(const TagLib_AudioProperties *audioProperties);
int audiotags_audioproperties_length_ms(const TagLib_AudioProperties *audioProperties);
int audiotags_audioproperties_bitrate(const TagLib_AudioProperties *audioProperties);
int audiotags_audioproperties_samplerate(const TagLib_AudioProperties *audioProperties);
int audiotags_audioproperties_channels(const TagLib_AudioProperties *audioProperties);
bool audiotags_write_picture(TagLib_FileRefRef *file, const char *data, unsigned int length, int w, int h, int type);
bool audiotags_remove_pictures(TagLib_FileRefRef *file);
#ifdef __cplusplus
}
#endif