#ifndef AUDIOBUFFER_H
#define AUDIOBUFFER_H

#include <stdint.h>

#include "SDL.h"
#include "SDL_mixer.h"

using namespace std;

//This class stores a sound clip and the number of references to it.
class AudioBuffer
{
 public:
  AudioBuffer ();
  ~AudioBuffer ();

  Mix_Chunk * getSample();
  void setSample (Mix_Chunk*);

  void incRefCount ();
  void decRefCount ();
  uint32_t getRefCount ();

 private:
  uint32_t refCount;
  Mix_Chunk *sample;
};

#endif
