Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

sndvorbisfile.h

00001 /* KallistiOS Ogg/Vorbis Decoder Library
00002  *
00003  * sndvorbisfile.h
00004  * (c)2001 Thorsten Titze
00005  *
00006  * Basic Ogg/Vorbis stream information and decoding routines used by
00007  * libsndoggvorbis. May also be used directly for playback without
00008  * threading.
00009  */
00010 
00011 #include <kos.h>
00012 
00013 /* Typedefinition for Header Information of Ogg-Vorbis Files
00014  * Not including Comments which are stored in a VorbisFile_info_t
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 /* Typedefinition for File Information Following the Ogg-Vorbis Spec
00027  *
00028  * TITLE :Track name
00029  * VERSION :The version field may be used to differentiate multiple version of the
00030  *         same track title in a single collection. (e.g. remix info)
00031  * ALBUM :The collection name to which this track belongs
00032  * TRACKNUMBER :The track number of this piece if part of a specific larger collection
00033  *              or album
00034  * ARTIST :Track performer
00035  * ORGANIZATION :Name of the organization producing the track (i.e. the 'record label')
00036  * DESCRIPTION :A short text description of the contents
00037  * GENRE :A short text indication of music genre
00038  * DATE :Date the track was recorded
00039  * LOCATION :Location where track was recorded
00040  * COPYRIGHT :Copyright information
00041  * ISRC :ISRC number for the track; see {the ISRC intro page} for more information on
00042  *       ISRC numbers.
00043  *
00044  * (Based on v-comment.html found in original OggVorbis packages)
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 /* Static String that is used in case a comment is not
00071  * set in a Stream
00072  */
00073 //static char VorbisFile_NULL[]="N/A";
00074 #define VorbisFile_NULL 0
00075 
00076 /* Public Function Declarations
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 

dcplaya documentation version 2.0 Generated on November 2004 by doxygen 1.3.6