# HG changeset patch # User Matti Hamalainen # Date 1192651794 -10800 # Node ID 319930001524af8fefd42bce8f23b709b1a7deff # Parent 371d9450c63142a370cfbc3cf5dfa330f10da0dc# Parent cf87d00b86b9a31d141fbdc58fcaadc08a687038 Automated merge with ssh://hg.atheme.org//hg/audacious-plugins diff -r 371d9450c631 -r 319930001524 po/LINGUAS --- a/po/LINGUAS Wed Oct 17 23:09:30 2007 +0300 +++ b/po/LINGUAS Wed Oct 17 23:09:54 2007 +0300 @@ -3,6 +3,7 @@ cs cy de +fr ja ro ru diff -r 371d9450c631 -r 319930001524 po/fr.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/po/fr.po Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,5968 @@ +# French language translation for Audacious (plugins) +# +# Translator : +# +# Stany Henry (StrassBoy) , 2007. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.audacious-media-player.org\n" +"POT-Creation-Date: 2007-10-13 14:15+0200\n" +"PO-Revision-Date: 2007-10-17 04:13+0100\n" +"Last-Translator: Stany Henry \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/aac/src/libmp4.c:291 +msgid "Using libfaad2-" +msgstr "Le module utilise la librairie 'libfaad2-" + +#: src/aac/src/libmp4.c:292 +msgid "" +" for decoding.\n" +"FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com\n" +"Copyright (c) 2005-2006 Audacious team" +msgstr "" +"' pour le décodage.\n" +"\n" +"Décodeur FAAD2 AAC/HE-AAC/HE-AACv2/DRM : (c) Nero AG, www.nero.com\n" +"\n" +"Droits d'utilisation : (c) 2005-2006, Équipe d'Audacious." + +#: src/aac/src/libmp4.c:296 +msgid "About MP4 AAC player plugin" +msgstr "À propos du module 'MP4 AAC'" + +#: src/aac/src/libmp4.c:298 +#: src/adplug/adplug-xmms.cc:185 +#: src/adplug/adplug-xmms.cc:268 +#: src/adplug/adplug-xmms.cc:529 +#: src/alac/plugin.c:88 +#: src/arts/arts.c:26 +#: src/arts/configure.c:90 +#: src/audiocompress/audacious-glue.c:106 +#: src/audiocompress/audacious-glue.c:556 +#: src/cdaudio-ng/configure.c:144 +#: src/console/Audacious_Driver.cxx:500 +#: src/echo_plugin/gui.c:27 +#: src/echo_plugin/gui.c:138 +#: src/esd/about.c:49 +#: src/filewriter/filewriter.c:184 +#: src/jack/configure.c:140 +#: src/jack/jack.c:602 +#: src/madplug/fileinfo.c:158 +#: src/madplug/fileinfo.c:236 +#: src/madplug/plugin.c:597 +#: src/madplug/plugin.c:620 +#: src/metronom/metronom.c:87 +#: src/modplug/gui/main.cxx:45 +#: src/musepack/libmpc.cxx:231 +#: src/null/null.c:67 +#: src/null/null.c:110 +#: src/OSS4/about.c:59 +#: src/OSS/about.c:54 +#: src/paranormal/plugin.c:288 +#: src/rovascope/plugin.c:294 +#: src/scrobbler/gtkstuff.c:24 +#: src/statusicon/si_ui.c:577 +#: src/stereo_plugin/stereo.c:56 +#: src/stereo_plugin/stereo.c:119 +#: src/sun/about.c:38 +#: src/sun/configure.c:559 +#: src/timidity/src/interface.c:224 +#: src/timidity/src/xmms-timidity.c:136 +#: src/tonegen/tonegen.c:62 +#: src/tta/libtta.c:171 +#: src/tta/libtta.c:285 +#: src/tta/libtta.c:420 +#: src/vorbis/fileinfo.c:212 +#: src/vorbis/vorbis.c:880 +#: src/vtx/about.c:31 +#: src/vtx/info.c:43 +#: src/wavpack/ui.cxx:56 +#: src/wavpack/ui.cxx:554 +#: src/wav/wav-sndfile.c:566 +msgid "Ok" +msgstr "OK" + +#: src/adplug/adplug-xmms.cc:174 +msgid "About " +msgstr "À propos de " + +#: src/adplug/adplug-xmms.cc:178 +msgid "" +"\n" +"Copyright (C) 2002, 2003 Simon Peter \n" +"\n" +"This plugin is released under the terms and conditions of the GNU LGPL.\n" +"See http://www.gnu.org/licenses/lgpl.html for details.\n" +"\n" +"This plugin uses the AdPlug library, which is copyright (C) Simon Peter, et al.\n" +"Linked AdPlug library version: " +msgstr "" +"\n" +"Droits d'utilisation : (C) 2002, 2003, Simon Peter \n" +"\n" +"Ce module est distribué sous les termes et les conditions de la licence GNU LGPL.\n" +"Consultez la page suivante pour les détails : http://www.gnu.org/licenses/lgpl.html\n" +"\n" +"Cette extension utilise la librairie 'AdPlug'.\n" +"Droits d'utilisation : (C) 2002, 2003, Simon Peter.\n" +"\n" +"Version de la librairie 'AdPlug' liée : " + +#: src/adplug/adplug-xmms.cc:259 +msgid "AdPlug :: Configuration" +msgstr "Configuration de 'AdPlug'" + +#: src/adplug/adplug-xmms.cc:278 +#: src/alarm/interface.c:1400 +#: src/alsa/configure.c:411 +#: src/arts/configure.c:91 +#: src/audiocompress/audacious-glue.c:561 +#: src/cdaudio-ng/configure.c:148 +#: src/echo_plugin/gui.c:146 +#: src/jack/configure.c:147 +#: src/modplug/gui/interface.cxx:741 +#: src/musepack/libmpc.cxx:236 +#: src/musepack/libmpc.cxx:556 +#: src/null/null.c:111 +#: src/sid/xmms-sid.glade:2930 +#: src/sid/xs_interface.c:1192 +#: src/stereo_plugin/stereo.c:128 +#: src/sun/configure.c:567 +#: src/timidity/src/interface.c:232 +#: src/wavpack/ui.cxx:278 +#: src/wavpack/ui.cxx:561 +msgid "Cancel" +msgstr "Annuler" + +#: src/adplug/adplug-xmms.cc:294 +#: src/console/Audacious_Config.cxx:146 +#: src/madplug/configure.c:191 +#: src/modplug/gui/interface.cxx:325 +#: src/modplug/gui/interface.cxx:833 +msgid "General" +msgstr "Général" + +#: src/adplug/adplug-xmms.cc:306 +msgid "Sound quality" +msgstr "Qualité du son" + +#: src/adplug/adplug-xmms.cc:311 +#: src/modplug/gui/interface.cxx:151 +msgid "Resolution" +msgstr "Résolution" + +#: src/adplug/adplug-xmms.cc:313 +msgid "8bit" +msgstr "8 bits" + +#: src/adplug/adplug-xmms.cc:318 +msgid "16bit" +msgstr "16 bits" + +#: src/adplug/adplug-xmms.cc:326 +#: src/modplug/gui/interface.cxx:181 +#: src/timidity/src/interface.c:150 +msgid "Channels" +msgstr "Sortie" + +#: src/adplug/adplug-xmms.cc:328 +#: src/filewriter/mp3.c:899 +#: src/sid/xmms-sid.glade:157 +#: src/sid/xs_interface.c:280 +#: src/timidity/src/interface.c:167 +msgid "Mono" +msgstr "Mono" + +#: src/adplug/adplug-xmms.cc:333 +#: src/filewriter/mp3.c:894 +#: src/modplug/gui/interface.cxx:195 +#: src/sid/xmms-sid.glade:176 +#: src/sid/xs_interface.c:287 +#: src/timidity/src/interface.c:175 +msgid "Stereo" +msgstr "Stéréo" + +#: src/adplug/adplug-xmms.cc:337 +msgid "Setting stereo is not recommended, unless you need to. This won't add any stereo effects to the sound - OPL2 is just mono - but eats up more CPU power!" +msgstr "Activer le mode stéréo n'est pas recommandé, à moins que vous ne le vouliez vraiment. Cette option n'ajoutera pas d'effet stéréo au son produit (OPL2 n'utilise que le mode mono), mais nécessitera beaucoup plus de puissance CPU !" + +#: src/adplug/adplug-xmms.cc:345 +msgid "Frequency" +msgstr "Fréquence" + +#: src/adplug/adplug-xmms.cc:381 +#: src/adplug/adplug-xmms.cc:585 +#: src/console/Audacious_Config.cxx:148 +msgid "Playback" +msgstr "Lecture" + +#: src/adplug/adplug-xmms.cc:385 +msgid "Detect songend" +msgstr "Détecter la fin du morceau" + +#: src/adplug/adplug-xmms.cc:389 +msgid "If enabled, XMMS will detect a song's ending, stop it and advance in the playlist. If disabled, XMMS won't take notice of a song's ending and loop it all over again and again." +msgstr "Si cette option est activée, Audacious détectera la fin du morceau, interrompra la lecture, puis passera au titre suivant dans la liste de lecture. Dans le cas contraire, Audacious ne se préoccupera pas de la fin des morceaux : le titre sera lu en boucle." + +#: src/adplug/adplug-xmms.cc:400 +msgid "Formats" +msgstr "Formats" + +#: src/adplug/adplug-xmms.cc:407 +msgid "Format selection" +msgstr "Choix des formats" + +#: src/adplug/adplug-xmms.cc:410 +msgid "Format" +msgstr "Format" + +#: src/adplug/adplug-xmms.cc:410 +msgid "Extension" +msgstr "Extension" + +#: src/adplug/adplug-xmms.cc:450 +msgid "Selected file types will be recognized and played back by this plugin. Deselected types will be ignored to make room for other plugins to play these files." +msgstr "Les types de fichiers sélectionnés seront reconnus et gérés par ce module. Les autres seront ignorés, de manière à pouvoir être supportés par d'autres extensions." + +#: src/adplug/adplug-xmms.cc:536 +msgid "AdPlug :: File Info" +msgstr "Informations sur le fichier" + +#: src/adplug/adplug-xmms.cc:558 +#: src/amidi-plug/i_configure-fluidsynth.c:448 +msgid "Filename" +msgstr "Nom du fichier" + +#: src/adplug/adplug-xmms.cc:562 +msgid "Title: " +msgstr "Titre : " + +#: src/adplug/adplug-xmms.cc:563 +msgid "Author: " +msgstr "Auteur : " + +#: src/adplug/adplug-xmms.cc:564 +msgid "File Type: " +msgstr "Format : " + +#: src/adplug/adplug-xmms.cc:565 +msgid "Subsongs: " +msgstr "Sous-modules : " + +#: src/adplug/adplug-xmms.cc:566 +msgid "Instruments: " +msgstr "Instruments : " + +#: src/adplug/adplug-xmms.cc:571 +msgid "Orders: " +msgstr "Partitions : " + +#: src/adplug/adplug-xmms.cc:572 +msgid "Patterns: " +msgstr "Séquences : " + +#: src/adplug/adplug-xmms.cc:576 +msgid "Song" +msgstr "Morceau" + +#: src/adplug/adplug-xmms.cc:602 +msgid "Instrument name" +msgstr "Nom de l'instrument" + +#: src/adplug/adplug-xmms.cc:644 +msgid "Song message" +msgstr "Commentaires" + +#: src/adplug/adplug-xmms.cc:666 +msgid "Subsong selection" +msgstr "Sélection du sous-module" + +#: src/adplug/adplug-xmms.cc:730 +msgid "Order: " +msgstr "Partition : " + +#: src/adplug/adplug-xmms.cc:731 +msgid "Pattern: " +msgstr "Séquence : " + +#: src/adplug/adplug-xmms.cc:733 +msgid "Row: " +msgstr "Ligne : " + +#: src/adplug/adplug-xmms.cc:734 +msgid "Speed: " +msgstr "Vitesse : " + +#: src/adplug/adplug-xmms.cc:735 +msgid "Timer: " +msgstr "Fréquence : " + +#: src/adplug/adplug-xmms.cc:736 +#: src/console/Audacious_Config.cxx:226 +#: src/sid/xmms-sid.glade:332 +#: src/sid/xs_interface.c:333 +msgid "Hz" +msgstr "Hz" + +#: src/alac/plugin.c:85 +msgid "About Apple Lossless Audio Plugin" +msgstr "À propos du module audio 'Apple Lossless'" + +#: src/alac/plugin.c:86 +msgid "" +"Copyright (c) 2006 Audacious team\n" +"Portions (c) 2005-2006 David Hammerton " +msgstr "" +"Droits d'utilisation (c) 2006, Équipe Audacious\n" +"Portions (c) 2005-2006, David Hammerton " + +#: src/alarm/interface.c:36 +msgid "About XMMS Alarm" +msgstr "À propos du module 'Alarm'" + +#: src/alarm/interface.c:49 +msgid "XMMS Alarm" +msgstr "'Alarm'" + +#: src/alarm/interface.c:58 +msgid "" +"An XMMS plugin which can be used\n" +"to start playing at a certain time.\n" +"\n" +"Send all complaints to:\n" +"Adam Feakin \n" +"Daniel Stodden \n" +"\n" +"http://www.snika.uklinux.net/xmms-alarm/" +msgstr "" +"Ce module peut être utilisé pour\n" +"commencer la lecture à un moment donné.\n" +"\n" +"Vous pouvez envoyer vos remarques à :\n" +"\n" +"Adam Feakin \n" +"Daniel Stodden \n" +"\n" +"\n" +"http://www.snika.uklinux.net/xmms-alarm/" + +#: src/alarm/interface.c:73 +#: src/lirc/about.c:116 +#: src/modplug/gui/interface.cxx:946 +#: src/sid/xmms-sid.glade:3493 +#: src/sid/xs_interface.c:1671 +msgid "Close" +msgstr "Fermer" + +#: src/alarm/interface.c:103 +msgid "Alarm" +msgstr "Alarm" + +#: src/alarm/interface.c:111 +msgid "This is your wakeup call." +msgstr "L'appel du réveil..." + +#: src/alarm/interface.c:126 +#: src/alarm/interface.c:1391 +#: src/alsa/about.c:46 +#: src/alsa/configure.c:405 +#: src/cdaudio-ng/cdaudio-ng.c:206 +#: src/filewriter/filewriter.c:201 +#: src/flacng/plugin.c:743 +#: src/modplug/gui/interface.cxx:725 +#: src/pulse_audio/pulse_audio.c:694 +#: src/scrobbler/gtkstuff.c:43 +#: src/sid/xmms-sid.glade:2916 +#: src/sid/xs_interface.c:1185 +msgid "OK" +msgstr "OK" + +#: src/alarm/interface.c:154 +msgid "Select Playlist" +msgstr "Choisir une liste de lecture" + +#: src/alarm/interface.c:198 +msgid "Sorry" +msgstr "Désolé" + +#: src/alarm/interface.c:206 +msgid "Warning" +msgstr "Avertissement" + +#: src/alarm/interface.c:215 +msgid "" +"For safety reasons the \"quiet\" time must be at least 65 seconds longer than the fading time, it must also be more than 10 seconds. This basically means that there is a bug in the code and until I find a way of really fixing it this message will appear :)\n" +"\n" +"Your fading settings have NOT been saved\n" +"\n" +"--\n" +"Adam" +msgstr "" +"Pour des raisons de sécurité, le temps de \"repos\" doit au moins durer 65 secondes de plus que le temps du fondu. Il doit aussi être supérieur à 10 secondes. Cela signifie simplement que le code du module comporte une erreur... Jusqu'à ce que je trouve un moyen de le corriger de manière définitive, ce message apparaîtra :)\n" +"\n" +"Les préférences relatives au fondu n'ont pas été enregistrées.\n" +"\n" +"----\n" +"Adam" + +#: src/alarm/interface.c:231 +msgid "Oh Well" +msgstr "Eh bien... !" + +#: src/alarm/interface.c:390 +msgid "Alarm Settings" +msgstr "Préférences de 'Alarm'" + +#: src/alarm/interface.c:406 +#: src/alarm/interface.c:578 +#: src/alarm/interface.c:950 +msgid "Time" +msgstr "Heure" + +#: src/alarm/interface.c:447 +msgid "hours" +msgstr " heures " + +#: src/alarm/interface.c:508 +msgid "h" +msgstr " minutes " + +#: src/alarm/interface.c:538 +msgid "minutes" +msgstr " minutes " + +#: src/alarm/interface.c:556 +msgid "Quiet after:" +msgstr "Extinction après :" + +#: src/alarm/interface.c:566 +msgid "Alarm at (default):" +msgstr "Heure du réveil par défaut :" + +#: src/alarm/interface.c:586 +msgid "Choose the days for the alarm to come on" +msgstr "Jours d'activation de l'alarme" + +#: src/alarm/interface.c:614 +#: src/alarm/interface.c:662 +#: src/alarm/interface.c:710 +#: src/alarm/interface.c:758 +#: src/alarm/interface.c:806 +#: src/alarm/interface.c:854 +#: src/alarm/interface.c:902 +#: src/OSS4/configure.c:138 +#: src/OSS/configure.c:170 +msgid "Default" +msgstr "Défaut" + +#: src/alarm/interface.c:940 +msgid "Day" +msgstr "Jour" + +#: src/alarm/interface.c:960 +msgid "Tuesday" +msgstr "Mardi" + +#: src/alarm/interface.c:971 +msgid "Wednesday" +msgstr "Mercredi" + +#: src/alarm/interface.c:982 +msgid "Thursday" +msgstr "Jeudi" + +#: src/alarm/interface.c:993 +msgid "Friday" +msgstr "Vendredi" + +#: src/alarm/interface.c:1004 +msgid "Saturday" +msgstr "Samedi" + +#: src/alarm/interface.c:1015 +msgid "Sunday" +msgstr "Dimanche" + +#: src/alarm/interface.c:1025 +msgid "Monday" +msgstr "Lundi" + +#: src/alarm/interface.c:1036 +msgid "Days" +msgstr "Jours" + +#: src/alarm/interface.c:1052 +msgid "Fading" +msgstr "Fondu" + +#: src/alarm/interface.c:1089 +#: src/sid/xmms-sid.glade:2007 +#: src/sid/xmms-sid.glade:2178 +#: src/sid/xmms-sid.glade:2526 +#: src/sid/xs_interface.c:900 +#: src/sid/xs_interface.c:954 +#: src/sid/xs_interface.c:1064 +msgid "seconds" +msgstr "secondes" + +#: src/alarm/interface.c:1097 +#: src/alarm/interface.c:1213 +#: src/modplug/gui/interface.cxx:635 +msgid "Volume" +msgstr "Volume" + +#: src/alarm/interface.c:1123 +msgid "Current" +msgstr "Volume actuel" + +#: src/alarm/interface.c:1130 +msgid "reset to current output volume" +msgstr "Réinitialise au volume actuel du système." + +#: src/alarm/interface.c:1132 +msgid "Start at" +msgstr "Début" + +#: src/alarm/interface.c:1160 +#: src/alarm/interface.c:1204 +msgid "%" +msgstr "%" + +#: src/alarm/interface.c:1176 +msgid "Final" +msgstr "Fin" + +#: src/alarm/interface.c:1229 +msgid "Additional Command" +msgstr "Commande supplémentaire" + +#: src/alarm/interface.c:1255 +msgid "enable" +msgstr "Activer" + +#: src/alarm/interface.c:1263 +msgid "Playlist (optional)" +msgstr "Liste de lecture (option facultative)" + +#: src/alarm/interface.c:1289 +msgid "Browse..." +msgstr "Parcourir" + +#: src/alarm/interface.c:1297 +#: src/alarm/interface.c:1462 +msgid "Reminder" +msgstr "Pense-bête" + +#: src/alarm/interface.c:1314 +msgid "Use reminder" +msgstr "Utiliser le pense-bête" + +#: src/alarm/interface.c:1330 +#: src/sndstretch/sndstretch_xmms.c:381 +msgid "Options" +msgstr "Options" + +#: src/alarm/interface.c:1338 +msgid "What do these options mean?" +msgstr "Que signifient donc ces options ?" + +#: src/alarm/interface.c:1366 +msgid "" +"\n" +"Time\n" +" Alarm at: \n" +" The time for the alarm to come on.\n" +"\n" +" Quiet After: \n" +" Stop alarm after this amount of time.\n" +" (if the wakeup dialog is not closed)\n" +"\n" +"\n" +"Days\n" +" Day:\n" +" Select the days for the alarm to activate.\n" +"\n" +" Time:\n" +" Choose the time for the alarm on each day,\n" +" or select the toggle button to use the default\n" +" time.\n" +"\n" +"\n" +"Volume\n" +" Fading: \n" +" Fade the volume up to the chosen volume \n" +" for this amount of time.\n" +"\n" +" Start at: \n" +" Start fading from this volume.\n" +"\n" +" Final: \n" +" The volume to stop fading at. If the fading\n" +" time is 0 then set volume to this and start\n" +" playing.\n" +"\n" +"\n" +"Options:\n" +" Additional Command:\n" +" Run this command at the alarm time.\n" +"\n" +" Playlist: \n" +" Load this playlist for playing songs from \n" +" (must have .m3u extension). If no playlist\n" +" is given then the songs which are currently\n" +" in the list will be used.\n" +" The URL of an mp3/ogg stream can also be\n" +" entered here, but loading of playlists from\n" +" URLs is not currently supported by xmms.\n" +"\n" +" Reminder:\n" +" Display a reminder when the alarm goes off,\n" +" type the reminder in the box and turn on the\n" +" toggle button if you want it to be shown.\n" +msgstr "" +"\n" +"*** Alarme ***\n" +"\n" +"\n" +"Heure de l'alarme :\n" +"\n" +"heure à laquelle l'alarme sera activée.\n" +"\n" +"\n" +"Extinction :\n" +"\n" +"laps de temps après lequel l'alarme cessera\n" +"(si la fenêtre du réveil n'est pas fermée).\n" +"\n" +"\n" +"*** Jours ***\n" +"\n" +"\n" +"Jour :\n" +"\n" +"détermine le jour d'activation de l'alarme.\n" +"\n" +"\n" +"Heure :\n" +"\n" +"détermine l'heure d'activation de l'alarme\n" +"(vous pouvez spécifier une heure précise ou utiliser le bouton 'défaut)'.\n" +"\n" +"\n" +"*** Volume ***\n" +"\n" +"\n" +"Fondu :\n" +"\n" +"applique un effet de fondu au volume sonore, pour le laps de temps indiqué.\n" +"\n" +"\n" +"Début :\n" +"\n" +"applique le fondu à partir du niveau sonore déterminé.\n" +"\n" +"\n" +"Fin :\n" +"\n" +"détermine le volume à partir duquel le fondu ne sera plus appliqué\n" +"(si la durée du fondu correspond à 0, le volume de fin de fondu déterminera\n" +"le niveau sonore de l'alarme).\n" +"\n" +"\n" +"*** Options ***\n" +"\n" +"\n" +"Commande supplémentaire :\n" +"\n" +"la commande spécifiée sera exécutée en même temps que l'alarme.\n" +"\n" +"\n" +"Liste de lecture :\n" +"\n" +"lis une liste de lecture particulière (l'extension doit être '.m3u').\n" +"Si aucune liste particulière n'est spécifiée, ce sont les titres de la liste active\n" +"du lecteur qui seront utilisés.\n" +"L'adresse d'un flux distant 'mp3' ou 'ogg' peut également constituer une source.\n" +"\n" +"\n" +"Pense-bête :\n" +"\n" +"affiche un texte de rappel, lors de l'extinction de l'alarme\n" +"(écrivez le message dans le champ prévu à cet effet, puis cochez l'option du pense-bête).\n" + +#: src/alarm/interface.c:1368 +msgid "Help" +msgstr "Aide" + +#: src/alarm/interface.c:1470 +msgid "Your reminder for today is.." +msgstr "Le pense-bête du jour est..." + +#: src/alarm/interface.c:1495 +msgid "Thankyou" +msgstr "Merci" + +#: src/alsa/about.c:30 +msgid "About ALSA Driver" +msgstr "À propos du pilote 'ALSA'" + +#: src/alsa/about.c:31 +msgid "" +"Audacious ALSA Driver\n" +"\n" +" This program is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,\n" +"USA.\n" +"Author: Matthieu Sozeau (mattam@altern.org)" +msgstr "" +"Pilote 'ALSA' pour Audacious\n" +"\n" +"Ce programme est libre, vous pouvez le redistribuer et/ou le modifier\n" +"selon les termes de la Licence Publique Générale GNU publiée par\n" +"la Free Software Foundation (version 2 ou bien toute autre version\n" +"ultérieure choisie par vous).\n" +"\n" +"Ce programme est distribué car potentiellement utile, mais SANS\n" +"AUCUNE GARANTIE, ni explicite ni implicite, y compris les garanties\n" +"de commercialisation ou d'adaptation dans un but spécifique.\n" +"Reportez-vous à la Licence Publique Générale GNU pour plus de détails.\n" +"\n" +"Vous devez avoir reçu une copie de la Licence Publique Générale GNU\n" +"en même temps que ce programme ; si ce n'est pas le cas, écrivez à la\n" +"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +"MA 02110-1301, États-Unis.\n" +"\n" +"Auteur : Matthieu Sozeau (mattam@altern.org)" + +#: src/alsa/configure.c:150 +msgid "Unknown soundcard" +msgstr "Carte son inconnue" + +#: src/alsa/configure.c:205 +#, c-format +msgid "Default PCM device (%s)" +msgstr "Périphérique PCM par défaut (%s)" + +#: src/alsa/configure.c:271 +msgid "ALSA Driver configuration" +msgstr "Configuration du pilote 'ALSA'" + +#: src/alsa/configure.c:285 +#: src/OSS4/configure.c:186 +#: src/OSS/configure.c:218 +#: src/sun/configure.c:183 +msgid "Audio device:" +msgstr "Périphérique audio :" + +#: src/alsa/configure.c:299 +msgid "Mixer:" +msgstr "Mélangeur audio :" + +#: src/alsa/configure.c:307 +msgid "Use software volume control" +msgstr "Utiliser le contrôle du volume logiciel" + +#: src/alsa/configure.c:317 +msgid "Mixer card:" +msgstr "Carte de mélange audio :" + +#: src/alsa/configure.c:330 +#: src/OSS/configure.c:261 +#: src/sun/configure.c:220 +msgid "Mixer device:" +msgstr "Mélangeur audio :" + +#: src/alsa/configure.c:350 +msgid "Device settings" +msgstr "Paramètres du périphérique" + +#: src/alsa/configure.c:356 +msgid "Soundcard:" +msgstr "Carte son :" + +#: src/alsa/configure.c:369 +msgid "Buffer time (ms):" +msgstr "Tampon (ms) :" + +#: src/alsa/configure.c:383 +msgid "Period time (ms):" +msgstr "Période (ms) :" + +#: src/alsa/configure.c:398 +#: src/amidi-plug/i_configure-ap.c:287 +msgid "Advanced settings" +msgstr "Paramètres avancés" + +#: src/amidi-plug/backend-alsa/b-alsa.c:35 +msgid "ALSA Backend " +msgstr "ALSA " + +#: src/amidi-plug/backend-alsa/b-alsa.c:37 +msgid "" +"This backend sends MIDI events to a group of user-chosen ALSA sequencer ports. The ALSA sequencer interface is very versatile, it can provide ports for audio cards hardware synthesizers (i.e. emu10k1) but also for software synths, external devices, etc.\n" +"This backend does not produce audio, MIDI events are handled directly from devices/programs behind the ALSA ports; in example, MIDI events sent to the hardware synth will be directly played.\n" +"Backend written by Giacomo Lozito." +msgstr "" +"Ce système envoie les événements MIDI à l'ensemble des ports du séquenceur 'ALSA' que l'utilisateur a spécifié. L'interface du séquenceur 'ALSA' offre des possibilités variées : elle peut fournir des ports aux synthétiseurs matériels des cartes sons ('emu10k1', par exemple), mais aussi aux synthétiseurs logiciels, aux périphériques externes, etc.\n" +"Ce système de sortie ne produit pas de flux audio : les événements MIDI sont gérés directement par les périphériques et les applications associés aux ports 'ALSA'. Par exemple, les événements MIDI envoyés au synthétiseur matériel seront directement interprétés.\n" +"\n" +"Auteur : Giacomo Lozito." + +#: src/amidi-plug/backend-dummy/b-dummy.c:35 +msgid "Dummy Backend " +msgstr "Dummy " + +#: src/amidi-plug/backend-dummy/b-dummy.c:37 +msgid "" +"This backend does not produce audio at all. It is mostly useful for analysis and testing purposes, as it can log all MIDI events to standard output, standard error or file.\n" +"Backend written by Giacomo Lozito." +msgstr "" +"Ce système de sortie ne produit absolument pas de flux audio. Il est principalement utile à des fins d'analyses et d'essais, parce qu'il peut consigner tous les événements MIDI dans la sortie standard, dans la sortie d'erreurs ou dans un fichier.\n" +"\n" +"Auteur : Giacomo Lozito." + +#: src/amidi-plug/backend-fluidsynth/b-fluidsynth.c:35 +msgid "FluidSynth Backend " +msgstr "FluidSynth " + +#: src/amidi-plug/backend-fluidsynth/b-fluidsynth.c:37 +msgid "" +"This backend produces audio by sending MIDI events to FluidSynth, a real-time software synthesizer based on the SoundFont2 specification (www.fluidsynth.org).\n" +"Produced audio can be manipulated via player effect plugins and is processed by chosen ouput plugin.\n" +"Backend written by Giacomo Lozito." +msgstr "" +"Ce système de sortie produit des flux audio en envoyant les événements MIDI à 'FluidSynth', un synthétiseur logiciel en temps réel sur les caractéristiques de 'SoundFont2' (www.fluidsynth.org).\n" +"Les flux générés peuvent être manipulés grâce aux modules d'effets du lecteur et sont traités par le module de sortie sélectionné.\n" +"\n" +"Auteur : Giacomo Lozito." + +#: src/amidi-plug/i_configure-alsa.c:221 +msgid "ALSA BACKEND CONFIGURATION" +msgstr "CONFIGURATION DU SYSTÈME DE SORTIE 'ALSA'" + +#: src/amidi-plug/i_configure-alsa.c:326 +msgid "Port" +msgstr "Port" + +#: src/amidi-plug/i_configure-alsa.c:328 +msgid "Client name" +msgstr "Nom du client" + +#: src/amidi-plug/i_configure-alsa.c:330 +msgid "Port name" +msgstr "Nom du port" + +#: src/amidi-plug/i_configure-alsa.c:341 +msgid "ALSA output ports" +msgstr "Ports de sortie 'ALSA'" + +#: src/amidi-plug/i_configure-alsa.c:394 +msgid "Soundcard: " +msgstr "Périphérique audio : " + +#: src/amidi-plug/i_configure-alsa.c:396 +msgid "Mixer control: " +msgstr "Canal du mélangeur audio : " + +#: src/amidi-plug/i_configure-alsa.c:408 +msgid "Mixer settings" +msgstr "Paramètres du mélangeur" + +#: src/amidi-plug/i_configure-alsa.c:421 +msgid "" +"* Select ALSA output ports *\n" +"MIDI events will be sent to the ports selected here. In example, if your audio card provides a hardware synth and you want to play MIDI with it, you'll probably want to select the wavetable synthesizer ports." +msgstr "" +"* Choix des ports de sortie 'ALSA' *\n" +"Les événements MIDI seront envoyés aux ports spécifiés. Par exemple, si votre carte son dispose d'un synthétiseur matériel et que vous désirez écouter les fichiers MIDI avec celui-ci, vous voudrez probabement choisir les ports du synthétiseur à tables d'ondes." + +#: src/amidi-plug/i_configure-alsa.c:426 +msgid "" +"* Select ALSA mixer card *\n" +"The ALSA backend outputs directly through ALSA, it doesn't use effect and ouput plugins from the player. During playback, the player volumeslider will manipulate the mixer control you select here. If you're using wavetable synthesizer ports, you'll probably want to select the Synth control here." +msgstr "" +"* Choix du périphérique audio 'ALSA' *\n" +"Le système de sortie 'ALSA' émet directement via 'ALSA' : il n'utilise pas les modules d'effets du lecteur, ni les modules de sortie. Lors de la lecture, le curseur du volume du lecteur manipulera le contrôleur du mélangeur audio que vous avez sélectionné. Si vous utilisez les ports d'un synthétiseur à tables d'ondes, vous voudrez probabement choisir le contrôleur du synthétiseur." + +#: src/amidi-plug/i_configure-alsa.c:433 +msgid "" +"* Select ALSA mixer control *\n" +"The ALSA backend outputs directly through ALSA, it doesn't use effect and ouput plugins from the player. During playback, the player volume slider will manipulate the mixer control you select here. If you're using wavetable synthesizer ports, you'll probably want to select the Synth control here." +msgstr "" +"* Choix du canal du mélangeur audio 'ALSA' *\n" +"Le système de sortie 'ALSA' émet directement via 'ALSA' : il n'utilise pas les modules d'effets du lecteur, ni les modules de sortie. Lors de la lecture, le curseur du volume du lecteur manipulera le canal du mélangeur audio que vous avez sélectionné. Si vous utilisez les ports d'un synthétiseur à tables d'ondes, vous voudrez probabement choisir le canal du synthétiseur." + +#: src/amidi-plug/i_configure-alsa.c:444 +msgid "ALSA Backend not loaded or not available" +msgstr "Le système de sortie 'ALSA' n'est pas chargé ou n'est pas disponible" + +#: src/amidi-plug/i_configure-alsa.c:463 +msgid "" +"ALSA\n" +"backend" +msgstr "" +"Sortie\n" +"'ALSA'" + +#: src/amidi-plug/i_configure-ap.c:56 +msgid "AMIDI-Plug - backend information" +msgstr "Informations sur le système de sortie" + +#: src/amidi-plug/i_configure-ap.c:194 +msgid "AMIDI-PLUG PREFERENCES" +msgstr "PRÉFÉRENCES DE 'AMIDI-PLUG'" + +#: src/amidi-plug/i_configure-ap.c:221 +msgid "Backend selection" +msgstr "Choix du système de sortie" + +#: src/amidi-plug/i_configure-ap.c:225 +msgid "Available backends" +msgstr "Systèmes disponibles :" + +#: src/amidi-plug/i_configure-ap.c:255 +msgid "Playback settings" +msgstr "Paramètres de lecture" + +#: src/amidi-plug/i_configure-ap.c:260 +msgid "Transpose: " +msgstr "Transposition : " + +#: src/amidi-plug/i_configure-ap.c:269 +msgid "Drum shift: " +msgstr "Décalage des percussions :" + +#: src/amidi-plug/i_configure-ap.c:291 +msgid "pre-calculate length of MIDI files in playlist" +msgstr "Précalculer la durée des fichiers MIDI dans la liste de lecture" + +#: src/amidi-plug/i_configure-ap.c:296 +msgid "extract comments from MIDI file (if available)" +msgstr "Extraire les commentaires des fichiers MIDI (s'ils sont disponibles)" + +#: src/amidi-plug/i_configure-ap.c:301 +msgid "extract lyrics from MIDI file (if available)" +msgstr "Extraire les paroles des fichiers MIDI (si elles sont disponible)" + +#: src/amidi-plug/i_configure-ap.c:320 +msgid "" +"* Backend selection *\n" +"AMIDI-Plug works with backends, in a modular fashion; here you should select your backend; that is, the way MIDI events are going to be handled and played.\n" +"If you have a hardware synthesizer on your audio card, and ALSA supports it, you'll want to use the ALSA backend. It can also be used with anything that provides an interface to the ALSA sequencer, including software synths or external devices.\n" +"If you want to rely on a software synthesizer and/or want to pipe audio into effect and output plugins of the player you'll want to use the good FluidSynth backend.\n" +"Press the info button to read specific information about each backend." +msgstr "" +"* Choix du système de sortie *\n" +"'AMIDI-Plug' utilise des systèmes de sortie, de manière modulaire. C'est par le système de sortie que vous aurez choisi que seront gérés et restitués les événements MIDI. Si votre périphérique audio dispose d'un synthétiseur matériel supporté par 'ALSA', vous voudrez utiliser le système de sortie 'ALSA'. Celui-ci peut aussi être utilisé par tout ce qui peut offrir une interface au séquenceur 'ALSA' (les synthétiseurs logiciels ou les périphériques externes, notamment).\n" +" Si vous désirez dépendre d'un synthétiseur logiciel et/ou si vous voulez rediriger le flux audio vers les modules de sortie du lecteur, vous pourrez utiliser le système de sortie 'FluidSynth'. N'hésitez pas à activer le bouton d'informations, afin d'obtenir des renseignements spécifiques à chaque système de sortie." + +#: src/amidi-plug/i_configure-ap.c:331 +msgid "" +"* Transpose function *\n" +"This option allows you to play the midi file transposed in a different key, by shifting of the desired number of semitones all its notes (excepting those on midi channel 10, reserved for percussions). Expecially useful if you wish to sing or play along with another instrument." +msgstr "" +"* Fonction de transposition *\n" +"Cette option permet de restituer le fichier MIDI alors transposé dans une tonalité différente, en décalant du nombre désiré de demi-tons toutes les les notes du morceau (à l'exception de celles du canal MIDI 10, réservé aux percussions). Cette fonction est particulièrement utile, si vous désirez chanter ou jouer accompagné d'un autre instrument." + +#: src/amidi-plug/i_configure-ap.c:337 +msgid "" +"* Drumshift function *\n" +"This option allows you to shift notes on midi channel 10 (the standard percussions channel) of the desired number of semitones. This results in different drumset and percussions being used during midi playback, so if you wish to enhance (or reduce, or alter) percussion sounds, try to play with this value." +msgstr "" +"* Fonction de décalage des percussions *\n" +"Cette option permet de décaler toutes les notes du canal MIDI 10 (le canal standard des percussions) du nombre désiré de demi-tons. Cela se traduit par l'utilisation d'un ensemble de batteries et de percussions différent, lors de la lecture. Donc, si vous désirez amémiorer (ou réduire, ou bien encore altérer) les percussions, n'hésitez pas à essayer différentes valeurs." + +#: src/amidi-plug/i_configure-ap.c:344 +msgid "" +"* Pre-calculate MIDI length *\n" +"If this option is enabled, AMIDI-Plug will calculate the MIDI file length as soon as the player requests it, instead of doing that only when the MIDI file is being played. In example, MIDI length will be calculated straight after adding MIDI files in a playlist. Disable this option if you want faster playlist loading (when a lot of MIDI files are added), enable it to display more information in the playlist straight after loading." +msgstr "" +"* Pré-calculer la durée des fichiers MIDI *\n" +"Si cette option est activée, 'AMIDI-Plug' déterminera la durée du fichier MIDI dès que le lecteur le demandera, au lieu le faire seulement lorsque le morceau est lu. Par exemple, la durée des fichiers MIDI sera calculée immédiatement après l'ajout des titres dans la liste de lecture. Désactivez cette option, si vous voulez un chargement plus rapide de la liste de lecture (lorsque de nombreux fichiers MIDI sont ajoutés) ; activez cette option pour que s'affichent plus d'informations dans la liste de lecture, directement après le chargement des fichiers." + +#: src/amidi-plug/i_configure-ap.c:353 +msgid "" +"* Extract comments from MIDI files *\n" +"Some MIDI files contain text comments (author, copyright, instrument notes, etc.). If this option is enabled, AMIDI-Plug will extract and display comments (if available) in the file information dialog." +msgstr "" +"* Extraire les commentaires des fichiers MIDI *\n" +"Certains fichiers MIDI contiennent des commentaires (auteur, droits d'utilisation, notes relatives aux instruments, etc.). Si cette option est activée, 'AMIDI-Plug' extraira et afficher ces commentaires (s'ils sont disponibles) dans la fenêtre d'informations sur le fichier." + +#: src/amidi-plug/i_configure-ap.c:358 +msgid "" +"* Extract lyrics from MIDI files *\n" +"Some MIDI files contain song lyrics. If this option is enabled, AMIDI-Plug will extract and display song lyrics (if available) in the file information dialog." +msgstr "" +"* Extraire les paroles des fichiers MIDI *\n" +"Certains fichiers MIDI contiennent les paroles relatives au morceau joué. Si cette option est activée, 'AMIDI-Plug' extraira et affichera les paroles (si elles sont disponibles) dans la fenêtre d'informations sur le fichier." + +#: src/amidi-plug/i_configure-ap.c:375 +msgid "" +"AMIDI\n" +"Plug" +msgstr "" +"AMIDI\n" +"Plug" + +#: src/amidi-plug/i_configure.c:75 +msgid "AMIDI-Plug - select file" +msgstr "'AMIDI-Plug' - choix du fichier" + +#: src/amidi-plug/i_configure.c:122 +msgid "AMIDI-Plug - configuration" +msgstr "Configuration de 'AMIDI-Plug'" + +#: src/amidi-plug/i_configure.c:241 +msgid "AMIDI-Plug message" +msgstr "Message de 'AMIDI-Plug'" + +#: src/amidi-plug/i_configure.c:242 +msgid "Please stop the player before changing AMIDI-Plug settings." +msgstr "Veuillez arrêter le lecture avant de modifier les paramètres." + +#: src/amidi-plug/i_configure-dummy.c:137 +msgid "DUMMY BACKEND CONFIGURATION" +msgstr "CONFIGURATION DU SYSTÈME DE SORTIE 'DUMMY'" + +#: src/amidi-plug/i_configure-dummy.c:173 +msgid "MIDI logger settings" +msgstr "Paramètres du journal des événements MIDI" + +#: src/amidi-plug/i_configure-dummy.c:181 +msgid "Do not log anything" +msgstr "Ne rien écrire dans le journal" + +#: src/amidi-plug/i_configure-dummy.c:185 +msgid "Log MIDI events to standard output" +msgstr "Consigner les événements MIDI dans la sortie standard" + +#: src/amidi-plug/i_configure-dummy.c:189 +msgid "Log MIDI events to standard error" +msgstr "Consigner les événements MIDI dans la sortie d'erreur standard" + +#: src/amidi-plug/i_configure-dummy.c:193 +msgid "Log MIDI events to file" +msgstr "Consigner les événements MIDI dans un fichier" + +#: src/amidi-plug/i_configure-dummy.c:202 +msgid "Logfile settings" +msgstr "Paramètres du fichier du journal" + +#: src/amidi-plug/i_configure-dummy.c:209 +msgid "Use a single file to log everything (rewrite)" +msgstr "Utiliser un fichier unique pour tout consigner (remplacement du contenu existant)" + +#: src/amidi-plug/i_configure-dummy.c:213 +msgid "Use a single file to log everything (append)" +msgstr "Utiliser un fichier unique pour tout consigner (ajout au contenu existant)" + +#: src/amidi-plug/i_configure-dummy.c:217 +msgid "Use a different logfile for each MIDI file" +msgstr "Utiliser un fichier journal par fichier MIDI" + +#: src/amidi-plug/i_configure-dummy.c:223 +msgid "» Log dir:" +msgstr "» Emplacement du journal :" + +#: src/amidi-plug/i_configure-dummy.c:229 +#: src/amidi-plug/i_configure-dummy.c:241 +msgid "browse" +msgstr "Parcourir" + +#: src/amidi-plug/i_configure-dummy.c:235 +msgid "» Log file:" +msgstr "» Fichier du journal :" + +#: src/amidi-plug/i_configure-dummy.c:267 +msgid "Playback speed" +msgstr "Vitesse de lecture" + +#: src/amidi-plug/i_configure-dummy.c:272 +msgid "Play at normal speed" +msgstr "Lire à une vitesse normale" + +#: src/amidi-plug/i_configure-dummy.c:275 +msgid "Play as fast as possible" +msgstr "Lire le plus rapidement possible" + +#: src/amidi-plug/i_configure-dummy.c:329 +msgid "Dummy Backend not loaded or not available" +msgstr "Le système de sortie 'Dummy' n'est pas chargé ou n'est pas disponible" + +#: src/amidi-plug/i_configure-dummy.c:348 +msgid "" +"Dummy\n" +"backend" +msgstr "" +"Sortie\n" +"'Dummy'" + +#: src/amidi-plug/i_configure-fluidsynth.c:83 +msgid "AMIDI-Plug - select SoundFont file" +msgstr "Choix du fichier 'SoundFont'" + +#: src/amidi-plug/i_configure-fluidsynth.c:362 +msgid "FLUIDSYNTH BACKEND CONFIGURATION" +msgstr "CONFIGURATION DU SYSTÈME DE SORTIE 'FLUIDSYNTH'" + +#: src/amidi-plug/i_configure-fluidsynth.c:416 +msgid "SoundFont settings" +msgstr "Paramètres de la banque de sons 'SoundFont'" + +#: src/amidi-plug/i_configure-fluidsynth.c:452 +msgid "Size (bytes)" +msgstr "Taille (bytes)" + +#: src/amidi-plug/i_configure-fluidsynth.c:501 +msgid "Load SF on player start" +msgstr "Charger la banque de sons au démarrage du lecteur" + +#: src/amidi-plug/i_configure-fluidsynth.c:505 +msgid "Load SF on first midifile play" +msgstr "Charger la banque de sons à la lecture du premier fichier MIDI" + +#: src/amidi-plug/i_configure-fluidsynth.c:520 +msgid "Synthesizer settings" +msgstr "Paramètres du synthétiseur" + +#: src/amidi-plug/i_configure-fluidsynth.c:529 +msgid "gain" +msgstr "Gain" + +#: src/amidi-plug/i_configure-fluidsynth.c:535 +#: src/amidi-plug/i_configure-fluidsynth.c:563 +#: src/amidi-plug/i_configure-fluidsynth.c:591 +#: src/amidi-plug/i_configure-fluidsynth.c:622 +msgid "use default" +msgstr "valeur par défaut" + +#: src/amidi-plug/i_configure-fluidsynth.c:538 +#: src/amidi-plug/i_configure-fluidsynth.c:566 +msgid "value:" +msgstr "valeur :" + +#: src/amidi-plug/i_configure-fluidsynth.c:557 +msgid "poliphony" +msgstr "Polyphonie" + +#: src/amidi-plug/i_configure-fluidsynth.c:585 +msgid "reverb" +msgstr "Réverbération" + +#: src/amidi-plug/i_configure-fluidsynth.c:594 +#: src/amidi-plug/i_configure-fluidsynth.c:625 +msgid "yes" +msgstr "Oui" + +#: src/amidi-plug/i_configure-fluidsynth.c:596 +#: src/amidi-plug/i_configure-fluidsynth.c:627 +msgid "no" +msgstr "Non" + +#: src/amidi-plug/i_configure-fluidsynth.c:616 +msgid "chorus" +msgstr "Effet de choeur" + +#: src/amidi-plug/i_configure-fluidsynth.c:647 +msgid "sample rate" +msgstr "Taux d'échantillonnage" + +#: src/amidi-plug/i_configure-fluidsynth.c:653 +msgid "22050 Hz " +msgstr "22050 Hz" + +#: src/amidi-plug/i_configure-fluidsynth.c:656 +msgid "44100 Hz " +msgstr "44100 Hz" + +#: src/amidi-plug/i_configure-fluidsynth.c:659 +msgid "96000 Hz " +msgstr "96000 Hz" + +#: src/amidi-plug/i_configure-fluidsynth.c:662 +msgid "custom " +msgstr "Autre " + +#: src/amidi-plug/i_configure-fluidsynth.c:671 +msgid "Hz " +msgstr "Hz" + +#: src/amidi-plug/i_configure-fluidsynth.c:705 +msgid "Buffer settings" +msgstr "Paramètres du tampon" + +#: src/amidi-plug/i_configure-fluidsynth.c:714 +msgid "def" +msgstr "Réinitialisation" + +#: src/amidi-plug/i_configure-fluidsynth.c:723 +msgid "handy buffer tuner" +msgstr "Ajusteur de tampon pratique" + +#: src/amidi-plug/i_configure-fluidsynth.c:737 +msgid "size" +msgstr "taille" + +#: src/amidi-plug/i_configure-fluidsynth.c:751 +msgid "margin" +msgstr "marge" + +#: src/amidi-plug/i_configure-fluidsynth.c:765 +msgid "increment" +msgstr "différentiel" + +#: src/amidi-plug/i_configure-fluidsynth.c:807 +msgid "" +"* Select SoundFont files *\n" +"In order to play MIDI with FluidSynth, you need to specify at least one valid SoundFont file here (use absolute paths). The loading order is from the top (first) to the bottom (last)." +msgstr "" +"* Sélectionner les fichier 'SoundFont' *\n" +"Afin de pouvoir écouter des fichiers MIDI avec 'FluidSynth', vous devez spécifier au moins un fichier 'SoundFont' valide (veillez à utiliser des chemins absolus). Le chargement s'opère, par ordre, du haut (le premier fichier) vers le bas (le dernier fichier)." + +#: src/amidi-plug/i_configure-fluidsynth.c:812 +msgid "" +"* Load SoundFont on player start *\n" +"Depending on your system speed, SoundFont loading in FluidSynth will require up to a few seconds. This is a one-time task (the soundfont will stay loaded until it is changed or the backend is unloaded) that can be done at player start, or before the first MIDI file is played (the latter is a better choice if you don't use your player to listen MIDI files only)." +msgstr "" +"* Charger la banque de sons au démarrage du lecteur *\n" +"En fonction de la vitesse de votre système, le chargement du fichier 'SoundFont' dans 'FluidSynth' nécessitera quelques secondes. Cette opération, qui ne sera exécutée qu'une fois (la banque de sons restera en mémoire, jusqu'à ce qu'elle soit modifiée ou que le système de sortie ne soit supprimé de la mémoire), peut être accomplie au démarrage du lecteur, ou avant que ne soit lu le premier fichier MIDI (la seconde proposition constitue un meilleur choix, si vous n'utilisez pas le lecteur pour écouter des fichiers MIDI uniquement)." + +#: src/amidi-plug/i_configure-fluidsynth.c:820 +msgid "" +"* Load SoundFont on first midifile play *\n" +"Depending on your system speed, SoundFont loading in FluidSynth will require up to a few seconds. This is a one-time task (the soundfont will stay loaded until it is changed or the backend is unloaded) that can be done at player start, or before the first MIDI file is played (the latter is a better choice if you don't use your player to listen MIDI files only)." +msgstr "" +"* Charger la banque de sons à la lecture du premier fichier MIDI *\n" +"En fonction de la vitesse de votre système, le chargement du fichier 'SoundFont' dans 'FluidSynth' nécessitera quelques secondes. Cette opération, qui ne sera exécutée qu'une fois (la banque de sons restera en mémoire, jusqu'à ce qu'elle soit modifiée ou que le système de sortie ne soit supprimé de la mémoire), peut être accomplie au démarrage du lecteur, ou avant que ne soit lu le premier fichier MIDI (la seconde proposition constitue un meilleur choix, si vous n'utilisez pas le lecteur pour écouter des fichiers MIDI uniquement)." + +#: src/amidi-plug/i_configure-fluidsynth.c:828 +msgid "" +"* Synthesizer gain *\n" +"From FluidSynth docs: the gain is applied to the final or master output of the synthesizer; it is set to a low value by default to avoid the saturation of the output when random MIDI files are played." +msgstr "" +"* Gain du synthétiseur *\n" +"Selon la documentation de 'FluidSynth', le gain est appliqué à la sortie finale ou principale du synthétiseur. Par défaut, il est réglé sur une valeur basse, afin d'éviter la saturation de la sortie, lorsque des fichiers MIDI sont lus de manière aléatoire." + +#: src/amidi-plug/i_configure-fluidsynth.c:833 +msgid "" +"* Synthesizer polyphony *\n" +"From FluidSynth docs: the polyphony defines how many voices can be played in parallel; the number of voices is not necessarily equivalent to the number of notes played simultaneously; indeed, when a note is struck on a specific MIDI channel, the preset on that channel may create several voices, for example, one for the left audio channel and one for the right audio channels; the number of voices activated depends on the number of instrument zones that fall in the correspond to the velocity and key of the played note." +msgstr "" +"* Polyphonie du synthétiseur *\n" +"Selon la documentation de 'FluidSynth', la polyphonie définit le nombre de voix qui peuvent être jouées en parallèle ; le nombre de voix ne correspond pas nécessairement au nombre de notes jouées simultanément. En effet, lorsqu'une note est envoyée à un canal MIDI spécifique, le préréglage de ce canal peut créer plusieurs voix (par exemple, une voix pour le canal audio gauche et une autre pour le canal audio droit). Le nombre de voix activées dépend du nombre de pistes d'instruments relatives à la vélocité et à la tonalité de la note jouée." + +#: src/amidi-plug/i_configure-fluidsynth.c:843 +#: src/amidi-plug/i_configure-fluidsynth.c:849 +msgid "" +"* Synthesizer reverb *\n" +"From FluidSynth docs: when set to \"yes\" the reverb effects module is activated; note that when the reverb module is active, the amount of signal sent to the reverb module depends on the \"reverb send\" generator defined in the SoundFont." +msgstr "" +"* Réverbération du synthétiseur *\n" +"Selon la documentation de 'FluidSynth', lorsque l'option \"Oui\" est cochée, le module d'effet de réverbération est activé. Veuillez noter que, lorsque le module de réverbération est actif, la quantité de signaux envoyés au module dépend du générateur d'\"envoi de réverbération\" défini dans le fichier 'SoundFont'." + +#: src/amidi-plug/i_configure-fluidsynth.c:855 +#: src/amidi-plug/i_configure-fluidsynth.c:861 +msgid "" +"* Synthesizer chorus *\n" +"From FluidSynth docs: when set to \"yes\" the chorus effects module is activated; note that when the chorus module is active, the amount of signal sent to the chorus module depends on the \"chorus send\" generator defined in the SoundFont." +msgstr "" +"* Effet de choeur du synthétiseur *\n" +"Selon la documentation de 'FluidSynth', lorsque l'option \"Oui\" est cochée, le module d'effet de choeur est activé. Veuillez noter que, lorsque le module d'effet de choeur est actif, la quantité de signaux envoyés au module dépend du générateur d'\"envoi d'effet de choeur\" défini dans le fichier 'SoundFont'." + +#: src/amidi-plug/i_configure-fluidsynth.c:867 +#: src/amidi-plug/i_configure-fluidsynth.c:873 +#: src/amidi-plug/i_configure-fluidsynth.c:879 +#: src/amidi-plug/i_configure-fluidsynth.c:885 +msgid "" +"* Synthesizer samplerate *\n" +"The sample rate of the audio generated by the synthesizer. You can also specify a custom value in the interval 22050Hz-96000Hz.\n" +"NOTE: the default buffer parameters are tuned for 44100Hz; changing the sample rate may require buffer params tuning to obtain good sound quality." +msgstr "" +"* Taux d'échantillonnage du synthétiseur *\n" +"Cette option définit le taux d'échantillonnage du flux audio produit par le synthétiseur. Vous pouvez aussi spécifier une valeur personnalisée, située dans l'intervalle 22050 - 96000 Hz.\n" +"Veuillez noter que les paramètres du tampon par défaut sont optimisées pour 44100 Hz : modifier le taux d'échantillonnage peut nécessiter un réglage des paramètres du tampon, afin d'obtenir une bonne qualité audio." + +#: src/amidi-plug/i_configure-fluidsynth.c:891 +msgid "" +"* FluidSynth backend buffer *\n" +"This button resets the backend buffer parameters to default values." +msgstr "" +"* Tampon du système de sortie 'FluidSynth' *\n" +"Ce bouton réinitialise les paramètres du tampon aux valeurs par défaut." + +#: src/amidi-plug/i_configure-fluidsynth.c:894 +msgid "" +"* FluidSynth backend buffer *\n" +"If you notice skips or slowness during song playback and your system is not performing any cpu-intensive task (except FluidSynth itself), you may want to adjust the buffer parameters. Try to move the \"handy buffer tuner\" some steps to the right until playback is fluid again." +msgstr "" +"* Tampon du système de sortie 'FluidSynth' *\n" +"Si vous constatez des coupures ou des ralentissements lors de la lecture, alors que votre système n'exécute pas de tâche qui pourrait utiliser les ressources du processeur de manière intensive (hormis 'FluidSynth'), vous pouvez ajuster les paramètres du tampon. Essayez de déplacer l' \"ajusteur de tampon pratique\" vers la droite, de manière progressive, jusqu'à ce que la lecture soit à nouveau fluide." + +#: src/amidi-plug/i_configure-fluidsynth.c:900 +#: src/amidi-plug/i_configure-fluidsynth.c:911 +#: src/amidi-plug/i_configure-fluidsynth.c:922 +msgid "" +"* FluidSynth backend buffer *\n" +"It is a good idea to make buffer adjustments with the \"handy buffer tuner\" before resorting to manual editing of buffer parameters.\n" +"However, if you want to fine-tune something and want to know what you're doing, you can understand how these parameters work by reading the backend code (b-fluidsynth.c). In short words, every amount of time (proportional to buffer_SIZE and sample rate), right before gathering samples, the buffer is resized as follows:\n" +"buffer_SIZE + buffer_MARGIN + extramargin\n" +"where extramargin is a value computed as number_of_seconds_of_playback / margin_INCREMENT ." +msgstr "" +"* Tampon du système de sortie 'FluidSynth' *\n" +"Il est judicieux de procéder à des réglages avec l'\"ajusteur de tampon pratique\" avant de procéder à l'édition manuelle des paramètres du tampon.\n" +"Toutefois, si vous désirez obtenir des réglages plus précis et savoir ce que vous faites, vous pouvez comprendre comment fonctionnent ces paramètres en consultant le code du système de sortie ('b-fluidsynth.c'). En résumé, à chaque unité de temps, directement avant l'assemblage des échantillons, la taille du tampon est redéfinie de cette manière :\n" +"buffer_SIZE (taille du tampon) + buffer_MARGIN (marge du tampon) + marge supplémentaire\n" +"(la marge supplémentaire est la valeur calculée suivant l'opération suivante : nombre de secondes de lecture / différentiel de la marge" + +#: src/amidi-plug/i_configure-fluidsynth.c:937 +msgid "FluidSynth Backend not loaded or not available" +msgstr "Le système de sortie 'FluidSynth' n'est pas chargé ou n'est pas disponible" + +#: src/amidi-plug/i_configure-fluidsynth.c:956 +msgid "" +"FluidSynth\n" +"backend" +msgstr "" +"Sortie\n" +"'FluidSynth'" + +#: src/amidi-plug/i_configure-timidity.c:39 +msgid "TIMIDITY BACKEND CONFIGURATION" +msgstr "CONFIGURATION DU SYSTÈME DE SORTIE 'TIMIDITY'" + +#: src/amidi-plug/i_configure-timidity.c:64 +msgid "TiMidity Backend not loaded or not available" +msgstr "Le système de sortie 'TiMidity' n'est pas chargé ou n'est pas disponible" + +#: src/amidi-plug/i_configure-timidity.c:83 +msgid "" +"TiMidity\n" +"backend" +msgstr "" +"Sortie\n" +"'TiMidity'" + +#: src/amidi-plug/i_fileinfo.c:169 +#: src/sid/xmms-sid.glade:3315 +#: src/sid/xs_interface.c:1615 +#: src/vorbis/fileinfo.c:562 +msgid "Name:" +msgstr "Nom :" + +#: src/amidi-plug/i_fileinfo.c:193 +msgid " MIDI Info " +msgstr " Informations sur le fichier MIDI " + +#: src/amidi-plug/i_fileinfo.c:205 +msgid "Format:" +msgstr "Format :" + +#: src/amidi-plug/i_fileinfo.c:208 +msgid "Length (msec):" +msgstr "Durée (msec) :" + +#: src/amidi-plug/i_fileinfo.c:211 +msgid "Num of Tracks:" +msgstr "Nombre de pistes :" + +#: src/amidi-plug/i_fileinfo.c:216 +msgid "variable" +msgstr "variable" + +#: src/amidi-plug/i_fileinfo.c:217 +msgid "BPM:" +msgstr "BPM :" + +#: src/amidi-plug/i_fileinfo.c:223 +msgid "BPM (wavg):" +msgstr "BPM (wavg) :" + +#: src/amidi-plug/i_fileinfo.c:226 +msgid "Time Div:" +msgstr "Division du temps :" + +#: src/amidi-plug/i_fileinfo.c:237 +msgid " MIDI Comments and Lyrics " +msgstr " Commentaires et paroles du fichier MIDI " + +#: src/amidi-plug/i_fileinfo.c:288 +msgid "* no comments available in this MIDI file *" +msgstr "* aucun commentaire n'est disponible dans ce fichier MIDI *" + +#: src/amidi-plug/i_fileinfo.c:301 +msgid "* no lyrics available in this MIDI file *" +msgstr "* aucune parole ne sont pas disponible dans ce fichier MIDI" + +#: src/amidi-plug/i_fileinfo.c:349 +msgid " (invalid UTF-8)" +msgstr " (format UTF-8 invalide)" + +#: src/amidi-plug/i_utils.c:43 +msgid "AMIDI-Plug - about" +msgstr "À propos de 'AMIDI-Plug'" + +#: src/amidi-plug/i_utils.c:68 +msgid "" +"\n" +"AMIDI-Plug " +msgstr "" +"\n" +"'AMIDI-Plug' " + +#: src/amidi-plug/i_utils.c:69 +msgid "" +"\n" +"modular MIDI music player\n" +"http://www.develia.org/projects.php?p=amidiplug\n" +"\n" +"written by Giacomo Lozito\n" +"< james@develia.org >\n" +"\n" +"\n" +"special thanks to...\n" +"\n" +"Clemens Ladisch and Jaroslav Kysela\n" +"for their cool programs aplaymidi and amixer; those\n" +"were really useful, along with alsa-lib docs, in order\n" +"to learn more about the ALSA API\n" +"\n" +"Alfredo Spadafina\n" +"for the nice midi keyboard logo\n" +"\n" +"Tony Vroon\n" +"for the good help with alpha testing\n" +"\n" +msgstr "" +"\n" +"\n" +"Lecteur de musique 'MIDI' modulaire\n" +"\n" +"http://www.develia.org/projects.php?p=amidiplug\n" +"\n" +"Auteur : Giacomo Lozito < james@develia.org >\n" +"\n" +"\n" +"Remerciements particuliers à...\n" +"\n" +"Clemens Ladisch et Jaroslav Kysela\n" +"pour leurs excellents outils 'aplaymidi' et 'amixer' :\n" +"ils étaient très utiles (en plus de la documentation\n" +"relative à la librairie 'ALSA') pour apprendre\n" +"l'interface de programmation 'ALSA'.\n" +"\n" +"Alfredo Spadafina\n" +"pour le beau logo (clavier MIDI).\n" +"\n" +"Tony Vroon\n" +"pour son aide précieuse, lors de la phase alpha.\n" +"\n" + +#: src/aosd/aosd_style.c:75 +msgid "Rectangle" +msgstr "Rectangle" + +#: src/aosd/aosd_style.c:79 +msgid "Rounded Rectangle" +msgstr "Rectangle arrondi" + +#: src/aosd/aosd_style.c:83 +msgid "Concave Rectangle" +msgstr "Rectangle concave" + +#: src/aosd/aosd_style.c:87 +msgid "None" +msgstr "Aucun" + +#: src/aosd/aosd_trigger.c:73 +msgid "Playback Start" +msgstr "Début de la lecture" + +#: src/aosd/aosd_trigger.c:74 +msgid "Triggers OSD when a playlist entry is played." +msgstr "Déclenche la fonction 'OSD' lorsqu'une entrée de la liste de lecture est lue." + +#: src/aosd/aosd_trigger.c:78 +msgid "Title Change" +msgstr "Changement de titre" + +#: src/aosd/aosd_trigger.c:79 +msgid "Triggers OSD when, during playback, the song title changes but the filename is the same. This is mostly useful to display title changes in internet streams." +msgstr "Déclenche la fonction 'OSD' si, pendant la lecture, le titre du morceau change, alors que le nom du fichier est identique. Cette option est particulièrement utile pour afficher le changement de titre des flux Internet." + +#: src/aosd/aosd_trigger.c:85 +msgid "Volume Change" +msgstr "Changement de volume" + +#: src/aosd/aosd_trigger.c:86 +msgid "Triggers OSD when volume is changed." +msgstr "Déclenche la fonction 'OSD' en cas de changement de volume." + +#: src/aosd/aosd_trigger.c:90 +msgid "Pause On" +msgstr "Mode 'pause' activé" + +#: src/aosd/aosd_trigger.c:91 +msgid "Triggers OSD when playback is paused." +msgstr "Déclenche la fonction 'OSD' lorsque la lecture est en mode 'pause'." + +#: src/aosd/aosd_trigger.c:95 +msgid "Pause Off" +msgstr "Mode 'pause' désactivé" + +#: src/aosd/aosd_trigger.c:96 +msgid "Triggers OSD when playback is unpaused." +msgstr "Déclenche la fonction 'OSD' lorsque la lecture n'est plus en mode 'pause'." + +#: src/aosd/aosd_ui.c:168 +msgid "Placement" +msgstr "Position" + +#: src/aosd/aosd_ui.c:202 +msgid "Relative X offset:" +msgstr "Décalage horizontal :" + +#: src/aosd/aosd_ui.c:211 +msgid "Relative Y offset:" +msgstr "Décalage vertical :" + +#: src/aosd/aosd_ui.c:220 +msgid "Max OSD width:" +msgstr "Largeur maximale :" + +#: src/aosd/aosd_ui.c:233 +msgid "Multi-Monitor options" +msgstr "Options de l'affichage multiple" + +#: src/aosd/aosd_ui.c:237 +msgid "Display OSD using:" +msgstr "Afficher OSD sur :" + +#: src/aosd/aosd_ui.c:239 +msgid "all monitors" +msgstr "tous les moniteurs" + +#: src/aosd/aosd_ui.c:242 +#, c-format +msgid "monitor %i" +msgstr "moniteur %i" + +#: src/aosd/aosd_ui.c:295 +msgid "Timing (ms)" +msgstr "Durée (ms)" + +#: src/aosd/aosd_ui.c:300 +msgid "Display:" +msgstr "Affichage :" + +#: src/aosd/aosd_ui.c:305 +msgid "Fade in:" +msgstr "Fondu d'entrée :" + +#: src/aosd/aosd_ui.c:310 +msgid "Fade out:" +msgstr "Fondu de sortie :" + +#: src/aosd/aosd_ui.c:391 +msgid "Fonts" +msgstr "Polices" + +#: src/aosd/aosd_ui.c:399 +#, c-format +msgid "Font %i:" +msgstr "Police %i :" + +#: src/aosd/aosd_ui.c:416 +msgid "Shadow" +msgstr "Ombre" + +#: src/aosd/aosd_ui.c:451 +msgid "Internationalization" +msgstr "Internationalisation" + +#: src/aosd/aosd_ui.c:457 +msgid "Disable UTF-8 conversion of text (in aosd)" +msgstr "Désactiver la conversion UTF-8 du texte (dans le module 'aOSD')" + +#: src/aosd/aosd_ui.c:475 +msgid "Select Skin File" +msgstr "Choisir un fichier de thème" + +#: src/aosd/aosd_ui.c:583 +msgid "Render Style" +msgstr "Style du rendu" + +#: src/aosd/aosd_ui.c:599 +msgid "Colors" +msgstr "Couleurs" + +#: src/aosd/aosd_ui.c:612 +#, c-format +msgid "Color %i:" +msgstr "Couleur %i:" + +#: src/aosd/aosd_ui.c:632 +msgid "Custom Skin" +msgstr "Thème personnalisé" + +#: src/aosd/aosd_ui.c:638 +msgid "Skin file:" +msgstr "Fichier du thème" + +#: src/aosd/aosd_ui.c:641 +#: src/sid/xmms-sid.glade:2331 +#: src/sid/xmms-sid.glade:2706 +#: src/sid/xmms-sid.glade:2812 +#: src/sid/xs_interface.c:1002 +#: src/sid/xs_interface.c:1124 +#: src/sid/xs_interface.c:1160 +msgid "Browse" +msgstr "Parcourir" + +#: src/aosd/aosd_ui.c:743 +msgid "Enable trigger" +msgstr "Activer le déclencheur" + +#: src/aosd/aosd_ui.c:770 +msgid "Event" +msgstr "Événement" + +#: src/aosd/aosd_ui.c:798 +msgid "Composite manager detected" +msgstr "Gestionnaire composite détecté" + +#: src/aosd/aosd_ui.c:805 +msgid "" +"Composite manager not detected;\n" +"unless you know that you have one running, please activate a composite manager otherwise the OSD won't work properly" +msgstr "" +"Aucun gestionnaire composite n'a été détecté. À moins que vous ne soyez certain d'utiliser un tel gestionnaire,\n" +"veuillez activer un gestionnaire composite approprié. Sinon, l'affichage 'OSD' ne fonctionnera pas correctement." + +#: src/aosd/aosd_ui.c:813 +msgid "Composite manager not required for fake transparency" +msgstr "La fausse transparence ne nécessite pas de gestionnaire composite." + +#: src/aosd/aosd_ui.c:851 +msgid "Transparency" +msgstr "Transparence" + +#: src/aosd/aosd_ui.c:857 +msgid "Fake transparency" +msgstr "Fausse transparence" + +#: src/aosd/aosd_ui.c:859 +msgid "Real transparency (requires X Composite Ext.)" +msgstr "Véritable transparence (nécessite l'extension 'composite' de X)" + +#: src/aosd/aosd_ui.c:901 +msgid "Composite extension not loaded" +msgstr "L'extension 'composite' n'est pas chargée" + +#: src/aosd/aosd_ui.c:909 +msgid "Composite extension not available" +msgstr "L'extension 'composite' n'est pas disponible" + +#: src/aosd/aosd_ui.c:931 +#, c-format +msgid "Audacious OSD" +msgstr "Audacious OSD" + +#: src/aosd/aosd_ui.c:1012 +msgid "Audacious OSD - configuration" +msgstr "Configuration de 'Audacious OSD'" + +#: src/aosd/aosd_ui.c:1033 +msgid "Test" +msgstr "Essai" + +#: src/aosd/aosd_ui.c:1048 +msgid "Position" +msgstr "Arrangement" + +#: src/aosd/aosd_ui.c:1053 +msgid "Animation" +msgstr "Animation" + +#: src/aosd/aosd_ui.c:1058 +msgid "Text" +msgstr "Texte" + +#: src/aosd/aosd_ui.c:1063 +msgid "Decoration" +msgstr "Décoration" + +#: src/aosd/aosd_ui.c:1068 +msgid "Trigger" +msgstr "Déclenchement" + +#: src/aosd/aosd_ui.c:1073 +#: src/cdaudio-ng/configure.c:87 +#: src/sid/xmms-sid.glade:2876 +#: src/sid/xs_interface.c:1171 +msgid "Misc" +msgstr "Divers" + +#: src/aosd/aosd_ui.c:1110 +msgid "Audacious OSD - about" +msgstr "À propos de 'OSD' pour Audacious" + +#: src/aosd/aosd_ui.c:1140 +msgid "" +"\n" +"Audacious OSD " +msgstr "" +"\n" +"'OSD' pour Audacious " + +#: src/aosd/aosd_ui.c:1141 +msgid "" +"\n" +"http://www.develia.org/projects.php?p=audacious#aosd\n" +"written by Giacomo Lozito\n" +"< james@develia.org >\n" +"\n" +"On-Screen-Display is based on Ghosd library\n" +"written by Evan Martin\n" +"http://neugierig.org/software/ghosd/\n" +"\n" +msgstr "" +"\n" +"http://www.develia.org/projects.php?p=audacious#aosd\n" +"\n" +"Écrit par Giacomo Lozito < james@develia.org >\n" +"\n" +"'On-Screen-Display' est basé sur la librairie 'Ghosd' de Evan Martin\n" +"http://neugierig.org/software/ghosd/\n" +"\n" + +#: src/arts/arts.c:22 +msgid "About aRts Output" +msgstr "À propos du pilote 'aRts'" + +#: src/arts/arts.c:23 +msgid "" +"aRts output plugin by Håvard Kvålen \n" +"Audacious port by Giacomo Lozito from develia.org" +msgstr "" +"Le module de sortie 'aRts' a été écrit par\n" +"\n" +"Håvard Kvålen \n" +"\n" +"\n" +"Le rétroportage pour Audacious a été effectué par\n" +"\n" +"Giacomo Lozito, de 'develia.org'" + +#: src/arts/configure.c:50 +msgid "aRts Driver configuration" +msgstr "Configuration du pilote 'aRts'" + +#: src/arts/configure.c:61 +#: src/esd/configure.c:171 +#: src/OSS4/configure.c:232 +#: src/OSS/configure.c:305 +#: src/sun/configure.c:259 +msgid "Buffering:" +msgstr "Tampon" + +#: src/arts/configure.c:73 +#: src/esd/configure.c:184 +#: src/OSS4/configure.c:245 +#: src/OSS/configure.c:318 +#: src/sun/configure.c:272 +msgid "Buffer size (ms):" +msgstr "Taille du tampon (ms) :" + +#: src/arts/configure.c:83 +#: src/esd/configure.c:209 +#: src/OSS4/configure.c:270 +#: src/OSS/configure.c:343 +#: src/sun/configure.c:304 +msgid "Buffering" +msgstr "Tampon" + +#: src/audiocompress/audacious-glue.c:99 +msgid "AudioCompress " +msgstr "AudioCompress " + +#: src/audiocompress/audacious-glue.c:100 +msgid "" +"\n" +"(c)2003 trikuare studios(http://trikuare.cx)\n" +"Ported to Audacious by Tony Vroon (chainsaw@gentoo.org)\n" +"\n" +"Simple dynamic range compressor for transparently\n" +"keeping the volume level more or less consistent" +msgstr "" +"\n" +"\n" +"Droits d'utilisation (c) 2003, Trikuare Studios (http://trikuare.cx)\n" +"Rétroporté pour Audacious par Tony Vroon (chainsaw@gentoo.org)\n" +"\n" +"'AudioCompress' est un compresseur dynamique simple conçu\n" +"pour maintenir, de manière transparente, le volume à un niveau\n" +"plus ou moins uniforme." + +#: src/audiocompress/audacious-glue.c:105 +msgid "About AudioCompress" +msgstr "À propos de 'AudioCompress'" + +#: src/audiocompress/audacious-glue.c:324 +msgid "If checked, when the sound peaks the volume will be cut instantly; otherwise, it will ramp down just in time for the peak (but some minor clipping may still occur)." +msgstr "Si cette option est activée, en cas de pic sonore, le volume sera immédiatement coupé ; sinon, il diminuera juste à temps, de manière à éviter le pic (malgré tout, une saturation faible peut survenir)." + +#: src/audiocompress/audacious-glue.c:328 +msgid "The maximum amount to amplify the audio by" +msgstr "Détermine l'amplification maximale à appliquer au flux audio." + +#: src/audiocompress/audacious-glue.c:330 +msgid "Defines how smoothly the volume will ramp up" +msgstr "Détermine la vitesse à laquelle le volume sera réduit. Une valeur élevée correspond à une vitesse plus lente." + +#: src/audiocompress/audacious-glue.c:332 +msgid "The target audio level for ramping up. Lowering the value gives a bit more dynamic range for peaks, but will make the overall sound quieter." +msgstr "Détermine le niveau sonore à partir duquel la compression sera appliquée. Des valeurs faibles permettent d'obtenir une variation des pics plus dynamique, mais rendent l'ensemble du flux moins audible." + +#: src/audiocompress/audacious-glue.c:335 +msgid "How long of a window to maintain" +msgstr "Temps de relâchement (ms) :" + +#: src/audiocompress/audacious-glue.c:376 +msgid "AudioCompress preferences" +msgstr "Préférences de 'AudioCompress'" + +#: src/audiocompress/audacious-glue.c:393 +msgid " Quality Options " +msgstr " Qualité " + +#: src/audiocompress/audacious-glue.c:398 +msgid " Aggressively prevent clipping" +msgstr " Prévention agressive de la saturation " + +#: src/audiocompress/audacious-glue.c:410 +msgid " Target & gain" +msgstr " Seuil & Gain" + +#: src/audiocompress/audacious-glue.c:421 +msgid "Target audio level:" +msgstr "Seuil de compression :" + +#: src/audiocompress/audacious-glue.c:429 +msgid "Maximum gain:" +msgstr "Gain maximal :" + +#: src/audiocompress/audacious-glue.c:437 +msgid "Gain smooth:" +msgstr "Vitesse du gain :" + +#: src/audiocompress/audacious-glue.c:489 +msgid " History " +msgstr " Relâchement " + +#: src/audiocompress/audacious-glue.c:521 +msgid "How long of a history to maintain. A higher number will make the volume changes less responsive." +msgstr "Détermine la durée (exprimée en millisecondes) pendant laquelle la compression sera appliquée." + +#: src/audiocompress/audacious-glue.c:532 +msgid "Load default values" +msgstr "Charger les valeurs par défaut" + +#: src/audiocompress/audacious-glue.c:537 +msgid "Audio values" +msgstr "Paramètres audio" + +#: src/audiocompress/audacious-glue.c:566 +#: src/echo_plugin/gui.c:153 +#: src/modplug/gui/interface.cxx:733 +#: src/stereo_plugin/stereo.c:135 +msgid "Apply" +msgstr "Appliquer" + +#: src/blur_scope/blur_scope.c:57 +msgid "/Toggle Decorations" +msgstr "/Montrer les décorations" + +#: src/blur_scope/blur_scope.c:59 +msgid "/-" +msgstr "/-" + +#: src/blur_scope/blur_scope.c:60 +msgid "/Close" +msgstr "/Fermer" + +#: src/blur_scope/blur_scope.c:190 +msgid "Blur scope" +msgstr "'Blur Scope'" + +#: src/blur_scope/config.c:73 +msgid "Blur Scope: Color selection" +msgstr "'Blur Scope' : sélection de la couleur" + +#: src/blur_scope/config.c:83 +#: src/jack/configure.c:107 +msgid "Options:" +msgstr "Options :" + +#: src/cdaudio-ng/cdaudio-ng.c:141 +msgid "Add CD" +msgstr "Ajouter un CD" + +#: src/cdaudio-ng/cdaudio-ng.c:201 +#, c-format +msgid "" +"Copyright (c) 2007, by Calin Crisan and The Audacious Team.\n" +"\n" +"Many thanks to libcdio developers \n" +"\tand to libcddb developers .\n" +"\n" +"Also thank you Tony Vroon for mentoring & guiding me.\n" +"\n" +"This was a Google Summer of Code 2007 project." +msgstr "" +"Droits d'utilisation : (c) 2007, Calin Crisan et l'Équipe d'Audacious.\n" +"\n" +"Remerciements cordiaux aux développeurs de 'libcdio' \n" +"\tet aux développeurs de 'libcddb' .\n" +"\n" +"Je remercie également Tony Vroon de m'avoir guidé et soutenu.\n" +"\n" +"Ce module était un projet de 'Google Summer of Code 2007'." + +#: src/cdaudio-ng/cdaudio-ng.c:206 +msgid "About CD Audio Plugin NG" +msgstr "À propos du module 'CD Audio NG'" + +#: src/cdaudio-ng/cdaudio-ng.c:801 +msgid "" +"No playable CD found.\n" +"\n" +"No CD inserted, or inserted CD is not an audio CD.\n" +msgstr "" +"Aucune piste audio n'a été détectée.\n" +"\n" +"Le lecteur ne comporte pas de CD ou le support inséré n'est pas un CD audio.\n" + +#: src/cdaudio-ng/configure.c:67 +msgid "CD Audio Plugin Configuration" +msgstr "Configuration du module 'CD Audio'" + +#: src/cdaudio-ng/configure.c:77 +msgid "Digital audio extraction" +msgstr "Extraction audio digitale" + +#: src/cdaudio-ng/configure.c:82 +msgid "Title information" +msgstr "Informations sur le titre" + +#: src/cdaudio-ng/configure.c:99 +msgid "Limit read speed to: " +msgstr "Limiter la vitesse de lecture à : " + +#: src/cdaudio-ng/configure.c:106 +msgid "Use cd-text if available" +msgstr "Utiliser CD-TEXT, si la fonction est disponible" + +#: src/cdaudio-ng/configure.c:110 +msgid "Use CDDB if available" +msgstr "Utiliser CDDB, si le service est disponible" + +#: src/cdaudio-ng/configure.c:114 +msgid "Server: " +msgstr "Serveur : " + +#: src/cdaudio-ng/configure.c:117 +msgid "Port: " +msgstr "Port : " + +#: src/cdaudio-ng/configure.c:127 +msgid "Override default device: " +msgstr "Remplacer le périphérique par défaut : " + +#: src/cdaudio-ng/configure.c:134 +msgid "Print debug information" +msgstr "Afficher les informations de débogage" + +#: src/console/Audacious_Config.cxx:126 +msgid "Console Music Decoder" +msgstr "Décodeur 'Console Music'" + +#: src/console/Audacious_Config.cxx:163 +msgid "Bass:" +msgstr "Basses :" + +#: src/console/Audacious_Config.cxx:167 +#: src/console/Audacious_Config.cxx:178 +#: src/console/Audacious_Config.cxx:199 +msgid "secs" +msgstr "secondes" + +#: src/console/Audacious_Config.cxx:174 +msgid "Treble:" +msgstr "Aiguës :" + +#: src/console/Audacious_Config.cxx:195 +msgid "Default song length:" +msgstr "Durée par défaut :" + +#: src/console/Audacious_Config.cxx:201 +#: src/modplug/gui/interface.cxx:264 +#: src/sid/xmms-sid.glade:1243 +#: src/sid/xs_interface.c:645 +msgid "Resampling" +msgstr "Rééchantillonnage" + +#: src/console/Audacious_Config.cxx:207 +msgid "Enable audio resampling" +msgstr "Activer le rééchantillonnage" + +#: src/console/Audacious_Config.cxx:222 +msgid "Resampling rate:" +msgstr "Taux de rééchantillonnage" + +#: src/console/Audacious_Config.cxx:237 +msgid "SPC" +msgstr "SPC" + +#: src/console/Audacious_Config.cxx:238 +msgid "Ignore length from SPC tags" +msgstr "Ignorer la durée des métadonnées SPC" + +#: src/console/Audacious_Config.cxx:239 +msgid "Increase reverb" +msgstr "Augmenter la réverbération" + +#: src/console/Audacious_Config.cxx:264 +msgid "The default song length, expressed in seconds, is used for songs that do not provide length information (i.e. looping tracks)." +msgstr "" +"* Durée par défaut *\n" +"La durée par défaut, exprimée en secondes, est utilisée pour les morceaux qui ne disposent pas d'informations quant à leur durée (les pistes en boucle, par exemple)." + +#: src/console/Audacious_Driver.cxx:495 +msgid "About the Console Music Decoder" +msgstr "À propos de 'Console Music Decoder'" + +#: src/console/Audacious_Driver.cxx:496 +msgid "" +"Console music decoder engine based on Game_Music_Emu 0.5.2.\n" +"Supported formats: AY, GBS, GYM, HES, KSS, NSF, NSFE, SAP, SPC, VGM, VGZ\n" +"Audacious implementation by: William Pitcock , \n" +" Shay Green " +msgstr "" +"Le moteur de 'Console Music Decoder' est basé sur 'Game_Music_Emu' 0.5.2.\n" +"\n" +"Formats supportés : AY, GBS, GYM, HES, KSS, NSF, NSFE, SAP, SPC, VGM, VGZ\n" +"\n" +"Support pour Audacious par :\n" +"\n" +"William Pitcock \n" +"Shay Green " + +#: src/echo_plugin/gui.c:12 +msgid "" +"Echo Plugin\n" +"By Johan Levin 1999.\n" +"\n" +"Surround echo by Carl van Schaik 1999" +msgstr "" +"Module 'Écho'\n" +"\n" +"Écrit par Johan Levin (1999).\n" +"\n" +"'Surround echo' est écrit par Carl van Schaik (1999)" + +#: src/echo_plugin/gui.c:26 +msgid "About Echo Plugin" +msgstr "À propos du module 'Écho'" + +#: src/echo_plugin/gui.c:77 +msgid "Configure Echo" +msgstr "Configuration de 'Écho'" + +#: src/echo_plugin/gui.c:90 +msgid "Delay: (ms)" +msgstr "Délai : (ms)" + +#: src/echo_plugin/gui.c:95 +msgid "Feedback: (%)" +msgstr "Retour : (%)" + +#: src/echo_plugin/gui.c:100 +msgid "Volume: (%)" +msgstr "Volume : (%)" + +#: src/echo_plugin/gui.c:123 +msgid "Surround echo" +msgstr "Écho d'ambiance" + +#: src/esd/about.c:34 +msgid "About ESounD Plugin" +msgstr "À propos du module 'ESounD'" + +#: src/esd/about.c:35 +msgid "" +"Audacious ESounD Plugin\n" +"\n" +" This program is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,\n" +"USA." +msgstr "" +"Module 'EsounD' pour Audacious\n" +"\n" +"Ce programme est libre, vous pouvez le redistribuer et/ou le modifier\n" +"selon les termes de la Licence Publique Générale GNU publiée par\n" +"la Free Software Foundation (version 2 ou bien toute autre version\n" +"ultérieure choisie par vous).\n" +"\n" +"Ce programme est distribué car potentiellement utile, mais SANS\n" +"AUCUNE GARANTIE, ni explicite ni implicite, y compris les garanties\n" +"de commercialisation ou d'adaptation dans un but spécifique.\n" +"Reportez-vous à la Licence Publique Générale GNU pour plus de détails.\n" +"\n" +"Vous devez avoir reçu une copie de la Licence Publique Générale GNU\n" +"en même temps que ce programme ; si ce n'est pas le cas, écrivez à la\n" +"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +"MA 02110-1301, États-Unis." + +#: src/esd/configure.c:102 +msgid "ESD Output Plugin configuration" +msgstr "Configuration du module de sortie 'ESD'" + +#: src/esd/configure.c:114 +#: src/esd/configure.c:144 +msgid "Host:" +msgstr "Hôte :" + +#: src/esd/configure.c:125 +msgid "Use remote host" +msgstr "Utiliser un hôte distant" + +#: src/esd/configure.c:132 +msgid "Volume controls OSS mixer" +msgstr "Utiliser le contrôle du volume du mélangeur OSS" + +#: src/esd/configure.c:153 +msgid "Port:" +msgstr "Port :" + +#: src/esd/configure.c:169 +msgid "Server" +msgstr "Serveur" + +#: src/esd/configure.c:198 +#: src/OSS4/configure.c:259 +#: src/OSS/configure.c:332 +#: src/sun/configure.c:290 +msgid "Pre-buffer (percent):" +msgstr "Pré-tampon (pourcents) :" + +#: src/evdev-plug/ed.c:59 +msgid "Playback->Play" +msgstr "Lecture -> Lire" + +#: src/evdev-plug/ed.c:60 +msgid "Playback->Stop" +msgstr "Lecture -> Arrêter" + +#: src/evdev-plug/ed.c:61 +msgid "Playback->Pause" +msgstr "Lecture -> Pause" + +#: src/evdev-plug/ed.c:62 +msgid "Playback->Prev" +msgstr "Lecture -> Précédent" + +#: src/evdev-plug/ed.c:63 +msgid "Playback->Next" +msgstr "Lecture -> Suivant" + +#: src/evdev-plug/ed.c:64 +msgid "Playback->Eject" +msgstr "Lecture -> Éjecter" + +#: src/evdev-plug/ed.c:66 +msgid "Playlist->Repeat" +msgstr "Liste de lecture -> Répéter" + +#: src/evdev-plug/ed.c:67 +msgid "Playlist->Shuffle" +msgstr "Liste de lecture -> Aléatoire" + +#: src/evdev-plug/ed.c:69 +msgid "Volume->Up_5" +msgstr "Volume -> Augmenter de 5" + +#: src/evdev-plug/ed.c:70 +msgid "Volume->Down_5" +msgstr "Volume -> Diminuer de 5" + +#: src/evdev-plug/ed.c:71 +msgid "Volume->Up_10" +msgstr "Volume -> Augmenter de 10" + +#: src/evdev-plug/ed.c:72 +msgid "Volume->Down_10" +msgstr "Volume -> Diminuer de 10" + +#: src/evdev-plug/ed.c:73 +msgid "Volume->Mute" +msgstr "Volume -> Couper" + +#: src/evdev-plug/ed.c:75 +msgid "Window->Main" +msgstr "Fenêtre -> Principale" + +#: src/evdev-plug/ed.c:76 +msgid "Window->Playlist" +msgstr "Fenêtre -> Liste de lecture" + +#: src/evdev-plug/ed.c:77 +msgid "Window->Equalizer" +msgstr "Fenêtre -> Égaliseur" + +#: src/evdev-plug/ed.c:78 +msgid "Window->JumpToFile" +msgstr "Fenêtre -> Aller au titre..." + +#: src/evdev-plug/ed_internals.c:93 +#, c-format +msgid "event-device-plugin: unable to open device file %s , skipping this device; check that the file exists and that you have read permission for it\n" +msgstr "Module 'Event-Device' : impossible d'ouvrir le fichier de périphérique %s ; le périphérique sera ignoré...Veuillez vérifier que le fichier existe et que disposez des permissions de lecture requises.\n" + +#: src/evdev-plug/ed_internals.c:102 +#, c-format +msgid "event-device-plugin: unable to create a io_channel for device file %s ,skipping this device\n" +msgstr "Module 'Event-Device' : impossible de créer un canal 'io' pour le fichier de périphérique %s ; le périphérique sera ignoré...\n" + +#: src/evdev-plug/ed_internals.c:339 +msgid "event-device-plugin: unable to open /proc/bus/input/devices , automatic detection of event devices won't work.\n" +msgstr "Module 'Event-Device' : impossible d'ouvrir '/proc/bus/input/devices' ; la détection automatique des périphériques échouera...\n" + +#: src/evdev-plug/ed_internals.c:348 +msgid "event-device-plugin: unable to open a io_channel for /proc/bus/input/devices , automatic detection of event devices won't work.\n" +msgstr "Module 'Event-Device' : impossible de créer un canal 'io' pour '/proc/bus/input/devices' ; la détection automatique des périphériques échouera...\n" + +#: src/evdev-plug/ed_internals.c:358 +msgid "event-device-plugin: an error occurred while reading /proc/bus/input/devices , automatic detection of event devices won't work.\n" +msgstr "Module 'Event-Device' : une erreur s'est produite lors de lecture de '/proc/bus/input/devices' ; la détection automatique des périphériques échouera...\n" + +#: src/evdev-plug/ed_internals.c:421 +#, c-format +msgid "event-device-plugin: device %s not found in /dev/input , skipping.\n" +msgstr "Module 'Event-Device' : le périphérique %s n'a pas été trouvé dans '/dev/input' ; le périphérique sera ignoré...\n" + +#: src/evdev-plug/ed_internals.c:486 +#: src/evdev-plug/ed_internals.c:580 +#, c-format +msgid "event-device-plugin: unable to load config file %s , default settings will be used.\n" +msgstr "Module 'Event-Device' : impossible de charger le fichier de configuration %s ; les paramètres par défaut seront utilisés...\n" + +#: src/evdev-plug/ed_internals.c:532 +#, c-format +msgid "event-device-plugin: incomplete information in config file for device \"%s\" , skipping.\n" +msgstr "Module 'Event-Device' : information incomplète au sujet du périphérique \"%s\" ; le périphérique sera ignoré...\n" + +#: src/evdev-plug/ed_internals.c:601 +#: src/evdev-plug/ed_internals.c:933 +#, c-format +msgid "event-device-plugin: configuration, unable to get is_active value for device \"%s\", skipping it.\n" +msgstr "Module 'Event-Device' : impossible d'obtenir la valeur de 'is_active' dans le fichier de configuration pour le périphérique \"%s\" ; le périphérique sera ignoré...\n" + +#: src/evdev-plug/ed_internals.c:837 +#, c-format +msgid "event-device-plugin: unable to access local directory %s , settings will not be saved.\n" +msgstr "Module 'Event-Device' : impossible d'accéder au dossier local %s ; les paramètres ne seront pas enregistrés...\n" + +#: src/evdev-plug/ed_internals.c:887 +#, c-format +msgid "event-device-plugin: configuration, unable to get filename value for device \"%s\", skipping it.\n" +msgstr "Module 'Event-Device' : impossible d'obtenir, dans le fichier de configuration, le nom du fichier du périphérique \"%s\" ;le périphérique sera ignoré...\n" + +#: src/evdev-plug/ed_internals.c:903 +#, c-format +msgid "event-device-plugin: configuration, unable to get phys value for device \"%s\", skipping it.\n" +msgstr "event-device-plugin : configuration ; impossible d'obtenir la valeur physique du périphérique \"%s\" ; opération ignorée.\n" + +#: src/evdev-plug/ed_internals.c:919 +#, c-format +msgid "event-device-plugin: configuration, unable to get is_custom value for device \"%s\", skipping it.\n" +msgstr "event-device-plugin : configuration ; impossible d'obtenir la valeur \"is_custom\" pour le périphérique \"%s\" ; opération ignorée.\n" + +#: src/evdev-plug/ed_internals.c:943 +#, c-format +msgid "event-device-plugin: configuration, unexpected value for device \"%s\", skipping it.\n" +msgstr "event-device-plugin : configuration ; valeur inattendue pour le périphérique \"%s\" ; opération ignorée.\n" + +#: src/evdev-plug/ed_ui.c:274 +#: src/evdev-plug/ed_ui.c:410 +#: src/evdev-plug/ed_ui.c:872 +msgid "Information" +msgstr "Information" + +#: src/evdev-plug/ed_ui.c:275 +msgid "" +"Cannot open bindings window for a not-detected device.\n" +"Ensure that the device has been correctly plugged in." +msgstr "" +"Il n'est pas possible d'ouvrir la fenêtre des associations pour un périphérique qui n'a pas été détecté.\n" +"Veuillez vous assurer que le périphérique a été correctement branché." + +#: src/evdev-plug/ed_ui.c:318 +#: src/filewriter/filewriter.c:198 +#: src/madplug/plugin.c:620 +msgid "Error" +msgstr "Erreur" + +#: src/evdev-plug/ed_ui.c:319 +msgid "" +"Unable to open selected device.\n" +"Please check read permissions on device file." +msgstr "" +"Impossible d'ouvrir le périphérique sélectionné.\n" +"Veuillez vérifier les permissions de lecture du fichier du périphérique." + +#: src/evdev-plug/ed_ui.c:340 +msgid "EvDev-Plug - Add custom device" +msgstr "Ajouter un périphérique personnalisé" + +#: src/evdev-plug/ed_ui.c:352 +msgid "" +"EvDev-Plug tries to automatically detect and update information about\n" +"event devices available on the system.\n" +"However, if auto-detect doesn't work for your system, or you have event\n" +"devices in a non-standard location (currently they're only searched in\n" +"/dev/input/ ), you may want to add a custom device, explicitly specifying\n" +"name and device file." +msgstr "" +"'EvDev-Plug' essaye de détecter et de mettre à jour automatiquement\n" +"les informations concernant les périphériques disponibles sur le système.\n" +"Toutefois, si la détection automatique ne fonctionne pas pour votre\n" +"système, ou si les périphériques ne sont pas installés dans un emplacement\n" +"standard, vous pouvez ajouter un périphérique personnalisé, en spécifiant\n" +"de manière précise le nom et le fichier du périphérique." + +#: src/evdev-plug/ed_ui.c:360 +msgid "Device name:" +msgstr "Nom du périphérique :" + +#: src/evdev-plug/ed_ui.c:364 +msgid "Device file:" +msgstr "Fichier du périphérique :" + +#: src/evdev-plug/ed_ui.c:411 +msgid "" +"Please specify both name and filename.\n" +"Filename must be specified with absolute path." +msgstr "" +"Veuillez spécifier à la fois le nom du périphérique et le nom du fichier.\n" +"Le nom du fichier doit être déterminé par le chemin absolu." + +#: src/evdev-plug/ed_ui.c:446 +msgid "Do you want to remove the existing configuration for selected device?\n" +msgstr "Voulez-vous supprimer la configuration du périphérique sélectionné ?\n" + +#: src/evdev-plug/ed_ui.c:465 +msgid "Do you want to remove the selected custom device?\n" +msgstr "Voulez-vous supprimer le périphérique personnalisé sélectionné ?\n" + +#: src/evdev-plug/ed_ui.c:612 +msgid "EvDev-Plug - Configuration" +msgstr "Configuration de 'EvDev-Plug'" + +#: src/evdev-plug/ed_ui.c:651 +msgid "Active" +msgstr "Actif" + +#: src/evdev-plug/ed_ui.c:655 +#: src/sun/configure.c:488 +msgid "Status" +msgstr "Statut" + +#: src/evdev-plug/ed_ui.c:664 +msgid "Device Name" +msgstr "Nom du périphérique" + +#: src/evdev-plug/ed_ui.c:668 +msgid "Device File" +msgstr "Fichier du périphérique" + +#: src/evdev-plug/ed_ui.c:672 +msgid "Device Address" +msgstr "Adresse du périphérique" + +#: src/evdev-plug/ed_ui.c:689 +msgid "_Bindings" +msgstr "_Associations" + +#: src/evdev-plug/ed_ui.c:836 +msgid "" +"Press a key of your device to bind it;\n" +"if no key is pressed in five seconds, this window\n" +"will close without binding changes." +msgstr "" +"Appuyez sur une touche de votre périphérique pour l'associer.\n" +"Si aucune touche n'a été pressée avant cinq secondes, cette\n" +"fenêtre se fermera et aucun changement ne sera effectué." + +#: src/evdev-plug/ed_ui.c:873 +msgid "" +"This input event has been already assigned.\n" +"\n" +"It's not possible to assign multiple actions to the same input event (although it's possible to assign the same action to multiple events)." +msgstr "" +"Cet événement a déjà été assigné.\n" +"\n" +"Il n'est pas possible d'associer des plusieurs actions au même événement (cepndant, il est possible d'attribuer la même action à plusieurs événements)." + +#: src/evdev-plug/ed_ui.c:1322 +msgid "EvDev-Plug - Bindings Configuration" +msgstr "Configuration des associations" + +#: src/evdev-plug/ed_ui.c:1362 +msgid "Name: " +msgstr "Nom : " + +#: src/evdev-plug/ed_ui.c:1371 +msgid "Filename: " +msgstr "Nom du fichier : " + +#: src/evdev-plug/ed_ui.c:1380 +msgid "Phys.Address: " +msgstr "Adresse physique : " + +#: src/evdev-plug/ed_ui.c:1459 +msgid "EvDev-Plug - about" +msgstr "À propos de 'EvDev-Plug'" + +#: src/evdev-plug/ed_ui.c:1490 +msgid "" +"\n" +"player remote control via event devices\n" +"http://www.develia.org/projects.php?p=audacious#evdevplug\n" +"\n" +"written by Giacomo Lozito\n" +msgstr "" +"\n" +"\n" +"Cette extension permet de contrôler le lecteur à distance,\n" +"par l'intermédiaire des événements des périphériques.\n" +"\n" +"http://www.develia.org/projects.php?p=evdevplug\n" +"\n" +"Écrit par Giacomo Lozito < james@develia.org >\n" +"\n" + +#: src/filewriter/filewriter.c:169 +msgid "About FileWriter-Plugin" +msgstr "À propos du module 'FileWriter'" + +#: src/filewriter/filewriter.c:170 +msgid "" +"FileWriter-Plugin\n" +"\n" +"This program is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" +"USA." +msgstr "" +"Module 'FileWriter'\n" +"\n" +"Ce programme est libre, vous pouvez le redistribuer et/ou le modifier\n" +"selon les termes de la Licence Publique Générale GNU publiée par\n" +"la Free Software Foundation (version 2 ou bien toute autre version\n" +"ultérieure choisie par vous).\n" +"\n" +"Ce programme est distribué car potentiellement utile, mais SANS\n" +"AUCUNE GARANTIE, ni explicite ni implicite, y compris les garanties\n" +"de commercialisation ou d'adaptation dans un but spécifique.\n" +"Reportez-vous à la Licence Publique Générale GNU pour plus de détails.\n" +"\n" +"Vous devez avoir reçu une copie de la Licence Publique Générale GNU\n" +"en même temps que ce programme ; si ce n'est pas le cas, écrivez à la\n" +"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +"MA 02110-1301, États-Unis." + +#: src/filewriter/filewriter.c:199 +msgid "" +"You cannot use the FileWriter plugin\n" +"when you're running in realtime mode." +msgstr "" +"Vous ne pouvez pas utiliser le module 'FileWriter'\n" +"lorsque vous êtes en mode d'exécution 'temps réel'." + +#: src/filewriter/filewriter.c:514 +msgid "File Writer Configuration" +msgstr "Configuration de 'File Writer'" + +#: src/filewriter/filewriter.c:526 +msgid "Output file format:" +msgstr "Format du fichier de sortie :" + +#: src/filewriter/filewriter.c:544 +#: src/ladspa/ladspa.c:962 +msgid "Configure" +msgstr "Configurer" + +#: src/filewriter/filewriter.c:559 +msgid "Save into original directory" +msgstr "Enregistrer dans le répertoire d'origine" + +#: src/filewriter/filewriter.c:564 +msgid "Save into custom directory" +msgstr "Enregistrer dans un répertoire personnel" + +#: src/filewriter/filewriter.c:576 +msgid "Output file folder:" +msgstr "Dossier de destination :" + +#: src/filewriter/filewriter.c:580 +msgid "Pick a folder" +msgstr "Choix d'un répertoire" + +#: src/filewriter/filewriter.c:600 +msgid "Get filename from:" +msgstr "Déterminer le nom du fichier à partir :" + +#: src/filewriter/filewriter.c:603 +msgid "original file tags" +msgstr "des métadonnées du fichier d'origine" + +#: src/filewriter/filewriter.c:609 +msgid "original filename" +msgstr "du nom du fichier d'origine" + +#: src/filewriter/filewriter.c:619 +msgid "Don't strip file name extension" +msgstr "Conserver l'extension du nom de fichier" + +#: src/filewriter/filewriter.c:623 +msgid "If enabled, the extension from the original filename will not be stripped before adding the new file extension to the end." +msgstr "Si cette option est activée, l'extension du nom du fichier source ne sera pas supprimée avant l'ajout de la nouvelle extension." + +#: src/filewriter/filewriter.c:637 +msgid "Prepend track number to filename" +msgstr "Ajouter le numéro de la piste au début du nom du fichier" + +#: src/filewriter/mp3.c:675 +msgid "MP3 Configuration" +msgstr "Configuration de l'encodeur MP3" + +#: src/filewriter/mp3.c:702 +msgid "Algorithm Quality:" +msgstr "Qualité de l'algorithme :" + +#: src/filewriter/mp3.c:724 +msgid "" +"best/slowest:0;\n" +"worst/fastest:9;\n" +"recommended:2;\n" +"default:5;" +msgstr "" +"meilleur / le plus lent : 0\n" +"pire / le plus rapide : 9\n" +"recommandé : 2\n" +"défaut : 5" + +#: src/filewriter/mp3.c:732 +msgid "Output Samplerate:" +msgstr "Taux d'échantillonnage de sortie :" + +#: src/filewriter/mp3.c:743 +#: src/filewriter/mp3.c:884 +msgid "Auto" +msgstr "Auto" + +#: src/filewriter/mp3.c:765 +msgid "(Hz)" +msgstr "(Hz)" + +#: src/filewriter/mp3.c:777 +msgid "Bitrate / Compression ratio:" +msgstr "Débit / Taux de compression :" + +#: src/filewriter/mp3.c:803 +msgid "Bitrate (kbps):" +msgstr "Débit (kbps)" + +#: src/filewriter/mp3.c:844 +msgid "Compression ratio:" +msgstr "Taux de compression :" + +#: src/filewriter/mp3.c:874 +msgid "Audio Mode:" +msgstr "Mode audio :" + +#: src/filewriter/mp3.c:889 +msgid "Joint-Stereo" +msgstr "Stéréo jointe" + +#: src/filewriter/mp3.c:930 +msgid "auto-M/S mode" +msgstr "Mode mono/stéréo automatique" + +#: src/filewriter/mp3.c:942 +msgid "Misc:" +msgstr "Divers :" + +#: src/filewriter/mp3.c:953 +msgid "Enforce strict ISO complience" +msgstr "Forcer le respect strict des normes ISO" + +#: src/filewriter/mp3.c:964 +msgid "Error protection" +msgstr "Protection contre les erreurs" + +#: src/filewriter/mp3.c:976 +msgid "Adds 16 bit checksum to every frame" +msgstr "Ajoute à chaque trame une somme de contrôle sur 16 bits" + +#: src/filewriter/mp3.c:981 +#: src/filewriter/vorbis.c:271 +#: src/modplug/gui/interface.cxx:310 +msgid "Quality" +msgstr "Qualité" + +#: src/filewriter/mp3.c:993 +msgid "Enable VBR/ABR" +msgstr "Activer VBR/ABR" + +#: src/filewriter/mp3.c:1005 +msgid "Type:" +msgstr "Type :" + +#: src/filewriter/mp3.c:1016 +msgid "Variable bitrate" +msgstr "Débit variable" + +#: src/filewriter/mp3.c:1028 +msgid "Average bitrate" +msgstr "Débit moyen" + +#: src/filewriter/mp3.c:1042 +msgid "VBR Options:" +msgstr "Options VBR :" + +#: src/filewriter/mp3.c:1058 +msgid "Minimum bitrate (kbps):" +msgstr "Débit minimal (kbps) :" + +#: src/filewriter/mp3.c:1094 +msgid "Maximum bitrate (kbps):" +msgstr "Débit maximal (kbps) :" + +#: src/filewriter/mp3.c:1126 +msgid "Strictly enforce minimum bitrate" +msgstr "Forcer de manière stricte le débit minimal" + +#: src/filewriter/mp3.c:1128 +msgid "For use with players that do not support low bitrate mp3 (Apex AD600-A DVD/mp3 player)" +msgstr "Cette option est destinée aux lecteurs qui ne supportent pas les fichiers mp3 dont le débit est bas (le lecteur DVD/mp3 'Apex AD600-A', notamment)" + +#: src/filewriter/mp3.c:1141 +msgid "ABR Options:" +msgstr "Options ABR :" + +#: src/filewriter/mp3.c:1151 +msgid "Average bitrate (kbps):" +msgstr "Débit moyen (kbps) :" + +#: src/filewriter/mp3.c:1188 +msgid "VBR quality level:" +msgstr "Niveau de qualité VBR :" + +#: src/filewriter/mp3.c:1203 +msgid "" +"highest:0;\n" +"lowest:9;\n" +"default:4;" +msgstr "" +"Le plus élevé : 0\n" +"Le plus bas : 9\n" +"Défaut : 4" + +#: src/filewriter/mp3.c:1211 +msgid "Don't write Xing VBR header" +msgstr "Ne pas écrire l'en-tête VBR 'Xing'" + +#: src/filewriter/mp3.c:1226 +msgid "VBR/ABR" +msgstr "VBR/ABR" + +#: src/filewriter/mp3.c:1238 +msgid "Frame params:" +msgstr "Paramètres des trames :" + +#: src/filewriter/mp3.c:1250 +msgid "Mark as copyright" +msgstr "Marquer comme soumises aux droits d'utilisation" + +#: src/filewriter/mp3.c:1261 +msgid "Mark as original" +msgstr "Marquer comme originales" + +#: src/filewriter/mp3.c:1273 +msgid "ID3 params:" +msgstr "Paramètres ID3 :" + +#: src/filewriter/mp3.c:1284 +msgid "Force addition of version 2 tag" +msgstr "Forcer l'ajout de la version 2 des métadonnées" + +#: src/filewriter/mp3.c:1294 +msgid "Only add v1 tag" +msgstr "Ajouter uniquement la version 1 des métadonnées" + +#: src/filewriter/mp3.c:1301 +msgid "Only add v2 tag" +msgstr "Ajouter uniquement la version 2 des métadonnées" + +#: src/filewriter/mp3.c:1322 +msgid "Tags" +msgstr "Métadonnées" + +#: src/filewriter/vorbis.c:264 +msgid "Vorbis Encoder Configuration" +msgstr "Encodeur 'Vorbis'" + +#: src/filewriter/vorbis.c:284 +msgid "Quality level (0 - 10):" +msgstr "Niveau de qualité (0 - 10) :" + +#: src/flacng/plugin.c:735 +msgid "FLAC Audio Plugin " +msgstr "Module audio 'Flac' " + +#: src/flacng/plugin.c:736 +msgid "" +"\n" +"\n" +"Original code by\n" +"Ralf Ertzinger \n" +"\n" +"http://www.skytale.net/projects/bmp-flac2/" +msgstr "" +"\n" +"\n" +"Code original de\n" +"\n" +"Ralf Ertzinger \n" +"\n" +"http://www.skytale.net/projects/bmp-flac2/" + +#: src/flacng/plugin.c:741 +msgid "About FLAC Audio Plugin" +msgstr "À propos du module audio 'FLAC'" + +#: src/jack/configure.c:69 +msgid "Connect to all available jack ports" +msgstr "Connexion à tous les ports 'jack' disponibles" + +#: src/jack/configure.c:76 +msgid "Connect only the output ports" +msgstr "Connexion aux ports de sortie uniquement" + +#: src/jack/configure.c:83 +msgid "Connect to no ports" +msgstr "Aucune connexion" + +#: src/jack/configure.c:98 +msgid "jack Plugin configuration" +msgstr "Configuration du module 'Jack'" + +#: src/jack/configure.c:116 +msgid "Connection mode:" +msgstr "Mode de connexion :" + +#: src/jack/configure.c:128 +msgid "Enable debug printing" +msgstr "Activer le mode de débogage" + +#: src/jack/jack.c:102 +msgid "Sample rate mismatch" +msgstr "Problème de correspondance entre les taux d'échantillonnage" + +#: src/jack/jack.c:105 +msgid "" +"Xmms is asking for a sample rate that differs from\n" +" that of the jack server. Xmms 1.2.8 or later\n" +"contains resampling routines that xmms-jack will\n" +"dynamically load and use to perform resampling.\n" +"Or you can restart the jack server\n" +"with a sample rate that matches the one that\n" +"xmms desires. -r is the option for the jack\n" +"alsa driver so -r 44100 or -r 48000 should do\n" +"\n" +"Chris Morgan \n" +msgstr "" +"Xmms demande un taux d'échantillonnage différent du\n" +" taux du serveur 'jack'. Depuis la version 1.2.8,\n" +"Xmms inclut des routines de rééchantillonnage que\n" +"'xmms-jack' charge de manière dynamique et utilise\n" +"pour procéder au rééchantillonnage.\n" +"Vous pouvez redémarrer le serveur 'jack' avec un taux\n" +"d'échantillonnage qui correspond à celui que demande\n" +"Xmms. '-r' est l'option pour le pilote ALSA 'jack'.\n" +"Donc, '-r 44100' ou 'r 48000' devrait convenir.\n" +"\n" +"Chris Morgan \n" + +#: src/jack/jack.c:118 +#: src/wma/wma.c:156 +msgid " Close " +msgstr " Fermer " + +#: src/jack/jack.c:598 +msgid "About JACK Output Plugin 0.17" +msgstr "À propos du module 'JACK' 0.17" + +#: src/jack/jack.c:599 +msgid "" +"XMMS jack Driver 0.17\n" +"\n" +"xmms-jack.sf.net\n" +"Chris Morgan\n" +"\n" +"Audacious port by\n" +"Giacomo Lozito from develia.org" +msgstr "" +"Pilote 'jack' pour XMMS 0.17\n" +"\n" +"xmms-jack.sf.net\n" +"\n" +"Chris Morgan\n" +"\n" +"Rétroportage pour Audacious effectué par :\n" +"Giacomo Lozito from develia.org" + +#: src/ladspa/ladspa.c:724 +msgid "This LADSPA plugin has no user controls" +msgstr "Cette extension LADSPA ne dispose pas de contrôles utilisateur" + +#: src/ladspa/ladspa.c:769 +#: src/ladspa/ladspa.c:855 +msgid "Name" +msgstr "Nom" + +#: src/ladspa/ladspa.c:855 +msgid "UID" +msgstr "UID" + +#: src/ladspa/ladspa.c:930 +msgid "Installed plugins" +msgstr "Extensions installées" + +#: src/ladspa/ladspa.c:939 +msgid "Running plugins" +msgstr "Extensions utilisées" + +#: src/ladspa/ladspa.c:954 +msgid "Add" +msgstr "Ajouter" + +#: src/ladspa/ladspa.c:958 +msgid "Remove" +msgstr "Enlever" + +#: src/ladspa/ladspa.c:971 +msgid "LADSPA Plugin Catalog" +msgstr "Liste des extensions 'LADSPA'" + +#: src/lastfm/lastfm.c:96 +msgid "" +"Couldn't initialize the last.fm radio plugin.\n" +"\n" +"Check if your Scrobbler's plugin login data is set up properly." +msgstr "" +"Impossible d'initialiser le module 'Radio last.fm'.\n" +"\n" +"Veuillez vérifier si les informations de connexion de 'Scrobbler' sont correctes." + +#: src/lirc/about.c:65 +msgid "About LIRC Audacious Plugin" +msgstr "À propos du module 'LIRC'" + +#: src/lirc/about.c:92 +msgid "LIRC Plugin " +msgstr "Module 'LIRC' " + +#: src/lirc/about.c:94 +msgid "" +"\n" +"A simple plugin that lets you control\n" +"Audacious using the LIRC remote control daemon\n" +"\n" +"Adapted for Audacious usage by Tony Vroon \n" +"from the XMMS LIRC plugin by:\n" +"Carl van Schaik \n" +"Christoph Bartelmus \n" +"You can get LIRC information at:\n" +"http://fsinfo.cs.uni-sb.de/~columbus/lirc/index.html" +msgstr "" +"\n" +"\n" +"'LIRC' est un module simple qui permet de contrôler\n" +"Audacious en utilisant le démon de contrôle distant 'LIRC'.\n" +"\n" +"Le module a été modifié pour Audacious par\n" +"Tony Vroon ,\n" +"à partir du module 'LIRC' pour XMMS écrit par :\n" +"\n" +"Carl van Schaik \n" +"Christoph Bartelmus \n" +"\n" +"Vous pouvez obtenir des informations sur 'LIRC' à cette adresse :\n" +"http://fsinfo.cs.uni-sb.de/~columbus/lirc/index.html" + +#: src/lirc/lirc.c:80 +#, c-format +msgid "%s: could not init LIRC support\n" +msgstr "%s: impossible d'initialiser le support 'LIRC'\n" + +#: src/lirc/lirc.c:88 +#, c-format +msgid "" +"%s: could not read LIRC config file\n" +"%s: please read the documentation of LIRC\n" +"%s: how to create a proper config file\n" +msgstr "" +"%s: impossible de lire le fichier de configuration de 'LIRC'\n" +"%s: veuillez consulter la documentation de 'LIRC'\n" +"%s: relative à la création d'un fichier de configuration correct\n" + +#: src/lirc/lirc.c:299 +#, c-format +msgid "%s: unknown command \"%s\"\n" +msgstr "%s: commande inconnue \"%s\"\n" + +#: src/lirc/lirc.c:309 +#, c-format +msgid "%s: disconnected from LIRC\n" +msgstr "%s: déconnecté de 'LIRC'\n" + +#: src/madplug/configure.c:148 +msgid "MPEG Audio Plugin Configuration" +msgstr "Configuration du module audio 'MPEG'" + +#: src/madplug/configure.c:161 +msgid "Dither output when rounding to 16-bit" +msgstr "Utiliser la diffusion d'erreur lorsque le flux est arrondi à 16 bits" + +#: src/madplug/configure.c:167 +msgid "Enable fast play-length calculation" +msgstr "Activer le calcul rapide de la durée" + +#: src/madplug/configure.c:172 +msgid "Parse XING headers" +msgstr "Analyser les en-têtes 'XING'" + +#: src/madplug/configure.c:177 +msgid "Use SJIS to write ID3 tags instead of UTF-8" +msgstr "Utiliser SJIS pour écrire les métadonnées ID3, à la place d'UTF-8" + +#: src/madplug/configure.c:181 +msgid "Display average bitrate for VBR" +msgstr "Afficher le débit moyen pour l'encodage VBR" + +#: src/madplug/configure.c:186 +msgid "Force reopen audio when audio type changed" +msgstr "Forcer la réouverture de la sortie audio lorsque le format du flux a changé" + +#: src/madplug/configure.c:196 +msgid "Enable ReplayGain processing" +msgstr "Activer le traitement 'ReplayGain'" + +#: src/madplug/configure.c:201 +msgid "Track mode" +msgstr "Mode 'piste'" + +#: src/madplug/configure.c:208 +msgid "6dB hard limiting" +msgstr "Limite stricte à 6 dB" + +#: src/madplug/configure.c:213 +msgid "Default gain (dB):" +msgstr "Gain par défaut (dB) :" + +#: src/madplug/configure.c:224 +msgid "Preamp (dB):" +msgstr "Préamplification (dB) :" + +#: src/madplug/configure.c:233 +#: src/musepack/libmpc.cxx:223 +#: src/vorbis/configure.c:221 +#: src/wavpack/ui.cxx:545 +msgid "ReplayGain" +msgstr "ReplayGain" + +#: src/madplug/configure.c:238 +#: src/vorbis/configure.c:137 +msgid "Override generic titles" +msgstr "Remplacer les titres génériques" + +#: src/madplug/configure.c:251 +msgid "ID3 format:" +msgstr "Format ID3 :" + +#: src/madplug/configure.c:261 +#: src/vorbis/configure.c:160 +msgid "Title" +msgstr "Titre" + +#: src/madplug/fileinfo.c:158 +#: src/madplug/fileinfo.c:236 +msgid "File Info" +msgstr "Informations sur le fichier" + +#: src/madplug/fileinfo.c:158 +msgid "Couldn't open file!" +msgstr "Impossible d'ouvrir le fichier !" + +#: src/madplug/fileinfo.c:236 +msgid "Couldn't write tag!" +msgstr "Impossible d'écrire les métadonnées !" + +#: src/madplug/fileinfo.c:330 +msgid "Name:" +msgstr "Nom :" + +#: src/madplug/fileinfo.c:344 +msgid " MPEG Info " +msgstr " Informations MPEG " + +#: src/madplug/fileinfo.c:417 +msgid " ID3 Tag " +msgstr " Métadonnées ID3 " + +#: src/madplug/fileinfo.c:425 +#: src/musepack/libmpc.cxx:513 +#: src/tta/libtta.c:341 +#: src/vorbis/fileinfo.c:585 +#: src/wavpack/ui.cxx:170 +msgid "Title:" +msgstr "Titre :" + +#: src/madplug/fileinfo.c:435 +#: src/musepack/libmpc.cxx:517 +#: src/tta/libtta.c:351 +#: src/vorbis/fileinfo.c:596 +#: src/wavpack/ui.cxx:182 +msgid "Artist:" +msgstr "Artiste :" + +#: src/madplug/fileinfo.c:445 +#: src/musepack/libmpc.cxx:521 +#: src/tta/libtta.c:362 +#: src/vorbis/fileinfo.c:607 +#: src/wavpack/ui.cxx:194 +msgid "Album:" +msgstr "Album :" + +#: src/madplug/fileinfo.c:455 +#: src/musepack/libmpc.cxx:525 +#: src/tta/libtta.c:373 +#: src/vorbis/fileinfo.c:618 +#: src/wavpack/ui.cxx:206 +msgid "Comment:" +msgstr "Commentaire :" + +#: src/madplug/fileinfo.c:465 +#: src/musepack/libmpc.cxx:529 +#: src/tta/libtta.c:384 +#: src/wavpack/ui.cxx:219 +msgid "Year:" +msgstr "Année :" + +#: src/madplug/fileinfo.c:476 +#: src/tta/libtta.c:396 +#: src/vorbis/fileinfo.c:641 +#: src/wavpack/ui.cxx:232 +msgid "Track number:" +msgstr "Piste :" + +#: src/madplug/fileinfo.c:487 +#: src/musepack/libmpc.cxx:539 +#: src/tta/libtta.c:408 +#: src/vorbis/fileinfo.c:653 +#: src/wavpack/ui.cxx:246 +msgid "Genre:" +msgstr "Genre :" + +#: src/madplug/fileinfo.c:500 +msgid "Unknown" +msgstr "Inconnu" + +#: src/madplug/fileinfo.c:620 +#: src/musepack/libmpc.cxx:633 +#: src/tta/libtta.c:431 +#: src/wavpack/ui.cxx:407 +#, c-format +msgid "File Info - %s" +msgstr "Informations sur le fichier : %s" + +#: src/madplug/fileinfo.c:651 +#, c-format +msgid "Layer %s" +msgstr "Couche %s" + +#: src/madplug/fileinfo.c:654 +#, c-format +msgid "VBR (avg. %d kbps)" +msgstr "VBR (moyenne : %d kbps)" + +#: src/madplug/fileinfo.c:660 +#: src/vorbis/fileinfo.c:962 +#, c-format +msgid "%d Hz" +msgstr "%d Hz" + +#: src/madplug/fileinfo.c:663 +#, c-format +msgid "%d frames" +msgstr "%d trames" + +#: src/madplug/fileinfo.c:672 +#, c-format +msgid "%d:%02d (%d seconds)" +msgstr "%d:%02d (%d secondes)" + +#: src/madplug/fileinfo.c:677 +#, c-format +msgid "RG_album=%4s (x%4.2f)" +msgstr "ReplayGain (album) = %4s (x%4.2f)" + +#: src/madplug/fileinfo.c:685 +#, c-format +msgid "RG_track=%4s (x%4.2f)" +msgstr "ReplayGain (piste) = %4s (x%4.2f)" + +#: src/madplug/fileinfo.c:693 +#, c-format +msgid "Peak album=%4s (%+5.3fdBFS)" +msgstr "Pic sonore (album) = %4s (%+5.3fdBFS)" + +#: src/madplug/fileinfo.c:702 +#, c-format +msgid "Peak track=%4s (%+5.3fdBFS)" +msgstr "Pic sonore (piste) = %4s (%+5.3fdBFS)" + +#: src/madplug/fileinfo.c:711 +#, c-format +msgid "mp3gain undo=%4s (%+5.3fdB)" +msgstr "'mp3gain' (annulation) = %4s (%+5.3fdB)" + +#: src/madplug/fileinfo.c:719 +#, c-format +msgid "mp3gain minmax=%4s (max-min=%+6.3fdB)" +msgstr "'mp3gain' (minmax) = %4s (max-min=%+6.3fdB)" + +#: src/madplug/plugin.c:579 +#, c-format +msgid "" +"Audacious MPEG Audio Plugin\n" +"\n" +"Compiled against libMAD version: %d.%d.%d%s\n" +"\n" +"Written by:\n" +" William Pitcock \n" +" Yoshiki Yazawa \n" +"\n" +"Portions derived from XMMS-MAD by:\n" +" Sam Clegg\n" +"\n" +"ReplayGain support by:\n" +" Samuel Krempp" +msgstr "" +"Module audio 'MPEG' pour Audacious\n" +"\n" +"\n" +"Compilé avec 'libMAD' (version : %d.%d.%d%s)\n" +"\n" +"\n" +"Écrit par :\n" +"\n" +" William Pitcock \n" +" Yoshiki Yazawa \n" +"\n" +"\n" +"Des parties du code proviennent de 'XMMS-MAD' écrit par :\n" +"\n" +" Sam Clegg\n" +"\n" +"\n" +"Support de 'ReplayGain' par :\n" +"\n" +" Samuel Krempp" + +#: src/madplug/plugin.c:595 +msgid "About MPEG Audio Plugin" +msgstr "À propos du module audio 'MPEG'" + +#: src/metronom/metronom.c:86 +msgid "About Metronom" +msgstr "À propos de 'Métronome'" + +#: src/metronom/metronom.c:87 +msgid "" +"A Tact Generator by Martin Strauss \n" +"\n" +"To use it, add a URL: tact://beats*num/den\n" +"e.g. tact://77 to play 77 beats per minute\n" +"or tact://60*3/4 to play 60 bpm in 3/4 tacts" +msgstr "" +"'Métronome' est un générateur de pulsations écrit par\n" +"Martin Strauss .\n" +"\n" +"Pour l'utiliser, ajouter une adresse du type :\n" +"tact://Battements*Numérateur/Dénominateur\n" +"\n" +"Exemples :\n" +"\n" +"'tact://77' produira 77 battements par minute\n" +"'tact://60*3/4' produira 60 battements par minute (mesure à 3/4)" + +#: src/metronom/metronom.c:199 +#: src/metronom/metronom.c:263 +#, c-format +msgid "Tact generator: %d bpm" +msgstr "Métronome : %d bpm" + +#: src/metronom/metronom.c:201 +#: src/metronom/metronom.c:265 +#, c-format +msgid "Tact generator: %d bpm %d/%d" +msgstr "Métronome : %d bpm %d/%d" + +#: src/modplug/gui/interface.cxx:117 +msgid "ModPlug Configuration" +msgstr "Configuration de 'ModPlug'" + +#: src/modplug/gui/interface.cxx:165 +#: src/timidity/src/interface.c:142 +msgid "16 bit" +msgstr "16 bits" + +#: src/modplug/gui/interface.cxx:173 +#: src/timidity/src/interface.c:134 +msgid "8 bit" +msgstr "8 bits" + +#: src/modplug/gui/interface.cxx:203 +msgid "Mono (downmix)" +msgstr "Mono (sous-mélange)" + +#: src/modplug/gui/interface.cxx:218 +#: src/timidity/src/interface.c:76 +msgid "Sampling Rate" +msgstr "Taux d'échantillonnage" + +#: src/modplug/gui/interface.cxx:232 +msgid "48 kHz" +msgstr "48 kHz" + +#: src/modplug/gui/interface.cxx:240 +msgid "44 kHz" +msgstr "44 kHz" + +#: src/modplug/gui/interface.cxx:248 +msgid "22 kHz" +msgstr "22 kHz" + +#: src/modplug/gui/interface.cxx:256 +msgid "11 kHz" +msgstr "11 kHz" + +#: src/modplug/gui/interface.cxx:278 +msgid "Nearest (fastest)" +msgstr "Méthode du 'plus proche voisin' (la plus rapide)" + +#: src/modplug/gui/interface.cxx:286 +msgid "Linear (fast)" +msgstr "Interpolation linéaire (rapide)" + +#: src/modplug/gui/interface.cxx:294 +msgid "Spline (good quality)" +msgstr "Interpolation par segments ('spline') (bonne qualité)" + +#: src/modplug/gui/interface.cxx:302 +msgid "8-tap Fir (extremely high quality)" +msgstr "Filtre à réponse impulsionnelle finie '8-tap FIR' (qualité optimale)" + +#: src/modplug/gui/interface.cxx:346 +msgid "Use Filename as Song Title" +msgstr "Utiliser le nom du fichier comme titre du morceau" + +#: src/modplug/gui/interface.cxx:353 +msgid "Fast Playlist Info" +msgstr "Informations rapides sur la liste de lecture" + +#: src/modplug/gui/interface.cxx:368 +msgid "Noise Reduction" +msgstr "Réduction du bruit" + +#: src/modplug/gui/interface.cxx:376 +msgid "Play Amiga MOD" +msgstr "Lire les modules musicaux Amiga" + +#: src/modplug/gui/interface.cxx:384 +msgid "Reverb" +msgstr "Réverbération" + +#: src/modplug/gui/interface.cxx:398 +#: src/modplug/gui/interface.cxx:470 +#: src/modplug/gui/interface.cxx:542 +#: src/modplug/gui/interface.cxx:628 +msgid "Enable" +msgstr "Activer " + +#: src/modplug/gui/interface.cxx:438 +#: src/modplug/gui/interface.cxx:582 +msgid "Depth" +msgstr "Profondeur" + +#: src/modplug/gui/interface.cxx:447 +#: src/modplug/gui/interface.cxx:591 +msgid "Delay" +msgstr "Délai" + +#: src/modplug/gui/interface.cxx:456 +msgid "Bass Boost" +msgstr "Amplification des basses" + +#: src/modplug/gui/interface.cxx:510 +msgid "Amount" +msgstr "Intensité" + +#: src/modplug/gui/interface.cxx:519 +msgid "Range" +msgstr "Portée" + +#: src/modplug/gui/interface.cxx:528 +msgid "Surround" +msgstr "Son d'ambiance" + +#: src/modplug/gui/interface.cxx:600 +msgid "Preamp" +msgstr "Préamplification" + +#: src/modplug/gui/interface.cxx:614 +msgid "" +"Note: Setting the preamp\n" +"too high may cause clipping\n" +"(annoying clicks and pops)!" +msgstr "" +"Note : une valeur de préamplification excessive\n" +"peut produire des coupures et des distorsions\n" +"(des clics et des bruits secs assez agaçants) !" + +#: src/modplug/gui/interface.cxx:649 +msgid "Looping" +msgstr "Répétition" + +#: src/modplug/gui/interface.cxx:663 +msgid "Don't loop" +msgstr "Ne pas répéter" + +#: src/modplug/gui/interface.cxx:678 +msgid "Loop" +msgstr "Répéter" + +#: src/modplug/gui/interface.cxx:694 +msgid "time(s)" +msgstr "fois" + +#: src/modplug/gui/interface.cxx:701 +msgid "Loop forever" +msgstr "Répéter en boucle" + +#: src/modplug/gui/interface.cxx:709 +msgid "Effects" +msgstr "Effets" + +#: src/modplug/gui/interface.cxx:793 +msgid "MOD Info" +msgstr "Informations sur le module" + +#: src/modplug/gui/interface.cxx:817 +msgid "" +"Filename:\n" +"Title:\n" +"Type:\n" +"Length:\n" +"Speed:\n" +"Tempo:\n" +"Samples:\n" +"Instruments:\n" +"Patterns:\n" +"Channels:" +msgstr "" +"Nom du fichier :\n" +"Titre :\n" +"Type :\n" +"Durée :\n" +"Vitesse :\n" +"Tempo :\n" +"Échantillons :\n" +"Instruments :\n" +"Séquences :\n" +"Voies :" + +#: src/modplug/gui/interface.cxx:866 +msgid "Samples" +msgstr "Échantillons" + +#: src/modplug/gui/interface.cxx:899 +msgid "Instruments" +msgstr "Instruments" + +#: src/modplug/gui/interface.cxx:932 +msgid "Message" +msgstr "Commentaires" + +#: src/modplug/gui/main.cxx:43 +msgid "Modplug Input Plugin for Audacious ver" +msgstr "Module d'entrée 'Modplug' pour Audacious, version " + +#: src/modplug/gui/main.cxx:44 +msgid "" +"\n" +"Modplug sound engine written by Olivier Lapicque.\n" +"XMMS interface for Modplug by Kenton Varda.\n" +"(c)2000 Olivier Lapicque and Kenton Varda.\n" +"Updates and Maintainance by Konstanty Bialkowski.\n" +"Ported to BMP by Theofilos Intzoglou." +msgstr "" +"\n" +"\n" +"Le moteur sonore de 'Modplug' a été écrit par Olivier Lapicque.\n" +"\n" +"L'interface XMMS pour 'Modplug' a été conçue par Kenton Varda.\n" +"\n" +"Droits d'utilisation : (c) 2000, Olivier Lapicque and Kenton Varda.\n" +"\n" +"Mises à jour et maintenance : Konstanty Bialkowski.\n" +"\n" +"Rétroportage pour BMP : Theofilos Intzoglou." + +#: src/modplug/gui/main.cxx:45 +msgid "About Modplug" +msgstr "À propos de 'Modplug'" + +#: src/modplug/gui/support.cxx:118 +#: src/sid/xs_glade.c:90 +#: src/sid/xs_glade.c:114 +#, c-format +msgid "Couldn't find pixmap file: %s" +msgstr "Impossible d'ouvrir l'image : %s" + +#: src/modplug/gui/support.cxx:127 +#, c-format +msgid "Error loading pixmap file: %s" +msgstr "Erreur lors du chargement de l'image : %s" + +#: src/musepack/libmpc.cxx:145 +msgid "Musepack Decoder Plugin 1.2" +msgstr "Décodeur 'Musepack' 1.2" + +#: src/musepack/libmpc.cxx:146 +msgid "" +"Plugin code by\n" +"Benoit Amiaux\n" +"Martin Spuler\n" +"Kuniklo\n" +"\n" +"Get latest version at http://musepack.net\n" +msgstr "" +"Code du module écrit par :\n" +"\n" +"Benoit Amiaux\n" +"Martin Spuler\n" +"Kuniklo\n" +"\n" +"Vous pouvez obtenir la dernière version à l'adresse suivante :\n" +"http://musepack.net\n" + +#: src/musepack/libmpc.cxx:147 +msgid "Nevermind" +msgstr "Qu'importe !" + +#: src/musepack/libmpc.cxx:165 +msgid "Musepack Decoder Configuration" +msgstr "Configuration de 'Musepack'" + +#: src/musepack/libmpc.cxx:175 +msgid "General Settings" +msgstr "Réglages généraux" + +#: src/musepack/libmpc.cxx:182 +#: src/wavpack/ui.cxx:490 +msgid "Enable Dynamic Bitrate Display" +msgstr "Activer l'affichage dynamique du débit" + +#: src/musepack/libmpc.cxx:186 +#: src/wavpack/ui.cxx:496 +msgid "Plugin" +msgstr "Module" + +#: src/musepack/libmpc.cxx:189 +msgid "ReplayGain Settings" +msgstr "Paramètres de 'ReplayGain'" + +#: src/musepack/libmpc.cxx:196 +#: src/vorbis/configure.c:172 +#: src/wavpack/ui.cxx:508 +msgid "Enable Clipping Prevention" +msgstr "Activer la prévention de la saturation" + +#: src/musepack/libmpc.cxx:201 +#: src/vorbis/configure.c:177 +#: src/wavpack/ui.cxx:513 +msgid "Enable ReplayGain" +msgstr "Activer 'ReplayGain'" + +#: src/musepack/libmpc.cxx:206 +msgid "ReplayGain Type" +msgstr "Traitement 'ReplayGain'" + +#: src/musepack/libmpc.cxx:214 +msgid "Use Track Gain" +msgstr "Utiliser le gain 'piste'" + +#: src/musepack/libmpc.cxx:218 +msgid "Use Album Gain" +msgstr "Utiliser le gain 'album'" + +#: src/musepack/libmpc.cxx:490 +#: src/sid/xmms-sid.glade:2994 +#: src/sid/xs_interface.c:1495 +#: src/tta/libtta.c:322 +#: src/wavpack/ui.cxx:150 +msgid "Filename:" +msgstr "Nom du fichier :" + +#: src/musepack/libmpc.cxx:505 +msgid "Musepack Tag" +msgstr "Métadonnées 'Musepack'" + +#: src/musepack/libmpc.cxx:534 +msgid "Track:" +msgstr "Piste :" + +#: src/musepack/libmpc.cxx:550 +#: src/sid/xmms-sid.glade:1732 +#: src/sid/xs_interface.c:812 +#: src/wavpack/ui.cxx:265 +msgid "Save" +msgstr "Enregistrer" + +#: src/musepack/libmpc.cxx:553 +#: src/wavpack/ui.cxx:271 +msgid "Remove Tag" +msgstr "Supprimer les métadonnées" + +#: src/musepack/libmpc.cxx:561 +msgid "Musepack Info" +msgstr "Informations 'Musepack'" + +#: src/musepack/libmpc.cxx:594 +#, c-format +msgid "Streamversion %d" +msgstr "Version du flux : %d" + +#: src/musepack/libmpc.cxx:595 +#, c-format +msgid "Encoder: %s" +msgstr "Encodeur : %s" + +#: src/musepack/libmpc.cxx:596 +#, c-format +msgid "Profile: %s" +msgstr "Profil : %s" + +#: src/musepack/libmpc.cxx:597 +#, c-format +msgid "Average bitrate: %6.1f kbps" +msgstr "Débit moyen : %6.1f kbps" + +#: src/musepack/libmpc.cxx:598 +#, c-format +msgid "Samplerate: %d Hz" +msgstr "Taux d'échantillonnage : %d Hz" + +#: src/musepack/libmpc.cxx:599 +#, c-format +msgid "Channels: %d" +msgstr "Voies : %d" + +#: src/musepack/libmpc.cxx:600 +#, c-format +msgid "Length: %d:\\%.2d" +msgstr "Durée : %d:\\%.2d" + +#: src/musepack/libmpc.cxx:601 +#, c-format +msgid "File size: %d Bytes" +msgstr "Taille du fichier : %d Bytes" + +#: src/musepack/libmpc.cxx:602 +#, c-format +msgid "Track Peak: %5u" +msgstr "Pic sonore 'piste' : %5u" + +#: src/musepack/libmpc.cxx:603 +#, c-format +msgid "Track Gain: %-+2.2f dB" +msgstr "Gain 'piste' : %-+2.2f dB" + +#: src/musepack/libmpc.cxx:604 +#, c-format +msgid "Album Peak: %5u" +msgstr "Pic sonore 'album' : %5u" + +#: src/musepack/libmpc.cxx:605 +#, c-format +msgid "Album Gain: %-+5.2f dB" +msgstr "Gain 'album': %-+5.2f dB" + +#: src/null/null.c:61 +msgid "Null output plugin " +msgstr "Module de sortie 'Null' " + +#: src/null/null.c:62 +msgid "" +" by Christian Birchinger \n" +"based on the XMMS plugin by Håvard Kvål " +msgstr "" +" \n" +"\n" +"Écrit par Christian Birchinger ,\n" +"à partir du module pour XMMS de Håvard Kvål " + +#: src/null/null.c:65 +msgid "About Null Output" +msgstr "À propos du module de sortie 'Null'" + +#: src/null/null.c:94 +msgid "Null output preferences" +msgstr "Préférences du module de sortie 'Null'" + +#: src/null/null.c:103 +msgid "Run in real time" +msgstr "Utiliser en temps réel" + +#: src/OSS4/about.c:42 +msgid "About OSSv4 Driver" +msgstr "À propos du pilote 'OSSv4'" + +#: src/OSS4/about.c:43 +msgid "" +"Audacious OSSv4 Driver\n" +"\n" +"Based on the OSSv3 Output plugin,\n" +"Ported to OSSv4's VMIX by Cristi Magherusan \n" +"\n" +"This program is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,\n" +"USA." +msgstr "" +"Pilote 'OSSv4' pour Audacious\n" +"\n" +"Basé sur le module de sortie 'OSSv3'\n" +"Rétroporté pour 'VMIX' du pilote 'OSSv4' par\n" +"Cristi Magherusan \n" +"\n" +"Ce programme est libre, vous pouvez le redistribuer et/ou le modifier\n" +"selon les termes de la Licence Publique Générale GNU publiée par\n" +"la Free Software Foundation (version 2 ou bien toute autre version\n" +"ultérieure choisie par vous).\n" +"\n" +"Ce programme est distribué car potentiellement utile, mais SANS\n" +"AUCUNE GARANTIE, ni explicite ni implicite, y compris les garanties\n" +"de commercialisation ou d'adaptation dans un but spécifique.\n" +"Reportez-vous à la Licence Publique Générale GNU pour plus de détails.\n" +"\n" +"Vous devez avoir reçu une copie de la Licence Publique Générale GNU\n" +"en même temps que ce programme ; si ce n'est pas le cas, écrivez à la\n" +"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +"MA 02110-1301, États-Unis." + +#: src/OSS4/configure.c:120 +#: src/OSS/configure.c:152 +#, c-format +msgid "Default (%s)" +msgstr "Défaut (%s)" + +#: src/OSS4/configure.c:170 +#: src/OSS/configure.c:202 +msgid "OSS Driver configuration" +msgstr "Configuration du pilote 'OSS'" + +#: src/OSS4/configure.c:208 +#: src/OSS/configure.c:240 +#: src/OSS/configure.c:281 +msgid "Use alternate device:" +msgstr "Utiliser un autre périphérique :" + +#: src/OSS4/configure.c:230 +#: src/OSS/configure.c:303 +#: src/sun/configure.c:248 +msgid "Devices" +msgstr "Périphériques" + +#: src/OSS4/configure.c:272 +#: src/OSS/configure.c:344 +msgid "Mixer Settings:" +msgstr "Paramètres du mélangeur :" + +#: src/OSS4/configure.c:278 +msgid "Save VMIX volume between sessions" +msgstr "Conserver le volume de 'VMIX', d'une session à l'autre" + +#: src/OSS4/configure.c:284 +#: src/OSS/configure.c:356 +#: src/sun/configure.c:394 +msgid "Mixer" +msgstr "Mélangeur audio" + +#: src/OSS/about.c:39 +msgid "About OSS Driver" +msgstr "À propos du pilote 'OSS'" + +#: src/OSS/about.c:40 +msgid "" +"Audacious OSS Driver\n" +"\n" +" This program is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,\n" +"USA." +msgstr "" +"Pilote 'OSS' pour Audacious\n" +"\n" +"Ce programme est libre, vous pouvez le redistribuer et/ou le modifier\n" +"selon les termes de la Licence Publique Générale GNU publiée par\n" +"la Free Software Foundation (version 2 ou bien toute autre version\n" +"ultérieure choisie par vous).\n" +"\n" +"Ce programme est distribué car potentiellement utile, mais SANS\n" +"AUCUNE GARANTIE, ni explicite ni implicite, y compris les garanties\n" +"de commercialisation ou d'adaptation dans un but spécifique.\n" +"Reportez-vous à la Licence Publique Générale GNU pour plus de détails.\n" +"\n" +"Vous devez avoir reçu une copie de la Licence Publique Générale GNU\n" +"en même temps que ce programme ; si ce n'est pas le cas, écrivez à la\n" +"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +"MA 02110-1301, États-Unis." + +#: src/OSS/configure.c:350 +msgid "Volume controls Master not PCM" +msgstr "Contrôle du volume via le canal 'maître' au lieu du canal 'PCM'" + +#: src/pulse_audio/pulse_audio.c:678 +msgid "About Audacious PulseAudio Output Plugin" +msgstr "À propos du module de sortie 'PulseAudio' pour Audacious" + +#: src/pulse_audio/pulse_audio.c:679 +msgid "" +"Audacious PulseAudio Output Plugin\n" +"\n" +" This program is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,\n" +"USA." +msgstr "" +"Module de sortie 'PulseAudio' pour Audacious\n" +"\n" +" Ce programme est libre, vous pouvez le redistribuer et/ou le modifier\n" +"selon les termes de la Licence Publique Générale GNU publiée par\n" +"la Free Software Foundation (version 2 ou bien toute autre version\n" +"ultérieure choisie par vous).\n" +"\n" +"Ce programme est distribué car potentiellement utile, mais SANS\n" +"AUCUNE GARANTIE, ni explicite ni implicite, y compris les garanties\n" +"de commercialisation ou d'adaptation dans un but spécifique.\n" +"Reportez-vous à la Licence Publique Générale GNU pour plus de détails.\n" +"\n" +"Vous devez avoir reçu une copie de la Licence Publique Générale GNU\n" +"en même temps que ce programme ; si ce n'est pas le cas, écrivez à la\n" +"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +"MA 02110-1301, États-Unis." + +#: src/scrobbler/configure.c:100 +msgid "Services" +msgstr "Services" + +#: src/scrobbler/configure.c:122 +#: src/scrobbler/configure.c:162 +msgid "Username:" +msgstr "Utilisateur :" + +#: src/scrobbler/configure.c:128 +#: src/scrobbler/configure.c:168 +msgid "Password:" +msgstr "Mot de passe :" + +#: src/scrobbler/configure.c:146 +msgid "Last.FM" +msgstr "Last.FM" + +#: src/scrobbler/configure.c:186 +msgid "Gerpok" +msgstr "Gerpok" + +#: src/scrobbler/gtkstuff.c:20 +msgid "" +"Audacious AudioScrobbler Plugin\n" +"\n" +"Originally created by Audun Hove and Pipian \n" +msgstr "" +"Module 'Scrobbler' pour Audacious\n" +"\n" +"Auteurs du code original :\n" +"\n" +"Audun Hove et Pipian \n" + +#: src/scrobbler/gtkstuff.c:22 +msgid "About Scrobbler Plugin" +msgstr "À propos du module 'Scrobbler'" + +#: src/scrobbler/gtkstuff.c:35 +#, c-format +msgid "" +"There has been an error that may require your attention.\n" +"\n" +"Contents of server error:\n" +"\n" +"%s\n" +msgstr "" +"L'erreur qui s'est produite à l'instant peut nécessiter votre attention.\n" +"\n" +"Nature de l'erreur du serveur : \n" +"\n" +"%s\n" + +#: src/scrobbler/gtkstuff.c:41 +msgid "Scrobbler Error" +msgstr "Erreur de 'Scrobbler'" + +#: src/sid/xmms-sid.c:203 +msgid "Error initializing song-length database!\n" +msgstr "Erreur lors de l'initialisation de la base de données relative à la durée des modules audio !\n" + +#: src/sid/xmms-sid.c:209 +msgid "Error initializing STIL database!\n" +msgstr "Erreur lors de l'initialisation de la base de données 'STIL' !\n" + +#: src/sid/xmms-sid.c:414 +msgid "Couldn't allocate memory for audio data buffer!\n" +msgstr "Impossible d'allouer la mémoire pour les données du tampon audio !\n" + +#: src/sid/xmms-sid.c:421 +msgid "Couldn't allocate memory for audio oversampling buffer!\n" +msgstr "Impossible d'allouer la mémoire pour le tampon du suréchantillonage audio !\n" + +#: src/sid/xmms-sid.c:436 +#, c-format +msgid "Couldn't initialize SID-tune '%s' (sub-tune #%i)!\n" +msgstr "Impossible d'initialiser le module SID '%s' (sous-module #%i) !\n" + +#: src/sid/xmms-sid.c:446 +#, c-format +msgid "Couldn't open XMMS audio output (fmt=%x, freq=%i, nchan=%i)!\n" +msgstr "" + +#: src/sid/xmms-sid.c:491 +msgid "Oversampling rate-conversion pass failed.\n" +msgstr "L'opération de conversion par suréchantillonnage a échoué.\n" + +#: src/sid/xmms-sid.glade:8 +#: src/sid/xs_interface.c:213 +msgid "Audacious-SID configuration" +msgstr "Configuration de 'Audacious-SID'" + +#: src/sid/xmms-sid.glade:71 +#: src/sid/xs_interface.c:249 +msgid "8-bit" +msgstr "8 bits" + +#: src/sid/xmms-sid.glade:90 +#: src/sid/xs_interface.c:256 +msgid "16-bit" +msgstr "16 bits" + +#: src/sid/xmms-sid.glade:111 +#: src/sid/xs_interface.c:263 +msgid "Resolution:" +msgstr "Résolution :" + +#: src/sid/xmms-sid.glade:196 +#: src/sid/xs_interface.c:294 +msgid "Autopanning" +msgstr "Son panoramique" + +#: src/sid/xmms-sid.glade:217 +#: src/sid/xs_interface.c:301 +#: src/vorbis/fileinfo.c:867 +#: src/vorbis/fileinfo.c:924 +msgid "Channels:" +msgstr "Sortie :" + +#: src/sid/xmms-sid.glade:384 +#: src/sid/xs_interface.c:345 +msgid "Samplerate:" +msgstr "Taux d'échantillonnage :" + +#: src/sid/xmms-sid.glade:430 +#: src/sid/xs_interface.c:362 +msgid "Use oversampling" +msgstr "Utiliser le suréchantillonnage" + +#: src/sid/xmms-sid.glade:456 +#: src/sid/xs_interface.c:373 +msgid "Factor:" +msgstr "Facteur :" + +#: src/sid/xmms-sid.glade:500 +#: src/sid/xs_interface.c:385 +msgid "Large factors require more CPU-power" +msgstr "Les facteurs élevés nécessitent plus de ressources du processeur" + +#: src/sid/xmms-sid.glade:534 +#: src/sid/xs_interface.c:391 +msgid "Oversampling:" +msgstr "Suréchantillonnage :" + +#: src/sid/xmms-sid.glade:570 +#: src/sid/xs_interface.c:396 +msgid "Audio" +msgstr "Audio" + +#: src/sid/xmms-sid.glade:620 +#: src/sid/xs_interface.c:428 +msgid "If enabled, this option \"forces\" the emulation engine to use the selected clock speed/frequency. Otherwise the speed is determined from played file itself." +msgstr "Activée, cette option \"force\" le moteur de l'émulation à utiliser la vitesse/fréquence de l'horloge sélectionnée. Dans le cas contraire, la vitesse est déterminée par le fichier lui-même." + +#: src/sid/xmms-sid.glade:622 +#: src/sid/xs_interface.c:424 +msgid "Force speed" +msgstr "Forcer la vitesse" + +#: src/sid/xmms-sid.glade:640 +#: src/sid/xs_interface.c:434 +msgid "PAL is the european TV standard, which uses 50Hz vertical refresh frequency. Most of SID-tunes have been made for PAL computers." +msgstr "'PAL' est le standard télévisuel européen ; il utilise une fréquence de rafraîchissement vertical de 50 hz. La plupart des compositions 'SID' ont été réalisées pour les ordinateurs 'PAL'." + +#: src/sid/xmms-sid.glade:642 +#: src/sid/xs_interface.c:430 +msgid "PAL (50 Hz)" +msgstr "PAL (50 Hz)" + +#: src/sid/xmms-sid.glade:660 +#: src/sid/xs_interface.c:442 +msgid "NTSC is the TV standard with 60Hz vertical refresh rate (and other features that differ from PAL). It is mainly used in United States, Japan and certain other countries." +msgstr "'NTSC' est le standard télévisuel qui utilise un taux de rafraîchissement vertical de 60 Hz (et d'autres caractéristiques qui diffèrent du standard 'PAL'). Il est principalement utilisé aux États-Unis, au Japon et dans d'autres pays." + +#: src/sid/xmms-sid.glade:662 +#: src/sid/xs_interface.c:438 +msgid "NTSC (60 Hz)" +msgstr "NTSC (60 Hz)" + +#: src/sid/xmms-sid.glade:683 +#: src/sid/xs_interface.c:446 +msgid "Clock speed:" +msgstr "Vitesse d'horloge :" + +#: src/sid/xmms-sid.glade:728 +#: src/sid/xs_interface.c:467 +msgid "If enabled, this option \"forces\" the emulation engine to use the selected SID-chip model. Otherwise the preferred SID model is determined from the file (if PSIDv2NG type) or if not available, this setting is used." +msgstr "Activée, cette option \"force\" le moteur de l'émulation à utiliser le modèle de puce 'SID' sélectionné. Dans le cas contraire, le modèle 'SID' adéquat est déterminé à partir du fichier (s'il est du type 'PSIDv2NG'). Si l'information concernant le modèle n'est pas disponible, c'est le réglage choisi via cette option qui sera utilisé." + +#: src/sid/xmms-sid.glade:730 +#: src/sid/xs_interface.c:463 +msgid "Force model" +msgstr "Forcer le modèle" + +#: src/sid/xmms-sid.glade:748 +#: src/sid/xs_interface.c:473 +msgid "MOS/CSG 6581 is the earlier major version of SID chip. It differs from 8580 in few ways, having much fuller filter (which, due to design error, is never same between two different SID-chips) and has the \"volume adjustment bug\", which enables playing of digital samples." +msgstr "'MOS/CSG 6581 est la toute première version majeure de la puce 'SID'. Elle diffère du modèle '8580' de plusieurs manières : elle dispose d'un filtre plus complet (qui, à cause d'une erreur de conception, n'est jamais le même, d'un modèle de puce 'SID' à l'autre) et présente le \"problème d'ajustement du volume\" qui permet la lecture des échantillons digitaux." + +#: src/sid/xmms-sid.glade:750 +#: src/sid/xs_interface.c:469 +msgid "MOS 6581" +msgstr "MOS 6581" + +#: src/sid/xmms-sid.glade:769 +#: src/sid/xs_interface.c:477 +msgid "MOS 8580" +msgstr "MOS 8580" + +#: src/sid/xmms-sid.glade:790 +#: src/sid/xs_interface.c:484 +msgid "SID model:" +msgstr "Modèle 'SID' :" + +#: src/sid/xmms-sid.glade:842 +#: src/sid/xs_interface.c:505 +msgid "Use libSIDPlay 1.x emulation, faster but not so accurate. Good in most cases, though." +msgstr "Utilise la librairie 'libSIDPlay 1.x'. L'émulation est plus rapide, mais moins précise (toutefois, elle offre une bonne restitution, dans la plupart des cas)." + +#: src/sid/xmms-sid.glade:844 +#: src/sid/xs_interface.c:501 +msgid "SIDPlay 1 (frame-based)" +msgstr "SIDPlay 1 (synchronisation de la trame)" + +#: src/sid/xmms-sid.glade:863 +#: src/sid/xs_interface.c:513 +msgid "Use libSIDPlay 2.x emulation, which requires powerful CPU due to more exact emulation." +msgstr "Utilise la librairie 'libSIDPlay 2.x'. L'émulation nécessite un processeur puissant, mais est plus précise." + +#: src/sid/xmms-sid.glade:865 +#: src/sid/xs_interface.c:509 +msgid "SIDPlay 2 (cycle-based)" +msgstr "SIDPlay 2 (synchronisation du cycle)" + +#: src/sid/xmms-sid.glade:887 +#: src/sid/xs_interface.c:517 +msgid "Emulation library selection:" +msgstr "Choix de la librairie d'émulation :" + +#: src/sid/xmms-sid.glade:933 +#: src/sid/xs_interface.c:534 +msgid "Real C64 (SIDPlay 2 only)" +msgstr "C64 réel (SIDPlay 2 uniquement)" + +#: src/sid/xmms-sid.glade:952 +#: src/sid/xs_interface.c:541 +msgid "Bank switching" +msgstr "Pagination" + +#: src/sid/xmms-sid.glade:972 +#: src/sid/xs_interface.c:548 +msgid "Transparent ROM" +msgstr "ROM transparente" + +#: src/sid/xmms-sid.glade:992 +#: src/sid/xs_interface.c:555 +msgid "PlaySID environment" +msgstr "Environnement 'PlaySID'" + +#: src/sid/xmms-sid.glade:1013 +#: src/sid/xs_interface.c:562 +msgid "Memory mode:" +msgstr "Gestion de la mémoire :" + +#: src/sid/xmms-sid.glade:1049 +#: src/sid/xs_interface.c:567 +msgid "Emu#1" +msgstr "Émulation #1" + +#: src/sid/xmms-sid.glade:1093 +#: src/sid/xs_interface.c:594 +msgid "This setting can be used to enable libSIDPlay2's \"optimization mode\", which in downgrades the emulation from cycle-exact to something similar to frame-exact. The result is lower CPU usage, but worse accuracy." +msgstr "Ce réglage peut être utilisé pour activer le \"mode d'optimisation\" de la librairie 'libSIDPlay2'. Ce mode réduit l'émulation de 'synchronisation du cycle' à quelque chose équivalant à 'synchronisation de la trame'." + +#: src/sid/xmms-sid.glade:1095 +#: src/sid/xs_interface.c:590 +msgid "Optimization mode (faster, inaccurate)" +msgstr "Mode 'optimisation' (plus rapide, mais imprécis)" + +#: src/sid/xmms-sid.glade:1113 +#: src/sid/xs_interface.c:600 +msgid "reSID is the software SID-chip simulator based on SID reverse-engineering, created by Dag Lem. It is probably the closest thing to real SID available as software-only emulation." +msgstr "'reSID' est le simulateur logiciel de puces 'SID' créé par Dag Lem par ingénierie inverse. Il constitue probablement l'émulation logicielle la plus proche des véritables puces 'SID'." + +#: src/sid/xmms-sid.glade:1115 +#: src/sid/xs_interface.c:596 +msgid "reSID-emulation" +msgstr "Émulation 'reSID'" + +#: src/sid/xmms-sid.glade:1133 +#: src/sid/xs_interface.c:608 +msgid "HardSID is a EISA/PCI card for PC-compatibles, which can be fitted with a real SID-chip. Software can be used to control the HardSID and combined with software emulation of rest of C64 via libSIDPlay2 HardSID can be used to achieve \"near 100%\" similarity to real C64. For more information, see http://www.hardsid.com/" +msgstr "'HardSID' est une carte EISA/PCI destinée aux systèmes compatibles PC, dans laquelle peut être insérée une véritable puce 'SID'. La carte 'HardSID' peut être contrôlée par un logiciel, mais, combinée à l'émulation d'un système C64 fournie par la librairie 'libSIDPlay2', elle permet d'obtenir un rendu sonore \"presque\" similaire à celui d'un véritable C64. Pour de plus amples informations, vous pouvez consulter le site suivant : http://www.hardsid.com/" + +#: src/sid/xmms-sid.glade:1135 +#: src/sid/xs_interface.c:604 +msgid "HardSID" +msgstr "HardSID" + +#: src/sid/xmms-sid.glade:1156 +#: src/sid/xs_interface.c:612 +msgid "SIDPlay 2 options:" +msgstr "Options de 'SIDPlay 2' :" + +#: src/sid/xmms-sid.glade:1201 +#: src/sid/xs_interface.c:633 +msgid "Fastest and also worst sounding sampling method, simply picks nearest neighbouring sample." +msgstr "La plus rapide, mais aussi la pire méthode de restitution sonore : les échantillons sont choisis selon la méthode du 'plus proche voisin'." + +#: src/sid/xmms-sid.glade:1203 +#: src/sid/xs_interface.c:629 +msgid "Fast (nearest neighbour)" +msgstr "Rapide (méthode du 'plus proche voisin')" + +#: src/sid/xmms-sid.glade:1221 +#: src/sid/xs_interface.c:641 +msgid "Uses linear interpolation between samples, yielding higher audio quality with less sampling noise." +msgstr "Utilise l'interpolation linéaire entre les échantillons. Le flux audio est alors de plus grande qualité et est moins affecté par le bruit. " + +#: src/sid/xmms-sid.glade:1223 +#: src/sid/xs_interface.c:637 +msgid "Linear interpolation" +msgstr "Interpolation linéaire" + +#: src/sid/xmms-sid.glade:1263 +#: src/sid/xs_interface.c:652 +msgid "Resampling (FIR)" +msgstr "Filtre à réponse impulsionnelle finie (FIR)" + +#: src/sid/xmms-sid.glade:1284 +#: src/sid/xs_interface.c:659 +msgid "reSID sampling options:" +msgstr "Options d'échantillonnage de 'reSID' :" + +#: src/sid/xmms-sid.glade:1320 +#: src/sid/xs_interface.c:664 +msgid "Emu#2" +msgstr "Émulation #2" + +#: src/sid/xmms-sid.glade:1350 +#: src/sid/xs_interface.c:680 +msgid "This option enables emulation of SID filter. The filter is an essential part of SID's sound capacity, but accurate emulation of it may require quite much CPU power. However, if filter emulation is disabled, tunes won't sound authentic at all if they utilize the filter." +msgstr "Cette option active l'émulation des filtres 'SID'. Le filtre constitue l'élément' essentiel de la qualité du son 'SID', mais une émulation précise peut utiliser beaucoup de ressources du processeur. Cependant, si l'émulation est désactivée, alors qu'un module audio a été composé avec les fonctions d'un filtre, le son ne sera pas restitué de manière authentique." + +#: src/sid/xmms-sid.glade:1352 +#: src/sid/xs_interface.c:676 +msgid "Emulate filters" +msgstr "Émuler les filtres" + +#: src/sid/xmms-sid.glade:1409 +#: src/sid/xs_interface.c:705 +msgid "FS" +msgstr "FS" + +#: src/sid/xmms-sid.glade:1460 +#: src/sid/xs_interface.c:722 +msgid "FM" +msgstr "FM" + +#: src/sid/xmms-sid.glade:1511 +#: src/sid/xs_interface.c:739 +msgid "FT" +msgstr "FT" + +#: src/sid/xmms-sid.glade:1549 +#: src/sid/xs_interface.c:750 +msgid "Reset values" +msgstr "Réinitialiser" + +#: src/sid/xmms-sid.glade:1578 +#: src/sid/xs_interface.c:755 +msgid "SIDPlay1" +msgstr "SIDPlay 1" + +#: src/sid/xmms-sid.glade:1690 +#: src/sid/xs_interface.c:796 +msgid "Export" +msgstr "Exporter" + +#: src/sid/xmms-sid.glade:1711 +#: src/sid/xs_interface.c:804 +msgid "Use" +msgstr "Utiliser" + +#: src/sid/xmms-sid.glade:1753 +#: src/sid/xs_interface.c:820 +msgid "Import" +msgstr "Importer" + +#: src/sid/xmms-sid.glade:1774 +#: src/sid/xs_interface.c:828 +msgid "Delete" +msgstr "Supprimer" + +#: src/sid/xmms-sid.glade:1819 +#: src/sid/xs_interface.c:842 +msgid "Filter curve:" +msgstr "Courbe du filtre :" + +#: src/sid/xmms-sid.glade:1855 +#: src/sid/xs_interface.c:847 +msgid "SIDPlay2" +msgstr "SIDPlay 2" + +#: src/sid/xmms-sid.glade:1891 +#: src/sid/xs_interface.c:853 +msgid "Filters" +msgstr "Filtres" + +#: src/sid/xmms-sid.glade:1935 +#: src/sid/xs_interface.c:880 +msgid "If enabled, the tune is played at least for the specified time, adding silence to the end if necessary." +msgstr "Si cette option est activée, le module audio sera lu au moins pendant la durée indiquée. Si cela s'avère nécessaire, un silence sera ajouté à la fin du morceau." + +#: src/sid/xmms-sid.glade:1937 +#: src/sid/xs_interface.c:876 +msgid "Play at least for specified time" +msgstr "Lire au moins pendant la durée indiquée" + +#: src/sid/xmms-sid.glade:1962 +#: src/sid/xmms-sid.glade:2133 +#: src/sid/xmms-sid.glade:2482 +#: src/sid/xs_interface.c:887 +#: src/sid/xs_interface.c:941 +#: src/sid/xs_interface.c:1051 +msgid "Playtime:" +msgstr "Durée :" + +#: src/sid/xmms-sid.glade:2041 +#: src/sid/xs_interface.c:907 +msgid "Minimum playtime:" +msgstr "Durée de lecture minimale :" + +#: src/sid/xmms-sid.glade:2086 +#: src/sid/xs_interface.c:928 +msgid "If enabled, tune is played until specified duration is reached (aka maximum playtime)." +msgstr "Si cette option est activée, le module audio sera lu jusqu'à ce que soit atteinte la durée indiquée (la durée de lecture maximale, en d'autres termes)." + +#: src/sid/xmms-sid.glade:2088 +#: src/sid/xs_interface.c:924 +msgid "Play for specified time maximum" +msgstr "Lire au maximum pendant la durée indiquée" + +#: src/sid/xmms-sid.glade:2107 +#: src/sid/xs_interface.c:934 +msgid "If enabled, the maximum playtime is applied only if song/tune length is not known." +msgstr "Si cette option est activée, la durée de lecture maximale ne sera appliquée que si la durée du module audio ne peut pas être déterminée." + +#: src/sid/xmms-sid.glade:2109 +#: src/sid/xs_interface.c:930 +msgid "Only when song length is unknown" +msgstr "Uniquement si la durée du module audio est inconnue" + +#: src/sid/xmms-sid.glade:2212 +#: src/sid/xs_interface.c:961 +msgid "Maximum playtime:" +msgstr "Durée de lecture maximale :" + +#: src/sid/xmms-sid.glade:2257 +#: src/sid/xs_interface.c:982 +msgid "This option enables using of XSIDPLAY compatible song length database. (Refer to Audacious-SID documentation for more information)" +msgstr "Cette option active l'utilisation d'une base de données compatible 'XSIDPLAY' relative à la durée des modules audio. Pour de plus amples informations, vous pouvez consulter la documentation de 'Audacious-SID'." + +#: src/sid/xmms-sid.glade:2259 +#: src/sid/xs_interface.c:978 +msgid "Use XSIDPLAY-compatible database" +msgstr "Utiliser une base de données compatible 'XSIDPLAY'" + +#: src/sid/xmms-sid.glade:2284 +#: src/sid/xs_interface.c:989 +msgid "DB-file:" +msgstr "Fichier :" + +#: src/sid/xmms-sid.glade:2309 +#: src/sid/xs_interface.c:999 +msgid "Database path and filename" +msgstr "Emplacement et nom du fichier de la base de données" + +#: src/sid/xmms-sid.glade:2329 +#: src/sid/xs_interface.c:1006 +msgid "Browse for song length-database file" +msgstr "Permet de parcourir l'arborescence pour sélectionner le fichier de la base de données" + +#: src/sid/xmms-sid.glade:2356 +#: src/sid/xs_interface.c:1008 +msgid "Song length database:" +msgstr "Base de données relative à la durée des modules audio :" + +#: src/sid/xmms-sid.glade:2392 +#: src/sid/xs_interface.c:1013 +msgid "Songlength" +msgstr "Durée" + +#: src/sid/xmms-sid.glade:2437 +#: src/sid/xs_interface.c:1036 +msgid "Add sub-tunes to playlist" +msgstr "Ajouter des sous-modules à la liste de lecture" + +#: src/sid/xmms-sid.glade:2457 +#: src/sid/xs_interface.c:1041 +msgid "Only tunes with specified minimum length " +msgstr "Uniquement les morceaux dont la durée minimale est la suivante :" + +#: src/sid/xmms-sid.glade:2560 +#: src/sid/xs_interface.c:1071 +msgid "Sub-tune handling:" +msgstr "Contrôle des sous-modules :" + +#: src/sid/xmms-sid.glade:2605 +#: src/sid/xs_interface.c:1092 +msgid "If this option is enabled (and the database & HVSC settings below are correctly set), Audacious-SID will use and display additional information from STIL database when HVSC SIDs are played." +msgstr "Si cette option est activée (et que la base de données ainsi que les paramètres 'HVSC' ci-dessous sont correctement configurés), 'Audacious-SID' utilisera et affichera des informations supplémentaires, à partir de la base de données 'STIL', lorsque des modules audio 'SID' de la collection 'HVSC' seront lus." + +#: src/sid/xmms-sid.glade:2607 +#: src/sid/xs_interface.c:1088 +msgid "Use STIL database" +msgstr "Utiliser une base de données 'STIL'" + +#: src/sid/xmms-sid.glade:2632 +#: src/sid/xs_interface.c:1099 +msgid "STIL file:" +msgstr "Fichier 'STIL' :" + +#: src/sid/xmms-sid.glade:2669 +#: src/sid/xs_interface.c:1115 +msgid "Path and filename of STIL database file (STIL.txt), usually found from HVSC's DOCUMENTS-subdirectory." +msgstr "Emplacement et nom du fichier de la base de données 'STIL' (le fichier 'STIL.txt' est habituellement situé dans le sous-répertoire 'DOCUMENTS' du dossier 'HVSC')." + +#: src/sid/xmms-sid.glade:2704 +#: src/sid/xs_interface.c:1128 +msgid "Browse for STIL-database file" +msgstr "Permet de parcourir l'arborescence pour sélectionner le fichier de la base de données 'STIL'" + +#: src/sid/xmms-sid.glade:2738 +#: src/sid/xs_interface.c:1135 +msgid "HVSC path:" +msgstr "Emplacement de 'HVSC' :" + +#: src/sid/xmms-sid.glade:2775 +#: src/sid/xs_interface.c:1151 +msgid "Path to base-directory of your High Voltage SID Collection (HVSC), for example /media/C64Music/" +msgstr "Emplacement du dossier de base de 'High Voltage SID Collection' (HVSC) ('/media/C64Music/', par exemple)" + +#: src/sid/xmms-sid.glade:2810 +#: src/sid/xs_interface.c:1164 +msgid "Browse for HVSC path" +msgstr "Permet de parcourir l'arborescence pour sélectionner le dossier 'HVSC'" + +#: src/sid/xmms-sid.glade:2840 +#: src/sid/xs_interface.c:1166 +msgid "SID Tune Information List (STIL) database:" +msgstr "Base de données 'STIL' (SID Tune Information List) :" + +#: src/sid/xmms-sid.glade:2913 +#: src/sid/xs_interface.c:1190 +msgid "Accept and update changes" +msgstr "Valide et applique les changements" + +#: src/sid/xmms-sid.glade:2927 +#: src/sid/xs_interface.c:1197 +msgid "Cancel any changes" +msgstr "Annule tous les changements" + +#: src/sid/xmms-sid.glade:2952 +#: src/sid/xs_interface.c:1474 +msgid "Audacious-SID Fileinfo" +msgstr "Infomations sur le fichier 'Audacious-SID'" + +#: src/sid/xmms-sid.glade:3022 +#: src/sid/xs_interface.c:1503 +msgid "Songname:" +msgstr "Nom du morceau :" + +#: src/sid/xmms-sid.glade:3050 +#: src/sid/xs_interface.c:1511 +msgid "Composer:" +msgstr "Compositeur :" + +#: src/sid/xmms-sid.glade:3078 +#: src/sid/xs_interface.c:1519 +#: src/vorbis/fileinfo.c:723 +msgid "Copyright:" +msgstr "Droits :" + +#: src/sid/xmms-sid.glade:3192 +#: src/sid/xs_interface.c:1563 +msgid "Song Information:" +msgstr "Informations sur le module :" + +#: src/sid/xmms-sid.glade:3266 +#: src/sid/xs_interface.c:1598 +msgid "Author:" +msgstr "Auteur :" + +#: src/sid/xmms-sid.glade:3364 +#: src/sid/xs_interface.c:1632 +msgid "Duration:" +msgstr "Durée :" + +#: src/sid/xmms-sid.glade:3458 +#: src/sid/xs_interface.c:1666 +msgid "Sub-tune Information:" +msgstr "Informations sur les sous-modules :" + +#: src/sid/xmms-sid.glade:3512 +#: src/sid/xs_interface.c:1727 +msgid "Select HVSC song length database" +msgstr "Choix de la base de données 'HVSC'" + +#: src/sid/xmms-sid.glade:3554 +#: src/sid/xs_interface.c:1768 +msgid "Select STIL-database" +msgstr "Choix de la base de données 'STIL'" + +#: src/sid/xmms-sid.glade:3596 +#: src/sid/xs_interface.c:1809 +msgid "Select HVSC location prefix" +msgstr "Emplacement de 'HVSC'" + +#: src/sid/xmms-sid.glade:3638 +#: src/sid/xs_interface.c:1850 +msgid "Select SIDPlay2 filters file for importing" +msgstr "" + +#: src/sid/xmms-sid.glade:3680 +#: src/sid/xs_interface.c:1891 +msgid "Select SIDPlay2 filters file for exporting" +msgstr "" + +#: src/sid/xmms-sid.glade:3721 +#: src/sid/xmms-sid.glade:3803 +#: src/sid/xs_interface.c:1939 +#: src/sid/xs_interface.c:1952 +msgid "Confirm selected action" +msgstr "Confirmer l'action choisie" + +#: src/sid/xmms-sid.glade:3759 +#: src/sid/xs_interface.c:1969 +msgid "Yes" +msgstr "Oui" + +#: src/sid/xmms-sid.glade:3771 +#: src/sid/xs_interface.c:1975 +msgid "No" +msgstr "Aucun" + +#: src/sid/xs_fileinfo.c:238 +msgid "General info" +msgstr "Général" + +#: src/sid/xs_fileinfo.c:248 +#, c-format +msgid "Tune #%i: " +msgstr "Module #%i : " + +#: src/sid/xs_fileinfo.c:259 +#, c-format +msgid "Tune #%i" +msgstr "Module #%i : " + +#: src/sid/xs_length.c:113 +msgid "Error allocating new node. Fatal error.\n" +msgstr "" + +#: src/sid/xs_length.c:128 +#, c-format +msgid "'=' expected on column #%d.\n" +msgstr "" + +#: src/sid/xs_length.c:153 +msgid "Could not allocate memory for node.\n" +msgstr "" + +#: src/sid/xs_length.c:204 +#, c-format +msgid "Could not open SongLengthDB '%s'\n" +msgstr "" + +#: src/sid/xs_length.c:224 +#, c-format +msgid "Invalid MD5-hash in SongLengthDB file '%s' line #%d!\n" +msgstr "" + +#: src/sid/xs_length.c:231 +#, c-format +msgid "Invalid entry in SongLengthDB file '%s' line #%d!\n" +msgstr "" + +#: src/sid/xs_length.c:236 +#, c-format +msgid "Invalid line in SongLengthDB file '%s' line #%d\n" +msgstr "" + +#: src/sid/xs_length.c:398 +#, c-format +msgid "Not a PSID or RSID file '%s'\n" +msgstr "" + +#: src/sid/xs_length.c:417 +#, c-format +msgid "Error reading SID file header from '%s'\n" +msgstr "Erreur lors de la lecture de l'en-tête du fichier '%s'\n" + +#: src/sid/xs_length.c:436 +#, c-format +msgid "Error allocating temp data buffer for file '%s'\n" +msgstr "" + +#: src/sid/xs_sidplay1.cc:96 +msgid "[SIDPlay1] Could not initialize emulation engine.\n" +msgstr "[SIDPlay1] : impossible d'initialiser le moteur de l'émulation.\n" + +#: src/sid/xs_sidplay1.cc:103 +msgid "[SIDPlay1] Endianess verification failed.\n" +msgstr "" + +#: src/sid/xs_sidplay1.cc:238 +msgid "[SIDPlay1] Emulator engine configuration failed!\n" +msgstr "[SIDPlay1] : échec lors de la configuration du moteur de l'émulation !\n" + +#: src/sid/xs_sidplay1.cc:245 +msgid "[SIDPlay1] Could not initialize SIDTune object.\n" +msgstr "" + +#: src/sid/xs_sidplay1.cc:291 +msgid "[SIDPlay1] SID-tune struct pointer was NULL. This should not happen, report to XMMS-SID author.\n" +msgstr "" + +#: src/sid/xs_sidplay1.cc:296 +msgid "[SIDPlay1] SID-tune status check failed. This should not happen, report to XMMS-SID author.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:101 +msgid "[SIDPlay2] Could not initialize emulation engine.\n" +msgstr "[SIDPlay2] : impossible d'initialiser le moteur de l'émulation.\n" + +#: src/sid/xs_sidplay2.cc:208 +#, c-format +msgid "[SIDPlay2] Invalid number of filter curve points (%d > %d)\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:229 +msgid "reSID->create() failed.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:235 +#, c-format +msgid "reSID->filter(%d) failed.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:243 +#, c-format +msgid "reSID->sampling(%d) failed.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:253 +msgid "reSID->filter(NULL) failed.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:267 +msgid "hardSID->create() failed.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:273 +#, c-format +msgid "hardSID->filter(%d) failed.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:281 +msgid "[SIDPlay2] Could not initialize SIDBuilder object.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:295 +#, c-format +msgid "[SIDPlay2] Invalid clockSpeed=%d, falling back to PAL.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:319 +#, c-format +msgid "Invalid sid2OptLevel=%d, falling back to %d.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:343 +msgid "[SIDPlay2] Emulator engine configuration failed!\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:350 +msgid "[SIDPlay2] Could not initialize SIDTune object.\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:401 +msgid "[SIDPlay2] currTune->selectSong() failed\n" +msgstr "" + +#: src/sid/xs_sidplay2.cc:406 +msgid "[SIDPlay2] currEng->load() failed\n" +msgstr "" + +#: src/sid/xs_stil.c:46 +msgid "SubTune pointer structure realloc failed.\n" +msgstr "" + +#: src/sid/xs_stil.c:69 +msgid "SubTune structure malloc failed!\n" +msgstr "" + +#: src/sid/xs_stil.c:176 +#, c-format +msgid "Could not open STILDB '%s'\n" +msgstr "Impossible d'ouvrir la base de données STILDB '%s'\n" + +#: src/sndstretch/sndstretch_xmms.c:163 +msgid "About SndStretch" +msgstr "À propos de 'SndStretch'" + +#: src/sndstretch/sndstretch_xmms.c:323 +msgid "Volume corr." +msgstr "Correction du volume" + +#: src/sndstretch/sndstretch_xmms.c:324 +msgid "Short Overlap" +msgstr "Chevauchement léger" + +#: src/sndstretch/sndstretch_xmms.c:378 +msgid "Speed" +msgstr "Vitesse" + +#: src/sndstretch/sndstretch_xmms.c:379 +msgid "Pitch" +msgstr "Hauteur" + +#: src/sndstretch/sndstretch_xmms.c:380 +msgid "Scale" +msgstr "Échelle" + +#: src/sndstretch/sndstretch_xmms.c:400 +msgid "SndStretch - Configuration" +msgstr "Configuration de 'SndStretch'" + +#: src/song_change/song_change.c:349 +msgid "Commands" +msgstr "Commandes" + +#: src/song_change/song_change.c:356 +msgid "Command to run when Audacious starts a new song." +msgstr "Commande à exécuter lorsqu'un nouveau morceau commence :" + +#: src/song_change/song_change.c:365 +#: src/song_change/song_change.c:387 +#: src/song_change/song_change.c:408 +#: src/song_change/song_change.c:429 +msgid "Command:" +msgstr "Commande :" + +#: src/song_change/song_change.c:379 +msgid "Command to run toward the end of a song." +msgstr "Commande à exécuter lorsque la lecture d'un morceau se termine :" + +#: src/song_change/song_change.c:399 +msgid "Command to run when Audacious reaches the end of the playlist." +msgstr "Commande à exécuter lorsque la fin de la liste de lecture est atteinte :" + +#: src/song_change/song_change.c:420 +msgid "Command to run when title changes for a song (i.e. network streams titles)." +msgstr "Commande à exécuter lorsque le titre d'un morceau change (le titre des flux distants, par exemple) :" + +#: src/song_change/song_change.c:441 +#, c-format +msgid "" +"You can use the following format strings which\n" +"will be substituted before calling the command\n" +"(not all are useful for the end-of-playlist command).\n" +"\n" +"%%F: Frequency (in hertz)\n" +"%%c: Number of channels\n" +"%%f: filename (full path)\n" +"%%l: length (in milliseconds)\n" +"%%n or %%s: Song name\n" +"%%r: Rate (in bits per second)\n" +"%%t: Playlist position (%%02d)\n" +"%%p: Currently playing (1 or 0)" +msgstr "" +"Vous pouvez utiliser les chaînes de la liste ci-dessous.\n" +"Elles seront remplacées avant l'appel de la commande à exécuter\n" +"(toutes ne sont pas utiles pour la fonction 'fin de liste') :\n" +"\n" +"%%F: Fréquence (en Hertz)\n" +"%%c: Nombre de voies\n" +"%%f: Nom du fichier (chemin complet)\n" +"%%l: Durée (en millisecondes)\n" +"%%n ou %%s: Titre du morceau\n" +"%%r: Taux d'encodage (en bits par seconde)\n" +"%%t: Position dans la liste de lecture (%%02d)\n" +"%%p: Statut de la lecture (1 ou 0)" + +#: src/song_change/song_change.c:466 +msgid "Parameters passed to the shell should be encapsulated in quotes. Doing otherwise is a security risk." +msgstr "" +"Les arguments à lancer dans la console doivent être entourés de guillemets.\n" +"Une utilisation différente constitue un risque en matière de sécurité." + +#: src/spectrum/spectrum.c:96 +msgid "Spectrum Analyzer" +msgstr "Analyseur Spectral" + +#: src/statusicon/gtktrayicon-x11.c:133 +msgid "Orientation" +msgstr "Orientation" + +#: src/statusicon/gtktrayicon-x11.c:134 +msgid "The orientation of the tray" +msgstr "Définit l'orientation de l'icône" + +#: src/statusicon/si_ui.c:571 +msgid "About Status Icon Plugin" +msgstr "À propos du module 'Status Icon'" + +#: src/statusicon/si_ui.c:573 +msgid "" +"\n" +"written by Giacomo Lozito < james@develia.org >\n" +"\n" +"This plugin provides a status icon, placed in\n" +"the system tray area of the window manager.\n" +msgstr "" +"\n" +"Écrit par Giacomo Lozito < james@develia.org >\n" +"\n" +"Ce module affiche une icône de statut dans la\n" +"boîte de notification du gestionnaire de fenêtres.\n" + +#: src/statusicon/si_ui.c:645 +msgid "Status Icon Plugin - Preferences" +msgstr "Préférences de 'Status Icon'" + +#: src/statusicon/si_ui.c:656 +msgid "Right-Click Menu" +msgstr "Menu disponible via le clic droit :" + +#: src/statusicon/si_ui.c:661 +msgid "Audacious standard menu" +msgstr "Menu standard d'Audacious" + +#: src/statusicon/si_ui.c:666 +msgid "Small playback menu #1" +msgstr "Menu de lecture compact #1" + +#: src/statusicon/si_ui.c:671 +msgid "Small playback menu #2" +msgstr "Menu de lecture compact #2" + +#: src/statusicon/si_ui.c:694 +msgid "Mouse Scroll Action" +msgstr "Effet du défilement de la souris :" + +#: src/statusicon/si_ui.c:699 +msgid "Change volume" +msgstr "Changement du volume" + +#: src/statusicon/si_ui.c:704 +msgid "Change playing song" +msgstr "Changement du titre en cours de lecture" + +#: src/stereo_plugin/stereo.c:29 +msgid "" +"Extra Stereo Plugin\n" +"\n" +"By Johan Levin 1999." +msgstr "" +"Module 'Extra Stereo'\n" +"\n" +"Écrit par Johan Levin (1999)." + +#: src/stereo_plugin/stereo.c:55 +msgid "About Extra Stereo Plugin" +msgstr "À propos..." + +#: src/stereo_plugin/stereo.c:96 +msgid "Configure Extra Stereo" +msgstr "Configurer 'Extra Stereo'" + +#: src/stereo_plugin/stereo.c:98 +msgid "Effect intensity:" +msgstr "Intensité de l'effet :" + +#: src/sun/about.c:34 +msgid "About the Sun Driver" +msgstr "À propos du pilote 'Sun'" + +#: src/sun/about.c:35 +msgid "" +"XMMS BSD Sun Driver\n" +"\n" +"Copyright (c) 2001 CubeSoft Communications, Inc.\n" +"Maintainer: .\n" +msgstr "" +"Pilote 'Sun BSD' pour XMMS\n" +"\n" +"Droits d'utilisation :\n" +"(c) 2001, CubeSoft Communications, Inc.\n" +"\n" +"Responsable de la maintenance :\n" +".\n" + +#: src/sun/configure.c:201 +msgid "Audio control device:" +msgstr "Périphérique de contrôle audio :" + +#: src/sun/configure.c:350 +msgid "Volume controls device:" +msgstr "Périphérique de contrôle du volume :" + +#: src/sun/configure.c:363 +msgid "XMMS uses mixer exclusively." +msgstr "XMMS utilise le mélangeur audio de manière exclusive." + +#: src/sun/configure.c:538 +msgid "Sun driver configuration" +msgstr "Configuration du pilote 'Sun'" + +#: src/timidity/src/interface.c:56 +msgid "TiMidity Configuration" +msgstr "Configuration de 'TiMidity'" + +#: src/timidity/src/interface.c:93 +msgid "11000 Hz" +msgstr "11000 Hz" + +#: src/timidity/src/interface.c:101 +msgid "22000 Hz" +msgstr "22000 Hz" + +#: src/timidity/src/interface.c:109 +msgid "44100 Hz" +msgstr "44100 Hz" + +#: src/timidity/src/interface.c:117 +msgid "Sample Width" +msgstr "Résolution" + +#: src/timidity/src/interface.c:183 +msgid "TiMidity Configuration File" +msgstr "Fichier de configuration de 'TiMidity'" + +#: src/timidity/src/xmms-timidity.c:134 +msgid "" +"TiMidity Plugin\n" +"http://libtimidity.sourceforge.net\n" +"by Konstantin Korikov" +msgstr "" +"Module 'TiMidity'\n" +"\n" +"http://libtimidity.sourceforge.net\n" +"\n" +"Écrit par Konstantin Korikov" + +#: src/timidity/src/xmms-timidity.c:135 +#, c-format +msgid "TiMidity Plugin %s" +msgstr "Module 'TiMidity' %s" + +#: src/timidity/src/xmms-timidity.c:352 +msgid "Couldn't load MIDI file" +msgstr "Impossible de lire le fichier MIDI" + +#: src/tonegen/tonegen.c:56 +msgid "About Tone Generator" +msgstr "À propos de 'Tone Generator'" + +#: src/tonegen/tonegen.c:58 +msgid "" +"Sinus tone generator by Haavard Kvaalen \n" +"Modified by Daniel J. Peng \n" +"\n" +"To use it, add a URL: tone://frequency1;frequency2;frequency3;...\n" +"e.g. tone://2000;2005 to play a 2000Hz tone and a 2005Hz tone" +msgstr "" +"Générateur de sons sinusoïdaux écrit par Haavard Kvaalen \n" +"\n" +"Modifié par Daniel J. Peng \n" +"\n" +"Pour utiliser ce module, il suffit d'ajouter une adresse du type :\n" +"tone://fréquence1;fréquence2;fréquence3;...\n" +"\n" +"Par exemple, 'tone://2000;2005' émettra un son de 2000 Hz et un son de 2005 Hz." + +#: src/tonegen/tonegen.c:170 +#, c-format +msgid "%s %.1f Hz" +msgstr "%s %.1f Hz" + +#: src/tonegen/tonegen.c:170 +msgid "Tone Generator: " +msgstr "Générateur de sons : " + +#: src/tta/libtta.c:148 +msgid "Can't open file\n" +msgstr "Impossible d'ouvrir le fichier\n" + +#: src/tta/libtta.c:151 +msgid "Not supported file format\n" +msgstr "Le format du fichier n'est pas supporté\n" + +#: src/tta/libtta.c:154 +msgid "File is corrupted\n" +msgstr "Le fichier est corrompu\n" + +#: src/tta/libtta.c:157 +msgid "Can't read from file\n" +msgstr "Impossible de lire le fichier\n" + +#: src/tta/libtta.c:160 +msgid "Insufficient memory available\n" +msgstr "La mémoire disponible est insuffisante\n" + +#: src/tta/libtta.c:163 +msgid "Output plugin error\n" +msgstr "Erreur relative au module de sortie\n" + +#: src/tta/libtta.c:166 +msgid "Unknown error\n" +msgstr "Erreur inconnue\n" + +#: src/tta/libtta.c:170 +msgid "TTA Decoder Error" +msgstr "Erreur du décodeur 'TTA'" + +#: src/tta/libtta.c:279 +msgid "TTA input plugin " +msgstr "Module d'entrée 'TTA' " + +#: src/tta/libtta.c:280 +msgid "" +" for BMP\n" +"Copyright (c) 2004 True Audio Software\n" +msgstr "" +" pour BMP\n" +"Droits d'utilisation : (c) 2004, True Audio Software\n" + +#: src/tta/libtta.c:283 +msgid "About True Audio Plugin" +msgstr "À propos du module 'True Audio'" + +#: src/tta/libtta.c:334 +msgid "ID3 Tag:" +msgstr "Métadonnées ID3" + +#: src/vorbis/configure.c:117 +msgid "Ogg Vorbis Audio Plugin Configuration" +msgstr "Configuration du module audio 'Ogg Vorbis'" + +#: src/vorbis/configure.c:129 +msgid "Ogg Vorbis Tags:" +msgstr "Métadonnées 'Ogg Vorbis' :" + +#: src/vorbis/configure.c:150 +msgid "Title format:" +msgstr "Format du titre :" + +#: src/vorbis/configure.c:164 +#: src/wavpack/ui.cxx:500 +msgid "ReplayGain Settings:" +msgstr "Paramètres de 'ReplayGain' :" + +#: src/vorbis/configure.c:182 +#: src/wavpack/ui.cxx:518 +msgid "ReplayGain Type:" +msgstr "Traitement 'ReplayGain' :" + +#: src/vorbis/configure.c:193 +#: src/wavpack/ui.cxx:529 +msgid "use Track Gain/Peak" +msgstr "Utiliser le gain/pic sonore 'piste'" + +#: src/vorbis/configure.c:203 +#: src/wavpack/ui.cxx:537 +msgid "use Album Gain/Peak" +msgstr "Utiliser le gain/pic sonore 'album'" + +#: src/vorbis/configure.c:215 +msgid "Enable 6dB Boost + Hard Limiting" +msgstr "Activer le gain de 6 dB et le limiteur de pics sonores" + +#: src/vorbis/fileinfo.c:83 +msgid "Blues" +msgstr "Blues" + +#: src/vorbis/fileinfo.c:83 +msgid "Classic Rock" +msgstr "Classic Rock" + +#: src/vorbis/fileinfo.c:83 +msgid "Country" +msgstr "Country" + +#: src/vorbis/fileinfo.c:83 +msgid "Dance" +msgstr "Dance" + +#: src/vorbis/fileinfo.c:84 +msgid "Disco" +msgstr "Disco" + +#: src/vorbis/fileinfo.c:84 +msgid "Funk" +msgstr "Funk" + +#: src/vorbis/fileinfo.c:84 +msgid "Grunge" +msgstr "Grunge" + +#: src/vorbis/fileinfo.c:84 +msgid "Hip-Hop" +msgstr "Hip-Hop" + +#: src/vorbis/fileinfo.c:85 +msgid "Jazz" +msgstr "Jazz" + +#: src/vorbis/fileinfo.c:85 +msgid "Metal" +msgstr "Metal" + +#: src/vorbis/fileinfo.c:85 +msgid "New Age" +msgstr "New Age" + +#: src/vorbis/fileinfo.c:85 +msgid "Oldies" +msgstr "Oldies" + +#: src/vorbis/fileinfo.c:86 +msgid "Other" +msgstr "Other" + +#: src/vorbis/fileinfo.c:86 +msgid "Pop" +msgstr "Pop" + +#: src/vorbis/fileinfo.c:86 +msgid "R&B" +msgstr "R&B" + +#: src/vorbis/fileinfo.c:86 +msgid "Rap" +msgstr "Rap" + +#: src/vorbis/fileinfo.c:86 +msgid "Reggae" +msgstr "Reggae" + +#: src/vorbis/fileinfo.c:87 +msgid "Rock" +msgstr "Rock" + +#: src/vorbis/fileinfo.c:87 +msgid "Techno" +msgstr "Techno" + +#: src/vorbis/fileinfo.c:87 +msgid "Industrial" +msgstr "Industrial" + +#: src/vorbis/fileinfo.c:87 +msgid "Alternative" +msgstr "Alternative" + +#: src/vorbis/fileinfo.c:88 +msgid "Ska" +msgstr "Ska" + +#: src/vorbis/fileinfo.c:88 +msgid "Death Metal" +msgstr "Death Metal" + +#: src/vorbis/fileinfo.c:88 +msgid "Pranks" +msgstr "Pranks" + +#: src/vorbis/fileinfo.c:88 +msgid "Soundtrack" +msgstr "Soundtrack" + +#: src/vorbis/fileinfo.c:89 +msgid "Euro-Techno" +msgstr "Euro-Techno" + +#: src/vorbis/fileinfo.c:89 +msgid "Ambient" +msgstr "Ambient" + +#: src/vorbis/fileinfo.c:89 +msgid "Trip-Hop" +msgstr "Trip-Hop" + +#: src/vorbis/fileinfo.c:89 +msgid "Vocal" +msgstr "Vocal" + +#: src/vorbis/fileinfo.c:90 +msgid "Jazz+Funk" +msgstr "Jazz+Funk" + +#: src/vorbis/fileinfo.c:90 +msgid "Fusion" +msgstr "Fusion" + +#: src/vorbis/fileinfo.c:90 +msgid "Trance" +msgstr "Trance" + +#: src/vorbis/fileinfo.c:90 +msgid "Classical" +msgstr "Classical" + +#: src/vorbis/fileinfo.c:91 +msgid "Instrumental" +msgstr "Instrumental" + +#: src/vorbis/fileinfo.c:91 +msgid "Acid" +msgstr "Acid" + +#: src/vorbis/fileinfo.c:91 +msgid "House" +msgstr "House" + +#: src/vorbis/fileinfo.c:91 +msgid "Game" +msgstr "Game" + +#: src/vorbis/fileinfo.c:92 +msgid "Sound Clip" +msgstr "Noise Clip" + +#: src/vorbis/fileinfo.c:92 +msgid "Gospel" +msgstr "Gospel" + +#: src/vorbis/fileinfo.c:92 +msgid "Noise" +msgstr "Noise" + +#: src/vorbis/fileinfo.c:92 +msgid "AlternRock" +msgstr "AlternRock" + +#: src/vorbis/fileinfo.c:93 +msgid "Bass" +msgstr "Bass" + +#: src/vorbis/fileinfo.c:93 +msgid "Soul" +msgstr "Soul" + +#: src/vorbis/fileinfo.c:93 +msgid "Punk" +msgstr "Punk" + +#: src/vorbis/fileinfo.c:93 +msgid "Space" +msgstr "Space" + +#: src/vorbis/fileinfo.c:94 +msgid "Meditative" +msgstr "Meditative" + +#: src/vorbis/fileinfo.c:94 +msgid "Instrumental Pop" +msgstr "Instrumental Pop" + +#: src/vorbis/fileinfo.c:95 +msgid "Instrumental Rock" +msgstr "Instrumental Rock" + +#: src/vorbis/fileinfo.c:95 +msgid "Ethnic" +msgstr "Ethnic" + +#: src/vorbis/fileinfo.c:95 +msgid "Gothic" +msgstr "Gothic" + +#: src/vorbis/fileinfo.c:96 +msgid "Darkwave" +msgstr "Darkwave" + +#: src/vorbis/fileinfo.c:96 +msgid "Techno-Industrial" +msgstr "Techno-Industrial" + +#: src/vorbis/fileinfo.c:96 +msgid "Electronic" +msgstr "Electronic" + +#: src/vorbis/fileinfo.c:97 +msgid "Pop-Folk" +msgstr "Pop-Folk" + +#: src/vorbis/fileinfo.c:97 +msgid "Eurodance" +msgstr "Eurodance" + +#: src/vorbis/fileinfo.c:97 +msgid "Dream" +msgstr "Dream" + +#: src/vorbis/fileinfo.c:98 +msgid "Southern Rock" +msgstr "Southern Rock" + +#: src/vorbis/fileinfo.c:98 +msgid "Comedy" +msgstr "Comedy" + +#: src/vorbis/fileinfo.c:98 +msgid "Cult" +msgstr "Cult" + +#: src/vorbis/fileinfo.c:99 +msgid "Gangsta Rap" +msgstr "Gangsta Rap" + +#: src/vorbis/fileinfo.c:99 +msgid "Top 40" +msgstr "Top 40" + +#: src/vorbis/fileinfo.c:99 +msgid "Christian Rap" +msgstr "Christian Rap" + +#: src/vorbis/fileinfo.c:100 +msgid "Pop/Funk" +msgstr "Pop/Funk" + +#: src/vorbis/fileinfo.c:100 +msgid "Jungle" +msgstr "Jungle" + +#: src/vorbis/fileinfo.c:100 +msgid "Native American" +msgstr "Native American" + +#: src/vorbis/fileinfo.c:101 +msgid "Cabaret" +msgstr "Cabaret" + +#: src/vorbis/fileinfo.c:101 +msgid "New Wave" +msgstr "New Wave" + +#: src/vorbis/fileinfo.c:101 +msgid "Psychedelic" +msgstr "Psychedelic" + +#: src/vorbis/fileinfo.c:101 +msgid "Rave" +msgstr "Rave" + +#: src/vorbis/fileinfo.c:102 +msgid "Showtunes" +msgstr "Showtunes" + +#: src/vorbis/fileinfo.c:102 +msgid "Trailer" +msgstr "Trailer" + +#: src/vorbis/fileinfo.c:102 +msgid "Lo-Fi" +msgstr "Lo-Fi" + +#: src/vorbis/fileinfo.c:102 +msgid "Tribal" +msgstr "Tribal" + +#: src/vorbis/fileinfo.c:103 +msgid "Acid Punk" +msgstr "Acid Punk" + +#: src/vorbis/fileinfo.c:103 +msgid "Acid Jazz" +msgstr "Acid Jazz" + +#: src/vorbis/fileinfo.c:103 +msgid "Polka" +msgstr "Polka" + +#: src/vorbis/fileinfo.c:103 +msgid "Retro" +msgstr "Retro" + +#: src/vorbis/fileinfo.c:104 +msgid "Musical" +msgstr "Musical" + +#: src/vorbis/fileinfo.c:104 +msgid "Rock & Roll" +msgstr "Rock & Roll" + +#: src/vorbis/fileinfo.c:104 +msgid "Hard Rock" +msgstr "Hard Rock" + +#: src/vorbis/fileinfo.c:104 +msgid "Folk" +msgstr "Folk" + +#: src/vorbis/fileinfo.c:105 +msgid "Folk/Rock" +msgstr "Folk/Rock" + +#: src/vorbis/fileinfo.c:105 +msgid "National Folk" +msgstr "National Folk" + +#: src/vorbis/fileinfo.c:105 +msgid "Swing" +msgstr "Swing" + +#: src/vorbis/fileinfo.c:106 +msgid "Fast-Fusion" +msgstr "Fast-Fusion" + +#: src/vorbis/fileinfo.c:106 +msgid "Bebob" +msgstr "Bebob" + +#: src/vorbis/fileinfo.c:106 +msgid "Latin" +msgstr "Latin" + +#: src/vorbis/fileinfo.c:106 +msgid "Revival" +msgstr "Revival" + +#: src/vorbis/fileinfo.c:107 +msgid "Celtic" +msgstr "Celtic" + +#: src/vorbis/fileinfo.c:107 +msgid "Bluegrass" +msgstr "Bluegrass" + +#: src/vorbis/fileinfo.c:107 +msgid "Avantgarde" +msgstr "Avantgarde" + +#: src/vorbis/fileinfo.c:108 +msgid "Gothic Rock" +msgstr "Gothic Rock" + +#: src/vorbis/fileinfo.c:108 +msgid "Progressive Rock" +msgstr "Progressive Rock" + +#: src/vorbis/fileinfo.c:109 +msgid "Psychedelic Rock" +msgstr "Psychedelic Rock" + +#: src/vorbis/fileinfo.c:109 +msgid "Symphonic Rock" +msgstr "Symphonic Rock" + +#: src/vorbis/fileinfo.c:109 +msgid "Slow Rock" +msgstr "Slow Rock" + +#: src/vorbis/fileinfo.c:110 +msgid "Big Band" +msgstr "Big Band" + +#: src/vorbis/fileinfo.c:110 +msgid "Chorus" +msgstr "Chorus" + +#: src/vorbis/fileinfo.c:110 +msgid "Easy Listening" +msgstr "Easy Listening" + +#: src/vorbis/fileinfo.c:111 +msgid "Acoustic" +msgstr "Acoustic" + +#: src/vorbis/fileinfo.c:111 +msgid "Humour" +msgstr "Humour" + +#: src/vorbis/fileinfo.c:111 +msgid "Speech" +msgstr "Speech" + +#: src/vorbis/fileinfo.c:111 +msgid "Chanson" +msgstr "Chanson" + +#: src/vorbis/fileinfo.c:112 +msgid "Opera" +msgstr "Opera" + +#: src/vorbis/fileinfo.c:112 +msgid "Chamber Music" +msgstr "Chamber Music" + +#: src/vorbis/fileinfo.c:112 +msgid "Sonata" +msgstr "Sonata" + +#: src/vorbis/fileinfo.c:112 +msgid "Symphony" +msgstr "Symphony" + +#: src/vorbis/fileinfo.c:113 +msgid "Booty Bass" +msgstr "Booty Bass" + +#: src/vorbis/fileinfo.c:113 +msgid "Primus" +msgstr "Primus" + +#: src/vorbis/fileinfo.c:113 +msgid "Porn Groove" +msgstr "Porn Groove" + +#: src/vorbis/fileinfo.c:114 +msgid "Satire" +msgstr "Satire" + +#: src/vorbis/fileinfo.c:114 +msgid "Slow Jam" +msgstr "Slow Jam" + +#: src/vorbis/fileinfo.c:114 +msgid "Club" +msgstr "Club" + +#: src/vorbis/fileinfo.c:114 +msgid "Tango" +msgstr "Tango" + +#: src/vorbis/fileinfo.c:115 +msgid "Samba" +msgstr "Samba" + +#: src/vorbis/fileinfo.c:115 +msgid "Folklore" +msgstr "Folklore" + +#: src/vorbis/fileinfo.c:115 +msgid "Ballad" +msgstr "Ballad" + +#: src/vorbis/fileinfo.c:115 +msgid "Power Ballad" +msgstr "Power Ballad" + +#: src/vorbis/fileinfo.c:116 +msgid "Rhythmic Soul" +msgstr "Rhythmic Soul" + +#: src/vorbis/fileinfo.c:116 +msgid "Freestyle" +msgstr "Freestyle" + +#: src/vorbis/fileinfo.c:116 +msgid "Duet" +msgstr "Duet" + +#: src/vorbis/fileinfo.c:117 +msgid "Punk Rock" +msgstr "Punk Rock" + +#: src/vorbis/fileinfo.c:117 +msgid "Drum Solo" +msgstr "Drum Solo" + +#: src/vorbis/fileinfo.c:117 +msgid "A Cappella" +msgstr "A Cappella" + +#: src/vorbis/fileinfo.c:118 +msgid "Euro-House" +msgstr "Euro-House" + +#: src/vorbis/fileinfo.c:118 +msgid "Dance Hall" +msgstr "Dance Hall" + +#: src/vorbis/fileinfo.c:118 +msgid "Goa" +msgstr "Goa" + +#: src/vorbis/fileinfo.c:119 +msgid "Drum & Bass" +msgstr "Drum & Bass" + +#: src/vorbis/fileinfo.c:119 +msgid "Club-House" +msgstr "Club-House" + +#: src/vorbis/fileinfo.c:119 +msgid "Hardcore" +msgstr "Hardcore" + +#: src/vorbis/fileinfo.c:120 +msgid "Terror" +msgstr "Terror" + +#: src/vorbis/fileinfo.c:120 +msgid "Indie" +msgstr "Indie" + +#: src/vorbis/fileinfo.c:120 +msgid "BritPop" +msgstr "BritPop" + +#: src/vorbis/fileinfo.c:120 +msgid "Negerpunk" +msgstr "Negerpunk" + +#: src/vorbis/fileinfo.c:121 +msgid "Polsk Punk" +msgstr "Polsk Punk" + +#: src/vorbis/fileinfo.c:121 +msgid "Beat" +msgstr "Beat" + +#: src/vorbis/fileinfo.c:121 +msgid "Christian Gangsta Rap" +msgstr "Christian Gangsta Rap" + +#: src/vorbis/fileinfo.c:122 +msgid "Heavy Metal" +msgstr "Heavy Metal" + +#: src/vorbis/fileinfo.c:122 +msgid "Black Metal" +msgstr "Black Metal" + +#: src/vorbis/fileinfo.c:122 +msgid "Crossover" +msgstr "Crossover" + +#: src/vorbis/fileinfo.c:123 +msgid "Contemporary Christian" +msgstr "Contemporary Christian" + +#: src/vorbis/fileinfo.c:123 +msgid "Christian Rock" +msgstr "Christian Rock" + +#: src/vorbis/fileinfo.c:124 +msgid "Merengue" +msgstr "Merengue" + +#: src/vorbis/fileinfo.c:124 +msgid "Salsa" +msgstr "Salsa" + +#: src/vorbis/fileinfo.c:124 +msgid "Thrash Metal" +msgstr "Thrash Metal" + +#: src/vorbis/fileinfo.c:125 +msgid "Anime" +msgstr "Anime" + +#: src/vorbis/fileinfo.c:125 +msgid "JPop" +msgstr "JPop" + +#: src/vorbis/fileinfo.c:125 +msgid "Synthpop" +msgstr "Synthpop" + +#: src/vorbis/fileinfo.c:210 +#, c-format +msgid "" +"An error occured:\n" +"%s" +msgstr "" +"Une erreur s'est peoduite : \n" +"%s" + +#: src/vorbis/fileinfo.c:212 +msgid "Error!" +msgstr "Erreur !" + +#: src/vorbis/fileinfo.c:244 +msgid "Failed to modify tag (open)" +msgstr "Erreur lors de la lecture des métadonnées" + +#: src/vorbis/fileinfo.c:297 +msgid "Failed to modify tag (close)" +msgstr "Erreur lors de l'écriture des métadonnées" + +#: src/vorbis/fileinfo.c:324 +#: src/vorbis/fileinfo.c:333 +msgid "Failed to modify tag" +msgstr "Erreur lors de la modification des métadonnées" + +#: src/vorbis/fileinfo.c:577 +msgid " Ogg Vorbis Tag " +msgstr " Métadonnées 'Ogg Vorbis' " + +#: src/vorbis/fileinfo.c:629 +msgid "Date:" +msgstr "Date :" + +#: src/vorbis/fileinfo.c:671 +msgid "Description:" +msgstr "Description :" + +#: src/vorbis/fileinfo.c:681 +msgid "Location:" +msgstr "Emplacement :" + +#: src/vorbis/fileinfo.c:691 +msgid "Version:" +msgstr "Version :" + +#: src/vorbis/fileinfo.c:702 +msgid "ISRC number:" +msgstr "Identifiant 'ISRC' :" + +#: src/vorbis/fileinfo.c:713 +msgid "Organization:" +msgstr "Société :" + +#: src/vorbis/fileinfo.c:760 +msgid " Ogg Vorbis ReplayGain " +msgstr " ReplayGain Ogg Vorbis " + +#: src/vorbis/fileinfo.c:766 +msgid "Track gain:" +msgstr "Gain 'piste' :" + +#: src/vorbis/fileinfo.c:776 +msgid "Track peak:" +msgstr "Pic sonore 'piste' :" + +#: src/vorbis/fileinfo.c:787 +msgid "Album gain:" +msgstr "Gain 'album' :" + +#: src/vorbis/fileinfo.c:797 +msgid "Album peak:" +msgstr "Pic sonore 'album' :" + +#: src/vorbis/fileinfo.c:826 +msgid " Ogg Vorbis Info " +msgstr " Informations 'Ogg Vorbis' " + +#: src/vorbis/fileinfo.c:841 +#: src/vorbis/fileinfo.c:918 +msgid "Bit rate:" +msgstr "Débit :" + +#: src/vorbis/fileinfo.c:854 +#: src/vorbis/fileinfo.c:921 +msgid "Sample rate:" +msgstr "Taux d'échantillonnage :" + +#: src/vorbis/fileinfo.c:880 +#: src/vorbis/fileinfo.c:927 +msgid "Length:" +msgstr "Durée :" + +#: src/vorbis/fileinfo.c:893 +#: src/vorbis/fileinfo.c:930 +msgid "File size:" +msgstr "Taille du fichier :" + +#: src/vorbis/fileinfo.c:919 +#: src/vorbis/fileinfo.c:922 +#: src/vorbis/fileinfo.c:925 +#: src/vorbis/fileinfo.c:928 +#: src/vorbis/fileinfo.c:931 +msgid "N/A" +msgstr "non disponible" + +#: src/vorbis/fileinfo.c:961 +#, c-format +msgid "%d KBit/s (nominal)" +msgstr "%d kbit/s (nominal)" + +#: src/vorbis/fileinfo.c:963 +#, c-format +msgid "%d" +msgstr "%d" + +#: src/vorbis/fileinfo.c:965 +#, c-format +msgid "%d:%.2d" +msgstr "%d:%.2d" + +#: src/vorbis/fileinfo.c:967 +#, c-format +msgid "%d Bytes" +msgstr "%d Bytes" + +#: src/vorbis/fileinfo.c:1024 +#, c-format +msgid "%s - Audacious" +msgstr "Audacious : %s" + +#: src/vorbis/vorbis.c:862 +msgid "About Ogg Vorbis Audio Plugin" +msgstr "À propos du module audio 'Ogg Vorbis'" + +#: src/vorbis/vorbis.c:868 +msgid "" +"Ogg Vorbis Plugin by the Xiph.org Foundation\n" +"\n" +"Original code by\n" +"Tony Arcieri \n" +"Contributions from\n" +"Chris Montgomery \n" +"Peter Alm \n" +"Michael Smith \n" +"Jack Moffitt \n" +"Jorn Baayen \n" +"Haavard Kvaalen \n" +"Gian-Carlo Pascutto \n" +"\n" +"Visit the Xiph.org Foundation at http://www.xiph.org/\n" +msgstr "" +"Module 'Ogg Vorbis' de 'Xiph.org Foundation'\n" +"\n" +"Code original de :\n" +"Tony Arcieri \n" +"\n" +"Contributions de :\n" +"Chris Montgomery \n" +"Peter Alm \n" +"Michael Smith \n" +"Jack Moffitt \n" +"Jorn Baayen \n" +"Haavard Kvaalen \n" +"Gian-Carlo Pascutto \n" +"\n" +"Vous pouvez visiter 'The Xiph.org Foundation' à cette adresse :\n" +"http://www.xiph.org/\n" + +#: src/vtx/about.c:22 +msgid "About Vortex Player" +msgstr "À propos du lecteur 'Vortex'" + +#: src/vtx/about.c:24 +msgid "" +"Vortex file format player by Sashnov Alexander \n" +"Founded on original source in_vtx.dll by Roman Sherbakov \n" +"\n" +"Music in vtx format can be found at http://vtx.microfor.ru/music.htm\n" +"and other AY/YM music sites.\n" +"\n" +"Audacious implementation by Pavel Vymetalek " +msgstr "" +"Lecteur de fichiers au format 'Vortex' de\n" +"Sashnov Alexander \n" +"\n" +"Source originale : 'in_vtx.dll' de\n" +"Roman Sherbakov \n" +"\n" +"La musique au format 'vtx' peut être trouvée à l'adresse suivante :\n" +"\n" +"http://vtx.microfor.ru/music.htm\n" +"(et sur les autres sites de musique AY/YM).\n" +"\n" +"Adaptation pour Audacious :\n" +"Pavel Vymetalek " + +#: src/wavpack/ui.cxx:52 +#, c-format +msgid "Wavpack Decoder Plugin %s" +msgstr "Module de décodage 'Wavpack' %s" + +#: src/wavpack/ui.cxx:53 +msgid "" +"Copyright (c) 2006 William Pitcock \n" +"\n" +"Some of the plugin code was by Miles Egan\n" +"Visit the Wavpack site at http://www.wavpack.com/\n" +msgstr "" +"Droits d'utilisation : (c) 2006, William Pitcock \n" +"\n" +"Une partie du code provient de Miles Egan\n" +"\n" +"Vous pouvez visiter le site 'Wavpack' à l'adresse suivante :\n" +"http://www.wavpack.com/\n" + +#: src/wavpack/ui.cxx:163 +msgid "Ape2 Tag" +msgstr "Métadonnées 'Ape2'" + +#: src/wavpack/ui.cxx:286 +msgid "Wavpack Info:" +msgstr "Informations Wavpack" + +#: src/wavpack/ui.cxx:379 +#, c-format +msgid "version %d" +msgstr "Version : %d" + +#: src/wavpack/ui.cxx:380 +#, c-format +msgid "average bitrate: %6.1f kbps" +msgstr "Débit moyen : %6.1f kbps" + +#: src/wavpack/ui.cxx:381 +#, c-format +msgid "samplerate: %d Hz" +msgstr "Taux d'échantillonnage : %d Hz" + +#: src/wavpack/ui.cxx:382 +#, c-format +msgid "bits per sample: %d" +msgstr "Bits par échantillon : %d" + +#: src/wavpack/ui.cxx:383 +#, c-format +msgid "channels: %d" +msgstr "Voies : %d" + +#: src/wavpack/ui.cxx:384 +#, c-format +msgid "length: %d:%.2d" +msgstr "Durée : %d:%.2d" + +#: src/wavpack/ui.cxx:385 +#, c-format +msgid "file size: %d Bytes" +msgstr "Taille du fichier : %d Bytes" + +#: src/wavpack/ui.cxx:392 +msgid "Title Peak: ?" +msgstr "Pic sonore 'piste' : ?" + +#: src/wavpack/ui.cxx:393 +msgid "Album Peak: ?" +msgstr "Pic sonore 'album' : ?" + +#: src/wavpack/ui.cxx:394 +msgid "Title Gain: ?" +msgstr "Gain 'piste' : ?" + +#: src/wavpack/ui.cxx:395 +msgid "Album Gain: ?" +msgstr "Gain 'album' : ?" + +#: src/wavpack/ui.cxx:469 +msgid "Wavpack Configuration" +msgstr "Configuration de 'Wavpack'" + +#: src/wavpack/ui.cxx:482 +msgid "General Plugin Settings:" +msgstr "Réglages généraux" + +#: src/wav/wav-sndfile.c:549 +msgid "About sndfile WAV support" +msgstr "À propos du support WAV 'sndfile'" + +#: src/wav/wav-sndfile.c:550 +msgid "" +"Adapted for Audacious usage by Tony Vroon \n" +"from the xmms_sndfile plugin which is:\n" +"Copyright (C) 2000, 2002 Erik de Castro Lopo\n" +"\n" +"This program is free software ; you can redistribute it and/or modify \n" +"it under the terms of the GNU General Public License as published by \n" +"the Free Software Foundation ; either version 2 of the License, or \n" +"(at your option) any later version. \n" +" \n" +"This program is distributed in the hope that it will be useful, \n" +"but WITHOUT ANY WARRANTY ; without even the implied warranty of \n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n" +"See the GNU General Public License for more details. \n" +"\n" +"You should have received a copy of the GNU General Public \n" +"License along with this program ; if not, write to \n" +"the Free Software Foundation, Inc., \n" +"51 Franklin Street, Fifth Floor, \n" +"Boston, MA 02110-1301 USA" +msgstr "" +"Adapté pour Audacious par Tony Vroon \n" +"à partir du module 'xmms_sndfile' de :\n" +"Erik de Castro Lopo (droits d'utilisation : (C) 2000, 2002)\n" +"\n" +"Ce programme est libre, vous pouvez le redistribuer et/ou le modifier\n" +"selon les termes de la Licence Publique Générale GNU publiée par\n" +"la Free Software Foundation (version 2 ou bien toute autre version\n" +"ultérieure choisie par vous).\n" +"\n" +"Ce programme est distribué car potentiellement utile, mais SANS\n" +"AUCUNE GARANTIE, ni explicite ni implicite, y compris les garanties\n" +"de commercialisation ou d'adaptation dans un but spécifique.\n" +"Reportez-vous à la Licence Publique Générale GNU pour plus de détails.\n" +"\n" +"Vous devez avoir reçu une copie de la Licence Publique Générale GNU\n" +"en même temps que ce programme ; si ce n'est pas le cas, écrivez à la\n" +"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n" +"MA 02110-1301, États-Unis." + +#: src/wav/wav-sndfile.c:574 +msgid "sndfile WAV plugin" +msgstr "sndfile WAV plugin" + +#: src/wma/wma.c:143 +#, c-format +msgid "About %s" +msgstr "À propos de '%s'" + diff -r 371d9450c631 -r 319930001524 scripts/makerelease.sh --- a/scripts/makerelease.sh Wed Oct 17 23:09:30 2007 +0300 +++ b/scripts/makerelease.sh Wed Oct 17 23:09:54 2007 +0300 @@ -85,8 +85,8 @@ fi if [ "x$PUBLISH" = "xyes" ]; then - scp $RELEASENAME.tgz sidhe.atheme.org:/var/www/distfiles/htdocs - scp $RELEASENAME.tbz2 sidhe.atheme.org:/var/www/distfiles/htdocs + scp $RELEASENAME.tgz distfiles-master.atheme.org:/srv/distfiles + scp $RELEASENAME.tbz2 distfiles-master.atheme.org:/srv/distfiles echo echo "The releases have been published, and will be available to the entire" diff -r 371d9450c631 -r 319930001524 src/adplug/adplug-xmms.cc --- a/src/adplug/adplug-xmms.cc Wed Oct 17 23:09:30 2007 +0300 +++ b/src/adplug/adplug-xmms.cc Wed Oct 17 23:09:54 2007 +0300 @@ -69,7 +69,7 @@ gint freq; gboolean bit16, stereo, endless; CPlayers players; -} cfg = +} conf = { 44100l, true, false, false, CAdPlug::players}; @@ -190,31 +190,31 @@ close_config_box_ok (GtkButton * button, GPtrArray * rblist) { // Apply configuration settings - cfg.bit16 = + conf.bit16 = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_ptr_array_index (rblist, 0))); - cfg.stereo = + conf.stereo = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_ptr_array_index (rblist, 1))); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_ptr_array_index (rblist, 2)))) - cfg.freq = 11025; + conf.freq = 11025; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_ptr_array_index (rblist, 3)))) - cfg.freq = 22050; + conf.freq = 22050; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_ptr_array_index (rblist, 4)))) - cfg.freq = 44100; + conf.freq = 44100; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_ptr_array_index (rblist, 5)))) - cfg.freq = 48000; + conf.freq = 48000; - cfg.endless = + conf.endless = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_ptr_array_index (rblist, 6))); - cfg.players = *(CPlayers *) g_ptr_array_index (rblist, 7); + conf.players = *(CPlayers *) g_ptr_array_index (rblist, 7); delete (CPlayers *) g_ptr_array_index (rblist, 7); g_ptr_array_free (rblist, FALSE); @@ -306,12 +306,12 @@ make_framed (GTK_WIDGET (fvb), _("Resolution")), 0, 1, 0, 1); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, _("8bit"))); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), !cfg.bit16); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), !conf.bit16); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget (rb, _("16bit"))); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), cfg.bit16); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), conf.bit16); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); @@ -321,12 +321,12 @@ make_framed (GTK_WIDGET (fvb), _("Channels")), 0, 1, 1, 2); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, _("Mono"))); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), !cfg.stereo); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), !conf.stereo); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget (rb, _("Stereo"))); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), cfg.stereo); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), conf.stereo); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); gtk_tooltips_set_tip (tooltips, GTK_WIDGET (rb), _("Setting stereo is not recommended, unless you need to. " @@ -340,28 +340,28 @@ make_framed (GTK_WIDGET (fvb), _("Frequency")), 1, 2, 0, 2); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, "11025")); - if (cfg.freq == 11025) + if (conf.freq == 11025) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget (rb, "22050")); - if (cfg.freq == 22050) + if (conf.freq == 22050) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget (rb, "44100")); - if (cfg.freq == 44100) + if (conf.freq == 44100) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget (rb, "48000")); - if (cfg.freq == 48000) + if (conf.freq == 48000) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); @@ -378,7 +378,7 @@ cb = GTK_CHECK_BUTTON (gtk_check_button_new_with_label (_("Detect songend"))); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb), !cfg.endless); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb), !conf.endless); gtk_container_add (GTK_CONTAINER (vb), GTK_WIDGET (cb)); gtk_tooltips_set_tip (tooltips, GTK_WIDGET (cb), _("If enabled, XMMS will detect a song's ending, stop " @@ -425,15 +425,15 @@ g_free (rws[0]); g_free (rws[1]); gtk_clist_set_row_data (fl, rownum, (gpointer) (*i)); - if (find (cfg.players.begin (), cfg.players.end (), *i) != - cfg.players.end ()) + if (find (conf.players.begin (), conf.players.end (), *i) != + conf.players.end ()) gtk_clist_select_row (fl, rownum, 0); } gtk_clist_columns_autosize (fl); gtk_scrolled_window_set_policy (formatswnd, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gpointer pl = (gpointer) new CPlayers (cfg.players); + gpointer pl = (gpointer) new CPlayers (conf.players); g_signal_connect (G_OBJECT (fl), "select-row", G_CALLBACK (config_fl_row_select), pl); g_signal_connect (G_OBJECT (fl), "unselect-row", @@ -473,7 +473,7 @@ dbg_printf ("factory(%p<%s>,opl): ", fd, fd->uri != NULL ? fd->uri : "unknown"); - return CAdPlug::factory (fd, newopl, cfg.players); + return CAdPlug::factory (fd, newopl, conf.players); } static void adplug_stop (InputPlayback * data); @@ -745,14 +745,14 @@ InputPlayback *playback = (InputPlayback *) data; char *filename = (char *) playback->filename; dbg_printf ("play_loop(\"%s\"): ", filename); - CEmuopl opl (cfg.freq, cfg.bit16, cfg.stereo); + CEmuopl opl (conf.freq, conf.bit16, conf.stereo); long toadd = 0, i, towrite; char *sndbuf, *sndbufpos; int songlength; bool playing = true, // Song self-end indicator. - bit16 = cfg.bit16, // Duplicate config, so it doesn't affect us if - stereo = cfg.stereo; // the user changes it while we're playing. - unsigned long freq = cfg.freq; + bit16 = conf.bit16, // Duplicate config, so it doesn't affect us if + stereo = conf.stereo; // the user changes it while we're playing. + unsigned long freq = conf.freq; // we use VfsBufferedFile class here because adplug does a lot of // probing. a short delay before probing begins is better than @@ -807,7 +807,7 @@ // main playback loop dbg_printf ("loop.\n"); - while ((playing || cfg.endless) && plr.playing) + while ((playing || conf.endless) && plr.playing) { // seek requested ? if (plr.seek != -1) @@ -980,8 +980,8 @@ // open output plugin dbg_printf ("open, "); if (!playback->output-> - open_audio (cfg.bit16 ? FORMAT_16 : FORMAT_8, cfg.freq, - cfg.stereo ? 2 : 1)) + open_audio (conf.bit16 ? FORMAT_16 : FORMAT_8, conf.freq, + conf.stereo ? 2 : 1)) { audio_error = TRUE; return; @@ -1040,11 +1040,11 @@ // Read configuration dbg_printf ("read, "); - bmp_cfg_db_get_bool (db, CFG_VERSION, "16bit", (gboolean *) & cfg.bit16); - bmp_cfg_db_get_bool (db, CFG_VERSION, "Stereo", (gboolean *) & cfg.stereo); - bmp_cfg_db_get_int (db, CFG_VERSION, "Frequency", (gint *) & cfg.freq); + bmp_cfg_db_get_bool (db, CFG_VERSION, "16bit", (gboolean *) & conf.bit16); + bmp_cfg_db_get_bool (db, CFG_VERSION, "Stereo", (gboolean *) & conf.stereo); + bmp_cfg_db_get_int (db, CFG_VERSION, "Frequency", (gint *) & conf.freq); bmp_cfg_db_get_bool (db, CFG_VERSION, "Endless", - (gboolean *) & cfg.endless); + (gboolean *) & conf.endless); // Read file type exclusion list dbg_printf ("exclusion, "); @@ -1059,7 +1059,7 @@ exclude[strlen (exclude) + 1] = '\0'; g_strdelimit (exclude, ":", '\0'); for (gchar * p = exclude; *p; p += strlen (p) + 1) - cfg.players.remove (cfg.players.lookup_filetype (p)); + conf.players.remove (conf.players.lookup_filetype (p)); free (exclude); free (cfgstr); } } @@ -1097,17 +1097,17 @@ // Write configuration dbg_printf ("write, "); - bmp_cfg_db_set_bool (db, CFG_VERSION, "16bit", cfg.bit16); - bmp_cfg_db_set_bool (db, CFG_VERSION, "Stereo", cfg.stereo); - bmp_cfg_db_set_int (db, CFG_VERSION, "Frequency", cfg.freq); - bmp_cfg_db_set_bool (db, CFG_VERSION, "Endless", cfg.endless); + bmp_cfg_db_set_bool (db, CFG_VERSION, "16bit", conf.bit16); + bmp_cfg_db_set_bool (db, CFG_VERSION, "Stereo", conf.stereo); + bmp_cfg_db_set_int (db, CFG_VERSION, "Frequency", conf.freq); + bmp_cfg_db_set_bool (db, CFG_VERSION, "Endless", conf.endless); dbg_printf ("exclude, "); std::string exclude; for (CPlayers::const_iterator i = CAdPlug::players.begin (); i != CAdPlug::players.end (); i++) - if (find (cfg.players.begin (), cfg.players.end (), *i) == - cfg.players.end ()) + if (find (conf.players.begin (), conf.players.end (), *i) == + conf.players.end ()) { if (!exclude.empty ()) exclude += ":"; diff -r 371d9450c631 -r 319930001524 src/alac/plugin.c --- a/src/alac/plugin.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/alac/plugin.c Wed Oct 17 23:09:54 2007 +0300 @@ -64,19 +64,6 @@ extern void set_endian(); -/* -static gchar * -extname(const char *filename) -{ - gchar *ext = strrchr(filename, '.'); - - if (ext != NULL) - ++ext; - - return ext; -} -*/ - static void alac_about(void) { static GtkWidget *aboutbox; @@ -190,12 +177,12 @@ { going = 0; g_thread_join(playback_thread); - output_close_audio(); + data->output->close_audio(); } static void do_pause(InputPlayback *data, short paused) { - output_pause(paused); + data->output->pause(paused); } static void seek(InputPlayback * data, gint time) diff -r 371d9450c631 -r 319930001524 src/alsa/audio.c --- a/src/alsa/audio.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/alsa/audio.c Wed Oct 17 23:09:54 2007 +0300 @@ -275,7 +275,7 @@ alsa_cleanup_mixer(); - xmms_convert_buffers_destroy(convertb); + aud_convert_buffers_destroy(convertb); convertb = NULL; g_free(inputf); inputf = NULL; @@ -746,7 +746,7 @@ if (!mixer) alsa_setup_mixer(); - convertb = xmms_convert_buffers_new(); + convertb = aud_convert_buffers_new(); output_time_offset = 0; alsa_total_written = alsa_hw_written = 0; @@ -755,7 +755,7 @@ prebuffer = TRUE; remove_prebuffer = FALSE; - thread_buffer_size = (guint64)cfg.output_buffer_size * inputf->bps / 1000; + thread_buffer_size = (guint64)aud_cfg->output_buffer_size * inputf->bps / 1000; if (thread_buffer_size < hw_buffer_size) thread_buffer_size = hw_buffer_size * 2; if (thread_buffer_size < 8192) @@ -910,7 +910,7 @@ debug("Converting format from %d to %d", f->xmms_format, outputf->xmms_format); alsa_convert_func = - xmms_convert_get_func(outputf->xmms_format, + aud_convert_get_func(outputf->xmms_format, f->xmms_format); if (alsa_convert_func == NULL) return -1; @@ -930,7 +930,7 @@ debug("Converting channels from %d to %d", f->channels, outputf->channels); alsa_stereo_convert_func = - xmms_convert_get_channel_func(outputf->xmms_format, + aud_convert_get_channel_func(outputf->xmms_format, outputf->channels, f->channels); if (alsa_stereo_convert_func == NULL) @@ -948,7 +948,7 @@ debug("Converting samplerate from %d to %d", f->rate, outputf->rate); alsa_frequency_convert_func = - xmms_convert_get_frequency_func(outputf->xmms_format, + aud_convert_get_frequency_func(outputf->xmms_format, outputf->channels); if (alsa_frequency_convert_func == NULL) return -1; diff -r 371d9450c631 -r 319930001524 src/aosd/aosd.c --- a/src/aosd/aosd.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/aosd/aosd.c Wed Oct 17 23:09:54 2007 +0300 @@ -19,6 +19,7 @@ */ #include "aosd.h" +#include "aosd_ui.h" #include "aosd_osd.h" #include "aosd_cfg.h" #include "aosd_trigger.h" diff -r 371d9450c631 -r 319930001524 src/aosd/aosd_osd.c --- a/src/aosd/aosd_osd.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/aosd/aosd_osd.c Wed Oct 17 23:09:54 2007 +0300 @@ -411,6 +411,7 @@ { g_warning( "OSD display requested, but no osd object is loaded!\n" ); } + return 1; } diff -r 371d9450c631 -r 319930001524 src/aosd/aosd_trigger.c --- a/src/aosd/aosd_trigger.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/aosd/aosd_trigger.c Wed Oct 17 23:09:54 2007 +0300 @@ -21,6 +21,7 @@ #include "aosd_trigger.h" #include "aosd_trigger_private.h" #include "aosd_cfg.h" +#include "aosd_osd.h" #include #include #include @@ -169,9 +170,9 @@ aosd_trigger_func_pb_start_onoff ( gboolean turn_on ) { if ( turn_on == TRUE ) - hook_associate( "playback begin" , aosd_trigger_func_pb_start_cb , NULL ); + aud_hook_associate( "playback begin" , aosd_trigger_func_pb_start_cb , NULL ); else - hook_dissociate( "playback begin" , aosd_trigger_func_pb_start_cb ); + aud_hook_dissociate( "playback begin" , aosd_trigger_func_pb_start_cb ); return; } @@ -190,9 +191,9 @@ else { /* pick what we have as song title */ - Playlist *active = playlist_get_active(); - gint pos = playlist_get_position(active); - title = playlist_get_songtitle(active, pos); + Playlist *active = aud_playlist_get_active(); + gint pos = aud_playlist_get_position(active); + title = aud_playlist_get_songtitle(active, pos); } utf8_title = aosd_trigger_utf8convert( title ); if ( g_utf8_validate( utf8_title , -1 , NULL ) == TRUE ) @@ -228,11 +229,11 @@ prevs = g_malloc0(sizeof(aosd_pb_titlechange_prevs_t)); prevs->title = NULL; prevs->filename = NULL; - hook_associate( "playlist set info" , aosd_trigger_func_pb_titlechange_cb , prevs ); + aud_hook_associate( "playlist set info" , aosd_trigger_func_pb_titlechange_cb , prevs ); } else { - hook_dissociate( "playlist set info" , aosd_trigger_func_pb_titlechange_cb ); + aud_hook_dissociate( "playlist set info" , aosd_trigger_func_pb_titlechange_cb ); if ( prevs != NULL ) { if ( prevs->title != NULL ) g_free( prevs->title ); @@ -247,7 +248,7 @@ static void aosd_trigger_func_pb_titlechange_cb ( gpointer plentry_gp , gpointer prevs_gp ) { - if ( ip_data.playing ) + if ( aud_ip_state->playing ) { aosd_pb_titlechange_prevs_t *prevs = prevs_gp; PlaylistEntry *pl_entry = plentry_gp; @@ -301,9 +302,9 @@ aosd_trigger_func_vol_change_onoff ( gboolean turn_on ) { if ( turn_on == TRUE ) - hook_associate( "volume set" , aosd_trigger_func_vol_change_cb , NULL ); + aud_hook_associate( "volume set" , aosd_trigger_func_vol_change_cb , NULL ); else - hook_dissociate( "volume set" , aosd_trigger_func_vol_change_cb ); + aud_hook_dissociate( "volume set" , aosd_trigger_func_vol_change_cb ); return; } @@ -358,9 +359,9 @@ aosd_trigger_func_pb_pauseon_onoff ( gboolean turn_on ) { if ( turn_on == TRUE ) - hook_associate( "playback pause" , aosd_trigger_func_pb_pauseon_cb , NULL ); + aud_hook_associate( "playback pause" , aosd_trigger_func_pb_pauseon_cb , NULL ); else - hook_dissociate( "playback pause" , aosd_trigger_func_pb_pauseon_cb ); + aud_hook_dissociate( "playback pause" , aosd_trigger_func_pb_pauseon_cb ); return; } @@ -379,29 +380,29 @@ aosd_trigger_func_pb_pauseoff_onoff ( gboolean turn_on ) { if ( turn_on == TRUE ) - hook_associate( "playback unpause" , aosd_trigger_func_pb_pauseoff_cb , NULL ); + aud_hook_associate( "playback unpause" , aosd_trigger_func_pb_pauseoff_cb , NULL ); else - hook_dissociate( "playback unpause" , aosd_trigger_func_pb_pauseoff_cb ); + aud_hook_dissociate( "playback unpause" , aosd_trigger_func_pb_pauseoff_cb ); return; } static void aosd_trigger_func_pb_pauseoff_cb ( gpointer unused1 , gpointer unused2 ) { - Playlist *active = playlist_get_active(); - gint pos = playlist_get_position(active); + Playlist *active = aud_playlist_get_active(); + gint pos = aud_playlist_get_position(active); gchar *title, *utf8_title, *utf8_title_markup; gint time_cur, time_tot; gint time_cur_m, time_cur_s, time_tot_m, time_tot_s; - time_tot = playlist_get_songtime(active, pos) / 1000; + time_tot = aud_playlist_get_songtime(active, pos) / 1000; time_cur = audacious_drct_get_time() / 1000; time_cur_s = time_cur % 60; time_cur_m = (time_cur - time_cur_s) / 60; time_tot_s = time_tot % 60; time_tot_m = (time_tot - time_tot_s) / 60; - title = playlist_get_songtitle(active, pos); + title = aud_playlist_get_songtitle(active, pos); utf8_title = aosd_trigger_utf8convert( title ); utf8_title_markup = g_markup_printf_escaped( "%s (%i:%02i/%i:%02i)" , diff -r 371d9450c631 -r 319930001524 src/aosd/aosd_ui.c --- a/src/aosd/aosd_ui.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/aosd/aosd_ui.c Wed Oct 17 23:09:54 2007 +0300 @@ -466,7 +466,7 @@ return tex_vbox; } - +#if 0 static void aosd_ui_configure_decoration_browse ( GtkButton * button , gpointer entry ) { @@ -487,6 +487,7 @@ gtk_widget_destroy( dialog ); return; } +#endif static void @@ -521,14 +522,14 @@ return; } - +#if 0 static void aosd_cb_configure_decoration_skinfile_commit ( GtkWidget * entry , aosd_cfg_t * cfg ) { cfg->osd->decoration.skin_file = g_strdup( gtk_entry_get_text(GTK_ENTRY(entry)) ); return; } - +#endif static GtkWidget * aosd_ui_configure_decoration ( aosd_cfg_t * cfg , GList ** cb_list ) @@ -542,8 +543,10 @@ GtkTreeIter iter, iter_sel; GtkWidget *dec_rstyle_hbox; GtkWidget *dec_rstyleopts_frame, *dec_rstyleopts_table; +#if 0 GtkWidget *dec_rstylecustom_frame, *dec_rstylecustom_table; GtkWidget *dec_rstylecustom_label, *dec_rstylecustom_entry, *dec_rstylecustom_browse_bt; +#endif gint *deco_code_array, deco_code_array_size; gint colors_max_num = 0, i = 0; @@ -956,7 +959,7 @@ static void aosd_cb_configure_ok ( gpointer cfg_win ) { - gchar *markup_message = NULL; + //gchar *markup_message = NULL; aosd_cfg_t *cfg = aosd_cfg_new(); GList *cb_list = g_object_get_data( G_OBJECT(cfg_win) , "cblist" ); aosd_callback_list_run( cb_list , cfg ); diff -r 371d9450c631 -r 319930001524 src/aosd/ghosd.c --- a/src/aosd/ghosd.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/aosd/ghosd.c Wed Oct 17 23:09:54 2007 +0300 @@ -24,6 +24,7 @@ #include "ghosd.h" #include "ghosd-internal.h" +#if 0 static unsigned long get_current_workspace(Ghosd *ghosd) { Atom cur_workspace_atom; @@ -47,6 +48,7 @@ /* fall back to desktop number 0 */ return 0; } +#endif #ifdef HAVE_XCOMPOSITE static Bool diff -r 371d9450c631 -r 319930001524 src/cdaudio-ng/cdaudio-ng.c --- a/src/cdaudio-ng/cdaudio-ng.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/cdaudio-ng/cdaudio-ng.c Wed Oct 17 23:09:54 2007 +0300 @@ -815,7 +815,7 @@ for (node = list; node; node = g_list_next(node)) { filename = g_build_filename(CDDA_DEFAULT, node->data, NULL); - playlist_add(playlist_get_active(), filename); + aud_playlist_add(aud_playlist_get_active(), filename); g_free(filename); g_free(node->data); } diff -r 371d9450c631 -r 319930001524 src/cue/cuesheet.c --- a/src/cue/cuesheet.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/cue/cuesheet.c Wed Oct 17 23:09:54 2007 +0300 @@ -166,7 +166,7 @@ gchar _buf[65535]; g_snprintf(_buf, 65535, "cue://%s?%d", filename, i); - playlist_add_url(playlist_get_active(), _buf); + aud_playlist_add_url(aud_playlist_get_active(), _buf); } free_cue_info(); @@ -253,7 +253,7 @@ #ifdef DEBUG g_print("cue_file = %s\n", cue_file); #endif - pr = input_check_file(cue_file, FALSE); + pr = aud_input_check_file(cue_file, FALSE); if (pr == NULL) return NULL; dec = pr->ip; @@ -262,8 +262,6 @@ if (dec->get_song_tuple) phys_tuple = dec->get_song_tuple(cue_file); - else - phys_tuple = input_get_song_tuple(cue_file); if(!phys_tuple) return NULL; @@ -358,21 +356,13 @@ #endif } -/* not publicly available functions. */ -extern void playback_stop(void); -extern void mainwin_clear_song_info(void); - static gboolean do_stop(gpointer data) { #ifdef DEBUG g_print("f: do_stop\n"); #endif - ip_data.stop = TRUE; - playback_stop(); - ip_data.stop = FALSE; - - mainwin_clear_song_info(); + audacious_drct_stop(); #ifdef DEBUG g_print("e: do_stop\n"); @@ -382,8 +372,8 @@ static gboolean do_setpos(gpointer data) { - Playlist *playlist = playlist_get_active(); - gint pos = playlist_get_position_nolock(playlist); + Playlist *playlist = aud_playlist_get_active(); + gint pos = aud_playlist_get_position_nolock(playlist); gint incr = *(gint *)data; pos = pos + incr; @@ -398,7 +388,7 @@ return FALSE; /* being done from the main loop thread, does not require locks */ - playlist_set_position(playlist, (guint)pos); + aud_playlist_set_position(playlist, (guint)pos); return FALSE; //one-shot } @@ -412,15 +402,15 @@ static void set_info_override(gchar * unused, gint length, gint rate, gint freq, gint nch) { gchar *title; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); g_return_if_fail(playlist != NULL); /* annoying. */ if (playlist->position->tuple == NULL) { - gint pos = playlist_get_position(playlist); - playlist_get_tuple(playlist, pos); + gint pos = aud_playlist_get_position(playlist); + aud_playlist_get_tuple(playlist, pos); } title = g_strdup(playlist->position->title); @@ -461,7 +451,7 @@ if (cue_file == NULL || !aud_vfs_file_test(cue_file, G_FILE_TEST_EXISTS)) return; - pr = input_check_file(cue_file, FALSE); + pr = aud_input_check_file(cue_file, FALSE); if (pr == NULL) return; @@ -576,7 +566,7 @@ break; case RUN: if(!playlist) - playlist = playlist_get_active(); + playlist = aud_playlist_get_active(); g_cond_timed_wait(cue_cond, cue_mutex, &sleep_time); break; case STOP: @@ -584,7 +574,7 @@ g_print("watchdog deactivated\n"); #endif g_cond_wait(cue_cond, cue_mutex); - playlist = playlist_get_active(); + playlist = aud_playlist_get_active(); break; } g_mutex_unlock(cue_mutex); @@ -592,7 +582,7 @@ if(watchdog_state != RUN) continue; - time = get_output_time(); + time = audacious_drct_get_output_time(); #if 0 #ifdef DEBUG g_print("time = %d target_time = %d\n", time, target_time); @@ -664,7 +654,7 @@ #ifdef DEBUG g_print("cue: next_track: target_time = %d\n", target_time); #endif - if(cfg.stopaftersong) { + if(aud_cfg->stopaftersong) { g_idle_add_full(G_PRIORITY_HIGH, do_stop, (void *)real_ip, NULL); continue; } @@ -679,12 +669,12 @@ (cue_tracks[last_cue_track].index - time < 500 || time > cue_tracks[last_cue_track].index) ){ // may not happen. for safety. if(!real_ip->output->buffer_playing()) { - gint pos = playlist_get_position(playlist); - if (pos + 1 == playlist_get_length(playlist)) { + gint pos = aud_playlist_get_position(playlist); + if (pos + 1 == aud_playlist_get_length(playlist)) { #ifdef DEBUG g_print("i: watchdog eof reached\n\n"); #endif - if(cfg.repeat) { + if(aud_cfg->repeat) { static gint incr = 0; incr = -pos; g_idle_add_full(G_PRIORITY_HIGH , do_setpos, &incr, NULL); @@ -696,7 +686,7 @@ } } else { - if(cfg.stopaftersong) { + if(aud_cfg->stopaftersong) { g_idle_add_full(G_PRIORITY_HIGH, do_stop, (void *)real_ip, NULL); continue; } diff -r 371d9450c631 -r 319930001524 src/dockalbumart/dockalbumart.c --- a/src/dockalbumart/dockalbumart.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/dockalbumart/dockalbumart.c Wed Oct 17 23:09:54 2007 +0300 @@ -136,8 +136,8 @@ static void dockart_init(void) { - hook_associate("playback begin", dockart_trigger_func_pb_start_cb, NULL); - hook_associate("playback end", dockart_trigger_func_pb_end_cb, NULL); + aud_hook_associate("playback begin", dockart_trigger_func_pb_start_cb, NULL); + aud_hook_associate("playback end", dockart_trigger_func_pb_end_cb, NULL); } static void @@ -145,8 +145,8 @@ { GdkPixbuf *new; - hook_dissociate("playback begin", dockart_trigger_func_pb_start_cb); - hook_dissociate("playback end", dockart_trigger_func_pb_end_cb); + aud_hook_dissociate("playback begin", dockart_trigger_func_pb_start_cb); + aud_hook_dissociate("playback end", dockart_trigger_func_pb_end_cb); /* reset dock tile */ new = gdk_pixbuf_new_from_xpm_data((const gchar **) audacious_player_xpm); diff -r 371d9450c631 -r 319930001524 src/filewriter/filewriter.c --- a/src/filewriter/filewriter.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/filewriter/filewriter.c Wed Oct 17 23:09:54 2007 +0300 @@ -192,12 +192,12 @@ input.frequency = rate; input.channels = nch; - playlist = playlist_get_active(); + playlist = aud_playlist_get_active(); if(!playlist) return 0; - pos = playlist_get_position(playlist); - tuple = playlist_get_tuple(playlist, pos); + pos = aud_playlist_get_position(playlist); + tuple = aud_playlist_get_tuple(playlist, pos); if(!tuple) return 0; diff -r 371d9450c631 -r 319930001524 src/m3u/m3u.c --- a/src/m3u/m3u.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/m3u/m3u.c Wed Oct 17 23:09:54 2007 +0300 @@ -83,7 +83,7 @@ gsize line_len = 1024; gint ext_len = -1; gboolean is_extm3u = FALSE; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); gchar *uri; uri = g_filename_to_uri(filename, NULL, NULL); @@ -124,14 +124,14 @@ } if (is_extm3u) { - if (cfg.use_pl_metadata && ext_info) + if (aud_cfg->use_pl_metadata && ext_info) parse_extm3u_info(ext_info, &ext_title, &ext_len); g_free(ext_info); ext_info = NULL; } uri = g_filename_to_uri(line, NULL, NULL); - playlist_load_ins_file(playlist, uri ? uri : line, filename, pos, ext_title, ext_len); + aud_playlist_load_ins_file(playlist, uri ? uri : line, filename, pos, ext_title, ext_len); g_free(uri); aud_str_replace_in(&ext_title, NULL); @@ -151,7 +151,7 @@ GList *node; gchar *outstr = NULL; VFSFile *file; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); gchar *fn = NULL; g_return_if_fail(filename != NULL); @@ -162,7 +162,7 @@ g_free(fn); g_return_if_fail(file != NULL); - if (cfg.use_pl_metadata) + if (aud_cfg->use_pl_metadata) aud_vfs_fprintf(file, "#EXTM3U\n"); PLAYLIST_LOCK(playlist); @@ -170,7 +170,7 @@ for (node = playlist->entries; node; node = g_list_next(node)) { PlaylistEntry *entry = PLAYLIST_ENTRY(node->data); - if (entry->title && cfg.use_pl_metadata) { + if (entry->title && aud_cfg->use_pl_metadata) { gint seconds; if (entry->length > 0) diff -r 371d9450c631 -r 319930001524 src/modplug/gui/interface.cxx --- a/src/modplug/gui/interface.cxx Wed Oct 17 23:09:30 2007 +0300 +++ b/src/modplug/gui/interface.cxx Wed Oct 17 23:09:54 2007 +0300 @@ -129,7 +129,7 @@ Config = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (Config, "Config"); - gtk_widget_set_size_request (Config, 500, -1); + gtk_widget_set_size_request (Config, -1, -1); gtk_window_set_title (GTK_WINDOW (Config), _("ModPlug Configuration")); gtk_window_set_resizable (GTK_WINDOW (Config), FALSE); diff -r 371d9450c631 -r 319930001524 src/mtp_up/mtp.c --- a/src/mtp_up/mtp.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/mtp_up/mtp.c Wed Oct 17 23:09:54 2007 +0300 @@ -107,7 +107,7 @@ Tuple *tuple; GList *node=NULL,*up_list=NULL; PlaylistEntry *entry; - Playlist *current_play = playlist_get_active(); + Playlist *current_play = aud_playlist_get_active(); node = current_play->entries; PLAYLIST_LOCK(current_play); /*needed so that the user doesn't modify the selection*/ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/.depend diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/Makefile Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,33 @@ +PLUGIN = paranormal-ng${PLUGIN_SUFFIX} + +SRCS = actuators.c \ + beatdetect.c \ + builtins.c \ + cfg.c \ + cmaps.c \ + containers.c \ + drawing.c \ + freq.c \ + general.c \ + misc.c \ + paranormal.c \ + plugin.c \ + presets.c \ + wave.c \ + xform.c \ + libcalc/dict.c \ + libcalc/execute.c \ + libcalc/function.c \ + libcalc/parser.c \ + libcalc/storage.c + +SUBDIRS = presets + +include ../../buildsys.mk +include ../../extra.mk + +plugindir := ${plugindir}/${VISUALIZATION_PLUGIN_DIR} + +CFLAGS += ${PLUGIN_CFLAGS} +CPPFLAGS += ${PLUGIN_CPPFLAGS} ${MOWGLI_CFLAGS} ${DBUS_CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS} ${PANGO_CFLAGS} ${ARCH_DEFINES} ${XML_CPPFLAGS} ${SDL_CFLAGS} -I../../intl -I../.. -I. +LIBS += ${GTK_LIBS} ${GLIB_LIBS} ${PANGO_LIBS} ${XML_LIBS} ${SDL_LIBS} -lGL -lGLU diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/TODO --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/TODO Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,13 @@ +More immediate points: + +- blend surface + +- container_stepped + executes amount of instructions.. step increases or decreases + on beat + +- container_repeat + executes the child instructions amount of times.. step + increases or decreases on beat + + diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/actuators.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/actuators.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,196 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include + +#include "actuators.h" +//#include "containers.h" + +/* FIXME: container options override containees - fix this? */ +/* FIXME: add actuator groups (by a group name string) */ + +/* FIXME: add support for copying containers' children (optionally) */ +struct pn_actuator * +copy_actuator (const struct pn_actuator *a) +{ + struct pn_actuator *actuator; + int i; + + actuator = g_new (struct pn_actuator, 1); + + actuator->desc = a->desc; + + /* Make an options table */ + if (actuator->desc->option_descs) + { + /* count the options */ + for (i=0; actuator->desc->option_descs[i].name; i++); + + actuator->options = g_new (struct pn_actuator_option, i + 1); + for (i=0; actuator->desc->option_descs[i].name; i++) + { + actuator->options[i].desc = &actuator->desc->option_descs[i]; + + /* copy the default options */ + switch (actuator->desc->option_descs[i].type) + { + case OPT_TYPE_INT: + case OPT_TYPE_COLOR_INDEX: + case OPT_TYPE_FLOAT: + case OPT_TYPE_COLOR: + case OPT_TYPE_BOOLEAN: + memcpy (&actuator->options[i].val, + &a->options[i].val, + sizeof (union actuator_option_val)); + break; + case OPT_TYPE_STRING: + actuator->options[i].val.sval = g_strdup(a->options[i].val.sval); + break; + default: + break; + } + } + + /* the NULL option */ + actuator->options[i].desc = NULL; + } + else + actuator->options = NULL; + + if (actuator->desc->init) + actuator->desc->init (&actuator->data); + + return actuator; +} + +struct pn_actuator_desc * +get_actuator_desc (const char *name) +{ + int i; + + for (i=0; builtin_table[i]; i++) + if (! g_strcasecmp (name, builtin_table[i]->name) || ! g_strcasecmp(name, builtin_table[i]->dispname)) + break; + + /* actuator not found */ + if (! builtin_table[i]) + return NULL; + + return builtin_table[i]; +} + +struct pn_actuator * +create_actuator (const char *name) +{ + int i; + struct pn_actuator_desc *desc; + struct pn_actuator *actuator; + + /* find the actuatoreration */ + desc = get_actuator_desc (name); + + if (! desc) + return NULL; + + actuator = g_new (struct pn_actuator, 1); + actuator->desc = desc; + + /* Make an options table */ + if (actuator->desc->option_descs) + { + /* count the options */ + for (i=0; actuator->desc->option_descs[i].name != NULL; i++); + + actuator->options = g_new0 (struct pn_actuator_option, i + 1); + for (i=0; actuator->desc->option_descs[i].name != NULL; i++) + { + actuator->options[i].desc = &actuator->desc->option_descs[i]; + + /* copy the default options */ + switch (actuator->desc->option_descs[i].type) + { + case OPT_TYPE_INT: + case OPT_TYPE_COLOR_INDEX: + case OPT_TYPE_FLOAT: + case OPT_TYPE_COLOR: + case OPT_TYPE_BOOLEAN: + memcpy (&actuator->options[i].val, + &actuator->desc->option_descs[i].default_val, + sizeof (union actuator_option_val)); + break; + case OPT_TYPE_STRING: + /* NOTE: It's not realloc'ed so don't free it */ + actuator->options[i].val.sval = + actuator->desc->option_descs[i].default_val.sval; + break; + } + } + + /* the NULL option */ + actuator->options[i].desc = NULL; + } + else + actuator->options = NULL; + + if (actuator->desc->init) + actuator->desc->init (&actuator->data); + + return actuator; +} + +void +destroy_actuator (struct pn_actuator *actuator) +{ + int i; + + if (actuator->desc->cleanup) + actuator->desc->cleanup (actuator->data); + + /* find any option val's that need to be freed */ + if (actuator->options) + for (i=0; actuator->options[i].desc; i++) + switch (actuator->options[i].desc->type) + { + case OPT_TYPE_INT: + case OPT_TYPE_FLOAT: + case OPT_TYPE_COLOR: + case OPT_TYPE_COLOR_INDEX: + case OPT_TYPE_BOOLEAN: + break; + case OPT_TYPE_STRING: + if (actuator->options[i].val.sval + != actuator->options[i].desc->default_val.sval) + g_free ((char *)actuator->options[i].val.sval); + } + + g_free (actuator->options); + g_free (actuator); +} + +void +exec_actuator (struct pn_actuator *actuator) +{ + g_assert (actuator); + g_assert (actuator->desc); + g_assert (actuator->desc->exec); + actuator->desc->exec (actuator->options, actuator->data); +} + diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/actuators.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/actuators.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,117 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* FIXME: rename actuators to pn_actuators */ +/* FIXME: add a color type to the OPT_TYPE's */ + +#ifndef _ACTUATORS_H +#define _ACTUATORS_H + +#include +#include + +/* Helper macros for actuator functions */ +#define PN_ACTUATOR_INIT_FUNC(f) ((void (*) (gpointer *data))f) +#define PN_ACTUATOR_CLEANUP_FUNC(f) ((void (*) (gpointer data))f) +#define PN_ACTUATOR_EXEC_FUNC(f) \ +((void (*) (const struct pn_actuator_option *opts, gpointer data))f) + +struct pn_color +{ + guchar r, g, b, a; +}; + + +union actuator_option_val +{ + int ival; + float fval; + const char *sval; + struct pn_color cval; + gboolean bval; +}; + +/* A actuator's option description */ +struct pn_actuator_option_desc +{ + const char *name; + const char *doc; /* option documentation */ + enum + { + OPT_TYPE_INT = 0, + OPT_TYPE_FLOAT = 1, + OPT_TYPE_STRING = 2, + OPT_TYPE_COLOR = 3, + OPT_TYPE_COLOR_INDEX = 4, /* uses ival */ + OPT_TYPE_BOOLEAN = 5 + } type; + union actuator_option_val default_val; +}; + +/* The actual option instance */ +struct pn_actuator_option +{ + const struct pn_actuator_option_desc *desc; + union actuator_option_val val; +}; + +/* An operation's description */ +struct pn_actuator_desc +{ + const char *name; /* e.g. "container_simple" */ + const char *dispname; /* e.g. "Simple Container" */ + const char *doc; /* documentation txt */ + const enum + { + ACTUATOR_FLAG_CONTAINER = 1<<0 + } flags; + + /* A null terminating (ie a actuator_option_desc == {0,...,0}) + array - OPTIONAL (optional fields can be NULL) */ + const struct pn_actuator_option_desc *option_descs; + + /* Init function - data points to the actuator.data - OPTIONAL */ + void (*init) (gpointer *data); + + /* Cleanup actuatortion - OPTIONAL */ + void (*cleanup) (gpointer data); + + /* Execute actuatortion - REQUIRED (duh!) */ + void (*exec) (const struct pn_actuator_option *opts, gpointer data); +}; + +/* An actual operation instance */ +struct pn_actuator +{ + const struct pn_actuator_desc *desc; + struct pn_actuator_option *options; + gpointer data; +}; + +/* The array containing all operations (see builtins.c) */ +extern struct pn_actuator_desc *builtin_table[]; + +/* functions for actuators */ +struct pn_actuator_desc *get_actuator_desc (const char *name); +struct pn_actuator *copy_actuator (const struct pn_actuator *a); +struct pn_actuator *create_actuator (const char *name); +void destroy_actuator (struct pn_actuator *actuator); +void exec_actuator (struct pn_actuator *actuator); + +#endif /* _ACTUATORS_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/beatdetect.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/beatdetect.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,49 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "paranormal.h" + +/* + * This algorithm is by Janusz Gregorcyzk, the implementation is + * mine, however. + * + * -- nenolod + */ +int +pn_is_new_beat(void) +{ + gint i; + gint total = 0; + gboolean ret = FALSE; + static gint previous; + + for (i = 1; i < 512; i++) + { + total += abs (pn_sound_data->pcm_data[0][i] - + pn_sound_data->pcm_data[0][i - 1]); + } + + total /= 512; + + ret = (total > (2 * previous)); + + previous = total; + + return ret; +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/builtins.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/builtins.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,113 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include "actuators.h" + +#define DECLARE_ACTUATOR(a) extern struct pn_actuator_desc builtin_##a; + +/* **************** containers **************** */ + +DECLARE_ACTUATOR (container_simple); +DECLARE_ACTUATOR (container_once); +DECLARE_ACTUATOR (container_cycle); +DECLARE_ACTUATOR (container_onbeat); + +/* **************** cmaps **************** */ + +DECLARE_ACTUATOR (cmap_bwgradient); +DECLARE_ACTUATOR (cmap_gradient); +DECLARE_ACTUATOR (cmap_dynamic); + +/* **************** freq **************** */ +DECLARE_ACTUATOR (freq_dots); +DECLARE_ACTUATOR (freq_drops); + +/* **************** general **************** */ +DECLARE_ACTUATOR (general_fade); +DECLARE_ACTUATOR (general_blur); +DECLARE_ACTUATOR (general_mosaic); +DECLARE_ACTUATOR (general_clear); +DECLARE_ACTUATOR (general_noop); +DECLARE_ACTUATOR (general_invert); +DECLARE_ACTUATOR (general_replace); +DECLARE_ACTUATOR (general_swap); +DECLARE_ACTUATOR (general_copy); +DECLARE_ACTUATOR (general_flip); +DECLARE_ACTUATOR (general_evaluate); +DECLARE_ACTUATOR (general_setalpha); + +/* **************** misc **************** */ +DECLARE_ACTUATOR (misc_floater); + +/* **************** wave **************** */ +DECLARE_ACTUATOR (wave_horizontal); +DECLARE_ACTUATOR (wave_vertical); +DECLARE_ACTUATOR (wave_normalize); +DECLARE_ACTUATOR (wave_smooth); +DECLARE_ACTUATOR (wave_radial); +DECLARE_ACTUATOR (wave_scope); + +/* **************** xform **************** */ +DECLARE_ACTUATOR (xform_adjust); + +/* **************** builtin_table **************** */ +struct pn_actuator_desc *builtin_table[] = +{ + /* **************** containers **************** */ + &builtin_container_simple, + &builtin_container_once, + &builtin_container_cycle, + &builtin_container_onbeat, + + /* **************** cmaps **************** */ + &builtin_cmap_bwgradient, + &builtin_cmap_gradient, + &builtin_cmap_dynamic, + /* **************** freq **************** */ + &builtin_freq_dots, + &builtin_freq_drops, + /* **************** general **************** */ + &builtin_general_fade, + &builtin_general_blur, + &builtin_general_mosaic, + &builtin_general_clear, + &builtin_general_noop, + &builtin_general_invert, + &builtin_general_replace, + &builtin_general_swap, + &builtin_general_copy, + &builtin_general_flip, + &builtin_general_evaluate, + &builtin_general_setalpha, + /* **************** misc **************** */ + &builtin_misc_floater, + /* **************** wave **************** */ + &builtin_wave_horizontal, + &builtin_wave_vertical, + &builtin_wave_normalize, + &builtin_wave_smooth, + &builtin_wave_radial, + &builtin_wave_scope, + /* **************** xform **************** */ + &builtin_xform_adjust, + /* **************** the end! **************** */ + NULL +}; diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/cfg.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/cfg.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,652 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* FIXME: prevent the user from dragging something above the root + actuator */ + +#include + +#include +#include +#include + +#include + +#include "paranormal.h" +#include "actuators.h" +#include "containers.h" +#include "presets.h" + +/* DON'T CALL pn_fatal_error () IN HERE!!! */ + +/* Actuator page stuffs */ +static GtkWidget *cfg_dialog, *actuator_tree, *option_frame, *actuator_option_table; +static GtkWidget *actuator_add_opmenu, *actuator_add_button, *actuator_remove_button; +static GtkCTreeNode *selected_actuator_node; +static GtkTooltips *actuator_tooltips; + +/* This is used so that actuator_row_data_destroyed_cb won't free + the actuator associated w/ the node since we're going to be using it */ +gboolean destroy_row_data = TRUE; + +static void +actuator_row_data_destroyed_cb (struct pn_actuator *a) +{ + if (a && destroy_row_data) + destroy_actuator (a); +} + +static void +add_actuator (struct pn_actuator *a, GtkCTreeNode *parent, gboolean copy) +{ + GtkCTreeNode *node; + GSList *l; + + g_assert (cfg_dialog); + g_assert (actuator_tree); + g_assert (actuator_option_table); + + node = gtk_ctree_insert_node (GTK_CTREE (actuator_tree), parent, + NULL, (gchar**)&a->desc->dispname, 0, + NULL, NULL, NULL, NULL, + a->desc->flags & ACTUATOR_FLAG_CONTAINER + ? FALSE : TRUE, + TRUE); + + if (a->desc->flags & ACTUATOR_FLAG_CONTAINER) + for (l=*(GSList **)a->data; l; l = l->next) + { + add_actuator (l->data, node, copy); + } + + if (copy) + a = copy_actuator (a); + else if (a->desc->flags & ACTUATOR_FLAG_CONTAINER) + container_unlink_actuators (a); + + gtk_ctree_node_set_row_data_full (GTK_CTREE (actuator_tree), node, a, + ((GtkDestroyNotify) actuator_row_data_destroyed_cb)); +} + +static guchar +gdk_colour_to_paranormal_colour(gint16 colour) +{ + return (guchar) (colour / 255); +} + +static gint16 +paranormal_colour_to_gdk_colour(guchar colour) +{ + return (gint16) (colour * 255); +} + +static void +int_changed_cb (GtkSpinButton *sb, int *i) +{ + *i = gtk_spin_button_get_value_as_int (sb); +} + +static void +float_changed_cb (GtkSpinButton *sb, float *f) +{ + *f = gtk_spin_button_get_value_as_float (sb); +} + +static void +string_changed_cb (GtkEditable *t, char **s) +{ + if (*s != gtk_object_get_data (GTK_OBJECT (t), "DEFAULT_OP_STRING")) + g_free (*s); + + *s = gtk_editable_get_chars (t, 0, -1); +} + +static void +color_changed_cb (GtkColorButton *cb, struct pn_color *c) +{ + GdkColor colour; + + gtk_color_button_get_color(cb, &colour); + + c->r = gdk_colour_to_paranormal_colour(colour.red); + c->g = gdk_colour_to_paranormal_colour(colour.green); + c->b = gdk_colour_to_paranormal_colour(colour.blue); +} + +static void +boolean_changed_cb (GtkToggleButton *tb, gboolean *b) +{ + *b = gtk_toggle_button_get_active (tb); +} + +static void +row_select_cb (GtkCTree *ctree, GtkCTreeNode *node, + gint column, gpointer data) +{ + struct pn_actuator *a; + int opt_count = 0, i, j; + GtkWidget *w; + GtkObject *adj; + + a = (struct pn_actuator *)gtk_ctree_node_get_row_data (ctree, node); + + /* count the actuator's options (plus one) */ + if (a->desc->option_descs) + while (a->desc->option_descs[opt_count++].name); + else + opt_count = 1; + + gtk_table_resize (GTK_TABLE (actuator_option_table), opt_count, 2); + + /* Actuator name */ + gtk_frame_set_label (GTK_FRAME (option_frame), a->desc->dispname); + + /* Actuator description */ + w = gtk_label_new (a->desc->doc); + gtk_label_set_line_wrap (GTK_LABEL (w), TRUE); + gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (w), 0, .5); + gtk_widget_show (w); + gtk_table_attach (GTK_TABLE (actuator_option_table), w, 0, 2, 0, 1, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, + 3, 3); + + /* now add the options */ + for (i=1, j=0; idesc->option_descs[j].name); + gtk_widget_show (w); + gtk_table_attach (GTK_TABLE (actuator_option_table), w, + 0, 1, i, i+1, + GTK_SHRINK | GTK_FILL, 0, + 3, 3); + switch (a->desc->option_descs[j].type) + { + case OPT_TYPE_INT: + adj = gtk_adjustment_new (a->options[j].val.ival, + G_MININT, G_MAXINT, + 1, 2, 0); + w = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1.0, 0); + gtk_signal_connect (GTK_OBJECT (w), "changed", + GTK_SIGNAL_FUNC (int_changed_cb), + &a->options[j].val.ival); + break; + case OPT_TYPE_FLOAT: + adj = gtk_adjustment_new (a->options[j].val.fval, + -G_MAXFLOAT, G_MAXFLOAT, + 1, 2, 0); + w = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1.0, 5); + gtk_signal_connect (GTK_OBJECT (w), "changed", + GTK_SIGNAL_FUNC (float_changed_cb), + &a->options[j].val.fval); + break; + case OPT_TYPE_STRING: + w = gtk_entry_new (); + gtk_widget_show (w); + gtk_entry_set_text (GTK_ENTRY (w), a->options[j].val.sval); + gtk_object_set_data (GTK_OBJECT (w), "DEFAULT_OP_STRING", + (gpointer)a->desc->option_descs[j].default_val.sval); + gtk_signal_connect (GTK_OBJECT (w), "changed", + GTK_SIGNAL_FUNC (string_changed_cb), + &a->options[j].val.sval); + break; + case OPT_TYPE_COLOR: + { + /* FIXME: add some color preview */ + GdkColor *colour = g_new0(GdkColor, 1); + + colour->red = paranormal_colour_to_gdk_colour(a->options[j].val.cval.r); + colour->green = paranormal_colour_to_gdk_colour(a->options[j].val.cval.g); + colour->blue = paranormal_colour_to_gdk_colour(a->options[j].val.cval.b); + + w = gtk_color_button_new_with_color(colour); + g_signal_connect(G_OBJECT (w), "color-set", + G_CALLBACK (color_changed_cb), + &a->options[j].val.cval); + gtk_tooltips_set_tip (actuator_tooltips, GTK_WIDGET(w), + a->desc->option_descs[j].doc, NULL); + } + break; + case OPT_TYPE_COLOR_INDEX: + adj = gtk_adjustment_new (a->options[j].val.ival, + 0, 255, + 1, 2, 0); + w = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1.0, 0); + gtk_signal_connect (GTK_OBJECT (w), "changed", + GTK_SIGNAL_FUNC (int_changed_cb), + &a->options[j].val.ival); + break; + case OPT_TYPE_BOOLEAN: + w = gtk_check_button_new (); + gtk_widget_show (w); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), + a->options[j].val.bval); + gtk_signal_connect (GTK_OBJECT (w), "clicked", + GTK_SIGNAL_FUNC (boolean_changed_cb), + &a->options[j].val.bval); + break; + } + gtk_widget_show (w); + gtk_tooltips_set_tip (actuator_tooltips, w, + a->desc->option_descs[j].doc, NULL); + gtk_table_attach (GTK_TABLE (actuator_option_table), w, + 1, 2, i, i+1, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, + 0, + 3, 3); + } + + gtk_widget_set_sensitive (actuator_remove_button, TRUE); + gtk_widget_set_sensitive (actuator_add_button, a->desc->flags & ACTUATOR_FLAG_CONTAINER + ? TRUE : FALSE); + + selected_actuator_node = node; +} + +static void +table_remove_all_cb (GtkWidget *widget, gpointer data) +{ + gtk_container_remove (GTK_CONTAINER (actuator_option_table), + widget); +} + +static void +row_unselect_cb (GtkCTree *ctree, GList *node, gint column, + gpointer user_data) +{ + gtk_frame_set_label (GTK_FRAME (option_frame), NULL); + + gtk_container_foreach (GTK_CONTAINER (actuator_option_table), + table_remove_all_cb, NULL); + + /* Can't remove something if nothing's selected */ + gtk_widget_set_sensitive (actuator_remove_button, FALSE); + + selected_actuator_node = NULL; +} + +static void +add_actuator_cb (GtkButton *button, gpointer data) +{ + char *actuator_name; + struct pn_actuator *a; + + gtk_label_get (GTK_LABEL (GTK_BIN (actuator_add_opmenu)->child), + &actuator_name); + + a = create_actuator (actuator_name); + g_assert (a); + + add_actuator (a, selected_actuator_node, FALSE); +} + +static void +remove_actuator_cb (GtkButton *button, gpointer data) +{ + if (selected_actuator_node) + gtk_ctree_remove_node (GTK_CTREE (actuator_tree), + selected_actuator_node); +} + +/* Connect a node to its parent and replace the row data with + a copy of the node */ +static void +connect_actuators_cb (GtkCTree *ctree, GtkCTreeNode *node, + struct pn_actuator **root_ptr) +{ + struct pn_actuator *actuator, *parent, *copy; + + actuator = (struct pn_actuator *) gtk_ctree_node_get_row_data (ctree, node); + if (GTK_CTREE_ROW (node)->parent) + { + /* Connect it to the parent */ + parent = (struct pn_actuator *) + gtk_ctree_node_get_row_data (ctree, GTK_CTREE_ROW (node)->parent); + container_add_actuator (parent, actuator); + } + else + /* This is the root node; still gotta copy it, but we need to + save the original to *root_ptr */ + *root_ptr = actuator; + + /* we don't want our copy getting destroyed */ + destroy_row_data = FALSE; + + copy = copy_actuator (actuator); + gtk_ctree_node_set_row_data_full (ctree, node, copy, + ((GtkDestroyNotify)actuator_row_data_destroyed_cb)); + + /* Ok, now you can destroy it */ + destroy_row_data = TRUE; +} + +/* Extract (and connect) the actuators in the tree */ +static struct pn_actuator * +extract_actuator (void) +{ + GtkCTreeNode *root, *selected; + struct pn_actuator *root_actuator = NULL; + + root = gtk_ctree_node_nth (GTK_CTREE (actuator_tree), 0); + if (root) + gtk_ctree_post_recursive (GTK_CTREE (actuator_tree), root, + GTK_CTREE_FUNC (connect_actuators_cb), + &root_actuator); + + if (selected_actuator_node) + { + selected = selected_actuator_node; + gtk_ctree_unselect (GTK_CTREE (actuator_tree), GTK_CTREE_NODE (selected)); + gtk_ctree_select (GTK_CTREE (actuator_tree), GTK_CTREE_NODE (selected)); + } + + return root_actuator; +} + +/* If selector != NULL, then it's 'OK', otherwise it's 'Cancel' */ +static void +load_sel_cb (GtkButton *button, GtkFileSelection *selector) +{ + if (selector) + { + static const char *fname; + struct pn_actuator *a; + GtkCTreeNode *root; + ConfigDb *db; + + db = bmp_cfg_db_open(); + fname = (char *) gtk_file_selection_get_filename (selector); + a = load_preset (fname); + bmp_cfg_db_set_string(db, "paranormal", "last_path", (char*)fname); + bmp_cfg_db_close(db); + if (! a) + pn_error ("Unable to load file: \"%s\"", fname); + else + { + if ((root = gtk_ctree_node_nth (GTK_CTREE (actuator_tree), 0))) + gtk_ctree_remove_node (GTK_CTREE (actuator_tree), root); + add_actuator (a, NULL, FALSE); + } + } + + gtk_widget_set_sensitive (cfg_dialog, TRUE); +} + +static void +load_button_cb (GtkButton *button, gpointer data) +{ + GtkWidget *selector; + ConfigDb *db; + gchar *last_path; + + db = bmp_cfg_db_open(); + selector = gtk_file_selection_new ("Load Preset"); + if(bmp_cfg_db_get_string(db, "paranormal", "last_path", &last_path)) { + gtk_file_selection_set_filename(GTK_FILE_SELECTION(selector), last_path); + } + bmp_cfg_db_close(db); + + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (selector)->ok_button), + "clicked", GTK_SIGNAL_FUNC (load_sel_cb), selector); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (selector)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (load_sel_cb), NULL); + + gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (selector)->ok_button), + "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), + (gpointer) selector); + gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (selector)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), + (gpointer) selector); + + gtk_widget_set_sensitive (cfg_dialog, FALSE); + gtk_widget_show (selector); +} + +static void +save_sel_cb (GtkButton *button, GtkFileSelection *selector) +{ + if (selector) + { + const char *fname; + struct pn_actuator *a; + + fname = (char *) gtk_file_selection_get_filename (selector); + a = extract_actuator (); + + if (! save_preset (fname, a)) + pn_error ("unable to save preset to file: %s", fname); + } + + gtk_widget_set_sensitive (cfg_dialog, TRUE); +} + +static void +save_button_cb (GtkButton *button, gpointer data) +{ + GtkWidget *selector; + + selector = gtk_file_selection_new ("Save Preset"); + + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (selector)->ok_button), + "clicked", GTK_SIGNAL_FUNC (save_sel_cb), selector); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (selector)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (save_sel_cb), NULL); + + gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (selector)->ok_button), + "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), + (gpointer) selector); + gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (selector)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), + (gpointer) selector); + + gtk_widget_set_sensitive (cfg_dialog, FALSE); + gtk_widget_show (selector); +} + +static void +apply_settings (void) +{ + struct pn_rc rc; + + rc.actuator = extract_actuator (); + + pn_set_rc (&rc); +} + +static void +apply_button_cb (GtkButton *button, gpointer data) +{ + apply_settings (); +} + +static void +ok_button_cb (GtkButton *button, gpointer data) +{ + apply_settings (); + gtk_widget_hide (cfg_dialog); +} + +static void +cancel_button_cb (GtkButton *button, gpointer data) +{ + gtk_widget_destroy (cfg_dialog); + cfg_dialog = NULL; +} + +void +pn_configure (void) +{ + GtkWidget *notebook, *label, *scrollwindow, *menu, *menuitem; + GtkWidget *paned, *vbox, *table, *bbox, *button; + int i; + + + if (! cfg_dialog) + { + /* The dialog */ + cfg_dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (cfg_dialog), "Paranormal Visualization Studio - Editor"); + gtk_widget_set_usize (cfg_dialog, 530, 370); + gtk_container_border_width (GTK_CONTAINER (cfg_dialog), 8); + gtk_signal_connect_object (GTK_OBJECT (cfg_dialog), "delete-event", + GTK_SIGNAL_FUNC (gtk_widget_hide), + GTK_OBJECT (cfg_dialog)); + + /* The notebook */ + notebook = gtk_notebook_new (); + gtk_widget_show (notebook); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cfg_dialog)->vbox), notebook, + TRUE, TRUE, 0); + + /* Actuator page */ + paned = gtk_hpaned_new (); + gtk_widget_show (paned); + label = gtk_label_new ("Actuators"); + gtk_widget_show (label); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), paned, label); + vbox = gtk_vbox_new (FALSE, 3); + gtk_widget_show (vbox); + gtk_paned_pack1 (GTK_PANED (paned), vbox, TRUE, FALSE); + scrollwindow = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrollwindow); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (vbox), scrollwindow, TRUE, TRUE, 3); + actuator_tree = gtk_ctree_new (1, 0); + gtk_widget_show (actuator_tree); + gtk_ctree_set_reorderable (GTK_CTREE (actuator_tree), TRUE); + gtk_signal_connect (GTK_OBJECT (actuator_tree), "tree-select-row", + GTK_SIGNAL_FUNC (row_select_cb), NULL); + gtk_signal_connect (GTK_OBJECT (actuator_tree), "tree-unselect-row", + GTK_SIGNAL_FUNC (row_unselect_cb), NULL); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrollwindow), + actuator_tree); + table = gtk_table_new (3, 2, TRUE); + gtk_widget_show (table); + gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 3); + actuator_add_opmenu = gtk_option_menu_new (); + gtk_widget_show (actuator_add_opmenu); + menu = gtk_menu_new (); + gtk_widget_show (menu); + for (i=0; builtin_table[i]; i++) + { + /* FIXME: Add actuator group support */ + menuitem = gtk_menu_item_new_with_label (builtin_table[i]->dispname); + gtk_widget_show (menuitem); + gtk_menu_append (GTK_MENU (menu), menuitem); + } + gtk_option_menu_set_menu (GTK_OPTION_MENU (actuator_add_opmenu), menu); + gtk_table_attach (GTK_TABLE (table), actuator_add_opmenu, + 0, 2, 0, 1, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, + 3, 3); + actuator_add_button = gtk_button_new_from_stock(GTK_STOCK_ADD); + gtk_widget_show (actuator_add_button); + gtk_signal_connect (GTK_OBJECT (actuator_add_button), "clicked", + GTK_SIGNAL_FUNC (add_actuator_cb), NULL); + gtk_table_attach (GTK_TABLE (table), actuator_add_button, + 0, 1, 1, 2, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, + 3, 3); + actuator_remove_button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); + gtk_widget_set_sensitive (actuator_remove_button, FALSE); + gtk_widget_show (actuator_remove_button); + gtk_signal_connect (GTK_OBJECT (actuator_remove_button), "clicked", + GTK_SIGNAL_FUNC (remove_actuator_cb), NULL); + gtk_table_attach (GTK_TABLE (table), actuator_remove_button, + 1, 2, 1, 2, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, + 3, 3); + button = gtk_button_new_from_stock(GTK_STOCK_OPEN); + gtk_widget_show (button); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (load_button_cb), NULL); + gtk_table_attach (GTK_TABLE (table), button, + 0, 1, 2, 3, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, + 3, 3); + button = gtk_button_new_from_stock(GTK_STOCK_SAVE); + gtk_widget_show (button); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (save_button_cb), NULL); + gtk_table_attach (GTK_TABLE (table), button, + 1, 2, 2, 3, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, + 3, 3); + + /* Option table */ + option_frame = gtk_frame_new (NULL); + gtk_widget_show (option_frame); + gtk_container_set_border_width (GTK_CONTAINER (option_frame), 3); + gtk_paned_pack2 (GTK_PANED (paned), option_frame, TRUE, TRUE); + scrollwindow = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrollwindow); + gtk_container_set_border_width (GTK_CONTAINER (scrollwindow), 3); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (option_frame), scrollwindow); + actuator_option_table = gtk_table_new (0, 2, FALSE); + gtk_widget_show (actuator_option_table); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrollwindow), + actuator_option_table); + gtk_paned_set_position (GTK_PANED (paned), 0); + actuator_tooltips = gtk_tooltips_new (); + gtk_tooltips_enable (actuator_tooltips); + + /* Build the initial actuator actuator_tree */ + if (pn_rc->actuator) + { + add_actuator (pn_rc->actuator, NULL, TRUE); + gtk_widget_set_sensitive (actuator_add_button, FALSE); + } + + /* OK / Apply / Cancel */ + bbox = gtk_hbutton_box_new (); + gtk_widget_show (bbox); + gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 8); + gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), 64, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cfg_dialog)->action_area), + bbox, FALSE, FALSE, 0); + + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + gtk_widget_show (button); + gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NORMAL); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (cancel_button_cb), NULL); + gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0); + + button = gtk_button_new_from_stock (GTK_STOCK_APPLY); + gtk_widget_show (button); + gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NORMAL); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (apply_button_cb), NULL); + gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0); + + button = gtk_button_new_from_stock (GTK_STOCK_OK); + gtk_widget_show (button); + gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NORMAL); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ok_button_cb), NULL); + gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0); + } + + gtk_widget_show (cfg_dialog); + gtk_widget_grab_focus (cfg_dialog); +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/cmaps.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/cmaps.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,202 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include + +#include "paranormal.h" +#include "actuators.h" + +#include "libcalc/calc.h" + +#define STD_CMAP_OPTS { "low_index", "The lowest index of the \ +color map that should be altered", OPT_TYPE_COLOR_INDEX, { ival: 0 } },\ +{ "high_index", "The highest index of the color map that should be \ +altered", OPT_TYPE_COLOR_INDEX, { ival: 255 } } + +static struct pn_color black = {0, 0, 0}; +static struct pn_color white = {255, 255, 255}; + +/* **************** cmap generation funcs **************** */ +static void +cmap_gen_gradient (int step, const struct pn_color *a, + const struct pn_color *b, + struct pn_color *c) +{ + c->r = a->r + step * ((((float)b->r) - ((float)a->r)) / 256.0); + c->g = a->g + step * ((((float)b->g) - ((float)a->g)) / 256.0); + c->b = a->b + step * ((((float)b->b) - ((float)a->b)) / 256.0); +} + +/* **************** cmap_gradient **************** */ +static struct pn_actuator_option_desc cmap_gradient_opts[] = +{ + STD_CMAP_OPTS, + { "lcolor", "The low color used in the gradient generation", + OPT_TYPE_COLOR, { cval: {0, 0, 0} } }, + { "hcolor", "The high color used in the gradient generation", + OPT_TYPE_COLOR, { cval: {0, 0, 0} } }, + { NULL } +}; + +static void +cmap_gradient_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i; + + for (i=opts[0].val.ival; i<=opts[1].val.ival; i++) + cmap_gen_gradient (((i-opts[0].val.ival)<<8)/(opts[1].val.ival + - opts[0].val.ival), + &opts[2].val.cval, &opts[3].val.cval, + &pn_image_data->cmap[i]); +} + +struct pn_actuator_desc builtin_cmap_gradient = +{ + "cmap_gradient", + "Normal colourmap", + "Sets the colormap to a gradient going from to " + "", + 0, cmap_gradient_opts, + NULL, NULL, cmap_gradient_exec +}; + +/* **************** cmap_bwgradient **************** */ +static struct pn_actuator_option_desc cmap_bwgradient_opts[] = +{ + STD_CMAP_OPTS, + { "color", "The intermediate color to use in the gradient", + OPT_TYPE_COLOR, { cval: {191, 191, 191} } }, + { NULL } +}; + +static void +cmap_bwgradient_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i; + + for (i=opts[0].val.ival; i<128 && i<=opts[1].val.ival; i++) + cmap_gen_gradient (i<<1, &black, &opts[2].val.cval, + &pn_image_data->cmap[i]); + + for (i=128; i<256 && i<=opts[1].val.ival; i++) + cmap_gen_gradient ((i-128)<<1, &opts[2].val.cval, &white, + &pn_image_data->cmap[i]); +} + +struct pn_actuator_desc builtin_cmap_bwgradient = +{ + "cmap_bwgradient", + "Value-based colourmap", + "Sets the colormap to a gradient going from black to " + "white, via an intermediate color", + 0, cmap_bwgradient_opts, + NULL, NULL, cmap_bwgradient_exec +}; + +/* **************** cmap_dynamic **************** */ +static struct pn_actuator_option_desc cmap_dynamic_opts[] = +{ + STD_CMAP_OPTS, + { "script", "The script to run on each step.", + OPT_TYPE_STRING, { sval: "red = red + 0.01; blue = blue + 0.01; green = green + 0.01;" } }, + { NULL } +}; + +typedef struct { + expression_t *expr; + symbol_dict_t *dict; +} PnDynamicColourmapData; + +static void +cmap_dynamic_init(gpointer *data) +{ + *data = g_new0(PnDynamicColourmapData, 1); +} + +static void +cmap_dynamic_cleanup(gpointer data) +{ + PnDynamicColourmapData *d = (PnDynamicColourmapData *) data; + + if (d->expr) + expr_free(d->expr); + if (d->dict) + dict_free(d->dict); + + g_free(d); +} + +static void +cmap_dynamic_exec(const struct pn_actuator_option *opts, + gpointer data) +{ + PnDynamicColourmapData *d = (PnDynamicColourmapData *) data; + gint i, j; + gdouble *rf, *bf, *gf, *inf; + gint rn, bn, gn; + + if (!d->dict && !d->expr) + { + d->dict = dict_new(); + if (!d->dict) + return; + + d->expr = expr_compile_string(opts[2].val.sval, d->dict); + if (!d->expr) + { + dict_free(d->dict); + d->dict = NULL; + return; + } + } + + rf = dict_variable(d->dict, "red"); + gf = dict_variable(d->dict, "green"); + bf = dict_variable(d->dict, "blue"); + inf = dict_variable(d->dict, "index"); + + for (i = opts[0].val.ival; i < 255 && i <= opts[1].val.ival; i++) + { + *inf = ((gdouble)i / 255.0); + + expr_execute(d->expr, d->dict); + + /* Convert rf/bf/gf to realworld values. */ + rn = (gdouble)(*rf * 255); + gn = (gdouble)(*gf * 255); + bn = (gdouble)(*bf * 255); + + pn_image_data->cmap[i].r = rn; + pn_image_data->cmap[i].g = gn; + pn_image_data->cmap[i].b = bn; + } +} + +struct pn_actuator_desc builtin_cmap_dynamic = +{ + "cmap_dynamic", + "Dynamic Colourmap", + "Scriptable colourmap modifier.", + 0, cmap_dynamic_opts, + cmap_dynamic_init, cmap_dynamic_cleanup, cmap_dynamic_exec +}; diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/containers.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/containers.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,267 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include + +#include + +#include "actuators.h" +#include "paranormal.h" + +/* **************** all containers **************** */ + +/* Add a actuator to a container (end of list) */ +void +container_add_actuator (struct pn_actuator *container, struct pn_actuator *a) +{ + g_assert (container->desc->flags & ACTUATOR_FLAG_CONTAINER); + g_assert (a); + + *((GSList **)container->data) = + g_slist_append (*(GSList **)container->data, a); +} + +void +container_remove_actuator (struct pn_actuator *container, struct pn_actuator *a) +{ + g_assert (container->desc->flags & ACTUATOR_FLAG_CONTAINER); + g_assert (a); + + *((GSList **)container->data) = + g_slist_remove (*(GSList **)container->data, a); +} + +/* clear the containee list */ +void +container_unlink_actuators (struct pn_actuator *container) +{ + g_assert (container->desc->flags & ACTUATOR_FLAG_CONTAINER); + + g_slist_free (*(GSList **)container->data); + *(GSList **)container->data = NULL; +} + +/* this does NOT free data */ +static void +container_cleanup (GSList** data) +{ + GSList *child; + + for (child = *data; child; child = child->next) + destroy_actuator ((struct pn_actuator *) child->data); + + g_slist_free (*data); +} + +/* **************** container_simple **************** */ +static void +container_simple_init (GSList ***data) +{ + *data = g_new0 (GSList *, 1); +} + +static void +container_simple_cleanup (GSList **data) +{ + container_cleanup (data); + g_free (data); +} + +static void +container_simple_exec (const struct pn_actuator_option *opts, + GSList **data) +{ + GSList *child; + + for (child = *data; child; child = child->next) + exec_actuator ((struct pn_actuator *) child->data); +} + +struct pn_actuator_desc builtin_container_simple = +{ + "container_simple", + "Simple Container", + "A simple (unconditional) container\n\n" + "This is usually used as the root actuator of a list", + ACTUATOR_FLAG_CONTAINER, NULL, + PN_ACTUATOR_INIT_FUNC (container_simple_init), + PN_ACTUATOR_CLEANUP_FUNC (container_simple_cleanup), + PN_ACTUATOR_EXEC_FUNC (container_simple_exec) +}; + +/* **************** container_once **************** */ +struct container_once_data +{ + GSList *children; /* This MUST be first! */ + + gboolean done; +}; + +static void +container_once_init (struct container_once_data **data) +{ + *data = g_new0 (struct container_once_data, 1); +} + +static void +container_once_cleanup (GSList **data) +{ + container_cleanup (data); + g_free (data); +} + +static void +container_once_exec (const struct pn_actuator_option *opts, + struct container_once_data *data) +{ + if (! data->done) + { + GSList *child; + + for (child = data->children; child; child = child->next) + exec_actuator ((struct pn_actuator *) child->data); + + data->done = TRUE; + } +} + +struct pn_actuator_desc builtin_container_once = +{ + "container_once", + "Initialization Container", + "A container whose contents get executed exactly once.\n\n" + "This is often used to set initial graphics states such as the\n" + "pixel depth, or to display some text (such as credits)", + ACTUATOR_FLAG_CONTAINER, NULL, + PN_ACTUATOR_INIT_FUNC (container_once_init), + PN_ACTUATOR_CLEANUP_FUNC (container_once_cleanup), + PN_ACTUATOR_EXEC_FUNC (container_once_exec) +}; + +/* **************** container_cycle ***************** */ +static struct pn_actuator_option_desc container_cycle_opts[] = +{ + { "change_interval", "The number of seconds between changing the " + "child to be executed", OPT_TYPE_INT, { ival: 20 } }, + { "beat", "Whether or not the change should only occur on a beat", + OPT_TYPE_BOOLEAN, { bval: TRUE } }, + { NULL } +}; + +struct container_cycle_data +{ + GSList *children; + GSList *current; + int last_change; +}; + +static void +container_cycle_init (gpointer *data) +{ + *data = g_new0 (struct container_cycle_data, 1); +} + +static void +container_cycle_cleanup (gpointer data) +{ + container_cleanup (data); + g_free (data); +} + +static void +container_cycle_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + struct container_cycle_data *cdata = (struct container_cycle_data*)data; + int now; + + /* + * Change branch if all of the requirements are met for the branch to change. + */ + if ((opts[1].val.bval == TRUE && pn_new_beat != FALSE) || opts[1].val.bval == FALSE) + { + now = SDL_GetTicks(); + + if (now - cdata->last_change + > opts[0].val.ival * 1000) + { + cdata->last_change = now; + + /* FIXME: add randomization support */ + if (cdata->current) + cdata->current = cdata->current->next; + } + } + + if (! cdata->current) + cdata->current = cdata->children; + + if (cdata->current) + exec_actuator ((struct pn_actuator*)cdata->current->data); +} + +struct pn_actuator_desc builtin_container_cycle = +{ + "container_cycle", + "Branched-execution Container", + "A container that alternates which of its children is executed; it " + "can either change on an interval, or only on a beat.", + ACTUATOR_FLAG_CONTAINER, container_cycle_opts, + container_cycle_init, container_cycle_cleanup, container_cycle_exec +}; + +/* **************** container_onbeat **************** */ +static void +container_onbeat_init (GSList ***data) +{ + *data = g_new0 (GSList *, 1); +} + +static void +container_onbeat_cleanup (GSList **data) +{ + container_cleanup (data); + g_free (data); +} + +static void +container_onbeat_exec (const struct pn_actuator_option *opts, + GSList **data) +{ + GSList *child; + + if (pn_new_beat == TRUE) + { + for (child = *data; child; child = child->next) + exec_actuator ((struct pn_actuator *) child->data); + } +} + +struct pn_actuator_desc builtin_container_onbeat = +{ + "container_onbeat", + "OnBeat Container", + "A simple container which only triggers on a beat.", + ACTUATOR_FLAG_CONTAINER, NULL, + PN_ACTUATOR_INIT_FUNC (container_onbeat_init), + PN_ACTUATOR_CLEANUP_FUNC (container_onbeat_cleanup), + PN_ACTUATOR_EXEC_FUNC (container_onbeat_exec) +}; diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/containers.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/containers.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,27 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PN_CONTAINERS_H +#define _PN_CONTAINERS_H + +void container_add_actuator (struct pn_actuator *container, struct pn_actuator *a); +void container_remove_actuator (struct pn_actuator *container, struct pn_actuator *a); +void container_unlink_actuators (struct pn_actuator *container); + +#endif /* _CONTAINERS_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/drawing.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/drawing.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,62 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include "paranormal.h" +#include "actuators.h" +#include "pn_utils.h" + +void +pn_draw_dot (guint x, guint y, guchar value) +{ + if (x > pn_image_data->width || x < 0 || y > pn_image_data->height || y < 0) + return; + + pn_image_data->surface[0][PN_IMG_INDEX(x, y)] = value; +} + +void +pn_draw_line (guint _x0, guint _y0, guint _x1, guint _y1, guchar value) +{ + gint x0 = _x0; + gint y0 = _y0; + gint x1 = _x1; + gint y1 = _y1; + + gint dx = x1 - x0; + gint dy = y1 - y0; + + pn_draw_dot(x0, y0, value); + + if (dx != 0) + { + gfloat m = (gfloat) dy / (gfloat) dx; + gfloat b = y0 - m * x0; + + dx = (x1 > x0) ? 1 : - 1; + while (x0 != x1) + { + x0 += dx; + y0 = m * x0 + b; + + pn_draw_dot(x0, y0, value); + } + } +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/drawing.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/drawing.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,28 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#ifndef PN_DRAWING_H +#define PN_DRAWING_H + +void pn_draw_dot (guint x, guint y, guchar value); +void pn_draw_line (guint _x0, guint _y0, guint _x1, guint _y1, guchar value); + +#endif diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/freq.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/freq.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,81 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include +#include + +#include + +#include "paranormal.h" +#include "actuators.h" +#include "pn_utils.h" + +/* **************** freq_dots **************** */ +/* FIXME: take this piece of crap out */ +static void +freq_dots_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i, basex; + + basex = (pn_image_data->width>>1)-128; + for (i=basex < 0 ? -basex : 0 ; i < 256; i++) + { + pn_image_data->surface[0][PN_IMG_INDEX (basex+i, (pn_image_data->height>>1) + - CAP (pn_sound_data->freq_data[0][i], 120))] + = 0xff; + pn_image_data->surface[0][PN_IMG_INDEX (basex+256-i, (pn_image_data->height>>1) + + CAP (pn_sound_data->freq_data[1][i], 120))] + = 0xff; + } +} + +struct pn_actuator_desc builtin_freq_dots = +{ + "freq_dots", + "Frequency Scope", + "Draws dots varying vertically with the freqency data.", + 0, NULL, + NULL, NULL, freq_dots_exec +}; + +/* **************** freq_drops **************** */ +static void +freq_drops_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i,j; + + for (i=0; i<256; i++) + for (j=0; jfreq_data[0][i]>>3; i++) + pn_image_data->surface[0][PN_IMG_INDEX (rand() % pn_image_data->width, + rand() % pn_image_data->height)] + = 0xff; +} + +struct pn_actuator_desc builtin_freq_drops = +{ + "freq_drops", + "Random Dots", + "Draws dots at random on the image (louder music = more dots)", + 0, NULL, + NULL, NULL, freq_drops_exec +}; diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/general.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/general.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,443 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* FIXME: what to name this file? */ + +#include + +#include "paranormal.h" +#include "actuators.h" +#include "pn_utils.h" +#include "libcalc/calc.h" + +/* **************** general_fade **************** */ +static struct pn_actuator_option_desc general_fade_opts[] = +{ + { "amount", "The amount by which the color index of each " + "pixel should be decreased by each frame (MAX 255)", + OPT_TYPE_INT, { ival: 3 } }, + { NULL } +}; + +static void +general_fade_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int amt = opts[0].val.ival > 255 || opts[0].val.ival < 0 ? 3 : opts[0].val.ival; + int i, j; + + for (j=0; jheight; j++) + for (i=0; iwidth; i++) + pn_image_data->surface[0][PN_IMG_INDEX (i, j)] = + CAPLO (pn_image_data->surface[0][PN_IMG_INDEX (i, j)] + - amt, 0); +} + +struct pn_actuator_desc builtin_general_fade = +{ + "general_fade", "Fade-out", "Decreases the color index of each pixel", + 0, general_fade_opts, + NULL, NULL, general_fade_exec +}; + +/* thanks to feelgood_ICBM @ freenode for this */ +#define glError() { GLenum err; for(err = glGetError(); err; err = glGetError()) { fprintf(stderr, "glError: %s caught at %s:%u\n", \ + (GLchar*)gluErrorString(err), __FILE__, __LINE__); } } + +/* **************** general_blur **************** */ +static void +general_blur_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + GLuint texture_id; + + glGenTextures(1, &texture_id); + glBindTexture(GL_TEXTURE_2D, texture_id); + + glError(); + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 128, 128, 0, GL_RGBA, GL_BYTE, NULL); + + glError(); + + glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, -1, -1, 1, 1, 0); + + glError(); + + glBindTexture(GL_TEXTURE_2D, 0); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + glBindTexture(GL_TEXTURE_2D, texture_id); + + glError(); + + glBegin(GL_QUADS); + + glColor4f(1.0f, 1.0f, 1.0f, 0.5f); + glTexCoord2f(0, 1); + glVertex2i(-1, -1); + glVertex2i(-1, 1); + glVertex2i(1, 1); + glVertex2i(1, -1); + + glEnd(); + glBindTexture(GL_TEXTURE_2D, 0); + + glError(); + + glDeleteTextures(1, &texture_id); + + glFlush(); + + glError(); +} + +struct pn_actuator_desc builtin_general_blur = +{ + "general_blur", "Blur", "A simple radial blur", + 0, NULL, + NULL, NULL, general_blur_exec +}; + +/* **************** general_mosaic **************** */ +/* FIXME: add a variable radius */ +/* FIXME: SPEEEED */ +static struct pn_actuator_option_desc general_mosaic_opts[] = +{ + { "radius", "The pixel radius that should be used for the effect.", + OPT_TYPE_INT, { ival: 6 } }, + { NULL } +}; + +static void +general_mosaic_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i,j; + register guchar *srcptr = pn_image_data->surface[0]; + register guchar *destptr = pn_image_data->surface[1]; + register int sum; + int radius = opts[0].val.ival > 255 || opts[0].val.ival < 0 ? 6 : opts[0].val.ival; + + for (j=0; jheight; j += radius) + for (i=0; iwidth; i += radius) + { + int ii = 0, jj = 0; + guchar bval = 0; + + /* find the brightest colour */ + for (jj = 0; jj < radius && (j + jj < pn_image_data->height); jj++) + for (ii = 0; ii < radius && (i + ii < pn_image_data->width); ii++) + { + guchar val = srcptr[PN_IMG_INDEX(i + ii, j + jj)]; + + if (val > bval) + bval = val; + } + + for (jj = 0; jj < radius && (j + jj < pn_image_data->height); jj++) + for (ii = 0; ii < radius && (i + ii < pn_image_data->width); ii++) + { + destptr[PN_IMG_INDEX(i + ii, j + jj)] = bval; + } + } + + pn_swap_surfaces (); +} + +struct pn_actuator_desc builtin_general_mosaic = +{ + "general_mosaic", "Mosaic", "A simple mosaic effect.", + 0, general_mosaic_opts, + NULL, NULL, general_mosaic_exec +}; + +/* **************** general_clear **************** */ +static void +general_clear_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); +} + +struct pn_actuator_desc builtin_general_clear = +{ + "general_clear", "Clear Surface", "Clears the surface.", + 0, NULL, + NULL, NULL, general_clear_exec +}; + +/* **************** general_setalpha **************** */ +static struct pn_actuator_option_desc general_setalpha_opts[] = +{ + { "blend_colour", "The colour which should be used for blending.", + OPT_TYPE_COLOR, { cval: {255, 255, 255} } }, + { "alpha", "The alpha value.", + OPT_TYPE_COLOR_INDEX, { ival: 128 } }, + { NULL } +}; + +static void +general_setalpha_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + GLubyte colour[] = { opts[0].val.cval.r, opts[0].val.cval.g, opts[0].val.cval.b, + opts[1].val.ival }; + + glColor4ubv(colour); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); +} + +struct pn_actuator_desc builtin_general_setalpha = +{ + "general_setalpha", "Change Blend Setting", "Changes the blending setting (alpha transparency mask).", + 0, general_setalpha_opts, + NULL, NULL, general_setalpha_exec +}; + +/* **************** general_noop **************** */ +static void +general_noop_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + return; +} + +struct pn_actuator_desc builtin_general_noop = +{ + "general_noop", "Do Nothing", "Does absolutely nothing.", + 0, NULL, + NULL, NULL, general_noop_exec +}; + +/* **************** general_invert **************** */ +static void +general_invert_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i, j; + + for (j=0; j < pn_image_data->height; j++) + for (i=0; i < pn_image_data->width; i++) + pn_image_data->surface[0][PN_IMG_INDEX (i, j)] = + 255 - pn_image_data->surface[0][PN_IMG_INDEX (i, j)]; +} + +struct pn_actuator_desc builtin_general_invert = +{ + "general_invert", "Value Invert", "Performs a value invert.", + 0, NULL, + NULL, NULL, general_invert_exec +}; + +/* **************** general_replace **************** */ +static struct pn_actuator_option_desc general_replace_opts[] = +{ + { "start", "The beginning colour value that should be replaced by the value of out.", + OPT_TYPE_INT, { ival: 250 } }, + { "end", "The ending colour value that should be replaced by the value of out.", + OPT_TYPE_INT, { ival: 255 } }, + { "out", "The colour value that in is replaced with.", + OPT_TYPE_INT, { ival: 0 } }, + { NULL } +}; + +static void +general_replace_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + register int i, j; + register guchar val; + guchar begin = opts[0].val.ival > 255 || opts[0].val.ival < 0 ? 250 : opts[0].val.ival; + guchar end = opts[1].val.ival > 255 || opts[1].val.ival < 0 ? 255 : opts[1].val.ival; + guchar out = opts[2].val.ival > 255 || opts[2].val.ival < 0 ? 0 : opts[2].val.ival; + + for (j=0; j < pn_image_data->height; j++) + for (i=0; i < pn_image_data->width; i++) + { + val = pn_image_data->surface[0][PN_IMG_INDEX (i, j)]; + if (val >= begin && val <= end) + pn_image_data->surface[0][PN_IMG_INDEX (i, j)] = out; + } +} + +struct pn_actuator_desc builtin_general_replace = +{ + "general_replace", "Value Replace", "Performs a value replace on a range of values.", + 0, general_replace_opts, + NULL, NULL, general_replace_exec +}; + +/* **************** general_swap **************** */ +static void +general_swap_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + pn_swap_surfaces (); +} + +struct pn_actuator_desc builtin_general_swap = +{ + "general_swap", "Swap Surface", "Swaps the surface.", + 0, NULL, + NULL, NULL, general_swap_exec +}; + +/* **************** general_copy **************** */ +static void +general_copy_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + memcpy(pn_image_data->surface[1], pn_image_data->surface[0], + (pn_image_data->width * pn_image_data->height)); +} + +struct pn_actuator_desc builtin_general_copy = +{ + "general_copy", "Copy Surface", "Copies the surface to the other surface.", + 0, NULL, + NULL, NULL, general_copy_exec +}; + +/* **************** general_flip **************** */ +static struct pn_actuator_option_desc general_flip_opts[] = +{ + { "direction", "Negative is horizontal, positive is vertical.", + OPT_TYPE_INT, { ival: -1 } }, + { NULL } +}; + +static void +general_flip_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + gint x, y; + + if (opts[0].val.ival < 0) + { + for (y = 0; y < pn_image_data->height; y++) + for (x = 0; x < pn_image_data->width; x++) + { + pn_image_data->surface[1][PN_IMG_INDEX(pn_image_data->width - x, y)] = + pn_image_data->surface[0][PN_IMG_INDEX(x, y)]; + } + } + else + { + for (y = 0; y < pn_image_data->height; y++) + for (x = 0; x < pn_image_data->width; x++) + { + pn_image_data->surface[1][PN_IMG_INDEX(x, pn_image_data->height - y)] = + pn_image_data->surface[0][PN_IMG_INDEX(x, y)]; + } + } + + pn_swap_surfaces (); +} + +struct pn_actuator_desc builtin_general_flip = +{ + "general_flip", "Flip Surface", "Flips the surface.", + 0, general_flip_opts, + NULL, NULL, general_flip_exec +}; + +/* ***************** general_evaluate ***************** */ + +static struct pn_actuator_option_desc general_evaluate_opts[] = +{ + { "init_script", "Script to run on start.", OPT_TYPE_STRING, {sval: "global_reg0 = 27;"} }, + { "frame_script", "Script to run.", OPT_TYPE_STRING, {sval: "global_reg0 = global_reg0 + 1;"} }, + { NULL } +}; + +struct pn_evaluate_ctx +{ + expression_t *expr_on_init, *expr_on_frame; + symbol_dict_t *dict; + gboolean reset; +}; + +static void +general_evaluate_init(gpointer *data) +{ + *data = g_new0(struct pn_evaluate_ctx, 1); + + ((struct pn_evaluate_ctx *)*data)->reset = TRUE; +} + +static void +general_evaluate_cleanup(gpointer op_data) +{ + struct pn_evaluate_ctx *data = (struct pn_evaluate_ctx *) op_data; + + g_return_if_fail(data != NULL); + + if (data->expr_on_init) + expr_free(data->expr_on_init); + + if (data->expr_on_frame) + expr_free(data->expr_on_frame); + + if (data->dict) + dict_free(data->dict); + + if (data) + g_free(data); +} + +static void +general_evaluate_exec(const struct pn_actuator_option *opts, + gpointer op_data) +{ + struct pn_evaluate_ctx *data = (struct pn_evaluate_ctx *) op_data; + + if (data->reset) + { + if (data->dict) + dict_free(data->dict); + + data->dict = dict_new(); + + if (opts[0].val.sval != NULL); + data->expr_on_init = expr_compile_string(opts[0].val.sval, data->dict); + + if (opts[1].val.sval != NULL); + data->expr_on_frame = expr_compile_string(opts[1].val.sval, data->dict); + + if (data->expr_on_init != NULL) + expr_execute(data->expr_on_init, data->dict); + + data->reset = FALSE; + } + + if (data->expr_on_frame != NULL) + expr_execute(data->expr_on_frame, data->dict); +} + +struct pn_actuator_desc builtin_general_evaluate = +{ + "general_evaluate", "Evalulate VM Code", + "Evaluates arbitrary VM code. Does not draw anything.", + 0, general_evaluate_opts, + general_evaluate_init, general_evaluate_cleanup, general_evaluate_exec +}; + diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/.depend diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/.deps --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/.deps Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,425 @@ +dict.o: dict.c /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib64/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stddef.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/limits.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/syslimits.h \ + /usr/include/limits.h /usr/include/gentoo-multilib/amd64/limits.h \ + /usr/include/features.h /usr/include/gentoo-multilib/amd64/features.h \ + /usr/include/sys/cdefs.h /usr/include/gentoo-multilib/amd64/sys/cdefs.h \ + /usr/include/bits/wordsize.h \ + /usr/include/gentoo-multilib/amd64/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gentoo-multilib/amd64/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/gentoo-multilib/amd64/gnu/stubs-64.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/local_lim.h \ + /usr/include/linux/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/stdio_lim.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/gentoo-multilib/amd64/time.h /usr/include/bits/time.h \ + /usr/include/gentoo-multilib/amd64/bits/time.h \ + /usr/include/bits/types.h \ + /usr/include/gentoo-multilib/amd64/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/include/gentoo-multilib/amd64/bits/typesizes.h \ + /usr/include/xlocale.h /usr/include/gentoo-multilib/amd64/xlocale.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stdarg.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/string.h /usr/include/gentoo-multilib/amd64/string.h \ + dict.h +execute.o: execute.c /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib64/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stddef.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/limits.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/syslimits.h \ + /usr/include/limits.h /usr/include/gentoo-multilib/amd64/limits.h \ + /usr/include/features.h /usr/include/gentoo-multilib/amd64/features.h \ + /usr/include/sys/cdefs.h /usr/include/gentoo-multilib/amd64/sys/cdefs.h \ + /usr/include/bits/wordsize.h \ + /usr/include/gentoo-multilib/amd64/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gentoo-multilib/amd64/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/gentoo-multilib/amd64/gnu/stubs-64.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/local_lim.h \ + /usr/include/linux/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/stdio_lim.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/gentoo-multilib/amd64/time.h /usr/include/bits/time.h \ + /usr/include/gentoo-multilib/amd64/bits/time.h \ + /usr/include/bits/types.h \ + /usr/include/gentoo-multilib/amd64/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/include/gentoo-multilib/amd64/bits/typesizes.h \ + /usr/include/xlocale.h /usr/include/gentoo-multilib/amd64/xlocale.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stdarg.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/math.h /usr/include/gentoo-multilib/amd64/math.h \ + /usr/include/bits/huge_val.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_val.h \ + /usr/include/bits/huge_valf.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/gentoo-multilib/amd64/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/gentoo-multilib/amd64/bits/nan.h \ + /usr/include/bits/mathdef.h \ + /usr/include/gentoo-multilib/amd64/bits/mathdef.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/gentoo-multilib/amd64/bits/mathcalls.h execute.h dict.h \ + storage.h function.h +function.o: function.c /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib64/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stddef.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/limits.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/syslimits.h \ + /usr/include/limits.h /usr/include/gentoo-multilib/amd64/limits.h \ + /usr/include/features.h /usr/include/gentoo-multilib/amd64/features.h \ + /usr/include/sys/cdefs.h /usr/include/gentoo-multilib/amd64/sys/cdefs.h \ + /usr/include/bits/wordsize.h \ + /usr/include/gentoo-multilib/amd64/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gentoo-multilib/amd64/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/gentoo-multilib/amd64/gnu/stubs-64.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/local_lim.h \ + /usr/include/linux/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/stdio_lim.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/gentoo-multilib/amd64/time.h /usr/include/bits/time.h \ + /usr/include/gentoo-multilib/amd64/bits/time.h \ + /usr/include/bits/types.h \ + /usr/include/gentoo-multilib/amd64/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/include/gentoo-multilib/amd64/bits/typesizes.h \ + /usr/include/xlocale.h /usr/include/gentoo-multilib/amd64/xlocale.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stdarg.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/math.h /usr/include/gentoo-multilib/amd64/math.h \ + /usr/include/bits/huge_val.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_val.h \ + /usr/include/bits/huge_valf.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/gentoo-multilib/amd64/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/gentoo-multilib/amd64/bits/nan.h \ + /usr/include/bits/mathdef.h \ + /usr/include/gentoo-multilib/amd64/bits/mathdef.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/gentoo-multilib/amd64/bits/mathcalls.h \ + /usr/include/string.h /usr/include/gentoo-multilib/amd64/string.h \ + function.h execute.h dict.h storage.h +parser.o: parser.c /usr/include/ctype.h \ + /usr/include/gentoo-multilib/amd64/ctype.h /usr/include/features.h \ + /usr/include/gentoo-multilib/amd64/features.h /usr/include/sys/cdefs.h \ + /usr/include/gentoo-multilib/amd64/sys/cdefs.h \ + /usr/include/bits/wordsize.h \ + /usr/include/gentoo-multilib/amd64/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gentoo-multilib/amd64/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/gentoo-multilib/amd64/gnu/stubs-64.h \ + /usr/include/bits/types.h \ + /usr/include/gentoo-multilib/amd64/bits/types.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stddef.h \ + /usr/include/bits/typesizes.h \ + /usr/include/gentoo-multilib/amd64/bits/typesizes.h \ + /usr/include/endian.h /usr/include/gentoo-multilib/amd64/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/gentoo-multilib/amd64/bits/endian.h /usr/include/xlocale.h \ + /usr/include/gentoo-multilib/amd64/xlocale.h \ + /usr/include/glib-2.0/glib.h /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib64/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/limits.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/syslimits.h \ + /usr/include/limits.h /usr/include/gentoo-multilib/amd64/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/local_lim.h \ + /usr/include/linux/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/stdio_lim.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/gentoo-multilib/amd64/time.h /usr/include/bits/time.h \ + /usr/include/gentoo-multilib/amd64/bits/time.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stdarg.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/locale.h /usr/include/gentoo-multilib/amd64/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/gentoo-multilib/amd64/bits/locale.h /usr/include/math.h \ + /usr/include/gentoo-multilib/amd64/math.h /usr/include/bits/huge_val.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_val.h \ + /usr/include/bits/huge_valf.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h \ + /usr/include/gentoo-multilib/amd64/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/gentoo-multilib/amd64/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/gentoo-multilib/amd64/bits/nan.h \ + /usr/include/bits/mathdef.h \ + /usr/include/gentoo-multilib/amd64/bits/mathdef.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/gentoo-multilib/amd64/bits/mathcalls.h \ + /usr/include/stdio.h /usr/include/gentoo-multilib/amd64/stdio.h \ + /usr/include/libio.h /usr/include/gentoo-multilib/amd64/libio.h \ + /usr/include/_G_config.h /usr/include/gentoo-multilib/amd64/_G_config.h \ + /usr/include/wchar.h /usr/include/gentoo-multilib/amd64/wchar.h \ + /usr/include/bits/wchar.h \ + /usr/include/gentoo-multilib/amd64/bits/wchar.h /usr/include/gconv.h \ + /usr/include/gentoo-multilib/amd64/gconv.h \ + /usr/include/bits/sys_errlist.h \ + /usr/include/gentoo-multilib/amd64/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/gentoo-multilib/amd64/string.h \ + dict.h execute.h storage.h function.h parser.h \ + /usr/include/audacious/vfs.h /usr/include/sys/types.h \ + /usr/include/gentoo-multilib/amd64/sys/types.h \ + /usr/include/sys/select.h \ + /usr/include/gentoo-multilib/amd64/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/gentoo-multilib/amd64/bits/select.h \ + /usr/include/bits/sigset.h \ + /usr/include/gentoo-multilib/amd64/bits/sigset.h \ + /usr/include/sys/sysmacros.h \ + /usr/include/gentoo-multilib/amd64/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h \ + /usr/include/audacious/vfs_buffer.h /usr/include/audacious/vfs.h +storage.o: storage.c /usr/include/glib-2.0/glib.h \ + /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib64/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stddef.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/limits.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/syslimits.h \ + /usr/include/limits.h /usr/include/gentoo-multilib/amd64/limits.h \ + /usr/include/features.h /usr/include/gentoo-multilib/amd64/features.h \ + /usr/include/sys/cdefs.h /usr/include/gentoo-multilib/amd64/sys/cdefs.h \ + /usr/include/bits/wordsize.h \ + /usr/include/gentoo-multilib/amd64/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gentoo-multilib/amd64/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/gentoo-multilib/amd64/gnu/stubs-64.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/local_lim.h \ + /usr/include/linux/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/gentoo-multilib/amd64/bits/stdio_lim.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gatomic.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gbase64.h \ + /usr/include/glib-2.0/glib/gbookmarkfile.h /usr/include/time.h \ + /usr/include/gentoo-multilib/amd64/time.h /usr/include/bits/time.h \ + /usr/include/gentoo-multilib/amd64/bits/time.h \ + /usr/include/bits/types.h \ + /usr/include/gentoo-multilib/amd64/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/include/gentoo-multilib/amd64/bits/typesizes.h \ + /usr/include/xlocale.h /usr/include/gentoo-multilib/amd64/xlocale.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/stdarg.h \ + /usr/include/glib-2.0/glib/gkeyfile.h \ + /usr/include/glib-2.0/glib/gmappedfile.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + storage.h diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/calc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/calc.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,30 @@ +/* calc.h -- an all-in-one include file for libcalc + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef Included_CALC_H +#define Included_CALC_H + +#include "dict.h" +#include "execute.h" +#include "parser.h" +#include "storage.h" + +#endif /* Included_CALC_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/dict.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/dict.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,128 @@ +/* dict.c -- symbol dictionary structures + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#define V_SPACE_INIT 8 +#define V_SPACE_INCR 8 + +#include +#include + +#include "dict.h" + +static int global_dict_initialized = 0; +static symbol_dict_t global_dict; + +static void more_variables (symbol_dict_t *dict) { + var_t *new_var; + + dict->v_space += V_SPACE_INCR; + + new_var = g_new(var_t, dict->v_space + 1); + memcpy (new_var, dict->variables, dict->v_count * sizeof(var_t)); + g_free (dict->variables); + + dict->variables = new_var; +} + +static int dict_define_variable (symbol_dict_t *dict, const char *name) { + var_t *var; + + if (dict->v_count >= dict->v_space) + more_variables (dict); + + var = &dict->variables[dict->v_count]; + + var->value = 0.0; + var->name = g_strdup (name); + + return dict->v_count++; +} + +symbol_dict_t *dict_new (void) { + symbol_dict_t *dict; + + if (global_dict_initialized != 1) { + int i; + + global_dict.v_count = 0; + global_dict.v_space = V_SPACE_INIT; + global_dict.variables = (var_t *) g_new(var_t, global_dict.v_space + 1); + global_dict_initialized = 1; + + for (i = 0; i < 100; i++) { + gchar tmpbuf[40]; + g_snprintf(tmpbuf, 40, "global_reg%d", i); + dict_define_variable(&global_dict, tmpbuf); + } + } + + dict = g_new(symbol_dict_t, 1); + + /* Allocate space for variables. */ + dict->v_count = 0; + dict->v_space = V_SPACE_INIT; + dict->variables = (var_t *) g_new (var_t, dict->v_space + 1); + + return dict; +} + +void dict_free (symbol_dict_t *dict) { + int i; + + if (!dict) + return; + + /* Free memory used by variables. */ + for (i = 0; i < dict->v_count; i++) + g_free (dict->variables[i].name); + g_free (dict->variables); + + g_free (dict); +} + +int dict_lookup (symbol_dict_t *dict, const char *name) { + int i; + + for (i = 0; i < global_dict.v_count; i++) { + if (strcmp (global_dict.variables[i].name, name) == 0) + return -i; + } + + for (i = 0; i < dict->v_count; i++) { + if (strcmp (dict->variables[i].name, name) == 0) + return i; + } + + /* Not defined -- define a new variable. */ + return dict_define_variable (dict, name); +} + +double *dict_variable (symbol_dict_t *dict, const char *var_name) { + int id = dict_lookup (dict, var_name); + + /* global variables are presented as negative offset. negating + * a negative number results in a positive offset. --nenolod + */ + if (id < 0) + return &global_dict.variables[-id].value; + + return &dict->variables[id].value; +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/dict.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/dict.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,46 @@ +/* dict.h -- symbol dictionary structures + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef Included_DICT_H +#define Included_DICT_H + +/* A variable. */ +typedef struct { + char *name; + double value; +} var_t; + +/* A symbol dictionary. */ +typedef struct { + /* Variables. */ + var_t *variables; + int v_count; + int v_space; +} symbol_dict_t; + +/* Prototypes. */ +symbol_dict_t *dict_new (void); +void dict_free (symbol_dict_t *dict); + +int dict_lookup (symbol_dict_t *calc, const char *name); +double* dict_variable (symbol_dict_t *calc, const char *var_name); + +#endif /* Included_DICT_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/execute.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/execute.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,121 @@ +/* execute.c -- execute precompiled expression expr + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include + +#include "execute.h" +#include "function.h" + +/* Execution stack. */ + +gboolean check_stack (ex_stack *stack, int depth) { + if (stack->sp < depth) { + g_warning ("Stack error"); + return FALSE; + } + + return TRUE; +} + +void push (ex_stack *stack, double value) { + g_assert (stack); + + if (stack->sp < STACK_DEPTH) { + stack->value[stack->sp++] = value; + } else { + g_warning ("Stack overflow"); + } +} + +double pop (ex_stack *stack) { + g_assert (stack); + + if (stack->sp > 0) { + return stack->value[--stack->sp]; + } else { + g_warning ("Stack error (stack empty)"); + return 0.0; + } +} + +/* */ + +void expr_execute (expression_t *expr, symbol_dict_t *dict) { + char op, *str = expr->data->str; + ex_stack stack = { 0, { 0.0 }}; + + while ((op = *str++)) { + switch (op) { + case 'l': /* Load a variable. */ + push (&stack, dict->variables[load_int (str)].value); + str += sizeof (int); + break; + + case 's': /* Store to a variable. */ + dict->variables[load_int (str)].value = pop (&stack); + str += sizeof (int); + break; + + case 'f': /* Call a function. */ + function_call (load_int (str), &stack); + str += sizeof (int); + break; + + case 'c': /* Load a constant. */ + push (&stack, load_double (str)); + str += sizeof (double); + break; + + case 'n': /* Do a negation. */ + push (&stack, -pop (&stack)); + break; + + case '+': /* Do an addition. */ + push (&stack, pop (&stack) + pop (&stack)); + break; + case '-': /* Do a subtraction. */ + push (&stack, pop (&stack) - pop (&stack)); + break; + case '*': /* Do a multiplication. */ + push (&stack, pop (&stack) * pop (&stack)); + break; + case '/': /* Do a division. */ + if (check_stack (&stack, 2)) { + double y = stack.value[stack.sp - 2] / stack.value[stack.sp - 1]; + stack.sp -= 2; + push (&stack, y); + } + break; + case '^': /* Do an exponentiation. */ + if (check_stack (&stack, 2)) { + double y = pow (stack.value[stack.sp - 2], stack.value[stack.sp - 1]); + stack.sp -= 2; + push (&stack, y); + } + break; + + default: + g_warning ("Invalid opcode: %c", op); + return; + } + } +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/execute.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/execute.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,46 @@ +/* execute.h -- execute precompiled expression code + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef Included_EXECUTE_H +#define Included_EXECUTE_H + +#include + +#include "dict.h" +#include "storage.h" + +/* Execution stack. */ + +typedef struct { +#define STACK_DEPTH 64 + int sp; /* stack pointer */ + double value[STACK_DEPTH]; +} ex_stack; + +/* Prototypes. */ + +gboolean check_stack (ex_stack *stack, int depth); +void push (ex_stack *stack, double value); +double pop (ex_stack *stack); + +void expr_execute (expression_t *expr, symbol_dict_t *dict); + +#endif /* Included_EXECUTE_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/function.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/function.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,111 @@ +/* function.c -- + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +#include "function.h" + +/* Function pointer type. */ +typedef struct { + char *name; + double (*funcptr)(ex_stack *stack); +} func_t; + +/* */ + +static double f_log (ex_stack *stack) { + return log (pop (stack)); +} + +static double f_sin (ex_stack *stack) { + return sin (pop (stack)); +} + +static double f_cos (ex_stack *stack) { + return cos (pop (stack)); +} + +static double f_tan (ex_stack *stack) { + return tan (pop (stack)); +} + +static double f_asin (ex_stack *stack) { + return asin (pop (stack)); +} + +static double f_acos (ex_stack *stack) { + return acos (pop (stack)); +} + +static double f_atan (ex_stack *stack) { + return atan (pop (stack)); +} + +static double f_if (ex_stack *stack) { + double a = pop (stack); + double b = pop (stack); + return (pop (stack) != 0.0) ? a : b; +} + +static double f_div (ex_stack *stack) { + int y = (int)pop (stack); + int x = (int)pop (stack); + return (y == 0) ? 0 : (x / y); +} + +static double f_rand (ex_stack *stack) { + return g_random_double_range((double) pop(stack), (double) pop(stack)); +} + +/* */ + +static const func_t init[] = { + { "sin", f_sin }, + { "cos", f_cos }, + { "tan", f_tan }, + { "asin", f_asin }, + { "acos", f_acos }, + { "atan", f_atan }, + { "log", f_log }, + { "if", f_if }, + { "div", f_div }, + { "rand", f_rand } +}; + +int function_lookup (const char *name) { + int i; + + for (i = 0; i < sizeof (init) / sizeof (init[0]); i++) + if (strcmp (init[i].name, name) == 0) + return i; + + g_warning ("Unknown function: %s\n", name); + return -1; +} + +void function_call (int func_id, ex_stack *stack) { + g_assert (func_id >= 0); + g_assert (func_id < sizeof (init) / sizeof (init[0])); + + push (stack, (*init[func_id].funcptr)(stack)); +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/function.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/function.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,32 @@ +/* function.h -- + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef Included_FUNCTION +#define Included_FUNCTION + +#include "execute.h" + +/* Prototypes. */ + +int function_lookup (const char *name); +void function_call (int func_id, ex_stack *stack); + +#endif /* Included_FUNCTION */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/parser.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/parser.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,1521 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + 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, or (at your option) + any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + NAME = 258, + NUMBER = 259, + NEG = 260 + }; +#endif +#define NAME 258 +#define NUMBER 259 +#define NEG 260 + + + + +/* Copy the first part of user declarations. */ +#line 26 "parser.y" + +#include +#include +#include +#include +#include +#include + +#include "dict.h" +#include "execute.h" +#include "function.h" +#include "parser.h" +#include "storage.h" + +#define YYPARSE_PARAM yyparam +#define YYLEX_PARAM yyparam + +static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, + char *str); + +#define GENERATE(str) if (!expr_add_compile (((parser_control *)yyparam)->expr, \ + ((parser_control *)yyparam)->dict, str)) \ + YYABORT; + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 54 "parser.y" +typedef union YYSTYPE { +char *s_value; +char c_value; +double d_value; +int i_value; +} YYSTYPE; +/* Line 191 of yacc.c. */ +#line 118 "parser.c" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 214 of yacc.c. */ +#line 130 "parser.c" + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short int yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 65 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 18 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 5 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 22 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 37 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 260 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 14, 15, 8, 7, 13, 6, 2, 9, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, + 17, 5, 16, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 10 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned char yyprhs[] = +{ + 0, 0, 3, 4, 7, 8, 10, 13, 16, 18, + 22, 24, 26, 30, 35, 39, 43, 47, 51, 55, + 59, 62, 66 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 19, 0, -1, -1, 19, 20, -1, -1, 22, -1, + 20, 12, -1, 1, 12, -1, 22, -1, 21, 13, + 22, -1, 4, -1, 3, -1, 3, 5, 22, -1, + 3, 14, 21, 15, -1, 22, 16, 22, -1, 22, + 17, 22, -1, 22, 7, 22, -1, 22, 6, 22, + -1, 22, 8, 22, -1, 22, 9, 22, -1, 6, + 22, -1, 22, 11, 22, -1, 14, 22, 15, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned char yyrline[] = +{ + 0, 76, 76, 77, 81, 82, 84, 85, 90, 93, + 98, 104, 110, 116, 123, 125, 128, 130, 132, 134, + 136, 138, 140 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "NAME", "NUMBER", "'='", "'-'", "'+'", + "'*'", "'/'", "NEG", "'^'", "';'", "','", "'('", "')'", "'>'", "'<'", + "$accept", "input", "expression_list", "argument_list", "expression", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short int yytoknum[] = +{ + 0, 256, 257, 258, 259, 61, 45, 43, 42, 47, + 260, 94, 59, 44, 40, 41, 62, 60 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 18, 19, 19, 20, 20, 20, 20, 21, 21, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 0, 2, 0, 1, 2, 2, 1, 3, + 1, 1, 3, 4, 3, 3, 3, 3, 3, 3, + 2, 3, 3 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 2, 0, 1, 0, 11, 10, 0, 0, 3, 5, + 7, 0, 0, 20, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 12, 0, 8, 22, 17, 16, 18, + 19, 21, 14, 15, 0, 13, 9 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yysigned_char yydefgoto[] = +{ + -1, 1, 8, 24, 9 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -10 +static const yysigned_char yypact[] = +{ + -10, 17, -10, -8, 22, -10, 47, 47, -3, 38, + -10, 47, 47, -9, 26, -10, 47, 47, 47, 47, + 47, 47, 47, 38, 9, 38, -10, 48, 48, -9, + -9, -9, 38, 38, 47, -10, 38 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yysigned_char yypgoto[] = +{ + -10, -10, -10, -10, -6 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -5 +static const yysigned_char yytable[] = +{ + 13, 14, 20, 0, 10, 23, 25, 21, 22, 15, + 27, 28, 29, 30, 31, 32, 33, 2, 3, 0, + 4, 5, 34, 6, 35, 0, 0, 11, 36, -4, + 0, 7, 16, 17, 18, 19, 12, 20, 0, 0, + 0, 26, 21, 22, 16, 17, 18, 19, 0, 20, + 4, 5, 0, 6, 21, 22, 18, 19, 0, 20, + 0, 7, 0, 0, 21, 22 +}; + +static const yysigned_char yycheck[] = +{ + 6, 7, 11, -1, 12, 11, 12, 16, 17, 12, + 16, 17, 18, 19, 20, 21, 22, 0, 1, -1, + 3, 4, 13, 6, 15, -1, -1, 5, 34, 12, + -1, 14, 6, 7, 8, 9, 14, 11, -1, -1, + -1, 15, 16, 17, 6, 7, 8, 9, -1, 11, + 3, 4, -1, 6, 16, 17, 8, 9, -1, 11, + -1, 14, -1, -1, 16, 17 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 19, 0, 1, 3, 4, 6, 14, 20, 22, + 12, 5, 14, 22, 22, 12, 6, 7, 8, 9, + 11, 16, 17, 22, 21, 22, 15, 22, 22, 22, + 22, 22, 22, 22, 13, 15, 22 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up");\ + YYERROR; \ + } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) +#endif + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) + +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + } + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yytype, yyvaluep) + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM); +# else +int yyparse (); +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + /* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + register short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short int *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyoverflowlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 5: +#line 83 "parser.y" + { ;} + break; + + case 7: +#line 86 "parser.y" + { yyerrok; ;} + break; + + case 8: +#line 91 "parser.y" + { + ;} + break; + + case 9: +#line 94 "parser.y" + { + ;} + break; + + case 10: +#line 99 "parser.y" + { + char *buf = g_strdup_printf ("c%f:", yyvsp[0].d_value); + GENERATE (buf); + g_free (buf); + ;} + break; + + case 11: +#line 105 "parser.y" + { + char *buf = g_strdup_printf ("l%s:", yyvsp[0].s_value); + GENERATE (buf); + g_free (buf); + ;} + break; + + case 12: +#line 111 "parser.y" + { + char *buf = g_strdup_printf ("s%s:", yyvsp[-2].s_value); + GENERATE (buf); + g_free (buf); + ;} + break; + + case 13: +#line 117 "parser.y" + { + char *buf = g_strdup_printf ("f%s:", yyvsp[-3].s_value); + GENERATE (buf); + g_free (buf); + ;} + break; + + case 14: +#line 124 "parser.y" + { GENERATE (">"); ;} + break; + + case 15: +#line 126 "parser.y" + { GENERATE ("<"); ;} + break; + + case 16: +#line 129 "parser.y" + { GENERATE ("+"); ;} + break; + + case 17: +#line 131 "parser.y" + { GENERATE ("-"); ;} + break; + + case 18: +#line 133 "parser.y" + { GENERATE ("*"); ;} + break; + + case 19: +#line 135 "parser.y" + { GENERATE ("/"); ;} + break; + + case 20: +#line 137 "parser.y" + { GENERATE ("n"); ;} + break; + + case 21: +#line 139 "parser.y" + { GENERATE ("^"); ;} + break; + + case 22: +#line 141 "parser.y" + { ;} + break; + + + } + +/* Line 1010 of yacc.c. */ +#line 1140 "parser.c" + + yyvsp -= yylen; + yyssp -= yylen; + + + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + const char* yyprefix; + char *yymsg; + int yyx; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } + } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) + { + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("syntax error"); + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ + if (yychar == YYEOF) + for (;;) + { + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + } + } + else + { + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); + yydestruct (yytoken, &yylval); + yychar = YYEMPTY; + + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) + goto yyerrorlab; +#endif + + yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + YYDPRINTF ((stderr, "Shifting error token, ")); + + *++yyvsp = yylval; + + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + +#line 144 "parser.y" + +/* End of grammar */ + +/* Called by yyparse on error. */ +int yyerror (char *s) { + /* Ignore errors, just print a warning. */ + g_warning ("%s\n", s); + return 0; +} + +int yylex (YYSTYPE *yylval, void *yyparam) { + int c; + parser_control *pc = (parser_control *) yyparam; + + /* Ignore whitespace, get first nonwhite character. */ + while ((c = aud_vfs_getc (pc->input)) == ' ' || c == '\t' || c == '\n'); + + /* End of input ? */ + if (c == EOF) + return 0; + + /* Char starts a number => parse the number. */ + if (isdigit (c)) { + aud_vfs_fseek (pc->input, -1, SEEK_CUR); /* Put the char back. */ + { + char *old_locale, *saved_locale; + + old_locale = setlocale (LC_ALL, NULL); + saved_locale = g_strdup (old_locale); + setlocale (LC_ALL, "C"); + sscanf (((VFSBuffer *)(pc->input->handle))->iter, "%lf", &yylval->d_value); + + while (isdigit(c) || c == '.') + { + c = aud_vfs_getc(pc->input); + } + + aud_vfs_fseek(pc->input, -1, SEEK_CUR); + + setlocale (LC_ALL, saved_locale); + g_free (saved_locale); + } + return NUMBER; + } + + /* Char starts an identifier => read the name. */ + if (isalpha (c)) { + GString *sym_name; + + sym_name = g_string_new (NULL); + + do { + sym_name = g_string_append_c (sym_name, c); + + /* Get another character. */ + c = aud_vfs_getc (pc->input); + } while (c != EOF && isalnum (c)); + + aud_vfs_fseek (pc->input, -1, SEEK_CUR); + + yylval->s_value = sym_name->str; + + g_string_free (sym_name, FALSE); + + return NAME; + } + + /* Any other character is a token by itself. */ + return c; +} + +static int load_name (char *str, char **name) { + int count = 0; + GString *new = g_string_new (NULL); + + while (*str != 0 && *str != ':') { + g_string_append_c (new, *str++); + count++; + } + + *name = new->str; + g_string_free (new, FALSE); + + return count; +} + +static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, + char *str) { + char op; + double dval; + int i; + char *name; + + while ((op = *str++)) { + switch (op) { + case 'c': /* A constant. */ + store_byte (expr, 'c'); + sscanf (str, "%lf%n", &dval, &i); + str += i; + store_double (expr, dval); + str++; /* Skip ';' */ + break; + + case 'f': /* A function call. */ + store_byte (expr, 'f'); + str += load_name (str, &name); + i = function_lookup (name); + if (i < 0) return FALSE; /* Fail on error. */ + store_int (expr, i); + g_free (name); + str++; /* Skip ';' */ + break; + + case 'l': /* Load a variable. */ + case 's': /* Store a variable. */ + store_byte (expr, op); + str += load_name (str, &name); + i = dict_lookup (dict, name); + store_int (expr, i); + g_free (name); + str++; /* Skip ';' */ + break; + + default: /* Copy verbatim. */ + store_byte (expr, op); + break; + } + } + + return TRUE; +} + +expression_t *expr_compile_string (const char* str, symbol_dict_t *dict) +{ + parser_control pc; + VFSFile *stream; + + g_return_val_if_fail(str != NULL && dict != NULL, NULL); + + stream = aud_vfs_buffer_new_from_string ( (char *) str ); + + pc.input = stream; + pc.expr = expr_new (); + pc.dict = dict; + + if (yyparse (&pc) != 0) { + /* Check for error. */ + expr_free (pc.expr); + pc.expr = NULL; + } + + aud_vfs_fclose (stream); + + return pc.expr; +} + + diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/parser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/parser.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,42 @@ +/* parser.h -- header file for libexp + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef Included_PARSER_H +#define Included_PARSER_H + +#include +#include +#include +#include + +#include "execute.h" + +/* Structure passed do yyparse. */ +typedef struct { + VFSFile *input; + expression_t *expr; + symbol_dict_t *dict; +} parser_control; + +/* Prototypes. */ +expression_t *expr_compile_string (const char *str, symbol_dict_t *dict); + +#endif /* Included_PARSER_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/parser.yacc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/parser.yacc Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,298 @@ +/* parser.y -- Bison parser for libexp + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* suppress conflict warnings */ +%expect 37 + +/* C declarations. */ +%{ +#include +#include +#include +#include +#include +#include + +#include "dict.h" +#include "execute.h" +#include "function.h" +#include "parser.h" +#include "storage.h" + +#define YYPARSE_PARAM yyparam +#define YYLEX_PARAM yyparam + +static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, + char *str); + +#define GENERATE(str) if (!expr_add_compile (((parser_control *)yyparam)->expr, \ + ((parser_control *)yyparam)->dict, str)) \ + YYABORT; +%} + +%pure_parser + +/* Data types. */ +%union { +char *s_value; +char c_value; +double d_value; +int i_value; +} + +/* Terminal symbols. */ +%token NAME +%token NUMBER + +/* Precedence rules. */ +%right '=' +%left '-' '+' +%left '*' '/' +%left NEG +%right '^' + +/* Grammar follows */ +%% + +/* Input consits of a (possibly empty) list of expressions. */ +input: /* empty */ + | input expression_list +; + +/* expression_list is a ';' separated list of expressions. */ +expression_list: /* empty */ + | expression + { } + | expression_list ';' + | error ';' + { yyerrok; } + +/* argument list is a comma separated list od expressions */ +argument_list: + expression + { + } + | argument_list ',' expression + { + } + +/* expression is a C-like expression. */ +expression: NUMBER + { + char *buf = g_strdup_printf ("c%f:", $1); + GENERATE (buf); + g_free (buf); + } + | NAME + { + char *buf = g_strdup_printf ("l%s:", $1); + GENERATE (buf); + g_free (buf); + } + | NAME '=' expression + { + char *buf = g_strdup_printf ("s%s:", $1); + GENERATE (buf); + g_free (buf); + } + | NAME '(' argument_list ')' + { + char *buf = g_strdup_printf ("f%s:", $1); + GENERATE (buf); + g_free (buf); + } + + | expression '>' expression + { GENERATE (">"); } + | expression '<' expression + { GENERATE ("<"); } + + | expression '+' expression + { GENERATE ("+"); } + | expression '-' expression + { GENERATE ("-"); } + | expression '*' expression + { GENERATE ("*"); } + | expression '/' expression + { GENERATE ("/"); } + | '-' expression %prec NEG + { GENERATE ("n"); } + | expression '^' expression + { GENERATE ("^"); } + | '(' expression ')' + { } +; + +%% +/* End of grammar */ + +/* Called by yyparse on error. */ +int yyerror (char *s) { + /* Ignore errors, just print a warning. */ + g_warning ("%s\n", s); + return 0; +} + +int yylex (YYSTYPE *yylval, void *yyparam) { + int c; + parser_control *pc = (parser_control *) yyparam; + + /* Ignore whitespace, get first nonwhite character. */ + while ((c = vfs_getc (pc->input)) == ' ' || c == '\t' || c == '\n'); + + /* End of input ? */ + if (c == EOF) + return 0; + + /* Char starts a number => parse the number. */ + if (isdigit (c)) { + vfs_fseek (pc->input, -1, SEEK_CUR); /* Put the char back. */ + { + char *old_locale, *saved_locale; + + old_locale = setlocale (LC_ALL, NULL); + saved_locale = g_strdup (old_locale); + setlocale (LC_ALL, "C"); + sscanf (((VFSBuffer *)(pc->input->handle))->iter, "%lf", &yylval->d_value); + + while (isdigit(c) || c == '.') + { + c = vfs_getc(pc->input); + } + + vfs_fseek(pc->input, -1, SEEK_CUR); + + setlocale (LC_ALL, saved_locale); + g_free (saved_locale); + } + return NUMBER; + } + + /* Char starts an identifier => read the name. */ + if (isalpha (c)) { + GString *sym_name; + + sym_name = g_string_new (NULL); + + do { + sym_name = g_string_append_c (sym_name, c); + + /* Get another character. */ + c = vfs_getc (pc->input); + } while (c != EOF && isalnum (c)); + + vfs_fseek (pc->input, -1, SEEK_CUR); + + yylval->s_value = sym_name->str; + + g_string_free (sym_name, FALSE); + + return NAME; + } + + /* Any other character is a token by itself. */ + return c; +} + +static int load_name (char *str, char **name) { + int count = 0; + GString *new = g_string_new (NULL); + + while (*str != 0 && *str != ':') { + g_string_append_c (new, *str++); + count++; + } + + *name = new->str; + g_string_free (new, FALSE); + + return count; +} + +static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, + char *str) { + char op; + double dval; + int i; + char *name; + + while ((op = *str++)) { + switch (op) { + case 'c': /* A constant. */ + store_byte (expr, 'c'); + sscanf (str, "%lf%n", &dval, &i); + str += i; + store_double (expr, dval); + str++; /* Skip ';' */ + break; + + case 'f': /* A function call. */ + store_byte (expr, 'f'); + str += load_name (str, &name); + i = function_lookup (name); + if (i < 0) return FALSE; /* Fail on error. */ + store_int (expr, i); + g_free (name); + str++; /* Skip ';' */ + break; + + case 'l': /* Load a variable. */ + case 's': /* Store a variable. */ + store_byte (expr, op); + str += load_name (str, &name); + i = dict_lookup (dict, name); + store_int (expr, i); + g_free (name); + str++; /* Skip ';' */ + break; + + default: /* Copy verbatim. */ + store_byte (expr, op); + break; + } + } + + return TRUE; +} + +expression_t *expr_compile_string (const char* str, symbol_dict_t *dict) +{ + parser_control pc; + VFSFile *stream; + + g_return_val_if_fail(str != NULL && dict != NULL, NULL); + + stream = vfs_buffer_new_from_string ( (char *) str ); + + pc.input = stream; + pc.expr = expr_new (); + pc.dict = dict; + + if (yyparse (&pc) != 0) { + /* Check for error. */ + expr_free (pc.expr); + pc.expr = NULL; + } + + vfs_fclose (stream); + + return pc.expr; +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/storage.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/storage.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,79 @@ +/* storage.c -- + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include + +#include "storage.h" + +/* Code block. */ + +expression_t *expr_new (void) { + expression_t *new_expr; + + new_expr = (expression_t *)g_malloc (sizeof(expression_t)); + new_expr->data = g_string_new (NULL); + return new_expr; +} + +void expr_free (expression_t *expr) { + if (!expr) + return; + + g_string_free (expr->data, TRUE); + g_free (expr); +} + +static void load_data (char *str, void *dest, size_t size) { + char *ch = (char *)dest; + while (size--) + *ch++ = *str++; +} + +int load_int (char *str) { + int val; + load_data (str, &val, sizeof(val)); + return val; +} + +double load_double (char *str) { + double val; + load_data (str, &val, sizeof(val)); + return val; +} + +static void store_data (expression_t *expr, void *src, size_t size) { + char *ch = (char *)src; + while (size--) + store_byte (expr, *ch++); +} + +void store_byte (expression_t *expr, char byte) { + g_string_append_c (expr->data, byte); +} + +void store_int (expression_t *expr, int val) { + store_data (expr, &val, sizeof(val)); +} + +void store_double (expression_t *expr, double val) { + store_data (expr, &val, sizeof(val)); +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/libcalc/storage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/libcalc/storage.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,42 @@ +/* storage.h -- + * + * Copyright (C) 2001 Janusz Gregorczyk + * + * This file is part of xvs. + * + * 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 program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef Included_STORAGE_H +#define Included_STORAGE_H + +#include + +typedef struct { + GString *data; +} expression_t; + +/* Expr block. */ +expression_t *expr_new (void); +void expr_free (expression_t *expr); + +int load_int (char *str); +double load_double (char *str); + +void store_byte (expression_t *expr, char byte); +void store_int (expression_t *expr, int val); +void store_double (expression_t *expr, double val); + +#endif /* Included_STORAGE_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/misc.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/misc.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,145 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include +#include + +#include + +#include "paranormal.h" +#include "actuators.h" +#include "pn_utils.h" + +/* ******************** misc_floater ******************** */ +static struct pn_actuator_option_desc misc_floater_opts[] = +{ + { "value", "The colour value for the floater.", + OPT_TYPE_INT, { ival: 255 } }, + { NULL } +}; + +typedef enum +{ + float_up = 0x1, + float_down = 0x2, + float_left = 0x4, + float_right = 0x8, +} FloaterDirection; + +struct floater_state_data +{ + FloaterDirection dir; + gint x; + gint y; +}; + +static void +misc_floater_init(gpointer *data) +{ + struct floater_state_data *opaque_data = g_new0(struct floater_state_data, 1); + *data = opaque_data; + opaque_data->x = rand() % pn_image_data->width; + opaque_data->y = rand() % pn_image_data->height; + opaque_data->dir = (FloaterDirection) rand() % 15; /* sum of all dir values */ +} + +static void +misc_floater_cleanup(gpointer data) +{ + g_free(data); +} + +/* + * This implementation isn't very great. + * Anyone want to improve it? :( + */ +static void +misc_floater_exec(const struct pn_actuator_option *opts, gpointer data) +{ + struct floater_state_data *opaque_data = (struct floater_state_data *) data; + guchar value = (opts[0].val.ival < 0 || opts[0].val.ival > 255) ? 255 : opts[0].val.ival; + + /* determine the root coordinate first */ + if (opaque_data->dir & float_up) + opaque_data->y -= 1; + if (opaque_data->dir & float_down) + opaque_data->y += 1; + + if (opaque_data->dir & float_left) + opaque_data->x -= 1; + if (opaque_data->dir & float_right) + opaque_data->x += 1; + + /* make sure we're within surface boundaries. segfaults suck, afterall. */ + if (opaque_data->x + 1 <= pn_image_data->width && + opaque_data->x - 1 >= 0 && + opaque_data->y + 1 <= pn_image_data->height && + opaque_data->y - 1 >= 0) + { + /* draw it. i could use a loop here, but i don't see much reason in it, + * so i don't think i will at this time. -nenolod + */ + pn_image_data->surface[0][PN_IMG_INDEX(opaque_data->x, opaque_data->y)] = value; + pn_image_data->surface[0][PN_IMG_INDEX(opaque_data->x + 1, opaque_data->y)] = value; + pn_image_data->surface[0][PN_IMG_INDEX(opaque_data->x - 1, opaque_data->y)] = value; + pn_image_data->surface[0][PN_IMG_INDEX(opaque_data->x, opaque_data->y + 1)] = value; + pn_image_data->surface[0][PN_IMG_INDEX(opaque_data->x, opaque_data->y - 1)] = value; + } + + /* check if we need to change direction yet, and if so, do so. */ + if (pn_new_beat == TRUE) + opaque_data->dir = (FloaterDirection) rand() % 15; /* sum of all dir values */ + + /* now adjust the direction so we stay in boundary */ + if (opaque_data->x - 1 <= 0 && opaque_data->dir & float_left) + { + opaque_data->dir &= ~float_left; + opaque_data->dir |= float_right; + } + + if (opaque_data->x + 1 >= pn_image_data->width && opaque_data->dir & float_right) + { + opaque_data->dir &= ~float_right; + opaque_data->dir |= float_left; + } + + if (opaque_data->y - 1 <= 0 && opaque_data->dir & float_up) + { + opaque_data->dir &= ~float_up; + opaque_data->dir |= float_down; + } + + if (opaque_data->y + 1 >= pn_image_data->height && opaque_data->dir & float_down) + { + opaque_data->dir &= ~float_down; + opaque_data->dir |= float_up; + } +} + +struct pn_actuator_desc builtin_misc_floater = +{ + "misc_floater", + "Floating Particle", + "A floating particle.", + 0, misc_floater_opts, + misc_floater_init, misc_floater_cleanup, misc_floater_exec +}; + diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/paranormal.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/paranormal.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,223 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include +#include +#include +#include + +#include + +#include +#include + +#include "paranormal.h" +#include "actuators.h" + +/* SDL stuffs */ +SDL_Surface *screen; + +/* Globals */ +struct pn_rc *pn_rc; +struct pn_image_data *pn_image_data; +struct pn_sound_data *pn_sound_data; + +/* Trig Pre-Computes */ +float sin_val[360]; +float cos_val[360]; + +gboolean pn_new_beat; + +/* **************** drawing doodads **************** */ + +static void +blit_to_screen (void) +{ +} + +static void +resize_video (guint w, guint h) +{ + pn_image_data->width = w; + pn_image_data->height = h; + + SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 ); + SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); + SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 ); + SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 ); + SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); + + screen = SDL_SetVideoMode (w, h, 8, SDL_OPENGL | SDL_RESIZABLE); + if (! screen) + pn_fatal_error ("Unable to create a new SDL window: %s", + SDL_GetError ()); + + glViewport(0, 0, w, h); + glClearColor(0.0f, 0.0f, 0.0f, 0.5f); + glClearDepth(1.0f); + + glEnable(GL_BLEND); + glDisable(GL_DEPTH_TEST); +} + +static void +take_screenshot (void) +{ + char fname[32]; + struct stat buf; + int i=0; + + do + sprintf (fname, "pn_%05d.bmp", ++i); + while (stat (fname, &buf) == 0); + + SDL_SaveBMP (screen, fname); +} + +/* FIXME: This should resize the video to a user-set + fullscreen res */ +static void +toggle_fullscreen (void) +{ + SDL_WM_ToggleFullScreen (screen); + if (SDL_ShowCursor (SDL_QUERY) == SDL_ENABLE) + SDL_ShowCursor (SDL_DISABLE); + else + SDL_ShowCursor (SDL_ENABLE); +} + +/* **************** basic renderer management **************** */ +void +pn_init (void) +{ + int i; +#ifdef FULLSCREEN_HACK + char SDL_windowhack[32]; + GdkScreen *screen; +#endif + + pn_sound_data = g_new0 (struct pn_sound_data, 1); + pn_image_data = g_new0 (struct pn_image_data, 1); + +#ifdef FULLSCREEN_HACK + screen = gdk_screen_get_default(); + sprintf(SDL_windowhack,"SDL_WINDOWID=%d", + GDK_WINDOW_XWINDOW(gdk_screen_get_root_window(screen))); + putenv(SDL_windowhack); +#endif + + if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE) < 0) + pn_fatal_error ("Unable to initialize SDL: %s", SDL_GetError ()); + +#ifndef FULLSCREEN_HACK + resize_video (640, 360); +#else + resize_video (1280, 1024); +#endif + + SDL_WM_SetCaption ("Paranormal Visualization Studio", PACKAGE); + + for(i=0; i<360; i++) + { + sin_val[i] = sin(i*(M_PI/180.0)); + cos_val[i] = cos(i*(M_PI/180.0)); + } +} + +void +pn_cleanup (void) +{ + SDL_FreeSurface (screen); + SDL_Quit (); + + + if (pn_image_data) + { + if (pn_image_data->surface[0]) + g_free (pn_image_data->surface[0]); + if (pn_image_data->surface[1]) + g_free (pn_image_data->surface[1]); + g_free (pn_image_data); + } + if (pn_sound_data) + g_free (pn_sound_data); +} + +/* Renders one frame and handles the SDL window */ +void +pn_render (void) +{ + SDL_Event event; + + /* Handle window events */ + while (SDL_PollEvent (&event)) + { + switch (event.type) + { + case SDL_QUIT: + pn_quit (); + g_assert_not_reached (); + case SDL_KEYDOWN: + switch (event.key.keysym.sym) + { + case SDLK_ESCAPE: + pn_quit (); + g_assert_not_reached (); + case SDLK_RETURN: + if (event.key.keysym.mod & (KMOD_ALT | KMOD_META)) + toggle_fullscreen (); + break; + case SDLK_BACKQUOTE: + take_screenshot (); + break; + default: + break; + } + break; + case SDL_VIDEORESIZE: + resize_video (event.resize.w, event.resize.h); + break; + } + } + + pn_new_beat = pn_is_new_beat(); + + if (pn_rc->actuator) + { + // set the viewport to a texture size + glViewport(0, 0, 128, 128); + + // run actuators + exec_actuator (pn_rc->actuator); + + // reset the viewport to window size and draw + glViewport(0, 0, pn_image_data->width, pn_image_data->height); + SDL_GL_SwapBuffers(); + } +} + +/* this MUST be called if a builtin's output is to surface[1] + (by the builtin, after it is done) */ +void +pn_swap_surfaces (void) +{ + SDL_GL_SwapBuffers(); +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/paranormal.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/paranormal.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,79 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PARANORMAL_H +#define _PARANORMAL_H + +#include +#include +#include + +#include "actuators.h" + +struct pn_sound_data +{ + gint16 pcm_data[2][512]; + gint16 freq_data[2][256]; +}; + +struct pn_image_data +{ + int width, height; + struct pn_color cmap[256]; + guchar *surface[2]; +}; + +/* The executable (ie xmms.c or standalone.c) + is responsible for allocating this and filling + it with default/saved values */ +struct pn_rc +{ + struct pn_actuator *actuator; +}; + +/* core funcs */ +void pn_init (void); +void pn_cleanup (void); +void pn_render (void); +void pn_swap_surfaces (void); + +/* Implemented elsewhere (ie xmms.c or standalone.c) */ +void pn_set_rc (); +void pn_fatal_error (const char *fmt, ...); +void pn_error (const char *fmt, ...); +void pn_quit (void); + +/* Implimented in cfg.c */ +void pn_configure (void); + +/* globals used for rendering */ +extern struct pn_rc *pn_rc; +extern struct pn_sound_data *pn_sound_data; +extern struct pn_image_data *pn_image_data; + +extern gboolean pn_new_beat; + +/* global trig pre-computes */ +extern float sin_val[360]; +extern float cos_val[360]; + +/* beat detection */ +int pn_is_new_beat(void); + +#endif /* _PARANORMAL_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/plugin.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/plugin.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,469 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* FIXME: issues with not uniniting variables between + enables? I wasn't too careful about that, but it + seems to work fine. If there are problems perhaps + look for a bug there? +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "paranormal.h" +#include "actuators.h" +#include "presets.h" +#include "containers.h" + +/* Error reporting dlg */ +static GtkWidget *err_dialog; + +/* Draw thread stuff */ +/* FIXME: Do I need mutex for pn_done? */ +static SDL_Thread *draw_thread = NULL; +static SDL_mutex *sound_data_mutex; +static SDL_mutex *config_mutex; + +static gboolean pn_done = FALSE; +jmp_buf quit_jmp; +gboolean timeout_set = FALSE; +guint quit_timeout; + +/* Sound stuffs */ +static gboolean new_pcm_data = FALSE; +static gboolean new_freq_data = FALSE; +static gint16 tmp_pcm_data[2][512]; +static gint16 tmp_freq_data[2][256]; + +/* XMMS interface */ +static void pn_xmms_init (void); +static void pn_xmms_cleanup (void); +static void pn_xmms_about (void); +static void pn_xmms_configure (void); +static void pn_xmms_render_pcm (gint16 data[2][512]); +static void pn_xmms_render_freq (gint16 data[2][256]); + +static VisPlugin pn_vp = +{ + .description = "Paranormal Visualization Studio", + .num_pcm_chs_wanted = 2, + .num_freq_chs_wanted = 2, + .init = pn_xmms_init, + .cleanup = pn_xmms_cleanup, + .about = pn_xmms_about, + .configure = pn_xmms_configure, + .render_pcm = pn_xmms_render_pcm, + .render_freq = pn_xmms_render_freq +}; + +VisPlugin *pn_vplist[] = { &pn_vp, NULL }; + +DECLARE_PLUGIN(paranormal, NULL, NULL, NULL, NULL, NULL, NULL, pn_vplist,NULL); + +static void +load_pn_rc (void) +{ + struct pn_actuator *a, *b; + + if (! pn_rc) + pn_rc = g_new0 (struct pn_rc, 1); + + /* load a default preset */ + pn_rc->actuator = create_actuator ("container_simple"); + if (! pn_rc->actuator) goto ugh; + + a = create_actuator ("general_clear"); + if (! a) goto ugh; + container_add_actuator (pn_rc->actuator, a); + + a = create_actuator ("wave_horizontal"); + if (! a) goto ugh; + container_add_actuator (pn_rc->actuator, a); + + return; + + ugh: + if (pn_rc->actuator) + destroy_actuator (pn_rc->actuator); + pn_error ("Error loading default preset"); +} + +static int +draw_thread_fn (gpointer data) +{ + gfloat fps = 0.0; + guint last_time = 0, last_second = 0; + guint this_time; + pn_init (); + + /* Used when pn_quit is called from this thread */ + if (setjmp (quit_jmp) != 0) + pn_done = TRUE; + + while (! pn_done) + { + SDL_mutexP (sound_data_mutex); + if (new_freq_data) + { + memcpy (pn_sound_data->freq_data, tmp_freq_data, + sizeof (gint16) * 2 * 256); + new_freq_data = FALSE; + } + if (new_pcm_data) + { + memcpy (pn_sound_data->pcm_data, tmp_pcm_data, + sizeof (gint16) * 2 * 512); + new_freq_data = FALSE; + } + SDL_mutexV (sound_data_mutex); + SDL_mutexP (config_mutex); + pn_render (); + SDL_mutexV (config_mutex); + + /* Compute the FPS */ + this_time = SDL_GetTicks (); + + fps = fps * .95 + (1000. / (gfloat) (this_time - last_time)) * .05; + if (this_time > 2000 + last_second) + { + last_second = this_time; + g_print ("FPS: %f\n", fps); + } + last_time = this_time; + +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif + } + + /* Just in case a pn_quit () was called in the loop */ +/* SDL_mutexV (sound_data_mutex); */ + + pn_cleanup (); + + return 0; +} + +/* Is there a better way to do this? this = messy + It appears that calling disable_plugin () in some + thread other than the one that called pn_xmms_init () + causes a seg fault :( */ +static int +quit_timeout_fn (gpointer data) +{ + if (pn_done) + { + pn_vp.disable_plugin (&pn_vp); + return FALSE; + } + + return TRUE; +} + +static void +pn_xmms_init (void) +{ + /* If it isn't already loaded, load the run control */ + if (! pn_rc) + load_pn_rc (); + + sound_data_mutex = SDL_CreateMutex (); + config_mutex = SDL_CreateMutex (); + if (! sound_data_mutex) + pn_fatal_error ("Unable to create a new mutex: %s", + SDL_GetError ()); + + pn_done = FALSE; + draw_thread = SDL_CreateThread (draw_thread_fn, NULL); + if (! draw_thread) + pn_fatal_error ("Unable to create a new thread: %s", + SDL_GetError ()); + + /* Add a gtk timeout to test for quits */ + quit_timeout = gtk_timeout_add (1000, quit_timeout_fn, NULL); + timeout_set = TRUE; +} + +static void +pn_xmms_cleanup (void) +{ + if (timeout_set) + { + gtk_timeout_remove (quit_timeout); + timeout_set = FALSE; + } + + if (draw_thread) + { + pn_done = TRUE; + SDL_WaitThread (draw_thread, NULL); + draw_thread = NULL; + } + + if (sound_data_mutex) + { + SDL_DestroyMutex (sound_data_mutex); + sound_data_mutex = NULL; + } + + if (config_mutex) + { + SDL_DestroyMutex (config_mutex); + config_mutex = NULL; + } +} + +static void +about_close_clicked(GtkWidget *w, GtkWidget **window) +{ + gtk_widget_destroy(*window); + *window=NULL; +} + +static void +about_closed(GtkWidget *w, GdkEvent *e, GtkWidget **window) +{ + about_close_clicked(w,window); +} + +static void +pn_xmms_about (void) +{ + audacious_info_dialog("About Paranormal Visualization Studio", + +"Paranormal Visualization Studio " VERSION "\n\n\ +Copyright (C) 2006, William Pitcock \n\ +Portions Copyright (C) 2001, Jamie Gennis \n\ +\n\ +This program is free software; you can redistribute it and/or modify\n\ +it under the terms of the GNU General Public License as published by\n\ +the Free Software Foundation; either version 2 of the License, or\n\ +(at your option) any later version.\n\ +\n\ +This program is distributed in the hope that it will be useful,\n\ +but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ +GNU General Public License for more details.\n\ +\n\ +You should have received a copy of the GNU General Public License\n\ +along with this program; if not, write to the Free Software\n\ +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307\n\ +USA", _("Ok"), FALSE, NULL, NULL); +} + +static void +pn_xmms_configure (void) +{ + /* We should already have a GDK_THREADS_ENTER + but we need to give it config_mutex */ + if (config_mutex) + SDL_mutexP (config_mutex); + + if (! pn_rc) + load_pn_rc (); + + pn_configure (); + + if (config_mutex) + SDL_mutexV (config_mutex); +} + +static void +pn_xmms_render_pcm (gint16 data[2][512]) +{ + SDL_mutexP (sound_data_mutex); + memcpy (tmp_pcm_data, data, sizeof (gint16) * 2 * 512); + new_pcm_data = TRUE; + SDL_mutexV (sound_data_mutex); +} + +static void +pn_xmms_render_freq (gint16 data[2][256]) +{ + SDL_mutexP (sound_data_mutex); + memcpy (tmp_freq_data, data, sizeof (gint16) * 2 * 256); + new_freq_data = TRUE; + SDL_mutexV (sound_data_mutex); +} + +/* **************** paranormal.h stuff **************** */ + +void +pn_set_rc (struct pn_rc *new_rc) +{ + if (config_mutex) + SDL_mutexP (config_mutex); + + if (! pn_rc) + load_pn_rc (); + + if (pn_rc->actuator) + destroy_actuator (pn_rc->actuator); + pn_rc->actuator = new_rc->actuator; + + if (config_mutex) + SDL_mutexV (config_mutex); +} + +void +pn_fatal_error (const char *fmt, ...) +{ + char *errstr; + va_list ap; + GtkWidget *dialog; + GtkWidget *close, *label; + + /* Don't wanna try to lock GDK if we already have it */ + if (draw_thread && SDL_ThreadID () == SDL_GetThreadID (draw_thread)) + GDK_THREADS_ENTER (); + + /* now report the error... */ + va_start (ap, fmt); + errstr = g_strdup_vprintf (fmt, ap); + va_end (ap); + + dialog=gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(dialog), "Error - Paranormal Visualization Studio - " VERSION); + gtk_container_border_width (GTK_CONTAINER (dialog), 8); + + label=gtk_label_new(errstr); + fprintf (stderr, "%s\n", errstr); + g_free (errstr); + + close = gtk_button_new_with_label ("Close"); + gtk_signal_connect_object (GTK_OBJECT (close), "clicked", + GTK_SIGNAL_FUNC (gtk_widget_destroy), + GTK_OBJECT (dialog)); + + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, + FALSE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), close, + FALSE, FALSE, 0); + gtk_widget_show (label); + gtk_widget_show (close); + + gtk_widget_show (dialog); + gtk_widget_grab_focus (dialog); + + if (draw_thread && SDL_ThreadID () == SDL_GetThreadID (draw_thread)) + GDK_THREADS_LEAVE (); + + pn_quit (); +} + + +void +pn_error (const char *fmt, ...) +{ + char *errstr; + va_list ap; + static GtkWidget *text; + static GtkTextBuffer *textbuf; + + /* now report the error... */ + va_start (ap, fmt); + errstr = g_strdup_vprintf (fmt, ap); + va_end (ap); + fprintf (stderr, "Paranormal-CRITICAL **: %s\n", errstr); + + /* This is the easiest way of making sure we don't + get stuck trying to lock a mutex that this thread + already owns since this fn can be called from either + thread */ + if (draw_thread && SDL_ThreadID () == SDL_GetThreadID (draw_thread)) + GDK_THREADS_ENTER (); + + if (! err_dialog) + { + GtkWidget *close; + + err_dialog=gtk_dialog_new(); + gtk_window_set_title (GTK_WINDOW (err_dialog), "Error - Paranormal Visualization Studio - " VERSION); + gtk_window_set_policy (GTK_WINDOW (err_dialog), FALSE, FALSE, FALSE); + gtk_widget_set_usize (err_dialog, 400, 200); + gtk_container_border_width (GTK_CONTAINER (err_dialog), 8); + + textbuf = gtk_text_buffer_new(NULL); + text = gtk_text_view_new_with_buffer (textbuf); + + close = gtk_button_new_with_label ("Close"); + gtk_signal_connect_object (GTK_OBJECT (close), "clicked", + GTK_SIGNAL_FUNC (gtk_widget_hide), + GTK_OBJECT (err_dialog)); + gtk_signal_connect_object (GTK_OBJECT (err_dialog), "delete-event", + GTK_SIGNAL_FUNC (gtk_widget_hide), + GTK_OBJECT (err_dialog)); + + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (err_dialog)->vbox), text, FALSE, + FALSE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (err_dialog)->action_area), close, + FALSE, FALSE, 0); + gtk_widget_show (text); + gtk_widget_show (close); + } + + gtk_text_buffer_set_text(GTK_TEXT_BUFFER(textbuf), errstr, -1); + g_free (errstr); + + gtk_widget_show (err_dialog); + gtk_widget_grab_focus (err_dialog); + + if (draw_thread && SDL_ThreadID () == SDL_GetThreadID (draw_thread)) + GDK_THREADS_LEAVE (); +} + + +/* This is confusing... + Don't call this from anywhere but the draw thread or + the initialization xmms thread (ie NOT the xmms sound + data functions) */ +void +pn_quit (void) +{ + if (draw_thread && SDL_ThreadID () == SDL_GetThreadID (draw_thread)) + { + /* We're in the draw thread so be careful */ + longjmp (quit_jmp, 1); + } + else + { + /* We're not in the draw thread, so don't sweat it... + addendum: looks like we have to bend over backwards (forwards?) + for xmms here too */ + pn_vp.disable_plugin (&pn_vp); + while (1) + gtk_main_iteration (); + } +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/pn_utils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/pn_utils.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,34 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PN_UTILS_H +#define _PN_UTILS_H + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#define CAP(i,c) (i > c ? c : i < -(c) ? -(c) : i) +#define CAPHILO(i,h,l) (i > h ? h : i < l ? l : i) +#define CAPHI(i,h) (i > h ? h : i) +#define CAPLO(i,l) (i < l ? l : i) + +#define PN_IMG_INDEX(x,y) ((x) + (pn_image_data->width * (y))) + +#endif /* _PN_UTILS_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,278 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* FIXME: add documentation support to preset files */ +/* FIXME: add multiple-presets-per-file support (maybe) */ + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "paranormal.h" +#include "actuators.h" +#include "containers.h" + +/* cur->name should be the actuator name */ +static void +parse_actuator (xmlNodePtr cur, struct pn_actuator *a) +{ + int i; + char *content; + struct pn_actuator *child; + + for (cur = cur->xmlChildrenNode; cur; cur = cur->next) + { + if (xmlIsBlankNode (cur) || cur->type != XML_ELEMENT_NODE) + continue; + + /* see if it's an option */ + for (i=0; a->options && a->options[i].desc; i++) + if (! xmlStrcmp (cur->name, + (const xmlChar *) a->options[i].desc->name)) + break; + + if (a->options && a->options[i].desc) + { + /* it is an option, so let's set it! */ + content = (char*)xmlNodeGetContent (cur); + + /* FIXME: warning? */ + if (! content) + continue; + + /* FIXME: perhaps do a little better job of error checking? */ + switch (a->options[i].desc->type) + { + case OPT_TYPE_INT: + a->options[i].val.ival = (int)strtol (content, NULL, 0); + break; + case OPT_TYPE_FLOAT: + a->options[i].val.fval = (float)strtod (content, NULL); + break; + case OPT_TYPE_STRING: + a->options[i].val.sval = g_strdup (content); + break; + case OPT_TYPE_COLOR: + { + guint r,g,b; + char *s = content+1; + r = strtoul (s, &s, 0); + if (r > 255 || ! (s = strchr (s, ','))) + goto bad_color; + g = strtoul (s+1, &s, 0); + if (g > 255 || ! (s = strchr (s, ','))) + goto bad_color; + b = strtoul (s+1, NULL, 0); + if (b > 255) + goto bad_color; + + a->options[i].val.cval.r = (guchar)r; + a->options[i].val.cval.g = (guchar)g; + a->options[i].val.cval.b = (guchar)b; + + break; + } + bad_color: + pn_error ("parse error: invalid color value: option \"%s\" ignored.\n" + " correct syntax: (r,g,b) where r, g, and b are the\n" + " red, green, and blue components of the " + "color, respectively", cur->name); + break; + + case OPT_TYPE_COLOR_INDEX: + { + int c = (int)strtol (content, NULL, 0); + if (c < 0 || c > 255) + pn_error ("parse error: invalid color index \"%s\" (%d): option ignored.\n" + " the value must be between 0 and 255", + cur->name, c); + else + a->options[i].val.ival = c; + break; + } + case OPT_TYPE_BOOLEAN: + { + char *c, *d; + for (c=content; isspace (*c); c++); + for (d=c; !isspace(*d); d++); + *d = '\0'; + if (g_strcasecmp (c, "true") == 0) + a->options[i].val.bval = TRUE; + else if (g_strcasecmp (c, "false") == 0) + a->options[i].val.bval = FALSE; + else + pn_error ("parse error: invalid boolean value \"%s\" (%s): option ignored.\n" + " the value must be either 'true' or 'false'", + cur->name, c); + } + } + + /* gotta free content */ + xmlFree ((xmlChar*)content); + } + /* See if we have a child actuator */ + else if (a->desc->flags & ACTUATOR_FLAG_CONTAINER + && (child = create_actuator ((char*)cur->name))) + { + container_add_actuator (a, child); + parse_actuator (cur, child); + } + else + /* We have an error */ + pn_error ("parse error: unknown entity \"%s\": ignored.", cur->name); + } +} + +struct pn_actuator * +load_preset (const char *filename) +{ + xmlDocPtr doc; + xmlNodePtr cur; + struct pn_actuator *a = NULL; + + doc = xmlParseFile (filename); + if (! doc) + return NULL; + + cur = xmlDocGetRootElement (doc); + if (! cur) + xmlFreeDoc (doc); + + if (xmlStrcmp (cur->name, (const xmlChar *) "paranormal_preset")) + { + xmlFreeDoc (doc); + return NULL; + } + + for (cur = cur->children; cur; cur = cur->next) + { + if (xmlIsBlankNode (cur) || cur->type != XML_ELEMENT_NODE) + continue; + + /* if (...) { ... } else if (is_documentation [see top of file]) ... else */ + { + a = create_actuator ((char*)cur->name); + + /* FIXME: warn? */ + if (! a) + continue; + + parse_actuator (cur, a); + break; + } + } + + /* Don't need this any longer */ + xmlFreeDoc (doc); + + return a; +} + +/* FIXME: do the file writing w/ error checking */ +static gboolean +save_preset_recursive (FILE *file, const struct pn_actuator *actuator, + int recursion_depth) +{ + int i; + GSList *child; + + /* open this actuator */ + fprintf (file, "%*s<%s>\n", recursion_depth, "", actuator->desc->name); + + /* options */ + if (actuator->options) + for (i=0; actuator->options[i].desc; i++) + { + fprintf (file, "%*s <%s> ", recursion_depth, "", + actuator->desc->option_descs[i].name); + switch (actuator->desc->option_descs[i].type) + { + case OPT_TYPE_INT: + case OPT_TYPE_COLOR_INDEX: + fprintf (file, "%d", actuator->options[i].val.ival); + break; + case OPT_TYPE_FLOAT: + fprintf (file, "%.5f", actuator->options[i].val.fval); + break; + case OPT_TYPE_STRING: + fprintf (file, "%s", actuator->options[i].val.sval); + break; + case OPT_TYPE_COLOR: + fprintf (file, "%d, %d, %d", actuator->options[i].val.cval.r, + actuator->options[i].val.cval.g, + actuator->options[i].val.cval.b); + break; + case OPT_TYPE_BOOLEAN: + if (actuator->options[i].val.bval) + fprintf (file, "TRUE"); + else + fprintf (file, "FALSE"); + break; + } + fprintf (file, " \n", actuator->desc->option_descs[i].name); + } + + /* children */ + if (actuator->desc->flags & ACTUATOR_FLAG_CONTAINER) + for (child = *(GSList **)actuator->data; child; child = child->next) + if (! save_preset_recursive (file, (struct pn_actuator*) child->data, + recursion_depth+1)) + return FALSE; + + /* close the actuator */ + fprintf (file, "%*s\n", recursion_depth, "", actuator->desc->name); + + return TRUE; +} + +gboolean +save_preset (const char *filename, const struct pn_actuator *actuator) +{ + FILE *file; + + file = fopen (filename, "w"); + if (! file) + { + pn_error ("fopen: %s", strerror (errno)); + return FALSE; + } + + fprintf (file, "\n\n\n"); + + if (actuator) + if (! save_preset_recursive (file, actuator, 1)) + { + fclose (file); + return FALSE; + } + + fprintf (file, ""); + + fclose (file); + + return TRUE; + +} diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets.h Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,30 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PRESETS_H +#define _PRESETS_H + +#include + +#include "actuators.h" + +struct pn_actuator *load_preset (const char *filename); +gboolean save_preset (const char *filename, const struct pn_actuator *actuator); + +#endif /* _PRESETS_H */ diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/.depend diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/.depend-done diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/Makefile Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,38 @@ +DATA = nazca_-_smoke_on_the_water.pnv \ + nenolod_-_3d_wave.pnv \ + nenolod_-_aquamarine_dream.pnv \ + nenolod_-_purple_flower.pnv \ + nenolod_-_bumblebees.pnv \ + nenolod_-_flying_into_pastels.pnv \ + nenolod_-_phosphor_flame.pnv \ + nenolod_-_psuedo_starfield.pnv \ + nenolod_-_quakingscope.pnv \ + nenolod_-_beatscope.pnv \ + nenolod_-_branchscope.pnv \ + nenolod_-_retroscope.pnv \ + nenolod_-_technicolour_nightmare.pnv \ + nenolod_-_trapped.pnv \ + nenolod_-_value_replace_fun.pnv \ + nenolod_-_rush.pnv \ + nenolod_-_worms.pnv \ + nenolod_-_scopefun.pnv \ + nenolod_-_smoke.pnv \ + nenolod_-_swarm.pnv \ + nenolod_-_interlaced.pnv \ + nenolod_-_cubism.pnv \ + nenolod_-_transform_fun.pnv \ + nenolod_-_tunnel_vision.pnv \ + nenolod_-_kaliedoscope.pnv \ + nenolod_-_simple_yet_pretty.pnv \ + nenolod_-_quasar.pnv \ + aerdan_-_bloody_vortex.pnv \ + aerdan_-_cloudscape.pnv \ + aerdan_-_cloudscape2.pnv \ + aerdan_-_dancing_snow.pnv \ + aerdan_-_portal_to_hell.pnv \ + aerdan_-_telestatic.pnv \ + ticpu_-_colored_beat-o-scope.pnv + +include ../../../buildsys.mk + +PACKAGE = audacious/paranormal/Presets diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/aerdan_-_bloody_vortex.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/aerdan_-_bloody_vortex.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + 0 + 255 + 255, 64, 0 + 128, 0, 0 + + + + 4 + + + + + 3 + + + 39.00000 + 255 + + + -2.00000 + 0.00000 + 0.94000 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/aerdan_-_cloudscape.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/aerdan_-_cloudscape.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,28 @@ + + + + + + + 0 + 255 + 220, 225, 225 + + + + 0 + 251 + TRUE + + + 0.00000 + 0.00000 + 0.96500 + + + + + 1 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/aerdan_-_cloudscape2.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/aerdan_-_cloudscape2.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,38 @@ + + + + + + + 0 + 255 + 220, 225, 225 + + + 0 + 245 + 180, 180, 180 + + + + 0 + 250 + FALSE + + + 0.00000 + 0.12500 + 0.96500 + + + + + 1 + + + -1 + 255 + FALSE + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/aerdan_-_dancing_snow.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/aerdan_-_dancing_snow.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,40 @@ + + + + + + + 0 + 255 + 146, 191, 225 + + + + 0.00000 + 0.00000 + 0.96500 + + + 1 + + + 1.00000 + 250 + + + + + + + 0.00000 + 10.00000 + 0.95000 + 0.10000 + + + -5.00000 + 0.00000 + 0.96500 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/aerdan_-_portal_to_hell.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/aerdan_-_portal_to_hell.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,35 @@ + + + + + + + 0 + 255 + 128, 85, 0 + + + + 1 + + + + + 0.00000 + 10.00000 + 2.00000 + 1.00000 + + + 1.50000 + 250 + + + 0.00000 + 0.00000 + 0.96500 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/aerdan_-_stonervision.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/aerdan_-_stonervision.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,76 @@ + + + + + + + 0 + + + 5 + 250 + + + + + + + 1 + + + -1.00000 + 253 + + + 0.00000 + 8.00000 + 2.00000 + 5.00000 + + + 256 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + n = 800; t = -0.05; + t = t + 0.05; + d = index + value; r = t + index * 3.141952924 * 4; x = cos(r) * d; y = sin(r) * d; + TRUE + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/aerdan_-_telestatic.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/aerdan_-_telestatic.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,30 @@ + + + + + + + 0 + 255 + 220, 225, 225 + + + + 0 + 251 + TRUE + + + 0.00000 + 0.00000 + 0.96500 + + + + + -1 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nazca_-_smoke_on_the_water.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nazca_-_smoke_on_the_water.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,37 @@ + + + + + + + + + + 0 + 255 + 0, 0, 0 + 72, 72, 255 + + + -1 + 255 + TRUE + + + 1 + 255 + TRUE + + + 0.00000 + 7.00000 + 1.00000 + 1.00000 + + + + + 1 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_3d_wave.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_3d_wave.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,22 @@ + + + + + + + 0 + 255 + 0, 191, 255 + + + + n=7;r=0.5;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=1;rdy=1;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p; + ;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3); + x1=value*sin(p2*index);y1=value * index / cos(z1);z1=r*cos(p2*index);y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst); + TRUE + + + 10 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_aquamarine_dream.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_aquamarine_dream.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,36 @@ + + + + + + + 0 + 255 + 0, 161, 255 + + + + -1 + -1.00000 + 0.12500 + 0 + + + n = 800; t = -0.05; + t = t + 0.05; + d = index + value; r = t + index * 3.141952924 * 4; x = cos(r) * d; y = sin(r) * d; + TRUE + + + + + r = sin(r); d = cos(d)^2; + TRUE + + + + + 8 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_beatscope.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_beatscope.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,71 @@ + + + + + + + 0 + 138 + 119, 239, 163 + + + 139 + 255 + 151, 179, 234 + + + + -1 + + + + + 0 + TRUE + + 0.00000 + 0.00000 + 1.04000 + + + 0.00000 + 0.00000 + 0.98700 + + + 0 + TRUE + + 0 + 138 + 119, 239, 163 + + + 139 + 255 + 151, 179, 234 + + + 0 + 138 + 151, 179, 234 + + + 139 + 255 + 119, 239, 163 + + + + 1.25000 + 0.00000 + 0.98700 + + + -1.25000 + 0.00000 + 1.04000 + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_branchscope.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_branchscope.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,114 @@ + + + + + + + 0 + 138 + 119, 239, 163 + + + 139 + 255 + 151, 179, 234 + + + + + + + + 0 + TRUE + + + -1 + + + 0.00000 + + + + + -1 + + + + + 0.00000 + + + + + 0 + TRUE + + + + + + + + + 3 + + + + + 30 + + + + + 0 + TRUE + + 0 + 138 + 119, 239, 163 + + + 139 + 255 + 151, 179, 234 + + + + + 0 + 138 + 151, 179, 234 + + + 139 + 255 + 119, 239, 163 + + + + 0 + TRUE + + 0.00000 + 0.00000 + 0.98700 + + + 0.00000 + 0.00000 + 1.04000 + + + 1.25000 + 0.00000 + 0.98700 + + + -1.25000 + 0.00000 + 1.04000 + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_bumblebees.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_bumblebees.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,27 @@ + + + + + + + 0 + 255 + 238, 208, 83 + + + + -6 + 6.00000 + 0.12500 + 0 + + + 0.00000 + + + + + 1 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_cubism.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_cubism.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,54 @@ + + + + + + + 0 + 255 + 0, 0, 255 + + + + -1 + 250 + TRUE + + + -1 + FALSE + + + 1 + FALSE + + + -4.00000 + 0.00000 + 0.90000 + + + 1.00000 + 0.00000 + -1.00000 + + + 0 + TRUE + + + + + + + 250 + 255 + 0 + + + 128 + 149 + 0 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_flying_into_pastels.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_flying_into_pastels.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,38 @@ + + + + + + + 140 + 255 + 76, 122, 229 + + + + -6 + 6.00000 + 0.12500 + 0 + + + 0.00000 + + + 0.00000 + 8.00000 + 1.00000 + 1.00000 + + + + + 1 + + + -0.50000 + 0.00000 + 0.94000 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_interlaced.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_interlaced.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,55 @@ + + + + + + + + + 0 + 255 + 0, 151, 255 + + + + + 180 + + + 180 + + + 180 + + + 180 + + + 180 + + + 180 + + + + + + + 250 + 255 + 150 + + + 1 + TRUE + + + + -1 + TRUE + + + 3 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_kaliedoscope.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_kaliedoscope.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,28 @@ + + + + + + + 0 + 255 + + + + + -1 + 255 + TRUE + + + d=cos(d)^2; + + + + + + + 1 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_phosphor_flame.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_phosphor_flame.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,28 @@ + + + + + + + 0 + 255 + 120, 223, 193 + + + + + + 1 + + + + + 0.00000 + + + 0.00000 + 0.00000 + 1.04000 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_psuedo_starfield.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_psuedo_starfield.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,22 @@ + + + + + + + 0 + 255 + 191, 191, 191 + + + + + + 0.00000 + 0.00000 + 0.97000 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_purple_flower.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_purple_flower.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,18 @@ + + + + + + + 0 + 255 + 118, 0, 191 + + + + 0.00000 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_quakingscope.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_quakingscope.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,37 @@ + + + + + + + 0 + 138 + 119, 239, 163 + + + 139 + 255 + 151, 179, 234 + + + + -1 + + + + + 0 + FALSE + + 0.00000 + 0.00000 + 1.04000 + + + 0.00000 + 0.00000 + 0.98700 + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_quasar.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_quasar.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,36 @@ + + + + + + + 0 + 255 + 0, 191, 255 + + + + points=513;r=0.5;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=1;rdy=1;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p; + ;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3); + x1=value*sin(p2*index);y1=0;z1=r*cos(p2*index);y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst); + TRUE + + + points=513;r=0.5;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=1;rdy=1;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p; + ;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3); + y1=value*cos(p2*index);x1=0;z1=r*sin(p2*index);y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst); + TRUE + + + points=5;r=0.5;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=1;rdy=1;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p; + ;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3); + z1=r*sin(p2*index);x1=0;y1=0*sin(p2*index);y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst); + TRUE + + + 10 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_retroscope.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_retroscope.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,23 @@ + + + + + + + 0 + 255 + 119, 239, 163 + + + + 255 + + + -1 + + + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_rush.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_rush.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,51 @@ + + + + + + + 0 + 255 + 0, 0, 127 + 0, 127, 255 + + + + -1 + 255 + FALSE + + + -1 + 255 + FALSE + + + 0 + TRUE + + -4.00000 + 0.00000 + 0.75000 + + + 4.00000 + 0.00000 + 0.75000 + + + -8.00000 + 0.00000 + 0.75000 + + + 8.00000 + 0.00000 + 0.75000 + + + + 3 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_scopefun.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_scopefun.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,26 @@ + + + + + + + 0 + 255 + 0, 191, 255 + + + + + + n=7;r=0.5;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=1;rdy=1;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p; + ;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3); + x1=value*sin(p2*index);y1=cos(p2*index);z1=r*cos(p2*index);y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst); + TRUE + + + 10 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_simple_yet_pretty.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_simple_yet_pretty.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,29 @@ + + + + + + + 0 + 255 + 105, 32, 255 + + + + 0 + 255 + TRUE + + + 0 + 255 + TRUE + + + r = sin(r); d = cos(d)^2; + TRUE + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_smoke.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_smoke.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,33 @@ + + + + + + + 0 + 255 + 151, 179, 234 + + + + -1 + 180 + TRUE + + + 1 + 15 + 0 + + + 0.00000 + 0.00000 + 0.94000 + + + + + 1 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_swarm.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_swarm.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,923 @@ + + + + + + + 0 + 255 + 0, 127, 255 + + + + + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + + 1.00000 + 0.00000 + 0.96000 + + + + + 1 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_technicolour_nightmare.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_technicolour_nightmare.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,72 @@ + + + + + + + 0 + 255 + 100, 62, 191 + + + + -1 + 157 + TRUE + + + 0.03000 + 0.00000 + 1.04000 + + + 1 + + + -1 + 151 + TRUE + + + + -1 + + + + + 0 + FALSE + + 0 + 255 + 69, 75, 191 + + + 0 + 255 + 120, 191, 191 + + + 0 + 255 + 100, 62, 191 + + + 0 + 255 + 100, 191, 62 + + + 0 + 255 + 62, 191, 100 + + + 0 + 255 + 239, 123, 227 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_transform_fun.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_transform_fun.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,24 @@ + + + + + + + 0 + 255 + 0, 130, 191 + + + + points=512; dt=0.01; t=0; sc=1; + t=t+dt;dt=0.9*dt+0.001; + x=cos(2*index+t)*0.9*(value*0.5+0.5); y=sin(index*2+t)*0.9*(value*0.5+0.5); + TRUE + + + + + r=cos(r*3); d=sin(d*1.1) + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_trapped.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_trapped.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,27 @@ + + + + + + + 0 + 255 + 0, 161, 226 + + + + r=(tan(r)^sin(r)) + + + points=192; t = -0.05; + t = t + 0.05; + d = index + value; r = t + tan(index) * 3.141952924 * 4; x = (sin(r) * sin(d)) / 1.3; y = cos(r) * cos(d); + TRUE + + + 3 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_tunnel_vision.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_tunnel_vision.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,30 @@ + + + + + + + 0 + 255 + 0, 130, 191 + + + + -1 + 255 + TRUE + + + rseek=1.45; dseek=2; + + r=r/rseek; d=d*dseek; + + + + + + + 2 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_value_replace_fun.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_value_replace_fun.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,31 @@ + + + + + + + 0 + 255 + 151, 179, 234 + + + + -1 + + + 255 + 255 + 180 + + + 0.00000 + 0.00000 + 0.94000 + + + + + 1 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/nenolod_-_worms.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/nenolod_-_worms.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,920 @@ + + + + + + + 0 + 255 + 0, 127, 255 + + + + + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + 255 + + + + 0.00000 + 0.00000 + 1.02000 + + + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/presets/ticpu_-_colored_beat-o-scope.pnv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/presets/ticpu_-_colored_beat-o-scope.pnv Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + 8.00000 + 1.00000 + 0.60000 + + + + 3 + FALSE + + 26 + 169 + 0, 191, 255 + + + 0 + 94 + 83, 127, 150 + + + 84 + 255 + 208, 95, 89 + + + 0 + 173 + 71, 255, 51 + + + 114 + 255 + 242, 50, 253 + + + 0 + 157 + 15, 239, 231 + + + + 0 + FALSE + + + + + + + + + + + 8 + TRUE + + n=7;r=0.5;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=1;rdy=1;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p; + ;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3); + x1=value*sin(p2*index);y1=value * index / cos(z1);z1=r*cos(p2*index);y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst); + TRUE + + + n=7;r=0.5;mx=0;my=0;mz=0;dst=2;rx=0;ry=0;rz=0;rdx=1;rdy=1;rdz=1;p=3.14159265;p2=2.0*p;p3=180/p; + ;rx=rx+rdx;ry=ry+rdy;rz=rz+rdz;xs=sin(rx/p3);ys=sin(ry/p3);zs=sin(rz/p3);xc=cos(rx/p3);yc=cos(ry/p3);zc=cos(rz/p3); + x1=value*sin(p2*index);y1=value * index / cos(z1);z1=r*cos(p2*index);y2=y1*xc-z1*xs;z2=y1*xs+z1*xc;x2=z2*ys+x1*yc;z3=z2*yc-x1*ys;x3=x2*zc-y2*zs;y3=y2*zc+x2*zs;x4=mx+x3;y4=my+y3;z4=mz+z3;x=x4/(1+z4/dst);y=y4/(1+z4/dst); + TRUE + + + + 4 + + + \ No newline at end of file diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/wave.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/wave.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,528 @@ +/* + * paranormal-ng: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include + +#include "paranormal.h" +#include "actuators.h" +#include "pn_utils.h" + +#include "drawing.h" + +#include "libcalc/calc.h" + +/* **************** wave_horizontal **************** */ +struct pn_actuator_option_desc wave_horizontal_opts[] = +{ + {"channels", "Which sound channels to use: negative = channel 1, \npositive = channel 2, " + "zero = both (two wave-forms.)", OPT_TYPE_INT, {ival: -1} }, + {"value", "The colour value to use.", OPT_TYPE_COLOR, {cval: { 0, 192, 255 } } }, + {"width", "The line's width.", OPT_TYPE_INT, {ival: 1} }, + { NULL } +}; + +void +wave_horizontal_exec_lines (const struct pn_actuator_option *opts, + gpointer data) +{ + int channel = ( opts[0].val.ival < 0 ) ? 0 : 1; + guchar value = (opts[1].val.ival < 0 || opts[1].val.ival > 255) ? 255 : opts[1].val.ival; + GLfloat *x_pos, *y_pos; /* dynamic tables which store the positions for the line */ + GLfloat *x2_pos, *y2_pos; /* dynamic tables which store the positions for the line */ + gint i, j; + float step; + GLubyte colour[] = { opts[1].val.cval.r, opts[1].val.cval.g, opts[1].val.cval.b, 255 }; + + x_pos = g_new0(GLfloat, 257); + y_pos = g_new0(GLfloat, 257); + x2_pos = g_new0(GLfloat, 257); + y2_pos = g_new0(GLfloat, 257); + + step = pn_image_data->width / 128.; + + /* calculate the line. */ + for (j = 0, i = -128; j < 256; i++, j++) + { + if (opts[0].val.ival != 0) + { + x_pos[j] = (i * step) / pn_image_data->width; + y_pos[j] = (GLfloat) CAP (pn_sound_data->pcm_data[channel][j * 2]>>5, + (pn_image_data->height>>1)) / (GLfloat) pn_image_data->height; + } + else + { + x_pos[j] = (i * step) / pn_image_data->width; + y_pos[j] = ((GLfloat) CAP (pn_sound_data->pcm_data[channel][j * 2]>>5, + (pn_image_data->height>>1)) / (GLfloat) pn_image_data->height) - 0.5f; + + x2_pos[j] = (i * step) / pn_image_data->width; + y2_pos[j] = ((GLfloat) CAP (pn_sound_data->pcm_data[channel][j * 2]>>5, + (pn_image_data->height>>1)) / (GLfloat) pn_image_data->height) + 0.5f; + + } + } + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + + glLineWidth(opts[2].val.ival); + glBegin(GL_LINE_STRIP); + + glColor4ubv(colour); + + /* draw the line. */ + for (i = 1; i < 256; i++) + { + glVertex2d(x_pos[i - 1], y_pos[i - 1]); + glVertex2d(x_pos[i], y_pos[i]); + } + + glEnd(); + + if ( opts[0].val.ival == 0 ) + { + glBegin(GL_LINE_STRIP); + + for (i = 1; i < 256; i++) + { + glVertex2d(x2_pos[i - 1] / pn_image_data->width, y2_pos[i - 1] / pn_image_data->height); + glVertex2d(x2_pos[i] / pn_image_data->width, y2_pos[i] / pn_image_data->height); + } + + glEnd(); + } + + glPopMatrix(); + + g_free(x_pos); + g_free(y_pos); + g_free(x2_pos); + g_free(y2_pos); +} + +static void +wave_horizontal_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + wave_horizontal_exec_lines(opts, data); +} + +struct pn_actuator_desc builtin_wave_horizontal = +{ + "wave_horizontal", "Horizontal Waveform", + "Draws one or two waveforms horizontally across " + "the drawing surface", + 0, wave_horizontal_opts, + NULL, NULL, wave_horizontal_exec +}; + +/* **************** wave_vertical **************** */ +struct pn_actuator_option_desc wave_vertical_opts[] = +{ + {"channels", "Which sound channels to use: negative = channel 1, \npositive = channel 2, " + "zero = both (two wave-forms.)", OPT_TYPE_INT, {ival: -1} }, + {"value", "The colour value to use.", OPT_TYPE_COLOR, {cval: { 0, 192, 255 } } }, + {"width", "The line's width.", OPT_TYPE_INT, {ival: 1} }, + { NULL } +}; + +static void +wave_vertical_exec_lines (const struct pn_actuator_option *opts, + gpointer data) +{ + int channel = ( opts[0].val.ival < 0 ) ? 0 : 1; + guchar value = (opts[1].val.ival < 0 || opts[1].val.ival > 255) ? 255 : opts[1].val.ival; + GLfloat *x_pos, *y_pos; /* dynamic tables which store the positions for the line */ + GLfloat *x2_pos, *y2_pos; /* dynamic tables which store the positions for the line */ + gint i, j; + float step; + GLubyte colour[] = { opts[1].val.cval.r, opts[1].val.cval.g, opts[1].val.cval.b, 255 }; + + x_pos = g_new0(GLfloat, 129); + y_pos = g_new0(GLfloat, 129); + x2_pos = g_new0(GLfloat, 129); + y2_pos = g_new0(GLfloat, 129); + + step = pn_image_data->height / 64.; + + /* calculate the line. */ + for (i = -64, j = 0; j < 128; i++, j++) + { + if (opts[0].val.ival != 0) + { + x_pos[j] = (GLfloat) CAP (pn_sound_data->pcm_data[channel][j * 2]>>6, + (pn_image_data->height>>1)) / (GLfloat) pn_image_data->width; + y_pos[j] = (i * step) / pn_image_data->height; + } + else + { + x_pos[j] = ((GLfloat) CAP (pn_sound_data->pcm_data[channel][j * 2]>>6, + (pn_image_data->height>>1)) / (GLfloat) pn_image_data->width) - 0.5; + y_pos[j] = (i * step) / pn_image_data->height; + + x2_pos[j] = ((GLfloat) CAP (pn_sound_data->pcm_data[channel][j * 2]>>6, + (pn_image_data->height>>1)) / (GLfloat) pn_image_data->width) + 0.5; + y2_pos[j] = (i * step) / pn_image_data->height; + } + } + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + + glLineWidth(opts[2].val.ival); + glBegin(GL_LINE_STRIP); + + glColor4ubv(colour); + + /* draw the line. */ + for (i = 1; i < 128; i++) + { + glVertex2d(x_pos[i - 1], y_pos[i - 1]); + glVertex2d(x_pos[i], y_pos[i]); + } + + glEnd(); + + if ( opts[0].val.ival == 0 ) + { + glBegin(GL_LINE_STRIP); + + for (i = 1; i < 128; i++) + { + glVertex2d(x2_pos[i - 1] / pn_image_data->width, y2_pos[i - 1] / pn_image_data->height); + glVertex2d(x2_pos[i] / pn_image_data->width, y2_pos[i] / pn_image_data->height); + } + + glEnd(); + } + + glPopMatrix(); + + g_free(x_pos); + g_free(y_pos); + g_free(x2_pos); + g_free(y2_pos); +} + +static void +wave_vertical_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + wave_vertical_exec_lines(opts, data); +} + +struct pn_actuator_desc builtin_wave_vertical = +{ + "wave_vertical", "Vertical Waveform", + "Draws one or two waveforms vertically across " + "the drawing surface", + 0, wave_vertical_opts, + NULL, NULL, wave_vertical_exec +}; + +/* FIXME: allow for only 1 channel for wave_normalize & wave_smooth */ +/* **************** wave_normalize **************** */ +static struct pn_actuator_option_desc wave_normalize_opts[] = +{ + { "height", "If positive, the height, in pixels, to which the waveform will be " + "normalized; if negative, hfrac is used", OPT_TYPE_INT, { ival: -1 } }, + { "hfrac", "If positive, the fraction of the horizontal image size to which the " + "waveform will be normalized; if negative, vfrac is used", + OPT_TYPE_FLOAT, { fval: -1 } }, + { "vfrac", "If positive, the fraction of the vertical image size to which the " + "waveform will be normalized", + OPT_TYPE_FLOAT, { fval: .125 } }, + { "channels", "Which sound channel(s) to normalize: negative = channel 1,\n" + "\tpositive = channel 2, 0 = both channels.", + OPT_TYPE_INT, { ival: 0 } }, + { NULL } +}; + +static void +wave_normalize_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i, j, max=0; + float denom; + + for (j=0; j<2; j++) + { + if ( !(opts[3].val.ival) || (opts[3].val.ival < 0 && j == 0) || + (opts[3].val.ival > 0 && j == 1) ) { + + for (i=0; i<512; i++) + if (abs(pn_sound_data->pcm_data[j][i]) > max) + max = abs(pn_sound_data->pcm_data[j][i]); + + if (opts[0].val.ival > 0) + denom = max/(opts[0].val.ival<<8); + else if (opts[1].val.fval > 0) + denom = max/(opts[1].val.fval * (pn_image_data->width<<8)); + else + denom = max/(opts[2].val.fval * (pn_image_data->height<<8)); + + if (denom > 0) + for (i=0; i<512; i++) + pn_sound_data->pcm_data[j][i] + /= denom; + } + } +} + +struct pn_actuator_desc builtin_wave_normalize = +{ + "wave_normalize", "Normalize Waveform Data", + "Normalizes the waveform data used by the wave_* actuators", + 0, wave_normalize_opts, + NULL, NULL, wave_normalize_exec +}; + +/* **************** wave_smooth **************** */ +struct pn_actuator_option_desc wave_smooth_opts[] = +{ + { "channels", "Which sound channel(s) to smooth: negative = channel 1, \n" + "\tpositive = channel 2, 0 = both channels.", + OPT_TYPE_INT, { ival: 0 } }, + {0} +}; + +static void +wave_smooth_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i, j, k; + gint16 tmp[512]; + + for (j=0; j<2; j++) + { + if ( !(opts[0].val.ival) || (opts[0].val.ival < 0 && j == 0) || + (opts[0].val.ival > 0 && j == 1) ) { + + for (i=4; i<508; i++) + { + k = (pn_sound_data->pcm_data[j][i]<<3) + + (pn_sound_data->pcm_data[j][i+1]<<2) + + (pn_sound_data->pcm_data[j][i-1]<<2) + + (pn_sound_data->pcm_data[j][i+2]<<2) + + (pn_sound_data->pcm_data[j][i-2]<<2) + + (pn_sound_data->pcm_data[j][i+3]<<1) + + (pn_sound_data->pcm_data[j][i-3]<<1) + + (pn_sound_data->pcm_data[j][i+4]<<1) + + (pn_sound_data->pcm_data[j][i-4]<<1); + tmp[i] = k >> 5; + } + memcpy (pn_sound_data->pcm_data[j]+4, tmp, sizeof (gint16) * 504); + } + } +} + +struct pn_actuator_desc builtin_wave_smooth = +{ + "wave_smooth", "Smooth Waveform Data", + "Smooth out the waveform data used by the wave_* actuators", + 0, wave_smooth_opts, + NULL, NULL, wave_smooth_exec +}; + +/* **************** wave_radial **************** */ +static struct pn_actuator_option_desc wave_radial_opts[] = +{ + { "base_radius", " ", + OPT_TYPE_FLOAT, { fval: 0 } }, + {"value", "The colour value to use.", OPT_TYPE_COLOR, {cval: { 0, 192, 255 } } }, + {"width", "The line's width.", OPT_TYPE_INT, {ival: 1} }, + { NULL } +}; + +static void +wave_radial_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + int i, x, y; + GLfloat *x_pos, *y_pos; /* dynamic tables which store the positions for the line */ + GLubyte colour[] = { opts[1].val.cval.r, opts[1].val.cval.g, opts[1].val.cval.b, 255 }; + + x_pos = g_new0(GLfloat, 361); + y_pos = g_new0(GLfloat, 361); + + for(i=0; i<360; i++) + { + x_pos[i] = (opts[0].val.fval + (pn_sound_data->pcm_data[0][(int)(i*(512.0/360.0))])) + * cos_val[i]; + y_pos[i] = (opts[0].val.fval + (pn_sound_data->pcm_data[0][(int)(i*(512.0/360.0))])) + * sin_val[i]; + } + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + + glLineWidth(opts[2].val.ival); + glBegin(GL_LINES); + + glColor4ubv(colour); + + /* draw the line. */ + for (i = 1; i < 360; i++) + { + glVertex2d(x_pos[i - 1], y_pos[i - 1]); + glVertex2d(x_pos[i], y_pos[i]); + } + + glEnd(); + + glPopMatrix(); + + g_free(x_pos); + g_free(y_pos); +}; + +struct pn_actuator_desc builtin_wave_radial = +{ + "wave_radial", "Radial Waveform", + "Draws a single waveform varying" + " radially from the center of the image", + 0, wave_radial_opts, + NULL, NULL, wave_radial_exec +}; + +/* **************** wave_scope **************** */ + +static struct pn_actuator_option_desc wave_scope_opts[] = +{ + {"init_script", "Initialization script.", OPT_TYPE_STRING, {sval: "n = 800; t = -0.05;"} }, + {"frame_script", "Script to run at the beginning of each frame.", OPT_TYPE_STRING, {sval: "t = t + 0.05;"} }, + {"sample_script", "Script to run for each sample.", OPT_TYPE_STRING, {sval: "d = index + value; r = t + index * 3.141952924 * 4; x = cos(r) * d; y = sin(r) * d;"} }, + {"lines", "Use lines instead of dots.", OPT_TYPE_BOOLEAN, {bval: TRUE} }, + { NULL } +}; + +struct pn_scope_data +{ + expression_t *expr_on_init, *expr_on_frame, *expr_on_sample; + symbol_dict_t *dict; + gboolean reset; +}; + +static void +wave_scope_init(gpointer *data) +{ + *data = g_new0(struct pn_scope_data, 1); + + /* the expressions will need to be compiled, so prepare for that */ + ((struct pn_scope_data *)*data)->reset = TRUE; +} + +static void +wave_scope_cleanup(gpointer op_data) +{ + struct pn_scope_data *data = (struct pn_scope_data *) op_data; + + g_return_if_fail(data != NULL); + + if (data->expr_on_init) + expr_free(data->expr_on_init); + + if (data->expr_on_frame) + expr_free(data->expr_on_frame); + + if (data->expr_on_sample) + expr_free(data->expr_on_sample); + + if (data->dict) + dict_free(data->dict); + + if (data) + g_free(data); +} + +static void +wave_scope_exec(const struct pn_actuator_option *opts, + gpointer op_data) +{ + struct pn_scope_data *data = (struct pn_scope_data *) op_data; + gint i; + gdouble *xf, *yf, *index, *value, *points; + + if (data->reset) + { + if (data->dict) + dict_free(data->dict); + + data->dict = dict_new(); + + if (opts[0].val.sval != NULL) + data->expr_on_init = expr_compile_string(opts[0].val.sval, data->dict); + + if (opts[1].val.sval != NULL) + data->expr_on_frame = expr_compile_string(opts[1].val.sval, + data->dict); + + if (opts[2].val.sval != NULL) + data->expr_on_sample = expr_compile_string(opts[2].val.sval, + data->dict); + + if (data->expr_on_init != NULL) + expr_execute(data->expr_on_init, data->dict); + + data->reset = FALSE; + } + + xf = dict_variable(data->dict, "x"); + yf = dict_variable(data->dict, "y"); + index = dict_variable(data->dict, "index"); + value = dict_variable(data->dict, "value"); + points = dict_variable(data->dict, "points"); + + if (data->expr_on_frame != NULL) + expr_execute(data->expr_on_frame, data->dict); + + if (*points > 513 || *points == 0) + *points = 513; + + if (data->expr_on_sample != NULL) + { + glBegin(GL_LINE_STRIP); + + for (i = 0; i < *points; i++) + { + *value = 1.0 * pn_sound_data->pcm_data[0][i & 511] / 32768.0; + *index = i / (*points - 1); + + expr_execute(data->expr_on_sample, data->dict); + + glVertex2d(*xf, *yf); + } + + glEnd(); + glPopMatrix(); + } +} + +struct pn_actuator_desc builtin_wave_scope = +{ + "wave_scope", "Scope", + "A programmable scope.", + 0, wave_scope_opts, + wave_scope_init, wave_scope_cleanup, wave_scope_exec +}; diff -r 371d9450c631 -r 319930001524 src/paranormal-ng/xform.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/paranormal-ng/xform.c Wed Oct 17 23:09:54 2007 +0300 @@ -0,0 +1,376 @@ +/* + * paranormal: iterated pipeline-driven visualization plugin + * Copyright (c) 2006, 2007 William Pitcock + * Portions copyright (c) 2001 Jamie Gennis + * + * 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; under version 2 of the License. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* FIXME: allow for only using an xform on part of the img? */ +/* FIXME: perhaps combine these into a single vector field + so that only 1 apply_xform needs to be done for as many + of these as someone wants to use */ + +#include + +#include + +#include + +#include "paranormal.h" +#include "actuators.h" +#include "pn_utils.h" + +#include "libcalc/calc.h" + +/* **************** xform_adjust **************** */ +struct pn_actuator_option_desc xform_adjust_opts[] = +{ + { "x", "adjustment to x", OPT_TYPE_FLOAT, { fval: 1.0 } }, + { "y", "adjustment to y", OPT_TYPE_FLOAT, { fval: 1.0 } }, + { "z", "adjustment to z", OPT_TYPE_FLOAT, { fval: 1.0 } }, + { NULL } +}; + +static void +xform_adjust_exec (const struct pn_actuator_option *opts, + gpointer data) +{ + glTranslatef(opts[0].val.fval, opts[1].val.fval, opts[2].val.fval); +} + +struct pn_actuator_desc builtin_xform_adjust = +{ + "xform_adjust", "Adjust", + "Rotates and radially scales the image", + 0, xform_adjust_opts, + NULL, NULL, xform_adjust_exec +}; + +#if 0 +/* **************** xform_movement **************** */ +struct pn_actuator_option_desc xform_movement_opts[] = +{ + { "formula", "The formula to evaluate.", + OPT_TYPE_STRING, { sval: "r = r * cos(r); d = sin(d);" } }, + { "polar", "Whether the coordinates are polar or not.", + OPT_TYPE_BOOLEAN, { bval: TRUE } }, + { NULL } +}; + +typedef struct { + int width, height; /* Previous width and height. */ + struct xform_vector *vfield; +} PnMovementData; + +static void +xform_movement_init (gpointer *data) +{ + *data = g_new0(PnMovementData, 1); +} + +static void +xform_movement_cleanup (gpointer data) +{ + PnMovementData *d = (PnMovementData *) data; + + if (d) + { + if (d->vfield) + g_free (d->vfield); + g_free (d); + } +} + +inline void +xform_trans_polar (struct xform_vector *vfield, gint x, gint y, + expression_t *expr, symbol_dict_t *dict) +{ + gdouble *rf, *df; + gdouble xf, yf; + gint xn, yn; + + rf = dict_variable(dict, "r"); + df = dict_variable(dict, "d"); + + /* Points (xf, yf) must be in a (-1..1) square. */ + xf = 2.0 * x / (pn_image_data->width - 1) - 1.0; + yf = 2.0 * y / (pn_image_data->height - 1) - 1.0; + + /* Now, convert to polar coordinates r and d. */ + *rf = hypot(xf, yf); + *df = atan2(yf, xf); + + /* Run the script. */ + expr_execute(expr, dict); + + /* Back to (-1..1) square. */ + xf = (*rf) * cos ((*df)); + yf = (*rf) * sin ((*df)); + + /* Convert back to physical coordinates. */ + xn = (int)(((xf + 1.0) * (pn_image_data->width - 1) / 2) + 0.5); + yn = (int)(((yf + 1.0) * (pn_image_data->height - 1) / 2) + 0.5); + + if (xn < 0 || xn >= pn_image_data->width || yn < 0 || yn >= pn_image_data->height) + { + xn = x; yn = y; + } + + xfvec (xn, yn, &vfield[PN_IMG_INDEX (x, y)]); +} + +inline void +xform_trans_literal (struct xform_vector *vfield, gint x, gint y, + expression_t *expr, symbol_dict_t *dict) +{ + gdouble rf, df; + gdouble *xf, *yf; + gint xn, yn; + + xf = dict_variable(dict, "x"); + yf = dict_variable(dict, "y"); + + /* Points (xf, yf) must be in a (-1..1) square. */ + *xf = 2.0 * x / (pn_image_data->width - 1) - 1.0; + *yf = 2.0 * y / (pn_image_data->height - 1) - 1.0; + + /* Run the script. */ + expr_execute(expr, dict); + + /* Convert back to physical coordinates. */ + xn = (int)(((*xf + 1.0) * (pn_image_data->width - 1) / 2) + 0.5); + yn = (int)(((*yf + 1.0) * (pn_image_data->height - 1) / 2) + 0.5); + + if (xn < 0 || xn >= pn_image_data->width || yn < 0 || yn >= pn_image_data->height) + { + xn = x; yn = y; + } + + xfvec (xn, yn, &vfield[PN_IMG_INDEX (x, y)]); +} + +static void +xform_movement_exec (const struct pn_actuator_option *opts, + gpointer odata) +{ + PnMovementData *d = (PnMovementData *) odata; + void (*transform_func)(struct xform_vector *, gint, gint, expression_t *, symbol_dict_t *) = + opts[1].val.bval == TRUE ? xform_trans_polar : xform_trans_literal; + + if (d->width != pn_image_data->width + || d->height != pn_image_data->height) + { + gint i, j; + gdouble *rf, *df; + gdouble xf, yf; + gint xn, yn; + expression_t *expr; + symbol_dict_t *dict; + + d->width = pn_image_data->width; + d->height = pn_image_data->height; + + if (d->vfield) + { + g_free (d->vfield); + d->vfield = NULL; + } + + if (opts[0].val.sval == NULL) + return; + + dict = dict_new(); + expr = expr_compile_string(opts[0].val.sval, dict); + if (!expr) + { + dict_free(dict); + return; + } + + rf = dict_variable(dict, "r"); + df = dict_variable(dict, "d"); + + d->vfield = g_malloc (sizeof(struct xform_vector) + * d->width * d->height); + + for (j = 0; j < pn_image_data->height; j++) + for (i = 0; i < pn_image_data->width; i++) + { + transform_func(d->vfield, i, j, expr, dict); + } + } + + apply_xform (d->vfield); + pn_swap_surfaces (); +} + +struct pn_actuator_desc builtin_xform_movement = +{ + "xform_movement", "Movement Transform", + "A customizable blitter.", + 0, xform_movement_opts, + xform_movement_init, xform_movement_cleanup, xform_movement_exec +}; + +/* **************** xform_dynmovement **************** */ +/* FIXME: really slow */ +struct pn_actuator_option_desc xform_dynmovement_opts[] = +{ + { "init_script", "The formula to evaluate on init.", + OPT_TYPE_STRING, { sval: "" } }, + { "beat_script", "The formula to evaluate on each beat.", + OPT_TYPE_STRING, { sval: "" } }, + { "frame_script", "The formula to evaluate on each frame.", + OPT_TYPE_STRING, { sval: "" } }, + { "point_script", "The formula to evaluate.", + OPT_TYPE_STRING, { sval: "d = 0.15;" } }, + { "polar", "Whether or not the coordinates to use are polar.", + OPT_TYPE_BOOLEAN, { bval: TRUE } }, + { NULL } +}; + +typedef struct { + int width, height; /* Previous width and height. */ + expression_t *expr_init; + expression_t *expr_frame; + expression_t *expr_beat; + expression_t *expr_point; + symbol_dict_t *dict; + struct xform_vector *vfield; +} PnDynMovementData; + +static void +xform_dynmovement_init (gpointer *data) +{ + *data = g_new0(PnDynMovementData, 1); +} + +static void +xform_dynmovement_cleanup (gpointer data) +{ + PnDynMovementData *d = (PnDynMovementData *) data; + + if (d) + { + if (d->expr_init) + expr_free (d->expr_init); + if (d->expr_beat) + expr_free (d->expr_beat); + if (d->expr_frame) + expr_free (d->expr_frame); + if (d->expr_point) + expr_free (d->expr_point); + if (d->dict) + dict_free (d->dict); + if (d->vfield) + g_free (d->vfield); + g_free (d); + } +} + +static void +xform_dynmovement_exec (const struct pn_actuator_option *opts, + gpointer odata) +{ + PnDynMovementData *d = (PnDynMovementData *) odata; + gint i, j; + gdouble *rf, *df; + gdouble xf, yf; + gint xn, yn; + void (*transform_func)(struct xform_vector *, gint, gint, expression_t *, symbol_dict_t *) = + opts[4].val.bval == TRUE ? xform_trans_polar : xform_trans_literal; + gboolean make_table = FALSE; + + if (d->width != pn_image_data->width + || d->height != pn_image_data->height) + { + d->width = pn_image_data->width; + d->height = pn_image_data->height; + + if (d->vfield) + { + g_free (d->vfield); + d->vfield = NULL; + } + + if (opts[3].val.sval == NULL) + return; + + if (!d->dict) + d->dict = dict_new(); + else + { + dict_free(d->dict); + d->dict = dict_new(); + } + + if (d->expr_init) + { + expr_free(d->expr_init); + d->expr_init = NULL; + } + + /* initialize */ + d->expr_init = expr_compile_string(opts[0].val.sval, d->dict); + + if (d->expr_init != NULL) + { + expr_execute(d->expr_init, d->dict); + } + + d->expr_beat = expr_compile_string(opts[1].val.sval, d->dict); + d->expr_frame = expr_compile_string(opts[2].val.sval, d->dict); + d->expr_point = expr_compile_string(opts[3].val.sval, d->dict); + + d->vfield = g_malloc (sizeof(struct xform_vector) + * d->width * d->height); + + make_table = TRUE; + } + + rf = dict_variable(d->dict, "r"); + df = dict_variable(d->dict, "d"); + + if (*opts[2].val.sval != '\0' || pn_new_beat) + make_table = TRUE; + + /* run the on-frame script. */ + if (make_table == TRUE) + { + if (d->expr_beat != NULL) + expr_execute(d->expr_beat, d->dict); + + if (d->expr_frame != NULL) + expr_execute(d->expr_frame, d->dict); + + for (j = 0; j < pn_image_data->height; j++) + for (i = 0; i < pn_image_data->width; i++) + { + transform_func(d->vfield, i, j, d->expr_point, d->dict); + } + } + + apply_xform (d->vfield); + pn_swap_surfaces (); +} + +struct pn_actuator_desc builtin_xform_dynmovement = +{ + "xform_dynmovement", "Dynamic Movement Transform", + "A customizable blitter.", + 0, xform_dynmovement_opts, + xform_dynmovement_init, xform_dynmovement_cleanup, xform_dynmovement_exec +}; +#endif diff -r 371d9450c631 -r 319930001524 src/pls/pls.c --- a/src/pls/pls.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/pls/pls.c Wed Oct 17 23:09:54 2007 +0300 @@ -44,17 +44,17 @@ guint i, count, added_count = 0; gchar line_key[10], title_key[10]; gchar *line, *title; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); g_return_if_fail(filename != NULL); if (!aud_str_has_suffix_nocase(filename, ".pls")) return; - INIFile *inifile = open_ini_file(filename); - if (!(line = read_ini_string(inifile, "playlist", "NumberOfEntries"))) + INIFile *inifile = aud_open_ini_file(filename); + if (!(line = aud_read_ini_string(inifile, "playlist", "NumberOfEntries"))) { - close_ini_file(inifile); + aud_close_ini_file(inifile); return; } @@ -63,7 +63,7 @@ for (i = 1; i <= count; i++) { g_snprintf(line_key, sizeof(line_key), "File%d", i); - if ((line = read_ini_string(inifile, "playlist", line_key))) + if ((line = aud_read_ini_string(inifile, "playlist", line_key))) { gchar *uri = g_filename_to_uri(line, NULL, NULL); @@ -72,17 +72,17 @@ else uri = line; - if (cfg.use_pl_metadata) + if (aud_cfg->use_pl_metadata) { g_snprintf(title_key, sizeof(title_key), "Title%d", i); - if ((title = read_ini_string(inifile, "playlist", title_key))) - playlist_load_ins_file(playlist, uri, filename, pos, title, -1); + if ((title = aud_read_ini_string(inifile, "playlist", title_key))) + aud_playlist_load_ins_file(playlist, uri, filename, pos, title, -1); else - playlist_load_ins_file(playlist, uri, filename, pos, NULL, -1); + aud_playlist_load_ins_file(playlist, uri, filename, pos, NULL, -1); } else - playlist_load_ins_file(playlist, uri, filename, pos, NULL, -1); + aud_playlist_load_ins_file(playlist, uri, filename, pos, NULL, -1); added_count++; @@ -93,7 +93,7 @@ } } - close_ini_file(inifile); + aud_close_ini_file(inifile); } static void @@ -101,13 +101,13 @@ { GList *node; VFSFile *file = aud_vfs_fopen(filename, "wb"); - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); g_return_if_fail(file != NULL); g_return_if_fail(playlist != NULL); aud_vfs_fprintf(file, "[playlist]\n"); - aud_vfs_fprintf(file, "NumberOfEntries=%d\n", playlist_get_length(playlist)); + aud_vfs_fprintf(file, "NumberOfEntries=%d\n", aud_playlist_get_length(playlist)); PLAYLIST_LOCK(playlist); diff -r 371d9450c631 -r 319930001524 src/projectm-1.0/video_init.cxx --- a/src/projectm-1.0/video_init.cxx Wed Oct 17 23:09:30 2007 +0300 +++ b/src/projectm-1.0/video_init.cxx Wed Oct 17 23:09:54 2007 +0300 @@ -54,8 +54,9 @@ } // printf("Screen Resolution: %d x %d\n", info->current_w, info->current_h); - *fvw = info->current_w; - *fvh = info->current_h; +// XXX + *fvw = w; + *fvh = h; bpp = info->vfmt->BitsPerPixel; //SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 ); //SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 ); diff -r 371d9450c631 -r 319930001524 src/pulse_audio/pulse_audio.c --- a/src/pulse_audio/pulse_audio.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/pulse_audio/pulse_audio.c Wed Oct 17 23:09:54 2007 +0300 @@ -72,10 +72,10 @@ static char t[256]; gint session, pos; char *str, *u; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); - pos = playlist_get_position(playlist); - if (!(str = playlist_get_songtitle(playlist, pos))) + pos = aud_playlist_get_position(playlist); + if (!(str = aud_playlist_get_songtitle(playlist, pos))) return "Playback Stream"; snprintf(t, sizeof(t), "%s", u = pa_locale_to_utf8(str)); diff -r 371d9450c631 -r 319930001524 src/scrobbler/plugin.c --- a/src/scrobbler/plugin.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/scrobbler/plugin.c Wed Oct 17 23:09:54 2007 +0300 @@ -68,9 +68,9 @@ return aud_str_has_prefix_nocase(a, "http://") || aud_str_has_prefix_nocase(a, "https://"); } -static void hook_playback_begin(gpointer hook_data, gpointer user_data) +static void aud_hook_playback_begin(gpointer aud_hook_data, gpointer user_data) { - PlaylistEntry *entry = (PlaylistEntry *) hook_data; + PlaylistEntry *entry = (PlaylistEntry *) aud_hook_data; g_return_if_fail(entry != NULL); @@ -101,7 +101,7 @@ GError **moo = NULL; cfgdlg = create_cfgdlg(); - prefswin_page_new(cfgdlg, "Scrobbler", DATA_DIR "/images/audioscrobbler.png"); + aud_prefswin_page_new(cfgdlg, "Scrobbler", DATA_DIR "/images/audioscrobbler.png"); if ((cfgfile = bmp_cfg_db_open()) != NULL) { bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "username", @@ -165,14 +165,14 @@ return; } - hook_associate("playback begin", hook_playback_begin, NULL); + aud_hook_associate("playback begin", aud_hook_playback_begin, NULL); pdebug("plugin started", DEBUG); } static void cleanup(void) { - prefswin_page_destroy(cfgdlg); + aud_prefswin_page_destroy(cfgdlg); if (!sc_going && !ge_going) return; @@ -204,7 +204,7 @@ sc_cleaner(); gerpok_sc_cleaner(); - hook_dissociate("playback begin", hook_playback_begin); + aud_hook_dissociate("playback begin", aud_hook_playback_begin); } static void *xs_thread(void *data __attribute__((unused))) @@ -234,8 +234,8 @@ pdebug("Submitting song.", DEBUG); - playlist = playlist_get_active(); - tuple = playlist_get_tuple(playlist, playlist_get_position(playlist)); + playlist = aud_playlist_get_active(); + tuple = aud_playlist_get_tuple(playlist, aud_playlist_get_position(playlist)); if (tuple == NULL) continue; diff -r 371d9450c631 -r 319930001524 src/song_change/song_change.c --- a/src/song_change/song_change.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/song_change/song_change.c Wed Oct 17 23:09:54 2007 +0300 @@ -109,52 +109,52 @@ if (cmd && strlen(cmd) > 0) { - formatter = formatter_new(); + formatter = aud_formatter_new(); str = audacious_drct_pl_get_title(pos); if (str) { temp = aud_escape_shell_chars(str); - formatter_associate(formatter, 's', temp); - formatter_associate(formatter, 'n', temp); + aud_formatter_associate(formatter, 's', temp); + aud_formatter_associate(formatter, 'n', temp); g_free(str); g_free(temp); } else { - formatter_associate(formatter, 's', ""); - formatter_associate(formatter, 'n', ""); + aud_formatter_associate(formatter, 's', ""); + aud_formatter_associate(formatter, 'n', ""); } if (current_file) { temp = aud_escape_shell_chars(current_file); - formatter_associate(formatter, 'f', temp); + aud_formatter_associate(formatter, 'f', temp); g_free(temp); } else - formatter_associate(formatter, 'f', ""); + aud_formatter_associate(formatter, 'f', ""); sprintf(numbuf, "%02d", pos + 1); - formatter_associate(formatter, 't', numbuf); + aud_formatter_associate(formatter, 't', numbuf); length = audacious_drct_pl_get_time(pos); if (length != -1) { sprintf(numbuf, "%d", length); - formatter_associate(formatter, 'l', numbuf); + aud_formatter_associate(formatter, 'l', numbuf); } else - formatter_associate(formatter, 'l', "0"); + aud_formatter_associate(formatter, 'l', "0"); audacious_drct_get_info(&rate, &freq, &nch); sprintf(numbuf, "%d", rate); - formatter_associate(formatter, 'r', numbuf); + aud_formatter_associate(formatter, 'r', numbuf); sprintf(numbuf, "%d", freq); - formatter_associate(formatter, 'F', numbuf); + aud_formatter_associate(formatter, 'F', numbuf); sprintf(numbuf, "%d", nch); - formatter_associate(formatter, 'c', numbuf); + aud_formatter_associate(formatter, 'c', numbuf); playing = audacious_drct_get_playing(); sprintf(numbuf, "%d", playing); - formatter_associate(formatter, 'p', numbuf); - shstring = formatter_format(formatter, cmd); - formatter_destroy(formatter); + aud_formatter_associate(formatter, 'p', numbuf); + shstring = aud_formatter_format(formatter, cmd); + aud_formatter_destroy(formatter); if (shstring) { @@ -183,10 +183,10 @@ static void cleanup(void) { - hook_dissociate("playback begin", songchange_playback_begin); - hook_dissociate("playback end", songchange_playback_end); - hook_dissociate("playlist end reached", songchange_playlist_eof); - hook_dissociate( "playlist set info" , songchange_playback_ttc); + aud_hook_dissociate("playback begin", songchange_playback_begin); + aud_hook_dissociate("playback end", songchange_playback_end); + aud_hook_dissociate("playlist end reached", songchange_playlist_eof); + aud_hook_dissociate( "playlist set info" , songchange_playback_ttc); if ( ttc_prevs != NULL ) { @@ -206,7 +206,7 @@ cmd_line_ttc = NULL; signal(SIGCHLD, SIG_DFL); - prefswin_page_destroy(configure_vbox); + aud_prefswin_page_destroy(configure_vbox); } static void save_and_close(GtkWidget *w, gpointer data) @@ -450,16 +450,16 @@ read_config(); configure_vbox = configure(); - prefswin_page_new(configure_vbox, "Song Change", DATA_DIR "/images/plugins.png"); + aud_prefswin_page_new(configure_vbox, "Song Change", DATA_DIR "/images/plugins.png"); - hook_associate("playback begin", songchange_playback_begin, NULL); - hook_associate("playback end", songchange_playback_end, NULL); - hook_associate("playlist end reached", songchange_playlist_eof, NULL); + aud_hook_associate("playback begin", songchange_playback_begin, NULL); + aud_hook_associate("playback end", songchange_playback_end, NULL); + aud_hook_associate("playlist end reached", songchange_playlist_eof, NULL); ttc_prevs = g_malloc0(sizeof(songchange_playback_ttc_prevs_t)); ttc_prevs->title = NULL; ttc_prevs->filename = NULL; - hook_associate( "playlist set info" , songchange_playback_ttc , ttc_prevs ); + aud_hook_associate( "playlist set info" , songchange_playback_ttc , ttc_prevs ); configure_ok_cb(NULL, NULL); } @@ -495,7 +495,7 @@ static void songchange_playback_ttc(gpointer plentry_gp, gpointer prevs_gp) { - if ( ( ip_data.playing ) && ( strcmp(cmd_line_ttc,"") ) ) + if ( ( aud_ip_state->playing ) && ( strcmp(cmd_line_ttc,"") ) ) { songchange_playback_ttc_prevs_t *prevs = prevs_gp; PlaylistEntry *pl_entry = plentry_gp; diff -r 371d9450c631 -r 319930001524 src/statusicon/si.c --- a/src/statusicon/si.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/statusicon/si.c Wed Oct 17 23:09:54 2007 +0300 @@ -176,7 +176,7 @@ break; case SI_AUDACIOUS_PLAYBACK_CTRL_EJECT: - mainwin_eject_pushed(); + audacious_drct_eject(); break; } } diff -r 371d9450c631 -r 319930001524 src/statusicon/si_ui.c --- a/src/statusicon/si_ui.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/statusicon/si_ui.c Wed Oct 17 23:09:54 2007 +0300 @@ -51,7 +51,7 @@ gchar *filename; gpointer evbox; } -si_hook_tchange_prevs_t; +si_aud_hook_tchange_prevs_t; static AudGtkTrayIcon * @@ -145,14 +145,14 @@ if ( GPOINTER_TO_INT(g_object_get_data( G_OBJECT(evbox) , "timer_active" )) == 1 ) { Tuple *tuple; - Playlist *pl_active = playlist_get_active(); - gint pos = playlist_get_position(pl_active); + Playlist *pl_active = aud_playlist_get_active(); + gint pos = aud_playlist_get_position(pl_active); GtkWidget *popup = g_object_get_data( G_OBJECT(evbox) , "popup" ); - tuple = playlist_get_tuple( pl_active , pos ); + tuple = aud_playlist_get_tuple( pl_active , pos ); if ( ( tuple == NULL ) || ( aud_tuple_get_int(tuple, FIELD_LENGTH, NULL) < 1 ) ) { - gchar *title = playlist_get_songtitle( pl_active , pos ); + gchar *title = aud_playlist_get_songtitle( pl_active , pos ); audacious_fileinfopopup_show_from_title( popup , title ); g_free( title ); } @@ -204,7 +204,7 @@ static void -si_ui_statusicon_cb_hook_pbstart ( gpointer plentry_gp , gpointer evbox ) +si_ui_statusicon_cb_aud_hook_pbstart ( gpointer plentry_gp , gpointer evbox ) { if ( ( GPOINTER_TO_INT(g_object_get_data( G_OBJECT(evbox) , "popup_active" )) == 1 ) && ( plentry_gp != NULL ) ) @@ -216,9 +216,9 @@ static void -si_ui_statusicon_cb_hook_tchange ( gpointer plentry_gp , gpointer prevs_gp ) +si_ui_statusicon_cb_aud_hook_tchange ( gpointer plentry_gp , gpointer prevs_gp ) { - si_hook_tchange_prevs_t *prevs = prevs_gp; + si_aud_hook_tchange_prevs_t *prevs = prevs_gp; PlaylistEntry *pl_entry = plentry_gp; gboolean upd_pop = FALSE; @@ -464,7 +464,7 @@ si_ui_statusicon_enable ( gboolean enable ) { static GtkWidget *si_evbox = NULL; - static si_hook_tchange_prevs_t *si_hook_tchange_prevs = NULL; + static si_aud_hook_tchange_prevs_t *si_aud_hook_tchange_prevs = NULL; if (( enable == TRUE ) && ( si_evbox == NULL )) { @@ -522,12 +522,12 @@ si_smenu = si_ui_statusicon_smallmenu_create(); g_object_set_data( G_OBJECT(si_evbox) , "smenu" , si_smenu ); - hook_associate( "playback begin" , si_ui_statusicon_cb_hook_pbstart , si_evbox ); - si_hook_tchange_prevs = g_malloc0(sizeof(si_hook_tchange_prevs_t)); - si_hook_tchange_prevs->title = NULL; - si_hook_tchange_prevs->filename = NULL; - si_hook_tchange_prevs->evbox = si_evbox; - hook_associate( "playlist set info" , si_ui_statusicon_cb_hook_tchange , si_hook_tchange_prevs ); + aud_hook_associate( "playback begin" , si_ui_statusicon_cb_aud_hook_pbstart , si_evbox ); + si_aud_hook_tchange_prevs = g_malloc0(sizeof(si_aud_hook_tchange_prevs_t)); + si_aud_hook_tchange_prevs->title = NULL; + si_aud_hook_tchange_prevs->filename = NULL; + si_aud_hook_tchange_prevs->evbox = si_evbox; + aud_hook_associate( "playlist set info" , si_ui_statusicon_cb_aud_hook_tchange , si_aud_hook_tchange_prevs ); return; } @@ -541,12 +541,12 @@ gtk_widget_destroy( GTK_WIDGET(si_evbox) ); gtk_widget_destroy( GTK_WIDGET(si_applet) ); gtk_widget_destroy( GTK_WIDGET(si_smenu) ); - hook_dissociate( "playback begin" , si_ui_statusicon_cb_hook_pbstart ); - hook_dissociate( "playlist set info" , si_ui_statusicon_cb_hook_tchange ); - if ( si_hook_tchange_prevs->title != NULL ) g_free( si_hook_tchange_prevs->title ); - if ( si_hook_tchange_prevs->filename != NULL ) g_free( si_hook_tchange_prevs->filename ); - g_free( si_hook_tchange_prevs ); - si_hook_tchange_prevs = NULL; + aud_hook_dissociate( "playback begin" , si_ui_statusicon_cb_aud_hook_pbstart ); + aud_hook_dissociate( "playlist set info" , si_ui_statusicon_cb_aud_hook_tchange ); + if ( si_aud_hook_tchange_prevs->title != NULL ) g_free( si_aud_hook_tchange_prevs->title ); + if ( si_aud_hook_tchange_prevs->filename != NULL ) g_free( si_aud_hook_tchange_prevs->filename ); + g_free( si_aud_hook_tchange_prevs ); + si_aud_hook_tchange_prevs = NULL; si_smenu = NULL; si_evbox = NULL; } diff -r 371d9450c631 -r 319930001524 src/wavpack/libwavpack.cxx --- a/src/wavpack/libwavpack.cxx Wed Oct 17 23:09:30 2007 +0300 +++ b/src/wavpack/libwavpack.cxx Wed Oct 17 23:09:54 2007 +0300 @@ -426,7 +426,7 @@ ti = aud_tuple_from_WavpackContext(fn, ctx); - displaytitle = aud_tuple_formatter_make_title_string(ti, cfg.gentitle_format); + displaytitle = aud_tuple_formatter_make_title_string(ti, aud_get_gentitle_format()); if (!displaytitle || *displaytitle == '\0') displaytitle = g_strdup(fn); diff -r 371d9450c631 -r 319930001524 src/xspf/xspf.c --- a/src/xspf/xspf.c Wed Oct 17 23:09:30 2007 +0300 +++ b/src/xspf/xspf.c Wed Oct 17 23:09:54 2007 +0300 @@ -129,7 +129,7 @@ xmlNode *nptr; Tuple *tuple; gchar *location = NULL; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); tuple = aud_tuple_new(); @@ -211,7 +211,7 @@ // add file to playlist uri = g_filename_to_uri(location, NULL, NULL); // uri would be NULL if location is already uri. --yaz - playlist_load_ins_file_tuple(playlist, uri ? uri: location, filename, pos, tuple); + aud_playlist_load_ins_file_tuple(playlist, uri ? uri: location, filename, pos, tuple); g_free(uri); pos++; } @@ -237,7 +237,7 @@ static void xspf_find_audoptions(xmlNode *tracklist, const gchar *filename, gint pos) { xmlNode *nptr; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); for (nptr = tracklist->children; nptr != NULL; nptr = nptr->next) { if (nptr->type == XML_ELEMENT_NODE && @@ -304,11 +304,11 @@ } else if (nptr2->type == XML_ELEMENT_NODE && !xmlStrcmp(nptr2->name, (xmlChar *)"title")) { - Playlist *plist = playlist_get_active(); + Playlist *plist = aud_playlist_get_active(); xmlChar *title = xmlNodeGetContent(nptr2); if (title && *title) { - playlist_set_current_name(plist, (gchar*)title); + aud_playlist_set_current_name(plist, (gchar*)title); } xmlFree(title); } else @@ -361,7 +361,7 @@ GList *node; gint baselen = 0; gchar *base = NULL; - Playlist *playlist = playlist_get_active(); + Playlist *playlist = aud_playlist_get_active(); XSDEBUG("filename='%s', pos=%d\n", filename, pos);