ocarina/include/libsaria/audio.h

49 lines
808 B
C++

#ifndef LIBSARIA_AUDIO_H
#define LIBSARIA_AUDIO_H
extern "C" {
#include <gst/gst.h>
}
#include <list>
#include <string>
using namespace std;
namespace libsaria
{
namespace audio
{
void init(int, char**);
void swap();
string get_current_file();
/* Alsa controls */
void use_alsa(bool);
bool using_alsa();
list<string> *get_alsa_devices();
void set_device(string &);
/* Playback control functions */
void load_file(string);
void load(string);
void play();
void pause();
void stop();
bool is_playing();
/* Position related functions */
bool seek(int);
void seek_to(double);
gint64 duration();
gint64 position();
string posstr();
string durstr();
/* Volume functions */
float get_volume();
void set_volume(float);
};
};
#endif /* LIBSARIA_AUDIO_H */