00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <kos.h>
00012
00013
00014
00015
00016 typedef struct
00017 {
00018 int channels;
00019 int frequency;
00020 char *vendor;
00021 int convsize;
00022 int bitrate;
00023 unsigned int bytes;
00024 } VorbisFile_headers_t;
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 typedef struct
00047 {
00048 char *artist;
00049 char *title;
00050 char *version;
00051 char *album;
00052 char *tracknumber;
00053 char *organization;
00054 char *description;
00055 char *genre;
00056 char *date;
00057 char *location;
00058 char *copyright;
00059 char *isrc;
00060
00061 char *filename;
00062
00063 long nominalbitrate;
00064 long actualbitrate;
00065 long actualposition;
00066 } VorbisFile_info_t;
00067
00068 typedef file_t VorbisFile_handle_t;
00069
00070
00071
00072
00073
00074 #define VorbisFile_NULL 0
00075
00076
00077
00078 long VorbisFile_getBitrateNominal();
00079 long VorbisFile_getBitrateInstant();
00080
00081 char *VorbisFile_getCommentByName(char *commentfield);
00082 char *VorbisFile_getCommentByID(long commentid);
00083
00084 int VorbisFile_openFile(const char *filename, VorbisFile_headers_t *v_headers);
00085 void VorbisFile_closeFile();
00086
00087 int VorbisFile_decodePCMint8(VorbisFile_headers_t vhd, uint8 *target, int requested);
00088 int VorbisFile_decodePCM(VorbisFile_headers_t vhd, ogg_int16_t * target, int requested);
00089
00090 int VorbisFile_isEOS();
00091