#ifndef ALSAPLAYER_HPP
#define ALSAPLAYER_HPP

#include "player.hpp"

#include "audio_s.hpp"

class Alsaplayer : public Player
{
public:
  int is_mute();
  int is_playing();
  int is_buffering();
  void gather_info();
  void addfile(const Simplefile &file);
  void play();
  void stop_player();
  void pause();
  void ff();
  void fb();

  int getpos();
  void setpos(int p);

  void mute();
  void volup();
  void voldown();
  int getvol();
  virtual void setvol(int vol);

  virtual std::string p_title() const;
  virtual std::string p_artist() const;
  virtual std::string p_album() const;

  void update_cdrom(const std::string& cdrom) {}; // doesn't do anything atm.

  void collect_info(const std::string& filename);

  ~Alsaplayer();
  Alsaplayer();

private:

  void setvol();
  void start_alsaplayer();
  void stop_alsaplayer();

  bool running;
  // value which tells if alsaplayer is "booting"
  bool starting;
  
  float volume;

  int session_id;
};

#endif
