Version 0.7.1 imported from Sourceforge into Github.
This commit is contained in:
parent
aebf065e89
commit
b4383d480e
|
@ -0,0 +1,36 @@
|
|||
|
||||
Infinity Visualization Plugin
|
||||
|
||||
Copyright (C) 2000 Julien Carme <julien.carme@acm.org>
|
||||
|
||||
Copyright (C) 2004 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
Actual maintainer.
|
||||
Copyright (C) 2004 John Lightsey with GPL v2 <john@nixnuts.net>
|
||||
Portability fixes and GPL License compliance.
|
||||
Copyright (C) 2004 Jean Delvare <khali@linux-fr.org>
|
||||
Some nice patches.
|
||||
Copyright (C) 2004 Will Tatam <wtatam@premierit.com>
|
||||
Who put online source's RPMs at:
|
||||
http://apt.premierithosting.com/FC2/i386/SRPMS.premierit/
|
||||
Copyright (C) 2000 Haavard Kvaalen <havardk@xmms.org>
|
||||
Who converted the original hand made
|
||||
Makefile to automake/autoconf/libtool.
|
||||
Copyright (C) 2000 Chris Lea <chrislea@luciddesign.com>
|
||||
Made RPMs.
|
||||
Copyright (C) 2000 Mitja Horvat <Mitja.Horvat@hermes.si>
|
||||
Some optimisations.
|
||||
|
||||
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 Library 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.
|
||||
|
|
@ -0,0 +1,512 @@
|
|||
2013-10-18 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
Repository moved to Github
|
||||
https://github.com/dprotti/infinity-plugin
|
||||
|
||||
2011-11-25 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.7.1 ===
|
||||
|
||||
* src/infconfig.c: default frame rate dropped to 15 fps. Default
|
||||
screen size bumped to 512x288
|
||||
* src/renderer.c: re-enabled all keyboard shortcuts to control
|
||||
playing and take snapshots. Shortcuts to control volume not
|
||||
re-enabled yet (for some reason a quick sequence of UP or DOWN's
|
||||
freezes Audacious). Re-enabled support of title displaying.
|
||||
* configure.ac: added dependency for glib-dbus-1 library.
|
||||
|
||||
2011-11-23 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: automake version required bumped to 1.9
|
||||
* po/LINGUAS: added. New versions of gettext require it
|
||||
* src/renderer.c: re-enabled fullscreen mode support
|
||||
|
||||
2011-11-21 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: cleaned up and updated. Vectorization enabled by
|
||||
default (gcc 4 is old enough now). Glib version required bumped to
|
||||
2.8 (for g_mkdir_with_parents())
|
||||
* autogen.sh: added again to the repository, for ease of
|
||||
development
|
||||
* Makefile.in: removed from the repo. I don't know why was there
|
||||
* src/config-dialog.c: translation catalogs bind to the right
|
||||
package name. Updated creation of GtkSpinButton to avoid use of
|
||||
deprecated API. Config window properly configured to be shown on
|
||||
top of the rest of the Audacious windows.
|
||||
|
||||
2009-04-18 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.7.0beta1 ===
|
||||
|
||||
Reborn from hashes...
|
||||
First release for Audacious media player
|
||||
|
||||
2005-07-18 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.6.2 ===
|
||||
|
||||
* configure.ac: package name changed to xmms-infinity.
|
||||
* autogen.sh: complete rewrite, mostly based on autogen.sh
|
||||
from gnome-common package.
|
||||
* mkinstalldirs: removed from the repository. New autogen.sh
|
||||
will take care of generate one.
|
||||
* src/config-dialog.c:
|
||||
* src/infconfig.c:
|
||||
* src/renderer.c: added option to see the current play title on
|
||||
the plugin's title bar.
|
||||
|
||||
2005-04-19 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: CFLAGS is not overwritten anymore. Added
|
||||
support for vectorization under gcc 4.
|
||||
|
||||
2005-04-15 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.6.1 ===
|
||||
|
||||
* src/types.h: byte type defined as Uint8 instead of guchar.
|
||||
* src/display.c: heavy clenup using splint.
|
||||
* src/renderer.c: idem.
|
||||
* src/main.c: idem.
|
||||
* src/effects.c: now a random seed is set randomly :-)
|
||||
|
||||
2005-04-14 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: version bumped to 0.6.1.
|
||||
|
||||
2005-04-12 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/compute.c: Too many cleanups, thanks to the 'splint' tool.
|
||||
Added compute_quit(). This fix a SERIOUS memory leak.
|
||||
* src/display.c: pcm_data_mutex was released too early!!!!
|
||||
Thanks Valgrind.
|
||||
|
||||
2005-04-12 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: now MMX detection is disabled on non Intel 32
|
||||
bit architectures (I'm not sure if the checks works for AMD64).
|
||||
* src/cputest.c: don't use inline mmx assembly instructions
|
||||
if the target isn't an Intel 32 bit machine and mmx detection
|
||||
was not requested. Fix bugs #1105207 and #1106762.
|
||||
|
||||
2004-11-12 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.6.0 ===
|
||||
|
||||
* src/infconfig.c: config window fully functional.
|
||||
|
||||
2004-11-06 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/main.c: about window now is created using
|
||||
xmms_show_message().
|
||||
* src/renderer.c: usleep() -> xmms_usleep().
|
||||
* src/compute.c: finally fixed bug #1059004 !
|
||||
- mmx_t variables qualified volatile.
|
||||
- punpcklbw_m2r changed to punpcklbw_r2r (dohh).
|
||||
* configure.ac:
|
||||
- version bumped to 0.6.0.
|
||||
- usleep() check removed.
|
||||
- mmx detection enabled by default!
|
||||
|
||||
|
||||
2004-11-04 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: now we test for gtk+ to be at least 1.2.2.
|
||||
|
||||
2004-11-03 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/cputest.c: really define things when MMX_DETECTION
|
||||
is set (problem arises because of the move of MMX_DETECTION
|
||||
to config.h file).
|
||||
* src/compute.c: made mmx section smaller (but still not
|
||||
working :-(.
|
||||
|
||||
2004-11-02 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/renderer.c, src/infconfig.c: more work on config
|
||||
window, specially on FPS setting.
|
||||
|
||||
2004-11-01 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/renderer.c: now we cleanly quit plugin on SDL_QUIT
|
||||
event.
|
||||
* infinity-plugin.glade: added.
|
||||
* src/config-dialog.*: added. New config window builded with
|
||||
Glade.
|
||||
|
||||
2004-10-31 John Lightsey <john@nixnuts.net>
|
||||
|
||||
* src/*: most integral types moved to Glib bit-fixed
|
||||
types, for portability. infinite_states managed to work
|
||||
on big-endian machines.
|
||||
|
||||
2004-09-28 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/gettext.h: we include locale.h if it is available.
|
||||
I hope this fix bug #1015706.
|
||||
|
||||
2004-09-21 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.9 ===
|
||||
|
||||
* configure.ac: now we use AC_CONFIG_HEADER(config.h).
|
||||
* src/display.c: key repeat enabled.
|
||||
* src/renderer.c: allowed xmms control through the
|
||||
standard keys (thanks YoaR suggestion). Faster event
|
||||
check.
|
||||
* src/main.c: a command keys summary are showed on
|
||||
startup. Check if we have setlocale() before to try
|
||||
to enable NLS (thanks bug report from ibpalle@hotmail.com).
|
||||
* src/config.*: renamed to src/infconfig.*.
|
||||
|
||||
2004-06-25 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/display.c: removed atexit(SDL_Quit), because
|
||||
is dangerous on a dynamic library according to SDL
|
||||
docs.
|
||||
|
||||
2004-06-24 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/renderer.c: don't init/set_pcm/quit while we
|
||||
are initializing. Final objective is to remove the
|
||||
bug that makes XMMS crash when we quickly
|
||||
enable/disable the plugin (thanks to Cristian Rosa).
|
||||
|
||||
2004-06-22 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.8 ===
|
||||
|
||||
* PLANS: added.
|
||||
* README.non-i386: removed.
|
||||
* src/config.c: if detect old version config file,
|
||||
update it.
|
||||
* configure.ac: we override user variable CFLAGS.
|
||||
Why? read comment there.
|
||||
|
||||
2004-06-21 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/Makefile.am: changed -O2 to -O3 flag.
|
||||
* src/config.*: t_config made private. Added
|
||||
functionality to manage window position/size.
|
||||
* src/main: on exit, we save window position/size.
|
||||
|
||||
2004-06-19 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/renderer.c: broken resizing when MMX disabled
|
||||
was fixed
|
||||
|
||||
2004-06-20 Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
* src/main.c: version info is added to plugin
|
||||
description
|
||||
* src/display.c: on minimize, correct title is showed
|
||||
|
||||
2004-06-19 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.7 ===
|
||||
|
||||
* configure.ac: sets the prefix to the prefix of
|
||||
the working xmms found.
|
||||
MMX support is now disabled by default.
|
||||
|
||||
2004-06-07 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* building files rebuilded with Autoconf 2.59 and
|
||||
Automake 1.85
|
||||
|
||||
2004-05-21 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: before try to run macros AM_PATH_XMMS
|
||||
and AM_PATH_SDL, check if xmms-config and sdl-config
|
||||
exists, and show an understandable error. Thanks to
|
||||
Cristian Rosa.
|
||||
|
||||
2004-05-19 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: AC_INIT now uses the complete form,
|
||||
the tarball name is now infinity-plugin.
|
||||
AM_INIT_AUTOMAKE modernized to the no-arguments
|
||||
form, AC_OUTPUT modernized to the no-arguments form.
|
||||
Added checking for some headers and const compiler
|
||||
characteristic.
|
||||
|
||||
2004-05-18 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.6 ===
|
||||
|
||||
* configure.ac: Fixed pkg-config macro to look for
|
||||
gtk+ package, not gtk. Thanks to Dennis Smith and
|
||||
Andrew Montgomery.
|
||||
|
||||
* src/renderer.c:
|
||||
- check_events() changed to poll events until the
|
||||
event queue is empty.
|
||||
- usleep() used instead of SDL_Delay().
|
||||
|
||||
2004-05-17 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.5 ===
|
||||
|
||||
* REPORT-BUGS: added
|
||||
|
||||
2004-05-15 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac:
|
||||
- Finally I move the gtk and glib flags to be
|
||||
detected via pkg-config. This fix a building
|
||||
problem on Debian. Thanks to Cristian Rosa.
|
||||
- Show a warning if the arquitecture is bigendian,
|
||||
because Infinity have no been reported to work on this.
|
||||
- Check for long long type support.
|
||||
- Check for inline support.
|
||||
|
||||
* src/display.c: compute_surface() moved to compute
|
||||
module. Now display_quit() destroy the SDL_mutex
|
||||
created with display_init()
|
||||
|
||||
* src/types.h: added
|
||||
|
||||
2004-05-14 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.4 ===
|
||||
|
||||
* src/renderer.c: Come back to SDL_mutex, because
|
||||
of reports about completely deadlock on some systems.
|
||||
Also use SDL_GetTicks() and SDL_Delay() to limit the
|
||||
framerate.
|
||||
Accordingly to SDL docs, calling library functions
|
||||
from within an SDL_thread is unsafe.
|
||||
|
||||
2004-05-13 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.3 ===
|
||||
|
||||
* src/renderer.c: Added mechanism to send go to
|
||||
sleep the renderer while the window is iconified.
|
||||
|
||||
2004-05-12 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/renderer.c: Added an SDL event filter to
|
||||
ignore the VIDEORESIZE event while resizing
|
||||
internal structures. Much better than disable
|
||||
the VIDEORESIZE event with SetEventState
|
||||
|
||||
2004-05-11 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/renderer.c:
|
||||
- Added a mechanism to limit
|
||||
the frames per second rendered. This gives an
|
||||
incredible performance boost on small windows.
|
||||
- Moved finished_mutex to a GStaticMutex, which
|
||||
works inside the renderer body, unlike SDL_mutex
|
||||
(I dunno why, may be because of the special
|
||||
treat of signals on SDL).
|
||||
- Now the entire body of the render is a CS.
|
||||
- Too much code clean up on check_events()
|
||||
- Now interactive mode is enabled via
|
||||
'--enable-debug' configure option.
|
||||
|
||||
* src/display.c:
|
||||
- SDL mutex moved to GStaticMutex
|
||||
- added atexit(SDL_Quit) call
|
||||
- too much error control on SDL calls
|
||||
|
||||
* src/*.c all: strings sended to console, turned
|
||||
non-translatable. In future, only strings showed
|
||||
on windows will be translated.
|
||||
|
||||
2004-05-10 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.2 ===
|
||||
|
||||
* src/compute.c: Added new type vector_field_t.
|
||||
This type have the width and height of the field.
|
||||
The final objective is to remove dependencies on
|
||||
global screen dimension parameters.
|
||||
|
||||
* src/display.c: many functions modified to make
|
||||
use of screen parameters via arguments. Added
|
||||
display_set_pcm_data(), wich is thread safe.
|
||||
|
||||
* src/renderer.c: set SDL to ignore events not
|
||||
relevant to Infinity.
|
||||
|
||||
2004-05-09 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/*.c: changed to show output via g_log using
|
||||
g_message. Glib's docs says that a library must
|
||||
use g_log, not g_print.
|
||||
|
||||
2004-05-08 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac: Added argument to enable/disable
|
||||
compilation of MMX stuff
|
||||
|
||||
* src/renderer.c: some code conditionally compiled
|
||||
depending on MMX_DETECTION macro definition
|
||||
|
||||
* README.non-i386: Added
|
||||
|
||||
2004-05-08 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.1 ===
|
||||
|
||||
* src/renderer.c: now the SDL_VIDEORESIZE is disabled
|
||||
while updating the internal structures, so the
|
||||
user can't resize until Infinity has been effectively
|
||||
resized. This avoid unnecessary resize calculations.
|
||||
|
||||
* src/display.c now display_surface() locks the screen
|
||||
before accesing the pixels, if the surface is on video
|
||||
memory.
|
||||
|
||||
2004-05-07 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
=== Released 0.5.0 ===
|
||||
|
||||
* src/config.c changed default size to 380x240.
|
||||
Added a tooltip to the Scale Factor option,
|
||||
and another to the Ok button explaining how to
|
||||
switch between fullscreen/window mode.
|
||||
|
||||
* README removed comment about the 8bbp mode.
|
||||
I consider this deprecated. Also updated the
|
||||
URL of the project site.
|
||||
|
||||
2004-05-06 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* Feature After all this job, now the plugin could be
|
||||
resized!
|
||||
|
||||
* src/renderer.c Changed to take into account the
|
||||
screen resize event.
|
||||
|
||||
* src/display.c Added display_screen_resize().
|
||||
init_sdl() changed to allocate memory with g_malloc().
|
||||
|
||||
* src/compute.c Added compute_resize(). Changed
|
||||
compute_interpol_new() constructor to
|
||||
compute_interpol_field_new(width, height).
|
||||
|
||||
* Documentation Doxygen support added.
|
||||
The intention is to document the modules interfaces
|
||||
ONLY, so I comment the headers (except main.c, that of
|
||||
course doesn't a main.h). This way I only document
|
||||
that the modules expose, not that is private to them.
|
||||
The internals of the modules are docummented trough
|
||||
traditional comments.
|
||||
|
||||
|
||||
2004-05-01 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* === Released 0.4.0 ===
|
||||
|
||||
* This release was made it on the new Infinity's
|
||||
SourceForge site
|
||||
|
||||
2004-04-13 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* configure.ac added macro to require autoconf >= 2.57 to
|
||||
reconfigure the package
|
||||
|
||||
* src/renderer.c eliminated global variable vector_field
|
||||
|
||||
* src/display.c added private global variable vector_field
|
||||
and blur() modified to use it. compute_surface() make it inline.
|
||||
Too much code cleanup
|
||||
|
||||
* src/compute.c added constructor and destructor for
|
||||
t_interpol datatype
|
||||
|
||||
2004-04-04 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* src/main.h removed. All his variables moved to static
|
||||
variables on renderer.c
|
||||
|
||||
* configure.ac AM_PROG_LIBTOOL macro changed for AC_PROG_LIBTOOL.
|
||||
Also AC_DISABLE_STATIC macro used, so now we dont build and
|
||||
install libinfinite.a.
|
||||
|
||||
* src/Makefile.am created the libtool target, so now we automatically
|
||||
update the libtool script if it becomes out-of-date
|
||||
|
||||
2004-04-03 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* too much code cleanup. The final objective is to remove
|
||||
every extern declaration and every non-static global variable,
|
||||
and give a non-cyclic dependency graph between modules
|
||||
|
||||
* src/Makefile.am added options
|
||||
AM_CFLAGS = -Wall -Wimplicit -Wunused -Wmissing-prototypes
|
||||
for to force developer to do things more clear
|
||||
|
||||
* src/config.c added. This is for to get a modular way to
|
||||
query options from any module
|
||||
|
||||
* src/file.h added
|
||||
|
||||
* src/renderer.c now is checked the SDL_QUIT event, so the rende
|
||||
exits when the user close the plugin window
|
||||
|
||||
|
||||
2004-04-02 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* README.FreeBSD file added
|
||||
|
||||
* HISTORY file added
|
||||
|
||||
* New translations (es es_AR) in fact are both the
|
||||
same. If some spanish want to maintain the 'es'
|
||||
translation, are welcome.
|
||||
|
||||
2004-03-31 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.am (SUBDIRS): Add m4.
|
||||
(ACLOCAL_AMFLAGS): New variable.
|
||||
(EXTRA_DIST): New variable.
|
||||
* configure.ac (AC_OUTPUT): Add po/Makefile.in,
|
||||
|
||||
2004-03-27 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* Sources moved to src subdirectory
|
||||
|
||||
* configure.in moved to configure.ac
|
||||
|
||||
* building files rebuilded with autoconf 2.57 and automake 1.7
|
||||
|
||||
* configure.ac: checking for AC_C_VOLATILE in compiler characteristics
|
||||
|
||||
* src/cputest.h added
|
||||
|
||||
* src/mmx.h added
|
||||
|
||||
* src/main.c: included cputest.h and inlined assembler for to check
|
||||
for MMX instructions presence. This is used on function plug_init for to
|
||||
launch renderer_mmx() thread if this instructions are available.
|
||||
Added comments (in C style, not C++ style).
|
||||
|
||||
* src/renderer.c: function renderer_mmx() added
|
||||
|
||||
* src/display.c function blur_mmx() added
|
||||
|
||||
* src/display.c function compute_surface_mmx() added
|
||||
|
||||
* src/display.c: added SDL_DOUBLEBUF to VIDEO_FLAGS mask and then in
|
||||
function display_surface() the call SDL_UpdateRect(screen, 0, 0, 0, 0)
|
||||
changed for SDL_Flip(screen), which is more efficient if the video board
|
||||
supports doublebuffer flipping in hardware, otherwise the call is
|
||||
equivalent to SDL_UpdateRect(screen, 0, 0, 0, 0).
|
||||
|
||||
* src/display.c: plot1 and plot2 functions redefined as macros
|
||||
|
||||
* src/display.c: added the call SDL_WM_SetCaption ("infinity", NULL) for
|
||||
to set the window title to "infinity".
|
||||
|
||||
v 0.2: Some optimisations, less bugs, better synchronisation, more options.
|
||||
|
||||
v 0.11-2: Infinity now uses automake/autoconf, its installation should not
|
||||
be a problem anymore.
|
||||
|
||||
v 0.11: Screenshots, better Makefile.
|
||||
|
||||
v 0.1: Original version.
|
|
@ -0,0 +1,993 @@
|
|||
# Doxyfile 1.2.18
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
#
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
PROJECT_NAME = Infinity Plugin
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 0.5.0
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = docs
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
|
||||
# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
|
||||
# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese,
|
||||
# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available.
|
||||
# Private class members and static file members will be hidden unless
|
||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||
|
||||
EXTRACT_ALL = NO
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
||||
# defined locally in source files will be included in the documentation.
|
||||
# If set to NO only classes defined in header files are included.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these class will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
|
||||
# friend (class|struct|union) declarations.
|
||||
# If set to NO (the default) these declarations will be included in the
|
||||
# documentation.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
# Set to NO to disable this.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||
# the brief description of a member or function before the detailed description.
|
||||
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
|
||||
# members of a class in the documentation of that class as if those members were
|
||||
# ordinary class members. Constructors, destructors and assignment operators of
|
||||
# the base classes will not be shown.
|
||||
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||
# path before files name in the file list and in the header files. If set
|
||||
# to NO the shortest path that makes the file name unique will be used.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||
# can be used to strip a user defined part of the path. Stripping is
|
||||
# only done if one of the specified strings matches the left-hand part of
|
||||
# the path. It is allowed to use relative paths in the argument list.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation
|
||||
# that is typed after a \internal command is included. If the tag is set
|
||||
# to NO (the default) then the documentation will be excluded.
|
||||
# Set it to YES to include the internal documentation.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||
# file names in lower case letters. If set to YES upper case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# users are adviced to set this option to NO.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
|
||||
# (but less readable) file names. This can be useful is your file systems
|
||||
# doesn't support long names like on DOS, Mac, or CD-ROM.
|
||||
|
||||
SHORT_NAMES = NO
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will show members with their full class and namespace scopes in the
|
||||
# documentation. If set to YES the scope will be hidden.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||
# will generate a verbatim copy of the header file for each class for
|
||||
# which an include is specified. Set to NO to disable this.
|
||||
|
||||
VERBATIM_HEADERS = NO
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||
# will put list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the JavaDoc
|
||||
# comments will behave just like the Qt-style comments (thus requiring an
|
||||
# explict @brief command for a brief description.
|
||||
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
|
||||
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
|
||||
# comments) as a brief description. This used to be the default behaviour.
|
||||
# The new default is to treat a multi-line C++ comment block as a detailed
|
||||
# description. Set this tag to YES if you prefer the old behaviour instead.
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
|
||||
# will output the detailed description near the top, like JavaDoc.
|
||||
# If set to NO, the detailed description appears after the member
|
||||
# documentation.
|
||||
|
||||
DETAILS_AT_TOP = NO
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
# reimplements.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||
# will sort the (detailed) documentation of file and class members
|
||||
# alphabetically by member name. If set to NO the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||
|
||||
TAB_SIZE = 8
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the todo list. This list is created by putting \todo
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the test list. This list is created by putting \test
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TESTLIST = YES
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the bug list. This list is created by putting \bug
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_BUGLIST = YES
|
||||
|
||||
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation.
|
||||
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
|
||||
# This tag can be used to specify a number of aliases that acts
|
||||
# as commands in the documentation. An alias has the form "name=value".
|
||||
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||
# will result in a user defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
# The ENABLED_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
|
||||
# the initial value of a variable or define consist of for it to appear in
|
||||
# the documentation. If the initializer consists of more lines than specified
|
||||
# here it will be hidden. Use a value of 0 to hide initializers completely.
|
||||
# The appearance of the initializer of individual variables and defines in the
|
||||
# documentation can be controlled using \showinitializer or \hideinitializer
|
||||
# command in the documentation regardless of this setting.
|
||||
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C.
|
||||
# For instance some of the names that are used will be different. The list
|
||||
# of all members will be omitted, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
|
||||
# only. Doxygen will then generate output that is more tailored for Java.
|
||||
# For instance namespaces will be presented as packages, qualified scopes
|
||||
# will look different, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
|
||||
# at the bottom of the documentation of classes and structs. If set to YES the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
# NO is used.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||
# automatically be disabled.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||
# tags, which will be replaced by the file and line number from which the
|
||||
# warning originated and the warning text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like "myfile.cpp" or
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = /home/duilio/Projects/infinity/src
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank the following patterns are tested:
|
||||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
|
||||
# *.h++ *.idl *.odl
|
||||
|
||||
FILE_PATTERNS = *.h main.c
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
# If left blank NO is used.
|
||||
|
||||
RECURSIVE = NO
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE =
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
|
||||
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
|
||||
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
EXAMPLE_PATTERNS =
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude
|
||||
# commands irrespective of the value of the RECURSIVE tag.
|
||||
# Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||
# input file. Doxygen will then use the output that the filter program writes
|
||||
# to standard output.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||
# be generated. Documented entities will be cross-referenced with these sources.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented
|
||||
# functions referencing it will be listed.
|
||||
|
||||
REFERENCED_BY_RELATION = YES
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented entities
|
||||
# called/used by that function will be listed.
|
||||
|
||||
REFERENCES_RELATION = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = NO
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
|
||||
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
|
||||
# doxygen will generate files with .html extension.
|
||||
|
||||
HTML_FILE_EXTENSION = .html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
|
||||
# be used to specify the file name of the resulting .chm file. You
|
||||
# can add a path in front of the file if the result should not be
|
||||
# written to the html output dir.
|
||||
|
||||
CHM_FILE =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
|
||||
# be used to specify the location (absolute path including file name) of
|
||||
# the HTML help compiler (hhc.exe). If non empty doxygen will try to run
|
||||
# the html help compiler on the generated index.hhp.
|
||||
|
||||
HHC_LOCATION =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||
# controls whether a binary table of contents is generated (YES) or a
|
||||
# normal table of contents (NO) in the .chm file.
|
||||
|
||||
BINARY_TOC = NO
|
||||
|
||||
# The TOC_EXPAND flag can be set to YES to add extra items for group members
|
||||
# to the contents of the Html help documentation and to the tree view.
|
||||
|
||||
TOC_EXPAND = NO
|
||||
|
||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||
# top of each HTML page. The value NO (the default) enables the index and
|
||||
# the value YES disables it.
|
||||
|
||||
DISABLE_INDEX = NO
|
||||
|
||||
# This tag can be used to set the number of enum values (range [1..20])
|
||||
# that doxygen will group on one line in the generated HTML documentation.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
|
||||
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
|
||||
# generated containing a tree-like index structure (just like the one that
|
||||
# is generated for HTML Help). For this to work a browser that supports
|
||||
# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
|
||||
# or Internet explorer 4.0+). Note that for large projects the tree generation
|
||||
# can take a very long time. In such cases it is better to disable this feature.
|
||||
# Windows users are probably better off using the HTML help feature.
|
||||
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||
# used to set the initial width (in pixels) of the frame in which the tree
|
||||
# is shown.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
|
||||
# generate index for LaTeX. If left blank `makeindex' will be used as the
|
||||
# default command name.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||
# higher quality PDF documentation.
|
||||
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||
# The RTF output is optimised for Word 97 and may not look very pretty with
|
||||
# other RTF readers or editors.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||
# RTF documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||
# will contain hyperlink fields. The RTF file will
|
||||
# contain links (just like the HTML output) instead of page references.
|
||||
# This makes the output suitable for online browsing using WORD or other
|
||||
# programs which support those fields.
|
||||
# Note: wordpad (write) and others do not support links.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# config file, i.e. a series of assigments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an rtf document.
|
||||
# Syntax is similar to doxygen's config file.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||
# generate man pages
|
||||
|
||||
GENERATE_MAN = NO
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `man' will be used as the default path.
|
||||
|
||||
MAN_OUTPUT = man
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to
|
||||
# the generated man pages (default is the subroutine's section .3)
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
|
||||
# then it will generate one additional man file for each entity
|
||||
# documented in the real man page(s). These additional files
|
||||
# only source the real man page, but without them the man command
|
||||
# would be unable to find the correct page. The default is NO.
|
||||
|
||||
MAN_LINKS = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_XML tag is set to YES Doxygen will
|
||||
# generate an XML file that captures the structure of
|
||||
# the code including all documentation. Note that this
|
||||
# feature is still experimental and incomplete at the
|
||||
# moment.
|
||||
|
||||
GENERATE_XML = NO
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
|
||||
# generate an AutoGen Definitions (see autogen.sf.net) file
|
||||
# that captures the structure of the code including all
|
||||
# documentation. Note that this feature is still experimental
|
||||
# and incomplete at the moment.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||
# evaluate all C-preprocessor directives found in the sources and include
|
||||
# files.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||
# names in the source code. If set to NO (the default) only conditional
|
||||
# compilation will be performed. Macro expansion can be done in a controlled
|
||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||
|
||||
MACRO_EXPANSION = NO
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
|
||||
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||
# be used.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
# gcc). The argument of the tag is a list of macros of the form: name
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# omitted =1 is assumed.
|
||||
|
||||
PREDEFINED =
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
# The macro definition that is found in the sources will be used.
|
||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||
# on a line, have an all uppercase name, and do not end with a semicolon. Such
|
||||
# function macros are typically used for boiler-plate code, and will confuse the
|
||||
# parser if not removed.
|
||||
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
# will be listed.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
|
||||
# in the modules index. If set to NO, only the current project's groups will
|
||||
# be listed.
|
||||
|
||||
EXTERNAL_GROUPS = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||
# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
|
||||
# super classes. Setting the tag to NO turns the diagrams off. Note that this
|
||||
# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
|
||||
# recommended to install and use dot, since it yield more powerful graphs.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will hide
|
||||
# inheritance and usage relations if the target is undocumented
|
||||
# or is not a class.
|
||||
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = YES
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
# the CLASS_DIAGRAMS tag to NO.
|
||||
|
||||
CLASS_GRAPH = NO
|
||||
|
||||
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect implementation dependencies (inheritance, containment, and
|
||||
# class references variables) of the class with other documented classes.
|
||||
|
||||
COLLABORATION_GRAPH = NO
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will show the
|
||||
# relations between templates and their instances.
|
||||
|
||||
TEMPLATE_RELATIONS = NO
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
|
||||
# tags are set to YES then doxygen will generate a graph for each documented
|
||||
# file showing the direct and indirect include dependencies of the file with
|
||||
# other documented files.
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
|
||||
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
|
||||
# documented header file showing the documented files that directly or
|
||||
# indirectly include this file.
|
||||
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||
# will graphical hierarchy of all classes instead of a textual one.
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot. Possible values are png, jpg, or gif
|
||||
# If left blank png will be used.
|
||||
|
||||
DOT_IMAGE_FORMAT = png
|
||||
|
||||
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found on the path.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dot files that are included in the documentation (see the
|
||||
# \dotfile command).
|
||||
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
|
||||
# generate a legend page explaining the meaning of the various boxes and
|
||||
# arrows in the dot generated graphs.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
|
||||
# remove the intermedate dot files that are used to generate
|
||||
# the various graphs.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||
# used. If set to NO the values of all tags below this one will be ignored.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# The CGI_NAME tag should be the name of the CGI script that
|
||||
# starts the search engine (doxysearch) with the correct parameters.
|
||||
# A script with this name will be generated by doxygen.
|
||||
|
||||
CGI_NAME = search.cgi
|
||||
|
||||
# The CGI_URL tag should be the absolute URL to the directory where the
|
||||
# cgi binaries are located. See the documentation of your http daemon for
|
||||
# details.
|
||||
|
||||
CGI_URL =
|
||||
|
||||
# The DOC_URL tag should be the absolute URL to the directory where the
|
||||
# documentation is located. If left blank the absolute path to the
|
||||
# documentation, with file:// prepended to it, will be used.
|
||||
|
||||
DOC_URL =
|
||||
|
||||
# The DOC_ABSPATH tag should be the absolute path to the directory where the
|
||||
# documentation is located. If left blank the directory on the local machine
|
||||
# will be used.
|
||||
|
||||
DOC_ABSPATH =
|
||||
|
||||
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
|
||||
# is installed.
|
||||
|
||||
BIN_ABSPATH = /usr/local/bin/
|
||||
|
||||
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
|
||||
# documentation generated for other projects. This allows doxysearch to search
|
||||
# the documentation for these projects as well.
|
||||
|
||||
EXT_DOC_PATHS =
|
|
@ -0,0 +1,14 @@
|
|||
Actual State of Infinity (instead of history)
|
||||
=============================================
|
||||
|
||||
Written by Duilio Protti on April 2004.
|
||||
|
||||
Infinity was originally written by Julien Carme on 2000.
|
||||
Then the project has been freezed for a couple of years, from 2001 to
|
||||
2004 I guess. I have found this plugin some time ago, I encountered really
|
||||
beautiful and decided to improve it by adding MMX support. That was on
|
||||
October 2003. From then I have tried ocasionally to contact Julien Carme
|
||||
but that was not possible. Recently I have decided to reborn the project
|
||||
because I feel this beauty must be on the desktop of any user that likes this
|
||||
kind of plugins, and for that it must be maintained and must not die.
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
## Process this file with automake to generate a Makefile.in
|
||||
|
||||
#SUBDIRS = m4 po src
|
||||
SUBDIRS = po src
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = mkinstalldirs Doxyfile REPORT-BUGS PLANS po/LINGUAS
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
Release: 0.7.1
|
||||
Date: 2011-11-24
|
||||
|
||||
Re-enabled navigation keys and fullscreen mode, configuration through
|
||||
Preferences dialog, settings saved to disk to keep preferences between
|
||||
different runs, and many other internal updates to catch up with
|
||||
software ecosystem of 2011.
|
||||
|
||||
Release: 0.7.0beta1
|
||||
Date: 2009-04-18
|
||||
|
||||
A long time has past. XMMS is not available anymore in major
|
||||
distros. Infinity then moves to the newer Audacious media
|
||||
player based on the old good XMMS. This beta does not
|
||||
support navigation keys in interactive mode and also does
|
||||
not support configuration of plugin parameters.
|
||||
|
||||
Release: 0.6.2
|
||||
Date: 2005-07-18
|
||||
|
||||
An option was added to let see the current play title on the
|
||||
Infinity's title bar. Also there is support now for the new
|
||||
vectorization features which comes with GCC 4.
|
||||
|
||||
Release: 0.6.1
|
||||
Date: 2005-04-15
|
||||
|
||||
This release is bugfix focused, it doesn't include any new feature.
|
||||
Some modules have been examined in depth using tools like splint and
|
||||
valgrind, many cleanups have been performed and two serious bugs have
|
||||
been fixed: a memory leak and a too early released semaphore. This
|
||||
release also fix bugs #1105207 and #1106762 related to 64 bit
|
||||
architectures.
|
||||
|
||||
Release: 0.6.0
|
||||
Date: 2004-11-12
|
||||
|
||||
Now is possible to change the maximum frames per second through
|
||||
the configure dialog. Also the plugin can be disabled by just
|
||||
closing the plugin window, and all the current parameters are
|
||||
automatically saved. A building problem on Fedora Core 2 have
|
||||
been fixed, and best of all: finally MMX's related bug #1059004
|
||||
have been fixed, so now Infinity comes with MMX support enabled
|
||||
by default.
|
||||
|
||||
Release: 0.5.9
|
||||
Date: 2004-09-21
|
||||
|
||||
Now xmms playback can be controlled when focus is on infinity
|
||||
(even on fullscreen) through the "zxcvb" keys. Also could be
|
||||
set the main volume and songs could be forward/reward positioned,
|
||||
all this with the arrow keys. A major building problem with
|
||||
Fedora Core 2 was fixed.
|
||||
|
||||
Release: 0.5.8
|
||||
Date: 2004-06-22
|
||||
|
||||
Now window size is saved on close. Problem with window
|
||||
resizing when using MMX extensions was fixed. Correct
|
||||
title is showed on iconified window, version info is
|
||||
showed on XMMS configuration window, same config file
|
||||
can be used safely between versions. A development
|
||||
mailing list was created.
|
||||
|
||||
Release: 0.5.7
|
||||
Date: 2004-06-19
|
||||
|
||||
Major bugfix release. Finally the long-live bug that cause
|
||||
colors to be displayed completely broken on some systems
|
||||
was removed, disabling MMX support by default.
|
||||
|
||||
The problem is that XMMS also uses MMX extensions, and
|
||||
floating point registers and MMX registers are overlaped
|
||||
(they are exactly the same). So, if there is a context switch
|
||||
while infinity is using MMX registers (an before to finish
|
||||
and call emms() to come back to fp mode), the processor
|
||||
is yielded to XMMS, and then when the control comes back to
|
||||
infinity, probably the MMX registers are completely trashed,
|
||||
if XMMS has performed any fp operation.
|
||||
|
||||
Release: 0.5.6
|
||||
Date: 2004-05-18
|
||||
|
||||
Two building problems were fixed. A new mechanism to check
|
||||
SDL events and go idle was introduced.
|
||||
|
||||
Release: 0.5.5
|
||||
Date: 2004-05-17
|
||||
|
||||
Minor bugfix release. Fixes a building problem on
|
||||
Debian distro (and may be others). Now uses pkg-config
|
||||
to get the compiler flags. Also fixes a memory leak
|
||||
when enable/disable Infinity from XMMS. Also some code
|
||||
cleanup, a new system to report bugs, and the most
|
||||
important: the recently created web page of Infinity.
|
||||
Take a look at the screenshots there.
|
||||
|
||||
Release: 0.5.4
|
||||
Date: 2004-05-14
|
||||
|
||||
Major bugfix release. Fixes problem of completely
|
||||
deadlock when XMMS go to play on some systems. Also
|
||||
window closing is now disabled, so only XMMS
|
||||
enable/disables the plugin.
|
||||
|
||||
Release: 0.5.3
|
||||
Date: 2004-05-13
|
||||
|
||||
Now, when the window is iconified, the plugin just go
|
||||
sleep and don't consume cpu time. Also, there is a
|
||||
limit on the frames/second that the plugin computes,
|
||||
so if the window is small or the system very fast,
|
||||
just take the timeslice it needs an yields the
|
||||
processor to another process.
|
||||
|
||||
Release: 0.5.1
|
||||
2004-05-10 19:01
|
||||
|
||||
Now the configure script includes the option 'disable-mmx'
|
||||
to turn off the MMX detection support, so the plugin
|
||||
would be compile on any platform.
|
||||
|
||||
Release: 0.5.0
|
||||
Date: 2004-05-07
|
||||
|
||||
The new version 0.5.0 of Infinity gives the user the
|
||||
capability to resize the window on the fly just with
|
||||
the mouse. It also include, for the developers,
|
||||
structured doxygen-like comments on the code, so now
|
||||
the documentation could be generated automatically
|
||||
from sources.
|
||||
|
||||
Release: 0.4.0
|
||||
Date: 2004-05-04
|
||||
Summary: First release on SourceForge.net
|
||||
|
||||
Infinity is a visualization plugin for the XMMS audio
|
||||
player. It was originally written by Julien Carme,
|
||||
and is actually maintained by Duilio Protti. This is
|
||||
the first release on SourceForge.net, and includes
|
||||
rewritten routines for to take advantages of MMX
|
||||
instructions set. Infinity plugin doesn't require
|
||||
3D hardware acceleration support.
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
Near future
|
||||
===========
|
||||
|
||||
* Save window position on close.
|
||||
* Rewrite modules to use a common datatype InfPlugin.
|
||||
|
||||
Future
|
||||
======
|
||||
|
||||
* Give option to compile against Libvisual library.
|
||||
|
||||
Libvisual is a library that acts as a middle layer
|
||||
between applications that want audio visualisation
|
||||
and audio visualisation plugins.
|
||||
|
||||
Actually the Libvisual project has developed an XMMS
|
||||
plugin that, when loaded, allows to run all the plugins
|
||||
on the system that are linked against Libvisual.
|
||||
The project has released also a package which contains
|
||||
a lot of visualization plugins that have been ported
|
||||
to use this library, including a port of the original
|
||||
Infinity plugin made by the project lider.
|
||||
|
||||
The good thing of this library is that the plugins
|
||||
are linked against the library itself, so can be used
|
||||
by any client of the library, not just Audacity.
|
||||
Other good thing is that the library take cares of all
|
||||
the infrastructure needed by visualization plugins,
|
||||
including OpenGl ones, and the plugin writer must take
|
||||
care only about the artistic stuff, that is, to compute
|
||||
the frames to be shown.
|
||||
|
||||
The actual Libvisual implementation also allow to
|
||||
gradually morph from one plugin to another, and have
|
||||
many input plugins, so applications linked against it
|
||||
can take audio from many different sources.
|
||||
It's still under development, but the interface exposed
|
||||
right now is really clean, and are good plans like a
|
||||
builtin font system, so we could show song titles on the
|
||||
rendered screen of any plugin.
|
||||
|
||||
Information about Libvisual library can be found at
|
||||
http://libvisual.sf.net/
|
||||
|
||||
Some day infinity will be closed as an independent project,
|
||||
and will be maintained within the libvisual-plugins package.
|
||||
|
||||
|
||||
Duilio Protti.
|
||||
|
113
README.md
113
README.md
|
@ -1,4 +1,111 @@
|
|||
infinity-plugin
|
||||
===============
|
||||
Infinity Visualization Plugin
|
||||
-----------------------------
|
||||
|
||||
http://infinity-plugin.sf.net
|
||||
|
||||
by Julien Carme (c) 2000
|
||||
Duilio Protti (c) 2004 - 2011
|
||||
|
||||
Infinity is a visualization plugin that generates light effects according to a
|
||||
playing sound.
|
||||
|
||||
To run the plugin,
|
||||
-run audacious
|
||||
-enter the Preferences menu (Ctrl-P)
|
||||
-choose Plugins on the left
|
||||
-choose Visualization tab on the right frame
|
||||
-mark Infinity checkbox
|
||||
-press Tab if you want to enter Full-Screen mode
|
||||
-to stop it, press Tab again and disable it.
|
||||
|
||||
You don't need to be root to enter the full-screen mode.
|
||||
|
||||
There are two different modes in the plugin. Default mode is non-interactive.
|
||||
|
||||
-Non-Interactive Mode:
|
||||
|
||||
States and palettes are selected randomly, and change sometimes.
|
||||
|
||||
The following command keys will be shown when Infinity loads. If you want to
|
||||
see it, start Audacity from a terminal.
|
||||
|
||||
Keys:
|
||||
- Space: change effect.
|
||||
- Tab: toggle full-screen.
|
||||
- Up/Down: up/down audacity main volume.
|
||||
- Left/Right: reward/forward actual played song, if any.
|
||||
- z: previous song.
|
||||
- x: play.
|
||||
- c: pause.
|
||||
- v: stop.
|
||||
- b: next song.
|
||||
- Enter: switch to interactive mode.
|
||||
(works only if infinity was configured with --enable-debug option)
|
||||
- F11: screenshot.
|
||||
- F12: change palette.
|
||||
|
||||
-Interactive Mode:
|
||||
|
||||
You can control the effect:
|
||||
|
||||
Keys:
|
||||
|
||||
- F12: change palette.
|
||||
- Tab: toggle full-screen.
|
||||
- Enter: switch to non-interactive mode.
|
||||
- F1-F10: choose transformation vector field
|
||||
- a,z: change curve 1 lighting
|
||||
- q,s: change curve 2 lighting
|
||||
- e,r: change curve 1 amplitude
|
||||
- d,f: change curve 2 amplitude
|
||||
- w: change curve 2 type
|
||||
- mouse: change curve 2 position
|
||||
- F11: screenshot
|
||||
|
||||
SDL
|
||||
---
|
||||
|
||||
You must have installed SDL 1.0.6 or above to run the plugin.
|
||||
|
||||
Known Bugs
|
||||
----------
|
||||
|
||||
Your X system has to be at least in 16 bpp to make this program work. If you
|
||||
have more than 16 bpp, it should work but may be very slow. The Preferences
|
||||
cannot be changed while the plugin is enabled.
|
||||
|
||||
If you have problems finding locale.h header file, try to configure with
|
||||
--disable-nls option.
|
||||
|
||||
If you found a bug on this program, please take five minutes of your time and
|
||||
fill a bug report on the project's site <http://infinity-plugin.sf.net>.
|
||||
The author will work to solve the problem.
|
||||
|
||||
Contributions
|
||||
-------------
|
||||
|
||||
This project as of 2011 welcomes people that makes translations and people
|
||||
to make binary distributions. Translations are easy because of the gettext
|
||||
system, and because Infinity have just a few translatable strings (and that
|
||||
will not change, this is a plugin so doesn't have a rich user interface).
|
||||
Both translations and binary packages are very important because the intended
|
||||
audience are end users, so we aim to leave things as simple as possible.
|
||||
|
||||
If you want to keep track of Infinity development, subscribe to the development
|
||||
mailing list at:
|
||||
|
||||
http://lists.sourceforge.net/mailman/listinfo/infinity-plugin-devel
|
||||
|
||||
You don't need to be a project developer to subscribe.
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
||||
If you like any new feature on this program, please fill a feature request
|
||||
or directly submit a patch to SourceForge's project site at:
|
||||
|
||||
http://sourceforge.net/projects/infinity-plugin
|
||||
|
||||
|
||||
Duilio J. Protti.
|
||||
|
||||
music visualization plugin
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
Bug Reports
|
||||
===========
|
||||
|
||||
If you encounter any bug on Infinity, on the building process, or
|
||||
an inconsistency on the configuration, or just a rendering bug,
|
||||
please point your browser to
|
||||
|
||||
http://sourceforge.net/tracker/?atid=649740&group_id=108158&func=browse
|
||||
|
||||
and fill a bug report. That will take you just a few minutes, and
|
||||
will be a lot of help for developers and other users.
|
||||
The report will be filled on a single HTML form on the SourceForge.net's
|
||||
site of the project, and you don't need to have a user account there
|
||||
to submit the report.
|
||||
|
||||
This report must include:
|
||||
|
||||
- version of Audacity used.
|
||||
- version of Infinity used (I still interested on bugs of older versions).
|
||||
- version of SDL used.
|
||||
- version of Glib used.
|
||||
- Linux distribution you use.
|
||||
- X server implementation and version (usually XFree86).
|
||||
- Graphic card and wich driver it uses.
|
||||
- A short description of the conditions on where you running Infinity when
|
||||
the bug was encountered. i.e. if other plugins were running when the bug
|
||||
appears, if others applications were running, etc.
|
||||
- A short description of the bug itself. Specially, you must show, if possible,
|
||||
the output that was showed when the bug appears (to get that run Audacity on a
|
||||
terminal). If the error is a configure or compile error, send the last output
|
||||
showed.
|
||||
|
||||
After that, categorize the bug on one of the three categories:
|
||||
- building process
|
||||
- configuration
|
||||
- rendering
|
||||
and submit (every one of them are explained on the mentioned page).
|
||||
|
||||
And finally, don't doubt, every bug report is important, and will help a lot
|
||||
to the development process of Infinity!
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
TODO
|
||||
====
|
||||
|
||||
* Port to Banshee.
|
||||
* Add icon.
|
||||
* Add an option to disable the screensaver.
|
||||
* Save window position on close.
|
||||
* Rewrite modules to use a common datatype InfPlugin.
|
||||
* Add more translations.
|
||||
* Request an 8-bit surface, and make use of the palette's
|
||||
facilities from SDL (probably we must remove 'scale factor'
|
||||
along with this).
|
||||
|
|
@ -0,0 +1,530 @@
|
|||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
REQUIRED_AUTOMAKE_VERSION=1.9
|
||||
|
||||
PKG_NAME="Infinity Visualization Plugin"
|
||||
|
||||
(test -f $srcdir/configure.ac \
|
||||
## put other tests here
|
||||
) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level $PKG_NAME directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
#name of package
|
||||
PKG_NAME=${PKG_NAME:-Package}
|
||||
srcdir=${srcdir:-.}
|
||||
|
||||
# default version requirements ...
|
||||
REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.61}
|
||||
REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.9}
|
||||
REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.4.3}
|
||||
REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.10.40}
|
||||
REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0}
|
||||
#REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.25}
|
||||
REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0}
|
||||
#REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0}
|
||||
#REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-2.3.0}
|
||||
#REQUIRED_GNOME_DOC_UTILS_VERSION=${REQUIRED_GNOME_DOC_UTILS_VERSION:-0.4.2}
|
||||
|
||||
# a list of required m4 macros. Package can set an initial value
|
||||
REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-}
|
||||
FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-}
|
||||
|
||||
# Not all echo versions allow -n, so we check what is possible. This test is
|
||||
# based on the one in autoconf.
|
||||
ECHO_C=
|
||||
ECHO_N=
|
||||
case `echo -n x` in
|
||||
-n*)
|
||||
case `echo 'x\c'` in
|
||||
*c*) ;;
|
||||
*) ECHO_C='\c';;
|
||||
esac;;
|
||||
*)
|
||||
ECHO_N='-n';;
|
||||
esac
|
||||
|
||||
# some terminal codes ...
|
||||
if tty < /dev/null 1>/dev/null 2>&1; then
|
||||
boldface="`tput bold 2>/dev/null`"
|
||||
normal="`tput sgr0 2>/dev/null`"
|
||||
else
|
||||
boldface=
|
||||
normal=
|
||||
fi
|
||||
printbold() {
|
||||
echo $ECHO_N "$boldface" $ECHO_C
|
||||
echo "$@"
|
||||
echo $ECHO_N "$normal" $ECHO_C
|
||||
}
|
||||
printerr() {
|
||||
echo "$@" >&2
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# compare_versions MIN_VERSION ACTUAL_VERSION
|
||||
# returns true if ACTUAL_VERSION >= MIN_VERSION
|
||||
compare_versions() {
|
||||
ch_min_version=$1
|
||||
ch_actual_version=$2
|
||||
ch_status=0
|
||||
IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
|
||||
set $ch_actual_version
|
||||
for ch_min in $ch_min_version; do
|
||||
ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
|
||||
if [ -z "$ch_min" ]; then break; fi
|
||||
if [ -z "$ch_cur" ]; then ch_status=1; break; fi
|
||||
if [ $ch_cur -gt $ch_min ]; then break; fi
|
||||
if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
|
||||
done
|
||||
IFS="$ch_save_IFS"
|
||||
return $ch_status
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE
|
||||
# checks to see if the package is available
|
||||
version_check() {
|
||||
vc_package=$1
|
||||
vc_variable=$2
|
||||
vc_checkprogs=$3
|
||||
vc_min_version=$4
|
||||
vc_source=$5
|
||||
vc_status=1
|
||||
|
||||
vc_checkprog=`eval echo "\\$$vc_variable"`
|
||||
if [ -n "$vc_checkprog" ]; then
|
||||
printbold "using $vc_checkprog for $vc_package"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then
|
||||
vc_comparator="="
|
||||
else
|
||||
vc_comparator=">="
|
||||
fi
|
||||
printbold "checking for $vc_package $vc_comparator $vc_min_version..."
|
||||
for vc_checkprog in $vc_checkprogs; do
|
||||
echo $ECHO_N " testing $vc_checkprog... " $ECHO_C
|
||||
if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
|
||||
vc_actual_version=`$vc_checkprog --version | head -n 1 | \
|
||||
sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'`
|
||||
if compare_versions $vc_min_version $vc_actual_version; then
|
||||
echo "found $vc_actual_version"
|
||||
# set variables
|
||||
eval "$vc_variable=$vc_checkprog; \
|
||||
${vc_variable}_VERSION=$vc_actual_version"
|
||||
vc_status=0
|
||||
break
|
||||
else
|
||||
echo "too old (found version $vc_actual_version)"
|
||||
fi
|
||||
else
|
||||
echo "not found."
|
||||
fi
|
||||
done
|
||||
if [ "$vc_status" != 0 ]; then
|
||||
printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed"
|
||||
printerr " to build $PKG_NAME. Download the appropriate package for"
|
||||
printerr " from your distribution or get the source tarball at"
|
||||
printerr " $vc_source"
|
||||
printerr
|
||||
exit $vc_status
|
||||
fi
|
||||
return $vc_status
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# require_m4macro filename.m4
|
||||
# adds filename.m4 to the list of required macros
|
||||
require_m4macro() {
|
||||
case "$REQUIRED_M4MACROS" in
|
||||
$1\ * | *\ $1\ * | *\ $1) ;;
|
||||
*) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
forbid_m4macro() {
|
||||
case "$FORBIDDEN_M4MACROS" in
|
||||
$1\ * | *\ $1\ * | *\ $1) ;;
|
||||
*) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# add_to_cm_macrodirs dirname
|
||||
# Adds the dir to $cm_macrodirs, if it's not there yet.
|
||||
add_to_cm_macrodirs() {
|
||||
case $cm_macrodirs in
|
||||
"$1 "* | *" $1 "* | *" $1") ;;
|
||||
*) cm_macrodirs="$cm_macrodirs $1";;
|
||||
esac
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# print_m4macros_error
|
||||
# Prints an error message saying that autoconf macros were misused
|
||||
print_m4macros_error() {
|
||||
printerr "***Error***: some autoconf macros required to build $PKG_NAME"
|
||||
printerr " were not found in your aclocal path, or some forbidden"
|
||||
printerr " macros were found. Perhaps you need to adjust your"
|
||||
printerr " ACLOCAL_FLAGS?"
|
||||
printerr
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# check_m4macros
|
||||
# Checks that all the requested macro files are in the aclocal macro path
|
||||
# Uses REQUIRED_M4MACROS and ACLOCAL variables.
|
||||
check_m4macros() {
|
||||
# construct list of macro directories
|
||||
cm_macrodirs=`$ACLOCAL --print-ac-dir`
|
||||
# aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9
|
||||
# but it contains only Automake's own macros, so we can ignore it.
|
||||
|
||||
# Read the dirlist file, supported by Automake >= 1.7.
|
||||
if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then
|
||||
cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist`
|
||||
if [ -n "$cm_dirlist" ] ; then
|
||||
for cm_dir in $cm_dirlist; do
|
||||
if [ -d $cm_dir ]; then
|
||||
add_to_cm_macrodirs $cm_dir
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Parse $ACLOCAL_FLAGS
|
||||
set - $ACLOCAL_FLAGS
|
||||
while [ $# -gt 0 ]; do
|
||||
if [ "$1" = "-I" ]; then
|
||||
add_to_cm_macrodirs "$2"
|
||||
shift
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
cm_status=0
|
||||
if [ -n "$REQUIRED_M4MACROS" ]; then
|
||||
printbold "Checking for required M4 macros..."
|
||||
# check that each macro file is in one of the macro dirs
|
||||
for cm_macro in $REQUIRED_M4MACROS; do
|
||||
cm_macrofound=false
|
||||
for cm_dir in $cm_macrodirs; do
|
||||
if [ -f "$cm_dir/$cm_macro" ]; then
|
||||
cm_macrofound=true
|
||||
break
|
||||
fi
|
||||
# The macro dir in Cygwin environments may contain a file
|
||||
# called dirlist containing other directories to look in.
|
||||
if [ -f "$cm_dir/dirlist" ]; then
|
||||
for cm_otherdir in `cat $cm_dir/dirlist`; do
|
||||
if [ -f "$cm_otherdir/$cm_macro" ]; then
|
||||
cm_macrofound=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
if $cm_macrofound; then
|
||||
:
|
||||
else
|
||||
printerr " $cm_macro not found"
|
||||
cm_status=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$cm_status" != 0 ]; then
|
||||
print_m4macros_error
|
||||
exit $cm_status
|
||||
fi
|
||||
if [ -n "$FORBIDDEN_M4MACROS" ]; then
|
||||
printbold "Checking for forbidden M4 macros..."
|
||||
# check that each macro file is in one of the macro dirs
|
||||
for cm_macro in $FORBIDDEN_M4MACROS; do
|
||||
cm_macrofound=false
|
||||
for cm_dir in $cm_macrodirs; do
|
||||
if [ -f "$cm_dir/$cm_macro" ]; then
|
||||
cm_macrofound=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if $cm_macrofound; then
|
||||
printerr " $cm_macro found (should be cleared from macros dir)"
|
||||
cm_status=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$cm_status" != 0 ]; then
|
||||
print_m4macros_error
|
||||
exit $cm_status
|
||||
fi
|
||||
}
|
||||
|
||||
# try to catch the case where the macros2/ directory hasn't been cleared out.
|
||||
forbid_m4macro gnome-cxx-check.m4
|
||||
|
||||
want_libtool=false
|
||||
want_gettext=false
|
||||
want_glib_gettext=false
|
||||
want_intltool=false
|
||||
want_pkg_config=false
|
||||
want_gtk_doc=false
|
||||
want_gnome_doc_utils=false
|
||||
want_maintainer_mode=false
|
||||
|
||||
configure_files="`find $srcdir -name '{arch}' -prune -o -name '_darcs' -prune -o -name '.??*' -prune -o -name configure.ac -print -o -name configure.in -print`"
|
||||
for configure_ac in $configure_files; do
|
||||
dirname=`dirname $configure_ac`
|
||||
if [ -f $dirname/NO-AUTO-GEN ]; then
|
||||
echo skipping $dirname -- flagged as no auto-gen
|
||||
continue
|
||||
fi
|
||||
if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null ||
|
||||
grep "^LT_INIT" $configure_ac >/dev/null; then
|
||||
want_libtool=true
|
||||
fi
|
||||
if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then
|
||||
want_gettext=true
|
||||
fi
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then
|
||||
want_glib_gettext=true
|
||||
fi
|
||||
if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null ||
|
||||
grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then
|
||||
want_intltool=true
|
||||
fi
|
||||
if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then
|
||||
want_pkg_config=true
|
||||
fi
|
||||
if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then
|
||||
want_gtk_doc=true
|
||||
fi
|
||||
if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then
|
||||
want_gnome_doc_utils=true
|
||||
fi
|
||||
|
||||
# check that AM_MAINTAINER_MODE is used
|
||||
if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then
|
||||
want_maintainer_mode=true
|
||||
fi
|
||||
|
||||
if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then
|
||||
require_m4macro yelp.m4
|
||||
fi
|
||||
|
||||
# check to make sure gnome-common macros can be found ...
|
||||
if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null ||
|
||||
grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null ||
|
||||
grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then
|
||||
require_m4macro gnome-common.m4
|
||||
fi
|
||||
if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null ||
|
||||
grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then
|
||||
require_m4macro gnome-compiler-flags.m4
|
||||
fi
|
||||
done
|
||||
|
||||
#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13
|
||||
WANT_AUTOCONF_2_5=1
|
||||
export WANT_AUTOCONF_2_5
|
||||
version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz"
|
||||
AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/`
|
||||
|
||||
case $REQUIRED_AUTOMAKE_VERSION in
|
||||
1.4*) automake_progs="automake-1.4" ;;
|
||||
1.5*) automake_progs="automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;;
|
||||
1.6*) automake_progs="automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;;
|
||||
1.7*) automake_progs="automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;;
|
||||
1.8*) automake_progs="automake-1.11 automake-1.10 automake-1.9 automake-1.8" ;;
|
||||
1.9*) automake_progs="automake-1.11 automake-1.10 automake-1.9" ;;
|
||||
1.10*) automake_progs="automake-1.11 automake-1.10" ;;
|
||||
1.11*) automake_progs="automake-1.11" ;;
|
||||
esac
|
||||
version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz"
|
||||
ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
|
||||
|
||||
if $want_libtool; then
|
||||
version_check libtool LIBTOOLIZE libtoolize $REQUIRED_LIBTOOL_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz"
|
||||
require_m4macro libtool.m4
|
||||
fi
|
||||
|
||||
if $want_gettext; then
|
||||
version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz"
|
||||
require_m4macro gettext.m4
|
||||
fi
|
||||
|
||||
if $want_glib_gettext; then
|
||||
version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \
|
||||
"ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz"
|
||||
require_m4macro glib-gettext.m4
|
||||
fi
|
||||
|
||||
if $want_intltool; then
|
||||
version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \
|
||||
"http://ftp.gnome.org/pub/GNOME/sources/intltool/"
|
||||
require_m4macro intltool.m4
|
||||
fi
|
||||
|
||||
if $want_pkg_config; then
|
||||
version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \
|
||||
"'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz"
|
||||
require_m4macro pkg.m4
|
||||
fi
|
||||
|
||||
if $want_gtk_doc; then
|
||||
version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \
|
||||
"http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
|
||||
require_m4macro gtk-doc.m4
|
||||
fi
|
||||
|
||||
if $want_gnome_doc_utils; then
|
||||
version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \
|
||||
"http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/"
|
||||
fi
|
||||
|
||||
if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
|
||||
version_check gnome-common DOC_COMMON gnome-doc-common \
|
||||
$REQUIRED_DOC_COMMON_VERSION " "
|
||||
fi
|
||||
|
||||
check_m4macros
|
||||
|
||||
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
|
||||
printerr "**Warning**: I am going to run \`configure' with no arguments."
|
||||
printerr "If you wish to pass any to it, please specify them on the"
|
||||
printerr \`$0\'" command line."
|
||||
printerr
|
||||
fi
|
||||
|
||||
topdir=`pwd`
|
||||
for configure_ac in $configure_files; do
|
||||
dirname=`dirname $configure_ac`
|
||||
basename=`basename $configure_ac`
|
||||
if [ -f $dirname/NO-AUTO-GEN ]; then
|
||||
echo skipping $dirname -- flagged as no auto-gen
|
||||
elif [ ! -w $dirname ]; then
|
||||
echo skipping $dirname -- directory is read only
|
||||
else
|
||||
printbold "Processing $configure_ac"
|
||||
cd $dirname
|
||||
|
||||
# Note that the order these tools are called should match what
|
||||
# autoconf's "autoupdate" package does. See bug 138584 for
|
||||
# details.
|
||||
|
||||
# programs that might install new macros get run before aclocal
|
||||
if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null ||
|
||||
grep "^LT_INIT" $basename >/dev/null; then
|
||||
printbold "Running $LIBTOOLIZE..."
|
||||
$LIBTOOLIZE --force --copy || exit 1
|
||||
fi
|
||||
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then
|
||||
printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages."
|
||||
echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1
|
||||
elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then
|
||||
if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then
|
||||
printbold "Running autopoint..."
|
||||
autopoint --force || exit 1
|
||||
else
|
||||
printbold "Running $GETTEXTIZE... Ignore non-fatal messages."
|
||||
echo "no" | $GETTEXTIZE --force --copy || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep "^AC_PROG_INTLTOOL" $basename >/dev/null ||
|
||||
grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then
|
||||
printbold "Running $INTLTOOLIZE..."
|
||||
$INTLTOOLIZE --force --copy --automake || exit 1
|
||||
fi
|
||||
if grep "^GTK_DOC_CHECK" $basename >/dev/null; then
|
||||
printbold "Running $GTKDOCIZE..."
|
||||
$GTKDOCIZE --copy || exit 1
|
||||
fi
|
||||
|
||||
if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
|
||||
printbold "Running gnome-doc-common..."
|
||||
gnome-doc-common --copy || exit 1
|
||||
fi
|
||||
if grep "^GNOME_DOC_INIT" $basename >/dev/null; then
|
||||
printbold "Running $GNOME_DOC_PREPARE..."
|
||||
$GNOME_DOC_PREPARE --force --copy || exit 1
|
||||
fi
|
||||
|
||||
# Now run aclocal to pull in any additional macros needed
|
||||
|
||||
# if the AC_CONFIG_MACRO_DIR() macro is used, pass that
|
||||
# directory to aclocal.
|
||||
m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
|
||||
if [ -n "$m4dir" ]; then
|
||||
m4dir="-I $m4dir"
|
||||
fi
|
||||
printbold "Running $ACLOCAL..."
|
||||
$ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1
|
||||
|
||||
if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
|
||||
printerr "*** obsolete gnome macros were used in $configure_ac"
|
||||
fi
|
||||
|
||||
# Now that all the macros are sorted, run autoconf and autoheader ...
|
||||
printbold "Running $AUTOCONF..."
|
||||
$AUTOCONF || exit 1
|
||||
if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
|
||||
printbold "Running $AUTOHEADER..."
|
||||
$AUTOHEADER || exit 1
|
||||
# this prevents automake from thinking config.h.in is out of
|
||||
# date, since autoheader doesn't touch the file if it doesn't
|
||||
# change.
|
||||
test -f config.h.in && touch config.h.in
|
||||
fi
|
||||
|
||||
# Finally, run automake to create the makefiles ...
|
||||
printbold "Running $AUTOMAKE..."
|
||||
if [ -f COPYING ]; then
|
||||
cp -pf COPYING COPYING.autogen_bak
|
||||
fi
|
||||
if [ -f INSTALL ]; then
|
||||
cp -pf INSTALL INSTALL.autogen_bak
|
||||
fi
|
||||
if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then
|
||||
$AUTOMAKE --gnu --add-missing --force --copy -Wno-portability || exit 1
|
||||
else
|
||||
$AUTOMAKE --gnu --add-missing --copy || exit 1
|
||||
fi
|
||||
if [ -f COPYING.autogen_bak ]; then
|
||||
cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING
|
||||
rm -f COPYING.autogen_bak
|
||||
fi
|
||||
if [ -f INSTALL.autogen_bak ]; then
|
||||
cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL
|
||||
rm -f INSTALL.autogen_bak
|
||||
fi
|
||||
|
||||
cd "$topdir"
|
||||
fi
|
||||
done
|
||||
|
||||
conf_flags=""
|
||||
|
||||
if $want_maintainer_mode; then
|
||||
conf_flags="--enable-maintainer-mode"
|
||||
fi
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
printbold Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
|
@ -0,0 +1,132 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* always defined to indicate that i18n is enabled */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* GETTEXT package name */
|
||||
#undef GETTEXT_PACKAGE
|
||||
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
#undef HAVE_BIND_TEXTDOMAIN_CODESET
|
||||
|
||||
/* Define to 1 if you have the `dcgettext' function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `floor' function. */
|
||||
#undef HAVE_FLOOR
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define to 1 if you have the <libintl.h> header file. */
|
||||
#undef HAVE_LIBINTL_H
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define to 1 if you have the `sqrt' function. */
|
||||
#undef HAVE_SQRT
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Activate Infinity's debugging */
|
||||
#undef INFINITY_DEBUG
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Activate MMX Extensions support */
|
||||
#undef MMX_DETECTION
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||
code using `volatile' can become incorrect without. Disable with care. */
|
||||
#undef volatile
|
|
@ -0,0 +1,227 @@
|
|||
## Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT([Infinity plugin],[0.7.1],[dprotti@users.sourceforge.net],[infinity-plugin-4-audacious])
|
||||
AM_INIT_AUTOMAKE([1.9.0 dist-bzip2])
|
||||
|
||||
INF_MSG_MMX_NOT_ALLOWED="
|
||||
You have requested MMX detection support, but this feature is not
|
||||
allowed for your target architecture"
|
||||
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_PREFIX_PROGRAM(audacious)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
inf_host_mips=no
|
||||
inf_host_alpha=no
|
||||
inf_host_sparc=no
|
||||
inf_host_ix86=no
|
||||
inf_host_powerpc=no
|
||||
|
||||
case "$host_cpu" in
|
||||
mips) inf_host_mips=yes;;
|
||||
alpha) inf_host_alpha=yes;;
|
||||
sparc) inf_host_sparc=yes;;
|
||||
i*86) inf_host_ix86=yes;;
|
||||
powerpc|ppc) inf_host_powerpc=yes;;
|
||||
*) inf_host_arch_unknown=yes;;
|
||||
esac
|
||||
|
||||
inf_target_mips=no
|
||||
inf_target_alpha=no
|
||||
inf_target_sparc=no
|
||||
inf_target_ix86=no
|
||||
inf_target_powerpc=no
|
||||
|
||||
inf_target_64bit=no
|
||||
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
case "$target_cpu" in
|
||||
mips) inf_target_mips=yes;;
|
||||
alpha) inf_target_alpha=yes;;
|
||||
sparc) inf_target_sparc=yes;;
|
||||
i*86) inf_target_ix86=yes;;
|
||||
ia64*) inf_target_ix86=yes
|
||||
inf_target_64bit=yes;;
|
||||
powerpc|ppc) inf_target_powerpc=yes;;
|
||||
*) inf_target_arch_unknown=yes;;
|
||||
esac
|
||||
|
||||
# Check for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_DISABLE_STATIC
|
||||
LT_INIT
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, [pkg-config], [no])
|
||||
if test x$PKG_CONFIG = xno ; then
|
||||
AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
|
||||
fi
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([*** pkg-config too old; version 0.14 or better required.])
|
||||
fi
|
||||
|
||||
# Check for libraries.
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.8,,)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
|
||||
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8,,)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
|
||||
PKG_CHECK_MODULES(DBUSGLIB1, dbus-glib-1 >= 0.92,,)
|
||||
AC_SUBST(DBUSGLIB1)
|
||||
AC_SUBST(DBUSGLIB1)
|
||||
|
||||
PKG_CHECK_MODULES(AUDACIOUS, audacious,,)
|
||||
AC_SUBST(AUDACIOUS_LIBS)
|
||||
AC_SUBST(AUDACIOUS_CFLAGS)
|
||||
|
||||
AC_PATH_PROG(SDL_CONFIG, [sdl-config], [no])
|
||||
if test x$SDL_CONFIG = xno ; then
|
||||
AC_MSG_ERROR([
|
||||
*** sdl-config not found.
|
||||
*** If you have installed from binaries, probably you have not
|
||||
*** installed SDL development package.
|
||||
*** See http://www.libsdl.org
|
||||
])
|
||||
fi
|
||||
AM_PATH_SDL(1.0.6,,AC_MSG_ERROR([*** SDL >= 1.0.6 not installed - please install first]))
|
||||
|
||||
# Check for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h unistd.h])
|
||||
|
||||
# Check for typedefs, structures, and compiler characteristics.
|
||||
AC_C_VOLATILE
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_BIGENDIAN(AC_MSG_WARN([*** You have a big endian system, Infinity have not been tested on these systems]),,)
|
||||
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
if test x$ac_cv_sizeof_long_long = x8; then
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Infinity requires a 64 bit long long type. You might want to consider
|
||||
*** using the GNU C compiler.
|
||||
])
|
||||
fi
|
||||
|
||||
# Check for library functions.
|
||||
AC_CHECK_FUNCS([floor setlocale sqrt setlocale])
|
||||
|
||||
# Arguments to specify certain features.
|
||||
AC_ARG_ENABLE([mmx],
|
||||
AS_HELP_STRING([--enable-mmx],[Turn on MMX detection support @<:@default=enabled@:>@]),
|
||||
[mmx=$enableval],
|
||||
[mmx=yes])
|
||||
dnl MMX extensions are allowed only on 32 bit Intel machines
|
||||
AC_MSG_CHECKING([whether to enable MMX detection support])
|
||||
if test x$mmx = xyes; then
|
||||
if test x$inf_target_ix86 = xyes && test x$inf_target_64bit = xno; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([MMX_DETECTION], [1], [Activate MMX Extensions support])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([$INF_MSG_MMX_NOT_ALLOWED])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([debug],
|
||||
AS_HELP_STRING([--enable-debug],[Turn on debug mode @<:@default=disabled@:>@]),
|
||||
[debug=$enableval],
|
||||
[debug=no])
|
||||
|
||||
AC_MSG_CHECKING([whether to activate debugging])
|
||||
if test "$debug" = yes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([INFINITY_DEBUG], [1], [Activate Infinity's debugging])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
# Internationalization
|
||||
ALL_LINGUAS="es es_AR"
|
||||
GETTEXT_PACKAGE=infinity
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
#AC_PROG_INTLTOOL
|
||||
|
||||
INF_CFLAGS_EXTRA=''
|
||||
|
||||
if test x"$GCC" = xyes; then
|
||||
INF_CFLAGS_EXTRA="${INF_CFLAGS_EXTRA} -Wall -Wimplicit -Wunused -Wmissing-prototypes"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([vectorization],
|
||||
AS_HELP_STRING([--enable-vectorization],[Turn on vectorization optimizations (gcc 4 only) @<:@default=enabled@:>@]),
|
||||
[vectorization=$enableval],
|
||||
[vectorization=yes])
|
||||
|
||||
AC_MSG_CHECKING([whether to activate vectorization under gcc 4])
|
||||
if test x"$vectorization" = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if test x"$GCC" = xno; then
|
||||
AC_MSG_ERROR([You are not using a gcc compiler])
|
||||
else
|
||||
# On some distros, there are snapshots available as gcc4
|
||||
if test -z "$ac_cv_prog_CC" || test x"$CC" = xgcc4; then
|
||||
our_gcc="$CC"
|
||||
else
|
||||
our_gcc="$ac_cv_prog_CC"
|
||||
fi
|
||||
case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
|
||||
*4.)
|
||||
INF_CFLAGS_EXTRA="${INF_CFLAGS_EXTRA} -ftree-vectorize"
|
||||
case "$target_cpu" in
|
||||
i*86|ia64*)
|
||||
# TODO check for sse2 availability
|
||||
INF_CFLAGS_EXTRA="${INF_CFLAGS_EXTRA} -msse"
|
||||
;;
|
||||
powerpc|ppc)
|
||||
INF_CFLAGS_EXTRA="${INF_CFLAGS_EXTRA} -maltivec"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([You need at least a gcc version 4 to build with vectorization optimizations])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(INF_CFLAGS_EXTRA)
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
po/Makefile.in
|
||||
src/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
echo "
|
||||
=========================================================
|
||||
Infinity Plugin for the Audacious Player -- version $VERSION
|
||||
=========================================================
|
||||
|
||||
Install path : ${prefix}/lib/audacious/Visualization
|
||||
Compiler : ${CC}
|
||||
CFLAGS : ${INF_CFLAGS_EXTRA} ${CFLAGS}
|
||||
Debug enabled : ${debug}
|
||||
MMX Extensions support : ${mmx}
|
||||
"
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
2005-07-18 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* es.po: Spanish translation updated.
|
||||
|
||||
2005-04-15 Duilio Protti <dprotti@users.sourceforge.net>
|
||||
|
||||
* es.po: Spanish translation updated.
|
||||
|
||||
2004-03-31 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.in.in: New file, from gettext-0.11.4.
|
||||
* boldquot.sed: New file, from gettext-0.11.4.
|
||||
* en@boldquot.header: New file, from gettext-0.11.4.
|
||||
* en@quot.header: New file, from gettext-0.11.4.
|
||||
* insert-header.sin: New file, from gettext-0.11.4.
|
||||
* quot.sed: New file, from gettext-0.11.4.
|
||||
* remove-potcdate.sin: New file, from gettext-0.11.4.
|
||||
* Rules-quot: New file, from gettext-0.11.4.
|
||||
|
|
@ -0,0 +1 @@
|
|||
en es es_AR
|
|
@ -0,0 +1,279 @@
|
|||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
#
|
||||
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
|
||||
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
|
||||
#
|
||||
# - Modified by jacob berkman <jacob@ximian.com> to install
|
||||
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
|
||||
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
libdir = @libdir@
|
||||
localedir = $(libdir)/locale
|
||||
gnulocaledir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
|
||||
subdir = po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_OPTS = @MSGFMT_OPTS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
MSGMERGE = msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES =
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
|
||||
$(POFILES) $(GMOFILES) $(SOURCES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $<
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
|
||||
$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--keyword=C_:1c,2 \
|
||||
--keyword=NC_:1c,2 \
|
||||
--keyword=g_dcgettext:2 \
|
||||
--keyword=g_dngettext:2,3 \
|
||||
--keyword=g_dpgettext2:2c,3 \
|
||||
--flag=N_:1:pass-c-format \
|
||||
--flag=C_:2:pass-c-format \
|
||||
--flag=NC_:2:pass-c-format \
|
||||
--flag=g_dngettext:2:pass-c-format \
|
||||
--flag=g_strdup_printf:1:c-format \
|
||||
--flag=g_string_printf:2:c-format \
|
||||
--flag=g_string_append_printf:2:c-format \
|
||||
--flag=g_error_new:3:c-format \
|
||||
--flag=g_set_error:4:c-format \
|
||||
--flag=g_markup_printf_escaped:1:c-format \
|
||||
--flag=g_log:3:c-format \
|
||||
--flag=g_print:1:c-format \
|
||||
--flag=g_printerr:1:c-format \
|
||||
--flag=g_printf:1:c-format \
|
||||
--flag=g_fprintf:2:c-format \
|
||||
--flag=g_sprintf:2:c-format \
|
||||
--flag=g_snprintf:3:c-format \
|
||||
--flag=g_scanner_error:2:c-format \
|
||||
--flag=g_scanner_warn:2:c-format \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
&& test ! -f $(GETTEXT_PACKAGE).po \
|
||||
|| ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
|
||||
&& mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(gnulocaledir);; \
|
||||
*) destdir=$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "glib"; then \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "glib"; then \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
fi
|
||||
|
||||
check: all
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f $(GMOFILES)
|
||||
|
||||
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
tmpdir=`pwd`; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# POTFILES is created from POTFILES.in by stripping comments, empty lines
|
||||
# and Intltool tags (enclosed in square brackets), and appending a full
|
||||
# relative path to them
|
||||
POTFILES: POTFILES.in
|
||||
( if test 'x$(srcdir)' != 'x.'; then \
|
||||
posrcprefix='$(top_srcdir)/'; \
|
||||
else \
|
||||
posrcprefix="../"; \
|
||||
fi; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' \
|
||||
-e "s/^\[.*\] +//" \
|
||||
-e '/^[ ]*$$/d' \
|
||||
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
|
||||
| sed -e '$$s/\\$$//') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
&& $(SHELL) ./config.status $(subdir)/$@.in
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,10 @@
|
|||
# List of source files containing translatable strings.
|
||||
|
||||
# Package source files
|
||||
src/main.c
|
||||
src/renderer.c
|
||||
src/cputest.c
|
||||
src/infconfig.c
|
||||
src/display.c
|
||||
src/effects.c
|
||||
src/config-dialog.c
|
|
@ -0,0 +1,221 @@
|
|||
# Spanish translations for GNU infinity package.
|
||||
# Traducciones al español para el paquete GNU infinity.
|
||||
# Copyright (C) 2000 Julien Carme.
|
||||
# This file is distributed under the same license as the GNU infinity package.
|
||||
# Duilio Javier Protti <dprotti@fceia.unr.edu.ar>, 2004.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU infinity 0.3.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-01-07 05:01-0500\n"
|
||||
"PO-Revision-Date: 2005-07-18 18:38-0300\n"
|
||||
"Last-Translator: Duilio Javier Protti <dprotti@fceia.unr.edu.ar>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/main.c:58
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Infinity commands:\n"
|
||||
"- Space:\tchange effect.\n"
|
||||
"- Tab:\t\ttoggle full-screen.\n"
|
||||
"- Up/Down:\tup/down main volume.\n"
|
||||
"- Left/Right:\treward/forward actual played song, if any.\n"
|
||||
"- z:\t\tprevious song.\n"
|
||||
"- x:\t\tplay.\n"
|
||||
"- c:\t\tpause.\n"
|
||||
"- v:\t\tstop.\n"
|
||||
"- b:\t\tnext song.\n"
|
||||
"- Enter:\tswitch to interactive mode.\n"
|
||||
"\t\t(works only if infinity was configured with --enable-debug option)\n"
|
||||
"- F11:\t\tscreenshot.\n"
|
||||
"- F12:\t\tchange palette."
|
||||
msgstr ""
|
||||
"Comandos de Infinity:\n"
|
||||
"- Espacio:\tcambiar efecto.\n"
|
||||
"- Tabulación:\tpasar a/volver de pantalla completa.\n"
|
||||
"- Arriba/Abajo:\tsubir/bajar el volumen principal de XMMS.\n"
|
||||
"- Izquierda/Derecha: retroceder/adelantar la canción actual, si se está "
|
||||
"reproduciendo alguna.\n"
|
||||
"- z:\t\tcanción anterior.\n"
|
||||
"- x:\t\treproducir.\n"
|
||||
"- c:\t\tpausar reproducción.\n"
|
||||
"- v:\t\tdetener reproducción.\n"
|
||||
"- b:\t\tpróxima canción.\n"
|
||||
"- Enter:\tpasar a modo interactivo.\n"
|
||||
"\t\t(esto funciona sólo si infinity fue configurado con la opción --enable-"
|
||||
"debug)\n"
|
||||
"- F11:\t\ttomar una captura de pantalla.\n"
|
||||
"- F12:\t\tcambiar paleta actual."
|
||||
|
||||
#: src/renderer.c:98
|
||||
msgid "We are already initializing"
|
||||
msgstr "El plugin ya fue inicializado"
|
||||
|
||||
#: src/renderer.c:156
|
||||
msgid "The plugin have not yet initialize"
|
||||
msgstr "El plugin aún no se ha inicializado"
|
||||
|
||||
#: src/display.c:70
|
||||
#, fuzzy, c-format
|
||||
msgid "Infinity: Couldn't initialize SDL: %s\n"
|
||||
msgstr "Infinity: No se puede inicializar SDL: %s\n"
|
||||
|
||||
#: src/display.c:73
|
||||
#, fuzzy, c-format
|
||||
msgid "Infinity: could not init video mode: %s\n"
|
||||
msgstr "Infinity: No se puede inicializar el modo de video: %s\n"
|
||||
|
||||
#: src/display.c:74
|
||||
#, fuzzy
|
||||
msgid "Infinity: SDL SetVideoMode() Ok"
|
||||
msgstr "Infinity: Inicio de modo de video SDL correcto"
|
||||
|
||||
#: src/display.c:278
|
||||
#, fuzzy, c-format
|
||||
msgid "Infinity: Couldn't set %dx%d video mode: %s\n"
|
||||
msgstr "Infinity: No se puede inicializar el modo de video: %s\n"
|
||||
|
||||
#: src/display.c:471
|
||||
#, c-format
|
||||
msgid "Cannot toggle to fullscreen mode: %s"
|
||||
msgstr "No se pudo cambiar a modo de pantalla completa: %s"
|
||||
|
||||
#: src/display.c:482
|
||||
#, c-format
|
||||
msgid "Error while saving file %s: %s"
|
||||
msgstr "Error al guardar el archivo %s: %s"
|
||||
|
||||
#: src/display.c:484
|
||||
msgid "saved"
|
||||
msgstr "guardado"
|
||||
|
||||
#: src/effects.c:24
|
||||
#, c-format
|
||||
msgid "Could not be opened file %s for saving effects\n"
|
||||
msgstr "No se puede abrir el archivo %s para guardar los efectos\n"
|
||||
|
||||
#: src/effects.c:44
|
||||
#, c-format
|
||||
msgid "Could not be opened file %s for loading effects\n"
|
||||
msgstr "No se puede abrir el archivo %s para cargar los efectos\n"
|
||||
|
||||
#: src/config-dialog.c:38
|
||||
msgid "Infinity Configuration"
|
||||
msgstr "Configuración de Infinity"
|
||||
|
||||
#: src/config-dialog.c:48
|
||||
msgid "Parameters"
|
||||
msgstr "Parámetros"
|
||||
|
||||
#: src/config-dialog.c:66
|
||||
msgid "Effect period:"
|
||||
msgstr "Período de efecto:"
|
||||
|
||||
#: src/config-dialog.c:77
|
||||
msgid "Palette period:"
|
||||
msgstr "Período de paleta:"
|
||||
|
||||
#: src/config-dialog.c:88
|
||||
msgid "Scale Factor"
|
||||
msgstr "Factor de Escala"
|
||||
|
||||
#: src/config-dialog.c:99
|
||||
msgid "Maximum Frames per Second:"
|
||||
msgstr "Número Máximo de Cuadros por Segundo"
|
||||
|
||||
#: src/config-dialog.c:110
|
||||
msgid "Show current play title"
|
||||
msgstr "Mostrar título de la reproducción actual"
|
||||
|
||||
#: src/config-dialog.c:121
|
||||
msgid ""
|
||||
"Check it if you want to see the current play title on the Infinity's title "
|
||||
"bar"
|
||||
msgstr ""
|
||||
"Márquela si quiere que el título de la reproducción actual aparezca en la "
|
||||
"barra de título de Infinity"
|
||||
|
||||
#: src/config-dialog.c:147
|
||||
msgid "Time to change between an effect and the next one, in milliseconds."
|
||||
msgstr ""
|
||||
"Tiempo que deberá transcurrir antes de cambiar de efecto, en milisegundos."
|
||||
|
||||
#: src/config-dialog.c:162
|
||||
msgid "Time to change between a color and the next one, in milliseconds."
|
||||
msgstr ""
|
||||
"Tiempo que deberá transcurrir antes de cambiar de color, en milisegundos."
|
||||
|
||||
#: src/config-dialog.c:177
|
||||
msgid ""
|
||||
"Change only if the system doesn't have enough power to show the screen at a "
|
||||
"reasonably speed/size relation."
|
||||
msgstr ""
|
||||
"Cambiar solo si el sistema no tiene suficiente potencia como para mostrar la "
|
||||
"pantalla a una relación velocidad/tamaño razonable."
|
||||
|
||||
#: src/config-dialog.c:190
|
||||
msgid "Ok"
|
||||
msgstr "Aceptar"
|
||||
|
||||
#: src/config-dialog.c:199
|
||||
msgid ""
|
||||
"For to toggle to fullscreen mode, select the Infinity plugin window, and "
|
||||
"press the Tab key. Pressing Tab again will return to window mode."
|
||||
msgstr ""
|
||||
"Para cambiar a modo de pantalla completa, seleccione la ventana de Infinity "
|
||||
"y presione la tecla de tabulación. Presionando esta tecla nuevamente "
|
||||
"retornará a modo ventana."
|
||||
|
||||
#: src/config-dialog.c:204
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: src/config-dialog.c:212
|
||||
msgid "Apply"
|
||||
msgstr "Aplicar"
|
||||
|
||||
#~ msgid "About Infinity"
|
||||
#~ msgstr "Acerca de Infinity"
|
||||
|
||||
#~ msgid "\n"
|
||||
#~ msgstr "\n"
|
||||
|
||||
#~ msgid "Close"
|
||||
#~ msgstr "Cerrar"
|
||||
|
||||
#~ msgid "Display"
|
||||
#~ msgstr "Pantalla"
|
||||
|
||||
#~ msgid "X Resolution"
|
||||
#~ msgstr "Resolución en X"
|
||||
|
||||
#~ msgid "Y Resolution"
|
||||
#~ msgstr "Resolución en Y"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: Screen resized to %dx%d pixels^2"
|
||||
#~ msgstr "Pantalla redimensionada a %dx%d pixels²\n"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: Closing plugin...\n"
|
||||
#~ msgstr "Configuración de Infinity"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: There is not MMX support\n"
|
||||
#~ msgstr "Infinity: No hay soporte MMX"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: Looking for Multimedia Extensions Support..."
|
||||
#~ msgstr "Infinity: Comprobando soporte de extensiones multimedia..."
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid " detected"
|
||||
#~ msgstr " detectado"
|
||||
|
||||
#~ msgid "Closing Infinity...\n"
|
||||
#~ msgstr "Cerrando Infinity...\n"
|
Binary file not shown.
|
@ -0,0 +1,221 @@
|
|||
# Spanish translations for GNU infinity package.
|
||||
# Traducciones al español para el paquete GNU infinity.
|
||||
# Copyright (C) 2000 Julien Carme.
|
||||
# This file is distributed under the same license as the GNU infinity package.
|
||||
# Duilio Javier Protti <dprotti@fceia.unr.edu.ar>, 2004.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU infinity 0.3.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-01-07 05:01-0500\n"
|
||||
"PO-Revision-Date: 2005-07-18 18:38-0300\n"
|
||||
"Last-Translator: Duilio Javier Protti <dprotti@fceia.unr.edu.ar>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/main.c:58
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Infinity commands:\n"
|
||||
"- Space:\tchange effect.\n"
|
||||
"- Tab:\t\ttoggle full-screen.\n"
|
||||
"- Up/Down:\tup/down main volume.\n"
|
||||
"- Left/Right:\treward/forward actual played song, if any.\n"
|
||||
"- z:\t\tprevious song.\n"
|
||||
"- x:\t\tplay.\n"
|
||||
"- c:\t\tpause.\n"
|
||||
"- v:\t\tstop.\n"
|
||||
"- b:\t\tnext song.\n"
|
||||
"- Enter:\tswitch to interactive mode.\n"
|
||||
"\t\t(works only if infinity was configured with --enable-debug option)\n"
|
||||
"- F11:\t\tscreenshot.\n"
|
||||
"- F12:\t\tchange palette."
|
||||
msgstr ""
|
||||
"Comandos de Infinity:\n"
|
||||
"- Espacio:\tcambiar efecto.\n"
|
||||
"- Tabulación:\tpasar a/volver de pantalla completa.\n"
|
||||
"- Arriba/Abajo:\tsubir/bajar el volumen principal de XMMS.\n"
|
||||
"- Izquierda/Derecha: retroceder/adelantar la canción actual, si se está "
|
||||
"reproduciendo alguna.\n"
|
||||
"- z:\t\tcanción anterior.\n"
|
||||
"- x:\t\treproducir.\n"
|
||||
"- c:\t\tpausar reproducción.\n"
|
||||
"- v:\t\tdetener reproducción.\n"
|
||||
"- b:\t\tpróxima canción.\n"
|
||||
"- Enter:\tpasar a modo interactivo.\n"
|
||||
"\t\t(esto funciona sólo si infinity fue configurado con la opción --enable-"
|
||||
"debug)\n"
|
||||
"- F11:\t\ttomar una captura de pantalla.\n"
|
||||
"- F12:\t\tcambiar paleta actual."
|
||||
|
||||
#: src/renderer.c:98
|
||||
msgid "We are already initializing"
|
||||
msgstr "El plugin ya fue inicializado"
|
||||
|
||||
#: src/renderer.c:156
|
||||
msgid "The plugin have not yet initialize"
|
||||
msgstr "El plugin aún no se ha inicializado"
|
||||
|
||||
#: src/display.c:70
|
||||
#, fuzzy, c-format
|
||||
msgid "Infinity: Couldn't initialize SDL: %s\n"
|
||||
msgstr "Infinity: No se puede inicializar SDL: %s\n"
|
||||
|
||||
#: src/display.c:73
|
||||
#, fuzzy, c-format
|
||||
msgid "Infinity: could not init video mode: %s\n"
|
||||
msgstr "Infinity: No se puede inicializar el modo de video: %s\n"
|
||||
|
||||
#: src/display.c:74
|
||||
#, fuzzy
|
||||
msgid "Infinity: SDL SetVideoMode() Ok"
|
||||
msgstr "Infinity: Inicio de modo de video SDL correcto"
|
||||
|
||||
#: src/display.c:278
|
||||
#, fuzzy, c-format
|
||||
msgid "Infinity: Couldn't set %dx%d video mode: %s\n"
|
||||
msgstr "Infinity: No se puede inicializar el modo de video: %s\n"
|
||||
|
||||
#: src/display.c:471
|
||||
#, c-format
|
||||
msgid "Cannot toggle to fullscreen mode: %s"
|
||||
msgstr "No se pudo cambiar a modo de pantalla completa: %s"
|
||||
|
||||
#: src/display.c:482
|
||||
#, c-format
|
||||
msgid "Error while saving file %s: %s"
|
||||
msgstr "Error al guardar el archivo %s: %s"
|
||||
|
||||
#: src/display.c:484
|
||||
msgid "saved"
|
||||
msgstr "guardado"
|
||||
|
||||
#: src/effects.c:24
|
||||
#, c-format
|
||||
msgid "Could not be opened file %s for saving effects\n"
|
||||
msgstr "No se puede abrir el archivo %s para guardar los efectos\n"
|
||||
|
||||
#: src/effects.c:44
|
||||
#, c-format
|
||||
msgid "Could not be opened file %s for loading effects\n"
|
||||
msgstr "No se puede abrir el archivo %s para cargar los efectos\n"
|
||||
|
||||
#: src/config-dialog.c:38
|
||||
msgid "Infinity Configuration"
|
||||
msgstr "Configuración de Infinity"
|
||||
|
||||
#: src/config-dialog.c:48
|
||||
msgid "Parameters"
|
||||
msgstr "Parámetros"
|
||||
|
||||
#: src/config-dialog.c:66
|
||||
msgid "Effect period:"
|
||||
msgstr "Período de efecto:"
|
||||
|
||||
#: src/config-dialog.c:77
|
||||
msgid "Palette period:"
|
||||
msgstr "Período de paleta:"
|
||||
|
||||
#: src/config-dialog.c:88
|
||||
msgid "Scale Factor"
|
||||
msgstr "Factor de Escala"
|
||||
|
||||
#: src/config-dialog.c:99
|
||||
msgid "Maximum Frames per Second:"
|
||||
msgstr "Número Máximo de Cuadros por Segundo"
|
||||
|
||||
#: src/config-dialog.c:110
|
||||
msgid "Show current play title"
|
||||
msgstr "Mostrar título de la reproducción actual"
|
||||
|
||||
#: src/config-dialog.c:121
|
||||
msgid ""
|
||||
"Check it if you want to see the current play title on the Infinity's title "
|
||||
"bar"
|
||||
msgstr ""
|
||||
"Márquela si quiere que el título de la reproducción actual aparezca en la "
|
||||
"barra de título de Infinity"
|
||||
|
||||
#: src/config-dialog.c:147
|
||||
msgid "Time to change between an effect and the next one, in milliseconds."
|
||||
msgstr ""
|
||||
"Tiempo que deberá transcurrir antes de cambiar de efecto, en milisegundos."
|
||||
|
||||
#: src/config-dialog.c:162
|
||||
msgid "Time to change between a color and the next one, in milliseconds."
|
||||
msgstr ""
|
||||
"Tiempo que deberá transcurrir antes de cambiar de color, en milisegundos."
|
||||
|
||||
#: src/config-dialog.c:177
|
||||
msgid ""
|
||||
"Change only if the system doesn't have enough power to show the screen at a "
|
||||
"reasonably speed/size relation."
|
||||
msgstr ""
|
||||
"Cambiar solo si el sistema no tiene suficiente potencia como para mostrar la "
|
||||
"pantalla a una relación velocidad/tamaño razonable."
|
||||
|
||||
#: src/config-dialog.c:190
|
||||
msgid "Ok"
|
||||
msgstr "Aceptar"
|
||||
|
||||
#: src/config-dialog.c:199
|
||||
msgid ""
|
||||
"For to toggle to fullscreen mode, select the Infinity plugin window, and "
|
||||
"press the Tab key. Pressing Tab again will return to window mode."
|
||||
msgstr ""
|
||||
"Para cambiar a modo de pantalla completa, seleccione la ventana de Infinity "
|
||||
"y presione la tecla de tabulación. Presionando esta tecla nuevamente "
|
||||
"retornará a modo ventana."
|
||||
|
||||
#: src/config-dialog.c:204
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: src/config-dialog.c:212
|
||||
msgid "Apply"
|
||||
msgstr "Aplicar"
|
||||
|
||||
#~ msgid "About Infinity"
|
||||
#~ msgstr "Acerca de Infinity"
|
||||
|
||||
#~ msgid "\n"
|
||||
#~ msgstr "\n"
|
||||
|
||||
#~ msgid "Close"
|
||||
#~ msgstr "Cerrar"
|
||||
|
||||
#~ msgid "Display"
|
||||
#~ msgstr "Pantalla"
|
||||
|
||||
#~ msgid "X Resolution"
|
||||
#~ msgstr "Resolución en X"
|
||||
|
||||
#~ msgid "Y Resolution"
|
||||
#~ msgstr "Resolución en Y"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: Screen resized to %dx%d pixels^2"
|
||||
#~ msgstr "Pantalla redimensionada a %dx%d pixels²\n"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: Closing plugin...\n"
|
||||
#~ msgstr "Configuración de Infinity"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: There is not MMX support\n"
|
||||
#~ msgstr "Infinity: No hay soporte MMX"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Infinity: Looking for Multimedia Extensions Support..."
|
||||
#~ msgstr "Infinity: Comprobando soporte de extensiones multimedia..."
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid " detected"
|
||||
#~ msgstr " detectado"
|
||||
|
||||
#~ msgid "Closing Infinity...\n"
|
||||
#~ msgstr "Cerrando Infinity...\n"
|
|
@ -0,0 +1,171 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-11-25 17:44-0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/main.c:58
|
||||
msgid ""
|
||||
"Infinity commands:\n"
|
||||
"- Space:\tchange effect.\n"
|
||||
"- Tab:\t\ttoggle full-screen.\n"
|
||||
"- Up/Down:\tup/down main volume.\n"
|
||||
"- Left/Right:\treward/forward actual played song, if any.\n"
|
||||
"- z:\t\tprevious song.\n"
|
||||
"- x:\t\tplay.\n"
|
||||
"- c:\t\tpause.\n"
|
||||
"- v:\t\tstop.\n"
|
||||
"- b:\t\tnext song.\n"
|
||||
"- Enter:\tswitch to interactive mode.\n"
|
||||
"\t\t(works only if infinity was configured with --enable-debug option)\n"
|
||||
"- F11:\t\tscreenshot.\n"
|
||||
"- F12:\t\tchange palette."
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer.c:103
|
||||
msgid "We are already initializing"
|
||||
msgstr ""
|
||||
|
||||
#: src/renderer.c:166
|
||||
msgid "The plugin have not yet initialize"
|
||||
msgstr ""
|
||||
|
||||
#: src/infconfig.c:292
|
||||
msgid "Infinity plugin .ini file not found"
|
||||
msgstr ""
|
||||
|
||||
#: src/infconfig.c:294
|
||||
#, c-format
|
||||
msgid "Creating Infinity plugin config directory '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: src/infconfig.c:297
|
||||
#, c-format
|
||||
msgid "Cannot save preferences: unable to create directory '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: src/infconfig.c:319
|
||||
msgid "Error saving preferences"
|
||||
msgstr ""
|
||||
|
||||
#: src/display.c:70
|
||||
#, c-format
|
||||
msgid "Infinity: Couldn't initialize SDL: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/display.c:73
|
||||
#, c-format
|
||||
msgid "Infinity: could not init video mode: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/display.c:74
|
||||
msgid "Infinity: SDL SetVideoMode() Ok"
|
||||
msgstr ""
|
||||
|
||||
#: src/display.c:278
|
||||
#, c-format
|
||||
msgid "Infinity: Couldn't set %dx%d video mode: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/display.c:471
|
||||
#, c-format
|
||||
msgid "Cannot toggle to fullscreen mode: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/display.c:482
|
||||
#, c-format
|
||||
msgid "Error while saving file %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/display.c:484
|
||||
msgid "saved"
|
||||
msgstr ""
|
||||
|
||||
#: src/effects.c:24
|
||||
#, c-format
|
||||
msgid "Could not be opened file %s for saving effects\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/effects.c:44
|
||||
#, c-format
|
||||
msgid "Could not be opened file %s for loading effects\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:38
|
||||
msgid "Infinity Configuration"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:49
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:67
|
||||
msgid "Effect period:"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:78
|
||||
msgid "Palette period:"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:89
|
||||
msgid "Scale Factor"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:100
|
||||
msgid "Maximum Frames per Second:"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:111
|
||||
msgid "Show current play title"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:122
|
||||
msgid ""
|
||||
"Check it if you want to see the current play title on the Infinity's title "
|
||||
"bar"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:149
|
||||
msgid "Time to change between an effect and the next one, in milliseconds."
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:164
|
||||
msgid "Time to change between a color and the next one, in milliseconds."
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:179
|
||||
msgid ""
|
||||
"Change only if the system doesn't have enough power to show the screen at a "
|
||||
"reasonably speed/size relation."
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:192
|
||||
msgid "Ok"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:201
|
||||
msgid ""
|
||||
"For to toggle to fullscreen mode, select the Infinity plugin window, and "
|
||||
"press the Tab key. Pressing Tab again will return to window mode."
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:206
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/config-dialog.c:214
|
||||
msgid "Apply"
|
||||
msgstr ""
|
|
@ -0,0 +1,34 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
lib_LTLIBRARIES = libinfinite.la
|
||||
data_DATA = infinite_states
|
||||
|
||||
libdir = $(prefix)/lib/audacious/Visualization
|
||||
datadir = $(prefix)/share/audacious
|
||||
|
||||
# translations go in the infinity's own directory
|
||||
# not in xmms directory
|
||||
infinity_datadir = @datadir@
|
||||
localedir = $(infinity_datadir)/locale
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
||||
|
||||
AM_CFLAGS = @CFLAGS@ @AUDACIOUS_CFLAGS@ @SDL_CFLAGS@ @GTK_CFLAGS@\
|
||||
@GLIB_CFLAGS@ @DBUSGLIB1_CFLAGS@ $(INF_CFLAGS_EXTRA)
|
||||
|
||||
libinfinite_la_LDFLAGS = -export-dynamic -avoid-version
|
||||
libinfinite_la_LIBADD = @AUDACIOUS_LIBS@ @SDL_LIBS@ @GTK_LIBS@ @GLIB_LIBS@ @DBUSGLIB1_LIBS@
|
||||
libinfinite_la_SOURCES = \
|
||||
main.c \
|
||||
renderer.c renderer.h\
|
||||
compute.c compute.h \
|
||||
display.c display.h \
|
||||
infconfig.c infconfig.h\
|
||||
config-dialog.c config-dialog.h\
|
||||
effects.c effects.h\
|
||||
cputest.c cputest.h\
|
||||
mmx.h gettext.h types.h
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)
|
||||
|
||||
EXTRA_DIST = infinite_states maintest.c spectrum.c
|
||||
|
|
@ -0,0 +1,341 @@
|
|||
/*
|
||||
* 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 Library 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 <math.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "compute.h"
|
||||
#include "infconfig.h"
|
||||
#ifdef MMX_DETECTION
|
||||
#include "mmx.h"
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct t_coord {
|
||||
gint32 x,y;
|
||||
} t_coord;
|
||||
|
||||
typedef struct t_complex {
|
||||
gfloat x,y;
|
||||
} t_complex;
|
||||
|
||||
|
||||
static t_screen_parameters scr_par;
|
||||
|
||||
static byte* surface1;
|
||||
static byte* surface2;
|
||||
|
||||
|
||||
|
||||
static inline t_complex fct (t_complex a,guint32 n,gint32 p1,gint32 p2) /* p1 et p2:0-4 */
|
||||
{
|
||||
t_complex b;
|
||||
gfloat fact;
|
||||
gfloat an;
|
||||
gfloat circle_size;
|
||||
gfloat speed;
|
||||
gfloat co,si;
|
||||
|
||||
a.x-=scr_par.width/2;
|
||||
a.y-=scr_par.height/2;
|
||||
|
||||
switch (n) {
|
||||
case 0:
|
||||
an=0.025*(p1-2)+0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=scr_par.height*0.25;
|
||||
speed=(gfloat)2000+p2*500;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
case 1:
|
||||
an=0.015*(p1-2)+0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=scr_par.height*0.45;
|
||||
speed=(gfloat)4000+p2*1000;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
case 2:
|
||||
an=0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=scr_par.height*0.25;
|
||||
speed=(gfloat)400+p2*100;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
case 3:
|
||||
an=(sin(sqrt(a.x*a.x+a.y*a.y)/20)/20)+0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=scr_par.height*0.25;
|
||||
speed=(gfloat)4000;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
case 4:
|
||||
an=0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=scr_par.height*0.25;
|
||||
speed=sin(sqrt(a.x*a.x+a.y*a.y)/5)*3000+4000;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
case 5:
|
||||
b.x=a.x*1.02;
|
||||
b.y=a.y*1.02;
|
||||
break;
|
||||
case 6:
|
||||
an=0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=scr_par.height*0.25;
|
||||
fact=1+cos(atan(a.x/(a.y+0.00001))*6)*0.02;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
default:
|
||||
b.x=(gfloat)0.0;
|
||||
b.y=(gfloat)0.0;
|
||||
}
|
||||
b.x += scr_par.width/2;
|
||||
b.y += scr_par.height/2;
|
||||
if (b.x < 0.0 )
|
||||
b.x = 0.0;
|
||||
if (b.y < 0.0)
|
||||
b.y = 0.0;
|
||||
if (b.x > (gfloat) scr_par.width - 1)
|
||||
b.x = (gfloat)scr_par.width - 1;
|
||||
if (b.y > (gfloat) scr_par.height - 1)
|
||||
b.y = (gfloat)scr_par.height - 1;
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
/* We are trusting here on vector_field != NULL !!! */
|
||||
static inline void compute_generate_sector (guint32 g, guint32 f, guint32 p1, guint32 p2,
|
||||
guint32 debut, guint32 step, vector_field_t *vector_field)
|
||||
{
|
||||
const guint32 width = (guint32) vector_field->width;
|
||||
const guint32 height = (guint32) vector_field->height;
|
||||
const guint32 prop_transmitted = 249;
|
||||
const guint32 b_add = g * width * height;
|
||||
t_interpol *vector = vector_field->vector;
|
||||
guint32 fin = debut + step;
|
||||
guint32 cx, cy;
|
||||
|
||||
if (fin > height)
|
||||
fin = height;
|
||||
for (cy = debut; cy < fin; cy++) {
|
||||
for (cx = 0; cx < width; cx++) {
|
||||
t_complex a;
|
||||
gfloat fpy;
|
||||
guint32 rw, lw, add;
|
||||
guint32 w1, w2, w3, w4;
|
||||
guint32 x, y;
|
||||
|
||||
a.x = (gfloat) cx;
|
||||
a.y = (gfloat) cy;
|
||||
a = fct (a, f, p1, p2);
|
||||
add = cx + cy * width;
|
||||
x = (guint32) (a.x);
|
||||
y = (guint32) (a.y);
|
||||
vector[b_add+add].coord = (x << 16) | y;
|
||||
|
||||
fpy = a.y - floor (a.y);
|
||||
rw = (guint32) ((a.x - floor (a.x)) * prop_transmitted);
|
||||
lw = prop_transmitted - rw;
|
||||
w4 = (guint32) (fpy * rw);
|
||||
w2 = rw - w4;
|
||||
w3 = (guint32) (fpy * lw);
|
||||
w1 = lw - w3;
|
||||
vector[b_add + add].weight = \
|
||||
(w1 << 24) | (w2 << 16) | (w3 << 8) | w4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*--------------------------------*/
|
||||
/* Public functions */
|
||||
/*--------------------------------*/
|
||||
|
||||
|
||||
void compute_init (void)
|
||||
{
|
||||
scr_par.width = config_get_xres();
|
||||
scr_par.height = config_get_yres();
|
||||
scr_par.scale = config_get_sres();
|
||||
|
||||
surface1 = (byte*) g_malloc ((gulong)(scr_par.width+1) * (scr_par.height+1));
|
||||
surface2 = (byte*) g_malloc ((gulong)(scr_par.width+1) * (scr_par.height+1));
|
||||
}
|
||||
|
||||
void compute_resize (gint32 width, gint32 height)
|
||||
{
|
||||
scr_par.width = width;
|
||||
scr_par.height = height;
|
||||
g_free (surface1);
|
||||
g_free (surface2);
|
||||
surface1 = (byte*) g_malloc ((gulong)(scr_par.width+1) * (scr_par.height+1));
|
||||
surface2 = (byte*) g_malloc ((gulong)(scr_par.width+1) * (scr_par.height+1));
|
||||
}
|
||||
|
||||
|
||||
vector_field_t *compute_vector_field_new (gint32 width, gint32 height)
|
||||
{
|
||||
vector_field_t *field;
|
||||
|
||||
field = g_new0 (vector_field_t, 1);
|
||||
field->vector = g_new0 (t_interpol, width * height * NB_FCT);
|
||||
field->width = width;
|
||||
field->height = height;
|
||||
return field;
|
||||
}
|
||||
|
||||
|
||||
void compute_vector_field_destroy (vector_field_t *vector_field)
|
||||
{
|
||||
g_return_if_fail (vector_field != NULL);
|
||||
|
||||
g_free (vector_field->vector);
|
||||
g_free (vector_field);
|
||||
vector_field = NULL;
|
||||
}
|
||||
|
||||
void compute_quit ()
|
||||
{
|
||||
g_free (surface1);
|
||||
g_free (surface2);
|
||||
}
|
||||
|
||||
void compute_generate_vector_field (vector_field_t *vector_field)
|
||||
{
|
||||
guint32 f, i, height;
|
||||
|
||||
g_return_if_fail (vector_field != NULL);
|
||||
g_return_if_fail (vector_field->height >= 0);
|
||||
|
||||
height = (guint32) vector_field->height;
|
||||
|
||||
for (f = 0; f < NB_FCT; f++) {
|
||||
for (i = 0; i < height; i += 10)
|
||||
compute_generate_sector (f, f, 2, 2, i, 10, vector_field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline byte *compute_surface (t_interpol* vector, gint32 width, gint32 height)
|
||||
{
|
||||
gint32 i,j;
|
||||
gint32 add_dest=0;
|
||||
guint32 add_src;
|
||||
t_interpol *interpol;
|
||||
register byte* ptr_pix;
|
||||
guint32 color;
|
||||
byte* ptr_swap;
|
||||
|
||||
for (j = 0; j < height; j++)
|
||||
for (i = 0; i < width; i++) {
|
||||
interpol = &vector[add_dest];
|
||||
add_src = (interpol->coord & 0xFFFF) * width + (interpol->coord >> 16);
|
||||
ptr_pix = &((byte*)surface1)[add_src];
|
||||
color = ((guint32)(*(ptr_pix)) * (interpol->weight >> 24)
|
||||
+ (guint32)(*(ptr_pix+1)) * ((interpol->weight & 0xFFFFFF) >> 16)
|
||||
+ (guint32)(*(ptr_pix+width)) * ((interpol->weight & 0xFFFF) >> 8)
|
||||
+ (guint32)(*(ptr_pix+width+1)) * (interpol->weight & 0xFF)) >> 8;
|
||||
if (color > 255)
|
||||
surface2[add_dest] = (byte)255;
|
||||
else
|
||||
surface2[add_dest] = (byte)color;
|
||||
add_dest++;
|
||||
}
|
||||
ptr_swap = surface2;
|
||||
surface2 = surface1;
|
||||
surface1 = ptr_swap;
|
||||
|
||||
return surface1;
|
||||
}
|
||||
|
||||
|
||||
#if MMX_DETECTION
|
||||
inline byte *compute_surface_mmx (t_interpol* vector, gint32 width, gint32 height)
|
||||
{
|
||||
/*@unused@*/
|
||||
volatile mmx_t mm0, mm1, mm2;
|
||||
volatile mmx_t offsets, r;
|
||||
t_interpol *interpol;
|
||||
gint32 i, j, color;
|
||||
gint32 add_dest = 0;
|
||||
guint32 add_src;
|
||||
register byte* ptr_pix;
|
||||
byte* ptr_swap;
|
||||
|
||||
for (j = 0; j < height; j++)
|
||||
for (i = 0; i < width; i++) {
|
||||
interpol = &vector[add_dest];
|
||||
add_src = (interpol->coord & 0xFFFF) * width + (interpol->coord >> 16);
|
||||
ptr_pix = &((byte*)surface1)[add_src];
|
||||
((guint16*)&offsets)[0] = (guint16)*(ptr_pix+width+1);
|
||||
((guint16*)&offsets)[1] = (guint16)*(ptr_pix+width);
|
||||
((guint16*)&offsets)[2] = (guint16)*(ptr_pix+1);
|
||||
((guint16*)&offsets)[3] = (guint16)*(ptr_pix);
|
||||
/* MMX mode entry */
|
||||
movd_m2r(interpol->weight, mm1);
|
||||
movq_m2r(offsets, mm2);
|
||||
pxor_r2r(mm0, mm0);
|
||||
punpcklbw_r2r(mm0, mm1);
|
||||
pmaddwd_r2r(mm1, mm2);
|
||||
movq_r2m(mm2, r);
|
||||
emms();
|
||||
/* MMX mode exit */
|
||||
color = (((gint32*)&r)[0] + ((gint32*)&r)[1] ) >> 8;
|
||||
if (color > 255)
|
||||
surface2[add_dest] = 255;
|
||||
else
|
||||
surface2[add_dest] = (byte)color;
|
||||
add_dest++;
|
||||
}
|
||||
ptr_swap = surface1;
|
||||
surface1 = surface2;
|
||||
surface2 = ptr_swap;
|
||||
return surface1;
|
||||
}
|
||||
#endif /* MMX_DETECTION */
|
||||
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* \file compute.h
|
||||
*
|
||||
* \brief This modules is responsible for calculate the screen that
|
||||
* will be showed.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 Library 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 __INFINITY_COMPUTE__
|
||||
#define __INFINITY_COMPUTE__
|
||||
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
||||
#define NB_FCT 7
|
||||
#define PI 3.14159
|
||||
|
||||
|
||||
/**
|
||||
* Represents the interpollation information.
|
||||
*/
|
||||
typedef struct {
|
||||
|
||||
guint32 coord ; /**< Coordinates of the top left pixel. */
|
||||
guint32 weight; /**< 32 bits = 4*8 = weights of the four corners */
|
||||
|
||||
} t_interpol;
|
||||
|
||||
|
||||
/**
|
||||
* Represents a field of interpollation vectors.
|
||||
*
|
||||
* \warning Don't use width*height*sizeof(::t_interpol) for
|
||||
* to calculate the memory size of an object of this type
|
||||
* because this is actually not true.
|
||||
*/
|
||||
typedef struct {
|
||||
|
||||
gint32 width; /**< number of vectors */
|
||||
gint32 height; /**< length of each vector */
|
||||
t_interpol *vector; /**< pointer to the vector field */
|
||||
|
||||
} vector_field_t;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The constructor of the ::vector_field_t type.
|
||||
*/
|
||||
vector_field_t *compute_vector_field_new (int width, int height);
|
||||
|
||||
/**
|
||||
* The destructor of the ::vector_field_t type.
|
||||
*
|
||||
* @param vector_field Must be non NULL pointer to a
|
||||
* ::vector_field_t object.
|
||||
*/
|
||||
void compute_vector_field_destroy (vector_field_t *vector_field);
|
||||
|
||||
/**
|
||||
* It frees any allocated resource and mades clenaup work.
|
||||
*/
|
||||
void compute_quit (void);
|
||||
|
||||
/**
|
||||
* Initializes this module.
|
||||
*
|
||||
* For to do this the user configuration options are readed and
|
||||
* internals structures setting accordingly. If this options
|
||||
* change, the module must be reinitialized in order to the
|
||||
* changes take effect.
|
||||
*/
|
||||
void compute_init (void);
|
||||
|
||||
/**
|
||||
* Tells the module that the screen has been resized.
|
||||
*
|
||||
* \warning May be this will be deprecated.
|
||||
*/
|
||||
void compute_resize (gint32 width, gint32 height);
|
||||
|
||||
void compute_generate_vector_field (vector_field_t *vector_field);
|
||||
|
||||
byte *compute_surface (t_interpol* vector, gint32 width, gint32 height);
|
||||
byte *compute_surface_mmx (t_interpol* vector, gint32 width, gint32 height);
|
||||
|
||||
|
||||
#endif /* __INFINITY_COMPUTE__ */
|
|
@ -0,0 +1,262 @@
|
|||
#include "config.h"
|
||||
#include "config-dialog.h"
|
||||
#include "gettext.h"
|
||||
|
||||
|
||||
ConfigDialog* config_dialog_new (void)
|
||||
{
|
||||
ConfigDialog *config_win;
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
GtkWidget *window_main;
|
||||
GtkWidget *vbox_main;
|
||||
GtkWidget *label_scale_factor;
|
||||
GtkWidget *hscale_scale_factor;
|
||||
GtkWidget *frame_general;
|
||||
GtkWidget *table_general;
|
||||
GtkWidget *label_effect;
|
||||
GtkWidget *label_palette;
|
||||
GtkWidget *label_fps;
|
||||
GtkWidget *checkbutton_show_title;
|
||||
GtkWidget *hscale_effect;
|
||||
GtkWidget *hscale_palette;
|
||||
GtkObject *spinbutton_fps_adj;
|
||||
GtkWidget *spinbutton_fps;
|
||||
GtkWidget *hbuttonbox_main;
|
||||
GtkWidget *button_ok;
|
||||
GtkWidget *button_cancel;
|
||||
GtkWidget *button_apply;
|
||||
|
||||
#if ENABLE_NLS
|
||||
setlocale (LC_MESSAGES, "");
|
||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
window_main = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_object_set_data (GTK_OBJECT (window_main), "window_main", window_main);
|
||||
gtk_window_set_title (GTK_WINDOW (window_main), _("Infinity Configuration"));
|
||||
gtk_window_set_type_hint (GTK_WINDOW (window_main), GDK_WINDOW_TYPE_HINT_DIALOG);
|
||||
|
||||
vbox_main = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_ref (vbox_main);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "vbox_main", vbox_main,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (vbox_main);
|
||||
gtk_container_add (GTK_CONTAINER (window_main), vbox_main);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox_main), 2);
|
||||
|
||||
frame_general = gtk_frame_new (_("Parameters"));
|
||||
gtk_widget_ref (frame_general);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "frame_general", frame_general,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (frame_general);
|
||||
gtk_box_pack_start (GTK_BOX (vbox_main), frame_general, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame_general), 2);
|
||||
|
||||
table_general = gtk_table_new (5, 3, FALSE);
|
||||
gtk_widget_ref (table_general);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "table_general", table_general,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (table_general);
|
||||
gtk_container_add (GTK_CONTAINER (frame_general), table_general);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table_general), 2);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table_general), 2);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table_general), 2);
|
||||
|
||||
label_effect = gtk_label_new (_("Effect period:"));
|
||||
gtk_widget_ref (label_effect);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "label_effect", label_effect,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label_effect);
|
||||
gtk_table_attach (GTK_TABLE (table_general), label_effect, 0, 1, 0, 1,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (label_effect), 0, 0.5);
|
||||
gtk_misc_set_padding (GTK_MISC (label_effect), 1, 0);
|
||||
|
||||
label_palette = gtk_label_new (_("Palette period:"));
|
||||
gtk_widget_ref (label_palette);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "label_palette", label_palette,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label_palette);
|
||||
gtk_table_attach (GTK_TABLE (table_general), label_palette, 0, 1, 1, 2,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (label_palette), 0, 0.5);
|
||||
gtk_misc_set_padding (GTK_MISC (label_palette), 1, 0);
|
||||
|
||||
label_scale_factor = gtk_label_new (_("Scale Factor"));
|
||||
gtk_widget_ref (label_scale_factor);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "label_scale_factor", label_scale_factor,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label_scale_factor);
|
||||
gtk_table_attach (GTK_TABLE (table_general), label_scale_factor, 0, 1, 2, 3,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (label_scale_factor), 0, 0.5);
|
||||
gtk_misc_set_padding (GTK_MISC (label_scale_factor), 1, 0);
|
||||
|
||||
label_fps = gtk_label_new (_("Maximum Frames per Second:"));
|
||||
gtk_widget_ref (label_fps);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "label_fps", label_fps,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (label_fps);
|
||||
gtk_table_attach (GTK_TABLE (table_general), label_fps, 0, 1, 3, 4,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (label_fps), 0, 0.5);
|
||||
gtk_misc_set_padding (GTK_MISC (label_fps), 1, 0);
|
||||
|
||||
checkbutton_show_title = gtk_check_button_new_with_label (_("Show current play title"));
|
||||
gtk_widget_ref (checkbutton_show_title);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "checkbutton_show_title", checkbutton_show_title,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (checkbutton_show_title);
|
||||
gtk_table_attach (GTK_TABLE (table_general), checkbutton_show_title, 0, 1, 4, 5,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
|
||||
tooltips = gtk_tooltips_new ();
|
||||
gtk_tooltips_set_tip (tooltips, checkbutton_show_title,
|
||||
_("Check it if you want to see the current play "
|
||||
"title on the Infinity's title bar"), NULL);
|
||||
|
||||
//spinbutton_fps_adj = gtk_adjustment_new (30, 5, 150, 1, 10, 0);
|
||||
spinbutton_fps_adj = gtk_adjustment_new (config_get_fps(), 5, 150, 1, 10, 0);
|
||||
spinbutton_fps = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_fps_adj), 1, 0);
|
||||
gtk_widget_ref (spinbutton_fps);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "spinbutton_fps", spinbutton_fps,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (spinbutton_fps);
|
||||
gtk_table_attach (GTK_TABLE (table_general), spinbutton_fps, 2, 3, 3, 4,
|
||||
(GtkAttachOptions) (0),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbutton_fps), GTK_UPDATE_IF_VALID);
|
||||
|
||||
hscale_effect = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (100, 50, 400, 0, 0, 0)));
|
||||
gtk_widget_ref (hscale_effect);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "hscale_effect", hscale_effect,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (hscale_effect);
|
||||
gtk_table_attach (GTK_TABLE (table_general), hscale_effect, 1, 3, 0, 1,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (hscale_effect), GTK_POS_LEFT);
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale_effect), 0);
|
||||
|
||||
gtk_tooltips_set_tip (tooltips, hscale_effect,
|
||||
_("Time to change between an effect and the "
|
||||
"next one, in milliseconds."), NULL);
|
||||
|
||||
hscale_palette = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (100, 50, 400, 0, 0, 0)));
|
||||
gtk_widget_ref (hscale_palette);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "hscale_palette", hscale_palette,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (hscale_palette);
|
||||
gtk_table_attach (GTK_TABLE (table_general), hscale_palette, 1, 3, 1, 2,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (hscale_palette), GTK_POS_LEFT);
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale_palette), 0);
|
||||
|
||||
gtk_tooltips_set_tip (tooltips, hscale_palette,
|
||||
_("Time to change between a color and the "
|
||||
"next one, in milliseconds."), NULL);
|
||||
|
||||
hscale_scale_factor = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 2, 0, 0, 0)));
|
||||
gtk_widget_ref (hscale_scale_factor);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "hscale_scale_factor", hscale_scale_factor,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (hscale_scale_factor);
|
||||
gtk_table_attach (GTK_TABLE (table_general), hscale_scale_factor, 1, 3, 2, 3,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (hscale_scale_factor), GTK_POS_LEFT);
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale_scale_factor), 0);
|
||||
|
||||
gtk_tooltips_set_tip (tooltips, hscale_scale_factor,
|
||||
_("Change only if the system doesn't have "
|
||||
"enough power to show the screen at "
|
||||
"a reasonably speed/size relation."), NULL);
|
||||
|
||||
hbuttonbox_main = gtk_hbutton_box_new ();
|
||||
gtk_widget_ref (hbuttonbox_main);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "hbuttonbox_main", hbuttonbox_main,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (hbuttonbox_main);
|
||||
gtk_box_pack_start (GTK_BOX (vbox_main), hbuttonbox_main, FALSE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox_main), 2);
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox_main), GTK_BUTTONBOX_END);
|
||||
|
||||
button_ok = gtk_button_new_with_label (_("Ok"));
|
||||
gtk_widget_ref (button_ok);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "button_ok", button_ok,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (button_ok);
|
||||
gtk_container_add (GTK_CONTAINER (hbuttonbox_main), button_ok);
|
||||
GTK_WIDGET_SET_FLAGS (button_ok, GTK_CAN_DEFAULT);
|
||||
|
||||
gtk_tooltips_set_tip (tooltips, button_ok,
|
||||
_("For to toggle to fullscreen mode, select "
|
||||
"the Infinity plugin window, and press "
|
||||
"the Tab key. Pressing Tab again will return "
|
||||
"to window mode."), NULL);
|
||||
|
||||
button_cancel = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_widget_ref (button_cancel);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "button_cancel", button_cancel,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (button_cancel);
|
||||
gtk_container_add (GTK_CONTAINER (hbuttonbox_main), button_cancel);
|
||||
GTK_WIDGET_SET_FLAGS (button_cancel, GTK_CAN_DEFAULT);
|
||||
|
||||
button_apply = gtk_button_new_with_label (_("Apply"));
|
||||
gtk_widget_ref (button_apply);
|
||||
gtk_object_set_data_full (GTK_OBJECT (window_main), "button_apply", button_apply,
|
||||
(GtkDestroyNotify) gtk_widget_unref);
|
||||
gtk_widget_show (button_apply);
|
||||
gtk_container_add (GTK_CONTAINER (hbuttonbox_main), button_apply);
|
||||
GTK_WIDGET_SET_FLAGS (button_apply, GTK_CAN_DEFAULT);
|
||||
|
||||
gtk_widget_grab_default (button_cancel);
|
||||
|
||||
config_win = g_new0 (ConfigDialog, 1);
|
||||
|
||||
config_win->window_main = window_main;
|
||||
|
||||
config_win->hscale_effect = hscale_effect;
|
||||
config_win->hscale_palette = hscale_palette;
|
||||
config_win->hscale_scale_factor = hscale_scale_factor;
|
||||
config_win->spinbutton_fps = spinbutton_fps;
|
||||
config_win->checkbutton_show_title = checkbutton_show_title;
|
||||
|
||||
config_win->button_ok = button_ok;
|
||||
config_win->button_cancel = button_cancel;
|
||||
config_win->button_apply = button_apply;
|
||||
|
||||
gtk_tooltips_enable (tooltips);
|
||||
|
||||
return config_win;
|
||||
}
|
||||
|
||||
void config_dialog_destroy (ConfigDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
|
||||
g_free (dialog);
|
||||
}
|
||||
|
||||
void config_dialog_show (ConfigDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
|
||||
gtk_window_present (GTK_WINDOW(dialog->window_main));
|
||||
}
|
||||
|
||||
void config_dialog_hide (ConfigDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
|
||||
gtk_widget_hide (dialog->window_main);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef __CONFIG_DIALOG_H__
|
||||
#define __CONFIG_DIALOG_H__
|
||||
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
/**
|
||||
* Here we have all the widgets of config dialog we need to interact to.
|
||||
*/
|
||||
typedef struct {
|
||||
|
||||
GtkWidget *window_main;
|
||||
|
||||
/* General stuff */
|
||||
GtkWidget *hscale_effect; /**< GtkHScale */
|
||||
GtkWidget *hscale_palette; /**< GtkHScale */
|
||||
GtkWidget *hscale_scale_factor; /**< GtkHScale */
|
||||
GtkWidget *spinbutton_fps; /**< GtkSpinButton */
|
||||
GtkWidget *checkbutton_show_title; /** GtkCheckButton */
|
||||
|
||||
/* Buttons */
|
||||
GtkWidget *button_ok; /**< GtkButton */
|
||||
GtkWidget *button_cancel; /**< GtkButton */
|
||||
GtkWidget *button_apply; /**< GtkButton */
|
||||
|
||||
} ConfigDialog;
|
||||
|
||||
|
||||
ConfigDialog* config_dialog_new (void);
|
||||
void config_dialog_destroy (ConfigDialog *dialog);
|
||||
|
||||
void config_dialog_show (ConfigDialog *dialog);
|
||||
void config_dialog_hide (ConfigDialog *dialog);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,183 @@
|
|||
#include "config.h"
|
||||
#include "cputest.h"
|
||||
#include "gettext.h"
|
||||
#include "glib.h"
|
||||
|
||||
|
||||
/* ebx saving is necessary for PIC. gcc seems unable to see it alone */
|
||||
#if MMX_DETECTION
|
||||
#define cpuid(index,eax,ebx,ecx,edx)\
|
||||
__asm __volatile\
|
||||
("movl %%ebx, %%esi\n\t"\
|
||||
"cpuid\n\t"\
|
||||
"xchgl %%ebx, %%esi"\
|
||||
: "=a" (eax), "=S" (ebx),\
|
||||
"=c" (ecx), "=d" (edx)\
|
||||
: "0" (index));
|
||||
#endif
|
||||
|
||||
|
||||
/* Function to test if multimedia instructions are supported... */
|
||||
int mm_support (void)
|
||||
{
|
||||
#if MMX_DETECTION
|
||||
int rval;
|
||||
int eax, ebx, ecx, edx;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
/* See if CPUID instruction is supported ... */
|
||||
/* ... Get copies of EFLAGS into eax and ecx */
|
||||
"pushf\n\t"
|
||||
"popl %0\n\t"
|
||||
"movl %0, %1\n\t"
|
||||
|
||||
/* ... Toggle the ID bit in one copy and store */
|
||||
/* to the EFLAGS reg */
|
||||
"xorl $0x200000, %0\n\t"
|
||||
"push %0\n\t"
|
||||
"popf\n\t"
|
||||
|
||||
/* ... Get the (hopefully modified) EFLAGS */
|
||||
"pushf\n\t"
|
||||
"popl %0\n\t"
|
||||
: "=a" (eax), "=c" (ecx)
|
||||
:
|
||||
: "cc"
|
||||
);
|
||||
|
||||
if (eax == ecx)
|
||||
return 0; /* CPUID not supported */
|
||||
|
||||
cpuid(0, eax, ebx, ecx, edx);
|
||||
|
||||
if (ebx == 0x756e6547 &&
|
||||
edx == 0x49656e69 &&
|
||||
ecx == 0x6c65746e) {
|
||||
|
||||
/* intel */
|
||||
inteltest:
|
||||
cpuid(1, eax, ebx, ecx, edx);
|
||||
if ((edx & 0x00800000) == 0)
|
||||
return 0;
|
||||
rval = MM_MMX;
|
||||
if (edx & 0x02000000)
|
||||
rval |= MM_MMXEXT | MM_SSE;
|
||||
if (edx & 0x04000000)
|
||||
rval |= MM_SSE2;
|
||||
return rval;
|
||||
} else if (ebx == 0x68747541 &&
|
||||
edx == 0x69746e65 &&
|
||||
ecx == 0x444d4163) {
|
||||
/* AMD */
|
||||
cpuid(0x80000000, eax, ebx, ecx, edx);
|
||||
if ((guint32)eax < 0x80000001)
|
||||
goto inteltest;
|
||||
cpuid(0x80000001, eax, ebx, ecx, edx);
|
||||
if ((edx & 0x00800000) == 0)
|
||||
return 0;
|
||||
rval = MM_MMX;
|
||||
if (edx & 0x80000000)
|
||||
rval |= MM_3DNOW;
|
||||
if (edx & 0x00400000)
|
||||
rval |= MM_MMXEXT;
|
||||
return rval;
|
||||
} else if (ebx == 0x746e6543 &&
|
||||
edx == 0x48727561 &&
|
||||
ecx == 0x736c7561) { /* "CentaurHauls" */
|
||||
/* VIA C3 */
|
||||
cpuid(0x80000000, eax, ebx, ecx, edx);
|
||||
if ((guint32)eax < 0x80000001)
|
||||
goto inteltest;
|
||||
cpuid(0x80000001, eax, ebx, ecx, edx);
|
||||
rval = 0;
|
||||
if( edx & ( 1 << 31) )
|
||||
rval |= MM_3DNOW;
|
||||
if( edx & ( 1 << 23) )
|
||||
rval |= MM_MMX;
|
||||
if( edx & ( 1 << 24) )
|
||||
rval |= MM_MMXEXT;
|
||||
return rval;
|
||||
} else if (ebx == 0x69727943 &&
|
||||
edx == 0x736e4978 &&
|
||||
ecx == 0x64616574) {
|
||||
/* Cyrix Section */
|
||||
/* See if extended CPUID level 80000001 is supported */
|
||||
/* The value of CPUID/80000001 for the 6x86MX is undefined
|
||||
according to the Cyrix CPU Detection Guide (Preliminary
|
||||
Rev. 1.01 table 1), so we'll check the value of eax for
|
||||
CPUID/0 to see if standard CPUID level 2 is supported.
|
||||
According to the table, the only CPU which supports level
|
||||
2 is also the only one which supports extended CPUID levels.
|
||||
*/
|
||||
if (eax != 2)
|
||||
goto inteltest;
|
||||
cpuid(0x80000001, eax, ebx, ecx, edx);
|
||||
if ((eax & 0x00800000) == 0)
|
||||
return 0;
|
||||
rval = MM_MMX;
|
||||
if (eax & 0x01000000)
|
||||
rval |= MM_MMXEXT;
|
||||
return rval;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
#else /* not MMX_DETECTION */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int mm_support_check_and_show ()
|
||||
{
|
||||
int r;
|
||||
gchar *msg, *tmp;
|
||||
|
||||
r = mm_support ();
|
||||
if (r & 0) {
|
||||
g_message ("Infinity: There is not MMX support\n");
|
||||
return r;
|
||||
}
|
||||
msg = g_strdup ("Infinity: Looking for Multimedia Extensions Support...");
|
||||
if (r & MM_MMX) {
|
||||
tmp = g_strconcat (msg, " MMX", 0);
|
||||
g_free (msg);
|
||||
msg = tmp;
|
||||
}
|
||||
if (r & MM_3DNOW) {
|
||||
tmp = g_strconcat (msg, " 3DNOW", 0);
|
||||
g_free (msg);
|
||||
msg = tmp;
|
||||
}
|
||||
if (r & MM_MMXEXT) {
|
||||
tmp = g_strconcat (msg, " MMX2", 0);
|
||||
g_free (msg);
|
||||
msg = tmp;
|
||||
}
|
||||
/*
|
||||
* for now this extensions are not used
|
||||
* if (r & MM_SSE) {
|
||||
* tmp = g_strconcat (msg, " SSE", 0);
|
||||
* g_free (msg);
|
||||
* msg = tmp;
|
||||
* }
|
||||
* if (r & MM_SSE2) {
|
||||
* tmp = g_strconcat (msg, " SSE2", 0);
|
||||
* g_free (msg);
|
||||
* msg = tmp;
|
||||
* }
|
||||
*/
|
||||
tmp = g_strconcat (msg, " detected", 0);
|
||||
g_free (msg);
|
||||
msg = tmp;
|
||||
g_message (msg);
|
||||
g_free (msg);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
int mmx_ok (void)
|
||||
{
|
||||
return ( mm_support() & 0x1 );
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
/* cputest.h
|
||||
|
||||
Cpu detection code, extracted from mmx.h ((c)1997-99 by H. Dietz
|
||||
and R. Fisher). Converted to C and improved by Fabrice Bellard
|
||||
*/
|
||||
#ifndef _CPUTEST_H_
|
||||
#define _CPUTEST_H_
|
||||
|
||||
|
||||
#define MM_MMX 0x0001 /* standard MMX */
|
||||
#define MM_3DNOW 0x0004 /* AMD 3DNOW */
|
||||
#define MM_MMXEXT 0x0002 /* SSE integer functions or AMD MMX ext */
|
||||
#define MM_SSE 0x0008 /* SSE functions */
|
||||
#define MM_SSE2 0x0010 /* PIV SSE2 functions */
|
||||
|
||||
/* should be defined by architectures supporting
|
||||
one or more MultiMedia extension */
|
||||
int mm_support (void);
|
||||
|
||||
/* return the result of mm_support and show the results
|
||||
to stdout */
|
||||
int mm_support_check_and_show (void);
|
||||
|
||||
/* Function to test if mmx instructions are supported...
|
||||
Returns 1 if MMX instructions are supported, 0 otherwise */
|
||||
int mmx_ok (void);
|
||||
|
||||
extern unsigned int mm_flags;
|
||||
|
||||
/*static inline void emms(void)
|
||||
{
|
||||
__asm __volatile ("emms;":::"memory");
|
||||
}*/
|
||||
|
||||
|
||||
#endif /* _CPUTEST_H_ */
|
|
@ -0,0 +1,497 @@
|
|||
/*
|
||||
* 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 Library 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 <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "display.h"
|
||||
#include "infconfig.h"
|
||||
#include "gettext.h"
|
||||
|
||||
|
||||
|
||||
#define wrap(a) ( a < 0 ? 0 : ( a > 255 ? 255 : a ))
|
||||
#define assign_max(p,a) ( *p <= a ? *p = a : 0 )
|
||||
|
||||
/*
|
||||
* SDL_HWSURFACE Surface is in video memory
|
||||
* SDL_HWPALETTE Surface has exclusive palette
|
||||
* SDL_DOUBLEBUF Set up double-buffered video mode
|
||||
* SDL_RESIZABLE This video mode may be resized
|
||||
*/
|
||||
#define VIDEO_FLAGS ((Uint32)(SDL_HWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF | SDL_RESIZABLE))
|
||||
|
||||
|
||||
typedef struct sincos {
|
||||
gint32 i;
|
||||
gfloat *f;
|
||||
} sincos_t;
|
||||
|
||||
|
||||
|
||||
static gint16 pcm_data[2][512];
|
||||
static SDL_mutex *pcm_data_mutex;
|
||||
|
||||
static t_screen_parameters scr_par;
|
||||
|
||||
/* Little optimization for cos/sin functions */
|
||||
static sincos_t cosw = { 0, NULL };
|
||||
static sincos_t sinw = { 0, NULL };
|
||||
|
||||
static vector_field_t *vector_field;
|
||||
|
||||
static SDL_Surface *screen = NULL;
|
||||
|
||||
static SDL_Color color_table[NB_PALETTES][256];
|
||||
static gint16 current_colors[256];
|
||||
|
||||
static byte* surface1;
|
||||
|
||||
|
||||
|
||||
static void init_sdl (gint32 width, gint32 height, gint32 scale)
|
||||
{
|
||||
if (SDL_Init((Uint32)(SDL_INIT_VIDEO | SDL_INIT_TIMER)) < 0)
|
||||
g_error (_("Infinity: Couldn't initialize SDL: %s\n"), SDL_GetError());
|
||||
screen = SDL_SetVideoMode (width * scale, height * scale, 16, VIDEO_FLAGS);
|
||||
if (screen == NULL)
|
||||
g_error (_("Infinity: could not init video mode: %s\n"), SDL_GetError());
|
||||
g_message (_("Infinity: SDL SetVideoMode() Ok"));
|
||||
(void)SDL_ShowCursor (0);
|
||||
(void)SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||
}
|
||||
|
||||
|
||||
static void generate_colors()
|
||||
{
|
||||
gint32 i, k;
|
||||
gfloat colors[NB_PALETTES][2][3] = {{{1.0,1.0,1.0},{1.0,1.0,1.0}},
|
||||
{{2.0,1.5,0.0},{0.0,0.5,2.0}},
|
||||
{{0.0,1.0,2.0},{0.0,1.0,0.0}},
|
||||
{{0.0,2.0,1.0},{0.0,0.0,1.0}},
|
||||
{{2.0,0.0,0.0},{0.0,1.0,1.0}}};
|
||||
|
||||
for (k = 0; k < NB_PALETTES; k++) {
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
color_table[k][i].r = (Uint8)(colors[k][0][0]*i);
|
||||
color_table[k][i].g = (Uint8)(colors[k][0][1]*i);
|
||||
color_table[k][i].b = (Uint8)(colors[k][0][2]*i);
|
||||
}
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
color_table[k][i+128].r = (Uint8)(colors[k][0][0]*127+colors[k][1][0]*i);
|
||||
color_table[k][i+128].g = (Uint8)(colors[k][0][1]*127+colors[k][1][1]*i);
|
||||
color_table[k][i+128].b = (Uint8)(colors[k][0][2]*127+colors[k][1][2]*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void display_surface ()
|
||||
|
||||
{
|
||||
gint32 i, j;
|
||||
gint16* pdest;
|
||||
byte* psrc;
|
||||
gboolean screen_locked;
|
||||
|
||||
if (SDL_MUSTLOCK(screen)) {
|
||||
if (SDL_LockSurface (screen) < 0) {
|
||||
g_error ("Infinity: Cannot lock screen: %s", SDL_GetError ());
|
||||
return ;
|
||||
}
|
||||
screen_locked = TRUE;
|
||||
} else
|
||||
screen_locked = FALSE;
|
||||
if (scr_par.scale > 1) {
|
||||
for (i = 0; i < scr_par.height; i++) {
|
||||
pdest = (gint16*)(screen->pixels + i * screen->pitch * scr_par.scale);
|
||||
psrc = surface1 + i * scr_par.width;
|
||||
if (scr_par.scale == 2) {
|
||||
for (j = 1; j < scr_par.width; j++) {
|
||||
*(pdest++) = current_colors[*psrc++];
|
||||
*(pdest) = *(pdest - 1);
|
||||
pdest++;
|
||||
}
|
||||
memcpy (screen->pixels + i * screen->pitch * 2 + screen->pitch,
|
||||
screen->pixels + i * screen->pitch * 2, screen->pitch);
|
||||
} /* else {
|
||||
for (j=1;j<scr_par.width;j++) {
|
||||
*(pdest++)=current_colors[*psrc++];
|
||||
*(pdest++)=*(pdest-1);
|
||||
*(pdest++)=*(pdest-1);
|
||||
}
|
||||
memcpy(screen->pixels+i*screen->pitch*3+screen->pitch,
|
||||
screen->pixels+i*screen->pitch*3,screen->pitch);
|
||||
memcpy(screen->pixels+i*screen->pitch*3+screen->pitch*2,
|
||||
screen->pixels+i*screen->pitch*3,screen->pitch);
|
||||
} */
|
||||
} /* for */
|
||||
} else {
|
||||
psrc = surface1;
|
||||
for (i = 0; i < scr_par.height; i++) {
|
||||
pdest = (gint16*)(screen->pixels + i * screen->pitch);
|
||||
for (j = 0; j < scr_par.width; j++)
|
||||
*pdest++ = current_colors[*psrc++];
|
||||
}
|
||||
}
|
||||
if (screen_locked)
|
||||
SDL_UnlockSurface (screen);
|
||||
else
|
||||
(void)SDL_Flip (screen);
|
||||
}
|
||||
|
||||
|
||||
#define plot1(x,y,c)\
|
||||
\
|
||||
if ((x)>0 && (x)<scr_par.width-3 && (y)>0 && (y)<scr_par.height-3)\
|
||||
assign_max(&(surface1)[(x)+(y)*scr_par.width],(c))\
|
||||
\
|
||||
|
||||
|
||||
#define plot2(x,y,c)\
|
||||
{\
|
||||
gint32 ty;\
|
||||
if ((x)>0 && (gint32)(x)<scr_par.width-3 && (y)>0 && (gint32)(y)<scr_par.height-3) {\
|
||||
ty = (gint32)(y)*scr_par.width;\
|
||||
assign_max((&(surface1)[(gint32)(x)+ty]),(c));\
|
||||
assign_max((&(surface1)[(gint32)(x)+1+ty]),(c));\
|
||||
assign_max((&(surface1)[(gint32)(x)+ty+scr_par.width]),(c));\
|
||||
assign_max((&(surface1)[(gint32)(x)+1+ty+scr_par.width]),(c));\
|
||||
}\
|
||||
}\
|
||||
|
||||
|
||||
#define SWAP(x,y)\
|
||||
x ^= y;\
|
||||
y ^= x;\
|
||||
x ^= y;
|
||||
|
||||
|
||||
static void line (gint32 x1, gint32 y1, gint32 x2, gint32 y2, gint32 c)
|
||||
{
|
||||
gint32 dx, dy, cxy,dxy;
|
||||
|
||||
/* calculate the distances */
|
||||
dx = abs (x1 - x2);
|
||||
dy = abs (y1 - y2);
|
||||
cxy = 0;
|
||||
if (dy > dx) {
|
||||
/* Follow Y axis */
|
||||
if (y1 > y2) {
|
||||
SWAP(y1, y2);
|
||||
SWAP(x1, x2);
|
||||
}
|
||||
if (x1 > x2)
|
||||
dxy = -1;
|
||||
else
|
||||
dxy = 1;
|
||||
for (y1=y1; y1<y2; y1++) {
|
||||
cxy += dx;
|
||||
if (cxy >= dy) {
|
||||
x1+= dxy;
|
||||
cxy -= dy;
|
||||
}
|
||||
plot1(x1, y1, (byte)c);
|
||||
}
|
||||
} else {
|
||||
/* Follow X axis */
|
||||
if (x1 > x2) {
|
||||
SWAP(x1, x2);
|
||||
SWAP(y1, y2);
|
||||
}
|
||||
if (y1 > y2)
|
||||
dxy = -1;
|
||||
else
|
||||
dxy = 1;
|
||||
|
||||
for (x1 = x1; x1 < x2; x1++) {
|
||||
cxy += dy;
|
||||
if (cxy >= dx) {
|
||||
y1 += dxy;
|
||||
cxy -= dx;
|
||||
}
|
||||
plot1(x1, y1, (byte)c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------*/
|
||||
/* Public functions */
|
||||
/*--------------------------------*/
|
||||
|
||||
|
||||
void display_init (void)
|
||||
{
|
||||
scr_par.width = config_get_xres();
|
||||
scr_par.height = config_get_yres();
|
||||
scr_par.scale = config_get_sres();
|
||||
|
||||
pcm_data_mutex = SDL_CreateMutex ();
|
||||
compute_init ();
|
||||
init_sdl (scr_par.width, scr_par.height, scr_par.scale);
|
||||
generate_colors ();
|
||||
effects_load_effects ();
|
||||
vector_field = compute_vector_field_new (scr_par.width, scr_par.height);
|
||||
compute_generate_vector_field (vector_field);
|
||||
}
|
||||
|
||||
|
||||
void display_quit (void)
|
||||
{
|
||||
compute_vector_field_destroy (vector_field);
|
||||
compute_quit();
|
||||
SDL_DestroyMutex (pcm_data_mutex);
|
||||
if (screen != NULL)
|
||||
SDL_FreeSurface (screen);
|
||||
screen = NULL;
|
||||
SDL_Quit ();
|
||||
}
|
||||
|
||||
|
||||
void display_resize (gint32 width, gint32 height)
|
||||
{
|
||||
scr_par.width = width;
|
||||
scr_par.height = height;
|
||||
screen = SDL_SetVideoMode (scr_par.width * scr_par.scale,
|
||||
scr_par.height * scr_par.scale,
|
||||
16, VIDEO_FLAGS);
|
||||
if (screen == NULL)
|
||||
g_error (_("Infinity: Couldn't set %dx%d video mode: %s\n"),
|
||||
scr_par.width * scr_par.scale, scr_par.height * scr_par.scale,
|
||||
SDL_GetError());
|
||||
compute_vector_field_destroy (vector_field);
|
||||
vector_field = compute_vector_field_new (width, height);
|
||||
compute_resize (width, height);
|
||||
compute_generate_vector_field (vector_field);
|
||||
}
|
||||
|
||||
|
||||
inline void display_set_pcm_data (gint16 data[2][512])
|
||||
{
|
||||
/* begin CS */
|
||||
g_return_if_fail (SDL_mutexP (pcm_data_mutex) >= 0);
|
||||
memcpy (pcm_data, data, 2*512*sizeof(gint16));
|
||||
g_return_if_fail (SDL_mutexV (pcm_data_mutex) >= 0);
|
||||
/* end CS */
|
||||
}
|
||||
|
||||
|
||||
void change_color (gint32 t2, gint32 t1, gint32 w)
|
||||
{
|
||||
gint32 i;
|
||||
gint32 r, g, b;
|
||||
|
||||
for (i = 0; i < 255; i++) {
|
||||
r = ((color_table[t1][i].r*w+color_table[t2][i].r*(256-w))>>11);
|
||||
g = ((color_table[t1][i].g*w+color_table[t2][i].g*(256-w))>>10);
|
||||
b = ((color_table[t1][i].b*w+color_table[t2][i].b*(256-w))>>11);
|
||||
current_colors[i] = (r << 11) + (g << 5) + b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void display_blur (guint32 vector_index)
|
||||
{
|
||||
surface1 = compute_surface (&(vector_field->vector[vector_index]),
|
||||
vector_field->width, vector_field->height);
|
||||
display_surface();
|
||||
}
|
||||
|
||||
|
||||
#if MMX_DETECTION
|
||||
inline void display_blur_mmx (guint32 vector_index)
|
||||
{
|
||||
surface1 = compute_surface_mmx (&(vector_field->vector[vector_index]),
|
||||
vector_field->width, vector_field->height);
|
||||
display_surface();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void spectral (t_effect* current_effect)
|
||||
{
|
||||
gint32 i, halfheight, halfwidth;
|
||||
gfloat old_y1,old_y2;
|
||||
gfloat y1, y2;
|
||||
const gint32 density_lines = 5;
|
||||
const gint32 step = 4;
|
||||
const gint32 shift = (current_effect->spectral_shift*scr_par.height)>>8;
|
||||
|
||||
/* begin CS */
|
||||
g_return_if_fail (SDL_mutexP (pcm_data_mutex) >= 0);
|
||||
y1 = (gfloat)((((pcm_data[0][0]+pcm_data[1][0])>>9)*current_effect->spectral_amplitude*scr_par.height)>>12);
|
||||
y2 = (gfloat)((((pcm_data[0][0]+pcm_data[1][0])>>9)*current_effect->spectral_amplitude*scr_par.height)>>12);
|
||||
if (cosw.i != scr_par.width || sinw.i != scr_par.width) {
|
||||
g_free (cosw.f);
|
||||
g_free (sinw.f);
|
||||
sinw.f = cosw.f = NULL;
|
||||
sinw.i = cosw.i = 0;
|
||||
}
|
||||
if (cosw.i == 0 || cosw.f == NULL) {
|
||||
gfloat halfPI = (gfloat)PI/2;
|
||||
cosw.i = scr_par.width;
|
||||
if (cosw.f != NULL)
|
||||
g_free (cosw.f);
|
||||
cosw.f = g_malloc (sizeof(gfloat) * scr_par.width);
|
||||
for (i=0; i<scr_par.width;i+=step)
|
||||
cosw.f[i] = cos((gfloat)i/scr_par.width*PI+halfPI);
|
||||
}
|
||||
if (sinw.i == 0 || sinw.f == NULL) {
|
||||
gfloat halfPI = (gfloat)PI/2;
|
||||
sinw.i = scr_par.width;
|
||||
if (sinw.f != NULL)
|
||||
g_free (sinw.f);
|
||||
sinw.f = g_malloc (sizeof(gfloat) * scr_par.width);
|
||||
for (i=0; i<scr_par.width;i+=step)
|
||||
sinw.f[i] = sin((gfloat)i/scr_par.width*PI+halfPI);
|
||||
}
|
||||
if (current_effect->mode_spectre==3) {
|
||||
if (y1<0.0)
|
||||
y1=0.0;
|
||||
if (y2<0.0)
|
||||
y2=0.0;
|
||||
}
|
||||
halfheight = scr_par.height >> 1;
|
||||
halfwidth = scr_par.width >> 1;
|
||||
for (i=step;i<scr_par.width;i+=step) {
|
||||
old_y1=y1;
|
||||
old_y2=y2;
|
||||
y1=(gfloat)(((pcm_data[1][(i<<9)/scr_par.width/density_lines]>>8)*
|
||||
current_effect->spectral_amplitude*scr_par.height)>>12);
|
||||
y2=(gfloat)(((pcm_data[0][(i<<9)/scr_par.width/density_lines]>>8)*
|
||||
current_effect->spectral_amplitude*scr_par.height)>>12);
|
||||
/* end CS */
|
||||
switch (current_effect->mode_spectre) {
|
||||
case 0:
|
||||
line(i-step,halfheight+shift+old_y2,
|
||||
i,halfheight+shift+y2,
|
||||
current_effect->spectral_color);
|
||||
break;
|
||||
case 1:
|
||||
line(i-step,halfheight+shift+old_y1,
|
||||
i,halfheight+shift+y1,
|
||||
current_effect->spectral_color);
|
||||
line(i-step,halfheight-shift+old_y2,
|
||||
i,halfheight-shift+y2,
|
||||
current_effect->spectral_color);
|
||||
break;
|
||||
case 2:
|
||||
line(i-step,halfheight+shift+old_y1,
|
||||
i,halfheight+shift+y1,
|
||||
current_effect->spectral_color);
|
||||
line(i-step,halfheight-shift+old_y1,
|
||||
i,halfheight-shift+y1,
|
||||
current_effect->spectral_color);
|
||||
line(halfwidth+shift+old_y2,i-step,
|
||||
halfwidth+shift+y2,i,
|
||||
current_effect->spectral_color);
|
||||
line(halfwidth-shift+old_y2,i-step,
|
||||
halfwidth-shift+y2,i,
|
||||
current_effect->spectral_color);
|
||||
break;
|
||||
case 3:
|
||||
if (y1<0.0)
|
||||
y1=0.0;
|
||||
if (y2<0.0)
|
||||
y2=0.0;
|
||||
case 4:
|
||||
line(halfwidth + cosw.f[i-step] * (shift+old_y1),
|
||||
halfheight + sinw.f[i-step] * (shift+old_y1),
|
||||
halfwidth + cosw.f[i] * (shift+y1),
|
||||
halfheight + sinw.f[i] * (shift+y1),
|
||||
current_effect->spectral_color);
|
||||
line(halfwidth - cosw.f[i-step] * (shift+old_y2),
|
||||
halfheight + sinw.f[i-step] * (shift+old_y2),
|
||||
halfwidth - cosw.f[i] * (shift+y2),
|
||||
halfheight + sinw.f[i] * (shift+y2),
|
||||
current_effect->spectral_color);
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_return_if_fail (SDL_mutexV (pcm_data_mutex) >= 0);
|
||||
if (current_effect->mode_spectre==3 || current_effect->mode_spectre==4)
|
||||
line(halfwidth + cosw.f[scr_par.width - step] * (shift+y1),
|
||||
halfheight + sinw.f[scr_par.width - step] * (shift+y1),
|
||||
halfwidth - cosw.f[scr_par.width - step] * (shift+y2),
|
||||
halfheight + sinw.f[scr_par.width - step] * (shift+y2),
|
||||
current_effect->spectral_color);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \todo current_effect->curve_color must be a byte. This is related to
|
||||
* t_effect typo.
|
||||
*/
|
||||
void curve (t_effect* current_effect)
|
||||
{
|
||||
gint32 i, j, k;
|
||||
gfloat v, vr;
|
||||
gfloat x, y;
|
||||
gfloat amplitude = (gfloat) current_effect->curve_amplitude / 256;
|
||||
|
||||
for (j = 0; j < 2; j++) {
|
||||
v = 80.0;
|
||||
vr = 0.001;
|
||||
k = current_effect->x_curve;
|
||||
for (i = 0;i < 64; i++) {
|
||||
x = cos((gfloat)(k)/(v+v*j*1.34))*scr_par.height*amplitude;
|
||||
y = sin((gfloat)(k)/(1.756*(v+v*j*0.93)))*scr_par.height*amplitude;
|
||||
plot2(x*cos((gfloat)k*vr)+y*sin((gfloat)k*vr)+scr_par.width/2,
|
||||
x*sin((gfloat)k*vr)-y*cos((gfloat)k*vr)+scr_par.height/2,
|
||||
(byte)current_effect->curve_color);
|
||||
k++;
|
||||
}
|
||||
}
|
||||
current_effect->x_curve = k;
|
||||
}
|
||||
|
||||
|
||||
void display_toggle_fullscreen (void)
|
||||
{
|
||||
if (SDL_WM_ToggleFullScreen (screen) < 0)
|
||||
g_warning (_("Cannot toggle to fullscreen mode: %s"), SDL_GetError());
|
||||
}
|
||||
|
||||
|
||||
void display_save_screen (void)
|
||||
{
|
||||
gchar name[256];
|
||||
|
||||
(void) snprintf (name, 255, "screenshot%i%s", rand () % 1000000, ".bmp");
|
||||
name[255] = '\0';
|
||||
if (SDL_SaveBMP (screen, name) < 0)
|
||||
g_warning (_("Error while saving file %s: %s"), name, SDL_GetError());
|
||||
else
|
||||
g_message (_("saved"));
|
||||
}
|
||||
|
||||
|
||||
inline void display_save_effect (t_effect *effect)
|
||||
{
|
||||
effects_save_effect (effect);
|
||||
}
|
||||
|
||||
|
||||
inline void display_load_random_effect (t_effect *effect)
|
||||
{
|
||||
effects_load_random_effect (effect);
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
* \file display.h
|
||||
*
|
||||
* \brief This module implements the necessary functions to draw
|
||||
* to the screen.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 Library 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 __INFINITY_DISPLAY__
|
||||
#define __INFINITY_DISPLAY__
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "compute.h"
|
||||
#include "effects.h"
|
||||
|
||||
|
||||
#define NB_PALETTES 5
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Initializes the display related structures.
|
||||
*
|
||||
* This function reads the user configuration options
|
||||
* and set his internal data structures accordingly.
|
||||
* It also initializes the SDL library.
|
||||
*
|
||||
* \warning Because this function initializes the SDL
|
||||
* library, must be called before to perform any SDL
|
||||
* operation and must not be called when SDL was already
|
||||
* started.
|
||||
*/
|
||||
void display_init (void);
|
||||
|
||||
/**
|
||||
* Closes the display module.
|
||||
*
|
||||
* It also closes the SDL library.
|
||||
*
|
||||
* \warning If you call this from a multithreaded application,
|
||||
* any thread must be calling display_set_pcm_data() while
|
||||
* inside this function, because display_set_pcm_data()
|
||||
* could be bloqued on a mutex, mutex that display_quit()
|
||||
* will destroy!
|
||||
*
|
||||
* \see display_init().
|
||||
*/
|
||||
void display_quit (void);
|
||||
|
||||
/**
|
||||
* Change the size of the display to the new dimension
|
||||
* \a width x \a height.
|
||||
*
|
||||
* It is supposed that this must be called when the display
|
||||
* screen is resized (i.e. when is resized the window where
|
||||
* the screen is embedded in).
|
||||
*/
|
||||
void display_resize (gint32 width, gint32 height);
|
||||
|
||||
/**
|
||||
* Set \a data as the data PCM data of this module.
|
||||
*
|
||||
* This function makes a copy of \a data.
|
||||
*
|
||||
* \warning This function locks a mutex, take that
|
||||
* into account.
|
||||
*
|
||||
* \see display_quit().
|
||||
*/
|
||||
void display_set_pcm_data (gint16 data[2][512]);
|
||||
|
||||
void display_show (void);
|
||||
|
||||
void change_color (gint32 old_p, gint32 p, gint32 w);
|
||||
void display_blur (guint32 vector_index);
|
||||
void display_blur_mmx (guint32 vector_index);
|
||||
void spectral (t_effect* current_effect);
|
||||
void curve (t_effect* current_effect);
|
||||
|
||||
/**
|
||||
* Makes the plugin screen switch to full screen mode.
|
||||
*
|
||||
* \see display_init().
|
||||
*/
|
||||
void display_toggle_fullscreen (void);
|
||||
|
||||
void display_save_screen (void);
|
||||
void display_save_effect (t_effect *effect);
|
||||
void display_load_random_effect (t_effect *effect);
|
||||
|
||||
|
||||
#endif /* __INFINITY_DISPLAY__ */
|
|
@ -0,0 +1,95 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include <effects.h>
|
||||
#include <gettext.h>
|
||||
#include <assert.h>
|
||||
|
||||
static t_effect effects[100];
|
||||
static gint32 nb_effects = 0;
|
||||
static gboolean initialized = FALSE;
|
||||
|
||||
|
||||
void effects_save_effect (t_effect *effect)
|
||||
{
|
||||
gchar datafile[256], path[256];
|
||||
FILE *f;
|
||||
gint32 i;
|
||||
|
||||
g_assert (effect);
|
||||
/** TODO Remove hardcoded path */
|
||||
f = fopen ("/usr/share/audacious/infinite_states","a");
|
||||
if (f == NULL) {
|
||||
g_warning (_("Could not be opened file %s for saving effects\n"),
|
||||
datafile);
|
||||
return ;
|
||||
}
|
||||
for (i = 0; i < sizeof(t_effect); i++)
|
||||
fputc (*((byte*)effect+i), f);
|
||||
fclose (f);
|
||||
}
|
||||
|
||||
|
||||
void effects_load_effects (void)
|
||||
{
|
||||
gchar path[255];
|
||||
gchar datafile[255];
|
||||
FILE *f;
|
||||
gint32 finished = 0;
|
||||
gint32 i, b, c, d, e;
|
||||
|
||||
f = fopen ("/usr/share/audacious/infinite_states","r");
|
||||
if (f == NULL) {
|
||||
g_warning (_("Could not be opened file %s for loading effects\n"),
|
||||
datafile);
|
||||
return ;
|
||||
}
|
||||
while (!finished) {
|
||||
byte* ptr_effect = (byte*)&effects[nb_effects];
|
||||
for (i=0;i < sizeof(t_effect); i+=4) {
|
||||
b=fgetc(f);
|
||||
if (b!=EOF) {
|
||||
c = fgetc(f);
|
||||
assert(c != EOF);
|
||||
d = fgetc(f);
|
||||
assert(d != EOF);
|
||||
e = fgetc(f);
|
||||
assert(e != EOF);
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
ptr_effect[i]=(byte)e;
|
||||
ptr_effect[i+1]=(byte)d;
|
||||
ptr_effect[i+2]=(byte)c;
|
||||
ptr_effect[i+3]=(byte)b;
|
||||
#else
|
||||
ptr_effect[i]=(byte)b;
|
||||
ptr_effect[i+1]=(byte)c;
|
||||
ptr_effect[i+2]=(byte)d;
|
||||
ptr_effect[i+3]=(byte)e;
|
||||
#endif
|
||||
} else
|
||||
finished=1;
|
||||
}
|
||||
nb_effects+=1;
|
||||
}
|
||||
nb_effects -= 1;
|
||||
fclose (f);
|
||||
}
|
||||
|
||||
void effects_load_random_effect (t_effect *effect)
|
||||
{
|
||||
gint32 trash;
|
||||
|
||||
if (!initialized) {
|
||||
srand (trash);
|
||||
initialized = TRUE;
|
||||
}
|
||||
if (nb_effects > 0) {
|
||||
gint32 num_effect = rand() % nb_effects;
|
||||
gint32 i;
|
||||
|
||||
for (i = 0; i < sizeof(t_effect); i++) {
|
||||
*((byte*)effect+i) = *((byte*)(&effects[num_effect])+i);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
/**
|
||||
* \file effects.h
|
||||
*
|
||||
* \brief This module implements the effects that will be drawed
|
||||
* to the screen.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 Library 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 __INFINITY_EFFECTS__
|
||||
#define __INFINITY_EFFECTS__
|
||||
|
||||
|
||||
#include <types.h>
|
||||
|
||||
|
||||
/**
|
||||
* Represents effect related information.
|
||||
*
|
||||
* \todo document structure fields. Some of them are two big, byte
|
||||
* would be enough for some of them.
|
||||
*/
|
||||
typedef struct {
|
||||
gint32 num_effect; /**< The number of the effect */
|
||||
gint32 x_curve;
|
||||
gint32 curve_color;
|
||||
gint32 curve_amplitude;
|
||||
gint32 spectral_amplitude;
|
||||
gint32 spectral_color;
|
||||
gint32 mode_spectre;
|
||||
gint32 spectral_shift;
|
||||
} t_effect;
|
||||
|
||||
/**
|
||||
* Saves the given effect pointed by \a effect to disk.
|
||||
*
|
||||
* The effect are saved to the file
|
||||
* {prefix}/share/xmms/infinity_states, where {prefix} is
|
||||
* usually /usr or /usr/local.
|
||||
*
|
||||
* @param effect Must be a non NULL reference to a ::t_effect
|
||||
* object.
|
||||
*/
|
||||
void effects_save_effect (t_effect *effect);
|
||||
|
||||
void effects_load_effects (void);
|
||||
void effects_load_random_effect (t_effect *effect);
|
||||
|
||||
|
||||
#endif /* __INFINITY_EFFECTS__ */
|
|
@ -0,0 +1,74 @@
|
|||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library 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 _LIBGETTEXT_H
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
/* NLS can be disabled through the configure --disable-nls option. */
|
||||
#if ENABLE_NLS
|
||||
|
||||
/* Get declarations of GNU message catalog functions. */
|
||||
# include <libintl.h>
|
||||
|
||||
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
|
||||
chokes if dcgettext is defined as a macro. So include it now, to make
|
||||
later inclusions of <locale.h> a NOP. We don't include <libintl.h>
|
||||
as well because people using "gettext.h" will not include <libintl.h>,
|
||||
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
|
||||
is OK. */
|
||||
/*#if defined(__sun) || HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif*/
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/* Disabled NLS.
|
||||
The casts to 'const char *' serve the purpose of producing warnings
|
||||
for invalid uses of the value returned from these functions.
|
||||
On pre-ANSI systems without 'const', the config.h file is supposed to
|
||||
contain "#define const". */
|
||||
# define gettext(Msgid) ((const char *) (Msgid))
|
||||
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
|
||||
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
|
||||
# define ngettext(Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define textdomain(Domainname) ((const char *) (Domainname))
|
||||
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
|
||||
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
|
||||
|
||||
#endif
|
||||
|
||||
/* A pseudo function call that serves as a marker for the automated
|
||||
extraction of messages, but does not call gettext(). The run-time
|
||||
translation is done at a different place in the code.
|
||||
The argument, String, should be a literal string. Concatenated strings
|
||||
and other string expressions won't work.
|
||||
The macro's expansion is not parenthesized, so that it is suitable as
|
||||
initializer for static 'char[]' or 'const char[]' variables. */
|
||||
#define gettext_noop(String) String
|
||||
|
||||
#define _(String) (gettext(String))
|
||||
|
||||
#endif /* _LIBGETTEXT_H */
|
|
@ -0,0 +1,467 @@
|
|||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "infconfig.h"
|
||||
#include "gettext.h"
|
||||
#include "config-dialog.h"
|
||||
|
||||
//#define DEFAULT_WIDTH 500
|
||||
#define DEFAULT_WIDTH 512
|
||||
//#define DEFAULT_HEIGHT 375
|
||||
#define DEFAULT_HEIGHT 288
|
||||
#define DEFAULT_TIME_EFFECT 100
|
||||
#define DEFAULT_TIME_PALETTE 100
|
||||
#define DEFAULT_SCALE_FACTOR 1
|
||||
#define DEFAULT_FPS 15
|
||||
#define DEFAULT_SHOW_TITLE TRUE
|
||||
|
||||
#define INFINITY_CONFIG_DIR "/.audacious/infinity"
|
||||
#define INFINITY_CONFIG_FILE (INFINITY_CONFIG_DIR "/infinity.ini")
|
||||
|
||||
typedef struct t_config {
|
||||
gint32 x, y;
|
||||
gint32 xres;
|
||||
gint32 yres;
|
||||
gint32 sres;
|
||||
gint32 teff;
|
||||
gint32 tcol;
|
||||
gint32 fps;
|
||||
gboolean show_title;
|
||||
} t_config;
|
||||
|
||||
|
||||
static t_config config = {-1, -1, 0, 0, 0, 0, 0, 0, DEFAULT_SHOW_TITLE};
|
||||
static ConfigDialog *configure_dialog = NULL;
|
||||
|
||||
/*
|
||||
* Here we save values selected on configure dialog, but which
|
||||
* have not been yet applied, so on cancel click we just forget
|
||||
* them.
|
||||
*/
|
||||
static t_config temp_config;
|
||||
|
||||
/*
|
||||
*
|
||||
* Private functions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Callbacks for config_plugin_config_window
|
||||
*/
|
||||
|
||||
static void scale_value_changed(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
temp_config.sres = ((gint32)(GTK_ADJUSTMENT(widget)->value));
|
||||
}
|
||||
|
||||
static void teff_value_changed(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
temp_config.teff = ((gint32)(GTK_ADJUSTMENT(widget)->value));
|
||||
}
|
||||
|
||||
static void tcol_value_changed(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
temp_config.tcol = ((gint32)(GTK_ADJUSTMENT(widget)->value));
|
||||
}
|
||||
|
||||
static void on_fps_changed (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gint32 value;
|
||||
|
||||
value = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(configure_dialog->spinbutton_fps));
|
||||
temp_config.fps = value;
|
||||
g_message ("fps changed to %d", value);
|
||||
}
|
||||
|
||||
static void on_show_title_toggled (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
temp_config.show_title = !temp_config.show_title;
|
||||
}
|
||||
|
||||
/*static gboolean check_cfg_version (ConfigFile *f)
|
||||
{
|
||||
gchar *vstr;
|
||||
|
||||
if (xmms_cfg_read_string (f, "infinity", "version", &vstr))
|
||||
if (!strcmp (vstr, PACKAGE_VERSION))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}*/
|
||||
|
||||
static void sync_options ()
|
||||
{
|
||||
/*g_message ("Synchronizing options: sres %d, teff %d, tcol %d, fps %d",
|
||||
temp_config.sres, temp_config.teff, temp_config.tcol, temp_config.fps);*/
|
||||
config_set_sres (temp_config.sres);
|
||||
config_set_teff (temp_config.teff);
|
||||
config_set_tcol (temp_config.tcol);
|
||||
config_set_fps (temp_config.fps);
|
||||
config_set_show_title (temp_config.show_title);
|
||||
}
|
||||
|
||||
static void apply_clicked (GtkWidget *w, GtkWidget *window)
|
||||
{
|
||||
g_message ("Applying changes ...");
|
||||
sync_options ();
|
||||
config_plugin_save_prefs();
|
||||
}
|
||||
|
||||
static void ok_clicked (GtkWidget *w, GtkWidget *window)
|
||||
{
|
||||
apply_clicked (w, window);
|
||||
config_dialog_hide (configure_dialog);
|
||||
}
|
||||
|
||||
static void cancel_clicked (GtkWidget *w, GtkWidget *window)
|
||||
{
|
||||
g_message ("Cancelling changes...");
|
||||
config_dialog_hide (configure_dialog);
|
||||
}
|
||||
|
||||
static void on_config_dialog_destroy (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
config_dialog_destroy (configure_dialog);
|
||||
configure_dialog = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function set widgets on configure dialog according with
|
||||
* saved values. This way after cancel on a configure dialog, if
|
||||
* we reopen it we get the saved values.
|
||||
*/
|
||||
static void set_config_values (ConfigDialog *config_dialog)
|
||||
{
|
||||
GtkAdjustment *teadj, *tcadj, *scale_adj;
|
||||
|
||||
g_return_if_fail (configure_dialog != NULL);
|
||||
|
||||
teadj = gtk_range_get_adjustment (GTK_RANGE(config_dialog->hscale_effect));
|
||||
gtk_adjustment_set_value (teadj, config_get_teff());
|
||||
|
||||
tcadj = gtk_range_get_adjustment (GTK_RANGE(config_dialog->hscale_palette));
|
||||
gtk_adjustment_set_value (tcadj, config_get_tcol());
|
||||
|
||||
scale_adj = gtk_range_get_adjustment (GTK_RANGE(config_dialog->hscale_scale_factor));
|
||||
gtk_adjustment_set_value (scale_adj, config_get_sres());
|
||||
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON(config_dialog->spinbutton_fps), config_get_fps());
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(config_dialog->checkbutton_show_title), config_get_show_title());
|
||||
|
||||
/* Memorize current values */
|
||||
temp_config.sres = config_get_sres();
|
||||
temp_config.teff = config_get_teff();
|
||||
temp_config.tcol = config_get_tcol();
|
||||
temp_config.fps = config_get_fps();
|
||||
temp_config.show_title = config_get_show_title();
|
||||
}
|
||||
|
||||
static void connect_callbacks (ConfigDialog *configure_dialog)
|
||||
{
|
||||
GtkAdjustment *teadj, *tcadj, *scale_adj;
|
||||
|
||||
g_return_if_fail (configure_dialog != NULL);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(configure_dialog->window_main), "destroy",
|
||||
GTK_SIGNAL_FUNC(on_config_dialog_destroy), NULL);
|
||||
|
||||
teadj = gtk_range_get_adjustment (GTK_RANGE(configure_dialog->hscale_effect));
|
||||
tcadj = gtk_range_get_adjustment (GTK_RANGE(configure_dialog->hscale_palette));
|
||||
scale_adj = gtk_range_get_adjustment (GTK_RANGE(configure_dialog->hscale_scale_factor));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(teadj), "value-changed",
|
||||
GTK_SIGNAL_FUNC(teff_value_changed), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(tcadj), "value-changed",
|
||||
GTK_SIGNAL_FUNC(tcol_value_changed), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(scale_adj), "value-changed",
|
||||
GTK_SIGNAL_FUNC(scale_value_changed), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(configure_dialog->spinbutton_fps), "changed",
|
||||
GTK_SIGNAL_FUNC(on_fps_changed), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(configure_dialog->checkbutton_show_title), "toggled",
|
||||
GTK_SIGNAL_FUNC(on_show_title_toggled), NULL);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(configure_dialog->button_ok), "clicked",
|
||||
GTK_SIGNAL_FUNC(ok_clicked), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(configure_dialog->button_cancel), "clicked",
|
||||
GTK_SIGNAL_FUNC(cancel_clicked), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(configure_dialog->button_apply), "clicked",
|
||||
GTK_SIGNAL_FUNC(apply_clicked), NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Public functions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
void config_plugin_load_prefs (void)
|
||||
{
|
||||
gint value;
|
||||
//gboolean bvalue;
|
||||
GKeyFile * kf;
|
||||
gchar * config_file_path;
|
||||
gboolean error, must_update, config_file_usable;
|
||||
|
||||
kf = g_key_file_new();
|
||||
config_file_path = g_strconcat (g_get_home_dir(), INFINITY_CONFIG_FILE, 0);
|
||||
config_file_usable = g_key_file_load_from_file (kf, config_file_path, G_KEY_FILE_KEEP_COMMENTS, NULL);
|
||||
error = must_update = FALSE;
|
||||
if (config_file_usable) {
|
||||
if (TRUE) {
|
||||
//TODO if (check_cfg_version (f)) {
|
||||
// g_message("version Ok");
|
||||
if ((value = g_key_file_get_integer (kf, "Preferences", "xres", NULL)) > 0) {
|
||||
config_set_xres (value);
|
||||
} else {
|
||||
error = TRUE;
|
||||
}
|
||||
if ((value = g_key_file_get_integer (kf, "Preferences", "yres", NULL)) > 0) {
|
||||
config_set_yres (value);
|
||||
} else {
|
||||
error = TRUE;
|
||||
}
|
||||
if ((value = g_key_file_get_integer (kf, "Preferences", "teff", NULL)) > 0) {
|
||||
config_set_teff (value);
|
||||
} else {
|
||||
error = TRUE;
|
||||
}
|
||||
if ((value = g_key_file_get_integer (kf, "Preferences", "tcol", NULL)) > 0) {
|
||||
config_set_tcol (value);
|
||||
} else {
|
||||
error = TRUE;
|
||||
}
|
||||
if ((value = g_key_file_get_integer (kf, "Preferences", "sres", NULL)) > 0) {
|
||||
config_set_sres (value);
|
||||
} else {
|
||||
error = TRUE;
|
||||
}
|
||||
if ((value = g_key_file_get_integer (kf, "Preferences", "fps", NULL)) > 0) {
|
||||
config_set_fps (value);
|
||||
} else {
|
||||
error = TRUE;
|
||||
}
|
||||
//config_set_show_title (g_key_file_get_boolean (kf, "Preferences", "show_title", NULL));
|
||||
|
||||
/* FIXME for now these are not used */
|
||||
//xmms_cfg_read_int (f, "infinity", "xorig", &value);
|
||||
//config_set_x (value);
|
||||
//xmms_cfg_read_int (f, "infinity", "yorig", &value);
|
||||
//config_set_y (value);
|
||||
} else {
|
||||
config_set_default_values ();
|
||||
must_update = TRUE;
|
||||
}
|
||||
} else {
|
||||
config_set_default_values ();
|
||||
must_update = TRUE;
|
||||
}
|
||||
g_free (config_file_path);
|
||||
g_key_file_free (kf);
|
||||
|
||||
if (error || must_update) {
|
||||
if (error)
|
||||
g_message ("Fixing errors on Infinity's configure file...");
|
||||
else
|
||||
g_message ("Updating Infinity's configure file...");
|
||||
|
||||
config_plugin_save_prefs();
|
||||
}
|
||||
}
|
||||
|
||||
void config_plugin_save_prefs (void)
|
||||
{
|
||||
gchar * config_file_path, * config_dir_path;
|
||||
GKeyFile * kf;
|
||||
gboolean ok;
|
||||
gchar * preferences;
|
||||
gsize length;
|
||||
|
||||
kf = g_key_file_new();
|
||||
config_dir_path = g_strconcat (g_get_home_dir(), INFINITY_CONFIG_DIR, 0);
|
||||
config_file_path = g_strconcat (g_get_home_dir(), INFINITY_CONFIG_FILE, 0);
|
||||
ok = g_key_file_load_from_file (kf, config_file_path, G_KEY_FILE_KEEP_COMMENTS, NULL);
|
||||
if (!ok) {
|
||||
g_message (_("Infinity plugin .ini file not found"));
|
||||
if (!g_file_test (config_dir_path, G_FILE_TEST_EXISTS)) {
|
||||
g_message (_("Creating Infinity plugin config directory '%s'"), INFINITY_CONFIG_DIR);
|
||||
if (g_mkdir_with_parents (config_dir_path, S_IRWXU) != 0) {
|
||||
|
||||
g_warning (_("Cannot save preferences: unable to create directory '%s'"), config_dir_path);
|
||||
g_free (config_file_path);
|
||||
g_free (config_dir_path);
|
||||
g_key_file_free (kf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!config_is_initialized ()) {
|
||||
config_set_default_values ();
|
||||
}
|
||||
//g_key_file_set_value (kf, "Preferences", "version", PACKAGE_VERSION);
|
||||
g_key_file_set_integer (kf, "Preferences", "xres", config_get_xres());
|
||||
g_key_file_set_integer (kf, "Preferences", "yres", config_get_yres());
|
||||
g_key_file_set_integer (kf, "Preferences", "teff", config_get_teff());
|
||||
g_key_file_set_integer (kf, "Preferences", "tcol", config_get_tcol());
|
||||
g_key_file_set_integer (kf, "Preferences", "sres", config_get_sres());
|
||||
g_key_file_set_integer (kf, "Preferences", "fps", config_get_fps());
|
||||
//g_key_file_set_boolean (kf, "Preferences", "show_title", config_get_show_title());
|
||||
preferences = g_key_file_to_data (kf, &length, NULL);
|
||||
ok = g_file_set_contents (config_file_path, preferences, length, NULL);
|
||||
if (!ok) {
|
||||
g_warning (_("Error saving preferences"));
|
||||
}
|
||||
g_free (preferences);
|
||||
g_free (config_file_path);
|
||||
g_free (config_dir_path);
|
||||
g_key_file_free (kf);
|
||||
}
|
||||
|
||||
void config_set_default_values (void)
|
||||
{
|
||||
config_set_x (20);
|
||||
config_set_y (10);
|
||||
config_set_xres (DEFAULT_WIDTH);
|
||||
config_set_yres (DEFAULT_HEIGHT);
|
||||
config_set_teff (DEFAULT_TIME_EFFECT);
|
||||
config_set_tcol (DEFAULT_TIME_PALETTE);
|
||||
config_set_sres (DEFAULT_SCALE_FACTOR);
|
||||
config_set_fps (DEFAULT_FPS);
|
||||
config_set_show_title (DEFAULT_SHOW_TITLE);
|
||||
}
|
||||
|
||||
|
||||
gboolean config_is_initialized (void)
|
||||
{
|
||||
/* FIXME mhm, ugly thing... */
|
||||
//return ((config.x > -1) && (config.y > -1) &&
|
||||
return ((config.xres != 0) && (config.yres != 0) &&
|
||||
(config.sres != 0) && (config.teff != 0) &&
|
||||
(config.tcol != 0) && (config.fps != 0));
|
||||
}
|
||||
|
||||
|
||||
void config_plugin_config_window (void)
|
||||
{
|
||||
#if ENABLE_NLS
|
||||
setlocale (LC_MESSAGES, "");
|
||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
if (configure_dialog) {
|
||||
set_config_values (configure_dialog);
|
||||
config_dialog_show (configure_dialog);
|
||||
return;
|
||||
}
|
||||
|
||||
config_plugin_load_prefs ();
|
||||
if (!config_is_initialized ()) {
|
||||
config_set_default_values ();
|
||||
}
|
||||
|
||||
configure_dialog = config_dialog_new ();
|
||||
|
||||
set_config_values (configure_dialog);
|
||||
|
||||
connect_callbacks (configure_dialog);
|
||||
|
||||
config_dialog_show (configure_dialog);
|
||||
}
|
||||
|
||||
void config_set_x (gint32 value)
|
||||
{
|
||||
config.x = value;
|
||||
}
|
||||
|
||||
void config_set_y (gint32 value)
|
||||
{
|
||||
config.y = value;
|
||||
}
|
||||
|
||||
void config_set_xres (gint32 value)
|
||||
{
|
||||
config.xres = value;
|
||||
}
|
||||
|
||||
void config_set_yres (gint32 value)
|
||||
{
|
||||
config.yres = value;
|
||||
}
|
||||
|
||||
void config_set_teff (gint32 value)
|
||||
{
|
||||
config.teff = value;
|
||||
}
|
||||
|
||||
void config_set_tcol (gint32 value)
|
||||
{
|
||||
config.tcol = value;
|
||||
}
|
||||
|
||||
void config_set_sres (gint32 value)
|
||||
{
|
||||
config.sres = value;
|
||||
}
|
||||
|
||||
void config_set_fps (gint32 value)
|
||||
{
|
||||
config.fps = value;
|
||||
}
|
||||
|
||||
void config_set_show_title (gboolean value)
|
||||
{
|
||||
config.show_title = value;
|
||||
}
|
||||
|
||||
gint32 config_get_x (void)
|
||||
{
|
||||
return config.x;
|
||||
}
|
||||
|
||||
gint32 config_get_y (void)
|
||||
{
|
||||
return config.y;
|
||||
}
|
||||
|
||||
gint32 config_get_xres (void)
|
||||
{
|
||||
return config.xres;
|
||||
}
|
||||
|
||||
gint32 config_get_yres (void)
|
||||
{
|
||||
return config.yres;
|
||||
}
|
||||
|
||||
gint32 config_get_teff (void)
|
||||
{
|
||||
return config.teff;
|
||||
}
|
||||
|
||||
gint32 config_get_tcol (void)
|
||||
{
|
||||
return config.tcol;
|
||||
}
|
||||
|
||||
gint32 config_get_sres (void)
|
||||
{
|
||||
return config.sres;
|
||||
}
|
||||
|
||||
gint32 config_get_fps (void)
|
||||
{
|
||||
return config.fps;
|
||||
}
|
||||
|
||||
gboolean config_get_show_title (void)
|
||||
{
|
||||
return config.show_title;
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* 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 Library 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 __INFINITY_CONFIG__
|
||||
#define __INFINITY_CONFIG__
|
||||
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
||||
/*
|
||||
* This structure is intended to be used for every module
|
||||
* that want to get your own copy of the screen parameters,
|
||||
* it is not used by the config module itself.
|
||||
* Is responsibility of the modules that create his own
|
||||
* copy of the screen parameters to keep consistent that
|
||||
* parameters with each other copy, it is not responsibility
|
||||
* of the config module.
|
||||
*/
|
||||
typedef struct _t_screen_parameters {
|
||||
gint32 x, y;
|
||||
gint32 width;
|
||||
gint32 height;
|
||||
gint32 scale;
|
||||
gint32 bpp; /**< bytes per pixels. */
|
||||
} t_screen_parameters;
|
||||
|
||||
|
||||
/*
|
||||
* Read user preferences from ~/.xmms/config file
|
||||
*/
|
||||
void config_plugin_load_prefs (void);
|
||||
|
||||
void config_plugin_save_prefs (void);
|
||||
|
||||
void config_set_default_values (void);
|
||||
|
||||
/*
|
||||
* \return TRUE if config_plugin_load_prefs() or
|
||||
* config_set_default_values() has been called.
|
||||
*/
|
||||
gboolean config_is_initialized (void);
|
||||
|
||||
/*
|
||||
* Open a window to let the user choose and
|
||||
* save your options.
|
||||
*/
|
||||
void config_plugin_config_window (void);
|
||||
|
||||
void config_set_x (gint32 value);
|
||||
void config_set_y (gint32 value);
|
||||
void config_set_xres (gint32 value);
|
||||
void config_set_yres (gint32 value);
|
||||
void config_set_teff (gint32 value);
|
||||
void config_set_tcol (gint32 value);
|
||||
void config_set_sres (gint32 value);
|
||||
void config_set_fps (gint32 value);
|
||||
void config_set_show_title (gboolean value);
|
||||
|
||||
gint32 config_get_x (void);
|
||||
gint32 config_get_y (void);
|
||||
gint32 config_get_xres (void);
|
||||
gint32 config_get_yres (void);
|
||||
gint32 config_get_teff (void);
|
||||
gint32 config_get_tcol (void);
|
||||
gint32 config_get_sres (void);
|
||||
gint32 config_get_fps (void);
|
||||
gboolean config_get_show_title (void);
|
||||
|
||||
|
||||
#endif /* __INFINITY_CONFIG__ */
|
Binary file not shown.
|
@ -0,0 +1,95 @@
|
|||
/**
|
||||
* \file main.c
|
||||
*
|
||||
* \brief The main module of Infinity plugin.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 Library 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 <string.h>
|
||||
#include <audacious/plugin.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "infconfig.h"
|
||||
#include "renderer.h"
|
||||
#include "gettext.h"
|
||||
|
||||
static void plugin_init (void);
|
||||
static void plugin_close (void);
|
||||
|
||||
/**
|
||||
* Structure shared with Audacious in order to register and get information
|
||||
* about the plugin.
|
||||
*/
|
||||
static VisPlugin infinity_vp = {
|
||||
.description = "Infinity",
|
||||
.num_pcm_chs_wanted = 2,
|
||||
.num_freq_chs_wanted = 0,
|
||||
.init = plugin_init,
|
||||
.cleanup = plugin_close,
|
||||
.configure = config_plugin_config_window,
|
||||
.playback_stop = NULL,
|
||||
.render_pcm = renderer_set_pcm_data,
|
||||
};
|
||||
|
||||
static void plugin_init(void)
|
||||
{
|
||||
#if ENABLE_NLS
|
||||
(void) setlocale (LC_MESSAGES, "");
|
||||
(void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
(void) textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
g_message (_("Infinity commands:\n"
|
||||
"- Space:\tchange effect.\n"
|
||||
"- Tab:\t\ttoggle full-screen.\n"
|
||||
"- Up/Down:\tup/down main volume.\n"
|
||||
"- Left/Right:\treward/forward actual played song, if any.\n"
|
||||
"- z:\t\tprevious song.\n"
|
||||
"- x:\t\tplay.\n"
|
||||
"- c:\t\tpause.\n"
|
||||
"- v:\t\tstop.\n"
|
||||
"- b:\t\tnext song.\n"
|
||||
"- Enter:\tswitch to interactive mode.\n\t\t(works only if infinity was configured with --enable-debug option)\n"
|
||||
"- F11:\t\tscreenshot.\n"
|
||||
"- F12:\t\tchange palette."));
|
||||
config_plugin_load_prefs ();
|
||||
renderer_set_plugin_info (&infinity_vp);
|
||||
renderer_init ();
|
||||
}
|
||||
|
||||
static void plugin_close (void)
|
||||
{
|
||||
config_plugin_save_prefs ();
|
||||
renderer_finish ();
|
||||
}
|
||||
|
||||
static void dummy (void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Public functions
|
||||
*
|
||||
*/
|
||||
|
||||
VisPlugin *infinity_vplist[] = { &infinity_vp, NULL };
|
||||
|
||||
DECLARE_PLUGIN (infinity, NULL, NULL, NULL, NULL, NULL, NULL, infinity_vplist, NULL);
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
/**
|
||||
* \file main.c
|
||||
*
|
||||
* \brief The main module of Infinity plugin.
|
||||
*
|
||||
* The only thing that a XMMS visualization plugin has to do
|
||||
* (from the point of view of XMMS) is to export a function called
|
||||
* get_vplugin_info() wich returns a pointer to a VisPlugin structure.
|
||||
* This struct is defined in xmms/plugin.h. It contains pointers to
|
||||
* functions which will be called on the ocurrence of certain events.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 Library 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 <string.h>
|
||||
#include <xmms/plugin.h>
|
||||
#include <xmms/configfile.h>
|
||||
#include <xmms/util.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "infconfig.h"
|
||||
#include "renderer.h"
|
||||
#include "gettext.h"
|
||||
|
||||
|
||||
VisPlugin *get_vplugin_info(void);
|
||||
|
||||
|
||||
static void plugin_init (void);
|
||||
static void plugin_close (void);
|
||||
static void plugin_about (void);
|
||||
|
||||
/**
|
||||
* Structure shared with XMMS in order to register and get information
|
||||
* about the plugin.
|
||||
*
|
||||
* The \a VisPlugin type is defined on <xmms/plugin.h>. XMMS will
|
||||
* obtain a reference to this structure calling ::get_vplugin_info()
|
||||
* when started.
|
||||
*/
|
||||
static VisPlugin sdlblur_vp = {
|
||||
NULL, /**< Handle, filled in by xmms */
|
||||
NULL, /**< Filename, filled in by xmms */
|
||||
0, /**< XMMS Session ID, filled in by XMMS */
|
||||
"Infinity " PACKAGE_VERSION, /**< description */
|
||||
2, /**< Number of PCM channels wanted */
|
||||
0, /**< Number of freq channels wanted */
|
||||
plugin_init, /**< Called when plugin is enabled */
|
||||
plugin_close, /**< Called when plugin is disabled */
|
||||
plugin_about, /**< Show the about box */
|
||||
config_plugin_config_window, /**< Show the configure box */
|
||||
NULL, /**<
|
||||
void (*disable_plugin)(struct _VisPlugin *)
|
||||
|
||||
Called to disable plugin, filled in by XMMS.
|
||||
Must be called with a pointer to our plugin
|
||||
struct to disable the plugin */
|
||||
NULL, /**< Called when playback starts */
|
||||
NULL, /**< Called when playback stops */
|
||||
renderer_set_pcm_data, /**< Render the PCM data */
|
||||
NULL, /**< Render the freq data */
|
||||
};
|
||||
|
||||
|
||||
static void plugin_init(void)
|
||||
{
|
||||
#if ENABLE_NLS
|
||||
(void) setlocale (LC_MESSAGES, "");
|
||||
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
(void) textdomain (PACKAGE);
|
||||
#endif
|
||||
|
||||
g_message (_("Infinity commands:\n"
|
||||
"- Space:\tchange effect.\n"
|
||||
"- Tab:\t\ttoggle full-screen.\n"
|
||||
"- Up/Down:\tup/down xmms main volume.\n"
|
||||
"- Left/Right:\treward/forward actual played song, if any.\n"
|
||||
"- z:\t\tprevious song.\n"
|
||||
"- x:\t\tplay.\n"
|
||||
"- c:\t\tpause.\n"
|
||||
"- v:\t\tstop.\n"
|
||||
"- b:\t\tnext song.\n"
|
||||
"- Enter:\tswitch to interactive mode.\n\t\t(works only if infinity was configured with --enable-debug option)\n"
|
||||
"- F11:\t\tscreenshot.\n"
|
||||
"- F12:\t\tchange palette."));
|
||||
config_plugin_load_prefs ();
|
||||
renderer_set_plugin_info (&sdlblur_vp);
|
||||
renderer_init ();
|
||||
}
|
||||
|
||||
|
||||
static void plugin_close (void)
|
||||
{
|
||||
config_plugin_save_prefs ();
|
||||
renderer_finish ();
|
||||
}
|
||||
|
||||
static void dummy (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
}
|
||||
|
||||
static void plugin_about (void)
|
||||
{
|
||||
GtkWidget *window_about;
|
||||
|
||||
#if ENABLE_NLS
|
||||
(void) setlocale (LC_MESSAGES, "");
|
||||
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
(void) textdomain (PACKAGE);
|
||||
#endif
|
||||
|
||||
window_about = xmms_show_message (_("About Infinity"),
|
||||
_("\n" PACKAGE_STRING "\n"
|
||||
"\n<http://infinity-plugin.sf.net>\n"
|
||||
"\nCopyright (C) 2000, Julien Carme.\n"
|
||||
"Email: <julien.carme@acm.org>\n"
|
||||
"\n"
|
||||
"Duilio J. Protti <dprotti@fceia.unr.edu.ar>\n"
|
||||
"Actual maintainer\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, dummy, NULL);
|
||||
|
||||
gtk_widget_show (window_about);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Public functions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Function to be exported to XMMS in order to register the plugin.
|
||||
*/
|
||||
VisPlugin *get_vplugin_info(void)
|
||||
{
|
||||
return &sdlblur_vp;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#include "xmms/plugin.h"
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_thread.h>
|
||||
|
||||
|
||||
#include "main.h"
|
||||
#include "renderer.h"
|
||||
|
||||
gint32 playing, finished, reset,closed;
|
||||
gint32 refreshed;
|
||||
gint16 pcm_data[2][512];
|
||||
gint16 freq_data[2][256];
|
||||
gint32 pcm_count=0, freq_count=0;
|
||||
gint32 tr;
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
finished=FALSE;
|
||||
closed=FALSE;
|
||||
/* mutex=SDL_CreateMutex(); */
|
||||
/* FIXME check if there is MMX support here */
|
||||
init_renderer();
|
||||
renderer();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,537 @@
|
|||
/* mmx.h
|
||||
|
||||
MultiMedia eXtensions GCC interface library for IA32.
|
||||
|
||||
To use this library, simply include this header file
|
||||
and compile with GCC. You MUST have inlining enabled
|
||||
in order for mmx_ok() to work; this can be done by
|
||||
simply using -O on the GCC command line.
|
||||
|
||||
Compiling with -DMMX_TRACE will cause detailed trace
|
||||
output to be sent to stderr for each mmx operation.
|
||||
This adds lots of code, and obviously slows execution to
|
||||
a crawl, but can be very useful for debugging.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
|
||||
LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR ANY PARTICULAR PURPOSE.
|
||||
|
||||
1997-99 by H. Dietz and R. Fisher
|
||||
|
||||
Notes:
|
||||
It appears that the latest gas has the pand problem fixed, therefore
|
||||
I'll undefine BROKEN_PAND by default.
|
||||
*/
|
||||
|
||||
#ifndef _MMX_H_
|
||||
#define _MMX_H_
|
||||
|
||||
|
||||
/* Warning: at this writing, the version of GAS packaged
|
||||
with most Linux distributions does not handle the
|
||||
parallel AND operation mnemonic correctly. If the
|
||||
symbol BROKEN_PAND is defined, a slower alternative
|
||||
coding will be used. If execution of mmxtest results
|
||||
in an illegal instruction fault, define this symbol.
|
||||
*/
|
||||
#undef BROKEN_PAND
|
||||
|
||||
|
||||
/* The type of an value that fits in an MMX register
|
||||
(note that long long constant values MUST be suffixed
|
||||
by LL and unsigned long long values by ULL, lest
|
||||
they be truncated by the compiler)
|
||||
*/
|
||||
typedef union {
|
||||
gint64 q; /* Quadword (64-bit) value */
|
||||
guint64 uq; /* Unsigned Quadword */
|
||||
gint32 d[2]; /* 2 Doubleword (32-bit) values */
|
||||
guint32 ud[2]; /* 2 Unsigned Doubleword */
|
||||
gint16 w[4]; /* 4 Word (16-bit) values */
|
||||
guint16 uw[4]; /* 4 Unsigned Word */
|
||||
gchar b[8]; /* 8 Byte (8-bit) values */
|
||||
guchar ub[8]; /* 8 Unsigned Byte */
|
||||
gfloat s[2]; /* Single-precision (32-bit) value */
|
||||
} __attribute__ ((aligned (8))) mmx_t; /* On an 8-byte (64-bit) boundary */
|
||||
|
||||
|
||||
|
||||
/* Helper functions for the instruction macros that follow...
|
||||
(note that memory-to-register, m2r, instructions are nearly
|
||||
as efficient as register-to-register, r2r, instructions;
|
||||
however, memory-to-memory instructions are really simulated
|
||||
as a convenience, and are only 1/3 as efficient)
|
||||
*/
|
||||
#ifdef MMX_TRACE
|
||||
|
||||
/* Include the stuff for printing a trace to stderr...
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define mmx_i2r(op, imm, reg) \
|
||||
{ \
|
||||
mmx_t mmx_trace; \
|
||||
mmx_trace.uq = (imm); \
|
||||
printf(#op "_i2r(" #imm "=0x%08x%08x, ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ ("movq %%" #reg ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#reg "=0x%08x%08x) => ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ (#op " %0, %%" #reg \
|
||||
: /* nothing */ \
|
||||
: "X" (imm)); \
|
||||
__asm__ __volatile__ ("movq %%" #reg ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#reg "=0x%08x%08x\n", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
}
|
||||
|
||||
#define mmx_m2r(op, mem, reg) \
|
||||
{ \
|
||||
mmx_t mmx_trace; \
|
||||
mmx_trace = (mem); \
|
||||
printf(#op "_m2r(" #mem "=0x%08x%08x, ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ ("movq %%" #reg ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#reg "=0x%08x%08x) => ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ (#op " %0, %%" #reg \
|
||||
: /* nothing */ \
|
||||
: "X" (mem)); \
|
||||
__asm__ __volatile__ ("movq %%" #reg ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#reg "=0x%08x%08x\n", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
}
|
||||
|
||||
#define mmx_r2m(op, reg, mem) \
|
||||
{ \
|
||||
mmx_t mmx_trace; \
|
||||
__asm__ __volatile__ ("movq %%" #reg ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#op "_r2m(" #reg "=0x%08x%08x, ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
mmx_trace = (mem); \
|
||||
printf(#mem "=0x%08x%08x) => ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ (#op " %%" #reg ", %0" \
|
||||
: "=X" (mem) \
|
||||
: /* nothing */ ); \
|
||||
mmx_trace = (mem); \
|
||||
printf(#mem "=0x%08x%08x\n", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
}
|
||||
|
||||
#define mmx_r2r(op, regs, regd) \
|
||||
{ \
|
||||
mmx_t mmx_trace; \
|
||||
__asm__ __volatile__ ("movq %%" #regs ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#op "_r2r(" #regs "=0x%08x%08x, ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ ("movq %%" #regd ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#regd "=0x%08x%08x) => ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ (#op " %" #regs ", %" #regd); \
|
||||
__asm__ __volatile__ ("movq %%" #regd ", %0" \
|
||||
: "=X" (mmx_trace) \
|
||||
: /* nothing */ ); \
|
||||
printf(#regd "=0x%08x%08x\n", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
}
|
||||
|
||||
#define mmx_m2m(op, mems, memd) \
|
||||
{ \
|
||||
mmx_t mmx_trace; \
|
||||
mmx_trace = (mems); \
|
||||
printf(#op "_m2m(" #mems "=0x%08x%08x, ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
mmx_trace = (memd); \
|
||||
printf(#memd "=0x%08x%08x) => ", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
__asm__ __volatile__ ("movq %0, %%mm0\n\t" \
|
||||
#op " %1, %%mm0\n\t" \
|
||||
"movq %%mm0, %0" \
|
||||
: "=X" (memd) \
|
||||
: "X" (mems)); \
|
||||
mmx_trace = (memd); \
|
||||
printf(#memd "=0x%08x%08x\n", \
|
||||
mmx_trace.d[1], mmx_trace.d[0]); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* These macros are a lot simpler without the tracing...
|
||||
*/
|
||||
|
||||
#define mmx_i2r(op, imm, reg) \
|
||||
__asm__ __volatile__ (#op " %0, %%" #reg \
|
||||
: /* nothing */ \
|
||||
: "X" (imm) )
|
||||
|
||||
#define mmx_m2r(op, mem, reg) \
|
||||
__asm__ __volatile__ (#op " %0, %%" #reg \
|
||||
: /* nothing */ \
|
||||
: "X" (mem))
|
||||
|
||||
#define mmx_r2m(op, reg, mem) \
|
||||
__asm__ __volatile__ (#op " %%" #reg ", %0" \
|
||||
: "=X" (mem) \
|
||||
: /* nothing */ )
|
||||
|
||||
#define mmx_r2r(op, regs, regd) \
|
||||
__asm__ __volatile__ (#op " %" #regs ", %" #regd)
|
||||
|
||||
#define mmx_m2m(op, mems, memd) \
|
||||
__asm__ __volatile__ ("movq %0, %%mm0\n\t" \
|
||||
#op " %1, %%mm0\n\t" \
|
||||
"movq %%mm0, %0" \
|
||||
: "=X" (memd) \
|
||||
: "X" (mems))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* 1x64 MOVe Quadword
|
||||
(this is both a load and a store...
|
||||
in fact, it is the only way to store)
|
||||
*/
|
||||
#define movq_m2r(var, reg) mmx_m2r(movq, var, reg)
|
||||
#define movq_r2m(reg, var) mmx_r2m(movq, reg, var)
|
||||
#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd)
|
||||
#define movq(vars, vard) \
|
||||
__asm__ __volatile__ ("movq %1, %%mm0\n\t" \
|
||||
"movq %%mm0, %0" \
|
||||
: "=X" (vard) \
|
||||
: "X" (vars))
|
||||
|
||||
|
||||
/* 1x32 MOVe Doubleword
|
||||
(like movq, this is both load and store...
|
||||
but is most useful for moving things between
|
||||
mmx registers and ordinary registers)
|
||||
*/
|
||||
#define movd_m2r(var, reg) mmx_m2r(movd, var, reg)
|
||||
#define movd_r2m(reg, var) mmx_r2m(movd, reg, var)
|
||||
#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd)
|
||||
#define movd(vars, vard) \
|
||||
__asm__ __volatile__ ("movd %1, %%mm0\n\t" \
|
||||
"movd %%mm0, %0" \
|
||||
: "=X" (vard) \
|
||||
: "X" (vars))
|
||||
|
||||
|
||||
/* 2x32, 4x16, and 8x8 Parallel ADDs
|
||||
*/
|
||||
#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg)
|
||||
#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd)
|
||||
#define paddd(vars, vard) mmx_m2m(paddd, vars, vard)
|
||||
|
||||
#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg)
|
||||
#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd)
|
||||
#define paddw(vars, vard) mmx_m2m(paddw, vars, vard)
|
||||
|
||||
#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg)
|
||||
#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd)
|
||||
#define paddb(vars, vard) mmx_m2m(paddb, vars, vard)
|
||||
|
||||
|
||||
/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic
|
||||
*/
|
||||
#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg)
|
||||
#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd)
|
||||
#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard)
|
||||
|
||||
#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg)
|
||||
#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd)
|
||||
#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard)
|
||||
|
||||
|
||||
/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic
|
||||
*/
|
||||
#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg)
|
||||
#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd)
|
||||
#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard)
|
||||
|
||||
#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg)
|
||||
#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd)
|
||||
#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard)
|
||||
|
||||
|
||||
/* 2x32, 4x16, and 8x8 Parallel SUBs
|
||||
*/
|
||||
#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg)
|
||||
#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd)
|
||||
#define psubd(vars, vard) mmx_m2m(psubd, vars, vard)
|
||||
|
||||
#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg)
|
||||
#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd)
|
||||
#define psubw(vars, vard) mmx_m2m(psubw, vars, vard)
|
||||
|
||||
#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg)
|
||||
#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd)
|
||||
#define psubb(vars, vard) mmx_m2m(psubb, vars, vard)
|
||||
|
||||
|
||||
/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic
|
||||
*/
|
||||
#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg)
|
||||
#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd)
|
||||
#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard)
|
||||
|
||||
#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg)
|
||||
#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd)
|
||||
#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard)
|
||||
|
||||
|
||||
/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic
|
||||
*/
|
||||
#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg)
|
||||
#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd)
|
||||
#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard)
|
||||
|
||||
#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg)
|
||||
#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd)
|
||||
#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard)
|
||||
|
||||
|
||||
/* 4x16 Parallel MULs giving Low 4x16 portions of results
|
||||
*/
|
||||
#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg)
|
||||
#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd)
|
||||
#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard)
|
||||
|
||||
|
||||
/* 4x16 Parallel MULs giving High 4x16 portions of results
|
||||
*/
|
||||
#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg)
|
||||
#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd)
|
||||
#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard)
|
||||
|
||||
|
||||
/* 4x16->2x32 Parallel Mul-ADD
|
||||
(muls like pmullw, then adds adjacent 16-bit fields
|
||||
in the multiply result to make the final 2x32 result)
|
||||
*/
|
||||
#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg)
|
||||
#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd)
|
||||
#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard)
|
||||
|
||||
|
||||
/* 1x64 bitwise AND
|
||||
*/
|
||||
#ifdef BROKEN_PAND
|
||||
#define pand_m2r(var, reg) \
|
||||
{ \
|
||||
mmx_m2r(pandn, (mmx_t) -1LL, reg); \
|
||||
mmx_m2r(pandn, var, reg); \
|
||||
}
|
||||
#define pand_r2r(regs, regd) \
|
||||
{ \
|
||||
mmx_m2r(pandn, (mmx_t) -1LL, regd); \
|
||||
mmx_r2r(pandn, regs, regd) \
|
||||
}
|
||||
#define pand(vars, vard) \
|
||||
{ \
|
||||
movq_m2r(vard, mm0); \
|
||||
mmx_m2r(pandn, (mmx_t) -1LL, mm0); \
|
||||
mmx_m2r(pandn, vars, mm0); \
|
||||
movq_r2m(mm0, vard); \
|
||||
}
|
||||
#else
|
||||
#define pand_m2r(var, reg) mmx_m2r(pand, var, reg)
|
||||
#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd)
|
||||
#define pand(vars, vard) mmx_m2m(pand, vars, vard)
|
||||
#endif
|
||||
|
||||
|
||||
/* 1x64 bitwise AND with Not the destination
|
||||
*/
|
||||
#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg)
|
||||
#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd)
|
||||
#define pandn(vars, vard) mmx_m2m(pandn, vars, vard)
|
||||
|
||||
|
||||
/* 1x64 bitwise OR
|
||||
*/
|
||||
#define por_m2r(var, reg) mmx_m2r(por, var, reg)
|
||||
#define por_r2r(regs, regd) mmx_r2r(por, regs, regd)
|
||||
#define por(vars, vard) mmx_m2m(por, vars, vard)
|
||||
|
||||
|
||||
/* 1x64 bitwise eXclusive OR
|
||||
*/
|
||||
#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg)
|
||||
#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd)
|
||||
#define pxor(vars, vard) mmx_m2m(pxor, vars, vard)
|
||||
|
||||
|
||||
/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality
|
||||
(resulting fields are either 0 or -1)
|
||||
*/
|
||||
#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg)
|
||||
#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd)
|
||||
#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard)
|
||||
|
||||
#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg)
|
||||
#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd)
|
||||
#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard)
|
||||
|
||||
#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg)
|
||||
#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd)
|
||||
#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard)
|
||||
|
||||
|
||||
/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than
|
||||
(resulting fields are either 0 or -1)
|
||||
*/
|
||||
#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg)
|
||||
#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd)
|
||||
#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard)
|
||||
|
||||
#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg)
|
||||
#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd)
|
||||
#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard)
|
||||
|
||||
#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg)
|
||||
#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd)
|
||||
#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard)
|
||||
|
||||
|
||||
/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical
|
||||
*/
|
||||
#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg)
|
||||
#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg)
|
||||
#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd)
|
||||
#define psllq(vars, vard) mmx_m2m(psllq, vars, vard)
|
||||
|
||||
#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg)
|
||||
#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg)
|
||||
#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd)
|
||||
#define pslld(vars, vard) mmx_m2m(pslld, vars, vard)
|
||||
|
||||
#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg)
|
||||
#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg)
|
||||
#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd)
|
||||
#define psllw(vars, vard) mmx_m2m(psllw, vars, vard)
|
||||
|
||||
|
||||
/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical
|
||||
*/
|
||||
#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg)
|
||||
#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg)
|
||||
#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd)
|
||||
#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard)
|
||||
|
||||
#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg)
|
||||
#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg)
|
||||
#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd)
|
||||
#define psrld(vars, vard) mmx_m2m(psrld, vars, vard)
|
||||
|
||||
#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg)
|
||||
#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg)
|
||||
#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd)
|
||||
#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard)
|
||||
|
||||
|
||||
/* 2x32 and 4x16 Parallel Shift Right Arithmetic
|
||||
*/
|
||||
#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg)
|
||||
#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg)
|
||||
#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd)
|
||||
#define psrad(vars, vard) mmx_m2m(psrad, vars, vard)
|
||||
|
||||
#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg)
|
||||
#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg)
|
||||
#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd)
|
||||
#define psraw(vars, vard) mmx_m2m(psraw, vars, vard)
|
||||
|
||||
|
||||
/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate
|
||||
(packs source and dest fields into dest in that order)
|
||||
*/
|
||||
#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg)
|
||||
#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd)
|
||||
#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard)
|
||||
|
||||
#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg)
|
||||
#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd)
|
||||
#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard)
|
||||
|
||||
|
||||
/* 4x16->8x8 PACK and Unsigned Saturate
|
||||
(packs source and dest fields into dest in that order)
|
||||
*/
|
||||
#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg)
|
||||
#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd)
|
||||
#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard)
|
||||
|
||||
|
||||
/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low
|
||||
(interleaves low half of dest with low half of source
|
||||
as padding in each result field)
|
||||
*/
|
||||
#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg)
|
||||
#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd)
|
||||
#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard)
|
||||
|
||||
#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg)
|
||||
#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd)
|
||||
#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard)
|
||||
|
||||
#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg)
|
||||
#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd)
|
||||
#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard)
|
||||
|
||||
|
||||
/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High
|
||||
(interleaves high half of dest with high half of source
|
||||
as padding in each result field)
|
||||
*/
|
||||
#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg)
|
||||
#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd)
|
||||
#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard)
|
||||
|
||||
#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg)
|
||||
#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd)
|
||||
#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard)
|
||||
|
||||
#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg)
|
||||
#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd)
|
||||
#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard)
|
||||
|
||||
|
||||
/* Empty MMx State
|
||||
(used to clean-up when going from mmx to float use
|
||||
of the registers that are shared by both; note that
|
||||
there is no float-to-mmx operation needed, because
|
||||
only the float tag word info is corruptible)
|
||||
*/
|
||||
#ifdef MMX_TRACE
|
||||
|
||||
#define emms() \
|
||||
{ \
|
||||
printf("emms()\n"); \
|
||||
__asm__ __volatile__ ("emms"); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define emms() __asm__ __volatile__ ("emms")
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _MMX_H_ */
|
|
@ -0,0 +1,620 @@
|
|||
/*
|
||||
* 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 Library 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 <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <glib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <dbus/dbus.h>
|
||||
|
||||
#include <audacious/audctrl.h>
|
||||
#include <audacious/dbus.h>
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_thread.h>
|
||||
/*#include <SDL/SDL_syswm.h>*/
|
||||
|
||||
#include "config.h"
|
||||
#include "gettext.h"
|
||||
#include "renderer.h"
|
||||
#include "infconfig.h"
|
||||
#include "effects.h"
|
||||
#include "display.h"
|
||||
|
||||
#if MMX_DETECTION
|
||||
#include "cputest.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define wrap(a) ( a < 0 ? 0 : ( a > 255 ? 255 : a ))
|
||||
#define next_effect() (t_last_effect += 1)
|
||||
#define next_color() (t_last_color += 1)
|
||||
|
||||
|
||||
typedef struct t_general_parameters {
|
||||
gint32 t_between_effects;
|
||||
gint32 t_between_colors;
|
||||
} t_general_parameters;
|
||||
|
||||
typedef gint32 t_color;
|
||||
typedef gint32 t_num_effect;
|
||||
|
||||
|
||||
static t_screen_parameters scr_par;
|
||||
|
||||
static t_effect current_effect;
|
||||
static t_general_parameters gen_par;
|
||||
static t_color color, old_color, t_last_color;
|
||||
static t_num_effect t_last_effect;
|
||||
|
||||
static gboolean must_resize;
|
||||
static gboolean finished;
|
||||
static gboolean resizing;
|
||||
static SDL_mutex *resizing_mutex;
|
||||
static gboolean initializing = FALSE;
|
||||
static gboolean visible;
|
||||
static gboolean quiting;
|
||||
static gboolean mode_interactif;
|
||||
static gboolean first_xevent;
|
||||
static gchar *current_title;
|
||||
static GTimer *title_timer;
|
||||
|
||||
/* VisPlugin structure that holds info shared with Audacious */
|
||||
static VisPlugin *plugin;
|
||||
static SDL_Thread *thread;
|
||||
|
||||
static DBusGConnection * connection = NULL;
|
||||
static DBusGProxy * dbus_proxy = NULL;
|
||||
|
||||
static gint32 event_filter (const SDL_Event *event);
|
||||
static void check_events ();
|
||||
static int renderer (void *);
|
||||
#if MMX_DETECTION
|
||||
static int renderer_mmx (void *);
|
||||
#endif
|
||||
static void set_title (void);
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Public functions
|
||||
*
|
||||
*/
|
||||
|
||||
void renderer_init (void)
|
||||
{
|
||||
GError * error = NULL;
|
||||
gint32 try;
|
||||
|
||||
if (initializing) {
|
||||
g_warning (_("We are already initializing"));
|
||||
try = 0;
|
||||
while (initializing) {
|
||||
g_usleep (1000000);
|
||||
(void) sleep (1);
|
||||
if (try++ > 10)
|
||||
return;
|
||||
}
|
||||
}
|
||||
initializing = TRUE;
|
||||
scr_par.width = config_get_xres();
|
||||
scr_par.height = config_get_yres();
|
||||
scr_par.scale = config_get_sres();
|
||||
|
||||
gen_par.t_between_effects = config_get_teff();
|
||||
gen_par.t_between_colors = config_get_tcol();
|
||||
|
||||
old_color = 0;
|
||||
color = 0;
|
||||
|
||||
finished = FALSE;
|
||||
must_resize = FALSE;
|
||||
resizing = FALSE;
|
||||
resizing_mutex = SDL_CreateMutex ();
|
||||
mode_interactif = FALSE;
|
||||
visible = TRUE;
|
||||
quiting = FALSE;
|
||||
first_xevent = TRUE;
|
||||
|
||||
display_init ();
|
||||
current_title = g_strdup ("Infinity");
|
||||
set_title();
|
||||
title_timer = g_timer_new ();
|
||||
g_timer_start (title_timer);
|
||||
display_load_random_effect (¤t_effect);
|
||||
|
||||
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
|
||||
dbus_proxy = dbus_g_proxy_new_for_name (connection, AUDACIOUS_DBUS_SERVICE,
|
||||
AUDACIOUS_DBUS_PATH,
|
||||
AUDACIOUS_DBUS_INTERFACE);
|
||||
|
||||
(void) SDL_EventState ((Uint8) SDL_ALLEVENTS, SDL_IGNORE);
|
||||
(void) SDL_EventState ((Uint8) SDL_VIDEORESIZE, SDL_ENABLE);
|
||||
(void) SDL_EventState ((Uint8) SDL_ACTIVEEVENT, SDL_ENABLE);
|
||||
(void) SDL_EventState ((Uint8) SDL_KEYDOWN, SDL_ENABLE);
|
||||
(void) SDL_EventState ((Uint8) SDL_QUIT, SDL_ENABLE);
|
||||
|
||||
SDL_SetEventFilter (event_filter);
|
||||
|
||||
#if MMX_DETECTION
|
||||
if (mm_support_check_and_show () != 0)
|
||||
thread = SDL_CreateThread (renderer_mmx,NULL);
|
||||
else
|
||||
#endif
|
||||
thread = SDL_CreateThread (renderer,NULL);
|
||||
}
|
||||
|
||||
|
||||
void renderer_finish (void)
|
||||
{
|
||||
gint32 try;
|
||||
|
||||
if (initializing) {
|
||||
g_warning (_("The plugin have not yet initialize"));
|
||||
try = 0;
|
||||
while (initializing) {
|
||||
g_usleep (1000000);
|
||||
if (try++ > 10)
|
||||
return;
|
||||
}
|
||||
}
|
||||
quiting = TRUE;
|
||||
finished = TRUE;
|
||||
SDL_WaitThread (thread, NULL);
|
||||
SDL_DestroyMutex (resizing_mutex);
|
||||
/*
|
||||
* Take some time to let it know renderer_set_pcm_data()
|
||||
* that must not call display_set_pcm_data().
|
||||
* If it do that while calling display_quit(),
|
||||
* we could make Audacious crash, because display_quit
|
||||
* destroy a mutex where display_set_pcm_data
|
||||
* could be blocked.
|
||||
*
|
||||
* See display.h::display_set_pcm_data()
|
||||
*/
|
||||
g_usleep (10000*SDL_TIMESLICE);
|
||||
display_quit ();
|
||||
g_timer_destroy (title_timer);
|
||||
g_object_unref (dbus_proxy);
|
||||
g_message ("Infinity: Closing...");
|
||||
}
|
||||
|
||||
|
||||
void renderer_set_plugin_info (VisPlugin *vplugin)
|
||||
{
|
||||
g_return_if_fail (vplugin != NULL);
|
||||
|
||||
if (initializing)
|
||||
return;
|
||||
plugin = vplugin;
|
||||
}
|
||||
|
||||
|
||||
void renderer_set_pcm_data (gint16 data[2][512])
|
||||
{
|
||||
if (!initializing && !quiting)
|
||||
display_set_pcm_data (data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Private functions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
static gint32 event_filter (const SDL_Event *event)
|
||||
{
|
||||
if (!event) {
|
||||
g_warning ("Infinity: SDL_Event is NULL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case SDL_VIDEORESIZE:
|
||||
g_return_val_if_fail (SDL_LockMutex (resizing_mutex) >= 0, 0);
|
||||
if (resizing) {
|
||||
g_return_val_if_fail (SDL_UnlockMutex (resizing_mutex) >= 0, 0);
|
||||
/*
|
||||
* VIDEORESIZE event is dropped
|
||||
* from the event queue
|
||||
*/
|
||||
return 0;
|
||||
} else {
|
||||
g_return_val_if_fail (SDL_UnlockMutex (resizing_mutex) >= 0, 0);
|
||||
return 1;
|
||||
}
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
case SDL_ACTIVEEVENT:
|
||||
if (event->active.state & SDL_APPACTIVE) {
|
||||
if (event->active.gain) {
|
||||
visible = TRUE;
|
||||
return 0;
|
||||
} else {
|
||||
visible = FALSE;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDL_QUIT:
|
||||
config_plugin_save_prefs();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static gint disable_func (gpointer data)
|
||||
{
|
||||
g_return_val_if_fail (plugin != NULL, FALSE);
|
||||
|
||||
plugin->disable_plugin (plugin);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static void check_events ()
|
||||
{
|
||||
SDL_Event event;
|
||||
//gint volume;
|
||||
|
||||
/*XEvent *xevent;
|
||||
XWindowChanges changes;
|
||||
XWindowAttributes attr;
|
||||
XSetWindowAttributes s_attr;*/
|
||||
|
||||
if (config_get_show_title()) {
|
||||
if (g_timer_elapsed (title_timer, NULL) > 1.0) {
|
||||
g_return_if_fail (plugin != NULL);
|
||||
if (audacious_remote_is_playing (dbus_proxy)) {
|
||||
if (current_title)
|
||||
g_free (current_title);
|
||||
current_title = g_strdup (audacious_remote_get_playlist_title (dbus_proxy, audacious_remote_get_playlist_pos (dbus_proxy)));
|
||||
set_title();
|
||||
}
|
||||
else {
|
||||
if (current_title)
|
||||
g_free (current_title);
|
||||
current_title = g_strdup ("Infinity");
|
||||
set_title();
|
||||
}
|
||||
g_timer_reset (title_timer);
|
||||
}
|
||||
}
|
||||
|
||||
while (SDL_PollEvent (&event)) {
|
||||
switch (event.type) {
|
||||
/*case SDL_SYSWMEVENT:
|
||||
g_message ("Infinity: SDL_SYSWMEVENT");
|
||||
if (event.syswm.msg != NULL) {
|
||||
if (event.syswm.msg->subsystem == SDL_SYSWM_X11) {
|
||||
xevent = &(event.syswm.msg->event.xevent);
|
||||
if (xevent == NULL)
|
||||
continue;
|
||||
if (first_xevent) {
|
||||
changes.x = config_get_x();
|
||||
changes.y = config_get_y();
|
||||
XConfigureWindow (xevent->xany.display,
|
||||
xevent->xany.window,
|
||||
CWX | CWY, &changes);
|
||||
first_xevent = FALSE;
|
||||
g_message ("Infinity: window moved to (%d,%d)",
|
||||
changes.x, changes.y);
|
||||
} else {
|
||||
XGetWindowAttributes (xevent->xany.display,
|
||||
xevent->xany.window,
|
||||
&attr);
|
||||
g_message ("Infinity: GetWindowAttributes (%d,%d)",
|
||||
attr.x, attr.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;*/
|
||||
case SDL_QUIT:
|
||||
GDK_THREADS_ENTER ();
|
||||
(void) gtk_idle_add (disable_func, NULL);
|
||||
GDK_THREADS_LEAVE ();
|
||||
break;
|
||||
case SDL_VIDEORESIZE:
|
||||
g_return_if_fail (SDL_LockMutex (resizing_mutex) >= 0);
|
||||
resizing = TRUE;
|
||||
g_return_if_fail (SDL_UnlockMutex (resizing_mutex) >= 0);
|
||||
scr_par.width = event.resize.w;
|
||||
scr_par.height = event.resize.h;
|
||||
g_message ("Infinity: Screen resized to %dx%d pixels^2",
|
||||
scr_par.width, scr_par.height);
|
||||
must_resize = TRUE;
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (event.key.keysym.sym) {
|
||||
case SDLK_RIGHT:
|
||||
if (audacious_remote_is_playing (dbus_proxy))
|
||||
audacious_remote_jump_to_time (dbus_proxy,
|
||||
audacious_remote_get_output_time (dbus_proxy) + 5000);
|
||||
break;
|
||||
case SDLK_LEFT:
|
||||
if (audacious_remote_is_playing (dbus_proxy))
|
||||
audacious_remote_jump_to_time (dbus_proxy,
|
||||
audacious_remote_get_output_time (dbus_proxy) - 5000);
|
||||
break;
|
||||
/* FIXME Audacious freezes when buttons are pressed in a quick sequence
|
||||
case SDLK_UP:
|
||||
volume = audacious_remote_get_main_volume (dbus_proxy);
|
||||
g_message(_("Increasing volume to %d"), volume + 5);
|
||||
audacious_remote_set_main_volume (dbus_proxy, volume + 5);
|
||||
break;
|
||||
case SDLK_DOWN:
|
||||
volume = audacious_remote_get_main_volume (dbus_proxy);
|
||||
g_message(_("Decreasing volume to %d"), volume - 5);
|
||||
audacious_remote_set_main_volume (dbus_proxy, volume - 5);
|
||||
break;*/
|
||||
case SDLK_TAB:
|
||||
display_toggle_fullscreen ();
|
||||
break;
|
||||
case SDLK_z:
|
||||
audacious_remote_playlist_prev (dbus_proxy);
|
||||
break;
|
||||
case SDLK_x:
|
||||
audacious_remote_play (dbus_proxy);
|
||||
break;
|
||||
case SDLK_c:
|
||||
audacious_remote_pause (dbus_proxy);
|
||||
break;
|
||||
case SDLK_v:
|
||||
audacious_remote_stop (dbus_proxy);
|
||||
break;
|
||||
case SDLK_b:
|
||||
audacious_remote_playlist_next (dbus_proxy);
|
||||
break;
|
||||
case SDLK_F11:
|
||||
display_save_screen ();
|
||||
break;
|
||||
case SDLK_F12:
|
||||
if (t_last_color>32) {
|
||||
t_last_color = 0;
|
||||
old_color = color;
|
||||
color = (color + 1) % NB_PALETTES;
|
||||
}
|
||||
break;
|
||||
case SDLK_SPACE:
|
||||
display_load_random_effect (¤t_effect);
|
||||
t_last_effect = 0;
|
||||
break;
|
||||
#ifdef INFINITY_DEBUG
|
||||
case SDLK_RETURN:
|
||||
mode_interactif = !mode_interactif;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break; /* SDLK_KEYDOWN */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef INFINITY_DEBUG
|
||||
if (mode_interactif) {
|
||||
gint32 i;
|
||||
gint32 sx, sy;
|
||||
byte* keystate;
|
||||
|
||||
keystate = SDL_GetKeyState(NULL);
|
||||
SDL_GetMouseState (&sx, &sy);
|
||||
current_effect.spectral_shift = sx;
|
||||
if ( keystate[SDLK_a])
|
||||
current_effect.curve_color = wrap (current_effect.curve_color - 32);
|
||||
if ( keystate[SDLK_z])
|
||||
current_effect.curve_color = wrap (current_effect.curve_color + 32);
|
||||
if ( keystate[SDLK_q])
|
||||
current_effect.spectral_color = wrap (current_effect.spectral_color - 32);
|
||||
if ( keystate[SDLK_s])
|
||||
current_effect.spectral_color = wrap (current_effect.spectral_color + 32);
|
||||
for (i = 0; i < 10; i++)
|
||||
if ( keystate[SDLK_F1 + i])
|
||||
current_effect.num_effect = i % NB_FCT;
|
||||
if (keystate[SDLK_d])
|
||||
current_effect.spectral_amplitude = (current_effect.spectral_amplitude - 1);
|
||||
if (keystate[SDLK_f])
|
||||
current_effect.spectral_amplitude = (current_effect.spectral_amplitude + 1);
|
||||
if (keystate[SDLK_e])
|
||||
current_effect.curve_amplitude = (current_effect.curve_amplitude - 1);
|
||||
if (keystate[SDLK_r])
|
||||
current_effect.curve_amplitude = (current_effect.curve_amplitude + 1);
|
||||
if ( keystate[SDLK_m])
|
||||
display_save_effect (¤t_effect);
|
||||
if ( keystate[SDLK_w])
|
||||
current_effect.mode_spectre = (current_effect.mode_spectre + 1) % 5;
|
||||
}
|
||||
#endif /* INFINITY_DEBUG */
|
||||
}
|
||||
|
||||
|
||||
static int renderer (void *arg)
|
||||
{
|
||||
gint32 render_time, now;
|
||||
gint32 frame_length;
|
||||
gint32 idle_time;
|
||||
gint32 fps, new_fps;
|
||||
|
||||
/* We suppose here that config module have been initialized */
|
||||
fps = config_get_fps();
|
||||
frame_length = (gint32)((1.0 / config_get_fps()) * 1000);
|
||||
g_message ("Infinity[%d]: setting maximum rate at ~%d frames/second", __LINE__, fps);
|
||||
initializing = FALSE;
|
||||
for (;;) { /* ever... */
|
||||
if (!visible) {
|
||||
check_events ();
|
||||
if (finished)
|
||||
break;
|
||||
g_usleep (3000*frame_length);
|
||||
continue;
|
||||
}
|
||||
check_events();
|
||||
if (finished)
|
||||
break;
|
||||
if (must_resize) {
|
||||
display_resize (scr_par.width, scr_par.height);
|
||||
config_set_xres (scr_par.width);
|
||||
config_set_yres (scr_par.height);
|
||||
must_resize = FALSE;
|
||||
g_return_val_if_fail (SDL_LockMutex (resizing_mutex) >= 0, -1);
|
||||
resizing = FALSE;
|
||||
g_return_val_if_fail (SDL_UnlockMutex (resizing_mutex) >= 0, -1);
|
||||
}
|
||||
render_time = (gint32) SDL_GetTicks ();
|
||||
display_blur (scr_par.width*scr_par.height*current_effect.num_effect);
|
||||
spectral (¤t_effect);
|
||||
curve (¤t_effect);
|
||||
if (t_last_color <= 32) {
|
||||
change_color (old_color, color, t_last_color*8);
|
||||
}
|
||||
next_color ();
|
||||
next_effect ();
|
||||
if (t_last_effect % gen_par.t_between_effects == 0) {
|
||||
#ifdef INFINITY_DEBUG
|
||||
if (!mode_interactif) {
|
||||
display_load_random_effect (¤t_effect);
|
||||
t_last_effect = 0;
|
||||
}
|
||||
#else
|
||||
display_load_random_effect (¤t_effect);
|
||||
t_last_effect = 0;
|
||||
#endif
|
||||
}
|
||||
if (t_last_color % gen_par.t_between_colors == 0) {
|
||||
#ifdef INFINITY_DEBUG
|
||||
if (!mode_interactif) {
|
||||
old_color = color;
|
||||
color = rand() % NB_PALETTES;
|
||||
t_last_color = 0;
|
||||
}
|
||||
#else
|
||||
old_color = color;
|
||||
color = rand() % NB_PALETTES;
|
||||
t_last_color = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
new_fps = config_get_fps();
|
||||
if (new_fps != fps) {
|
||||
fps = new_fps;
|
||||
frame_length = (gint32)(((1.0 / fps) * 1000));
|
||||
g_message ("Infinity[%d]: setting maximum rate at ~%d frames/second", __LINE__, fps);
|
||||
}
|
||||
|
||||
now = (gint32) SDL_GetTicks ();
|
||||
if ((idle_time = (now - render_time)) < frame_length)
|
||||
g_usleep (idle_time*900);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#if MMX_DETECTION
|
||||
static int renderer_mmx (void *arg)
|
||||
{
|
||||
gint32 render_time, now;
|
||||
gint32 frame_length;
|
||||
gint32 idle_time;
|
||||
gint32 fps, new_fps;
|
||||
|
||||
/* We suppose here that config module have been initialized */
|
||||
fps = config_get_fps();
|
||||
frame_length = ((1.0 / fps) * 1000);
|
||||
g_message ("Infinity[%d]: setting maximum rate at ~%d frames/second", __LINE__, fps);
|
||||
initializing = FALSE;
|
||||
for (;;) { /* ever... */
|
||||
if (!visible) {
|
||||
check_events ();
|
||||
if (finished)
|
||||
break;
|
||||
g_usleep (3000*frame_length);
|
||||
continue;
|
||||
}
|
||||
check_events ();
|
||||
if (finished)
|
||||
break;
|
||||
if (must_resize) {
|
||||
display_resize (scr_par.width, scr_par.height);
|
||||
config_set_xres (scr_par.width);
|
||||
config_set_yres (scr_par.height);
|
||||
must_resize = FALSE;
|
||||
g_return_val_if_fail (SDL_LockMutex (resizing_mutex) >= 0, -1);
|
||||
resizing = FALSE;
|
||||
g_return_val_if_fail (SDL_UnlockMutex (resizing_mutex) >= 0, -1);
|
||||
}
|
||||
render_time = SDL_GetTicks ();
|
||||
display_blur_mmx (scr_par.width * scr_par.height * current_effect.num_effect);
|
||||
spectral (¤t_effect);
|
||||
curve (¤t_effect);
|
||||
if (t_last_color <= 32) {
|
||||
change_color (old_color, color, t_last_color*8);
|
||||
}
|
||||
next_color ();
|
||||
next_effect ();
|
||||
if (t_last_effect % gen_par.t_between_effects == 0) {
|
||||
#ifdef INFINITY_DEBUG
|
||||
if (!mode_interactif) {
|
||||
display_load_random_effect (¤t_effect);
|
||||
t_last_effect = 0;
|
||||
}
|
||||
#else
|
||||
display_load_random_effect (¤t_effect);
|
||||
t_last_effect = 0;
|
||||
#endif
|
||||
}
|
||||
if (t_last_color % gen_par.t_between_colors == 0) {
|
||||
#ifdef INFINITY_DEBUG
|
||||
if (!mode_interactif) {
|
||||
old_color = color;
|
||||
color = rand() % NB_PALETTES;
|
||||
t_last_color = 0;
|
||||
}
|
||||
#else
|
||||
old_color = color;
|
||||
color = rand() % NB_PALETTES;
|
||||
t_last_color = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
new_fps = config_get_fps();
|
||||
if (new_fps != fps) {
|
||||
fps = new_fps;
|
||||
frame_length = ((1.0 / fps) * 1000);
|
||||
g_message ("Infinity[%d]: setting maximum rate at ~%d frames/second", __LINE__, fps);
|
||||
}
|
||||
|
||||
now = SDL_GetTicks ();
|
||||
if ((idle_time = (now - render_time)) < frame_length)
|
||||
g_usleep (idle_time*900);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* MMX_DETECTION */
|
||||
|
||||
static void set_title (void)
|
||||
{
|
||||
SDL_WM_SetCaption (current_title, "Infinity");
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
/**
|
||||
* \file renderer.h
|
||||
*
|
||||
* \brief This module control the rendering process and his interaction
|
||||
* with the events that affects the application.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 Library 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 __INFINITY_RENDERER__
|
||||
#define __INFINITY_RENDERER__
|
||||
|
||||
#include <audacious/plugin.h>
|
||||
#include <glib.h>
|
||||
|
||||
|
||||
/**
|
||||
* Initializes the rendering process.
|
||||
*
|
||||
* It reads the plugin's configuration parameters and launchs
|
||||
* a thread on which almost all the job of the plugin will be
|
||||
* done.
|
||||
*/
|
||||
void renderer_init (void);
|
||||
|
||||
/**
|
||||
* Closes the rendering process.
|
||||
*/
|
||||
void renderer_finish (void);
|
||||
|
||||
/*
|
||||
* Set a reference to a structure where there is the
|
||||
* information about the plugin.
|
||||
*
|
||||
* @param vplugin Must be a non NULL reference to an
|
||||
* Audacity VisPlugin structure properly initialized.
|
||||
*
|
||||
* \see <xmms/plugin.h>
|
||||
*/
|
||||
void renderer_set_plugin_info (VisPlugin *vplugin);
|
||||
|
||||
/**
|
||||
* Copy the actual PCM data from Audacity.
|
||||
*
|
||||
* It is supposed that this function is called periodically
|
||||
* by Audacity copying the PCM data which corresponds to the
|
||||
* current sound played.
|
||||
*/
|
||||
void renderer_set_pcm_data (gint16 data[2][512]);
|
||||
|
||||
|
||||
#endif /* __INFINITY_RENDERER__ */
|
|
@ -0,0 +1,396 @@
|
|||
#include <math.h>
|
||||
#include <xmms/plugin.h>
|
||||
/*#include "libxmms/util.h"*/
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
#define wrap(a) ( a < 0 ? 0 : ( a > 255 ? 255 : a ))
|
||||
#define PI 3.14159
|
||||
|
||||
#define WIDTH 400
|
||||
#define HEIGHT 300
|
||||
|
||||
|
||||
#define INTERPOLATION 0 //0 or 1 to double resolution.
|
||||
#define NB_FCT 6
|
||||
#define NB_PALETTES 5
|
||||
|
||||
#include "affiche.h"
|
||||
|
||||
#define PERIODE_COLORS 64
|
||||
#define PERIODE_EFFECTS 128
|
||||
|
||||
#define VIDEO_FLAGS (SDL_HWSURFACE|SDL_HWPALETTE)
|
||||
|
||||
#define BASS_EXT_MEMORY 100
|
||||
|
||||
typedef guchar byte;
|
||||
|
||||
static void sanalyzer_init(void);
|
||||
|
||||
static void sanalyzer_cleanup(void);
|
||||
static void sanalyzer_playback_start(void);
|
||||
static void sanalyzer_playback_stop(void);
|
||||
static void sanalyzer_render_pcm(gint16 data[2][512]);
|
||||
static void sanalyzer_render_freq(gint16 data[2][256]);
|
||||
|
||||
/*
|
||||
typedef struct coord {
|
||||
int x,y;
|
||||
} coord;
|
||||
|
||||
typedef struct complex {
|
||||
float x,y;
|
||||
} complex;
|
||||
|
||||
typedef struct interpol {
|
||||
coord c; //coordinates of the top left pixel.
|
||||
int w1,w2,w3,w4;
|
||||
} interpol;
|
||||
|
||||
typedef struct effect {
|
||||
int addr_effect;
|
||||
int f1,f2,f3;
|
||||
int x_curve;
|
||||
int p_speed,p_rotation;
|
||||
int color,old_color;
|
||||
int curve_color;
|
||||
int spectral_color;
|
||||
int mode_spectre;
|
||||
int spectral_shift;
|
||||
int flash;
|
||||
} effect;
|
||||
*/
|
||||
struct bass_info {
|
||||
//int mem[SIZE_BASS_MEM];
|
||||
gint32 max_recent;
|
||||
gint32 max_old;
|
||||
gint32 time_last_max;
|
||||
gint32 min_recent;
|
||||
gint32 min_old;
|
||||
gint32 time_last_min;
|
||||
gint32 activated;
|
||||
} bass_info;
|
||||
|
||||
|
||||
|
||||
interpol vector_field[NB_FCT][WIDTH*HEIGHT];
|
||||
|
||||
effect current_effect;
|
||||
|
||||
gint32 t=0;
|
||||
|
||||
VisPlugin sanalyzer_vp =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
0,
|
||||
"Simple spectrum analyzer",
|
||||
1,
|
||||
1,
|
||||
sanalyzer_init,
|
||||
sanalyzer_cleanup,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
sanalyzer_playback_start,
|
||||
sanalyzer_playback_stop,
|
||||
sanalyzer_render_pcm,
|
||||
sanalyzer_render_freq
|
||||
};
|
||||
|
||||
VisPlugin *get_vplugin_info(void)
|
||||
{
|
||||
return &sanalyzer_vp;
|
||||
}
|
||||
|
||||
complex fct(complex a,gint32 n,gint32 p1,gint32 p2) //p1 et p2:0-4
|
||||
{
|
||||
complex b,b1,b2;
|
||||
gfloat fact;
|
||||
gfloat an;
|
||||
gfloat circle_size;
|
||||
gfloat speed;
|
||||
gfloat co,si;
|
||||
|
||||
a.x-=WIDTH/2;
|
||||
a.y-=HEIGHT/2;
|
||||
|
||||
switch (n) {
|
||||
|
||||
case 0:
|
||||
an=0.025*(p1-2)+0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=HEIGHT*0.25;
|
||||
speed=2000+p2*500;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
an=0.015*(p1-2)+0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=HEIGHT*0.45;
|
||||
speed=4000+p2*1000;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
an=0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=HEIGHT*0.25;
|
||||
speed=400+p2*100;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
an=(sin(sqrt(a.x*a.x+a.y*a.y)/20)/20)+0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=HEIGHT*0.25;
|
||||
speed=4000;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
an=0.002;
|
||||
co=cos(an);
|
||||
si=sin(an);
|
||||
circle_size=HEIGHT*0.25;
|
||||
speed=sin(sqrt(a.x*a.x+a.y*a.y)/5)*3000+4000;
|
||||
b.x=(co*a.x-si*a.y);
|
||||
b.y=(si*a.x+co*a.y);
|
||||
fact=-(sqrt(b.x*b.x+b.y*b.y)-circle_size)/speed+1;
|
||||
b.x=(b.x*fact);
|
||||
b.y=(b.y*fact);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
b.x=a.x*1.0;
|
||||
b.y=a.y*1.0;
|
||||
|
||||
}
|
||||
|
||||
b.x+=WIDTH/2;
|
||||
b.y+=HEIGHT/2;
|
||||
if (b.x<0)
|
||||
b.x=0;
|
||||
if (b.y<0)
|
||||
b.y=0;
|
||||
if (b.x>WIDTH-1)
|
||||
b.x=WIDTH-1;
|
||||
if (b.y>HEIGHT-1)
|
||||
b.y=HEIGHT-1;
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
void generate_sector(gint32 g,gint32 f,gint32 p1,gint32 p2,gint32 debut,gint32 step)
|
||||
{
|
||||
coord c;
|
||||
complex a;
|
||||
gfloat fpy;
|
||||
gint32 rw,lw,add;
|
||||
gint32 fin=debut+step;
|
||||
gint32 prop_transmitted=249;
|
||||
gint32 i,j;
|
||||
|
||||
if (fin>HEIGHT)
|
||||
fin=HEIGHT;
|
||||
for (c.y=debut;c.y<fin;c.y++)
|
||||
for (c.x=0;c.x<WIDTH;c.x++) {
|
||||
a.x=(gfloat)c.x;
|
||||
a.y=(gfloat)c.y;
|
||||
a=fct(a,f,p1,p2);
|
||||
add=c.x+c.y*WIDTH;
|
||||
vector_field[g][add].c.x=(gint32)(a.x);
|
||||
vector_field[g][add].c.y=(gint32)(a.y);
|
||||
fpy=a.y-floor(a.y);
|
||||
rw=(gint32)((a.x-floor(a.x))*prop_transmitted);
|
||||
lw=prop_transmitted-rw;
|
||||
vector_field[g][add].w4=(gint32)(fpy*rw);
|
||||
vector_field[g][add].w2=rw-vector_field[g][add].w4;
|
||||
vector_field[g][add].w3=(gint32)(fpy*lw);
|
||||
vector_field[g][add].w1=lw-vector_field[g][add].w3;
|
||||
}
|
||||
}
|
||||
|
||||
void generate_vector_field()
|
||||
{
|
||||
gint32 f;
|
||||
gint32 i,p1,p2;
|
||||
|
||||
for (f=0;f<NB_FCT;f++) {
|
||||
p1=2;
|
||||
p2=2;
|
||||
for (i=0;i<HEIGHT;i+=10)
|
||||
generate_sector(f,f,p1,p2,i,10);
|
||||
}
|
||||
}
|
||||
|
||||
static void sanalyzer_init(void)
|
||||
{
|
||||
|
||||
generate_vector_field();
|
||||
generate_colors();
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void sanalyzer_cleanup(void)
|
||||
{
|
||||
SDL_Quit();
|
||||
}
|
||||
|
||||
|
||||
static void sanalyzer_playback_start(void)
|
||||
{
|
||||
init_sdl();
|
||||
generate_vector_field();
|
||||
}
|
||||
|
||||
|
||||
static void sanalyzer_playback_stop(void)
|
||||
{
|
||||
SDL_Quit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void sanalyzer_render_freq(gint16 data[2][256])
|
||||
{
|
||||
gint32 bass=0;
|
||||
gint32 i;
|
||||
gint32 step=10;
|
||||
|
||||
for (i=0;i<step;i++)
|
||||
bass+=(data[0][i]>>4)+(data[1][i]>>4);
|
||||
|
||||
bass=bass/step/2;
|
||||
|
||||
if (bass>bass_info.max_recent)
|
||||
bass_info.max_recent=bass;
|
||||
|
||||
if (bass<bass_info.min_recent)
|
||||
bass_info.min_recent=bass;
|
||||
|
||||
if (t-bass_info.time_last_max>BASS_EXT_MEMORY) {
|
||||
bass_info.max_old=bass_info.max_recent;
|
||||
bass_info.max_recent=0;
|
||||
bass_info.time_last_max=t;
|
||||
}
|
||||
|
||||
if (t-bass_info.time_last_min>BASS_EXT_MEMORY) {
|
||||
bass_info.min_old=bass_info.min_recent;
|
||||
bass_info.min_recent=0;
|
||||
bass_info.time_last_min=t;
|
||||
}
|
||||
|
||||
if (bass>(bass_info.max_old*6+bass_info.min_old*4)/10 && bass_info.activated==0) {
|
||||
if (current_effect.flash)
|
||||
flash(255,t);
|
||||
bass_info.activated=1;
|
||||
}
|
||||
|
||||
if (bass<(bass_info.max_old*4+bass_info.min_old*6)/10 && bass_info.activated==1)
|
||||
bass_info.activated=0;
|
||||
}
|
||||
|
||||
void sanalyzer_render_pcm(gint16 data[2][512])
|
||||
{
|
||||
SDL_Event event;
|
||||
Uint8 *keystate;
|
||||
gint32 son=0;
|
||||
gint32 trace=0;
|
||||
gfloat x,y,v,vr;
|
||||
gint32 i;
|
||||
gint32 t_last_palette=0;
|
||||
|
||||
while ( SDL_PollEvent(&event) ) {
|
||||
if ( event.type == SDL_QUIT )
|
||||
SDL_Quit();
|
||||
if (event.type == SDL_KEYDOWN) {
|
||||
gchar *st;
|
||||
st=SDL_GetKeyName(event.key.keysym.sym);
|
||||
if (!strcmp(st,"a"))
|
||||
current_effect.curve_color=wrap(current_effect.curve_color-32);
|
||||
if (!strcmp(st,"z"))
|
||||
current_effect.curve_color=wrap(current_effect.curve_color+32);
|
||||
if (!strcmp(st,"q"))
|
||||
current_effect.spectral_color=wrap(current_effect.spectral_color-32);
|
||||
if (!strcmp(st,"s"))
|
||||
current_effect.spectral_color=wrap(current_effect.spectral_color+32);
|
||||
if (!strcmp(st,"w"))
|
||||
current_effect.mode_spectre=(current_effect.mode_spectre+1)%5;
|
||||
if (!strcmp(st,"x"))
|
||||
current_effect.flash=(current_effect.flash+1)%2;
|
||||
}
|
||||
}
|
||||
|
||||
keystate = SDL_GetKeyState(NULL);
|
||||
if ( keystate[SDLK_ESCAPE] )
|
||||
ToggleFullScreen();
|
||||
for (i=0;i<10;i++)
|
||||
if ( keystate[SDLK_F1+i])
|
||||
current_effect.addr_effect=i%NB_FCT;
|
||||
if (keystate[SDLK_F11]) {
|
||||
current_effect.color=(current_effect.color-1)%NB_PALETTES;
|
||||
t_last_palette=0;
|
||||
}
|
||||
if (keystate[SDLK_F12]) {
|
||||
current_effect.color=(current_effect.color+1)%NB_PALETTES;
|
||||
t_last_palette=0;
|
||||
}
|
||||
if (keystate[SDLK_e]) {
|
||||
current_effect.spectral_shift=(current_effect.spectral_shift-10)%HEIGHT;
|
||||
}
|
||||
if (keystate[SDLK_r]) {
|
||||
current_effect.spectral_shift=(current_effect.spectral_shift+10)%HEIGHT;
|
||||
}
|
||||
|
||||
if (t_last_palette<8)
|
||||
change_color(current_effect.color,(current_effect.color+1)%NB_PALETTES,(t_last_palette+1)*32);
|
||||
/*
|
||||
if (t%PERIODE_EFFECTS==0) {
|
||||
// while (current_effect.f1==current_effect.f2) {
|
||||
// current_effect.f2=current_effect.f1;
|
||||
//current_effect.f1=rand()%NB_TYPE_FCT;
|
||||
//}
|
||||
//current_effect.p_rotation=2;
|
||||
//current_effect.p_speed=rand()%5;
|
||||
current_effect.addr_effect=(current_effect.addr_effect+1)%NB_FCT;
|
||||
}*/
|
||||
/*
|
||||
generate_sector(1-current_effect.addr_effect,current_effect.f1,
|
||||
current_effect.p_rotation,current_effect.p_speed,
|
||||
(t%PERIODE_EFFECTS)*(HEIGHT/PERIODE_EFFECTS+1),
|
||||
(HEIGHT/PERIODE_EFFECTS+1));
|
||||
*/
|
||||
affiche(current_effect.addr_effect,vector_field);
|
||||
|
||||
spectral(data,current_effect);
|
||||
|
||||
curve(¤t_effect);
|
||||
|
||||
t+=1;
|
||||
t_last_palette+=1;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* \file types.h
|
||||
*
|
||||
* \brief Must be deprecated?
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 Library 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 __INFINITY_TYPES__
|
||||
#define __INFINITY_TYPES__
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single byte type.
|
||||
*/
|
||||
typedef Uint8 byte;
|
||||
|
||||
|
||||
#endif /* __INFINITY_TYPES__ */
|
Loading…
Reference in New Issue