//Copyright (C) 2007 SiegeLord
//See ReadMe.txt and License.txt for copying information

#pragma once

#include <vorbis/vorbisfile.h>
#include "engine.h"

// Struct that contains the pointer to our file in memory
struct SSoundFile
{
	void*		dataPtr;			//Pointer to the data in memory
	int			dataSize;			//Sizeo fo the data
	int			dataRead;			//How much data we have read so far
};

const int g_nBufferSize = 4096 * 2;

int PrepareSoundForPlayback(SSoundFile* source, OggVorbis_File *file, vorbis_info** info);
void StopSoundPlayback(OggVorbis_File *file);
void InitVorbis();
SSoundFile* FindSound(const char* filename);
SSoundFile* ForceLoadSound(const char* filename);
int Stream(OggVorbis_File* file, void* buf, int* section, int amt, bool loop);
void FreeSounds();
