[gnome-devel-docs] Fixed a couple of small bugs (missing lines) in the guitar-tuner example
- From: Phil Bull <philbull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-devel-docs] Fixed a couple of small bugs (missing lines) in the guitar-tuner example
- Date: Sun, 5 Dec 2010 16:44:26 +0000 (UTC)
commit 3319071f5e86578295aa671cd2daee3736e64701
Author: Phil Bull <philbull gmail com>
Date: Sun Dec 5 16:43:51 2010 +0000
Fixed a couple of small bugs (missing lines) in the guitar-tuner example
demos/C/guitar-tuner.c.page | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/demos/C/guitar-tuner.c.page b/demos/C/guitar-tuner.c.page
index 2fc91ee..9689c3a 100644
--- a/demos/C/guitar-tuner.c.page
+++ b/demos/C/guitar-tuner.c.page
@@ -135,11 +135,13 @@ void on_button_clicked (GtkWidget* button, gpointer user_data)
<section>
<title>Set up the pipeline</title>
<p>In this simple example we will use a tone generator source called <code>audiotestsrc</code> and send the output to the default system sound device, <code>autoaudiosink</code>. We only need to configure the frequency of the tone generator; this is accessible through the <code>freq</code> property of <code>audiotestsrc</code>.</p>
- <p>Insert the following code into <file>main.c</file>:</p>
- <code mime="text/C"><![CDATA[
-#include <gst/gst.h>
-
-static void
+
+ <p>Insert the following line into <file>main.c</file>, just below the <code><![CDATA[#include <gtk/gtk.h>]]></code> line:</p>
+ <code mime="text/C"><![CDATA[#include <gst/gst.h>]]></code>
+ <p>This includes the GStreamer library. You also need to add a line to initialize GStreamer; put the following code on the line above the <code>gtk_init</code> function in the <code>main</code> function:</p>
+ <code><![CDATA[gst_init (&argc, &argv);]]></code>
+ <p>Then, copy the following function into <file>main.c</file> somewhere:</p>
+ <code mime="text/C"><![CDATA[static void
play_sound (gdouble frequency)
{
GstElement *source, *sink;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]