I am an novice C# programmer. I am experimenting with GTK# and am trying to play audio on a button click with the Gnome.Sound.Play method. It will compile but not play audio. What is correct usage of the Gnome.Sound.Play method? <br>
<br>-------------------------------------------------------------------------------------<br>using Glade;<br>using Gtk;<br>using System;<br>using Gnome;<br><br>class myWindow<br>{ // start class<br> public myWindow ()<br>
<br> { // start mywindow<br> Glade.XML gui = new Glade.XML ("./test2/test2.glade","window1",""); <br> gui.Autoconnect (this); <br> } // end mywindow<br><br>
void on_button_clicked (object o,EventArgs e) <br> { //start click event<br> Console.WriteLine ("button clicked")<br><b> Gnome.Sound.Init ("/home/user/test.wav"); //<--------is this correct?<br>
Gnome.Sound.Play ("/home/user/test.wav"); //<--------is this correct?</b><br> } //end click event<br><br>} // End class<br><br>class theotherpart<br><br>{ // start class<br> static void Main ()<br>
{ //start main<br> Gtk.Application.Init ();<br> myWindow W = new myWindow ();<br> Gtk.Application.Run ();<br> } //End main<br>} // End class<br>