# HG changeset patch # User Paula Stanciu # Date 1217429383 -10800 # Node ID 43557eb3180fd7fab31bc34d6d2f8a010b255812 # Parent fed560b8072088d1d3b155e77ce8b28052acb40a playback diff -r fed560b80720 -r 43557eb3180f src/bluetooth/bluetooth.c --- 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; diff -r fed560b80720 -r 43557eb3180f src/bluetooth/bluetooth.h --- 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; diff -r fed560b80720 -r 43557eb3180f src/bluetooth/scan_gui.c --- 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); } diff -r fed560b80720 -r 43557eb3180f src/bluetooth/scan_gui.h --- 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 #include +#include +#include +#include +#include + + void show_scan(gint use); void show_no_devices(); void destroy_scan_window();