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

#pragma once

#include "engine.h"
#include "sound.h"

struct SSound
{
	bool looping;

	//alter the below at own risk!
	SSoundFile* source;
	AUDIOSTREAM* stream;
	OggVorbis_File  oggStream;		//the actual ogg file stream
	vorbis_info *info;				//some info
	int section;
	bool marked_for_stop;
	float volume;
	float pan;
};

SSound* PlaySound(SSoundFile* source, bool looping = false);
void UpdateSounds();

void InitSfx();
void DeInitSfx();

void StopAllSounds();
//stops the sound... don't use the pointer afterwards
void StopSound(SSound* sound);
//sets the sound's pan, -1 to 1
void SetSoundPan(SSound* sound, float pan);
//sets the sounds volume, 0 to 1
void SetSoundVolume(SSound* sound, float volume);
