[polypaudio-commits] r668 - in /trunk/src/polyp: sample.c sample.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Apr 9 12:32:16 PDT 2006


Author: ossman
Date: Sun Apr  9 21:32:16 2006
New Revision: 668

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=668&root=polypaudio&view=rev
Log:
Use the modern Ki/Mi/Gi prefixes to clarify that 1024 is the base.

Modified:
    trunk/src/polyp/sample.c
    trunk/src/polyp/sample.h

Modified: trunk/src/polyp/sample.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/sample.c?rev=668&root=polypaudio&r1=667&r2=668&view=diff
==============================================================================
--- trunk/src/polyp/sample.c (original)
+++ trunk/src/polyp/sample.c Sun Apr  9 21:32:16 2006
@@ -115,11 +115,11 @@
 
 void pa_bytes_snprint(char *s, size_t l, unsigned v) {
     if (v >= ((unsigned) 1024)*1024*1024)
-        snprintf(s, l, "%0.1f GB", ((double) v)/1024/1024/1024);
+        snprintf(s, l, "%0.1f GiB", ((double) v)/1024/1024/1024);
     else if (v >= ((unsigned) 1024)*1024)
-        snprintf(s, l, "%0.1f MB", ((double) v)/1024/1024);
+        snprintf(s, l, "%0.1f MiB", ((double) v)/1024/1024);
     else if (v >= (unsigned) 1024)
-        snprintf(s, l, "%0.1f KB", ((double) v)/1024);
+        snprintf(s, l, "%0.1f KiB", ((double) v)/1024);
     else
         snprintf(s, l, "%u B", (unsigned) v);
 }

Modified: trunk/src/polyp/sample.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/sample.h?rev=668&root=polypaudio&r1=667&r2=668&view=diff
==============================================================================
--- trunk/src/polyp/sample.h (original)
+++ trunk/src/polyp/sample.h Sun Apr  9 21:32:16 2006
@@ -91,7 +91,7 @@
  * \li pa_parse_sample_format() - Parse a text string into a sample format.
  * \li pa_sample_spec_snprint() - Create a textual description of a complete
  *                                 sample format specification.
- * \li pa_bytes_snprint() - Pretty print a byte value (e.g. 2.5 MB).
+ * \li pa_bytes_snprint() - Pretty print a byte value (e.g. 2.5 MiB).
  */
 
 /** \file
@@ -178,7 +178,7 @@
 /** Pretty print a sample type specification to a string */
 char* pa_sample_spec_snprint(char *s, size_t l, const pa_sample_spec *spec);
 
-/** Pretty print a byte size value. (i.e. "2.5 MB") */
+/** Pretty print a byte size value. (i.e. "2.5 MiB") */
 void pa_bytes_snprint(char *s, size_t l, unsigned v);
 
 PA_C_DECL_END




More information about the pulseaudio-commits mailing list