-fix build system issues
[oweals/gnunet.git] / src / conversation / gnunet-conversation-test.c
index 7f8c522285898399ce61cf6b95c261306376439f..cc831a3abfa8cb171b7bd669463295673ac7f22c 100644 (file)
@@ -25,8 +25,8 @@
  */
 #include "platform.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_speaker_lib.h" 
-#include "gnunet_microphone_lib.h" 
+#include "gnunet_speaker_lib.h"
+#include "gnunet_microphone_lib.h"
 
 /**
  * How long do we record before we replay?
@@ -117,7 +117,8 @@ do_shutdown (void *cls,
                                 rec);
     GNUNET_free (rec);
   }
-  fprintf (stderr, "\n");
+  fprintf (stderr,
+          _("\nEnd of transmission.  Have a GNU day.\n"));
 }
 
 
@@ -144,10 +145,13 @@ switch_to_speaker (void *cls,
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
-  fprintf (stderr, "\nPlaying...");
+  fprintf (stderr,
+          _("\nWe are now playing your recording back.  If you can hear it, your audio settings are working..."));
   for (rec=rec_head; NULL != rec; rec = rec->next)
   {
-    fprintf (stderr, "<-%u\n", (unsigned int) rec->size);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Replaying %u bytes\n",
+               (unsigned int) rec->size);
     speaker->play (speaker->cls,
                   rec->size,
                   &rec[1]);
@@ -166,14 +170,16 @@ switch_to_speaker (void *cls,
  * @param data_size number of bytes in @a data
  * @param data audio data to play
  */
-static void 
+static void
 record (void *cls,
        size_t data_size,
        const void *data)
 {
   struct Recording *rec;
 
-  fprintf (stderr, "->%u\n", (unsigned int) data_size);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Recorded %u bytes\n",
+             (unsigned int) data_size);
   rec = GNUNET_malloc (sizeof (struct Recording) + data_size);
   rec->size = data_size;
   memcpy (&rec[1], data, data_size);
@@ -205,8 +211,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   st = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
                                     &do_shutdown,
                                     NULL);
-  fprintf (stderr, 
-          "Recording for %s...",
+  fprintf (stderr,
+          _("We will now be recording you for %s. After that time, the recording will be played back to you..."),
           GNUNET_STRINGS_relative_time_to_string (TIMEOUT, GNUNET_YES));
   if (GNUNET_OK !=
       microphone->enable_microphone (microphone->cls,