#ifndef LIBSARIA_AUDIO_COMPONENT_H
#define LIBSARIA_AUDIO_COMPONENT_H

#include <string>
using namespace std;

extern "C" {
	#include <gst/gst.h>
}

class Audio
{
	private:
		GstElement *player;
		string cur_file;
		double cur_volume;

		void reset();
		bool change_state(GstState);

	public:
		Audio();
		~Audio();

		/* Other functions */
		void init(int, char **);
		void load(string);
		void set_volume(double);
		double get_volume();

		/* Control functions */
		bool play();
		bool pause();

		/* Functions related to position in the song */
		bool seek(int);
		bool seek_to(double);
		bool get_position(gint64 &);
		bool get_duration(gint64 &);
};

#endif /* LIBSARIA_AUDIO_COMPONENT_H */
