e10a8e97f4
Now I won't have to keep using libsaria_get() to access parts of libsaria. This should also cut down on the number of things that need to be recompiled when libsaria is changed...
50 lines
590 B
C++
50 lines
590 B
C++
|
|
#include <libsaria/libsaria.h>
|
|
#include <libsaria/audio.h>
|
|
|
|
/*
|
|
* Implementations of functions defined in the libsaria class
|
|
*/
|
|
|
|
void Libsaria::play()
|
|
{
|
|
if(audio.play())
|
|
trigger_callback(PLAY);
|
|
}
|
|
|
|
void Libsaria::pause()
|
|
{
|
|
if(audio.pause())
|
|
trigger_callback(PAUSE);
|
|
}
|
|
|
|
void Libsaria::stop()
|
|
{
|
|
pause();
|
|
seek();
|
|
}
|
|
|
|
void Libsaria::seek()
|
|
{
|
|
audio.seek();
|
|
}
|
|
|
|
/*
|
|
* Convenience functions for accessing libsaria class functions
|
|
*/
|
|
|
|
void libsaria_play()
|
|
{
|
|
libsaria_get()->play();
|
|
}
|
|
|
|
void libsaria_pause()
|
|
{
|
|
libsaria_get()->pause();
|
|
}
|
|
|
|
void libsaria_stop()
|
|
{
|
|
libsaria_get()->stop();
|
|
}
|