2011-09-12 11:20:12 -04:00
|
|
|
#ifndef LIBSARIA_AUDIO_COMPONENT_H
|
|
|
|
#define LIBSARIA_AUDIO_COMPONENT_H
|
2011-08-15 07:53:25 -04:00
|
|
|
|
2011-08-21 19:24:33 -04:00
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
|
2011-08-15 07:53:25 -04:00
|
|
|
extern "C" {
|
|
|
|
#include <gst/gst.h>
|
|
|
|
}
|
|
|
|
|
2011-12-23 15:49:56 -05:00
|
|
|
extern GstElement *player;
|
|
|
|
extern GstBus *bus;
|
2011-08-21 19:24:33 -04:00
|
|
|
|
2012-02-01 08:29:25 -05:00
|
|
|
struct StoredAudioState
|
|
|
|
{
|
|
|
|
string cur_file;
|
|
|
|
double position;
|
|
|
|
bool was_playing;
|
|
|
|
};
|
|
|
|
|
2011-12-23 20:46:02 -05:00
|
|
|
void load_file(GstElement *, string);
|
|
|
|
|
2012-02-01 08:29:25 -05:00
|
|
|
void set_audio_sink(GstElement *);
|
|
|
|
void save_audio_state(struct StoredAudioState *);
|
|
|
|
void load_audio_state(struct StoredAudioState *);
|
|
|
|
|
2011-12-23 22:04:24 -05:00
|
|
|
namespace libsaria
|
|
|
|
{
|
|
|
|
namespace audio
|
|
|
|
{
|
|
|
|
void init_volume();
|
2012-02-01 08:29:25 -05:00
|
|
|
void init_alsa();
|
2011-12-23 22:04:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-10-27 14:30:44 -04:00
|
|
|
#endif /* LIBSARIA_AUDIO_PRIVATE_H */
|