godot/thirdparty/libvorbis/info.c

/********************************************************************
 *                                                                  *
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
 *                                                                  *
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015             *
 * by the Xiph.Org Foundation https://xiph.org/                     *
 *                                                                  *
 ********************************************************************

 function: maintain the info structure, info <-> header packets

 ********************************************************************/

/* general handling of the header and the vorbis_info structure (and
   substructures) */

#include <stdlib.h>
#include <string.h>
#include <ogg/ogg.h>
#include "vorbis/codec.h"
#include "codec_internal.h"
#include "codebook.h"
#include "registry.h"
#include "window.h"
#include "psy.h"
#include "misc.h"
#include "os.h"

#define GENERAL_VENDOR_STRING
#define ENCODE_VENDOR_STRING

/* helpers */
static void _v_writestring(oggpack_buffer *o,const char *s, int bytes){}

static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){}

static int _v_toupper(int c) {}

void vorbis_comment_init(vorbis_comment *vc){}

void vorbis_comment_add(vorbis_comment *vc,const char *comment){}

void vorbis_comment_add_tag(vorbis_comment *vc, const char *tag, const char *contents){}

/* This is more or less the same as strncasecmp - but that doesn't exist
 * everywhere, and this is a fairly trivial function, so we include it */
static int tagcompare(const char *s1, const char *s2, int n){}

char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count){}

int vorbis_comment_query_count(vorbis_comment *vc, const char *tag){}

void vorbis_comment_clear(vorbis_comment *vc){}

/* blocksize 0 is guaranteed to be short, 1 is guaranteed to be long.
   They may be equal, but short will never ge greater than long */
int vorbis_info_blocksize(vorbis_info *vi,int zo){}

/* used by synthesis, which has a full, alloced vi */
void vorbis_info_init(vorbis_info *vi){}

void vorbis_info_clear(vorbis_info *vi){}

/* Header packing/unpacking ********************************************/

static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){}

static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){}

/* all of the real encoding details are here.  The modes, books,
   everything */
static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){}

/* Is this packet a vorbis ID header? */
int vorbis_synthesis_idheader(ogg_packet *op){}

/* The Vorbis header is in three packets; the initial small packet in
   the first page that identifies basic parameters, a second packet
   with bitstream comments and a third packet that holds the
   codebook. */

int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){}

/* pack side **********************************************************/

static int _vorbis_pack_info(oggpack_buffer *opb,vorbis_info *vi){}

static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){}

static int _vorbis_pack_books(oggpack_buffer *opb,vorbis_info *vi){}

int vorbis_commentheader_out(vorbis_comment *vc,
                                          ogg_packet *op){}

int vorbis_analysis_headerout(vorbis_dsp_state *v,
                              vorbis_comment *vc,
                              ogg_packet *op,
                              ogg_packet *op_comm,
                              ogg_packet *op_code){}

double vorbis_granule_time(vorbis_dsp_state *v,ogg_int64_t granulepos){}

const char *vorbis_version_string(void){}