Mercurial > audlegacy-plugins
changeset 2854:43557eb3180f
playback
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Wed, 30 Jul 2008 17:49:43 +0300 |
parents | fed560b80720 |
children | 162766a69f12 |
files | src/bluetooth/bluetooth.c src/bluetooth/bluetooth.h src/bluetooth/scan_gui.c src/bluetooth/scan_gui.h |
diffstat | 4 files changed, 33 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bluetooth/bluetooth.c Tue Jul 29 18:49:04 2008 +0300 +++ b/src/bluetooth/bluetooth.c Wed Jul 30 17:49:43 2008 +0300 @@ -21,6 +21,7 @@ #include "gui.h" #include "scan_gui.h" #include "agent.h" +#include "../alsa/alsa.h" #define DEBUG 1 static gboolean plugin_active = FALSE,exiting=FALSE; GList * current_device = NULL; @@ -148,6 +149,29 @@ } +void play_call() +{ +// static GFile *asoundrc; + + + + mcs_handle_t *cfgfile = aud_cfg_db_open(); + + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "buffer_time", 500); + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "period_time", 100); + aud_cfg_db_set_string(cfgfile,ALSA_CFGID,"pcm_device", "bt"); + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "mixer_card", 0); + aud_cfg_db_set_string(cfgfile,ALSA_CFGID,"mixer_device", "PCM"); + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "volume_left", 100); + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "volume_right", 100); + aud_cfg_db_close(cfgfile); + + printf("play callback\n"); + + +} + + static void remote_device_found(DBusGProxy *object, char *address, const unsigned int class, const int rssi, gpointer user_data) { int found_in_list=FALSE;
--- a/src/bluetooth/bluetooth.h Tue Jul 29 18:49:04 2008 +0300 +++ b/src/bluetooth/bluetooth.h Wed Jul 30 17:49:43 2008 +0300 @@ -40,6 +40,7 @@ void refresh_call(void); void connect_call(void); +void play_call(void); GList * audio_devices; gint discover_finish ; DBusGConnection * bus;
--- a/src/bluetooth/scan_gui.c Tue Jul 29 18:49:04 2008 +0300 +++ b/src/bluetooth/scan_gui.c Wed Jul 30 17:49:43 2008 +0300 @@ -83,11 +83,6 @@ gtk_widget_destroy (window); window = NULL; } -void retry_call(void) -{ - printf("retry callback\n"); -} - void show_scan(gint use) { GThread *th1; @@ -140,8 +135,8 @@ rescan_buttton = gtk_button_new_with_mnemonic(_("Rescan")); g_signal_connect(rescan_buttton,"clicked",G_CALLBACK (refresh_call),NULL); }else{ - rescan_buttton = gtk_button_new_with_mnemonic(_("Retry")); - g_signal_connect(rescan_buttton,"clicked",G_CALLBACK (retry_call),NULL); + rescan_buttton = gtk_button_new_with_mnemonic(_("Play")); + g_signal_connect(rescan_buttton,"clicked",G_CALLBACK (play_call),NULL); }
--- a/src/bluetooth/scan_gui.h Tue Jul 29 18:49:04 2008 +0300 +++ b/src/bluetooth/scan_gui.h Wed Jul 30 17:49:43 2008 +0300 @@ -18,6 +18,12 @@ #include <gtk/gtk.h> #include <glib.h> +#include <alsa/asoundlib.h> +#include <alsa/pcm_plugin.h> +#include <audacious/plugin.h> +#include <audacious/i18n.h> + + void show_scan(gint use); void show_no_devices(); void destroy_scan_window();