#ifndef __PCMLOADER_H__
#define __PCMLOADER_H__

#include <map>
#include <string>

using std::map;
using std::string;

class PcmData
{
public:
  PcmData(char *buf, int len) : buf(buf), len(len) {};
  void play();

protected:
  char *buf;
  int len;
};

class PcmLoader
{
public:
  PcmData *get(const char *filename);
  PcmData *load(const char *filename);

protected:
  int readfile(const char *filename, char **pBuf);

protected:
  map<string,PcmData*> pcms;
};

#endif
