37 lines
586 B
C++
37 lines
586 B
C++
#ifndef LIBSARIA_AUDIO_COMPONENT_H
|
|
#define LIBSARIA_AUDIO_COMPONENT_H
|
|
|
|
#include <string>
|
|
using namespace std;
|
|
|
|
extern "C" {
|
|
#include <gst/gst.h>
|
|
}
|
|
|
|
extern GstElement *player;
|
|
extern GstBus *bus;
|
|
|
|
struct StoredAudioState
|
|
{
|
|
string cur_file;
|
|
double position;
|
|
bool was_playing;
|
|
};
|
|
|
|
void load_file(GstElement *, string);
|
|
|
|
void set_audio_sink(GstElement *);
|
|
void save_audio_state(struct StoredAudioState *);
|
|
void load_audio_state(struct StoredAudioState *);
|
|
|
|
namespace libsaria
|
|
{
|
|
namespace audio
|
|
{
|
|
void init_volume();
|
|
void init_alsa();
|
|
}
|
|
}
|
|
|
|
#endif /* LIBSARIA_AUDIO_PRIVATE_H */
|