Index: tools/bsewavetool.cc
===================================================================
--- tools/bsewavetool.cc	(Revision 4421)
+++ tools/bsewavetool.cc	(Arbeitskopie)
@@ -1537,6 +1537,16 @@ public:
       }
     return "raw";
   }
+  int64
+  dhandle_n_frames (GslDataHandle *dhandle)
+  {
+    int64 n_values = gsl_data_handle_length (dhandle);
+    int64 n_channels = gsl_data_handle_n_channels (dhandle);
+    int64 n_frames = n_values / n_channels;
+
+    g_return_val_if_fail (n_values % n_channels == 0, n_frames);  /* a datahandle cannot contain half frames */
+    return n_frames;
+  }
   static double
   feature_avg_energy (GslDataHandle *dhandle,
                       double         volume_adjustment)
@@ -1661,7 +1671,7 @@ public:
                   if (*fi == "channels")
                     g_print ("%d", wave->n_channels);
                   else if (*fi == "length")
-                    g_print ("%lld", gsl_data_handle_length (dhandle));
+                    g_print ("%lld", dhandle_n_frames (dhandle));
                   else if (*fi == "osc-freq")
                     g_print ("%.3f", gsl_data_handle_osc_freq (dhandle));
                   else if (*fi == "mix-freq")
@@ -1720,8 +1730,8 @@ public:
               if (m_output_format == FULL)
                 {
                   g_print ("  Samples  %10lld     (%.2f s)\n",
-                           gsl_data_handle_length (dhandle),
-                           gsl_data_handle_length (dhandle) / gsl_data_handle_mix_freq (dhandle));
+                           dhandle_n_frames (dhandle),
+                           dhandle_n_frames (dhandle) / gsl_data_handle_mix_freq (dhandle));
                   if (bse_xinfos_get_value (dhandle->setup.xinfos, "volume"))
                     {
                       const double volume = gsl_data_handle_volume (dhandle);
Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 4421)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,10 @@
+Tue Oct 30 17:59:26 2007  Stefan Westerfeld  <stefan@space.twc.de>
+
+	Fix bsewavetool info output for multichannel samples #491552.
+
+	* tools/bsewavetool.cc: When computing the sample count and the sample
+	length in seconds, take into account the number of channels.
+
 Sat Oct 13 22:48:04 2007 +0200 Tim Janik
 
 	tools/bsewavetool.cc: compacted info --pretty=medium output.
