libsaria: Move idle object out of libsaria class
This helps me prepare to remove the libsaria class.
This commit is contained in:
parent
33fe24fc64
commit
c3eb748f44
|
@ -10,7 +10,6 @@ class Libsaria
|
|||
{
|
||||
private:
|
||||
Audio audio;
|
||||
Idle idle;
|
||||
|
||||
public:
|
||||
Libsaria(int, char**);
|
||||
|
@ -20,7 +19,6 @@ class Libsaria
|
|||
void load(string);
|
||||
void set_volume(double);
|
||||
double get_volume();
|
||||
void run_idle_task();
|
||||
|
||||
/* Control functions */
|
||||
void play();
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
#include <libsaria/libsaria.h>
|
||||
|
||||
static Idle idle;
|
||||
|
||||
/*
|
||||
* Implementations of functions defined in the libsaria class
|
||||
*/
|
||||
|
@ -31,11 +33,6 @@ double Libsaria::get_volume()
|
|||
return audio.get_volume();
|
||||
}
|
||||
|
||||
void Libsaria::run_idle_task()
|
||||
{
|
||||
return idle.run_task();
|
||||
}
|
||||
|
||||
/*
|
||||
* Convenience functions for accessing libsaria class functions
|
||||
*/
|
||||
|
@ -57,5 +54,5 @@ double libsaria_get_volume()
|
|||
|
||||
void libsaria_idle_task()
|
||||
{
|
||||
return libsaria_get()->run_idle_task();
|
||||
idle.run_task();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue