<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.systems.archos.rockbox.cvs">
    <title>gmane.comp.systems.archos.rockbox.cvs</title>
    <link>http://blog.gmane.org/gmane.comp.systems.archos.rockbox.cvs</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32841"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32840"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32839"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32838"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32837"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32836"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32835"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32834"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32833"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32832"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32831"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32830"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32829"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32828"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32827"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32826"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32825"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32824"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32823"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32822"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32841">
    <title>Fix FS#12559: sigaltstack threads fortify failure</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32841</link>
    <description>&lt;pre&gt;commit f4954c4a9bda0edbdc8e93314b713c036c4ebfdd
Author: Boris Gjenero &amp;lt;boris.gjenero&amp;lt; at &amp;gt;gmail.com&amp;gt;
Date:   Thu Jan 26 20:33:28 2012 -0500

    Fix FS#12559: sigaltstack threads fortify failure
    
    Ubuntu defines _FORTIFY_SOURCE=2, which causes glibc longjmp() to check sp
    when gcc optimization is enabled. The check does not allow longjmp() to be
    used for switching threads and results in a "longjmp causes uninitialized
    stack frame" error. This disables the check.
    
    Change-Id: Idb8877b43ce711df880ca88875ba5477445a577a

diff --git a/firmware/thread.c b/firmware/thread.c
index 5e543c5..4c15fcc 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -19,6 +19,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  *
  ****************************************************************************/
 #include "config.h"
+
+#ifdef HAVE_SIGALTSTACK_THREADS
+/*
+ * The sp check in glibc __longjmp_chk() will cause
+ * a fatal error when switching threads via longjmp().
+ */
+#undef _FORTIFY_SOURCE
+#endif
+
 #include &amp;lt;stdbool.h&amp;gt;
 #include &amp;lt;stdio.h&amp;gt;
 #include "thread.h"
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-27T07:59:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32840">
    <title>Update CONTRIBUTING to reflect our switch to git on gerrit.</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32840</link>
    <description>&lt;pre&gt;commit fee6f80fb8bca110a03fc7693a17f4c5e4b798d2
Author: Marcin Bukat &amp;lt;marcin.bukat&amp;lt; at &amp;gt;gmail.com&amp;gt;
Date:   Tue Jan 24 13:05:25 2012 +0100

    Update CONTRIBUTING to reflect our switch to git on gerrit.
    
    Fixes FS#12536
    
    Change-Id: Iee4700ef01eb23c92a026df5074ffcf0257fe0ec

diff --git a/docs/CONTRIBUTING b/docs/CONTRIBUTING
index 83f0aa6..f31b1a8 100644
--- a/docs/CONTRIBUTING
+++ b/docs/CONTRIBUTING
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,3 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-$Id$
-
                __________               __   ___.
      Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
      Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -55,7 +53,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Braces for function declarations are put in a new line under the name, as in:
   }
 
 Always indent your code with four spaces. Don't use TAB characters, as that
-will mess up code display in CVS, printing, and a zillion other places.
+will mess up code display, printing, and a zillion other places.
 
 Keep lines below 80 columns length. Use whitespace and newlines to make the
 code easy to browse/read.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -67,16 +65,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Use "unix style" line feeds: "LF" only. Do not use "CR+LF".
 Use UTF-8 character set, but try to refrain from using any non-ascii
 letters as they will only appear weird in some camps no matter what.
 
-Patches
+Contributing code
 -------
-Create a patch using 'svn diff &amp;gt; mychanges.patch
-Trim your patches so they only contain relevant changes.
+We have a public code review system based on git, which is also how you can
+check out the latest version of the Rockbox sources.
+See http://www.rockbox.org/wiki/UsingGit for details on how to setup your
+environment and how to upload a change you have made for review.
 
-Submit your patch to the project via our patch tracker:
-http://www.rockbox.org/tracker/index.php?type=4
+We'd prefer that you don't submit patches to the bug tracker any more,
+as it's much harder to read and discuss them there.
 
 Credits
 -------
 We believe in crediting all contributors by name. Before committing a patch to
-SVN, we ask that you give us your full real name (no pseudonyms or nicknames)
+Git, we ask that you give us your full real name (no pseudonyms or nicknames)
 for adding to the credits list.
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-24T15:58:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32839">
    <title>bertrik: r31646 - in trunk: apps/lang docs</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32839</link>
    <description>&lt;pre&gt;Date: 2012-01-09 22:19:14 +0100 (Mon, 09 Jan 2012)
New Revision: 31646

Log Message:
FS#12511 - Polish translation by Artur Juraszek

Modified:
   trunk/apps/lang/polski.lang
   trunk/docs/CREDITS

Modified: trunk/apps/lang/polski.lang
===================================================================
--- trunk/apps/lang/polski.lang2012-01-09 10:16:05 UTC (rev 31645)
+++ trunk/apps/lang/polski.lang2012-01-09 21:19:14 UTC (rev 31646)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12075,15 +12075,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   user: core
   &amp;lt;source&amp;gt;
     *: none
-    gigabeats,mpiohd200,mpiohd300: "3-D Enhancement"
+    gigabeats,mpiohd200,mpiohd300,sansafuzeplus: "3-D Enhancement"
   &amp;lt;/source&amp;gt;
   &amp;lt;dest&amp;gt;
     *: none
-    gigabeats,mpiohd200,mpiohd300: "Dźwięk 3-D"
+    gigabeats,mpiohd200,mpiohd300,sansafuzeplus: "Efekt 3D"
   &amp;lt;/dest&amp;gt;
   &amp;lt;voice&amp;gt;
     *: none
-    gigabeats,mpiohd200,mpiohd300: "Dźwięk 3-D"
+    gigabeats,mpiohd200,mpiohd300,sansafuzeplus: "Efekt 3D"
   &amp;lt;/voice&amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12697,16 +12697,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
   id: LANG_SET_AS_PLAYLISTCAT_DIR
-  desc: used in the onplay menu to set a playlist catalog dir
+  desc: used in the onplay menu to set a playlist catalogue dir
   user: core
   &amp;lt;source&amp;gt;
-    *: "Set As Playlist Catalog Directory"
+    *: "Set As Playlist Catalogue Directory"
   &amp;lt;/source&amp;gt;
   &amp;lt;dest&amp;gt;
-    *: "Ustaw Jako Ścieżkę Katalogu List odtwarzania"
+    *: "Ustaw jako katalog listy odtwarzania"
   &amp;lt;/dest&amp;gt;
   &amp;lt;voice&amp;gt;
-    *: "Ustaw Jako Ścieżkę Katalogu List odtwarzania"
+    *: "Ustaw jako katalog listy odtwarzania"
   &amp;lt;/voice&amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12728,12 +12728,192 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   desc:
   user: core
   &amp;lt;source&amp;gt;
-    *: "Reset Playlist Catalog Directory"
+    *: "Reset Playlist Catalogue Directory"
   &amp;lt;/source&amp;gt;
   &amp;lt;dest&amp;gt;
-    *: "Usuń Ścieżkę Katalogu List odtwarzania"
+    *: "Resetuj katalog listy odtwarzania"
   &amp;lt;/dest&amp;gt;
   &amp;lt;voice&amp;gt;
-    *: "Usuń Ścieżkę Katalogu List odtwarzania"
+    *: "Resetuj katalog listy odtwarzania"
   &amp;lt;/voice&amp;gt;
 &amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_GLYPHS
+  desc: in settings_menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Glyphs To Cache"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Kopiuj tekst do Schowka"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Kopiuj tekst do schowka"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_USB_SKIP_FIRST_DRIVE
+  desc: in settings_menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    multidrive_usb: "USB Hide Internal Drive"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    multidrive_usb: "Ukryj wewnętrzny dysk USB"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    multidrive_usb: "Ukryj wewnętrzny dysk USB"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_KEYCLICK_HARDWARE
+  desc: in keyclick settings menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    hardware_click: "Speaker Keyclick"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    hardware_click: "Dźwięk klawiszy (głośnik)"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    hardware_click: "Dźwięk klawiszy (głośnik)"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_KEYCLICK_SOFTWARE
+  desc: in keyclick settings menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    hardware_click: "Headphone Keyclick"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    hardware_click: "Dźwięk klawiszy (słuchawki)"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    hardware_click: "Dźwięk klawiszy (słuchawki)"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_LIST_LINE_PADDING
+  desc: list padding, in display settings
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    touchscreen: "Line Padding in Lists"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    touchscreen: "Line Padding in Lists"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    touchscreen: "Line Padding in Lists"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_AUTOMATIC
+  desc: generic automatic
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Automatic"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Automatycznie"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Automatycznie"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SHORTCUTS
+  desc: Title in the shortcuts menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Shortcuts"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Skróty"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Skróty"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SLEEP_TIMER_CANCEL_CURRENT
+  desc: shown instead of sleep timer when it's running
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Cancel Sleep Timer"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Anuluj budzik"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Anuluj budzik"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_STARTUP_SHUTDOWN
+  desc: in the general settings menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Startup/Shutdown"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Włącz/Wyłącz"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Włącz/Wyłącz"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_KEYPRESS_RESTARTS_SLEEP_TIMER
+  desc: whether to restart running sleep timer on keypress
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Restart Sleep Timer On Keypress"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Resetuj budzik po naciśnięciu klawisza"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Resetuj budzik po naciśnięciu klawisza"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SLEEP_TIMER_DURATION
+  desc: default sleep timer duration in minutes (unused in UI)
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Default Sleep Timer Duration"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Domyślna pora alarmu"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Domyślna pora alarmu"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SLEEP_TIMER_ON_POWER_UP
+  desc: whether sleep timer starts on power up
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Start Sleep Timer On Boot"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Ustaw alarm przy włączeniu"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Ustaw alarm przy włączeniu"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;

Modified: trunk/docs/CREDITS
===================================================================
--- trunk/docs/CREDITS2012-01-09 10:16:05 UTC (rev 31645)
+++ trunk/docs/CREDITS2012-01-09 21:19:14 UTC (rev 31646)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -612,6 +612,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Jean-Louis Biasini
 Lorenzo Miori
 James Hunt
+Artur Juraszek
 
 The libmad team
 The wavpack team

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-09T21:19:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32838">
    <title>jdgordon: r31645 - trunk/uisimulator/buttonmap</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32838</link>
    <description>&lt;pre&gt;Date: 2012-01-09 11:16:05 +0100 (Mon, 09 Jan 2012)
New Revision: 31645

Log Message:
r31444 missed a file. make fuzeplus sim build again

Modified:
   trunk/uisimulator/buttonmap/sansa-fuzeplus.c

Modified: trunk/uisimulator/buttonmap/sansa-fuzeplus.c
===================================================================
--- trunk/uisimulator/buttonmap/sansa-fuzeplus.c2012-01-09 05:23:25 UTC (rev 31644)
+++ trunk/uisimulator/buttonmap/sansa-fuzeplus.c2012-01-09 10:16:05 UTC (rev 31645)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -49,9 +49,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         case SDLK_KP9:
             new_btn = BUTTON_PLAYPAUSE;
             break;
-        case SDLK_KP0:
-            new_btn = BUTTON_TWO_FINGERS;
-            break;
         case SDLK_KP7:
             new_btn = BUTTON_BACK;
             break;

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-09T10:16:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32837">
    <title>jethead71: r31644 - trunk/firmware/export/config</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32837</link>
    <description>&lt;pre&gt;Date: 2012-01-09 06:23:25 +0100 (Mon, 09 Jan 2012)
New Revision: 31644

Log Message:
Fix Clip Zip bootloader build.

Modified:
   trunk/firmware/export/config/sansaclipzip.h

Modified: trunk/firmware/export/config/sansaclipzip.h
===================================================================
--- trunk/firmware/export/config/sansaclipzip.h2012-01-09 03:26:03 UTC (rev 31643)
+++ trunk/firmware/export/config/sansaclipzip.h2012-01-09 05:23:25 UTC (rev 31644)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -13,6 +13,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define HAVE_MULTIDRIVE
 #define NUM_DRIVES 2
 #define HAVE_HOTSWAP
+#define HAVE_RDS_CAP
 #endif
 
 #define HW_SAMPR_CAPS       SAMPR_CAP_ALL
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -33,8 +34,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
    explicitly if different */
 #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
 
-#define HAVE_RDS_CAP
-
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP
 /* define this if you have a colour LCD */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -123,7 +122,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define PLUGIN_BUFFER_SIZE 0x80000
 
 #define AB_REPEAT_ENABLE
-
 /* FM Tuner */
 #define CONFIG_TUNER SI4700 /* in fact SI4702 */
 //#define HAVE_TUNER_PWR_CTRL

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-09T05:23:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32836">
    <title>saratoga: r31643 - in trunk: apps firmware</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32836</link>
    <description>&lt;pre&gt;Date: 2012-01-09 04:26:03 +0100 (Mon, 09 Jan 2012)
New Revision: 31643

Log Message:
Commit FS#12454 - Faster line scroll speed by Martin Sagmuller.

Modified:
   trunk/apps/settings_list.c
   trunk/firmware/scroll_engine.c

Modified: trunk/apps/settings_list.c
===================================================================
--- trunk/apps/settings_list.c2012-01-08 22:29:25 UTC (rev 31642)
+++ trunk/apps/settings_list.c2012-01-09 03:26:03 UTC (rev 31643)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -967,7 +967,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #endif
 #endif /* HAVE_BACKLIGHT */
     INT_SETTING(F_PADTITLE, scroll_speed, LANG_SCROLL_SPEED, 9,"scroll speed",
-                UNIT_INT, 0, 15, 1, NULL, NULL, lcd_scroll_speed),
+                UNIT_INT, 0, 17, 1, NULL, NULL, lcd_scroll_speed),
     INT_SETTING(F_PADTITLE, scroll_delay, LANG_SCROLL_DELAY, 1000,
                 "scroll delay", UNIT_MS, 0, 2500, 100, NULL,
                 NULL, lcd_scroll_delay),
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -975,7 +975,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
                 UNIT_PERCENT, 0, 200, 25, NULL, NULL, lcd_bidir_scroll),
 #ifdef HAVE_REMOTE_LCD
     INT_SETTING(0, remote_scroll_speed, LANG_SCROLL_SPEED, 9,
-                "remote scroll speed", UNIT_INT, 0,15, 1,
+                "remote scroll speed", UNIT_INT, 0,17, 1,
                 NULL, NULL, lcd_remote_scroll_speed),
     INT_SETTING(0, remote_scroll_step, LANG_SCROLL_STEP, 6,
                 "remote scroll step", UNIT_PIXEL, 1, LCD_REMOTE_WIDTH, 1, NULL,

Modified: trunk/firmware/scroll_engine.c
===================================================================
--- trunk/firmware/scroll_engine.c2012-01-08 22:29:25 UTC (rev 31642)
+++ trunk/firmware/scroll_engine.c2012-01-09 03:26:03 UTC (rev 31643)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,10 +35,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #endif
 #include "scroll_engine.h"
 
-static const char scroll_tick_table[16] = {
- /* Hz values:
-    1, 1.25, 1.55, 2, 2.5, 3.12, 4, 5, 6.25, 8.33, 10, 12.5, 16.7, 20, 25, 33 */
-    100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3
+static const char scroll_tick_table[18] = {
+ /* Hz values [f(x)=100.8/(x+.048)]:
+    1, 1.25, 1.55, 2, 2.5, 3.12, 4, 5, 6.25, 8.33, 10, 12.5, 16.7, 20, 25, 33, 49.2, 96.2 */
+    100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1
 };
 
 static void scroll_thread(void);

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-09T03:26:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32835">
    <title>jethead71: r31642 - in trunk/firmware: . target/arm target/arm/as3525target/arm/as3525/sansa-fuzev2</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32835</link>
    <description>&lt;pre&gt;Date: 2012-01-08 23:29:25 +0100 (Sun, 08 Jan 2012)
New Revision: 31642

Log Message:
AS3525v1/2: Enable nested handling of interrupts

Mostly for the sake of reducing latency for audio servicing where other service
routines can take a long time to complete, leading to occasional drops of a
few samples, especially in recording, where they are fairly frequent.

One mystery that remains is GPIOA IRQ being interrupted causes strange
undefined instruction exceptions, most easily produced on my Fuze V2 with a
scrollwheel. Making GPIOA the top ISR for now, thus not interruptible, cures it.

SVC mode is used during the actual calls. Hopefully the SVC stack size is
sufficient. Prologue and epilogue code only uses the IRQ stack and is large
enough.

Any routine code that should not be interrupted should disable IRQ itself from
here on in.


Modified:
   trunk/firmware/kernel.c
   trunk/firmware/target/arm/as3525/fmradio-i2c-as3525.c
   trunk/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
   trunk/firmware/target/arm/as3525/sd-as3525.c
   trunk/firmware/target/arm/as3525/sd-as3525v2.c
   trunk/firmware/target/arm/as3525/system-as3525.c
   trunk/firmware/target/arm/crt0.S
   trunk/firmware/target/arm/system-arm.h

Modified: trunk/firmware/kernel.c
===================================================================
--- trunk/firmware/kernel.c2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/kernel.c2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1195,9 +1195,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * in 'semaphore_init'. */
 void semaphore_release(struct semaphore *s)
 {
-#if defined(HAVE_PRIORITY_SCHEDULING) &amp;amp;&amp;amp; defined(irq_enabled_checkval)
     unsigned int result = THREAD_NONE;
-#endif
     int oldlevel;
 
     oldlevel = disable_irq_save();
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1209,11 +1207,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         KERNEL_ASSERT(s-&amp;gt;count == 0,
             "semaphore_release-&amp;gt;threads queued but count=%d!\n", s-&amp;gt;count);
         s-&amp;gt;queue-&amp;gt;retval = OBJ_WAIT_SUCCEEDED; /* indicate explicit wake */
-#if defined(HAVE_PRIORITY_SCHEDULING) &amp;amp;&amp;amp; defined(irq_enabled_checkval)
         result = wakeup_thread(&amp;amp;s-&amp;gt;queue);
-#else
-        wakeup_thread(&amp;amp;s-&amp;gt;queue);
-#endif
     }
     else
     {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1228,11 +1222,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     corelock_unlock(&amp;amp;s-&amp;gt;cl);
     restore_irq(oldlevel);
 
-#if defined(HAVE_PRIORITY_SCHEDULING) &amp;amp;&amp;amp; defined(irq_enabled_checkval)
-    /* No thread switch if IRQ disabled - it's probably called via ISR.
-     * switch_thread would as well enable them anyway. */
-    if((result &amp;amp; THREAD_SWITCH) &amp;amp;&amp;amp; irq_enabled_checkval(oldlevel))
+#if defined(HAVE_PRIORITY_SCHEDULING) &amp;amp;&amp;amp; defined(is_thread_context)
+    /* No thread switch if not thread context */
+    if((result &amp;amp; THREAD_SWITCH) &amp;amp;&amp;amp; is_thread_context())
         switch_thread();
 #endif
+    (void)result;
 }
 #endif /* HAVE_SEMAPHORE_OBJECTS */

Modified: trunk/firmware/target/arm/as3525/fmradio-i2c-as3525.c
===================================================================
--- trunk/firmware/target/arm/as3525/fmradio-i2c-as3525.c2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/target/arm/as3525/fmradio-i2c-as3525.c2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -195,8 +195,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     /* read and clear the interrupt */
     if (GPIOA_MIS &amp;amp; (1&amp;lt;&amp;lt;4)) {
         semaphore_release(&amp;amp;rds_sema);
+        GPIOA_IC = (1&amp;lt;&amp;lt;4);
     }
-    GPIOA_IC = (1&amp;lt;&amp;lt;4);
 }
 
 /* Captures RDS data and processes it */

Modified: trunk/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
===================================================================
--- trunk/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,6 +30,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #ifdef HAVE_SCROLLWHEEL
 #define SCROLLWHEEL_BITS        (1&amp;lt;&amp;lt;7|1&amp;lt;&amp;lt;6)
+#define SCROLLWHEEL_BITS_POS    6
                                                       /* TIMER units */
 #define TIMER_TICK              (KERNEL_TIMER_FREQ/HZ)/* how long a tick lasts */
 #define TIMER_MS                (TIMER_TICK/(1000/HZ))/* how long a ms lasts */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -78,10 +79,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
     unsigned int btn = BUTTON_NONE;
 
-    if (old_wheel_value == wheel_tbl[0][wheel_value])
+    if (hold_button)
+    {
+    }
+    else if (old_wheel_value == wheel_tbl[0][wheel_value])
+    {
         btn = BUTTON_SCROLL_FWD;
+    }
     else if (old_wheel_value == wheel_tbl[1][wheel_value])
+    {
         btn = BUTTON_SCROLL_BACK;
+    }
 
     if (btn == BUTTON_NONE)
     {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -200,11 +208,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 {
 #if defined(HAVE_SCROLLWHEEL)
     /* scroll wheel handling */
-    if (GPIOA_MIS &amp;amp; SCROLLWHEEL_BITS)
-        scrollwheel(GPIOA_PIN_MASK(0xc0) &amp;gt;&amp;gt; 6);
+    unsigned long bits = GPIOA_MIS &amp;amp; SCROLLWHEEL_BITS;
 
-    /* ack interrupt */
-    GPIOA_IC = SCROLLWHEEL_BITS;
+    if (bits)
+    {
+        scrollwheel(GPIOA_PIN_MASK(SCROLLWHEEL_BITS) &amp;gt;&amp;gt; SCROLLWHEEL_BITS_POS);
+        GPIOA_IC = bits; /* ack interrupt */
+    }
 #endif
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -225,8 +235,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     int delay = 30;
     while(delay--) nop;
 
+    disable_irq();
+
     bool ccu_io_bit12 = CCU_IO &amp;amp; (1&amp;lt;&amp;lt;12);
-    bitclr32(&amp;amp;CCU_IO, 1&amp;lt;&amp;lt;12);
+    CCU_IO &amp;amp;= ~(1&amp;lt;&amp;lt;12);
 
     /* B1 is shared with FM i2c */
     bool gpiob_pin0_dir = GPIOB_DIR &amp;amp; (1&amp;lt;&amp;lt;1);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -256,8 +268,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         GPIOB_DIR |= 1&amp;lt;&amp;lt;1;
 
     if(ccu_io_bit12)
-        bitset32(&amp;amp;CCU_IO, 1&amp;lt;&amp;lt;12);
+        CCU_IO |= (1&amp;lt;&amp;lt;12);
 
+    enable_irq();
+
 #ifdef HAS_BUTTON_HOLD
 #ifndef BOOTLOADER
     /* light handling */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -265,12 +279,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     {
         hold_button = hold;
         backlight_hold_changed(hold);
-        /* mask scrollwheel irq so we don't need to check for
-         * the hold button in the isr */
-        if (hold)
-            GPIOA_IE &amp;amp;= ~SCROLLWHEEL_BITS;
-        else
-            GPIOA_IE |= SCROLLWHEEL_BITS;
     }
 #else
     hold_button = hold;

Modified: trunk/firmware/target/arm/as3525/sd-as3525.c
===================================================================
--- trunk/firmware/target/arm/as3525/sd-as3525.c2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/target/arm/as3525/sd-as3525.c2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -178,10 +178,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 void sd_gpioa_isr(void)
 {
     static struct timeout sd1_oneshot;
+
     if (GPIOA_MIS &amp;amp; EXT_SD_BITS)
+    {
         timeout_register(&amp;amp;sd1_oneshot, sd1_oneshot_callback, (3*HZ/10), 0);
-    /* acknowledge interrupt */
-    GPIOA_IC = EXT_SD_BITS;
+        GPIOA_IC = EXT_SD_BITS; /* acknowledge interrupt */
+    }
 }
 #endif  /* HAVE_HOTSWAP */
 

Modified: trunk/firmware/target/arm/as3525/sd-as3525v2.c
===================================================================
--- trunk/firmware/target/arm/as3525/sd-as3525v2.c2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/target/arm/as3525/sd-as3525v2.c2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1041,10 +1041,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 void sd_gpioa_isr(void)
 {
     static struct timeout sd1_oneshot;
+
     if (GPIOA_MIS &amp;amp; EXT_SD_BITS)
+    {
         timeout_register(&amp;amp;sd1_oneshot, sd1_oneshot_callback, (3*HZ/10), 0);
-    /* acknowledge interrupt */
-    GPIOA_IC = EXT_SD_BITS;
+        GPIOA_IC = EXT_SD_BITS; /* acknowledge interrupt */
+    }
 }
 #endif /* HAVE_HOTSWAP */
 

Modified: trunk/firmware/target/arm/as3525/system-as3525.c
===================================================================
--- trunk/firmware/target/arm/as3525/system-as3525.c2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/target/arm/as3525/system-as3525.c2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,7 +51,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   extern __attribute__((weak,alias("UIRQ"))) void name (void)
 
 static void UIRQ (void) __attribute__((interrupt ("IRQ")));
-void irq_handler(void) __attribute__((interrupt ("IRQ")));
+void irq_handler(void) __attribute__((naked, interrupt ("IRQ")));
 void fiq_handler(void) __attribute__((interrupt ("FIQ")));
 
 default_interrupt(INT_WATCHDOG);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -121,6 +121,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 static const struct { int source; void (*isr) (void); } vec_int_srcs[] =
 {
     /* Highest priority at the top of the list */
+#if defined(HAVE_HOTSWAP) || defined(HAVE_RDS_CAP) || \
+    (defined(SANSA_FUZEV2) &amp;amp;&amp;amp; !INCREASED_SCROLLWHEEL_POLLING)
+    /* If GPIOA ISR is interrupted, things seem to go wonky ?? */
+    { INT_SRC_GPIOA, INT_GPIOA },
+#endif
 #ifdef HAVE_RECORDING
     { INT_SRC_I2SIN, INT_I2SIN }, /* For recording */
 #endif
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -134,29 +139,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     { INT_SRC_TIMER2, INT_TIMER2 },
     { INT_SRC_I2C_AUDIO, INT_I2C_AUDIO },
     { INT_SRC_AUDIO, INT_AUDIO },
-#if defined(HAVE_HOTSWAP) || \
-    (defined(SANSA_FUZEV2) &amp;amp;&amp;amp; !INCREASED_SCROLLWHEEL_POLLING)
-    { INT_SRC_GPIOA, INT_GPIOA, },
-#endif
     /* Lowest priority at the end of the list */
 };
 
 static void setup_vic(void)
 {
-    const unsigned int n = sizeof(vec_int_srcs)/sizeof(vec_int_srcs[0]);
-    unsigned int i;
-
     CGU_PERI |= CGU_VIC_CLOCK_ENABLE; /* enable VIC */
     VIC_INT_EN_CLEAR = 0xffffffff; /* disable all interrupt lines */
     VIC_INT_SELECT = 0; /* only IRQ, no FIQ */
 
     *VIC_DEF_VECT_ADDR = UIRQ;
 
-    for(i = 0; i &amp;lt; n; i++)
+    for(unsigned int i = 0; i &amp;lt; ARRAYLEN(vec_int_srcs); i++)
     {
         VIC_VECT_ADDRS[i] = vec_int_srcs[i].isr;
         VIC_VECT_CNTLS[i] = (1&amp;lt;&amp;lt;5) | vec_int_srcs[i].source;
     }
+
+    /* Reset priority hardware */
+    for(unsigned int i = 0; i &amp;lt; 32; i++)
+        *VIC_VECT_ADDR = 0;
 }
 
 void INT_GPIOA(void)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -177,8 +179,36 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 void irq_handler(void)
 {
-    (*VIC_VECT_ADDR)(); /* call the isr */
-    *VIC_VECT_ADDR = (void*)VIC_VECT_ADDR; /* any write will ack the irq */
+    /* Worst-case IRQ stack usage with 10 vectors:
+     * 10*4*10 = 400 bytes (100 words)
+     *
+     * No SVC stack is used by pro/epi-logue code
+     */
+    asm volatile (
+        "sub    lr, lr, #4               \n" /* Create return address */
+        "stmfd  sp!, { r0-r5, r12, lr }  \n" /* Save what gets clobbered */
+        "ldr    r0, =0xc6010030          \n" /* Obtain VIC address (before SPSR read!) */
+        "ldr    r12, [r0]                \n" /* Load Vector */
+        "mrs    r1, spsr                 \n" /* Save SPSR_irq */
+        "stmfd  sp!, { r0-r1 }           \n" /* Must have something bet. mrs and msr */
+        "msr    cpsr_c, #0x13            \n" /* Switch to SVC mode, enable IRQ */
+        "and    r4, sp, #4               \n" /* Align SVC stack to 8 bytes, save */
+        "sub    sp, sp, r4               \n"
+        "mov    r5, lr                   \n" /* Save lr_SVC */
+#if ARM_ARCH &amp;gt;= 5
+        "blx    r12                      \n" /* Call handler */
+#else
+        "mov    lr, pc                   \n"
+        "bx     r12                      \n"
+#endif
+        "add    sp, sp, r4               \n" /* Undo alignment fudge */
+        "mov    lr, r5                   \n" /* Restore lr_SVC */
+        "msr    cpsr_c, #0x92            \n" /* Mask IRQ, return to IRQ mode */
+        "ldmfd  sp!, { r0-r1 }           \n" /* Pop VIC address, SPSR_irq */
+        "str    r0, [r0]                 \n" /* Ack end of ISR to VIC  */
+        "msr    spsr_cxsf, r1            \n" /* Restore SPSR_irq */
+        "ldmfd  sp!, { r0-r5, r12, pc }^ \n" /* Restore regs, and RFE */
+    );
 }
 
 void fiq_handler(void)

Modified: trunk/firmware/target/arm/crt0.S
===================================================================
--- trunk/firmware/target/arm/crt0.S2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/target/arm/crt0.S2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -100,17 +100,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     strhi   r4, [r2], #4
     bhi     1b
 
-    /* Set up stack for IRQ mode */ 
+    /* Set up stack for IRQ mode */
     msr     cpsr_c, #0xd2
     ldr     sp, =irq_stack
 
-    /* Set up stack for FIQ mode */ 
+    msr     cpsr_c, #0xd3
+#if CONFIG_CPU == AS3525 || CONFIG_CPU == AS3525v2
+    /* Let abort and undefined modes use irq stack */
+    /* svc stack is for interrupt processing */
+    ldr     sp, =svc_stack
+#else
+    /* Let svc, abort and undefined modes use irq stack */
+    ldr     sp, =irq_stack
+
+    /* Set up stack for FIQ mode */
     msr     cpsr_c, #0xd1
     ldr     sp, =fiq_stack
-
-    /* Let svc, abort and undefined modes use irq stack */
-    msr     cpsr_c, #0xd3
-    ldr     sp, =irq_stack
+#endif
     msr     cpsr_c, #0xd7
     ldr     sp, =irq_stack
     msr     cpsr_c, #0xdb
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -159,15 +165,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     b      UIE
 
 data_abort_handler:
-    sub    r0, lr, #8 
+    sub    r0, lr, #8
     mov    r1, #2
     b      UIE
 
+/* Cache-align interrupt stacks */
+.balign    32
+
 /* 256 words of IRQ stack */
     .space 256*4
 irq_stack:
 
-/* 256 words of FIQ stack */
+/* 256 words of FIQ/SVC stack */
     .space 256*4
 fiq_stack:
-end:
+svc_stack:
+
+end:
\ No newline at end of file

Modified: trunk/firmware/target/arm/system-arm.h
===================================================================
--- trunk/firmware/target/arm/system-arm.h2012-01-08 20:09:59 UTC (rev 31641)
+++ trunk/firmware/target/arm/system-arm.h2012-01-08 22:29:25 UTC (rev 31642)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -76,6 +76,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define ints_enabled_checkval(val) \
     (((val) &amp;amp; IRQ_FIQ_STATUS) == 0)
 
+/* We run in SYS mode */
+#define is_thread_context() \
+    (get_processor_mode() == 0x1f)
 
 /* Core-level interrupt masking */
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -109,6 +112,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     return (cpsr &amp;amp; status) == 0;
 }
 
+static inline unsigned long get_processor_mode(void)
+{
+    unsigned long cpsr;
+    asm ("mrs %0, cpsr" : "=r"(cpsr));
+    return cpsr &amp;amp; 0x1f;
+}
+
 /* ARM_ARCH version section for architecture*/
 
 #if ARM_ARCH &amp;gt;= 6

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T22:29:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32834">
    <title>bluebrother: r31641 - trunk/tools</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32834</link>
    <description>&lt;pre&gt;Date: 2012-01-08 21:09:59 +0100 (Sun, 08 Jan 2012)
New Revision: 31641

Log Message:
Rename snprintf when building with MSVC to link with CRT.


Modified:
   trunk/tools/wavtrim.c

Modified: trunk/tools/wavtrim.c
===================================================================
--- trunk/tools/wavtrim.c2012-01-08 19:51:11 UTC (rev 31640)
+++ trunk/tools/wavtrim.c2012-01-08 20:09:59 UTC (rev 31641)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,6 +27,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "wavtrim.h"
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 /* place a 32 bit value into memory, little endian */
 void Write32(unsigned char* pByte, unsigned long value)
 {

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T20:09:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32833">
    <title>bluebrother: r31640 - in trunk/rbutil: ipodpatcher sansapatcher</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32833</link>
    <description>&lt;pre&gt;Date: 2012-01-08 20:51:11 +0100 (Sun, 08 Jan 2012)
New Revision: 31640

Log Message:
MSVC compatibility adjustments.

When using a global variable from a DLL with MSVC special handling is necessary
to avoid going through additional redirection.


Modified:
   trunk/rbutil/ipodpatcher/ipodpatcher.h
   trunk/rbutil/sansapatcher/sansapatcher.h

Modified: trunk/rbutil/ipodpatcher/ipodpatcher.h
===================================================================
--- trunk/rbutil/ipodpatcher/ipodpatcher.h2012-01-08 17:59:52 UTC (rev 31639)
+++ trunk/rbutil/ipodpatcher/ipodpatcher.h2012-01-08 19:51:11 UTC (rev 31640)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,7 +31,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* Size of buffer for disk I/O - 8MB is large enough for any version
    of the Apple firmware, but not the Nano's RSRC image. */
 #define BUFFER_SIZE 8*1024*1024
+
+#ifndef _MSC_VER
 extern unsigned char* ipod_sectorbuf;
+#else
+/* MSVC needs to use dllimport to allow using it directly from a DLL.
+ * See http://support.microsoft.com/kb/90530
+ * Building with MSVC is only when using as DLL.
+ */
+_declspec(dllimport) unsigned char* ipod_sectorbuf;
+#endif
+
 extern int ipod_verbose;
 
 #define FILETYPE_DOT_IPOD 0

Modified: trunk/rbutil/sansapatcher/sansapatcher.h
===================================================================
--- trunk/rbutil/sansapatcher/sansapatcher.h2012-01-08 17:59:52 UTC (rev 31639)
+++ trunk/rbutil/sansapatcher/sansapatcher.h2012-01-08 19:51:11 UTC (rev 31640)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -32,7 +32,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* Size of buffer for disk I/O - 8MB is large enough for any version
    of the Apple firmware, but not the Nano's RSRC image. */
 #define BUFFER_SIZE 8*1024*1024
+#ifndef _MSC_VER
 extern unsigned char* sansa_sectorbuf;
+#else
+/* MSVC needs to use dllimport to allow using it directly from a DLL.
+ * See http://support.microsoft.com/kb/90530
+ * Building with MSVC is only when using as DLL.
+ */
+_declspec(dllimport) unsigned char* sansa_sectorbuf;
+#endif
 
 int sansa_read_partinfo(struct sansa_t* sansa, int silent);
 int is_sansa(struct sansa_t* sansa);

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T19:51:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32832">
    <title>amiconn: r31639 - trunk/tools</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32832</link>
    <description>&lt;pre&gt;Date: 2012-01-08 18:59:52 +0100 (Sun, 08 Jan 2012)
New Revision: 31639

Log Message:
Add missing languages from configure, and sort them in exactly the same order for easier maintenance.

Modified:
   trunk/tools/sapi_voice.vbs

Modified: trunk/tools/sapi_voice.vbs
===================================================================
--- trunk/tools/sapi_voice.vbs2012-01-08 17:38:40 UTC (rev 31638)
+++ trunk/tools/sapi_voice.vbs2012-01-08 17:59:52 UTC (rev 31639)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -270,6 +270,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     Dim aIDs
 
     Select Case sLanguage
+        Case "afrikaans"
+            LangIDs = Array(&amp;amp;h436)
         Case "arabic"
             LangIDs = Array( &amp;amp;h401,  &amp;amp;h801,  &amp;amp;hc01, &amp;amp;h1001, &amp;amp;h1401, &amp;amp;h1801, _
                             &amp;amp;h1c01, &amp;amp;h2001, &amp;amp;h2401, &amp;amp;h2801, &amp;amp;h2c01, &amp;amp;h3001, _
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -277,8 +279,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             ' Saudi Arabia, Iraq, Egypt, Libya, Algeria, Morocco, Tunisia,
             ' Oman, Yemen, Syria, Jordan, Lebanon, Kuwait, U.A.E., Bahrain,
             ' Qatar
-        Case "afrikaans"
-            LangIDs = Array(&amp;amp;h436)
+        Case "basque"
+            LangIDs = Array(&amp;amp;h42d)
         Case "bulgarian"
             LangIDs = Array(&amp;amp;h402)
         Case "catala"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -296,6 +298,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             ' Standard, Austrian, Luxembourg, Liechtenstein (Swiss -&amp;gt; wallisertitsch)
         Case "eesti"
             LangIDs = Array(&amp;amp;h425)
+        Case "english-us"
+            LangIDs = Array( &amp;amp;h409,  &amp;amp;h809,  &amp;amp;hc09, &amp;amp;h1009, &amp;amp;h1409, &amp;amp;h1809, _
+                            &amp;amp;h1c09, &amp;amp;h2009, &amp;amp;h2409, &amp;amp;h2809, &amp;amp;h2c09, &amp;amp;h3009, _
+                            &amp;amp;h3409)
+            ' American, British, Australian, Canadian, New Zealand, Ireland,
+            ' South Africa, Jamaika, Caribbean, Belize, Trinidad, Zimbabwe,
+            ' Philippines
         Case "english"
             LangIDs = Array( &amp;amp;h809,  &amp;amp;h409,  &amp;amp;hc09, &amp;amp;h1009, &amp;amp;h1409, &amp;amp;h1809, _
                             &amp;amp;h1c09, &amp;amp;h2009, &amp;amp;h2409, &amp;amp;h2809, &amp;amp;h2c09, &amp;amp;h3009, _
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -328,6 +337,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             LangIDs = Array(&amp;amp;h40d)
         Case "hindi"
             LangIDs = Array(&amp;amp;h439)
+        Case "hrvatski"
+            LangIDs = Array(&amp;amp;h41a, &amp;amp;h101a) ' Croatia, Bosnia and Herzegovina
         Case "islenska"
             LangIDs = Array(&amp;amp;h40f)
         Case "italiano"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -336,22 +347,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             LangIDs = Array(&amp;amp;h411)
         Case "korean"
             LangIDs = Array(&amp;amp;h412)
+        Case "latviesu"
+            LangIDs = Array(&amp;amp;h426)
         Case "lietuviu"
             LangIDs = Array(&amp;amp;h427)
         Case "magyar"
             LangIDs = Array(&amp;amp;h40e)
         Case "nederlands"
             LangIDs = Array(&amp;amp;h413, &amp;amp;h813) ' Standard, Belgian
+        Case "norsk-nynorsk"
+            LangIDs = Array(&amp;amp;h814)
         Case "norsk"
             LangIDs = Array(&amp;amp;h414) ' Bokmal
-        Case "norsk-nynorsk"
-            LangIDs = Array(&amp;amp;h814)
         Case "polski"
             LangIDs = Array(&amp;amp;h415)
+        Case "portugues-brasileiro"
+            LangIDs = Array(&amp;amp;h416)
         Case "portugues"
             LangIDs = Array(&amp;amp;h816)
-        Case "portugues-brasileiro"
-            LangIDs = Array(&amp;amp;h416)
         Case "romaneste"
             LangIDs = Array(&amp;amp;h418)
         Case "russian"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -370,6 +383,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             LangIDs = Array(&amp;amp;h41e)
         Case "turkce"
             LangIDs = Array(&amp;amp;h41f)
+        Case "ukrainian"
+            LangIDs = Array(&amp;amp;h422)
         Case "wallisertitsch"
             LangIDs = Array(&amp;amp;h807) ' Swiss German
         Case "walon"

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T17:59:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32831">
    <title>amiconn: r31638 - trunk/tools</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32831</link>
    <description>&lt;pre&gt;Date: 2012-01-08 18:38:40 +0100 (Sun, 08 Jan 2012)
New Revision: 31638

Log Message:
Remove outdated (and buggy) configuration option for the 8MB mod. This is configured by selecting memory size directly.


Modified:
   trunk/tools/configure

Modified: trunk/tools/configure
===================================================================
--- trunk/tools/configure2012-01-08 13:59:15 UTC (rev 31637)
+++ trunk/tools/configure2012-01-08 17:38:40 UTC (rev 31638)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -720,9 +720,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     printf "Enter your developer options (press only enter when done)\n\
 (D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,\n\
 (T)est plugins, S(m)all C lib:"
-    if [ "$memory" = "2" ]; then
-      printf ", (8)MB MOD"
-    fi
     if [ "$modelname" = "archosplayer" ]; then
       printf ", Use (A)TA poweroff"
     fi
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -789,12 +786,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         echo "Voice build selected"
         voice="yes"
         ;;
-      8)
-        if [ "$memory" = "2" ]; then
-          memory="8"
-          echo "Memory size selected: 8MB"
-        fi
-        ;;
       [Aa])
         if [ "$modelname" = "archosplayer" ]; then
           have_ata_poweroff="#define HAVE_ATA_POWER_OFF"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1183,7 +1174,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 ARG_ARM_THUMB=
 ARG_PREFIX="$PREFIX"
 ARG_THREAD_SUPPORT=
-err=
+err=            
 for arg in "$&amp;lt; at &amp;gt;"; do
 case "$arg" in
 --ccache)     ARG_CCACHE=1;;

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T17:38:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32830">
    <title>amiconn: r31637 - trunk/tools</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32830</link>
    <description>&lt;pre&gt;Date: 2012-01-08 14:59:15 +0100 (Sun, 08 Jan 2012)
New Revision: 31637

Log Message:
Fix several flaws in argument handling and reconfiguring, mainly related to voice building: (1) Properly retain arguments containing spaces by re-quoting them. (2) Properly retain --tts when the default is selected by just pressing return. (3) Only append --tts and --language if they weren't already specified on the commandline, preventing duplication on 'make reconf'. (4) Never append --ttsopts and --encopts for the same reason. These are commandline only anyway.

Modified:
   trunk/tools/configure

Modified: trunk/tools/configure
===================================================================
--- trunk/tools/configure2012-01-08 12:57:02 UTC (rev 31636)
+++ trunk/tools/configure2012-01-08 13:59:15 UTC (rev 31637)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,7 +29,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 app_lcd_width=
 app_lcd_height=
 app_lcd_orientation=
-cmdline="$&amp;lt; at &amp;gt;"
+
+# Properly retain command line arguments containing spaces
+cmdline=
+for arg in "$&amp;lt; at &amp;gt;"; do
+  case "$arg" in
+    *\ *) cmdline="$cmdline \"$arg\"";;
+    *)    cmdline="$cmdline $arg";;
+  esac
+done
+
 #
 # Begin Function Definitions
 #
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -878,7 +887,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         DEFAULT_TTS="flite"
         DEFAULT_TTS_OPTS=$FLITE_OPTS
         DEFAULT_NOISEFLOOR="500"
-        DEFAULT_CHOICE="L"
+        DEFAULT_CHOICE="l"
     fi
     if [ -n "`findtool espeak`" ]; then
         ESPEAK="(e)Speak "
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -910,7 +919,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         DEFAULT_TTS="festival"
         DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
         DEFAULT_NOISEFLOOR="500"
-        DEFAULT_CHOICE="F"
+        DEFAULT_CHOICE="f"
     fi
     if [ -n "`findtool swift`" ]; then
         SWIFT="S(w)ift "
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -927,7 +936,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         DEFAULT_TTS="sapi"
         DEFAULT_TTS_OPTS=$SAPI_OPTS
         DEFAULT_NOISEFLOOR="500"
-        DEFAULT_CHOICE="S"
+        DEFAULT_CHOICE="s"
     fi
 
     if [ "$FESTIVAL" = "$FLITE" ] &amp;amp;&amp;amp; [ "$FLITE" = "$ESPEAK" ] &amp;amp;&amp;amp; [ "$ESPEAK" = "$SAPI" ] &amp;amp;&amp;amp; [ "$SAPI" = "$SWIFT" ]; then
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -940,8 +949,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     else
         echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
         option=`input`
+        if [ -z "$option" ]; then option=${DEFAULT_CHOICE}; fi
+        advopts="$advopts --tts=$option"
     fi
-    advopts="$advopts --tts=$option"
     case "$option" in
         [Ll])
         TTS_ENGINE="flite"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1008,7 +1018,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     # Read custom tts options from command line
     if [ "$ARG_TTSOPTS" ]; then
         TTS_OPTS="$ARG_TTSOPTS"
-        advopts="$advopts --ttsopts='$TTS_OPTS'"
         echo "$TTS_ENGINE options set to $TTS_OPTS"
     fi
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1031,7 +1040,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     # Read custom encoder options from command line
     if [ "$ARG_ENCOPTS" ]; then
         ENC_OPTS="$ARG_ENCOPTS"
-        advopts="$advopts --encopts='$ENC_OPTS'"
         echo "$ENCODER options set to $ENC_OPTS"
     fi
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1061,8 +1069,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             num=`expr $num + 1`
         done
         pick=`input`
+        advopts="$advopts --language=$pick"
     fi
-    advopts="$advopts --language=$pick"
 }
 
 whichlang() {

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T13:59:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32829">
    <title>bertrik: r31636 - trunk/firmware/target/arm/as3525</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32829</link>
    <description>&lt;pre&gt;Date: 2012-01-08 13:57:02 +0100 (Sun, 08 Jan 2012)
New Revision: 31636

Log Message:
Remove duplicate #include "button.h"

Modified:
   trunk/firmware/target/arm/as3525/button-e200v2-fuze.c

Modified: trunk/firmware/target/arm/as3525/button-e200v2-fuze.c
===================================================================
--- trunk/firmware/target/arm/as3525/button-e200v2-fuze.c2012-01-08 12:07:17 UTC (rev 31635)
+++ trunk/firmware/target/arm/as3525/button-e200v2-fuze.c2012-01-08 12:57:02 UTC (rev 31636)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -23,7 +23,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "config.h"
 #include "system.h"
 #include "button.h"
-#include "button.h"
 #include "backlight.h"
 #include "dbop-as3525.h"
 

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T12:57:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32828">
    <title>nick_p: r31635 - trunk/uisimulator/common</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32828</link>
    <description>&lt;pre&gt;Date: 2012-01-08 13:07:17 +0100 (Sun, 08 Jan 2012)
New Revision: 31635

Log Message:
Simulator: Emulate a period of external power after charging.

Also a bit of optimisation of battery_status_update().

FS#12506


Modified:
   trunk/uisimulator/common/powermgmt-sim.c

Modified: trunk/uisimulator/common/powermgmt-sim.c
===================================================================
--- trunk/uisimulator/common/powermgmt-sim.c2012-01-08 11:50:04 UTC (rev 31634)
+++ trunk/uisimulator/common/powermgmt-sim.c2012-01-08 12:07:17 UTC (rev 31635)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,51 +30,76 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define BATT_MAXMVOLT   4300      /* maximum millivolts of battery */
 #define BATT_MAXRUNTIME (10 * 60) /* maximum runtime with full battery in
                                      minutes */
+/* Number of millivolts to discharge the battery every second */
+#define BATT_DISCHARGE_STEP ((BATT_MAXMVOLT - BATT_MINMVOLT) / 100)
+/* Number of millivolts to charge the battery every second */
+#define BATT_CHARGE_STEP (BATT_DISCHARGE_STEP * 2)
+#if CONFIG_CHARGING &amp;gt;= CHARGING_MONITOR
+/* Number of seconds to externally power before discharging again */
+#define POWER_AFTER_CHARGE_TICKS (8 * HZ)
+#endif
 
 extern int battery_percent;
 static bool charging = false;
-
 static unsigned int battery_millivolts = BATT_MAXMVOLT;
 
 void powermgmt_init_target(void) {}
 
 static void battery_status_update(void)
 {
-    static long last_tick = 0;
+    /* Delay next battery update until tick */
+    static long update_after_tick = 0;
+#if CONFIG_CHARGING &amp;gt;= CHARGING_MONITOR
+    /* When greater than 0, the tick to unplug the external power at */
+    static unsigned int ext_power_until_tick = 0;
+#endif
 
-    if (TIME_AFTER(current_tick, (last_tick+HZ))) {
-        last_tick = current_tick;
+    if TIME_BEFORE(current_tick, update_after_tick)
+        return;
 
-        /* change the values: */
-        if (charging) {
-            if (battery_millivolts &amp;gt;= BATT_MAXMVOLT) {
-#if CONFIG_CHARGING
-                /* Pretend the charger was disconnected */
-                charger_input_state = CHARGER_UNPLUGGED;
+    update_after_tick = current_tick + HZ;
+
+#if CONFIG_CHARGING &amp;gt;= CHARGING_MONITOR
+    /* Handle period of being externally powered */
+    if (ext_power_until_tick &amp;gt; 0) {
+        if (TIME_AFTER(current_tick, ext_power_until_tick)) {
+            /* Pretend the charger was disconnected */
+            charger_input_state = CHARGER_UNPLUGGED;
+            ext_power_until_tick = 0;
+        }
+        return;
+    }
 #endif
-                charging = false;
-            }
+
+    if (charging) {
+        battery_millivolts += BATT_CHARGE_STEP;
+        if (battery_millivolts &amp;gt;= BATT_MAXMVOLT) {
+            charging = false;
+            battery_percent = 100;
+#if CONFIG_CHARGING &amp;gt;= CHARGING_MONITOR
+            /* Keep external power until tick */
+            ext_power_until_tick = current_tick + POWER_AFTER_CHARGE_TICKS;
+#elif CONFIG_CHARGING 
+            /* Pretend the charger was disconnected */
+            charger_input_state = CHARGER_UNPLUGGED;
+#endif
+            return;
         }
-        else {
-            if (battery_millivolts &amp;lt;= BATT_MINMVOLT) {
+    } else {
+        battery_millivolts -= BATT_DISCHARGE_STEP;
+        if (battery_millivolts &amp;lt;= BATT_MINMVOLT) {
+            charging = true;
+            battery_percent = 0;
 #if CONFIG_CHARGING
-                /* Pretend the charger was connected */
-                charger_input_state = CHARGER_PLUGGED;
+            /* Pretend the charger was connected */
+            charger_input_state = CHARGER_PLUGGED;
 #endif
-                charging = true;
-            }
+            return;
         }
+    }
 
-        if (charging) {
-            battery_millivolts += (BATT_MAXMVOLT - BATT_MINMVOLT) / 50;
-        }
-        else {
-            battery_millivolts -= (BATT_MAXMVOLT - BATT_MINMVOLT) / 100;
-        }
-
-        battery_percent = 100 * (battery_millivolts - BATT_MINMVOLT) /
-                            (BATT_MAXMVOLT - BATT_MINMVOLT);
-    }
+    battery_percent = 100 * (battery_millivolts - BATT_MINMVOLT) /
+                        (BATT_MAXMVOLT - BATT_MINMVOLT);
 }
 
 const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = { 3200 };
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -96,7 +121,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #if CONFIG_CHARGING
 unsigned int power_input_status(void)
 {
-    return charging ? POWER_INPUT_CHARGER : POWER_INPUT_NONE;
+    return charger_input_state &amp;gt;= CHARGER_PLUGGED
+            ? POWER_INPUT_CHARGER : POWER_INPUT_NONE;
 }
 
 bool charging_state(void)

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T12:07:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32827">
    <title>bluebrother: r31634 - in trunk/rbutil/rbutilqt: . base lame</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32827</link>
    <description>&lt;pre&gt;Date: 2012-01-08 12:50:04 +0100 (Sun, 08 Jan 2012)
New Revision: 31634

Log Message:
Rockbox Utility: use libmp3lame for voice clips.

Instead of calling the lame executable use libmp3lame directly. As result, this
simplifies the prerequisites for creating voice clips for Archos devices to
putting the library in the system's search path (Windows: put libmp3lame.dll in
the search path or the same folder RockboxUtility.exe is located in. Linux:
install the library using your systems package manager) and configuration.

This creates a notable encoding speedup on Windows (around factor 6 on my test
setup) and a small speedup on Linux (around factor 1.2).

The implemenatation currently has the following limitations:
- Only enabled on Windows and Linux. On OS X installing the correct dylib is a
  bit nontrivial, so using the old command line based method is still in use
  for now.
- The encoder parameters are currently hardcoded to use the same values the
  build system uses.

Added:
   trunk/rbutil/rbutilqt/base/encoderlame.cpp
   trunk/rbutil/rbutilqt/base/encoderlame.h
   trunk/rbutil/rbutilqt/lame/
   trunk/rbutil/rbutilqt/lame/lame.h
Modified:
   trunk/rbutil/rbutilqt/base/encoderbase.cpp
   trunk/rbutil/rbutilqt/base/voicefile.cpp
   trunk/rbutil/rbutilqt/rbutilqt.pri

Modified: trunk/rbutil/rbutilqt/base/encoderbase.cpp
===================================================================
--- trunk/rbutil/rbutilqt/base/encoderbase.cpp2012-01-08 11:49:57 UTC (rev 31633)
+++ trunk/rbutil/rbutilqt/base/encoderbase.cpp2012-01-08 11:50:04 UTC (rev 31634)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,6 +20,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "utils.h"
 #include "rbsettings.h"
 #include "encoderrbspeex.h"
+#include "encoderlame.h"
 #include "encoderexe.h"
 
 /*********************************************************************
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -55,7 +56,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     EncoderBase* enc;
     if(encoder == "lame")
     {
+#if defined(Q_OS_MACX)
+        /* currently not on OS X */
         enc = new EncoderExe(encoder,parent);
+#else
+        enc = new EncoderLame(parent);
+#endif
         return enc;
     }
     else  // rbspeex is default

Added: trunk/rbutil/rbutilqt/base/encoderlame.cpp
===================================================================
--- trunk/rbutil/rbutilqt/base/encoderlame.cpp                        (rev 0)
+++ trunk/rbutil/rbutilqt/base/encoderlame.cpp2012-01-08 11:50:04 UTC (rev 31634)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,280 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  &amp;lt;_&amp;gt; )  \___|    &amp;lt; | \_\ (  &amp;lt;_&amp;gt; &amp;gt; &amp;lt;  &amp;lt;
+ *   Firmware   |____|_  /\____/ \___  &amp;gt;__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ *
+ *   Copyright (C) 2012 Dominik Riebeling
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include &amp;lt;QtCore&amp;gt;
+#include "encoderlame.h"
+#include "rbsettings.h"
+#include "lame/lame.h"
+
+/** Resolve a symbol from loaded library.
+ */
+#define SYMBOLRESOLVE(symbol, type) \
+    do { m_##symbol = (type)lib-&amp;gt;resolve(#symbol); \
+        if(!m_##symbol) return; \
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] Resolved symbol " #symbol; } \
+    while(0)
+
+EncoderLame::EncoderLame(QObject *parent) : EncoderBase(parent)
+{
+    m_symbolsResolved = false;
+    lib = new QLibrary("libmp3lame", this);
+
+    SYMBOLRESOLVE(get_lame_short_version, const char* (*)());
+    SYMBOLRESOLVE(lame_set_out_samplerate, int (*)(lame_global_flags*, int));
+    SYMBOLRESOLVE(lame_set_in_samplerate, int (*)(lame_global_flags*, int));
+    SYMBOLRESOLVE(lame_set_num_channels, int (*)(lame_global_flags*, int));
+    SYMBOLRESOLVE(lame_set_scale, int (*)(lame_global_flags*, float));
+    SYMBOLRESOLVE(lame_set_mode, int (*)(lame_global_flags*, MPEG_mode));
+    SYMBOLRESOLVE(lame_set_VBR, int (*)(lame_global_flags*, vbr_mode));
+    SYMBOLRESOLVE(lame_set_VBR_quality, int (*)(lame_global_flags*, float));
+    SYMBOLRESOLVE(lame_set_VBR_max_bitrate_kbps, int (*)(lame_global_flags*, int));
+    SYMBOLRESOLVE(lame_set_bWriteVbrTag, int (*)(lame_global_flags*, int));
+    SYMBOLRESOLVE(lame_init, lame_global_flags* (*)());
+    SYMBOLRESOLVE(lame_init_params, int (*)(lame_global_flags*));
+    SYMBOLRESOLVE(lame_encode_buffer, int (*)(lame_global_flags*, short int*, short int*, int, unsigned char*, int));
+    SYMBOLRESOLVE(lame_encode_flush, int (*)(lame_global_flags*, unsigned char*, int));
+    SYMBOLRESOLVE(lame_close, int (*)(lame_global_flags*));
+
+    qDebug() &amp;lt;&amp;lt; "[EncoderLame] libmp3lame loaded:" &amp;lt;&amp;lt; lib-&amp;gt;isLoaded();
+    m_symbolsResolved = true;
+}
+
+void EncoderLame::generateSettings()
+{
+    // no settings for now.
+    // show lame version.
+    if(m_symbolsResolved) {
+        insertSetting(eVOLUME, new EncTtsSetting(this, EncTtsSetting::eREADONLYSTRING,
+                    tr("LAME"), QString(m_get_lame_short_version())));
+    }
+    else {
+        insertSetting(eVOLUME, new EncTtsSetting(this, EncTtsSetting::eREADONLYSTRING,
+                    tr("LAME"), tr("Could not find libmp3lame!")));
+    }
+}
+
+void EncoderLame::saveSettings()
+{
+    // no user settings right now.
+}
+
+bool EncoderLame::start()
+{
+    if(!m_symbolsResolved) {
+        return false;
+    }
+    // try to get config from settings
+    return true;
+}
+
+bool EncoderLame::encode(QString input,QString output)
+{
+    qDebug() &amp;lt;&amp;lt; "[EncoderLame] Encoding" &amp;lt;&amp;lt; input;
+    if(!m_symbolsResolved) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] Symbols not successfully resolved, cannot run!";
+        return false;
+    }
+
+    QFile fin(input);
+    QFile fout(output);
+    // initialize encoder
+    lame_global_flags *gfp;
+    unsigned char header[12];
+    unsigned char chunkheader[8];
+    unsigned int datalength = 0;
+    unsigned int channels = 0;
+    unsigned int samplerate = 0;
+    unsigned int samplesize = 0;
+    int num_samples = 0;
+    int ret;
+    unsigned char* mp3buf;
+    int mp3buflen;
+    short int* wavbuf;
+    int wavbuflen;
+
+
+    gfp = m_lame_init();
+    m_lame_set_out_samplerate(gfp, 12000);      // resample to 12kHz
+    m_lame_set_scale(gfp, 1.0);                 // scale input volume
+    m_lame_set_mode(gfp, MONO);                 // mono output mode
+    m_lame_set_VBR(gfp, vbr_default);           // enable default VBR mode
+    m_lame_set_VBR_quality(gfp, 9.999);         // VBR quality
+    m_lame_set_VBR_max_bitrate_kbps(gfp, 64);   // maximum bitrate 64kbps
+    m_lame_set_bWriteVbrTag(gfp, 0);            // disable LAME tag.
+
+    fin.open(QIODevice::ReadOnly);
+
+    // read RIFF header
+    fin.read((char*)header, 12);
+    if(memcmp("RIFF", header, 4) != 0) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] RIFF header not found!"
+                 &amp;lt;&amp;lt; header[0] &amp;lt;&amp;lt; header[1] &amp;lt;&amp;lt; header[2] &amp;lt;&amp;lt; header[3];
+        fin.close();
+        return false;
+    }
+    if(memcmp("WAVE", &amp;amp;header[8], 4) != 0) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] WAVE FOURCC not found!"
+                 &amp;lt;&amp;lt; header[8] &amp;lt;&amp;lt; header[9] &amp;lt;&amp;lt; header[10] &amp;lt;&amp;lt; header[11];
+        fin.close();
+        return false;
+    }
+
+    // search for fmt chunk
+    do {
+        // read fmt
+        fin.read((char*)chunkheader, 8);
+        int chunkdatalen = chunkheader[4] | chunkheader[5]&amp;lt;&amp;lt;8
+                           | chunkheader[6]&amp;lt;&amp;lt;16 | chunkheader[7]&amp;lt;&amp;lt;24;
+        if(memcmp("fmt ", chunkheader, 4) == 0) {
+            // fmt found, read rest of chunk.
+            // NOTE: This code ignores the format tag value.
+            // Ideally this should be checked as well. However, rbspeex doesn't
+            // check the format tag either when reading wave files, so if
+            // problems arise we should notice pretty soon. Furthermore, the
+            // input format used should be known. In case some TTS uses a
+            // different wave encoding some time this needs to get adjusted.
+            if(chunkdatalen &amp;lt; 16) {
+                qDebug() &amp;lt;&amp;lt; "fmt chunk too small!";
+            }
+            else {
+                unsigned char *buf = new unsigned char[chunkdatalen];
+                fin.read((char*)buf, chunkdatalen);
+                channels = buf[2] | buf[3]&amp;lt;&amp;lt;8;
+                samplerate = buf[4] | buf[5]&amp;lt;&amp;lt;8 | buf[6]&amp;lt;&amp;lt;16 | buf[7]&amp;lt;&amp;lt;24;
+                samplesize = buf[14] | buf[15]&amp;lt;&amp;lt;8;
+                delete buf;
+            }
+        }
+        // read data
+        else if(memcmp("data", chunkheader, 4) == 0) {
+            datalength = chunkdatalen;
+            break;
+        }
+        else {
+            // unknown chunk, just skip its data.
+            qDebug() &amp;lt;&amp;lt; "[EncoderLame] unknown chunk, skipping."
+                     &amp;lt;&amp;lt; chunkheader[0] &amp;lt;&amp;lt; chunkheader[1]
+                     &amp;lt;&amp;lt; chunkheader[2] &amp;lt;&amp;lt; chunkheader[3];
+            fin.seek(fin.pos() + chunkdatalen);
+        }
+    } while(!fin.atEnd());
+
+    // check format
+    if(channels == 0 || samplerate == 0 || samplesize == 0 || datalength == 0) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] invalid format. Channels:" &amp;lt;&amp;lt; channels
+                 &amp;lt;&amp;lt; "Samplerate:" &amp;lt;&amp;lt; samplerate &amp;lt;&amp;lt; "Samplesize:" &amp;lt;&amp;lt; samplesize
+                 &amp;lt;&amp;lt; "Data chunk length:" &amp;lt;&amp;lt; datalength;
+        fin.close();
+        return false;
+    }
+    num_samples = (datalength / channels / (samplesize/8));
+
+    // set input format values
+    m_lame_set_in_samplerate(gfp, samplerate);
+    m_lame_set_num_channels(gfp, channels);
+
+    // initialize encoder.
+    ret = m_lame_init_params(gfp);
+    if(ret != 0) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] lame_init_params() failed with" &amp;lt;&amp;lt; ret;
+        fin.close();
+        return false;
+    }
+
+    // we're dealing with rather small files here (100kB-ish), so don't care
+    // about the possible output size and simply allocate the same number of
+    // bytes the input file has. This wastes space but should be ok.
+    // Put an upper limit of 8MiB.
+    if(datalength &amp;gt; 8*1024*1024) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] Input file too large:" &amp;lt;&amp;lt; datalength;
+        fin.close();
+        return false;
+    }
+    mp3buflen = datalength;
+    wavbuflen = datalength;
+    mp3buf = new unsigned char[mp3buflen];
+    wavbuf = new short int[wavbuflen];
+#if defined(Q_OS_MACX)
+    // handle byte order -- the host might not be LE.
+    if(samplesize == 8) {
+        // no need to convert.
+        fin.read((char*)wavbuf, wavbuflen);
+    }
+    else if(samplesize == 16) {
+        // read LE 16bit words. Since the input format is either mono or
+        // interleaved there's no need to care for that.
+        unsigned int pos = 0;
+        char word[2];
+        while(pos &amp;lt; datalength) {
+            fin.read(word, 2);
+            wavbuf[pos++] = (word[0]&amp;amp;0xff) | ((word[1]&amp;lt;&amp;lt;8)&amp;amp;0xff00);
+        }
+    }
+    else {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] Unknown samplesize:" &amp;lt;&amp;lt; samplesize;
+        fin.close();
+        delete mp3buf;
+        delete wavbuf;
+        return false;
+    }
+#else
+    // all systems but OS X are considered LE.
+    fin.read((char*)wavbuf, wavbuflen);
+#endif
+    fin.close();
+    // encode data.
+    fout.open(QIODevice::ReadWrite);
+    ret = m_lame_encode_buffer(gfp, wavbuf, wavbuf, num_samples, mp3buf, mp3buflen);
+    if(ret &amp;lt; 0) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] Error during encoding:" &amp;lt;&amp;lt; ret;
+    }
+    if(fout.write((char*)mp3buf, ret) != (unsigned int)ret) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] Writing mp3 data failed!" &amp;lt;&amp;lt; ret;
+        fout.close();
+        delete mp3buf;
+        delete wavbuf;
+        return false;
+    }
+    // flush remaining data
+    ret = m_lame_encode_flush(gfp, mp3buf, mp3buflen);
+    if(fout.write((char*)mp3buf, ret) != (unsigned int)ret) {
+        qDebug() &amp;lt;&amp;lt; "[EncoderLame] Writing final mp3 data failed!";
+        fout.close();
+        delete mp3buf;
+        delete wavbuf;
+        return false;
+    }
+    // shut down encoder and clean up.
+    m_lame_close(gfp);
+    fout.close();
+    delete mp3buf;
+    delete wavbuf;
+
+    return true;
+}
+
+/** Check if the current configuration is usable.
+ *  Since we're loading a library dynamically in the constructor test if that
+ *  succeeded. Otherwise the "configuration" is not usable, even though the
+ *  problem is not necessarily related to configuration values set by the user.
+ */
+bool EncoderLame::configOk()
+{
+    return (lib-&amp;gt;isLoaded() &amp;amp;&amp;amp; m_symbolsResolved);
+}
+

Added: trunk/rbutil/rbutilqt/base/encoderlame.h
===================================================================
--- trunk/rbutil/rbutilqt/base/encoderlame.h                        (rev 0)
+++ trunk/rbutil/rbutilqt/base/encoderlame.h2012-01-08 11:50:04 UTC (rev 31634)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,71 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  &amp;lt;_&amp;gt; )  \___|    &amp;lt; | \_\ (  &amp;lt;_&amp;gt; &amp;gt; &amp;lt;  &amp;lt;
+ *   Firmware   |____|_  /\____/ \___  &amp;gt;__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ *
+ *   Copyright (C) 2012 Dominik Riebeling
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#ifndef ENCODERLAME_H
+#define ENCODERLAME_H
+
+#include &amp;lt;QtCore&amp;gt;
+#include "encoderbase.h"
+#include "lame/lame.h"
+
+class EncoderLame : public EncoderBase
+{
+    enum ESettings
+    {
+        eVOLUME,
+        eQUALITY,
+        eCOMPLEXITY,
+        eNARROWBAND
+    };
+
+    Q_OBJECT
+    public:
+        EncoderLame(QObject *parent = NULL);
+        bool encode(QString input,QString output);
+        bool start();
+        bool stop() {return true;}
+
+        // for settings view
+        bool configOk();
+        void generateSettings();
+        void saveSettings();
+
+    private:
+        QLibrary *lib;
+        const char*(*m_get_lame_short_version)(void);
+        int (*m_lame_set_out_samplerate)(lame_global_flags*, int);
+        int (*m_lame_set_in_samplerate)(lame_global_flags*, int);
+        int (*m_lame_set_num_channels)(lame_global_flags*, int);
+        int (*m_lame_set_scale)(lame_global_flags*, float);
+        int (*m_lame_set_mode)(lame_global_flags*, MPEG_mode);
+        int (*m_lame_set_VBR)(lame_global_flags*, vbr_mode);
+        int (*m_lame_set_VBR_quality)(lame_global_flags*, float);
+        int (*m_lame_set_VBR_max_bitrate_kbps)(lame_global_flags*, int);
+        int (*m_lame_set_bWriteVbrTag)(lame_global_flags*, int);
+        lame_global_flags*(*m_lame_init)(void);
+        int (*m_lame_init_params)(lame_global_flags*);
+        int (*m_lame_encode_buffer)(lame_global_flags*, short int[], short
+                int[], int, unsigned char*, int);
+        int (*m_lame_encode_flush)(lame_global_flags*, unsigned char*, int);
+        int (*m_lame_close)(lame_global_flags*);
+
+        bool m_symbolsResolved;
+};
+
+#endif
+

Modified: trunk/rbutil/rbutilqt/base/voicefile.cpp
===================================================================
--- trunk/rbutil/rbutilqt/base/voicefile.cpp2012-01-08 11:49:57 UTC (rev 31633)
+++ trunk/rbutil/rbutilqt/base/voicefile.cpp2012-01-08 11:50:04 UTC (rev 31634)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -254,7 +254,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         QCoreApplication::processEvents();
     }
     emit logItem(tr("Finished"),LOGINFO);
-  
+
     return;
 }
 

Added: trunk/rbutil/rbutilqt/lame/lame.h
===================================================================
--- trunk/rbutil/rbutilqt/lame/lame.h                        (rev 0)
+++ trunk/rbutil/rbutilqt/lame/lame.h2012-01-08 11:50:04 UTC (rev 31634)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,1243 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ *Interface to MP3 LAME encoding engine
+ *
+ *Copyright (c) 1999 Mark Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* $Id: lame.h,v 1.170.2.4 2009/01/18 15:44:28 robert Exp $ */
+
+#ifndef LAME_LAME_H
+#define LAME_LAME_H
+
+/* for size_t typedef */
+#include &amp;lt;stddef.h&amp;gt;
+/* for va_list typedef */
+#include &amp;lt;stdarg.h&amp;gt;
+/* for FILE typedef, TODO: remove when removing lame_mp3_tags_fid */
+#include &amp;lt;stdio.h&amp;gt;
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(WIN32) || defined(_WIN32)
+#undef CDECL
+#define CDECL __cdecl
+#else
+#define CDECL
+#endif
+
+
+#define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1
+
+
+typedef enum vbr_mode_e {
+  vbr_off=0,
+  vbr_mt,               /* obsolete, same as vbr_mtrh */
+  vbr_rh,
+  vbr_abr,
+  vbr_mtrh,
+  vbr_max_indicator,    /* Don't use this! It's used for sanity checks.       */
+  vbr_default=vbr_mtrh    /* change this to change the default VBR mode of LAME */
+} vbr_mode;
+
+
+/* MPEG modes */
+typedef enum MPEG_mode_e {
+  STEREO = 0,
+  JOINT_STEREO,
+  DUAL_CHANNEL,   /* LAME doesn't supports this! */
+  MONO,
+  NOT_SET,
+  MAX_INDICATOR   /* Don't use this! It's used for sanity checks. */
+} MPEG_mode;
+
+/* Padding types */
+typedef enum Padding_type_e {
+  PAD_NO = 0,
+  PAD_ALL,
+  PAD_ADJUST,
+  PAD_MAX_INDICATOR   /* Don't use this! It's used for sanity checks. */
+} Padding_type;
+
+
+
+/*presets*/
+typedef enum preset_mode_e {
+    /*values from 8 to 320 should be reserved for abr bitrates*/
+    /*for abr I'd suggest to directly use the targeted bitrate as a value*/
+    ABR_8 = 8,
+    ABR_320 = 320,
+
+    V9 = 410, /*Vx to match Lame and VBR_xx to match FhG*/
+    VBR_10 = 410,
+    V8 = 420,
+    VBR_20 = 420,
+    V7 = 430,
+    VBR_30 = 430,
+    V6 = 440,
+    VBR_40 = 440,
+    V5 = 450,
+    VBR_50 = 450,
+    V4 = 460,
+    VBR_60 = 460,
+    V3 = 470,
+    VBR_70 = 470,
+    V2 = 480,
+    VBR_80 = 480,
+    V1 = 490,
+    VBR_90 = 490,
+    V0 = 500,
+    VBR_100 = 500,
+
+
+
+    /*still there for compatibility*/
+    R3MIX = 1000,
+    STANDARD = 1001,
+    EXTREME = 1002,
+    INSANE = 1003,
+    STANDARD_FAST = 1004,
+    EXTREME_FAST = 1005,
+    MEDIUM = 1006,
+    MEDIUM_FAST = 1007
+} preset_mode;
+
+
+/*asm optimizations*/
+typedef enum asm_optimizations_e {
+    MMX = 1,
+    AMD_3DNOW = 2,
+    SSE = 3
+} asm_optimizations;
+
+
+/* psychoacoustic model */
+typedef enum Psy_model_e {
+    PSY_GPSYCHO = 1,
+    PSY_NSPSYTUNE = 2
+} Psy_model;
+
+
+struct lame_global_struct;
+typedef struct lame_global_struct lame_global_flags;
+typedef lame_global_flags *lame_t;
+
+
+
+
+/***********************************************************************
+ *
+ *  The LAME API
+ *  These functions should be called, in this order, for each
+ *  MP3 file to be encoded.  See the file "API" for more documentation
+ *
+ ***********************************************************************/
+
+
+/*
+ * REQUIRED:
+ * initialize the encoder.  sets default for all encoder parameters,
+ * returns NULL if some malloc()'s failed
+ * otherwise returns pointer to structure needed for all future
+ * API calls.
+ */
+lame_global_flags * CDECL lame_init(void);
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+/* obsolete version */
+int CDECL lame_init_old(lame_global_flags *);
+#endif
+
+/*
+ * OPTIONAL:
+ * set as needed to override defaults
+ */
+
+/********************************************************************
+ *  input stream description
+ ***********************************************************************/
+/* number of samples.  default = 2^32-1   */
+int CDECL lame_set_num_samples(lame_global_flags *, unsigned long);
+unsigned long CDECL lame_get_num_samples(const lame_global_flags *);
+
+/* input sample rate in Hz.  default = 44100hz */
+int CDECL lame_set_in_samplerate(lame_global_flags *, int);
+int CDECL lame_get_in_samplerate(const lame_global_flags *);
+
+/* number of channels in input stream. default=2  */
+int CDECL lame_set_num_channels(lame_global_flags *, int);
+int CDECL lame_get_num_channels(const lame_global_flags *);
+
+/*
+  scale the input by this amount before encoding.  default=0 (disabled)
+  (not used by decoding routines)
+*/
+int CDECL lame_set_scale(lame_global_flags *, float);
+float CDECL lame_get_scale(const lame_global_flags *);
+
+/*
+  scale the channel 0 (left) input by this amount before encoding.
+    default=0 (disabled)
+  (not used by decoding routines)
+*/
+int CDECL lame_set_scale_left(lame_global_flags *, float);
+float CDECL lame_get_scale_left(const lame_global_flags *);
+
+/*
+  scale the channel 1 (right) input by this amount before encoding.
+    default=0 (disabled)
+  (not used by decoding routines)
+*/
+int CDECL lame_set_scale_right(lame_global_flags *, float);
+float CDECL lame_get_scale_right(const lame_global_flags *);
+
+/*
+  output sample rate in Hz.  default = 0, which means LAME picks best value
+  based on the amount of compression.  MPEG only allows:
+  MPEG1    32, 44.1,   48khz
+  MPEG2    16, 22.05,  24
+  MPEG2.5   8, 11.025, 12
+  (not used by decoding routines)
+*/
+int CDECL lame_set_out_samplerate(lame_global_flags *, int);
+int CDECL lame_get_out_samplerate(const lame_global_flags *);
+
+
+/********************************************************************
+ *  general control parameters
+ ***********************************************************************/
+/* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */
+int CDECL lame_set_analysis(lame_global_flags *, int);
+int CDECL lame_get_analysis(const lame_global_flags *);
+
+/*
+  1 = write a Xing VBR header frame.
+  default = 1
+  this variable must have been added by a Hungarian notation Windows programmer :-)
+*/
+int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int);
+int CDECL lame_get_bWriteVbrTag(const lame_global_flags *);
+
+/* 1=decode only.  use lame/mpglib to convert mp3/ogg to wav.  default=0 */
+int CDECL lame_set_decode_only(lame_global_flags *, int);
+int CDECL lame_get_decode_only(const lame_global_flags *);
+
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+/* 1=encode a Vorbis .ogg file.  default=0 */
+/* DEPRECATED */
+int CDECL lame_set_ogg(lame_global_flags *, int);
+int CDECL lame_get_ogg(const lame_global_flags *);
+#endif
+
+/*
+  internal algorithm selection.  True quality is determined by the bitrate
+  but this variable will effect quality by selecting expensive or cheap algorithms.
+  quality=0..9.  0=best (very slow).  9=worst.
+  recommended:  2     near-best quality, not too slow
+                5     good quality, fast
+                7     ok quality, really fast
+*/
+int CDECL lame_set_quality(lame_global_flags *, int);
+int CDECL lame_get_quality(const lame_global_flags *);
+
+/*
+  mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono
+  default: lame picks based on compression ration and input channels
+*/
+int CDECL lame_set_mode(lame_global_flags *, MPEG_mode);
+MPEG_mode CDECL lame_get_mode(const lame_global_flags *);
+
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+/*
+  mode_automs.  Use a M/S mode with a switching threshold based on
+  compression ratio
+  DEPRECATED
+*/
+int CDECL lame_set_mode_automs(lame_global_flags *, int);
+int CDECL lame_get_mode_automs(const lame_global_flags *);
+#endif
+
+/*
+  force_ms.  Force M/S for all frames.  For testing only.
+  default = 0 (disabled)
+*/
+int CDECL lame_set_force_ms(lame_global_flags *, int);
+int CDECL lame_get_force_ms(const lame_global_flags *);
+
+/* use free_format?  default = 0 (disabled) */
+int CDECL lame_set_free_format(lame_global_flags *, int);
+int CDECL lame_get_free_format(const lame_global_flags *);
+
+/* perform ReplayGain analysis?  default = 0 (disabled) */
+int CDECL lame_set_findReplayGain(lame_global_flags *, int);
+int CDECL lame_get_findReplayGain(const lame_global_flags *);
+
+/* decode on the fly. Search for the peak sample. If the ReplayGain
+ * analysis is enabled then perform the analysis on the decoded data
+ * stream. default = 0 (disabled)
+ * NOTE: if this option is set the build-in decoder should not be used */
+int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int);
+int CDECL lame_get_decode_on_the_fly(const lame_global_flags *);
+
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+/* DEPRECATED: now does the same as lame_set_findReplayGain()
+   default = 0 (disabled) */
+int CDECL lame_set_ReplayGain_input(lame_global_flags *, int);
+int CDECL lame_get_ReplayGain_input(const lame_global_flags *);
+
+/* DEPRECATED: now does the same as
+   lame_set_decode_on_the_fly() &amp;amp;&amp;amp; lame_set_findReplayGain()
+   default = 0 (disabled) */
+int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int);
+int CDECL lame_get_ReplayGain_decode(const lame_global_flags *);
+
+/* DEPRECATED: now does the same as lame_set_decode_on_the_fly()
+   default = 0 (disabled) */
+int CDECL lame_set_findPeakSample(lame_global_flags *, int);
+int CDECL lame_get_findPeakSample(const lame_global_flags *);
+#endif
+
+/* counters for gapless encoding */
+int CDECL lame_set_nogap_total(lame_global_flags*, int);
+int CDECL lame_get_nogap_total(const lame_global_flags*);
+
+int CDECL lame_set_nogap_currentindex(lame_global_flags* , int);
+int CDECL lame_get_nogap_currentindex(const lame_global_flags*);
+
+
+/*
+ * OPTIONAL:
+ * Set printf like error/debug/message reporting functions.
+ * The second argument has to be a pointer to a function which looks like
+ *   void my_debugf(const char *format, va_list ap)
+ *   {
+ *       (void) vfprintf(stdout, format, ap);
+ *   }
+ * If you use NULL as the value of the pointer in the set function, the
+ * lame buildin function will be used (prints to stderr).
+ * To quiet any output you have to replace the body of the example function
+ * with just "return;" and use it in the set function.
+ */
+int CDECL lame_set_errorf(lame_global_flags *,
+                          void (*func)(const char *, va_list));
+int CDECL lame_set_debugf(lame_global_flags *,
+                          void (*func)(const char *, va_list));
+int CDECL lame_set_msgf  (lame_global_flags *,
+                          void (*func)(const char *, va_list));
+
+
+
+/* set one of brate compression ratio.  default is compression ratio of 11.  */
+int CDECL lame_set_brate(lame_global_flags *, int);
+int CDECL lame_get_brate(const lame_global_flags *);
+int CDECL lame_set_compression_ratio(lame_global_flags *, float);
+float CDECL lame_get_compression_ratio(const lame_global_flags *);
+
+
+int CDECL lame_set_preset( lame_global_flags*  gfp, int );
+int CDECL lame_set_asm_optimizations( lame_global_flags*  gfp, int, int );
+
+
+
+/********************************************************************
+ *  frame params
+ ***********************************************************************/
+/* mark as copyright.  default=0 */
+int CDECL lame_set_copyright(lame_global_flags *, int);
+int CDECL lame_get_copyright(const lame_global_flags *);
+
+/* mark as original.  default=1 */
+int CDECL lame_set_original(lame_global_flags *, int);
+int CDECL lame_get_original(const lame_global_flags *);
+
+/* error_protection.  Use 2 bytes from each frame for CRC checksum. default=0 */
+int CDECL lame_set_error_protection(lame_global_flags *, int);
+int CDECL lame_get_error_protection(const lame_global_flags *);
+
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+/* padding_type. 0=pad no frames  1=pad all frames 2=adjust padding(default) */
+int CDECL lame_set_padding_type(lame_global_flags *, Padding_type);
+Padding_type CDECL lame_get_padding_type(const lame_global_flags *);
+#endif
+
+/* MP3 'private extension' bit  Meaningless.  default=0 */
+int CDECL lame_set_extension(lame_global_flags *, int);
+int CDECL lame_get_extension(const lame_global_flags *);
+
+/* enforce strict ISO compliance.  default=0 */
+int CDECL lame_set_strict_ISO(lame_global_flags *, int);
+int CDECL lame_get_strict_ISO(const lame_global_flags *);
+
+
+/********************************************************************
+ * quantization/noise shaping
+ ***********************************************************************/
+
+/* disable the bit reservoir. For testing only. default=0 */
+int CDECL lame_set_disable_reservoir(lame_global_flags *, int);
+int CDECL lame_get_disable_reservoir(const lame_global_flags *);
+
+/* select a different "best quantization" function. default=0  */
+int CDECL lame_set_quant_comp(lame_global_flags *, int);
+int CDECL lame_get_quant_comp(const lame_global_flags *);
+int CDECL lame_set_quant_comp_short(lame_global_flags *, int);
+int CDECL lame_get_quant_comp_short(const lame_global_flags *);
+
+int CDECL lame_set_experimentalX(lame_global_flags *, int); /* compatibility*/
+int CDECL lame_get_experimentalX(const lame_global_flags *);
+
+/* another experimental option.  for testing only */
+int CDECL lame_set_experimentalY(lame_global_flags *, int);
+int CDECL lame_get_experimentalY(const lame_global_flags *);
+
+/* another experimental option.  for testing only */
+int CDECL lame_set_experimentalZ(lame_global_flags *, int);
+int CDECL lame_get_experimentalZ(const lame_global_flags *);
+
+/* Naoki's psycho acoustic model.  default=0 */
+int CDECL lame_set_exp_nspsytune(lame_global_flags *, int);
+int CDECL lame_get_exp_nspsytune(const lame_global_flags *);
+
+void CDECL lame_set_msfix(lame_global_flags *, double);
+float CDECL lame_get_msfix(const lame_global_flags *);
+
+
+/********************************************************************
+ * VBR control
+ ***********************************************************************/
+/* Types of VBR.  default = vbr_off = CBR */
+int CDECL lame_set_VBR(lame_global_flags *, vbr_mode);
+vbr_mode CDECL lame_get_VBR(const lame_global_flags *);
+
+/* VBR quality level.  0=highest  9=lowest  */
+int CDECL lame_set_VBR_q(lame_global_flags *, int);
+int CDECL lame_get_VBR_q(const lame_global_flags *);
+
+/* VBR quality level.  0=highest  9=lowest, Range [0,...,10[  */
+int CDECL lame_set_VBR_quality(lame_global_flags *, float);
+float CDECL lame_get_VBR_quality(const lame_global_flags *);
+
+/* Ignored except for VBR=vbr_abr (ABR mode) */
+int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int);
+int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *);
+
+int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int);
+int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *);
+
+int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int);
+int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *);
+
+/*
+  1=strictly enforce VBR_min_bitrate.  Normally it will be violated for
+  analog silence
+*/
+int CDECL lame_set_VBR_hard_min(lame_global_flags *, int);
+int CDECL lame_get_VBR_hard_min(const lame_global_flags *);
+
+/* for preset */
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+int CDECL lame_set_preset_expopts(lame_global_flags *, int);
+#endif
+
+/********************************************************************
+ * Filtering control
+ ***********************************************************************/
+/* freq in Hz to apply lowpass. Default = 0 = lame chooses.  -1 = disabled */
+int CDECL lame_set_lowpassfreq(lame_global_flags *, int);
+int CDECL lame_get_lowpassfreq(const lame_global_flags *);
+/* width of transition band, in Hz.  Default = one polyphase filter band */
+int CDECL lame_set_lowpasswidth(lame_global_flags *, int);
+int CDECL lame_get_lowpasswidth(const lame_global_flags *);
+
+/* freq in Hz to apply highpass. Default = 0 = lame chooses.  -1 = disabled */
+int CDECL lame_set_highpassfreq(lame_global_flags *, int);
+int CDECL lame_get_highpassfreq(const lame_global_flags *);
+/* width of transition band, in Hz.  Default = one polyphase filter band */
+int CDECL lame_set_highpasswidth(lame_global_flags *, int);
+int CDECL lame_get_highpasswidth(const lame_global_flags *);
+
+
+/********************************************************************
+ * psycho acoustics and other arguments which you should not change
+ * unless you know what you are doing
+ ***********************************************************************/
+
+/* only use ATH for masking */
+int CDECL lame_set_ATHonly(lame_global_flags *, int);
+int CDECL lame_get_ATHonly(const lame_global_flags *);
+
+/* only use ATH for short blocks */
+int CDECL lame_set_ATHshort(lame_global_flags *, int);
+int CDECL lame_get_ATHshort(const lame_global_flags *);
+
+/* disable ATH */
+int CDECL lame_set_noATH(lame_global_flags *, int);
+int CDECL lame_get_noATH(const lame_global_flags *);
+
+/* select ATH formula */
+int CDECL lame_set_ATHtype(lame_global_flags *, int);
+int CDECL lame_get_ATHtype(const lame_global_flags *);
+
+/* lower ATH by this many db */
+int CDECL lame_set_ATHlower(lame_global_flags *, float);
+float CDECL lame_get_ATHlower(const lame_global_flags *);
+
+/* select ATH adaptive adjustment type */
+int CDECL lame_set_athaa_type( lame_global_flags *, int);
+int CDECL lame_get_athaa_type( const lame_global_flags *);
+
+/* select the loudness approximation used by the ATH adaptive auto-leveling  */
+int CDECL lame_set_athaa_loudapprox( lame_global_flags *, int);
+int CDECL lame_get_athaa_loudapprox( const lame_global_flags *);
+
+/* adjust (in dB) the point below which adaptive ATH level adjustment occurs */
+int CDECL lame_set_athaa_sensitivity( lame_global_flags *, float);
+float CDECL lame_get_athaa_sensitivity( const lame_global_flags* );
+
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+/* OBSOLETE: predictability limit (ISO tonality formula) */
+int CDECL lame_set_cwlimit(lame_global_flags *, int);
+int CDECL lame_get_cwlimit(const lame_global_flags *);
+#endif
+
+/*
+  allow blocktypes to differ between channels?
+  default: 0 for jstereo, 1 for stereo
+*/
+int CDECL lame_set_allow_diff_short(lame_global_flags *, int);
+int CDECL lame_get_allow_diff_short(const lame_global_flags *);
+
+/* use temporal masking effect (default = 1) */
+int CDECL lame_set_useTemporal(lame_global_flags *, int);
+int CDECL lame_get_useTemporal(const lame_global_flags *);
+
+/* use temporal masking effect (default = 1) */
+int CDECL lame_set_interChRatio(lame_global_flags *, float);
+float CDECL lame_get_interChRatio(const lame_global_flags *);
+
+/* disable short blocks */
+int CDECL lame_set_no_short_blocks(lame_global_flags *, int);
+int CDECL lame_get_no_short_blocks(const lame_global_flags *);
+
+/* force short blocks */
+int CDECL lame_set_force_short_blocks(lame_global_flags *, int);
+int CDECL lame_get_force_short_blocks(const lame_global_flags *);
+
+/* Input PCM is emphased PCM (for instance from one of the rarely
+   emphased CDs), it is STRONGLY not recommended to use this, because
+   psycho does not take it into account, and last but not least many decoders
+   ignore these bits */
+int CDECL lame_set_emphasis(lame_global_flags *, int);
+int CDECL lame_get_emphasis(const lame_global_flags *);
+
+
+
+/************************************************************************/
+/* internal variables, cannot be set...                                 */
+/* provided because they may be of use to calling application           */
+/************************************************************************/
+/* version  0=MPEG-2  1=MPEG-1  (2=MPEG-2.5)     */
+int CDECL lame_get_version(const lame_global_flags *);
+
+/* encoder delay   */
+int CDECL lame_get_encoder_delay(const lame_global_flags *);
+
+/*
+  padding appended to the input to make sure decoder can fully decode
+  all input.  Note that this value can only be calculated during the
+  call to lame_encoder_flush().  Before lame_encoder_flush() has
+  been called, the value of encoder_padding = 0.
+*/
+int CDECL lame_get_encoder_padding(const lame_global_flags *);
+
+/* size of MPEG frame */
+int CDECL lame_get_framesize(const lame_global_flags *);
+
+/* number of PCM samples buffered, but not yet encoded to mp3 data. */
+int CDECL lame_get_mf_samples_to_encode( const lame_global_flags*  gfp );
+
+/*
+  size (bytes) of mp3 data buffered, but not yet encoded.
+  this is the number of bytes which would be output by a call to
+  lame_encode_flush_nogap.  NOTE: lame_encode_flush() will return
+  more bytes than this because it will encode the reamining buffered
+  PCM samples before flushing the mp3 buffers.
+*/
+int CDECL lame_get_size_mp3buffer( const lame_global_flags*  gfp );
+
+/* number of frames encoded so far */
+int CDECL lame_get_frameNum(const lame_global_flags *);
+
+/*
+  lame's estimate of the total number of frames to be encoded
+   only valid if calling program set num_samples
+*/
+int CDECL lame_get_totalframes(const lame_global_flags *);
+
+/* RadioGain value. Multiplied by 10 and rounded to the nearest. */
+int CDECL lame_get_RadioGain(const lame_global_flags *);
+
+/* AudiophileGain value. Multipled by 10 and rounded to the nearest. */
+int CDECL lame_get_AudiophileGain(const lame_global_flags *);
+
+/* the peak sample */
+float CDECL lame_get_PeakSample(const lame_global_flags *);
+
+/* Gain change required for preventing clipping. The value is correct only if
+   peak sample searching was enabled. If negative then the waveform
+   already does not clip. The value is multiplied by 10 and rounded up. */
+int CDECL lame_get_noclipGainChange(const lame_global_flags *);
+
+/* user-specified scale factor required for preventing clipping. Value is
+   correct only if peak sample searching was enabled and no user-specified
+   scaling was performed. If negative then either the waveform already does
+   not clip or the value cannot be determined */
+float CDECL lame_get_noclipScale(const lame_global_flags *);
+
+
+
+
+
+
+
+/*
+ * REQUIRED:
+ * sets more internal configuration based on data provided above.
+ * returns -1 if something failed.
+ */
+int CDECL lame_init_params(lame_global_flags *);
+
+
+/*
+ * OPTIONAL:
+ * get the version number, in a string. of the form:
+ * "3.63 (beta)" or just "3.63".
+ */
+const char*  CDECL get_lame_version       ( void );
+const char*  CDECL get_lame_short_version ( void );
+const char*  CDECL get_lame_very_short_version ( void );
+const char*  CDECL get_psy_version        ( void );
+const char*  CDECL get_lame_url           ( void );
+const char*  CDECL get_lame_os_bitness    ( void );
+
+/*
+ * OPTIONAL:
+ * get the version numbers in numerical form.
+ */
+typedef struct {
+    /* generic LAME version */
+    int major;
+    int minor;
+    int alpha;               /* 0 if not an alpha version                  */
+    int beta;                /* 0 if not a beta version                    */
+
+    /* version of the psy model */
+    int psy_major;
+    int psy_minor;
+    int psy_alpha;           /* 0 if not an alpha version                  */
+    int psy_beta;            /* 0 if not a beta version                    */
+
+    /* compile time features */
+    const char *features;    /* Don't make assumptions about the contents! */
+} lame_version_t;
+void CDECL get_lame_version_numerical(lame_version_t *);
+
+
+/*
+ * OPTIONAL:
+ * print internal lame configuration to message handler
+ */
+void CDECL lame_print_config(const lame_global_flags*  gfp);
+
+void CDECL lame_print_internals( const lame_global_flags *gfp);
+
+
+/*
+ * input pcm data, output (maybe) mp3 frames.
+ * This routine handles all buffering, resampling and filtering for you.
+ *
+ * return code     number of bytes output in mp3buf. Can be 0
+ *                 -1:  mp3buf was too small
+ *                 -2:  malloc() problem
+ *                 -3:  lame_init_params() not called
+ *                 -4:  psycho acoustic problems
+ *
+ * The required mp3buf_size can be computed from num_samples,
+ * samplerate and encoding rate, but here is a worst case estimate:
+ *
+ * mp3buf_size in bytes = 1.25*num_samples + 7200
+ *
+ * I think a tighter bound could be:  (mt, March 2000)
+ * MPEG1:
+ *    num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512
+ * MPEG2:
+ *    num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256
+ *
+ * but test first if you use that!
+ *
+ * set mp3buf_size = 0 and LAME will not check if mp3buf_size is
+ * large enough.
+ *
+ * NOTE:
+ * if gfp-&amp;gt;num_channels=2, but gfp-&amp;gt;mode = 3 (mono), the L &amp;amp; R channels
+ * will be averaged into the L channel before encoding only the L channel
+ * This will overwrite the data in buffer_l[] and buffer_r[].
+ *
+*/
+int CDECL lame_encode_buffer (
+        lame_global_flags*  gfp,           /* global context handle         */
+        const short int     buffer_l [],   /* PCM data for left channel     */
+        const short int     buffer_r [],   /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+/*
+ * as above, but input has L &amp;amp; R channel data interleaved.
+ * NOTE:
+ * num_samples = number of samples in the L (or R)
+ * channel, not the total number of samples in pcm[]
+ */
+int CDECL lame_encode_buffer_interleaved(
+        lame_global_flags*  gfp,           /* global context handlei        */
+        short int           pcm[],         /* PCM data for left and right
+                                              channel, interleaved          */
+        int                 num_samples,   /* number of samples per channel,
+                                              _not_ number of samples in
+                                              pcm[]                         */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        int                 mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+
+/* as lame_encode_buffer, but for 'float's.
+ * !! NOTE: !! data must still be scaled to be in the same range as
+ * short int, +/- 32768
+ */
+int CDECL lame_encode_buffer_float(
+        lame_global_flags*  gfp,           /* global context handle         */
+        const float     buffer_l [],       /* PCM data for left channel     */
+        const float     buffer_r [],       /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+
+/* as lame_encode_buffer, but for long's
+ * !! NOTE: !! data must still be scaled to be in the same range as
+ * short int, +/- 32768
+ *
+ * This scaling was a mistake (doesn't allow one to exploit full
+ * precision of type 'long'.  Use lame_encode_buffer_long2() instead.
+ *
+ */
+int CDECL lame_encode_buffer_long(
+        lame_global_flags*  gfp,           /* global context handle         */
+        const long     buffer_l [],       /* PCM data for left channel     */
+        const long     buffer_r [],       /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+/* Same as lame_encode_buffer_long(), but with correct scaling.
+ * !! NOTE: !! data must still be scaled to be in the same range as
+ * type 'long'.   Data should be in the range:  +/- 2^(8*size(long)-1)
+ *
+ */
+int CDECL lame_encode_buffer_long2(
+        lame_global_flags*  gfp,           /* global context handle         */
+        const long     buffer_l [],       /* PCM data for left channel     */
+        const long     buffer_r [],       /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+/* as lame_encode_buffer, but for int's
+ * !! NOTE: !! input should be scaled to the maximum range of 'int'
+ * If int is 4 bytes, then the values should range from
+ * +/- 2147483648.
+ *
+ * This routine does not (and cannot, without loosing precision) use
+ * the same scaling as the rest of the lame_encode_buffer() routines.
+ *
+ */
+int CDECL lame_encode_buffer_int(
+        lame_global_flags*  gfp,           /* global context handle         */
+        const int      buffer_l [],       /* PCM data for left channel     */
+        const int      buffer_r [],       /* PCM data for right channel    */
+        const int           nsamples,      /* number of samples per channel */
+        unsigned char*      mp3buf,        /* pointer to encoded MP3 stream */
+        const int           mp3buf_size ); /* number of valid octets in this
+                                              stream                        */
+
+
+
+
+
+/*
+ * REQUIRED:
+ * lame_encode_flush will flush the intenal PCM buffers, padding with
+ * 0's to make sure the final frame is complete, and then flush
+ * the internal MP3 buffers, and thus may return a
+ * final few mp3 frames.  'mp3buf' should be at least 7200 bytes long
+ * to hold all possible emitted data.
+ *
+ * will also write id3v1 tags (if any) into the bitstream
+ *
+ * return code = number of bytes output to mp3buf. Can be 0
+ */
+int CDECL lame_encode_flush(
+        lame_global_flags *  gfp,    /* global context handle                 */
+        unsigned char*       mp3buf, /* pointer to encoded MP3 stream         */
+        int                  size);  /* number of valid octets in this stream */
+
+/*
+ * OPTIONAL:
+ * lame_encode_flush_nogap will flush the internal mp3 buffers and pad
+ * the last frame with ancillary data so it is a complete mp3 frame.
+ *
+ * 'mp3buf' should be at least 7200 bytes long
+ * to hold all possible emitted data.
+ *
+ * After a call to this routine, the outputed mp3 data is complete, but
+ * you may continue to encode new PCM samples and write future mp3 data
+ * to a different file.  The two mp3 files will play back with no gaps
+ * if they are concatenated together.
+ *
+ * This routine will NOT write id3v1 tags into the bitstream.
+ *
+ * return code = number of bytes output to mp3buf. Can be 0
+ */
+int CDECL lame_encode_flush_nogap(
+        lame_global_flags *  gfp,    /* global context handle                 */
+        unsigned char*       mp3buf, /* pointer to encoded MP3 stream         */
+        int                  size);  /* number of valid octets in this stream */
+
+/*
+ * OPTIONAL:
+ * Normally, this is called by lame_init_params().  It writes id3v2 and
+ * Xing headers into the front of the bitstream, and sets frame counters
+ * and bitrate histogram data to 0.  You can also call this after
+ * lame_encode_flush_nogap().
+ */
+int CDECL lame_init_bitstream(
+        lame_global_flags *  gfp);    /* global context handle                 */
+
+
+
+/*
+ * OPTIONAL:    some simple statistics
+ * a bitrate histogram to visualize the distribution of used frame sizes
+ * a stereo mode histogram to visualize the distribution of used stereo
+ *   modes, useful in joint-stereo mode only
+ *   0: LR    left-right encoded
+ *   1: LR-I  left-right and intensity encoded (currently not supported)
+ *   2: MS    mid-side encoded
+ *   3: MS-I  mid-side and intensity encoded (currently not supported)
+ *
+ * attention: don't call them after lame_encode_finish
+ * suggested: lame_encode_flush -&amp;gt; lame_*_hist -&amp;gt; lame_close
+ */
+
+void CDECL lame_bitrate_hist(
+        const lame_global_flags * gfp,
+        int bitrate_count[14] );
+void CDECL lame_bitrate_kbps(
+        const lame_global_flags * gfp,
+        int bitrate_kbps [14] );
+void CDECL lame_stereo_mode_hist(
+        const lame_global_flags * gfp,
+        int stereo_mode_count[4] );
+
+void CDECL lame_bitrate_stereo_mode_hist (
+        const lame_global_flags * gfp,
+        int bitrate_stmode_count[14][4] );
+
+void CDECL lame_block_type_hist (
+        const lame_global_flags * gfp,
+        int btype_count[6] );
+
+void CDECL lame_bitrate_block_type_hist (
+        const lame_global_flags * gfp,
+        int bitrate_btype_count[14][6] );
+
+#if (DEPRECATED_OR_OBSOLETE_CODE_REMOVED &amp;amp;&amp;amp; 0)
+#else
+/*
+ * OPTIONAL:
+ * lame_mp3_tags_fid will rewrite a Xing VBR tag to the mp3 file with file
+ * pointer fid.  These calls perform forward and backwards seeks, so make
+ * sure fid is a real file.  Make sure lame_encode_flush has been called,
+ * and all mp3 data has been written to the file before calling this
+ * function.
+ * NOTE:
+ * if VBR  tags are turned off by the user, or turned off by LAME because
+ * the output is not a regular file, this call does nothing
+ * NOTE:
+ * LAME wants to read from the file to skip an optional ID3v2 tag, so
+ * make sure you opened the file for writing and reading.
+ * NOTE:
+ * You can call lame_get_lametag_frame instead, if you want to insert
+ * the lametag yourself.
+*/
+void CDECL lame_mp3_tags_fid(lame_global_flags *, FILE* fid);
+#endif
+
+/*
+ * OPTIONAL:
+ * lame_get_lametag_frame copies the final LAME-tag into 'buffer'.
+ * The function returns the number of bytes copied into buffer, or
+ * the required buffer size, if the provided buffer is too small.
+ * Function failed, if the return value is larger than 'size'!
+ * Make sure lame_encode flush has been called before calling this function.
+ * NOTE:
+ * if VBR  tags are turned off by the user, or turned off by LAME,
+ * this call does nothing and returns 0.
+ * NOTE:
+ * LAME inserted an empty frame in the beginning of mp3 audio data,
+ * which you have to replace by the final LAME-tag frame after encoding.
+ * In case there is no ID3v2 tag, usually this frame will be the very first
+ * data in your mp3 file. If you put some other leading data into your
+ * file, you'll have to do some bookkeeping about where to write this buffer.
+ */
+size_t CDECL lame_get_lametag_frame(
+        const lame_global_flags *, unsigned char* buffer, size_t size);
+
+/*
+ * REQUIRED:
+ * final call to free all remaining buffers
+ */
+int  CDECL lame_close (lame_global_flags *);
+
+#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
+#else
+/*
+ * OBSOLETE:
+ * lame_encode_finish combines lame_encode_flush() and lame_close() in
+ * one call.  However, once this call is made, the statistics routines
+ * will no longer work because the data will have been cleared, and
+ * lame_mp3_tags_fid() cannot be called to add data to the VBR header
+ */
+int CDECL lame_encode_finish(
+        lame_global_flags*  gfp,
+        unsigned char*      mp3buf,
+        int                 size );
+#endif
+
+
+
+
+
+
+/*********************************************************************
+ *
+ * decoding
+ *
+ * a simple interface to mpglib, part of mpg123, is also included if
+ * libmp3lame is compiled with HAVE_MPGLIB
+ *
+ *********************************************************************/
+
+struct hip_global_struct;
+typedef struct hip_global_struct hip_global_flags;
+typedef hip_global_flags *hip_t;
+
+
+typedef struct {
+  int header_parsed;   /* 1 if header was parsed and following data was
+                          computed                                       */
+  int stereo;          /* number of channels                             */
+  int samplerate;      /* sample rate                                    */
+  int bitrate;         /* bitrate                                        */
+  int mode;            /* mp3 frame type                                 */
+  int mode_ext;        /* mp3 frame type                                 */
+  int framesize;       /* number of samples per mp3 frame                */
+
+  /* this data is only computed if mpglib detects a Xing VBR header */
+  unsigned long nsamp; /* number of samples in mp3 file.                 */
+  int totalframes;     /* total number of frames in mp3 file             */
+
+  /* this data is not currently computed by the mpglib routines */
+  int framenum;        /* frames decoded counter                         */
+} mp3data_struct;
+
+/* required call to initialize decoder */
+hip_t CDECL hip_decode_init(void);
+
+/* cleanup call to exit decoder  */
+int CDECL hip_decode_exit(hip_t gfp);
+
+/*********************************************************************
+ * input 1 mp3 frame, output (maybe) pcm data.
+ *
+ *  nout = hip_decode(hip, mp3buf,len,pcm_l,pcm_r);
+ *
+ * input:
+ *    len          :  number of bytes of mp3 data in mp3buf
+ *    mp3buf[len]  :  mp3 data to be decoded
+ *
+ * output:
+ *    nout:  -1    : decoding error
+ *            0    : need more data before we can complete the decode
+ *           &amp;gt;0    : returned 'nout' samples worth of data in pcm_l,pcm_r
+ *    pcm_l[nout]  : left channel data
+ *    pcm_r[nout]  : right channel data
+ *
+ *********************************************************************/
+int CDECL hip_decode( hip_t           gfp
+                    , unsigned char * mp3buf
+                    , size_t          len
+                    , short           pcm_l[]
+                    , short           pcm_r[]
+                    );
+
+/* same as hip_decode, and also returns mp3 header data */
+int CDECL hip_decode_headers( hip_t           gfp
+                            , unsigned char*  mp3buf
+                            , size_t          len
+                            , short           pcm_l[]
+                            , short           pcm_r[]
+                            , mp3data_struct* mp3data
+                            );
+
+/* same as hip_decode, but returns at most one frame */
+int CDECL hip_decode1( hip_t          gfp
+                     , unsigned char* mp3buf
+                     , size_t         len
+                     , short          pcm_l[]
+                     , short          pcm_r[]
+                     );
+
+/* same as hip_decode1, but returns at most one frame and mp3 header data */
+int CDECL hip_decode1_headers( hip_t           gfp
+                             , unsigned char*  mp3buf
+                             , size_t          len
+                             , short           pcm_l[]
+                             , short           pcm_r[]
+                             , mp3data_struct* mp3data
+                             );
+
+/* same as hip_decode1_headers, but also returns enc_delay and enc_padding
+   from VBR Info tag, (-1 if no info tag was found) */
+int CDECL hip_decode1_headersB( hip_t gfp
+                              , unsigned char*   mp3buf
+                              , size_t           len
+                              , short            pcm_l[]
+                              , short            pcm_r[]
+                              , mp3data_struct*  mp3data
+                              , int             *enc_delay
+                              , int             *enc_padding
+                              );
+
+
+
+/* OBSOLETE:
+ * lame_decode... functions are there to keep old code working
+ * but it is strongly recommended to replace calls by hip_decode...
+ * function calls, see above.
+ */
+#if 1
+int CDECL lame_decode_init(void);
+int CDECL lame_decode(
+        unsigned char *  mp3buf,
+        int              len,
+        short            pcm_l[],
+        short            pcm_r[] );
+int CDECL lame_decode_headers(
+        unsigned char*   mp3buf,
+        int              len,
+        short            pcm_l[],
+        short            pcm_r[],
+        mp3data_struct*  mp3data );
+int CDECL lame_decode1(
+        unsigned char*  mp3buf,
+        int             len,
+        short           pcm_l[],
+        short           pcm_r[] );
+int CDECL lame_decode1_headers(
+        unsigned char*   mp3buf,
+        int              len,
+        short            pcm_l[],
+        short            pcm_r[],
+        mp3data_struct*  mp3data );
+int CDECL lame_decode1_headersB(
+        unsigned char*   mp3buf,
+        int              len,
+        short            pcm_l[],
+        short            pcm_r[],
+        mp3data_struct*  mp3data,
+        int              *enc_delay,
+        int              *enc_padding );
+int CDECL lame_decode_exit(void);
+
+#endif /* obsolete lame_decode API calls */
+
+
+/*********************************************************************
+ *
+ * id3tag stuff
+ *
+ *********************************************************************/
+
+/*
+ * id3tag.h -- Interface to write ID3 version 1 and 2 tags.
+ *
+ * Copyright (C) 2000 Don Melton.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* utility to obtain alphabetically sorted list of genre names with numbers */
+void CDECL id3tag_genre_list(
+        void (*handler)(int, const char *, void *),
+        void*  cookie);
+
+void CDECL id3tag_init     (lame_t gfp);
+
+/* force addition of version 2 tag */
+void CDECL id3tag_add_v2   (lame_t gfp);
+
+/* add only a version 1 tag */
+void CDECL id3tag_v1_only  (lame_t gfp);
+
+/* add only a version 2 tag */
+void CDECL id3tag_v2_only  (lame_t gfp);
+
+/* pad version 1 tag with spaces instead of nulls */
+void CDECL id3tag_space_v1 (lame_t gfp);
+
+/* pad version 2 tag with extra 128 bytes */
+void CDECL id3tag_pad_v2   (lame_t gfp);
+
+/* pad version 2 tag with extra n bytes */
+void CDECL id3tag_set_pad  (lame_t gfp, size_t n);
+
+void CDECL id3tag_set_title(lame_t gfp, const char* title);
+void CDECL id3tag_set_artist(lame_t gfp, const char* artist);
+void CDECL id3tag_set_album(lame_t gfp, const char* album);
+void CDECL id3tag_set_year(lame_t gfp, const char* year);
+void CDECL id3tag_set_comment(lame_t gfp, const char* comment);
+            
+/* return -1 result if track number is out of ID3v1 range
+                    and ignored for ID3v1 */
+int CDECL id3tag_set_track(lame_t gfp, const char* track);
+
+/* return non-zero result if genre name or number is invalid
+  result 0: OK
+  result -1: genre number out of range
+  result -2: no valid ID3v1 genre name, mapped to ID3v1 'Other'
+             but taken as-is for ID3v2 genre tag */
+int CDECL id3tag_set_genre(lame_t gfp, const char* genre);
+
+/* return non-zero result if field name is invalid */
+int CDECL id3tag_set_fieldvalue(lame_t gfp, const char* fieldvalue);
+
+/* return non-zero result if image type is invalid */
+int CDECL id3tag_set_albumart(lame_t gfp, const char* image, size_t size);
+
+/* lame_get_id3v1_tag copies ID3v1 tag into buffer.
+ * Function returns number of bytes copied into buffer, or number
+ * of bytes rquired if buffer 'size' is too small.
+ * Function fails, if returned value is larger than 'size'.
+ * NOTE:
+ * This functions does nothing, if user/LAME disabled ID3v1 tag.
+ */
+size_t CDECL lame_get_id3v1_tag(lame_t gfp, unsigned char* buffer, size_t size);
+
+/* lame_get_id3v2_tag copies ID3v2 tag into buffer.
+ * Function returns number of bytes copied into buffer, or number
+ * of bytes rquired if buffer 'size' is too small.
+ * Function fails, if returned value is larger than 'size'.
+ * NOTE:
+ * This functions does nothing, if user/LAME disabled ID3v2 tag.
+ */
+size_t CDECL lame_get_id3v2_tag(lame_t gfp, unsigned char* buffer, size_t size);
+
+/* normaly lame_init_param writes ID3v2 tags into the audio stream
+ * Call lame_set_write_id3tag_automatic(gfp, 0) before lame_init_param
+ * to turn off this behaviour and get ID3v2 tag with above function
+ * write it yourself into your file.
+ */
+void CDECL lame_set_write_id3tag_automatic(lame_global_flags * gfp, int);
+int CDECL lame_get_write_id3tag_automatic(lame_global_flags const* gfp);
+
+/***********************************************************************
+*
+*  list of valid bitrates [kbps] &amp;amp; sample frequencies [Hz].
+*  first index: 0: MPEG-2   values  (sample frequencies 16...24 kHz)
+*               1: MPEG-1   values  (sample frequencies 32...48 kHz)
+*               2: MPEG-2.5 values  (sample frequencies  8...12 kHz)
+***********************************************************************/
+extern const int      bitrate_table    [3] [16];
+extern const int      samplerate_table [3] [ 4];
+
+
+
+/* maximum size of albumart image (128KB), which affects LAME_MAXMP3BUFFER
+   as well since lame_encode_buffer() also returns ID3v2 tag data */
+#define LAME_MAXALBUMART    (128 * 1024)
+
+/* maximum size of mp3buffer needed if you encode at most 1152 samples for
+   each call to lame_encode_buffer.  see lame_encode_buffer() below  
+   (LAME_MAXMP3BUFFER is now obsolete)  */
+#define LAME_MAXMP3BUFFER   (16384 + LAME_MAXALBUMART)
+
+
+typedef enum {
+    LAME_OKAY             =   0,
+    LAME_NOERROR          =   0,
+    LAME_GENERICERROR     =  -1,
+    LAME_NOMEM            = -10,
+    LAME_BADBITRATE       = -11,
+    LAME_BADSAMPFREQ      = -12,
+    LAME_INTERNALERROR    = -13,
+
+    FRONTEND_READERROR    = -80,
+    FRONTEND_WRITEERROR   = -81,
+    FRONTEND_FILETOOLARGE = -82
+
+} lame_errorcodes_t;
+
+#if defined(__cplusplus)
+}
+#endif
+#endif /* LAME_LAME_H */
+

Modified: trunk/rbutil/rbutilqt/rbutilqt.pri
===================================================================
--- trunk/rbutil/rbutilqt/rbutilqt.pri2012-01-08 11:49:57 UTC (rev 31633)
+++ trunk/rbutil/rbutilqt/rbutilqt.pri2012-01-08 11:50:04 UTC (rev 31634)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,6 +35,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  preview.cpp \
  base/encoderbase.cpp \
  base/encoderrbspeex.cpp \
+ base/encoderlame.cpp \
  base/encoderexe.cpp \
  encttscfggui.cpp \
  base/encttssettings.cpp \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -99,6 +100,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  preview.h \
  base/encoderbase.h \
  base/encoderrbspeex.h \
+ base/encoderlame.h \
  base/encoderexe.h \
  encttscfggui.h \
  base/encttssettings.h \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -139,6 +141,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  quazip/unzip.h \
  quazip/zip.h \
  base/ziputil.h \
+ lame/lame.h \
  comboboxviewdelegate.h \
 
 

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T11:50:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32826">
    <title>bluebrother: r31633 - trunk/rbutil/rbutilqt/base</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32826</link>
    <description>&lt;pre&gt;Date: 2012-01-08 12:49:57 +0100 (Sun, 08 Jan 2012)
New Revision: 31633

Log Message:
Fix wrong includes.

Modified:
   trunk/rbutil/rbutilqt/base/encoderbase.h
   trunk/rbutil/rbutilqt/base/encoderrbspeex.cpp

Modified: trunk/rbutil/rbutilqt/base/encoderbase.h
===================================================================
--- trunk/rbutil/rbutilqt/base/encoderbase.h2012-01-08 10:31:29 UTC (rev 31632)
+++ trunk/rbutil/rbutilqt/base/encoderbase.h2012-01-08 11:49:57 UTC (rev 31633)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,7 +24,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;QtCore&amp;gt;
 
 #include "encttssettings.h"
-#include "rbspeex.h"
 
 
 class EncoderBase : public EncTtsSettingInterface

Modified: trunk/rbutil/rbutilqt/base/encoderrbspeex.cpp
===================================================================
--- trunk/rbutil/rbutilqt/base/encoderrbspeex.cpp2012-01-08 10:31:29 UTC (rev 31632)
+++ trunk/rbutil/rbutilqt/base/encoderrbspeex.cpp2012-01-08 11:49:57 UTC (rev 31633)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -19,6 +19,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;QtCore&amp;gt;
 #include "encoderrbspeex.h"
 #include "rbsettings.h"
+#include "rbspeex.h"
 
 EncoderRbSpeex::EncoderRbSpeex(QObject *parent) : EncoderBase(parent)
 {

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T11:49:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32825">
    <title>bertrik: r31632 - trunk/apps/lang</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32825</link>
    <description>&lt;pre&gt;Date: 2012-01-08 11:31:29 +0100 (Sun, 08 Jan 2012)
New Revision: 31632

Log Message:
FS#12406 - Updated Galician translation by Ismael Casti?\195?\177eira ?\195?\129lvarez

Modified:
   trunk/apps/lang/galego.lang

Modified: trunk/apps/lang/galego.lang
===================================================================
--- trunk/apps/lang/galego.lang2012-01-08 08:55:25 UTC (rev 31631)
+++ trunk/apps/lang/galego.lang2012-01-08 10:31:29 UTC (rev 31632)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,7 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     *: "Sí"
   &amp;lt;/dest&amp;gt;
   &amp;lt;voice&amp;gt;
-    *: "Yes"
+    *: "Sí"
   &amp;lt;/voice&amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -43,7 +43,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     *: "Non"
   &amp;lt;/dest&amp;gt;
   &amp;lt;voice&amp;gt;
-    *: "No"
+    *: "Non"
   &amp;lt;/voice&amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6205,17 +6205,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     iaudiox5,iaudiom5,gigabeat*,mrobe100: "Building database... %d found (LEFT to return)"
     iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Building database... %d found (PREV to return)"
     gogearsa9200: "Building database... %d found (REW to return)"
+    archosplayer: "Building DB %d found"
   &amp;lt;/source&amp;gt;
   &amp;lt;dest&amp;gt;
     *: "Construindo a base de datos... %d atopadas (OFF para volver)"
-    iriverh100,iriverh120,iriverh300: "Construindo a base de datos... %d atopadas (STOP para
-volver)"
+    iriverh100,iriverh120,iriverh300: "Construindo a base de datos... %d atopadas (STOP para volver)"
     ipod*: "Construindo a base de datos... %d atopadas (PREV para volver)"
-    iaudiox5,iaudiom5,gigabeat*,mrobe100: "Construindo a base de datos... %d atopadas (LEFT para
-volver)"
-    iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Construindo a base de
-datos... %d atopadas (PREV para volver)"
+    iaudiox5,iaudiom5,gigabeat*,mrobe100: "Construindo a base de datos... %d atopadas (LEFT para volver)"
+    iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Construindo a base de datos... %d atopadas (PREV para volver)"
     gogearsa9200: "Construindo a base de datos... %d atopadas (REW para volver)"
+    archosplayer: "Construindo BD %d atop."
   &amp;lt;/dest&amp;gt;
   &amp;lt;voice&amp;gt;
     *: "pistas atopadas para a base de datos"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -9318,7 +9317,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
   id: LANG_CATALOG
-  desc: in onplay menu
+  desc: in main menu and onplay menu
   user: core
   &amp;lt;source&amp;gt;
     *: "Playlist Catalogue"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -9855,15 +9854,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   user: core
   &amp;lt;source&amp;gt;
     *: none
-    gigabeats,mpiohd200,mpiohd300: "3-D Enhancement"
+    gigabeats,mpiohd200,mpiohd300,sansafuzeplus: "3-D Enhancement"
   &amp;lt;/source&amp;gt;
   &amp;lt;dest&amp;gt;
     *: none
-    gigabeats,mpiohd200,mpiohd300: "Mellora 3-D"
+    gigabeats,mpiohd200,mpiohd300,sansafuzeplus: "Mellora 3-D"
   &amp;lt;/dest&amp;gt;
   &amp;lt;voice&amp;gt;
     *: none
-    gigabeats,mpiohd200,mpiohd300: "Mellora 3-D"
+    gigabeats,mpiohd200,mpiohd300,sansafuzeplus: "Mellora 3-D"
   &amp;lt;/voice&amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11783,7 +11782,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;/phrase&amp;gt;
 &amp;lt;phrase&amp;gt;
   id: LANG_PLAYLISTS
-  desc: in the main menu and file view setting
+  desc: in the file view setting
   user: core
   &amp;lt;source&amp;gt;
     *: "Playlists"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12703,3 +12702,211 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     histogram: "Intervalo de histograma"
   &amp;lt;/voice&amp;gt;
 &amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_CURRENT_PLAYLIST
+  desc: Used when you need to say playlist, also voiced
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Current Playlist"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Lista actual"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Lista de reprodución actual"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_GLYPHS
+  desc: in settings_menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Glyphs To Cache"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Glifos a memoria caché"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Glifos a memoria caché"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_USB_SKIP_FIRST_DRIVE
+  desc: in settings_menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    multidrive_usb: "USB Hide Internal Drive"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    multidrive_usb: "Ocultar na conexión USB o disco interno"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    multidrive_usb: "Ocultar na conexión USB o disco interno"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_KEYCLICK_HARDWARE
+  desc: in keyclick settings menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    hardware_click: "Speaker Keyclick"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    hardware_click: "Clics de pulsacións en altofalante"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    hardware_click: "Clics de pulsacións en altofalante"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_KEYCLICK_SOFTWARE
+  desc: in keyclick settings menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    hardware_click: "Headphone Keyclick"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    hardware_click: "Clics de pulsacións en auriculares"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    hardware_click: "Clics de pulsacións en auriculares"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SET_AS_PLAYLISTCAT_DIR
+  desc: used in the onplay menu to set a playlist catalogue dir
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Set As Playlist Catalogue Directory"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Establecer como o directorio de catálogo de listas de reprodución"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Establecer como o directorio de catálogo de listas de reprodución"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_LIST_LINE_PADDING
+  desc: list padding, in display settings
+  user: core
+  &amp;lt;source&amp;gt;
+    *: none
+    touchscreen: "Line Padding in Lists"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: none
+    touchscreen: "Aumentar a altura das liñas nas listas"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: none
+    touchscreen: "Aumentar a altura das liñas nas listas"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SAVE_CHANGES
+  desc: When you try to exit screens to confirm save
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Save Changes?"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Gardar cambios?"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Gardar cambios?"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_AUTOMATIC
+  desc: generic automatic
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Automatic"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Automático"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Automático"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SHORTCUTS
+  desc: Title in the shortcuts menu
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Shortcuts"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Atallos"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Atallos"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SLEEP_TIMER_CANCEL_CURRENT
+  desc: shown instead of sleep timer when it's running
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Cancel Sleep Timer"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Cancelar temporizador de apagado"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Cancelar temporizador de apagado"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SLEEP_TIMER_DURATION
+  desc: default sleep timer duration in minutes (unused in UI)
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Default Sleep Timer Duration"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Duración predefinida do temporizador de apagado"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Duración predefinida do temporizador de apagado"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_RESET_PLAYLISTCAT_DIR
+  desc:
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Reset Playlist Catalogue Directory"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Restablecer o directorio de catálogo de listas de reprodución"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Restablecer o directorio de catálogo de listas de reprodución"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;
+&amp;lt;phrase&amp;gt;
+  id: LANG_SLEEP_TIMER_ON_POWER_UP
+  desc: whether sleep timer starts on power up
+  user: core
+  &amp;lt;source&amp;gt;
+    *: "Start Sleep Timer On Boot"
+  &amp;lt;/source&amp;gt;
+  &amp;lt;dest&amp;gt;
+    *: "Iniciar o temporizador de apagado no encendido"
+  &amp;lt;/dest&amp;gt;
+  &amp;lt;voice&amp;gt;
+    *: "Iniciar o temporizador de apagado no encendido"
+  &amp;lt;/voice&amp;gt;
+&amp;lt;/phrase&amp;gt;

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T10:31:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32824">
    <title>bertrik: r31631 - trunk/apps/plugins/sudoku</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32824</link>
    <description>&lt;pre&gt;Date: 2012-01-08 09:55:25 +0100 (Sun, 08 Jan 2012)
New Revision: 31631

Log Message:
sudoku: make local functions static and add missing #include

Modified:
   trunk/apps/plugins/sudoku/generator.c
   trunk/apps/plugins/sudoku/sudoku.c

Modified: trunk/apps/plugins/sudoku/generator.c
===================================================================
--- trunk/apps/plugins/sudoku/generator.c2012-01-08 07:05:58 UTC (rev 31630)
+++ trunk/apps/plugins/sudoku/generator.c2012-01-08 08:55:25 UTC (rev 31631)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,6 +34,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "sudoku.h"
 #include "templates.h"
+#include "generator.h"
 
 #define assert(x)
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -618,6 +619,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 }
 
 /* Helper: sort based on index */
+#if 0 /* unused function */
 static
 int
 cmpindex( const void * a, const void * b )
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -629,7 +631,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * 'easy' moves first, and if none are possible, then try for more
  * cryptic moves.
  */
-int
+static int
 findhints( void )
 {
     int i, n, mutated = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -695,6 +697,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
     return n;
 }
+#endif /* unused function */
 
 /* Deterministic solver; return 0 on success, else -1 on error.
  */

Modified: trunk/apps/plugins/sudoku/sudoku.c
===================================================================
--- trunk/apps/plugins/sudoku/sudoku.c2012-01-08 07:05:58 UTC (rev 31630)
+++ trunk/apps/plugins/sudoku/sudoku.c2012-01-08 08:55:25 UTC (rev 31631)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -284,7 +284,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define BLOCK        3
 #define SIZE         (BLOCK*BLOCK)
 
-void sudoku_solve(struct sudoku_state_t* state)
+static void sudoku_solve(struct sudoku_state_t* state)
 {
     bool ret = sudoku_solve_board(state);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -317,7 +317,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #endif
 }
 
-void default_state(struct sudoku_state_t* state)
+static void default_state(struct sudoku_state_t* state)
 {
     int r,c;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -340,7 +340,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     state-&amp;gt;editmode=0;
 }
 
-void clear_state(struct sudoku_state_t* state)
+static void clear_state(struct sudoku_state_t* state)
 {
     int r,c;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -361,7 +361,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 }
 
 /* Check the status of the board, assuming a change at the cursor location */
-bool check_status(struct sudoku_state_t* state)
+static bool check_status(struct sudoku_state_t* state)
 {
     int check[9];
     int r,c;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -422,7 +422,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* Load game - only ".ss" is officially supported, but any sensible
    text representation (one line per row) may load.
 */
-bool load_sudoku(struct sudoku_state_t* state, char* filename)
+static bool load_sudoku(struct sudoku_state_t* state, char* filename)
 {
     int fd;
     size_t n;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -520,7 +520,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     return(true);
 }
 
-bool save_sudoku(struct sudoku_state_t* state)
+static bool save_sudoku(struct sudoku_state_t* state)
 {
     int fd;
     int r,c;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -583,7 +583,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     }
 }
 
-void clear_board(struct sudoku_state_t* state)
+static void clear_board(struct sudoku_state_t* state)
 {
     int r,c;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -596,7 +596,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     state-&amp;gt;y=0;
 }
 
-void update_cell(struct sudoku_state_t* state, int r, int c)
+static void update_cell(struct sudoku_state_t* state, int r, int c)
 {
     /* We have four types of cell:
        1) User-entered number
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -630,7 +630,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 }
 
 
-void display_board(struct sudoku_state_t* state) 
+static void display_board(struct sudoku_state_t* state) 
 {
     int r,c;
 #ifdef SUDOKU_BUTTON_POSSIBLE
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -823,7 +823,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     rb-&amp;gt;lcd_update();
 }
 
-bool sudoku_generate(struct sudoku_state_t* state)
+static bool sudoku_generate(struct sudoku_state_t* state)
 {
     char* difficulty;
     char str[80];
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -902,7 +902,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     SM_QUIT,
 };
 
-int sudoku_menu(struct sudoku_state_t* state)
+static int sudoku_menu(struct sudoku_state_t* state)
 {
     int result;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -972,7 +972,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 }
 
 /* Menu used when user is in edit mode - i.e. creating a new game manually */
-int sudoku_edit_menu(struct sudoku_state_t* state)
+static int sudoku_edit_menu(struct sudoku_state_t* state)
 {
     int result;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1001,7 +1001,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     return result;
 }
 
-void move_cursor(struct sudoku_state_t* state, int newx, int newy)
+static void move_cursor(struct sudoku_state_t* state, int newx, int newy)
 {
     int oldx, oldy;
 

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T08:55:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32823">
    <title>saratoga: r31630 - trunk/manual/getting_started</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32823</link>
    <description>&lt;pre&gt;Date: 2012-01-08 08:05:58 +0100 (Sun, 08 Jan 2012)
New Revision: 31630

Log Message:
Clarify that you must reboot into the Sandisk firmware when uninstalling the bootloader.

Modified:
   trunk/manual/getting_started/installation.tex

Modified: trunk/manual/getting_started/installation.tex
===================================================================
--- trunk/manual/getting_started/installation.tex2012-01-08 02:33:43 UTC (rev 31629)
+++ trunk/manual/getting_started/installation.tex2012-01-08 07:05:58 UTC (rev 31630)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -749,7 +749,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 }
 
     \opt{sansaAMS}{
-      Copy an unmodified original firmware to your player and update it.
+      Copy an unmodified original firmware to your player, and then reboot into 
+      the Sandisk firmware.  
 }
 
 \opt{mpiohd200}{

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T07:05:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32822">
    <title>funman: r31629 - in trunk/firmware: . drivers target/arm</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32822</link>
    <description>&lt;pre&gt;Date: 2012-01-08 03:33:43 +0100 (Sun, 08 Jan 2012)
New Revision: 31629

Log Message:
adc-as3514.c : move to drivers

Added:
   trunk/firmware/drivers/adc-as3514.c
Removed:
   trunk/firmware/target/arm/adc-as3514.c
Modified:
   trunk/firmware/SOURCES

Modified: trunk/firmware/SOURCES
===================================================================
--- trunk/firmware/SOURCES2012-01-08 01:51:51 UTC (rev 31628)
+++ trunk/firmware/SOURCES2012-01-08 02:33:43 UTC (rev 31629)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -64,7 +64,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #endif
 
 #ifdef SAMSUNG_YPR0
-target/arm/adc-as3514.c
+drivers/adc-as3514.c
 #if (CONFIG_RTC == RTC_AS3514)
 drivers/rtc/rtc_as3514.c
 #else
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -748,7 +748,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 target/arm/pp/ascodec-pp.c
 # endif
 # if !defined(BOOTLOADER) || defined(CPU_PP)
-target/arm/adc-as3514.c
+drivers/adc-as3514.c
 #  if !defined(SANSA_M200V4) &amp;amp;&amp;amp; !defined(SAMSUNG_YPR0)
 target/arm/powermgmt-ascodec.c
 #  endif

Copied: trunk/firmware/drivers/adc-as3514.c (from rev 31628, trunk/firmware/target/arm/adc-as3514.c)
===================================================================
--- trunk/firmware/drivers/adc-as3514.c                        (rev 0)
+++ trunk/firmware/drivers/adc-as3514.c2012-01-08 02:33:43 UTC (rev 31629)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,67 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  &amp;lt;_&amp;gt; )  \___|    &amp;lt; | \_\ (  &amp;lt;_&amp;gt; &amp;gt; &amp;lt;  &amp;lt;
+ *   Firmware   |____|_  /\____/ \___  &amp;gt;__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ * $Id$
+ *
+ * Copyright (C) 2006 by Barry Wardell
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#include "adc.h"
+#include "kernel.h"
+#include "ascodec.h"
+#include "as3514.h"
+
+/* Read 10-bit channel data */
+unsigned short adc_read(int channel)
+{
+    unsigned short data = 0;
+
+    if ((unsigned)channel &amp;gt;= NUM_ADC_CHANNELS)
+        return 0;
+
+    ascodec_lock();
+
+    /* Select channel */
+    if (ascodec_write(AS3514_ADC_0, (channel &amp;lt;&amp;lt; 4)) &amp;gt;= 0)
+    {
+        unsigned char buf[2];
+
+        /*
+         * The AS3514 ADC will trigger an interrupt when the conversion
+         * is finished, if the corresponding enable bit in IRQ_ENRD2
+         * is set.
+         * Previously the code did not wait and this apparently did
+         * not pose any problems, but this should be more correct.
+         * Without the wait the data read back may be completely or
+         * partially (first one of the two bytes) stale.
+         */
+        ascodec_wait_adc_finished();
+
+
+        /* Read data */
+        if (ascodec_readbytes(AS3514_ADC_0, 2, buf) &amp;gt;= 0)
+        {
+            data = (((buf[0] &amp;amp; 0x3) &amp;lt;&amp;lt; 8) | buf[1]);
+        }
+    }
+
+    ascodec_unlock();
+    
+    return data;
+}
+
+void adc_init(void)
+{
+}

Deleted: trunk/firmware/target/arm/adc-as3514.c
===================================================================
--- trunk/firmware/target/arm/adc-as3514.c2012-01-08 01:51:51 UTC (rev 31628)
+++ trunk/firmware/target/arm/adc-as3514.c2012-01-08 02:33:43 UTC (rev 31629)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,67 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-/***************************************************************************
- *             __________               __   ___.
- *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
- *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
- *   Jukebox    |    |   (  &amp;lt;_&amp;gt; )  \___|    &amp;lt; | \_\ (  &amp;lt;_&amp;gt; &amp;gt; &amp;lt;  &amp;lt;
- *   Firmware   |____|_  /\____/ \___  &amp;gt;__|_ \|___  /\____/__/\_ \
- *                     \/            \/     \/    \/            \/
- * $Id$
- *
- * Copyright (C) 2006 by Barry Wardell
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "adc.h"
-#include "kernel.h"
-#include "ascodec.h"
-#include "as3514.h"
-
-/* Read 10-bit channel data */
-unsigned short adc_read(int channel)
-{
-    unsigned short data = 0;
-
-    if ((unsigned)channel &amp;gt;= NUM_ADC_CHANNELS)
-        return 0;
-
-    ascodec_lock();
-
-    /* Select channel */
-    if (ascodec_write(AS3514_ADC_0, (channel &amp;lt;&amp;lt; 4)) &amp;gt;= 0)
-    {
-        unsigned char buf[2];
-
-        /*
-         * The AS3514 ADC will trigger an interrupt when the conversion
-         * is finished, if the corresponding enable bit in IRQ_ENRD2
-         * is set.
-         * Previously the code did not wait and this apparently did
-         * not pose any problems, but this should be more correct.
-         * Without the wait the data read back may be completely or
-         * partially (first one of the two bytes) stale.
-         */
-        ascodec_wait_adc_finished();
-
-
-        /* Read data */
-        if (ascodec_readbytes(AS3514_ADC_0, 2, buf) &amp;gt;= 0)
-        {
-            data = (((buf[0] &amp;amp; 0x3) &amp;lt;&amp;lt; 8) | buf[1]);
-        }
-    }
-
-    ascodec_unlock();
-    
-    return data;
-}
-
-void adc_init(void)
-{
-}

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T02:33:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32821">
    <title>funman: r31628 - trunk/apps</title>
    <link>http://comments.gmane.org/gmane.comp.systems.archos.rockbox.cvs/32821</link>
    <description>&lt;pre&gt;Date: 2012-01-08 02:51:51 +0100 (Sun, 08 Jan 2012)
New Revision: 31628

Log Message:
fix cpp condition

Modified:
   trunk/apps/debug_menu.c

Modified: trunk/apps/debug_menu.c
===================================================================
--- trunk/apps/debug_menu.c2012-01-08 01:44:08 UTC (rev 31627)
+++ trunk/apps/debug_menu.c2012-01-08 01:51:51 UTC (rev 31628)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1126,7 +1126,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
                     lcd_puts(0, line++, "T Battery: ?");
                 }
                     
-#if defined(HAVE_AS3514) &amp;amp;&amp;amp; defined(CONFIG_CHARGING)
+#elif defined(HAVE_AS3514) &amp;amp;&amp;amp; defined(CONFIG_CHARGING)
                 static const char * const chrgstate_strings[] =
                 {
                     [CHARGE_STATE_DISABLED - CHARGE_STATE_DISABLED]= "Disabled",

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs&amp;lt; at &amp;gt;cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

&lt;/pre&gt;</description>
    <dc:creator>mailer&lt; at &gt;svn.rockbox.org</dc:creator>
    <dc:date>2012-01-08T01:51:51</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.systems.archos.rockbox.cvs">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.systems.archos.rockbox.cvs</link>
  </textinput>
</rdf:RDF>

