ocarina: Switch to new audio functions
These functions have been moved to a new namespace, so the front end needs to be updated.
This commit is contained in:
parent
90ac1ecfed
commit
7dce8ffedc
|
@ -2,8 +2,8 @@
|
|||
#include <ocarina/button.h>
|
||||
#include <ocarina/chooser.h>
|
||||
|
||||
#include <libsaria/audio.h>
|
||||
#include <libsaria/print.h>
|
||||
#include <libsaria/controls.h>
|
||||
|
||||
static GtkWidget *get_button(void (* func)(GtkWidget *, GdkEvent *, gpointer),
|
||||
bool show)
|
||||
|
@ -62,7 +62,7 @@ static void on_click_open_file(GtkWidget *b, GdkEvent *e, gpointer d)
|
|||
string file = ocarina_choose_file();
|
||||
if (file != "") {
|
||||
println("Playing file: " + file);
|
||||
libsaria::load(file);
|
||||
libsaria::audio::load(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
using namespace std;
|
||||
|
||||
#include <ocarina/button.h>
|
||||
#include <libsaria/controls.h>
|
||||
#include <libsaria/progress.h>
|
||||
#include <libsaria/audio.h>
|
||||
|
||||
static list<GtkWidget *> play_buttons;
|
||||
static list<GtkWidget *> pause_buttons;
|
||||
|
@ -37,7 +36,7 @@ void hide_button_list(button_list_t bttn_list)
|
|||
|
||||
static void on_click_play(GtkWidget *b, GdkEvent *e, gpointer d)
|
||||
{
|
||||
libsaria::play();
|
||||
libsaria::audio::play();
|
||||
}
|
||||
|
||||
GtkWidget *make_play_button()
|
||||
|
@ -51,7 +50,7 @@ GtkWidget *make_play_button()
|
|||
|
||||
static void on_click_pause(GtkWidget *b, GdkEvent *e, gpointer d)
|
||||
{
|
||||
libsaria::pause();
|
||||
libsaria::audio::pause();
|
||||
}
|
||||
|
||||
GtkWidget *make_pause_button()
|
||||
|
@ -65,7 +64,7 @@ GtkWidget *make_pause_button()
|
|||
|
||||
static void on_click_stop(GtkWidget *b, GdkEvent *e, gpointer d)
|
||||
{
|
||||
libsaria::stop();
|
||||
libsaria::audio::stop();
|
||||
}
|
||||
|
||||
GtkWidget *make_stop_button()
|
||||
|
@ -77,7 +76,7 @@ GtkWidget *make_stop_button()
|
|||
|
||||
static void on_click_rewind(GtkWidget *b, GdkEvent *e, gpointer d)
|
||||
{
|
||||
libsaria::seek(-5);
|
||||
libsaria::audio::seek(-5);
|
||||
}
|
||||
|
||||
GtkWidget *make_rewind_button()
|
||||
|
@ -89,7 +88,7 @@ GtkWidget *make_rewind_button()
|
|||
|
||||
static void on_click_forward(GtkWidget *b, GdkEvent *e, gpointer d)
|
||||
{
|
||||
libsaria::seek(5);
|
||||
libsaria::audio::seek(5);
|
||||
}
|
||||
|
||||
GtkWidget *make_forward_button()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#include <libsaria/volume.h>
|
||||
#include <libsaria/audio.h>
|
||||
#include <ocarina/button.h>
|
||||
|
||||
static void resize(GtkWidget *volume)
|
||||
|
@ -24,7 +24,7 @@ static void set_increment(GtkWidget *volume, double incr)
|
|||
|
||||
static void changed(GtkWidget *button, gdouble value, gpointer data)
|
||||
{
|
||||
libsaria::set_volume(value);
|
||||
libsaria::audio::set_volume(value);
|
||||
resize(button);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ GtkWidget *make_volume_button()
|
|||
{
|
||||
GtkWidget *volume = gtk_volume_button_new();
|
||||
gtk_scale_button_set_value(GTK_SCALE_BUTTON(volume),
|
||||
libsaria::get_volume());
|
||||
libsaria::audio::get_volume());
|
||||
gtk_widget_show(volume);
|
||||
set_increment(volume, 0.05);
|
||||
resize(volume);
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include <ocarina/window.h>
|
||||
#include <ocarina/library.h>
|
||||
|
||||
#include <libsaria/audio.h>
|
||||
#include <libsaria/libsaria.h>
|
||||
#include <libsaria/controls.h>
|
||||
#include <libsaria/print.h>
|
||||
#include <libsaria/idle.h>
|
||||
|
||||
|
@ -47,7 +47,7 @@ int main(int argc, char **argv)
|
|||
ocarina_init(argc, argv);
|
||||
|
||||
if (argc > 1)
|
||||
libsaria::load(argv[1]);
|
||||
libsaria::audio::load(argv[1]);
|
||||
|
||||
gtk_main();
|
||||
libsaria::quit();
|
||||
|
|
Loading…
Reference in New Issue