pax_global_header00006660000000000000000000000064146626145650014531gustar00rootroot0000000000000052 comment=57cbb98a571530a4bfd4491c16ca99302375411b alsaplayer-0.99.82/000077500000000000000000000000001466261456500140575ustar00rootroot00000000000000alsaplayer-0.99.82/.gitignore000066400000000000000000000010031466261456500160410ustar00rootroot00000000000000aclocal.m4 alsaplayer.1 alsaplayer.pc alsaplayer.spec app/alsaplayer autom4te.cache/ compile config.guess config.h config.h.in config.h.in~ config.log config.status config.sub configure depcomp .deps docs/reference/ docs/reference.doxygen docs/reference.doxygen.bak docs/reference.doxygen.log install-sh *.la .libs libtool *.lo ltmain.sh m4/intltool.m4 m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 Makefile Makefile.in missing *.o po/Makefile.in.in po/POTFILES po/stamp-it stamp-h1 alsaplayer-0.99.82/ABOUT-NLS000066400000000000000000002671331466261456500153220ustar00rootroot000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl' library and will decide to use it. If not, you may have to to use the `--with-libintl-prefix' option to tell `configure' where to look for it. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of June 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca +--------------------------------------------------+ a2ps | [] [] | aegis | | ant-phone | | anubis | | aspell | [] [] | bash | | bfd | | bibshelf | [] | binutils | | bison | | bison-runtime | [] | bluez-pin | [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | | dfarc | | dialog | [] [] | dico | | diffutils | [] | dink | | doodle | | e2fsprogs | [] | enscript | [] | exif | | fetchmail | [] | findutils | [] | flex | [] | freedink | | gas | | gawk | [] [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] [] | gettext-tools | [] [] | gip | [] | gjay | | gliv | [] | glunarclock | [] [] | gnubiff | | gnucash | [] | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | | gold | | gpe-aerial | | gpe-beam | | gpe-bluetooth | | gpe-calendar | | gpe-clock | [] | gpe-conf | | gpe-contacts | | gpe-edit | | gpe-filemanager | | gpe-go | | gpe-login | | gpe-ownerinfo | [] | gpe-package | | gpe-sketchbook | | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | [] [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] [] [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] [] | gutenprint | | hello | [] | help2man | | hylafax | | idutils | | indent | [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | | iso_639 | [] [] [] [] | iso_639_3 | | jwhois | | kbd | | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | klavaro | [] | latrine | | ld | [] | leafpad | [] [] | libc | [] [] | libexif | () | libextractor | | libgnutls | | libgpewidget | | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | [] | libidn | | lifelines | | liferea | [] [] | lilypond | | linkdr | [] | lordsawar | | lprng | | lynx | [] | m4 | | mailfromd | | mailutils | | make | | man-db | | man-db-manpages | | minicom | | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | | psmisc | | pspp | [] | pwdutils | | radius | [] | recode | [] [] | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] [] | sed | [] [] | sharutils | [] [] | shishi | | skencil | | solfege | | solfege-manual | | soundtracker | | sp | | sysstat | | tar | [] | texinfo | | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] [] | wyslij-po | | xchat | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] | +--------------------------------------------------+ af am an ar as ast az be be@latin bg bn_IN bs ca 6 0 1 2 3 19 1 10 3 28 3 1 38 crh cs da de el en en_GB en_ZA eo es et eu fa +-------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] () | anubis | [] [] | aspell | [] [] [] [] [] | bash | [] [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] | bison | [] [] | bison-runtime | [] [] [] [] | bluez-pin | [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] [] [] | cflow | [] [] | clisp | [] [] [] [] | coreutils | [] [] [] [] | cpio | | cppi | | cpplib | [] [] [] | cryptsetup | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] | dink | [] [] [] | doodle | [] | e2fsprogs | [] [] [] | enscript | [] [] [] | exif | () [] [] | fetchmail | [] [] () [] [] [] | findutils | [] [] [] | flex | [] [] | freedink | [] [] [] | gas | [] | gawk | [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] [] | gip | [] [] [] [] | gjay | [] | gliv | [] [] [] | glunarclock | [] [] | gnubiff | () | gnucash | [] () () () () | gnuedu | [] [] | gnulib | [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] () [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] | grub | [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] () [] | gtkam | [] [] () [] [] | gtkorphan | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] [] [] | hello | [] [] [] [] | help2man | [] | hylafax | [] [] | idutils | [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] [] [] [] () [] [] [] () | iso_3166_2 | () | iso_4217 | [] [] [] () [] [] | iso_639 | [] [] [] [] () [] [] | iso_639_3 | [] | jwhois | [] | kbd | [] [] [] [] [] | keytouch | [] [] | keytouch-editor | [] [] | keytouch-keyboa... | [] | klavaro | [] [] [] [] | latrine | [] () | ld | [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | [] [] | libgphoto2 | [] () | libgphoto2_port | [] () [] | libgsasl | | libiconv | [] [] [] [] [] | libidn | [] [] [] | lifelines | [] () | liferea | [] [] [] [] [] | lilypond | [] [] [] | linkdr | [] [] [] | lordsawar | [] | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] [] | man-db | | man-db-manpages | | minicom | [] [] [] [] | mkisofs | | myserver | | nano | [] [] [] | opcodes | [] [] | parted | [] [] | pies | | popt | [] [] [] [] [] | psmisc | [] [] [] | pspp | [] | pwdutils | [] | radius | [] | recode | [] [] [] [] [] [] | rosegarden | () () () | rpm | [] [] [] | rush | | sarg | | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | | skencil | [] () [] | solfege | [] [] [] | solfege-manual | [] [] | soundtracker | [] [] [] | sp | [] | sysstat | [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] | tin | [] [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] | vice | () () | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] | wyslij-po | | xchat | [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ crh cs da de el en en_GB en_ZA eo es et eu fa 5 64 105 117 18 1 8 0 28 89 18 19 0 fi fr ga gl gu he hi hr hu hy id is it ja ka kn +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] [] | ant-phone | [] [] | anubis | [] [] [] [] | aspell | [] [] [] [] | bash | [] [] [] [] | bfd | [] [] [] | bibshelf | [] [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] | cflow | [] [] [] | clisp | [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] | cppi | [] [] | cpplib | [] [] [] | cryptsetup | [] [] [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] [] [] | dink | [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] | freedink | [] [] [] | gas | [] [] | gawk | [] [] [] [] () [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] [] [] | gjay | [] | gliv | [] () | glunarclock | [] [] [] [] | gnubiff | () [] () | gnucash | () () () () () [] | gnuedu | [] [] | gnulib | [] [] [] [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] [] | gpe-aerial | [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] [] [] | gpe-calendar | [] [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkorphan | [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | gutenprint | [] [] [] [] | hello | [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | () [] [] [] | iso_4217 | [] () [] [] [] [] | iso_639 | [] () [] [] [] [] [] [] [] | iso_639_3 | () [] [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] [] [] [] | keytouch-editor | [] [] [] [] [] | keytouch-keyboa... | [] [] [] [] [] | klavaro | [] [] | latrine | [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] | libidn | [] [] [] [] | lifelines | () | liferea | [] [] [] [] | lilypond | [] [] | linkdr | [] [] [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] [] | man-db | [] [] | man-db-manpages | [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] [] | myserver | | nano | [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] [] | psmisc | [] [] [] | pspp | | pwdutils | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () () () () | rpm | [] [] | rush | | sarg | [] | screem | [] [] | scrollkeeper | [] [] [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] | shishi | [] | skencil | [] | solfege | [] [] [] [] | solfege-manual | [] [] | soundtracker | [] [] | sp | [] () | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux-ng | [] [] [] [] [] [] | vice | () () () | vmm | [] | vorbis-tools | [] | wastesedge | () () | wdiff | [] | wget | [] [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +----------------------------------------------------+ fi fr ga gl gu he hi hr hu hy id is it ja ka kn 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne +-----------------------------------------------+ a2ps | [] | aegis | | ant-phone | | anubis | [] [] | aspell | [] | bash | | bfd | | bibshelf | [] [] | binutils | | bison | [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] | cpio | | cppi | | cpplib | | cryptsetup | | dfarc | [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] | dink | | doodle | | e2fsprogs | | enscript | | exif | [] | fetchmail | | findutils | | flex | | freedink | [] | gas | | gawk | | gcal | | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] | gettext-tools | [] | gip | [] [] | gjay | | gliv | | glunarclock | [] | gnubiff | | gnucash | () () () () | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | [] | gold | | gpe-aerial | [] | gpe-beam | [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] | gpe-timesheet | [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | | gsasl | | gss | | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | | gtick | | gtkam | [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | | hello | [] [] [] | help2man | | hylafax | | idutils | | indent | | iso_15924 | [] [] | iso_3166 | [] [] () [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] | iso_639 | [] [] | iso_639_3 | [] | jwhois | [] | kbd | | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | klavaro | [] | latrine | [] | ld | | leafpad | [] [] [] | libc | [] | libexif | | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | | libidn | | lifelines | | liferea | | lilypond | | linkdr | | lordsawar | | lprng | | lynx | | m4 | | mailfromd | | mailutils | | make | [] | man-db | | man-db-manpages | | minicom | [] | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | [] [] [] | psmisc | | pspp | | pwdutils | | radius | | recode | | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] | sed | | sharutils | | shishi | | skencil | | solfege | [] | solfege-manual | | soundtracker | | sp | | sysstat | [] | tar | [] | texinfo | [] | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] | wyslij-po | | xchat | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +-----------------------------------------------+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +---------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] | bfd | [] | bibshelf | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] () | buzztard | [] [] | cflow | [] | clisp | [] [] | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] | cryptsetup | [] | dfarc | [] | dialog | [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] [] | dink | () | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | exif | [] [] [] () [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] | gas | | gawk | [] [] [] [] | gcal | | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | [] () | gnucash | [] () () () | gnuedu | [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gnutls | [] [] | gold | | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] | gphoto2 | [] [] [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | gutenprint | [] [] | hello | [] [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] [] [] [] | iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] [] | klavaro | [] [] | latrine | [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] | lifelines | [] [] | liferea | [] [] [] [] [] () () [] | lilypond | [] | linkdr | [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | pies | [] | popt | [] [] [] [] | psmisc | [] [] [] | pspp | [] [] | pwdutils | [] | radius | [] [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () | rpm | [] [] [] | rush | [] [] | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] [] [] [] | solfege-manual | [] [] [] | soundtracker | [] | sp | | sysstat | [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | [] | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ a2ps | [] [] [] [] [] | 27 aegis | [] | 9 ant-phone | [] [] [] [] | 9 anubis | [] [] [] [] | 15 aspell | [] [] [] | 20 bash | [] [] [] | 12 bfd | [] | 6 bibshelf | [] [] [] | 16 binutils | [] [] | 8 bison | [] [] | 12 bison-runtime | [] [] [] [] [] [] | 29 bluez-pin | [] [] [] [] [] [] [] [] | 37 bombono-dvd | [] | 4 buzztard | [] | 7 cflow | [] [] [] | 9 clisp | | 10 coreutils | [] [] [] [] | 22 cpio | [] [] [] [] [] [] | 13 cppi | [] [] | 5 cpplib | [] [] [] [] [] [] | 14 cryptsetup | [] [] | 7 dfarc | [] | 9 dialog | [] [] [] [] [] [] [] | 30 dico | [] | 2 diffutils | [] [] [] [] [] [] | 30 dink | | 4 doodle | [] [] | 7 e2fsprogs | [] [] [] | 11 enscript | [] [] [] [] | 17 exif | [] [] [] | 16 fetchmail | [] [] [] | 17 findutils | [] [] [] [] [] | 20 flex | [] [] [] [] | 15 freedink | [] | 10 gas | [] | 4 gawk | [] [] [] [] | 18 gcal | [] [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] [] | 34 gettext-runtime | [] [] [] [] [] [] [] | 29 gettext-tools | [] [] [] [] [] [] | 22 gip | [] [] [] [] | 22 gjay | [] | 3 gliv | [] [] [] | 14 glunarclock | [] [] [] [] [] | 19 gnubiff | [] [] | 4 gnucash | () [] () [] () | 10 gnuedu | [] [] | 7 gnulib | [] [] [] [] | 16 gnunet | [] | 1 gnunet-gtk | [] [] [] | 5 gnutls | [] [] [] | 10 gold | [] | 4 gpe-aerial | [] [] [] | 18 gpe-beam | [] [] [] | 19 gpe-bluetooth | [] [] [] | 13 gpe-calendar | [] [] [] [] | 12 gpe-clock | [] [] [] [] [] | 28 gpe-conf | [] [] [] [] | 20 gpe-contacts | [] [] [] | 17 gpe-edit | [] [] [] | 12 gpe-filemanager | [] [] [] [] | 16 gpe-go | [] [] [] [] [] | 25 gpe-login | [] [] [] | 11 gpe-ownerinfo | [] [] [] [] [] | 25 gpe-package | [] [] [] | 13 gpe-sketchbook | [] [] [] | 20 gpe-su | [] [] [] [] [] | 30 gpe-taskmanager | [] [] [] [] [] | 29 gpe-timesheet | [] [] [] [] [] | 25 gpe-today | [] [] [] [] [] [] | 30 gpe-todo | [] [] [] [] | 17 gphoto2 | [] [] [] [] [] | 24 gprof | [] [] [] | 15 gpsdrive | [] [] [] | 11 gramadoir | [] [] [] | 11 grep | [] [] [] | 10 grub | [] [] [] | 14 gsasl | [] [] [] [] | 14 gss | [] [] [] | 11 gst-plugins-bad | [] [] [] [] | 26 gst-plugins-base | [] [] [] [] [] | 24 gst-plugins-good | [] [] [] [] | 24 gst-plugins-ugly | [] [] [] [] [] | 29 gstreamer | [] [] [] [] | 22 gtick | [] [] [] | 13 gtkam | [] [] [] | 20 gtkorphan | [] [] [] | 14 gtkspell | [] [] [] [] [] [] [] [] [] | 45 gutenprint | [] | 10 hello | [] [] [] [] [] [] | 21 help2man | [] [] | 7 hylafax | [] | 5 idutils | [] [] [] [] | 17 indent | [] [] [] [] [] [] | 30 iso_15924 | () [] () [] [] | 16 iso_3166 | [] [] () [] [] () [] [] [] () | 53 iso_3166_2 | () [] () [] | 9 iso_4217 | [] () [] [] () [] [] | 26 iso_639 | [] [] [] () [] () [] [] [] [] | 38 iso_639_3 | [] () | 8 jwhois | [] [] [] [] [] | 16 kbd | [] [] [] [] [] | 15 keytouch | [] [] [] | 16 keytouch-editor | [] [] [] | 14 keytouch-keyboa... | [] [] [] | 14 klavaro | [] | 11 latrine | [] [] [] | 10 ld | [] [] [] [] | 11 leafpad | [] [] [] [] [] [] | 33 libc | [] [] [] [] [] | 21 libexif | [] () | 7 libextractor | [] | 1 libgnutls | [] [] [] | 9 libgpewidget | [] [] [] | 14 libgpg-error | [] [] [] | 9 libgphoto2 | [] [] | 8 libgphoto2_port | [] [] [] [] | 14 libgsasl | [] [] [] | 13 libiconv | [] [] [] [] | 21 libidn | () [] [] | 11 lifelines | [] | 4 liferea | [] [] [] | 21 lilypond | [] | 7 linkdr | [] [] [] [] [] | 17 lordsawar | | 1 lprng | [] | 3 lynx | [] [] [] [] | 17 m4 | [] [] [] [] | 19 mailfromd | [] [] | 3 mailutils | [] | 5 make | [] [] [] [] | 21 man-db | [] [] [] | 8 man-db-manpages | | 4 minicom | [] [] | 16 mkisofs | [] [] | 9 myserver | | 0 nano | [] [] [] [] | 21 opcodes | [] [] [] | 11 parted | [] [] [] [] [] | 15 pies | [] [] | 3 popt | [] [] [] [] [] [] | 27 psmisc | [] [] | 11 pspp | | 4 pwdutils | [] [] | 6 radius | [] [] | 9 recode | [] [] [] [] | 28 rosegarden | () | 0 rpm | [] [] [] | 11 rush | [] [] | 4 sarg | | 1 screem | [] | 3 scrollkeeper | [] [] [] [] [] | 27 sed | [] [] [] [] [] | 30 sharutils | [] [] [] [] [] | 22 shishi | [] | 3 skencil | [] [] | 7 solfege | [] [] [] [] | 16 solfege-manual | [] | 8 soundtracker | [] [] [] | 9 sp | [] | 3 sysstat | [] [] | 15 tar | [] [] [] [] [] [] | 23 texinfo | [] [] [] [] [] | 17 tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux-ng | [] [] [] [] | 20 vice | () () | 1 vmm | [] | 4 vorbis-tools | [] | 6 wastesedge | | 2 wdiff | [] [] | 7 wget | [] [] [] [] [] | 26 wyslij-po | [] [] | 8 xchat | [] [] [] [] [] [] | 36 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 xkeyboard-config | [] [] [] | 22 +---------------------------------------------------+ 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If June 2010 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.5 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. alsaplayer-0.99.82/AUTHORS000066400000000000000000000026351466261456500151350ustar00rootroot00000000000000Core code by Andy Lo A Foe Rewritten core with modern architecture by Erik de Castro Lopo at www.meganerd.com CDDA plugin uses some routines from dagrab by Marcello Urbani WAV plugin uses routines from aplay by Jaroslave Kysela The reverb routines are (C) by Philip Edelbrock. The FFTscope fft routines, are (C) by Richard Boulton. Ralph Loader enhanced the Monoscope a great deal Erik Inge Bolsø wrote the NAS plugin Looping code by Patrick Shirkey Evgeny Chukreev is responsible for a huge amount of new features and also does the Python interface. Frank Baumgart is keeping a sharp eye on resource usage and cleaning up lots of code. Hubert Chan from Debian for committing critical security fixes. Viktor Radnai and Paul Brossier from Debian made basic keyboard navigation and loop mode. Yvo Timmermans from Debian for the man page. Code cleanup in CorePlayer + experimental ape, wavpack and tta input plugins (SVN only) by Peter Lemenkov. New Python bindings (separated package) by Austin Bingham. GTK2 interface and bug fixes by Madej. He also added html handling and code cleanup in the CDDA plugin. Project administration by Dominique Michel . I also made some tests, added new sections into the man page and make some random bug fixes. It is also contributions from other peoples too. If I missed you, please drop me a word and I will add you in this file. alsaplayer-0.99.82/COPYING000066400000000000000000001051241466261456500151150ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . EXCEPTION: AlsaPlayer have a SGI output plugin. The GPL forbid to distribute binaries linked on a SGI system. In consequence, you are granted the permission to distribute AlsaPlayer with its SGI output plugin as long that you agree with the other conditions of the GNU General Public License version 3 or later and that you respect them. alsaplayer-0.99.82/ChangeLog000066400000000000000000011514001466261456500156330ustar00rootroot00000000000000# This is for the 0.99.82 release. # For the current devel log, clone the repo and use 'git log'. commit 08a4cb54ee6048c94d70cda5e64cbe35f236d059 Author: Dominique Michel Date: Fri Apr 12 11:26:26 2024 +0200 AutoUpdate the autotools and doxygen files. commit dce215bc7856ca0b5fa0f7f1cfa452914a2843cb Author: Dominique Michel Date: Wed Apr 10 23:12:32 2024 +0200 Fix typo in preceding commit. commit 6faffe739a20c749531f7cfdb8bff1140493e84f Author: Dominique Michel Date: Wed Apr 10 23:00:57 2024 +0200 Fix bug #25 segmentation fault if connection opened and closed immediately; thanks to hobbieman for the report and the fix. commit eef4cf54295d872e3580980807da1de295fd86b6 Author: Dominique Michel Date: Wed Apr 10 22:23:18 2024 +0200 Fix build fails with LTO; bug #28; thanks to eli-schwartz for the report. commit ff426ba7dec3b7dc5153e45a9697fcf2b8c9a339 Author: domichel Date: Wed Apr 10 21:53:26 2024 +0200 Add opus (ogg) file format to sndfile input formats; fix bug #27; thanks to Michael-Z-Freeman for the report and the fix. commit 65967c212961ef13c24a06d28ba57c8a4da11de2 Merge: ece53f6 fb8f898 Author: Andy Lo-A-Foe Date: Fri Mar 19 17:59:07 2021 +0100 Merge pull request #26 from yjwork-cn/patch-1 Create zh_CN.po commit fb8f898bcda45af5e4cd86a81b9963d3af344a62 Author: 玉堂白鹤 <53205242+yjwork-cn@users.noreply.github.com> Date: Wed Mar 10 15:42:58 2021 +0800 Create zh_CN.po commit ece53f6eb8e86edc9477ae5ed683553db9c9e2f0 Author: Andy Lo-A-Foe Date: Wed Jun 27 15:38:16 2018 +0200 Delete c commit 16b50822e05790c12bda88f3bf585625350122a1 Author: Andy Lo-A-Foe Date: Wed May 2 18:53:35 2018 +0200 Replace broken email address commit dd4ef6a909aad0542020a2a2ddb2e5ce98359069 Author: Andy Lo-A-Foe Date: Wed May 2 18:47:30 2018 +0200 Dockerfile for development commit f1c0e57575e28b5d9055b70277d9ae3b65727741 Author: Andy Lo-A-Foe Date: Wed May 2 18:47:18 2018 +0200 Add legacy file commit b547b70aade97fc3779b6fd4c8af1e39381b60c3 Author: Andy Lo-A-Foe Date: Wed May 2 18:42:17 2018 +0200 Prevent case clashing commit 47670c7ff57e400d202fcb68cd952522a6b17a7b Author: Andy Lo-A-Foe Date: Thu May 11 07:21:25 2017 +0200 Delete README.SVN commit fbf11d9846ad865a7f09da78f1064927787f6963 Author: Andy Lo-A-Foe Date: Thu May 11 07:21:08 2017 +0200 Update AUTHORS commit facf15357879175d874dea9a54b1515cffcbaa8a Author: Andy Lo-A-Foe Date: Thu May 11 07:20:19 2017 +0200 Update README.md commit 50460717e09e1a02f2246378ec55a3dca82afa50 Author: Andy Lo-A-Foe Date: Thu May 11 07:19:41 2017 +0200 Update and rename README to README.md commit 29bd113288a9d982132092c14ce3a43df3198cc9 Merge: 5460811 6015c66 Author: Andy Lo-A-Foe Date: Thu May 11 07:13:36 2017 +0200 Merge pull request #15 from leofiore/master fix bug #14 commit 54608114dca239780d83c2493b354071767e289d Merge: 7fa7720 4ad678d Author: Andy Lo-A-Foe Date: Fri Apr 14 21:55:44 2017 +0200 Merge pull request #20 from hermannschwaerzler/upstream-master initialise random number generator - shuffle is not random without this commit 4ad678ddb6f0fdd84a9d10988c987b2644e69139 Author: Hermann Schwärzler Date: Thu Apr 13 17:21:20 2017 +0200 initialise random number generator - shuffle is not random without this commit 6015c66564fac3ada3f02f3b6ce15aaad6e7e5e7 Author: Leonardo Date: Tue Mar 15 14:39:19 2016 +0100 fix for inconsistend id3 parsing if id3 header is malformed (?) `from_synchsafe4` can return very large values, overflowing the `unsigned int size` variable. In 32-bit systems this can drive to a infinite loop, trying to continuously read the same bytes commit 7fa7720a2e03a6935d0036f5da3e7dd9af26d5f8 Merge: c0fdf61 a412b35 Author: Andy Lo-A-Foe Date: Mon Nov 9 22:52:42 2015 +0100 Merge pull request #12 from kiselev-dv/master Stop aftre each track in playlist commit a412b354c9d3eae3e39c9c82bfefdd26980dff8d Author: kiselev-dv Date: Tue May 19 11:38:21 2015 +0500 Stop aftre each track in playlist commit c0fdf61671389fc24f249cd06f6de48a534cd718 Merge: dd8bb4f c04ae1b Author: Andy Lo-A-Foe Date: Sat Mar 7 10:52:57 2015 +0100 Merge pull request #11 from stegm/master Bugfixing reader for http streams commit c04ae1bcd6085ea36b901be3539431a6ee07e50c Author: Stefan Gmeiner Date: Sun Feb 1 16:36:15 2015 +0100 bugfix: http reader, seekable stream with icy-meta If a seekable http stream has icy metadata the buffer_pos is set to the current pos which might lead to segmentation faults. commit a407edf7b93f0b82353861fa5b92d0f6106847a0 Author: Stefan Gmeiner Date: Sun Feb 1 16:32:23 2015 +0100 Bugfix http reader: restart of broken connection If a http connection is broken http_read tries to restart it if eof is not reached. commit dd8bb4f00d8e6b80aad656058be1d0e51788a757 Author: domichel Date: Mon Jun 30 22:37:23 2014 +0200 interface/xosd/xosd.cpp: Add xosd outline and shadow preferences. commit b63f5e543d3d4c11159b82b98592e6affe63b9ea Author: domichel Date: Mon Jun 30 01:44:39 2014 +0200 app/Main.cpp: Remove non used short -b option. commit 0f4f129fd380587fef4eab7bd5426a348a891730 Author: Erik de Castro Lopo Date: Sun Jun 29 16:16:17 2014 +1000 docs/reference.doxygen.in : Update to latest doxygen version. This can be done using 'doxygen -u docs/reference.doxygen.in'. commit 8f92dde0690dee3268f80e4f9ac195423c7811a4 Author: Erik de Castro Lopo Date: Sun Jun 29 13:00:40 2014 +1000 configure.ac : Fix comments. commit 51e3eb632ee1252dff4bb2400a93ef60310e97dc Author: Erik de Castro Lopo Date: Sun Jun 29 12:54:01 2014 +1000 Use pkg-config to detect presence/location of ALSA. commit fd38528b2c3a2be5b8cef36f6e68c18ba27ef9e8 Author: Erik de Castro Lopo Date: Sun Jun 29 12:28:31 2014 +1000 Update .gitignore. commit b47a871fbb74d7ae4304c40dd4d26d51c7bf2f11 Author: Erik de Castro Lopo Date: Sun Jun 29 12:33:31 2014 +1000 Remove generated file po/Makefile.in.in. commit 1629ca1a7323a5e5c890b1d116e332c458586a3c Author: Erik de Castro Lopo Date: Sun Jun 29 12:09:04 2014 +1000 Rename bootstrap -> autogen.sh. Also clean up and simplify. commit 37c36ff7fc6878b291da8bacc6f9397237823134 Author: Erik de Castro Lopo Date: Sun Jun 29 11:03:27 2014 +1000 Configuration and build system cleanups. commit 64ca89eeba3e51d3beb41f7afb34b598bff3cf3a Author: Erik de Castro Lopo Date: Sun Jun 29 11:55:59 2014 +1000 scopes2/synaescope/synaescope.c : Fix buffer overflow. commit e4f600af0418c7077813054c1c8da2aaf50b8a06 Author: Erik de Castro Lopo Date: Sun Jun 29 11:50:28 2014 +1000 input/cdda/cdda_engine.c: Cleanups. * Fix potential buffer overflow in handling of message. * Replace manual string manipulation with str* functionality. * Remove un-needed parens from 'return (NULL);'. commit b54885256f27cc8a5280ae0b709aea656047b7ec Author: Erik de Castro Lopo Date: Sun Jun 29 11:19:36 2014 +1000 input/cdda/cdda_engine.c : Fix 'path' in cddb_save_to_disk(). Make path a stack allocated array so that sizeof works correctly and we don't need to allocate and free it. commit 0e95c30df8cd4b73e04c23a12110fecde39f70f3 Author: Erik de Castro Lopo Date: Sun Jun 29 11:17:17 2014 +1000 interface/gtk2/gtk.cpp : Remove call to deprecated g_thread_init(). According to the documentation the threading stuff is now initailized inside GTK. commit 2f98c29ea0e8df00c76140cbc080da3c9942a059 Author: domichel Date: Sun Jun 29 02:13:26 2014 +0200 interface/gtk2/AboutWindow.cpp: Some updates. commit c109db3ecdc418fdc94a9e34e6530236ae4c9283 Author: domichel Date: Sun Jun 29 01:11:47 2014 +0200 AUTHORS: Add Erik de Castro Lopo commit a677607eb1a03be5d0636a1745af7beacdb089a2 Author: domichel Date: Sun Jun 29 00:19:07 2014 +0200 app/Main.cpp: Fix long option. Thanks to piem Paul Brossier from Debien for these last 7 patches. commit 8859c099add6a6771c7edf7f12259ae09f0ec3ab Author: domichel Date: Sat Jun 28 23:02:35 2014 +0200 input/flac/FlacPlugin.cpp: Avoid const char to char conversion. commit 1f9dbde902bb5bdd0c4c77ad9edadd2cf349d5d8 Author: domichel Date: Sat Jun 28 22:36:27 2014 +0200 reader/http:http.c: Initialise host and path buffers to NULL, avoiding double free when http port parsing fails. commit 61d112f9791a668ac90039e09615f73495a11065 Author: domichel Date: Sat Jun 28 22:09:55 2014 +0200 alsaplayer/CorePlayer.h: Add missing linux specific header. commit 7f7f54aadae63d7bf10ed85f04b87efff209c779 Author: domichel Date: Sat Jun 28 22:06:22 2014 +0200 app/ControlSocket: Fix missing header, will use system PATH_MAX. commit 60fae342e8eedd8cc0f15aa8f6e0e1e82120c781 Author: domichel Date: Sat Jun 28 21:46:30 2014 +0200 extra/alsaplayer.desktop: Fix for flac MIME type. commit 5d42569b96cb19aa72d65db6b2de40e861eb0ca7 Author: domichel Date: Sat Jun 28 21:18:32 2014 +0200 interface/gtk2/gtk_interface.cpp: Add missing seconds song duration display. commit 63bddc02cb3f11b7f890e756b95740e31f23a0c3 Author: domichel Date: Sat Jun 28 19:18:23 2014 +0200 app/ControlSocket.cpp: Fix wrong time scale in seek and relative seek. Fixes: https://github.com/alsaplayer/alsaplayer/issues/4 commit 38fe6aa828de8f04c9c5cbf5583674f746432167 Author: domichel Date: Sat Jun 28 02:13:49 2014 +0200 Removed double and wrog entry from man page. commit ac67394a7baefa20fef20cab3295f9f1fa6fd9d3 Author: domichel Date: Sat Jun 28 01:43:32 2014 +0200 app/Main.cpp: Change --loopsong to a remote otion and on/off switch. Updated -h option and man page. commit a42e771fe5b84fc90991d17c6c3589ddfae990ef Author: domichel Date: Sat Jun 28 00:28:13 2014 +0200 app/Main.cpp: Change --looplist to an on/off option. Modified patch from Hermann Schwaerzler. Updated -h option and man page. commit 1ee02ddab5519d8d18de2faa5f0fdcc74bd19563 Author: domichel Date: Fri Jun 27 23:14:06 2014 +0200 app/Main.cpp: Change the --looplist option to a remote option. Patch from Hermann Schwaerzler. Updated the -h option. alsaplayer.1.in: Updated the man page. commit ca02660586d0deb5c89b5a91b02e3aea723acf76 Author: domichel Date: Fri Jun 27 22:25:26 2014 +0200 Added -S --shuffle option. Patch from Hermann Schwaerzler. commit fc08974a6a30404599e0d80ee804310758766010 Author: domichel Date: Fri Jun 27 21:46:08 2014 +0200 Updated ChangeLog commit a42a61758d5c3bd22d5e1cb7c07754d0d07241b2 Author: domichel Date: Fri Jun 27 21:43:14 2014 +0200 Updated ChangeLog commit e840ce6efbde33c9b61c27e9c07ace7f467687f3 Author: domichel Date: Fri Jun 27 21:30:19 2014 +0200 Fixed short option for --loopsong; changed to -L commit 8d09152b6fca6cc2a47f1452675d273be511803a Author: domichel Date: Fri Jun 27 16:56:27 2014 +0200 Fix for files worngly loaded as mikmod commit 60957d4a8660b3b14384fe4ffba5f71e53692fd3 Author: domichel Date: Thu Feb 6 03:42:38 2014 +0100 update of the pot and po files; 1 new French string commit fb8066cdb020bcb77af8eca318fd259ecf2e57c9 Author: domichel Date: Wed Dec 11 19:56:09 2013 +0100 Updated the TODO with User request section. Added support for multi channel audio in that section. Closes: https://github.com/alsaplayer/alsaplayer/issues/2 commit ed582bcffc459da7a8f2802f4456e331606d9287 Author: domichel Date: Tue Dec 3 13:46:43 2013 +0100 Fix for speed change when pausing/unpausing with JACK. When pausing/unpausing from the console and when JACK sample rate was different from the music sample rate, the speed was changing by the rate of these 2 sampling rates. Closes: https://github.com/alsaplayer/alsaplayer/issues/1 commit b0260ae36bb753b399a83d61f55f8a313b1896c8 Author: domichel Date: Sun Nov 25 02:33:55 2012 +0100 Updated gettext files commit cc05634f1ffb208d9a79de4ba8760a596d1039a5 Author: Erik de Castro Lopo Date: Thu Jan 5 20:19:03 2012 +1100 Fix a bunch of unused-but-set-variable warnings. commit 10f3be9586bd5b3193d1b3f4f07436ccb04b4152 Author: Erik de Castro Lopo Date: Sat Jun 4 20:03:18 2011 +1000 PlaylistWindow : Clean up playlist creation function new_list_item(). commit f7e2b3f0087d69e1870c0dc3cecfd838cda03d02 Author: Erik de Castro Lopo Date: Sat Jun 4 14:20:13 2011 +1000 PlaylistWindow.cpp : Always check return of gtk_tree_model_get_iter_from_string(). commit 49a538e80a3ff60461c073471e8b0743a9940ab9 Author: Erik de Castro Lopo Date: Sat Jun 4 11:50:40 2011 +1000 app/Main.cpp : Allow gtk-options to be passed through to gtk_init(). commit 233a4ceb82c06e9faabf97d3a675649ab99ef2ea Author: Erik de Castro Lopo Date: Sat Jun 4 11:13:33 2011 +1000 Inprove error messages in command line parser. commit e5faf7d4073afebd2086cbd7544c1fe4e63d9345 Author: Erik de Castro Lopo Date: Thu Jun 2 17:33:35 2011 +1000 configure.ac : Depend on jack >= 1.9.0. commit 1341ceffa31c476f390cb6d160f819a1f3b2afe0 Author: Erik de Castro Lopo Date: Thu Jun 2 07:16:59 2011 +1000 Fix all -Wshadow warnings. commit 8dfc07c14232bcab5729b3004d258d9bfa53d064 Author: Erik de Castro Lopo Date: Thu Jun 2 07:16:39 2011 +1000 configure.ac : Add -Wshadow to CFLAGS/CXXFLAGS. commit 4a587315f351f0d0735d5a7ee9bdf5759cde6b73 Author: Erik de Castro Lopo Date: Thu Jun 2 07:15:38 2011 +1000 Replace use of deprecated jack_port_get_total_latency(). commit 7a9bb14b4cd27632cf1a72b43212afc8cda7d1e2 Author: Erik de Castro Lopo Date: Tue Apr 12 21:09:27 2011 +1000 Simplify vorbis_block_size(). commit 0d8db19da91cb1b1f8aa08ef401b2f6bb9b9a704 Author: Dominique Michel Date: Sat Mar 26 09:24:08 2011 +0100 ChangeLog: Added the last commits. commit 6d847ab14344d36e06f7dfb909b69a6d44f00549 Author: Dominique Michel Date: Sat Mar 26 08:44:46 2011 +0100 Moves the entry in the playlist instead of duplicates them. commit 11a6bd5fc3bb8bc44d64c818556a5b96a0128d64 Author: Erik de Castro Lopo Date: Tue Mar 22 22:21:00 2011 +1100 input/flac/FlacPlugin.cpp : Add frame_count() method. commit 70018bba0b26e6a3c51e413f4ebb183c7f1bba34 Author: Erik de Castro Lopo Date: Tue Mar 22 22:20:28 2011 +1100 input/mad/mad_engine.c : Remove debug. commit c02d8b32930db62f29ee0ff29ddb78e240751a14 Author: Erik de Castro Lopo Date: Tue Mar 22 22:10:55 2011 +1100 Fix compiler warnings uncovered by new warning flags. commit 0d3bc5b136c49a1297275cde40bc622b11be9292 Author: Erik de Castro Lopo Date: Tue Mar 22 22:07:40 2011 +1100 Fix compiler warnings uncovered by new warning flags. commit f8cd5475c9a8586c251fa34258ad7fb5799e841f Author: Erik de Castro Lopo Date: Tue Mar 22 20:23:16 2011 +1100 Add frame_count() function to input_plugin struct. commit 1019f9e5c78de3729388a50eafbb031602660b51 Author: Erik de Castro Lopo Date: Tue Mar 22 20:20:59 2011 +1100 configure.ac : Add more warning flags. commit fc507b501fcbdf26052960d8ebcaa2f5ce9f2920 Author: Erik de Castro Lopo Date: Tue Mar 22 20:18:26 2011 +1100 m4/add_*flags.m4 : Test new flags in isolation. commit e6a61f4f44ae5e2bc5531a2d3638798dd6927949 Author: Erik de Castro Lopo Date: Mon Mar 21 19:46:56 2011 +1100 input/flac/FlacMetadataTag.cpp : Fix compiler warning. commit 08e35ef3eeac184d4dc2d793f77bb0182afc21a9 Author: Erik de Castro Lopo Date: Mon Mar 21 19:44:41 2011 +1100 configure.ac : When debug is enabled add -fstack-protect to CFLAGS. commit cbdb1c84b4da7ca7abb9622ab1e139411ab39d4a Author: Dominique Michel Date: Sun Mar 20 15:17:54 2011 +0100 Added the last commits into the ChangeLog commit e45dcf9a965e1e864539e654afb115818bf4fb3a Author: Erik de Castro Lopo Date: Sat Mar 19 21:49:30 2011 +1100 Lift the actual alsaplayer code up a directory. commit 87baebadc6c67f75d3ccc28e4eae0923ebb1f8ab Author: Erik de Castro Lopo Date: Sat Mar 19 20:41:54 2011 +1100 Move experimental fftscope midi and python dirs into attic. commit bd9ee462bea25adb267d2e92a7418f5b6a7fad4b Author: Erik de Castro Lopo Date: Sat Mar 19 19:48:52 2011 +1100 Add .gitignore file. commit c13f55821d9c0ad73f456e0cfc0fdc4824d462a9 Author: mega-nerd Date: Sat Mar 19 07:21:03 2011 +0000 Fix two minor valgrind warnings. commit 088b71fe445030c14f2c6374af256628420b9213 Author: mega-nerd Date: Sat Mar 19 07:12:42 2011 +0000 Make sure all AM_CFLAGS have @DFLAGS@. commit cf0e9d74953dd4140d64af87ebe171d4dc17062c Author: mega-nerd Date: Sat Mar 19 03:49:45 2011 +0000 Fix compiler warnings. commit ca6e0f72569227fb5a550d5da3f50c65fc701227 Author: mega-nerd Date: Sat Mar 19 01:52:40 2011 +0000 Change the way CFLAGS and CXXFLAGS are set up. commit dbac9cf4ba05d6f5d48c209c71f8c5bd4ca35de9 Author: mega-nerd Date: Sat Mar 19 00:29:21 2011 +0000 Add m4 macros add_cflags.m4 and add_cxxflags.m4. commit d28631a2a81c3eac4dade900a4446ab0c1f35d42 Author: mega-nerd Date: Fri Mar 18 23:23:30 2011 +0000 configure.ac : More cleanups. commit 048db925cd65db493ecc6fa383495932a8679491 Author: mega-nerd Date: Fri Mar 18 22:45:46 2011 +0000 Silence doxygen output noise. Explicitly output doxygen warnings. commit 85720fe28f977158ffe0737b6a13cb76cd81b614 Author: mega-nerd Date: Fri Mar 18 21:18:12 2011 +0000 Minor configure.ac tweaks. commit de1e0591c0bc7e86a72dd5ebd3b936885a572e7f Author: mega-nerd Date: Fri Mar 18 20:52:11 2011 +0000 Fix compiler warnings. commit 2b4e0dd7ab8cb153ccdd6cd886387104b9c395ba Author: mega-nerd Date: Fri Mar 18 11:33:36 2011 +0000 Clean up C string handling. Add functions ap_strlcpy() and ap_strlcat() and replace all instances of strcat/strcpy/strncat/strncpy. commit 5eff874ae2c547459f22c5f45563ee6943c390a8 Author: mega-nerd Date: Fri Mar 18 09:32:06 2011 +0000 Replace #include of message.c with message.h. Also required having the alsaplayer app link to libalsaplayer.co. commit fb8d4a31f8a170f789710304461760ecbc6e527a Author: mega-nerd Date: Fri Mar 18 07:04:56 2011 +0000 Remove deprecated OggFlac stuff. commit e2ffa96b3fd96baa16115e28ccf6685322929f72 Author: mega-nerd Date: Wed Mar 16 10:04:14 2011 +0000 interface/gtk2/gtk_interface.cpp : Fix compile issue arising from configure.ac changes. commit f87d0b2edebb584427355c1a60b7794d43183f0b Author: mega-nerd Date: Tue Mar 15 11:15:26 2011 +0000 configure.ac : Cleanup. commit b31679731b95a1f0d376d676c96c6e2d60ad4b88 Author: mega-nerd Date: Tue Mar 15 11:14:16 2011 +0000 docs/reference.doxygen.in : Remove deprecated tags. commit 28a6d7a8fcdf17ae88dfceb5c31418938e41a1dc Author: mega-nerd Date: Tue Mar 15 09:11:00 2011 +0000 Remove m4/audiofile.m4. commit f44c92f8b7f80a4c176080c50c6cba17e04538b8 Author: mega-nerd Date: Tue Mar 15 08:38:15 2011 +0000 Fix compiler warnings. commit 9b7ed75413770aa3d6aa106f9744ec20eae29f62 Author: mega-nerd Date: Tue Mar 15 08:20:19 2011 +0000 configure.ac : Insist on external gettext. commit 1bba56e93d736fed0248399c07abe0b77c674829 Author: mega-nerd Date: Tue Mar 15 08:16:02 2011 +0000 Remove typecast on return value of malloc() in C code. commit 9049c2705a3d0c98a5bc4e9e80d74d3b31f9f31b Author: mega-nerd Date: Tue Mar 15 07:45:17 2011 +0000 input/sndfile/sndfile_engine.c : Only handle FLAC if libsndfile has FLAC support. commit caf00485ea2841d753b6d6858c03ce441cb1c3a2 Author: mega-nerd Date: Tue Mar 15 07:33:34 2011 +0000 Replace more sprintfs with snprintf. commit 90dfb9c24b21293310eb9bbc032fbfdb4b4c2aa9 Author: mega-nerd Date: Tue Mar 15 06:56:40 2011 +0000 Replace all uses of sprintf and snprintf. commit c8368d55b78d1add61a8a5a4327cc0bcfc7e2ae1 Author: mega-nerd Date: Tue Mar 15 06:28:18 2011 +0000 input/vorbis/vorbis_engine.c : Fix compiler warning. commit d58802eb83e9d9edda4f0ce019a9c8f910f167c1 Author: mega-nerd Date: Tue Mar 15 06:23:17 2011 +0000 Purge bundled gettext library in intl/ directory. commit 7abaac0a479cb53011a3441489008ba45e6d7a7f Author: mega-nerd Date: Tue Mar 15 02:41:19 2011 +0000 input/vorbis/vorbis_engine.c : Accept files with 'oga' extension. commit 1094d2f4596cf7d28afb43b66adb3635e4834d04 Author: mega-nerd Date: Mon Mar 14 09:04:26 2011 +0000 Terminology update. Change 'frame' to 'block' where appropriate. Alsaplayer used to use the work 'frame' to describe a block of N (N > 1) stereo sample pairs. The MPEG encoder/decoder and and speech related DSP algorithms also use 'frame' this way. However, Jack, Alsa, libsndfile, Apple's CoreAudio and others use the word 'frame' to describe the M samples (where M is the number of channels) that belong to the same sampling instance. With this change we leave change Alsaplayer to agree with Jack, Alsa etc. commit 1da662818bfc24678175157f4e3997704fadd70c Author: mega-nerd Date: Sun Mar 13 21:41:41 2011 +0000 Remove input/mpg123/ directory. This code wasn't currently being used, doesn't compile and bundles what looks like a really old, hacked version of the mpg123 sources. We already have the mad MP3 decoder and after the changes to the internals are done, we can look at doing a MP3 input using libmpg123 instead. commit 1b03f1f6f10bff771e09ffd0a65cd53698a5e22f Author: mega-nerd Date: Sun Mar 13 15:54:40 2011 +0000 TODO : Add new section at top of file. commit ab355bd7e9ce11571d876952c86bb9cc3c882f27 Author: mega-nerd Date: Sun Mar 13 10:24:05 2011 +0000 Rename output/alsa-final => output/alsa. commit d3261441236236bb6b0a6a8b73f93c2575b86653 Author: mega-nerd Date: Sun Mar 13 10:12:15 2011 +0000 Purge alsa-0.5 output plugin. commit 4d2e0ec4df69f1d7d8587577a06c34836d5ab958 Author: mega-nerd Date: Sat Mar 12 23:32:30 2011 +0000 First step on the way to convert internal data format to float. Originally all audio data was passed aroung Alsaplayer using char* pointers even though the audio data was actually always 16 bit stereo PCM. This first step changes all the char* pointers to short*. commit 6af1e36924b8af698cc22f6a85372c9dd941b164 Author: mega-nerd Date: Sat Mar 12 22:44:31 2011 +0000 configure.ac : Remove left over audiofile cruft. commit a9be06b3d5b294f974d7bcfbfe76b46ac48e5a83 Author: mega-nerd Date: Sat Mar 12 22:11:10 2011 +0000 input/sndfile/sndfile_engine.c : Reject files with > 2 channels. commit fdc1d1f863ad31e10fda74535f2079e8cbeb87c3 Author: mega-nerd Date: Sat Mar 12 12:42:35 2011 +0000 input/ : Prefer sndfile plugin over flac because sndfile handles 24 bit flac files. commit f8975b62942493f5fdeb1a1ae78aa1b982de5a10 Author: mega-nerd Date: Sat Mar 12 12:35:58 2011 +0000 input/sndfile/sndfile_engine.c : Reject all files starting with 'http://'. commit 22a00df45261f4fd3584ef1291c41c7f4b0c019f Author: mega-nerd Date: Sat Mar 12 10:23:25 2011 +0000 Remove redundant wav and audiofile plugins. commit 8cf8968beb7fc29e87de0662b56ff7b664d7b75c Author: mega-nerd Date: Sat Mar 12 02:33:21 2011 +0000 input/flac/FlacPlugin.cpp : FIx segfault when FLAC fails to open a file. commit f26d80b5a3cff20943f9873a750300abd38a6692 Author: mega-nerd Date: Fri Mar 11 09:09:48 2011 +0000 input/sndfile/sndfile_engine.c : Cleanup. commit a6fb82ce535ffb9b03d6d8d5935e8867d1edba75 Author: mega-nerd Date: Fri Mar 11 07:44:58 2011 +0000 alsaplayer/output_plugin.h : Fix doxygen comment. commit 8d2f9994958312f08bf1187961a76501e18da2f1 Author: mega-nerd Date: Fri Mar 11 07:44:10 2011 +0000 input/sndfile/sndfile_engine.c : Remove unused function getfilenamefrompath. commit bc22ccaf11153eb15d88799f12f927844417aa1f Author: mega-nerd Date: Fri Mar 11 07:42:59 2011 +0000 docs/reference.doxygen.in : Remove deprecated USE_WINDOWS_ENCODING. commit ef02b7ac879db65c7a3b9bc4c173088ff92951fa Author: mega-nerd Date: Sun Feb 6 21:00:13 2011 +0000 Remove old debugging cruft. commit b644fd117758b227264ce34246820622ed6bf06d Author: mega-nerd Date: Sat Jan 29 23:35:48 2011 +0000 Fix compiler warnings in jack output plugin. No able to figure out how to force it to use jack so this is untested. commit 631c5e76424c3b20581c6a482e35dfd78fec1b16 Author: dominique_libre Date: Wed Nov 10 17:30:12 2010 +0000 Fix compilation failure on 64 bits systems with recent gcc versions commit 3c7a23bfbe00ec4a46b945696648fd5e4e7a14af Author: mega-nerd Date: Wed Nov 10 11:29:22 2010 +0000 Add AM_SILENT_RULES to configure.ac. commit 2f18875d728239b00c0a20e412fc7a312a0819ce Author: mega-nerd Date: Wed Nov 10 11:26:35 2010 +0000 Fix bootstrap aclocal invocation. commit 16377a671d487bfe925aec4b055488063d4723bb Author: dominique_libre Date: Tue Nov 9 22:46:45 2010 +0000 Erik de Castro Lopo: patch that remove the keyword from file headers, confuses Bzr commit 612d22bd1032c064bd6c4e93d93d1e18da962ae1 Author: dominique_libre Date: Tue Nov 9 21:08:42 2010 +0000 Erik de Castro Lopo: patch that fix automake warnings about underquoted macro names. commit 24b592667667dc5377a6701bc60e049744c07ca3 Author: dominique_libre Date: Sun Nov 7 21:09:14 2010 +0000 Added comment about a fixed double error and updated the copyright date into the About dialog commit 5a5629aec54a79044ab79b7838a7d2d230bf6549 Author: dominique_libre Date: Sun Nov 7 20:38:05 2010 +0000 Patch by Dominik Kuhlen that fix a lot of compilation warnings. commit 4561f2cbec63b9103d2b13fb442563c7bdd574f9 Author: dominique_libre Date: Wed Jul 29 20:39:27 2009 +0000 Oops: OK. commit d32504029a87c51ca6828e51eb112f4ddb01fc69 Author: dominique_libre Date: Wed Jul 29 20:28:47 2009 +0000 Oops: test. commit 91bd8e9e7f0d598d9fccdae3bf20fb19e49c2b09 Author: dominique_libre Date: Wed Jul 29 20:17:20 2009 +0000 Oops: test. commit 829d5ba82cb2b10fc571fdc5d8a2b8c0297ff7ec Author: dominique_libre Date: Wed Jul 29 20:07:46 2009 +0000 Opps commit 2315507d5940cb056b7a68112db8137fd8891325 Author: dominique_libre Date: Wed Jul 29 19:57:02 2009 +0000 Gcc: Restauring some optimisation CFLAGS. commit 6dca18c333509ed66a7527010bdd68f976f8a91d Author: dominique_libre Date: Wed Jul 29 18:55:41 2009 +0000 Fix for compiling with libmikmod-3.2.0-beta2, Thanks to Has de Goede commit ca7d629e29ffa6c42dbcd12c03309285c834a948 Author: dominique_libre Date: Sun Jul 26 19:26:39 2009 +0000 Add id3tag configure option. commit 60a89c91a29ea5b45dabe4dc1a469f803443b8f1 Author: dominique_libre Date: Sun Jul 26 19:24:25 2009 +0000 Fix building with glibc 2.10+. commit ee14f14dc177651f2b5707c0d220ba1ce073893c Author: dominique_libre Date: Sun Jul 26 19:22:23 2009 +0000 Add missing limits.h, fixes compiling with >=glibc-2.8 by Bernard Cafarelli. commit 12f537b31d97ea1b6c681b52805c0f4c9861aa39 Author: dominique_libre Date: Sun Jul 26 19:18:38 2009 +0000 Removing deprecated GLIB 1.2 check. Removing unused versions, one still using GTK+-1.2 and another with locked down FLAC 1.1.3 patch causing troubles with deptree creation on gentoo when mixing stable and testing branches. commit 49bf92eb8c51a5e8dfc12363c94d35f28604e5fa Author: dominique_libre Date: Sat Mar 29 13:08:25 2008 +0000 Updated the speed desciption and the preference section of the man page. commit ab60785b3630748cf4b5f9fc57073b2087d86032 Author: dominique_libre Date: Wed Dec 19 20:30:17 2007 +0000 Replaced include by . Needed on OSX commit 4e4b85b05558befd0ea544bedc7aa2316fdda77b Author: dominique_libre Date: Wed Dec 19 20:27:43 2007 +0000 Replaced include by . Needed on OSX commit 3354705220db49459e17907880cdca84c7718ae3 Author: dominique_libre Date: Wed Dec 19 19:27:16 2007 +0000 Gûnther Stibbe: 2 bug fixes in id3 tag support. commit d99b565d22f09da6cb610579ddf02ede596511f1 Author: dominique_libre Date: Wed Dec 5 19:49:14 2007 +0000 Juuso Alasuutari: fix getting JACK sample rate commit 6c352f0bd82ac889b51cb7fbb50e35e3afb1e5a9 Author: dominique_libre Date: Sun Nov 18 20:39:24 2007 +0000 Added some infos commit 26524fa1bdc24413752a5275282b9be89e25d85e Author: dominique_libre Date: Sun Nov 18 20:01:45 2007 +0000 configure: added --enable-systray and gtk+ test for systray (need gtk+-2.10) commit aa0dbc38dd823d03ea3ae2ffffe2bdb14a1c4dad Author: dominique_libre Date: Sun Nov 18 19:56:45 2007 +0000 Madej: added initial systray icon function. commit 4a3d38a2825f0da5eff7e9eed21346ce44e96042 Author: dominique_libre Date: Mon Nov 5 19:36:39 2007 +0000 Updated ChangeLog files with last commits commit 4b245d07ddef7f32102d2692406081ea7c13a968 Author: dominique_libre Date: Mon Nov 5 19:18:20 2007 +0000 Fixed typo(?) in stream_info.h so that it will compile and run commit ba8ad4ed78922b8ce575f1e8fc831cdddc4149cd Author: peter_lemenkov Date: Sun Nov 4 10:48:23 2007 +0000 removed stream_info from tta-plugin commit 8483fe39fd753da2425d36ba967572c5ec9e75d1 Author: peter_lemenkov Date: Sun Nov 4 10:28:53 2007 +0000 now id3-metadata handling removed REALLY completely from tta-plugin commit 5180213d3335b02802751fee9d58cfde252e5607 Author: peter_lemenkov Date: Sun Nov 4 10:21:52 2007 +0000 removed id3-metadata handling completely commit 644228635a441d11989c70623362b1b3cdc09da0 Author: peter_lemenkov Date: Sun Nov 4 08:38:50 2007 +0000 prevent double free attempt (since some commits ago we store and handle currently playing track's path in CorePlayer) commit 408fae5ac3bd1e2ac7fb36b9a5dd626199281f85 Author: peter_lemenkov Date: Sun Nov 4 07:27:40 2007 +0000 No need to include bits from esound here commit 36ec0ee4a060d8f972f2f916f791c8b44150ae84 Author: peter_lemenkov Date: Sun Nov 4 07:06:41 2007 +0000 typo fix commit 48e93ae47abc7c2ab5b95abe39da129b68301a0f Author: peter_lemenkov Date: Sun Nov 4 07:00:46 2007 +0000 Another PATH_MAX substitution instead of mysterious 1024 commit 2c2b267b32f06afb9d6ec4e1d9f7d11fe0fa16f9 Author: peter_lemenkov Date: Sun Nov 4 06:59:21 2007 +0000 Removed dead code - all sound fx (surround, downsampling etc) must be handled by specific plugins commit bc3e22c20cf97a1fd81a168172623d6b987a651a Author: peter_lemenkov Date: Sun Nov 4 06:56:47 2007 +0000 Moved stream_info structure from input_object ro its own header (we reuse it further) commit 145874f4335bbeb67bce2352af12379f3367d069 Author: peter_lemenkov Date: Sun Nov 4 06:16:11 2007 +0000 Fix memleak with path copying commit 16dc4ea35ed055873c166b4de9db86314831d84e Author: peter_lemenkov Date: Sun Nov 4 06:03:53 2007 +0000 Don't stop if we cannot find plugin->stream_info (prepare for future generic metadata parsing commit 9b303164238e7282244a4e5294f544d66ab33fc9 Author: peter_lemenkov Date: Sun Nov 4 06:02:12 2007 +0000 Save path of playing file for future use in CorePlayer commit f245900c550774023a9c5b2dc9d1ddb23ab47c9e Author: peter_lemenkov Date: Sun Nov 4 05:02:13 2007 +0000 We don't use cvs anymore so I cleaned up README a bit more commit f7921536fb29e48f35c5222747b2466d39a8ec82 Author: peter_lemenkov Date: Sun Nov 4 04:58:09 2007 +0000 renamed README.CVS to README.SVN because we don't use cvs anymore commit e9596bc2f3ffbddb249ea9fafa5c9d039c1fe098 Author: dominique_libre Date: Sat Nov 3 20:13:52 2007 +0000 Removed beta version commit a72f24e4f6bb1c71621834c69e5442d729b176d0 Author: dominique_libre Date: Sat Nov 3 17:02:27 2007 +0000 Removed the -E option in the Exec key. We don't need to prevent GTK1 crashes with the GTK2 interface anymore. lol commit 52abcc60c3a52d2a9ebee3210c62939345427baf Author: dominique_libre Date: Sat Nov 3 16:53:33 2007 +0000 Fixed desktop file so that it validate again; removed the deprecated keys. commit de3d8f0f842fd166e09e1a5f4ab6440a2d6886a6 Author: dominique_libre Date: Mon Oct 29 21:36:57 2007 +0000 Updated config.sub + config.guess commit edfe518fdfe8fb30e98be37ef74a78191725e5dd Author: dominique_libre Date: Mon Oct 29 21:21:56 2007 +0000 Flacstream: change from unsigned int to size_t applied to the old API (Debian); changed the name of the flac plugin to reflect the name of the different flac versions. commit b18a62246706179154a00da3d7a055c744da245a Author: dominique_libre Date: Mon Oct 29 20:02:14 2007 +0000 Madej: fixed segfault with PLAY shortcut commit d69508717d941f566cd91edddbbe26528e7aa0dc Author: dominique_libre Date: Sun Oct 14 12:06:41 2007 +0000 Fixed wrong flac versions in Changelog. commit 552363bcb1ff8b63749e303eeb55ff0bbedcc51f Author: dominique_libre Date: Thu Oct 11 20:07:39 2007 +0000 Replaced GTK2 code by GLIB2 code in mad plugin commit 9e5e85770c0f46be75e4103b5ee45f9ca8202b44 Author: dominique_libre Date: Mon Oct 8 20:39:31 2007 +0000 Updated version number commit 06ce73e7b8462c9e0b840bf1798a25a9605fd0b7 Author: dominique_libre Date: Mon Oct 8 20:07:44 2007 +0000 Fixed flac and oggflac test in configure commit a7a8b647ccc3954f015e9dcc041d297c12d7d47a Author: dominique_libre Date: Mon Oct 8 19:14:29 2007 +0000 Fixed crash at startup with main.default_interface=gtk in AP config file. commit 96e681bd03866cdf5dc8f970505326bfe783953d Author: dominique_libre Date: Mon Oct 8 18:37:14 2007 +0000 Madej: Fixed song title in title bar when unknow name. commit ee8645c66205272152c3ec5708e5fe97e36493d7 Author: dominique_libre Date: Sun Oct 7 20:54:03 2007 +0000 Madej: song title in title bar with preference dialog commit d7fe329ecb68f8ad4248ea28c7ca55755d922182 Author: dominique_libre Date: Sun Oct 7 16:02:09 2007 +0000 Changed the echo statement about nls in configure commit 7c519880dd28506f147a14d3c9d5aa65699f87b9 Author: dominique_libre Date: Sun Oct 7 15:37:13 2007 +0000 Removed obsolete gtk1 test in configure commit a98f3d60b7921acd06c33019ffa5d33d392fb33a Author: dominique_libre Date: Sun Oct 7 15:26:23 2007 +0000 Fixed libmad in configure and added --enable-mad option commit 551d3ce2db2d2bc95045778230102fb16be2b98a Author: dominique_libre Date: Sat Oct 6 11:10:00 2007 +0000 More spellning fixes in the man page commit b3fee38ffb58b429a67dc9b1a030df290d2e3fa5 Author: dominique_libre Date: Sat Oct 6 10:47:34 2007 +0000 Ryan Hill: fix man page spellning commit 33af0f39079d6e213ff55e03f1c4e961826cb7ef Author: dominique_libre Date: Sat Sep 29 12:07:29 2007 +0000 Hubert Chan: fixed gtk2 config file commit cd9d194c411c22a7e101bab9318a9490d7479846 Author: dominique_libre Date: Sat Sep 8 19:33:33 2007 +0000 Added a few words in the man page about JACK output commit 5070d54a45122ae67a0897e8147b1ec367d53a2f Author: dominique_libre Date: Sat Sep 8 17:25:17 2007 +0000 Added a few words in the man page about JACK output commit 369cd17926bbf58946149d566d8c61d7083bca7d Author: dominique_libre Date: Wed Sep 5 20:37:56 2007 +0000 Fix for possible buffer overflow in vorbis input plugin from Erik Sjölund commit 55389337f0c5849410b9b9b254bbc1857e407345 Author: dominique_libre Date: Wed Sep 5 20:28:47 2007 +0000 Swedish translation from Lars Lindqvist commit 5555527e57149b24d3bf4fed991a10457979052c Author: fbaumgart Date: Sat Aug 4 15:44:00 2007 +0000 security fix minor cleanup commit 45feea44541931ec0f1f66a0990fb676fe708ddf Author: fbaumgart Date: Sat Aug 4 15:20:19 2007 +0000 fix spacing commit 5bf7aa4c27dab4da3cf1f5c8ec271b80f7a18874 Author: fbaumgart Date: Sat Aug 4 15:01:32 2007 +0000 increase OSD timeout from 5s to 8s commit b62c04dffd8663abf90cc0f2e2f7ce1b3978b391 Author: dominique_libre Date: Tue Jul 17 21:38:00 2007 +0000 Removed old and outdated libmad code from the tree so at SuSE can distribute AlsaPlayer. It will still work with external libmad. commit 0eff43ab5b54593448fb758cd2e659f512c4d03c Author: dominique_libre Date: Tue Jul 17 21:32:51 2007 +0000 Added outdated mad code commit b332a95a57f540556236a83008cfd2db95694cd0 Author: dominique_libre Date: Sat Jul 14 10:33:56 2007 +0000 Updated TODO commit ea86ad9f9d4745dd8667ba7d99766ebfa64094e2 Author: dominique_libre Date: Fri Jul 13 22:59:00 2007 +0000 Updated TODO commit 5710f28556a2fcc08fb76aef8e99b5151c7ab829 Author: dominique_libre Date: Thu Jul 12 20:28:54 2007 +0000 Changed SGI exception in the license file commit eaa40cc322a1bf708a18a83073b80fe75a60bbaa Author: dominique_libre Date: Thu Jul 12 20:25:55 2007 +0000 Removed unneeded exception from the license file commit 9b7aeacf86482878e4840baf11aa05fc860bd2ff Author: dominique_libre Date: Thu Jul 12 20:24:41 2007 +0000 Removed unneeded exception from the license file commit e622c1ef3e24d6fbfc2db71894a8c01d3460fa5b Author: dominique_libre Date: Thu Jul 12 20:23:09 2007 +0000 Removed unneeded exception from the license file commit 41351dcc3e13dbd909c4e3ff449bbd82e5ea1dd7 Author: dominique_libre Date: Tue Jul 10 20:40:25 2007 +0000 Updated beta version to rc3. commit 1669944fd62c6418fc387cf800ec392086bd0cbe Author: dominique_libre Date: Mon Jul 9 20:58:49 2007 +0000 Typo commit 96dc0585445e90e5b1c0aafbbed9719c60bf1a6a Author: dominique_libre Date: Mon Jul 9 20:57:53 2007 +0000 Typo commit 307f1caec389f477cca8fbf8e84d79564c92567c Author: dominique_libre Date: Mon Jul 9 20:56:59 2007 +0000 more typos commit e311f240e430949095f073f280f1e2260a5ea6e6 Author: dominique_libre Date: Mon Jul 9 20:55:37 2007 +0000 Typo commit 0d391e4f9aa67d87f94ac248413f756f7d47c906 Author: dominique_libre Date: Mon Jul 9 20:54:21 2007 +0000 Updated ChangeLog commit 641d16f0274657df785d3aa0c922689755d70b71 Author: dominique_libre Date: Mon Jul 9 20:53:06 2007 +0000 Added COPYING file commit e87df01d75b0e4f8376787dbdb9ddfa4added4d2 Author: dominique_libre Date: Mon Jul 9 20:14:22 2007 +0000 Removed duplicated PATH_MAX stuff. commit 64ed18d32cccd999d11976e7099f64957b13d9b7 Author: peter_lemenkov Date: Mon Jul 9 06:33:35 2007 +0000 added necessary #defines for systems w/o PATH_MAX commit f84a64aa5ad9fa37062973db95a83dda4a9f5e2a Author: dominique_libre Date: Sun Jul 8 20:43:50 2007 +0000 Changed numeric value for maximum lenght of pathname to standard macro-definition when avaible. commit c40ab5d6ae019667ea6c11362554990ac6641a42 Author: dominique_libre Date: Sun Jul 8 19:54:32 2007 +0000 Updated About window with GPL-v3 or later statement. commit b6ab655392eed4d1bf0ae999e7d25698ebefaaa0 Author: dominique_libre Date: Sun Jul 8 19:48:11 2007 +0000 Updated licence to GPL-v3 or later. commit 760c957eee335f3898c15b563c51b68d218c57ef Author: dominique_libre Date: Sun Jul 8 19:38:13 2007 +0000 Updated licence to GPL-v3 or later. commit 0355189ce4cae8baa2fb33ab5d41fb9c89b709d0 Author: dominique_libre Date: Sun Jul 8 16:58:35 2007 +0000 Updated licence to GPL-v3 or later. Added COPYING file and updated the version of the software. commit c6f1c467c8f0e243a20fdb34c19ff587305c8557 Author: dominique_libre Date: Sun Jul 8 16:48:05 2007 +0000 Updated the ChangeLog with the GPL-v3 or later migration. commit 72e0b0344e3ef006c747e8a172addacdfc2b9300 Author: dominique_libre Date: Sun Jul 8 16:44:24 2007 +0000 Updated scopes2/* to GPL3. commit 836e0543d3d9f1b92287e754f00e05d8c16d20f8 Author: dominique_libre Date: Sun Jul 8 16:38:45 2007 +0000 Updated reader/* to GPL3. commit fe1633977168a8622e26b76ccce3b77d245d2260 Author: dominique_libre Date: Sun Jul 8 16:36:36 2007 +0000 Minor change in po/alsaplayer.pot commit 55198eec6500d16197618ab4f3b7fb4254a4d25c Author: dominique_libre Date: Sun Jul 8 16:30:39 2007 +0000 Updated output/* to GPL3 + added SGI exception in COPYING. commit 274b45f8011b659bcaae7df46faa5977406f2349 Author: dominique_libre Date: Sun Jul 8 16:08:22 2007 +0000 Updated libalsaplayer/* to GPL3. commit b9de6ad641d1fab6c670494f345f8b3d2fb23f76 Author: dominique_libre Date: Sun Jul 8 16:06:00 2007 +0000 Added some README in intl folder with infos about the licence and the purpose of this folder. commit 6da1e80b1f6f8a4e464fb24e584a87723a0fa641 Author: dominique_libre Date: Sun Jul 8 15:57:29 2007 +0000 Updated interface/* to GPL3. commit 11ff6dfbdb1d657fb83b7953a2586e9e14f76508 Author: dominique_libre Date: Sun Jul 8 15:46:19 2007 +0000 Updated input/* to GPL3. commit d751ecea933691ceaed7f29ea605f6d5431747e7 Author: dominique_libre Date: Sun Jul 8 14:31:34 2007 +0000 Updated app/* to GPL3. commit 5167a7dff7889917300376216e2dbd3009b20d5c Author: dominique_libre Date: Sun Jul 8 14:17:12 2007 +0000 Updated alsaplayer/* to GPL3. commit 86228645354ced4df82b4288502b27f0d6d9e19c Author: dominique_libre Date: Sun Jul 8 12:21:44 2007 +0000 Beginning of licence update to GPL v3. Added infos about last changes into AUTHORS and INSTALL. commit cef7cceb26dfb376629eeee7a44dae6dbcaf0749 Author: dominique_libre Date: Sun Jul 8 10:39:29 2007 +0000 Updated ChangeLog with Peter work. commit 6304de53feb2fb7325abfbd64eed560b6a3374a8 Author: peter_lemenkov Date: Sun Jul 8 06:06:34 2007 +0000 cosmetic commit 642b2c446d393eb0a22b8910f7d8b9dd95902c06 Author: peter_lemenkov Date: Sun Jul 8 04:59:45 2007 +0000 Reorganized code for loading input modules. We should test module before actual assignment. commit fe1f0d3156f1f947103476310688f67400c03753 Author: peter_lemenkov Date: Sat Jul 7 20:15:22 2007 +0000 Removed wrong commit. Looks like i was very optimistic aboun my changes :( commit a27e6c39b309b1cbc493126030ab14cc16cc4822 Author: peter_lemenkov Date: Sat Jul 7 19:10:02 2007 +0000 Removed limit for max number of loaded plugins. commit acea08369b55f05e451769538057f0eb0d860306 Author: peter_lemenkov Date: Sat Jul 7 19:07:16 2007 +0000 Changed numeric value for maximum lenght of pathname to standart macro-definition commit 79bdf01c1ff2a9906f0710261920fa2d2d106560 Author: dominique_libre Date: Sat Jul 7 13:27:37 2007 +0000 Hubert Chan: workaround when the album name is on multiple lines (cdda input plugin). commit 1c4b500fce5a4be485304f9bce2a8ce01332346f Author: peter_lemenkov Date: Thu Jun 28 10:10:55 2007 +0000 devel commit f1e05d68703d0e409f8e0386d9fd491463c43c7e Author: dominique_libre Date: Tue Jun 26 20:56:32 2007 +0000 Swedish translation, need some work. Fixed typo in the header of the german translation. Fixed application key in the desktop file; he validate now. Added some MIME types. commit 4347f9573b6aac4f4087e71bfea1f60d67142640 Author: dominique_libre Date: Mon Jun 25 21:06:03 2007 +0000 Frank Baumgart: german translation. commit 6768367041dfb4ea67e21a10fead7a0512740677 Author: dominique_libre Date: Mon Jun 25 19:47:38 2007 +0000 Madej: updated polish translation commit 7292534408f597fb975cad703dee8e019f9c40a9 Author: dominique_libre Date: Sun Jun 24 23:08:50 2007 +0000 Madej: added internationalization of the info window + updated polish locale. Dominique: updated french locale and pot file. commit 3967a2158e1c844e71789de0d455fe07e4ec7d88 Author: dominique_libre Date: Sun Jun 24 19:43:41 2007 +0000 Moved gtk1 into trunk/obsolete/fftscope; moved gtk2 version into main directory. commit a1086ccf8ea5197d22ec686c16c806c024389aa6 Author: dominique_libre Date: Sun Jun 24 19:37:46 2007 +0000 Removed obsolete stuff commit 8a395053ee55c6e6cdbe72ff99a02ddd2b8a7e10 Author: dominique_libre Date: Sun Jun 24 19:35:23 2007 +0000 Added fftscope for gtk1 in obsolete commit 4fd7e82ace4246b2d0df466991ac770b03f9b6b6 Author: dominique_libre Date: Sun Jun 24 19:32:19 2007 +0000 Added some kind of README commit 65193a571b9b778c795d261ab0bac318387a7f29 Author: dominique_libre Date: Sun Jun 24 19:22:56 2007 +0000 Deleted interface/qt commit 57c3505bd192d41c46a33398d1ceebddaad17d0f Author: dominique_libre Date: Sun Jun 24 19:14:42 2007 +0000 Added broken qt interface in experimental/obsolete commit 40d0735b0ab3898fd6585aeee0708fe77e6914aa Author: dominique_libre Date: Sun Jun 24 11:10:34 2007 +0000 Madej: fixed icon when Don't start at startup is selected in the prefs commit 0066ce46eda3a1f32e3bba4a28e635460c24ee9c Author: dominique_libre Date: Sat Jun 23 21:43:22 2007 +0000 Madej: Polish translation. Dominique: fixed translator-credits field in french translation. commit 2665862bbd8fae258099ab08d4bb4587658c0a4e Author: dominique_libre Date: Sat Jun 23 21:19:13 2007 +0000 Madej: fixed segfault when closing scope window commit 57837560ec9ff400d870b59e8e271bb1e0fde3a2 Author: peter_lemenkov Date: Sat Jun 23 20:21:58 2007 +0000 Accidentally applied changes reverted commit 757145e9b663c7acaf0af2fbf7f985011945ff30 Author: peter_lemenkov Date: Sat Jun 23 20:14:14 2007 +0000 Added initial (non-working yet) ffmpeg plugin commit 3df8c4d1850d3def6e86b1feb73363c9e7afa68f Author: dominique_libre Date: Sat Jun 23 19:48:52 2007 +0000 Forget the ChangeLog commit 51849b0e4f8508b539a2c95af16c9f6ca8ea133a Author: dominique_libre Date: Sat Jun 23 19:24:00 2007 +0000 Removed old gtk stuff. Fixed Main.cpp help message and gtk2 startup when no :0.0. commit 3795d2cc0fc60e66e2b33d1396b812c3597db511 Author: dominique_libre Date: Sat Jun 23 19:18:34 2007 +0000 Added obsolete folder with old gtk1 stuff commit 7154de5b3d615fe977a3a0be6a51a6580ebfaf89 Author: dominique_libre Date: Sat Jun 23 15:47:47 2007 +0000 updated ChangeLog commit 2b77676b923dfb0bd09b706d3d12c2dd22a68edd Author: dominique_libre Date: Sat Jun 23 15:43:17 2007 +0000 Added French translation commit 523f450fbeb5863e0cad45a272ca28767f4e664f Author: dominique_libre Date: Sat Jun 23 15:28:22 2007 +0000 Added internationalization support in gtk2 commit fdecd59d3b838cde7dd9257747e376dd154d692e Author: dominique_libre Date: Thu Jun 21 22:31:35 2007 +0000 Madej: Added 2 preference options + loop buttons will remember the state. commit 789cfae4f343a12593d1c98ac2d6be3d6fc5750b Author: dominique_libre Date: Thu Jun 21 21:03:49 2007 +0000 Madej fix for possible segfault or rubbish in mad convert process commit 933b563603f6151edb6c993d9ed6b44b88f2e8b6 Author: dominique_libre Date: Wed Jun 20 19:39:47 2007 +0000 Removed EffectsWindow files and references as we don't use it. commit 19992c70c295b62c899d92364585fc6d9c5a49a4 Author: dominique_libre Date: Tue Jun 19 18:08:55 2007 +0000 Updated TODO list, fixed typo in ChangeLog commit d7b686c34771050db49a994030f01390d840ac4f Author: dominique_libre Date: Mon Jun 18 20:39:44 2007 +0000 Maedj: Improved loop and looper buttons commit 614158003d905ad6e36c187d3056f1ea823bd307 Author: dominique_libre Date: Sat Jun 16 10:42:25 2007 +0000 Re-added glib.m4 because some distributions don't want to use the bootstrap file and are trying to do they own reconfigure. commit 59d860eeb56307ab7ab6d3db7b5e775691a65732 Author: dominique_libre Date: Sat Jun 16 10:34:14 2007 +0000 Reversed last 2 m4 patches. They just don't work. If you want to use custom autoreconf scripts, please provide working patches. If you cannot do that and want to reconfigure the package, please follow the INSTALL file and run the bootstrap file. commit 56c6a8648a1759220798acce3d6bd1e62fc38004 Author: dominique_libre Date: Sat Jun 16 10:28:39 2007 +0000 Updated ogg and vorbis m4 macro files commit 5528926e4f2a009d6f7fea1f0ae84c60880ec199 Author: dominique_libre Date: Sat Jun 16 10:21:51 2007 +0000 Added glib.m4 because some distributions don't want to use the bootstrap file and are trying to do they own reconfigure. commit d673465043f3f61f388d78346ee73989fa21ecb8 Author: dominique_libre Date: Sat Jun 16 09:55:14 2007 +0000 Modified build fix for 64 bits, it will hopefully also work with flac < 1.4 commit b683d723d4ca914d8b3bfdf02ad086ee915520b3 Author: dominique_libre Date: Fri Jun 15 23:33:18 2007 +0000 Madej: adds back folders prefs in gtk2. commit ddfd82fc7b7f8c6b6d2136a8cb681e2ec935e740 Author: dominique_libre Date: Fri Jun 15 21:50:44 2007 +0000 updated ChangeLog and TODO list commit aba59eed21a50d5a0e22730b5166bb142c979e0a Author: dominique_libre Date: Fri Jun 15 20:36:54 2007 +0000 Madej: Added don't close addfile window after adding a file commit 9830b95da28c417097ad08a9dbe19c161bec80cc Author: dominique_libre Date: Fri Jun 15 19:41:54 2007 +0000 Takashi Iwai: fixes the build of FLAC plugin on 64bit commit 007a8bc33fd5024cefafb082aee5e2fda9423a80 Author: dominique_libre Date: Fri Jun 15 19:39:51 2007 +0000 Takashi Iwai: fixes possible buffer overflow due to typos for snprintf commit 802129cec1fa4716634e8bc42671ac9b24cf3f49 Author: dominique_libre Date: Fri Jun 15 19:37:20 2007 +0000 Takashi Iwai: fix the possible buffer overflow in the cdda engine. commit 4cd619c7a68661c987fc18e60273eaa917ea7529 Author: dominique_libre Date: Fri Jun 15 19:33:48 2007 +0000 Madej: mad patch, add extende header support in mp3 files (utf-8, utf-16, utf-16be, iso-8859-1) commit 832a455876a578c5d8d2cbcc902894aac1da78db Author: dominique_libre Date: Fri Jun 15 19:28:07 2007 +0000 Madej patch: adds some new dialogs (which are not really in use yet), changes behaviour when we remove files, removes some warnings, fixes memory leak (i think its still in gtk1), brings back insert button commit 224dc8a2174cd9d0ec7717e6a9d03aabe272c54d Author: dominique_libre Date: Wed Jun 13 19:29:09 2007 +0000 Updated ChangeLog commit 1f8ad21a903bc036e731f28c05e89b3db1242c91 Author: dominique_libre Date: Wed Jun 13 19:14:47 2007 +0000 Madej: Added center and mute button; fixed crash with Enter key. commit a727362f402c3ff813bf8d4f64b29556043ea100 Author: peter_lemenkov Date: Wed Jun 13 06:02:53 2007 +0000 Removed old .cvsignore files commit 8471bafec3328f1d753528b034e2deaff379081a Author: dominique_libre Date: Tue Jun 12 20:43:39 2007 +0000 Fixed horrible mistake in the desktop file commit 5306cfc05bd6f461d4388f467509f448548a93d7 Author: dominique_libre Date: Tue Jun 12 18:23:25 2007 +0000 Madej: initial commit of preferences window for GTK2 commit 6d93be4b2f9ca466bed3f9777d2957d19eda786b Author: dominique_libre Date: Mon Jun 11 21:49:24 2007 +0000 Madej: Initial drag & drop support in playlist commit 1fb089b71b7d612beaf67fed864f91c2d48c5089 Author: dominique_libre Date: Mon Jun 11 16:57:57 2007 +0000 Added fflush function in daemon interface. Fix bug 1052028 commit 8527974a7ffbe368c5aba1e8606c8d7ca3ba2c06 Author: dominique_libre Date: Sun Jun 10 22:03:03 2007 +0000 Forget ChangeLog commit 59c527a1f75f2e064a709cc5128e1604cf8f6fca Author: dominique_libre Date: Sun Jun 10 20:57:28 2007 +0000 Fixed Makefile.am to work with make dist and the gtk2 folder commit 689c2854ac70bb90f61b59509e82d4d7c2ca8372 Author: dominique_libre Date: Sun Jun 10 20:09:26 2007 +0000 Removed unwanted wmclass function from gtk2, updated the version for imminent release commit 0d19b9ca1651f624fb566b3a660a08fbb86669b9 Author: dominique_libre Date: Sun Jun 10 19:00:10 2007 +0000 Madej: fix for the quit function: it will save the prefs when quiting from the menu and the title bar. commit 8da0fd36f1f9b62a065c2a2ed88dffa228dcc991 Author: dominique_libre Date: Sun Jun 10 17:07:11 2007 +0000 Added playlist_height option in prefs. commit 6a5d254f794e3618efd22539c77af59a94996763 Author: dominique_libre Date: Sun Jun 10 12:48:00 2007 +0000 Madej: Changed Credits window to look better commit 86dd6d840dece04104adc424fd7ae5a1c8d25c6d Author: dominique_libre Date: Sun Jun 10 11:12:50 2007 +0000 GTK2 + scopes2: Removed unwanted wmclass function commit db15301f8da0ec7eac0c643ca191e3bd9f0068c5 Author: dominique_libre Date: Sun Jun 10 10:31:13 2007 +0000 Fixed horrible grammar fault and fixed double date entry in ChangeLog commit 790b6f9105c5d615802b94843b7b075d6566ab4b Author: dominique_libre Date: Sat Jun 9 16:14:23 2007 +0000 Fixed some typos. commit 6fec783993e6df62c7d0259132e21af6d8fadd17 Author: dominique_libre Date: Sat Jun 9 16:13:31 2007 +0000 Madej patch: fixed strange speed behaviour when unpausing with jack and smooth transition, changed mouse control: the volume and the speed will increase with scroll up, the balance will go to the right. commit 372a4fd94473839d13ec4d1ac5524dc555077f5a Author: dominique_libre Date: Sat Jun 9 12:00:15 2007 +0000 Madej: restore open file dialog on play button when the playlist is empty; to click on clear with stop playing; fixed some warnings. commit 242cbb17e9b267d7d43f7521de5bbd96c8f1dfb3 Author: dominique_libre Date: Fri Jun 8 20:37:34 2007 +0000 Madej work: fix for weird speed behaviour when resuming from pause with jack output commit 92d0cadb334f9c8c8509cd3a2c98374d35080774 Author: dominique_libre Date: Thu Jun 7 16:50:57 2007 +0000 Madej patch: buttons use gtk2 theme. commit abdfe85859044087ae34909dac304ca300d59ac8 Author: dominique_libre Date: Thu Jun 7 16:49:11 2007 +0000 New Madej patch: fix volume awarness of the gtk2 interface, it will react correctly to volume change from the console commit 139eaf5da295bf75011cb76e589a873cbc9c0d81 Author: dominique_libre Date: Wed Jun 6 21:22:03 2007 +0000 Forget to update ChangeLog commit 03a630407c1b71646bd3179ca22bdd634b150d4b Author: dominique_libre Date: Wed Jun 6 21:18:21 2007 +0000 Added wm class and ressource in blurscope for gtk 1 and 2. commit 032dee80029417f7565d0949c0646e3298b4765a Author: dominique_libre Date: Wed Jun 6 20:06:20 2007 +0000 Updated TODO commit d74833294122d2f87ff548806aae47a59692b1a1 Author: dominique_libre Date: Wed Jun 6 19:35:59 2007 +0000 Updated ChangeLog commit 32d58fde41575e5f6e3d9e58787e43863445b8ff Author: dominique_libre Date: Wed Jun 6 19:08:15 2007 +0000 Madej patch: sizes in config file, stop and play icons on playlist, and infobox color changing commit 889a6d756a23eb6e64d13e2e3109b622ea703504 Author: dominique_libre Date: Wed Jun 6 18:59:08 2007 +0000 2 patches from Madej that fix info display resizing with font size change commit 89b9cd2e996b1f445c10842480856852227308e1 Author: dominique_libre Date: Wed Jun 6 18:45:44 2007 +0000 Patch from Hubert Chan (Debian) that fix CDDB suport on port 888. html support on port 80 is left. commit f1dfb575c02d1bce9f90546e81e0251ad0e8fa1c Author: dominique_libre Date: Tue Jun 5 20:33:10 2007 +0000 Madej patch: fix the speed awarness of the gtk2 interface. When the speed is changed with a console command, 2 clicks on pause will resume playing at the last speed, not normal speed as before. commit 98d34bcc1889f8022ed1f47f477863dcf1d742ee Author: dominique_libre Date: Tue Jun 5 19:58:44 2007 +0000 Madej patch: change in playlist window: it schrink-expand with the playlist bitton now. commit deecc0da64093da4e9684da9631428452ff37cfc Author: dominique_libre Date: Tue Jun 5 18:03:12 2007 +0000 Madej patch for gtk2 interface: experimental playlist in the main window and detachable. commit 599a7953a42edc404045104b626d809633bf4c13 Author: dominique_libre Date: Mon Jun 4 17:48:23 2007 +0000 Madej patch: new info window, very nice! commit baeaa78f30722473dd85c8f3e9391582cdd12900 Author: dominique_libre Date: Sun Jun 3 09:56:07 2007 +0000 Madej patch: added labels ingtk2 main display, second loop function for songs, info window commit 4d9b7edf092cb4c41865415571a2612c1c5c245f Author: dominique_libre Date: Sun Jun 3 09:51:24 2007 +0000 Madej patch: fix in the cdda display commit 14c12539fd5d2b648ee024e8bdecb47ec725086e Author: dominique_libre Date: Sat Jun 2 19:14:51 2007 +0000 Corrected wrong info in copyright commit dc011bfba2dcd451301b9beee7745095679a4737 Author: dominique_libre Date: Sat Jun 2 14:05:17 2007 +0000 Added missing copyright commit 9d684aeb595961fccd04814c4e75daf9d574b499 Author: dominique_libre Date: Sat Jun 2 12:13:20 2007 +0000 Added filename description and preferences section in the man page. commit d97c7f97a03c4ea022c6a854f8c837e7eebdff2e Author: dominique_libre Date: Sat Jun 2 09:38:08 2007 +0000 Updated licence information commit 0ba4487dba6170949057a6863f906b04858defe5 Author: dominique_libre Date: Sat Jun 2 09:29:26 2007 +0000 Changed contact information commit a6a1a2a5c9fa539088c9523c1e00182a4eb9ce96 Author: dominique_libre Date: Sat Jun 2 09:26:19 2007 +0000 Updated the ChangeLog commit 850db501f826e412a35f88d4b7244410f866e10d Author: dominique_libre Date: Fri Jun 1 21:12:24 2007 +0000 Updated TODO again. commit 926f525294b8697794df102afaed210f761a6ad4 Author: dominique_libre Date: Fri Jun 1 20:32:43 2007 +0000 Updated AUTHORS again. commit 942c47ff2ea2d61c5dacb6654619c7b106f89bf2 Author: dominique_libre Date: Fri Jun 1 18:59:29 2007 +0000 Removed directory from the default cddb server, it was confusing the new html cddb handling. commit 1fc3291d2719e10138fa959ac4e96690c40c2dc5 Author: dominique_libre Date: Fri Jun 1 18:55:05 2007 +0000 New Madej patch: lot of code cleaning, about window, tooltips, resizable main window, loop in playlist work. commit 97f45a9150d68211f034b9946cfac4a383514ffc Author: dominique_libre Date: Thu May 31 21:36:13 2007 +0000 Updated the authors. commit 2717d240dcbcc8a0a8943177a0ba21e810b09316 Author: dominique_libre Date: Thu May 31 21:07:39 2007 +0000 Madej patch: html handling in cdda_engine. commit 38a6fd8224f65a3fd2228ddda3d5bdc1de490a5d Author: dominique_libre Date: Tue May 29 19:25:28 2007 +0000 Added Peter Lemenkov ideas in the TODO list. commit e2ce497efc492a8e772016a001030552f76ed9a8 Author: dominique_libre Date: Mon May 28 22:10:16 2007 +0000 Updated TODO list. commit 26c82e52a78c14d91ece2feca72de7b0d086ca82 Author: dominique_libre Date: Mon May 28 17:26:18 2007 +0000 Madej patch: the pause button will resume the playing at the last used speed. commit 3f466c6f1b2a182a48e5d875cb86de2e3f9658c1 Author: dominique_libre Date: Mon May 28 15:38:58 2007 +0000 Modified pkgconfig check for GTK+-2.8.0 commit bb077309c9d213d7341afa6422ce73999f1edcc6 Author: dominique_libre Date: Mon May 28 12:52:28 2007 +0000 Fixed cddb_servername to use the correct directory on the server and cddb_serverport to the correct port. Fixed GTK2 dependency to GTK2+-2.8. Updated the TODO list. commit 6d30b16da86cefb74db426751ce7727286bfce47 Author: dominique_libre Date: Mon May 28 11:19:39 2007 +0000 Madej work: fixed keybindings missbehaviour and improved play button. commit f906d63a7bca11b69e7a3c1d3cc068061fe8bd13 Author: dominique_libre Date: Mon May 28 11:15:52 2007 +0000 Added --disable-opengl configure option commit a3585f9285486c2cf154a2b73d44611db281767d Author: dominique_libre Date: Sun May 27 09:42:08 2007 +0000 Updated ChangeLog, typo. commit e7f1ecb1585da9c917ebb98841047e59ccd2139a Author: dominique_libre Date: Sat May 26 23:02:32 2007 +0000 Backported Madej fix to gtk when AP is crashing with transparency.support commit 2371100d2505ed2bed6f95e8596faac3075bd755 Author: dominique_libre Date: Sat May 26 22:39:17 2007 +0000 Updated the ChangeLog commit 8b532baf5f1487290a9829d4af0f85e6ba850f41 Author: dominique_libre Date: Sat May 26 20:58:53 2007 +0000 Changed the behaviour of the Play button. A mouse click will return to the beginning of the played song. commit b29ce9d3033194e190a3821dcbc8b413885f7263 Author: dominique_libre Date: Sat May 26 13:34:45 2007 +0000 Corrected horrible mistake, i committed the file at the wrong place last time. commit 29ec3f464d31faea50b392aa7c7b1280c09dce34 Author: dominique_libre Date: Sat May 26 13:05:06 2007 +0000 Changed version to 1.0.4-gtk2 so at make dist don't collide with the gtk1 version commit 99729441d652675565ce677a8d47cb02ea729cae Author: dominique_libre Date: Sat May 26 13:00:17 2007 +0000 FftScope for GTK2 initial commit. commit fe596c139b8385d58e604e2edf12ab6d8bda7aff Author: dominique_libre Date: Sat May 26 11:00:02 2007 +0000 Changed default interface to gtk2. commit ffccfbc8c215cc4619c6b6bd7e383e1ba36973b0 Author: dominique_libre Date: Sat May 26 10:43:39 2007 +0000 Changed the cddb default server to a working one. commit 6c725fc563896c37ab3078d28775f373eeffae38 Author: dominique_libre Date: Fri May 25 20:36:44 2007 +0000 Fixed return value in CbSetCurrent (gtk2 only issue) commit 5ccb22dc966d4e2402d611a1c745d4d267735f1d Author: dominique_libre Date: Fri May 25 20:04:58 2007 +0000 New Madej patch. Fixed Alsaplayer crash when transparency support is enabled in X commit 0238531aa9ba3fcc66f2b726a3fe71ae51db1902 Author: dominique_libre Date: Fri May 25 19:15:03 2007 +0000 Removed obsolete gtk2 folder commit 7d6f3ceffabbbbf01029a958ce651280170944de Author: dominique_libre Date: Fri May 25 19:12:30 2007 +0000 Deleted non needed gui folder commit 4bf6e798dce0d8ddef5768e0f81f33345619d4d0 Author: dominique_libre Date: Fri May 25 19:08:52 2007 +0000 Patch from Madej: added the missing keybings and loop function. commit c1cba4c1cf03ba925a31af954597a9659f94a368 Author: dominique_libre Date: Thu May 24 20:48:27 2007 +0000 New patch from Madej. Little lifting of gtk2 gui commit 6955c7d814053479619f02c830cf21b961aa55e0 Author: dominique_libre Date: Thu May 24 20:30:21 2007 +0000 Updated obsolete doxygen functions commit 906b266475e050afd199e6099b9a9f05d23c8fc7 Author: dominique_libre Date: Thu May 24 20:21:15 2007 +0000 New patch from Madej. Add working scope support in the gtk2 interface. commit 766f9f217c87d85869d976e2bb7666af2a5b8902 Author: dominique_libre Date: Thu May 24 20:08:11 2007 +0000 The desktop file will launch the gtk2 interface commit 1ea0c012e460a59c9801ebf00285ea2c1b95fca7 Author: dominique_libre Date: Thu May 24 19:48:38 2007 +0000 Forget to update the ChanLog commit 3f8531221f4594864cf42dd6330d0b7141c960d8 Author: dominique_libre Date: Wed May 23 21:40:44 2007 +0000 Forget configure.ac commit d473b7aa21abe928a13e250d3433dec045afc506 Author: dominique_libre Date: Wed May 23 21:33:17 2007 +0000 Added new gtk2 interface. It work and provide all the functionality of the 0.99.78 gtk interface. It need a little polishing work but is fully usable. Thanks to Madej from Poland. When installing both the gtk and the gtk2 interface, please remove all the scopes but the Spectrum GL from $PREFIX/lib/alsaplayer/scope or AP will just crash at startup with -i gtk2. This have to be fixed before the first release of this interface. commit 330ed1fa3042464f8800e523217aaa5fff1f10a7 Author: dominique_libre Date: Wed May 23 21:23:58 2007 +0000 Marked gtk2 interface as obsolete. commit 28e08d535231572ff69bfc9e33f185209c565b07 Author: dominique_libre Date: Tue May 22 20:07:34 2007 +0000 Forget to update the ChangeLog commit c3ab2ee80cd7c9c8f5ab0d40d814b119375ddf8f Author: dominique_libre Date: Tue May 22 19:37:04 2007 +0000 Forget to update the ChangeLog commit 6d7d251857f2ddf1bbe250f0b5754e69aa0215f6 Author: dominique_libre Date: Tue May 22 19:30:19 2007 +0000 Fixed the CFLAGS, it was a typo. commit 834251657b86b947e7863f96a86ef4233a897028 Author: dominique_libre Date: Tue May 22 19:25:25 2007 +0000 Reversed the change about the CFLAGS, it break the compilation. commit 227db7ce8b1e1ab12c247a8d3a7dc1ca1ba1417a Author: dominique_libre Date: Tue May 22 19:21:06 2007 +0000 Adjusted version for new release, fixed a warning about the CFLAGS commit 93a4a26aeab856d052297c289d02b1bfb96b8dba Author: dominique_libre Date: Tue May 22 18:55:43 2007 +0000 Adjusted version for new release + minor fix in docs/Makefile.am for doxygen pic commit deaaeea2bcd7841971717f1ee0c811247df82cca Author: dominique_libre Date: Mon May 21 19:46:48 2007 +0000 Updated the text files. commit 7ec71cf8fd6b4f8ace1f369521563885615f6b1c Author: dominique_libre Date: Mon May 21 19:30:33 2007 +0000 Fixed segfault when quitting Alsaplayer and the scope was not running: Added a test to know if the scope is running before to try to stop it!?! commit 674089e9c30210ed6bbfd0bd2d89542e98e2dafc Author: dominique_libre Date: Sat May 19 20:49:50 2007 +0000 Updated the man page with the new keyboard shortcut. commit c2d581a293878733f3efd7f8c272ae134c46b53b Author: dominique_libre Date: Sat May 19 20:41:29 2007 +0000 Added keyboard shortcut for speed +/- 1 comma. Useful when playing guitar when listening: it is faster to tune alsaplayer playing as the guitar. commit 86d56146043940257243d3bfd7c1001222cb30db Author: dominique_libre Date: Sat May 19 19:20:09 2007 +0000 Updated the man page with keyboard usage with the GTK interface. commit 3e36ebd543173a4c8ca3c6c4ced670d976545e63 Author: dominique_libre Date: Sat May 19 17:42:19 2007 +0000 Patch for gtk interface from Viktor Radnai and Paul Brossier for Debian. Add basic keyboards navigation (skip, pause, etc.), loop mode (looping around inside a selection), pressing play button or key during playback returns to the beginning of the song, speed changes one musical semitone a time using the keyboard shortcut (handy for changing the key the song is played back in). commit b5abcdd5931730ed0cc6ff0da55bfed10ecf6695 Author: dominique_libre Date: Sat May 19 10:22:25 2007 +0000 Added missing include so it compile with never gcc and non gcc compilers. Thanks to Debian. commit c2a7a3f76973d3718d49fa6069f55606f2c935c6 Author: dominique_libre Date: Sat May 19 10:20:00 2007 +0000 Updated config.guess and config.sub with the last version from http://cvs.savannah.gnu.org. This add compatibility for new archs and processors in the autoconf processm and among side effects, it suprimed a segfault when quiting the gtk interface on my system. commit e2d4a82f6f62bbcfb6c4527e62974587c26dc7f6 Author: dominique_libre Date: Tue Apr 24 19:17:42 2007 +0000 Added alsaplayer.desktop in the make install process; fixed a wrong file name in docs/Makefile.am commit c66938c2ec4356f08a4e07cb5e94fe3c1dbc378b Author: dominique_libre Date: Tue Apr 24 17:09:53 2007 +0000 Added Player freedesktop sub-category in alsaplayer.desktop commit 2b68eac53e613b1113ad3be5853e531ef7dae20a Author: dominique_libre Date: Fri Apr 6 22:05:41 2007 +0000 Added flac-1.3 and 1.4 support in flac input plugin commit 0a505624904b8a13282588e259170b0eb3cadf17 Author: peter_lemenkov Date: Tue Apr 3 15:16:05 2007 +0000 Accidentally forgot to add ChangeLog entries commit 25266ed5aa323e8d6624af28b149b3f42aa8ba76 Author: peter_lemenkov Date: Tue Apr 3 14:46:44 2007 +0000 Fixed endianness-related issue commit 51f75a62e81071e6cfde39ff2dad2764ad0c380a Author: peter_lemenkov Date: Tue Apr 3 14:14:11 2007 +0000 Quick fix for BE/LE commit 36662db8a66798c80996dee0b31e19813c69d262 Author: dominique_libre Date: Tue Apr 3 13:41:55 2007 +0000 Added conditional PREFIX and install target commit 01c8b2cfb3dbb6dbcb026749e945c434423e7ce7 Author: dominique_libre Date: Tue Apr 3 13:09:07 2007 +0000 Added target install commit 358ac4826b77a71d2db08b35dbf105a5bfe1972a Author: dominique_libre Date: Tue Apr 3 10:47:28 2007 +0000 Conditional PREFIX in Makefile commit ec123efde1ea4f873f29e7568b73cf9ac4075cf0 Author: dominique_libre Date: Tue Apr 3 10:17:17 2007 +0000 Conditional PREFIX in Makefile commit a038fe661410dd499ab87e3e7018b3538249c687 Author: peter_lemenkov Date: Mon Apr 2 21:01:36 2007 +0000 use of input_object->path commit 4652de31f7f383c6e0755eb69986a0d3c44ec63d Author: peter_lemenkov Date: Mon Apr 2 20:57:43 2007 +0000 add path to struct input_object commit 71fac6b1fcd46280a41a8d1c1406efc1b43c550d Author: peter_lemenkov Date: Mon Apr 2 11:08:06 2007 +0000 Ver. 0.0.0.3 (added support for tags) commit 5b2b28dd2883f0f9e4adafa0c72767ea17413e1a Author: dominique_libre Date: Thu Mar 22 14:51:54 2007 +0000 Fixed wrong frame size with small wav files commit 2a0216cfdb3fa6d08eb504863f4eede03915514d Author: peter_lemenkov Date: Tue Mar 13 06:27:26 2007 +0000 development version commit 2cc5703e1f03a1c97c7f726469ea5b9942c996fb Author: peter_lemenkov Date: Sun Mar 11 14:09:35 2007 +0000 remove old file commit 9308f3438f90aa73b6473a09d032a3ca84cee9f6 Author: peter_lemenkov Date: Sun Mar 11 14:08:31 2007 +0000 New devel version. Still can't be used\! commit af7eb2c04a7c42b23ebcbff5a79d48550a0a8c61 Author: dominique_libre Date: Wed Mar 7 18:59:29 2007 +0000 Fixed pause/unpause with different pitches and frame rates. Will work from the command line. TODO: fix the gtk interface to work with different pithces and the text interface to work with unpause (only --start work with it) commit f90df4b1f5115cbc93f070b8202fb8928c7f4ba9 Author: dominique_libre Date: Fri Mar 2 22:32:40 2007 +0000 Adjusted the date in the man page to last revision date commit 063ac69f401e8f2993958df7b1e9ff8b888bfac7 Author: peter_lemenkov Date: Fri Mar 2 14:49:39 2007 +0000 Development release. Manu cleanups and bugfixes. Stiil can't be used\!\!\! commit d5fa9d84c5a1bb6566f9bb99ade08f4b8d8b3e8e Author: dominique_libre Date: Fri Mar 2 13:38:00 2007 +0000 Updated ChangeLog with all the last commits and added a NOTE section in the man page about the daemon interface commit 18143edb3422fe63d414dffd85685e7b9e4edf03 Author: peter_lemenkov Date: Thu Mar 1 19:06:02 2007 +0000 Fixed wrong version detection (minor issue) commit 7e00932dec9f46280d5261bca1b7a956456cf453 Author: peter_lemenkov Date: Tue Feb 27 19:22:14 2007 +0000 Removed excessive use of BLOCK_SIZE macro commit 53f57648b753adc8e47845afa7285bdb7115757c Author: peter_lemenkov Date: Tue Feb 27 19:20:21 2007 +0000 Fixed wrong detection of elapsed time commit 11a069517b32c5da9306debd3dc2c472a831c97b Author: peter_lemenkov Date: Tue Feb 27 18:41:23 2007 +0000 Removed unnecesary variables commit b842c45cbfaec68f67110fe4da318083758a8ddd Author: peter_lemenkov Date: Tue Feb 27 18:23:53 2007 +0000 Removed unnecessary ape_local_data structure commit d2304e21456ec3600263c35f64d88f45ca8a646d Author: peter_lemenkov Date: Tue Feb 27 18:01:22 2007 +0000 Cleanup for BigEndian commit 66c5579bd92e1271e9f3632bba671189229d7517 Author: peter_lemenkov Date: Tue Feb 27 16:02:04 2007 +0000 Removed unused variables commit 2614576b85a7541a1201488e2306d64be6fbcc1c Author: peter_lemenkov Date: Tue Feb 27 16:00:57 2007 +0000 Remed unused variables commit 16870e81802d43e714be8ab3ada4fdab9b063eb9 Author: peter_lemenkov Date: Tue Feb 27 07:34:12 2007 +0000 Next development version. Still needs to fix wrong elapsed time count then playing. commit 9ca13b72eb9dde8842c06fc2c760f99a1590d502 Author: peter_lemenkov Date: Tue Feb 27 06:44:13 2007 +0000 get rid of unnecessary ape_local_data commit bff177b39e68213b16e4bc1cb1e74be2514debce Author: peter_lemenkov Date: Wed Feb 14 22:10:43 2007 +0000 Added copyright notice and e-mail info commit 87f38a26f1523db8059b8c4deabb2509c6ebab21 Author: peter_lemenkov Date: Wed Feb 14 21:29:11 2007 +0000 Many cleanups commit 4d926f4f0b5f841db71111c633d9d830e2f5de27 Author: peter_lemenkov Date: Wed Feb 14 20:47:26 2007 +0000 not needed for LE arch commit e20cff9807b1b08c72110997d6819e4769360c12 Author: dominique_libre Date: Wed Feb 14 14:19:45 2007 +0000 More conforming .desktop file commit d46aaa2abb65520db6d661844312f32f260788be Author: peter_lemenkov Date: Tue Feb 13 21:53:35 2007 +0000 Cosmetic fix for all BE-architectures commit 83fcba1858966995713950e95201381b4add9af8 Author: dominique_libre Date: Tue Feb 13 21:24:19 2007 +0000 send sound data to ALSA in native byte order commit d0907654c58fb50cbc3b675ccbddb3ddb1938bcb Author: dominique_libre Date: Tue Feb 13 09:39:52 2007 +0000 Fixed join NULL thread commit 598a2a46a1beb205ea42e54d10e15ab84f4bc7a2 Author: dominique_libre Date: Mon Feb 12 22:41:59 2007 +0000 Fixed EXTRA_DIST to work with make dist. commit eae913a34fd828316b757802830fe891ad01bd06 Author: peter_lemenkov Date: Mon Feb 12 09:45:59 2007 +0000 Initial addition of experimental plug-ins commit c947ad81504dd6025ba2e15e9af5b17e74ccf2b9 Author: abingham Date: Sun Feb 11 14:44:05 2007 +0000 - added some commentary to lay out the roadmap of the python extension code - Updated the setup.py to add more metadata - Bumped the version number from 0.1 to 0.3 to provide a clean transition from the previous version's numbering. commit d9816c72d80f86b2144b1a5d2345f26867879683 Author: abingham Date: Sat Feb 10 22:13:25 2007 +0000 initial revision of the new alsaplayer python extension module. commit 88d9f00231ae0a6ce4911e533e317b165ebb9da0 Author: dominique_libre Date: Fri Feb 9 22:54:00 2007 +0000 alsaplayer.desktop added in make dist commit 705244bfbe80447c0621ecf60038ce064337923c Author: dominique_libre Date: Fri Feb 9 22:39:31 2007 +0000 Changed MICRO_VERSION to 78 (for next release) commit f73cebbea27f916129b4db597726e4ad6fa7167e Author: dominique_libre Date: Fri Feb 9 22:34:42 2007 +0000 Added alsaplayer.desktop commit 39ab70a46202cf2c527f846a5db436430880db33 Author: dominique_libre Date: Fri Feb 2 21:43:39 2007 +0000 Fixed Makefile.am to work with make dist commit 6b261c7636cc8cbd9f4815812d1ad60a9b21be20 Author: dominique_libre Date: Thu Feb 1 22:42:27 2007 +0000 Moved AM-CONDITIONAL(HAVE_GTK2...) to get --disable-gtk2 to work; thanks to Stefan Sheffler commit d33eb3764aeb2f006019fa17c4d2e395ca043d40 Author: dominique_libre Date: Thu Feb 1 18:13:33 2007 +0000 Moved fftscope_unning function at the right place. commit 09e092f864ec57a26a868547afbaf99c790594a5 Author: dominique_libre Date: Thu Feb 1 15:29:18 2007 +0000 Fix vulnerabilities according to http://security.debian.org/pool/updates/main/a/alsaplayer/alsaplayer_0.99.76-0.3sarge1.diff.gz and http://www.securinfos.info/alertes-bulletins-securite/20060919_Bulletin_Securite_Debian_mise.a.jour.pour.alsaplayer.php commit d140438095f4f95b53832c644435c946e0cb8b9d Author: dominique_libre Date: Thu Feb 1 14:03:30 2007 +0000 Fix flac Makefile to work with the last flac related commit commit 2d0be15c02edaf7e3439e4dc2edfd0d4c40643ee Author: dominique_libre Date: Thu Feb 1 13:55:47 2007 +0000 cdda_segfault_fix: fix segfaults in cdda_engine.c commit 92ca015b18676dc3ceb5c1f02f40743282e36b89 Author: dominique_libre Date: Thu Feb 1 13:52:04 2007 +0000 default_interface: use text interface if gtk interface is selected but :0.0 is not set commit 29976f5a46e9c8a75ca902397f4536a47f95a919 Author: dominique_libre Date: Thu Feb 1 13:47:04 2007 +0000 jack_oss: do not return -1 when no physical output can be connected commit a6b875966a6d6abe741ae567839d1b1ec9b33bf5 Author: dominique_libre Date: Thu Feb 1 13:43:15 2007 +0000 fix_sndfile_duration: fix duration displayed by sndfile input on mono files commit b7ae818b0062131b86c6233b5d7a04da4cc1cf85 Author: dominique_libre Date: Thu Feb 1 13:38:28 2007 +0000 text_add_new_line: Add a missing newline in the text interface commit 70a0d439342540e3e2c1af128fdebd8523bceb1a Author: dominique_libre Date: Thu Feb 1 13:34:30 2007 +0000 audiofile: Patch autiofile to play mono files correctly commit 9ff6ecb9fb9fbd4fea7edf39617d3d7d92aa8609 Author: dominique_libre Date: Thu Feb 1 13:29:19 2007 +0000 flac_input: Read flac metadata if no ID3 tags are found commit 6044f36ed21a221f36e1eaaf3435a5410efe27c7 Author: dominique_libre Date: Thu Feb 1 13:18:08 2007 +0000 cdda_input: Add __USE_XOPEN to use swab, and remove an obsolete function commit e310b932dfa81cd6cb521f4160ab434ff8283a2f Author: dominique_libre Date: Thu Feb 1 13:13:26 2007 +0000 send sound data to ALSA in native byte order commit 04c98e002e72b3184da500a549456e13b7f0a940 Author: dominique_libre Date: Thu Feb 1 13:06:53 2007 +0000 some GTK interface cleanup commit d697a7c81131e8da890ab228b1c2b86c838e3c68 Author: dominique_libre Date: Thu Feb 1 12:57:21 2007 +0000 update the man page commit 3029b8e3969c1b12cfd1a3feb2fdf3c6e6a3532c Author: dominique_libre Date: Thu Feb 1 11:35:54 2007 +0000 fix a missing space commit aeeaa59a66913de8c4ec685ffc373647af0c406b Author: dominique_libre Date: Thu Feb 1 09:32:29 2007 +0000 commented out broken stuf commit 3dd50241c4e9b7a08b40287dbcece1372bfe5490 Author: adnans Date: Sun Jan 30 21:30:52 2005 +0000 Asserts commit 57d10e3fbcd19942151e4cf3f93ff419817380a5 Author: adnans Date: Sun Jan 30 21:28:00 2005 +0000 Refactor pause code commit f87615e3bed10afa49261d444802dab048517fd4 Author: adnans Date: Sun Jan 30 21:24:57 2005 +0000 Asserts commit 9334ab8de3de874d4c6bb403d8f9d930ab6da2c6 Author: adnans Date: Sun Jan 30 21:21:57 2005 +0000 Escape ampersand in artist/title fields commit 144228183b57ac7cda9910fc8fcbe92e53f42a04 Author: adnans Date: Wed Jul 28 16:29:04 2004 +0000 Don't remember speed between pause/unpause as it's broken right now commit fc02a549a7b6d8641f1c386b725c95fc5e8e7cec Author: fbaumgart Date: Mon May 17 22:42:18 2004 +0000 upgrade mad library from 0.14.2b to 0.15.1b by default, this does not affect anyone because only a portion of the code is used to build an input module which links dynamically to some libmad.so on the system ...unless you tweak the Makefile to include this source instead commit c907c8abbe3b0dd73fef1d6f52f9e7ea46170894 Author: fbaumgart Date: Mon May 17 21:10:59 2004 +0000 add "position" command to retrieve position of currently playing title commit 3f39d5a3e68dcb813f3777eae5306b0e237c412a Author: adnans Date: Thu Feb 26 08:48:23 2004 +0000 Fix crash on empty playlist commit 7e4d412faeadcb621cfe8cfbebd8fb9c03dce7e9 Author: adnans Date: Wed Feb 25 20:38:07 2004 +0000 TODO fixed ;) commit 352a699d051030914524375da0d981c675adebe7 Author: adnans Date: Wed Feb 25 20:31:00 2004 +0000 Implement ap_get_playlist() function. Gives back the current playlist commit 5e3540d4b4356b1be742b1c1278be93dd814fe7c Author: adnans Date: Mon Feb 23 19:53:41 2004 +0000 Updates to interface. Looks a bit better now IMHO commit ea5027a656236373dbdb441b9c05bcfcc34f4f3d Author: adnans Date: Mon Feb 16 00:01:11 2004 +0000 Add gtk2/glade subdir commit 8a094fb903c8688c75e0ef2a0a1cd1e863f51744 Author: adnans Date: Sun Feb 15 23:59:23 2004 +0000 More build fixes commit 1b152cecfcbd7691e96237a37d5581db240a2c1d Author: adnans Date: Sun Feb 15 23:19:11 2004 +0000 Add missing files for GTK2 commit 33c587ba121a75734449d6376ffd0cd803dd8f85 Author: adnans Date: Sun Feb 15 23:06:16 2004 +0000 Add copyright notice commit f3676e241fbe9ba1a6c1bbafc3b4d669a767ff71 Author: adnans Date: Sun Feb 15 23:02:12 2004 +0000 Initial GTK2 interface. Mostly just a skeleton for now. NOT really usable! commit 8b878ab202b1da687b5ed12faafa6ba471181cb2 Author: adnans Date: Sun Feb 15 19:01:07 2004 +0000 Print filename if we fail to open commit aa6f8c713fd1d15984220d57b61b8cd424b5f770 Author: adnans Date: Sun Feb 15 18:58:30 2004 +0000 Add helper functions and fix percent decoding commit a1cdd826024586d7ee53c3060b3e37d6e673fe59 Author: adnans Date: Sun Feb 15 18:45:16 2004 +0000 Fix int16 max value according to JACK internals commit f1bfef174c1070fa04613f7e9bfb48f7504c6697 Author: adnans Date: Sun Feb 15 18:43:45 2004 +0000 Init character array commit 4abc94a95078601a61b339f9c0f8a42c7d05bee1 Author: adnans Date: Sun Feb 15 18:42:46 2004 +0000 Don't follow null pointers commit 650d6cd57fb82df53d6a4a04ebb20c0eacde0c59 Author: adnans Date: Sun Feb 15 18:42:13 2004 +0000 Fix threading bug commit 8517de76d4e47b25cc46c9cb7bcd0aff7c2b99d9 Author: adnans Date: Sun Feb 15 18:39:58 2004 +0000 Switch to conditional wait instead of just unlocking (a potentially unlocked) mutex. This is the correct way of doing things, and thus more portable. commit badd342ab4c9b980f89fd7c03dc4b9303957eb11 Author: adnans Date: Fri Jan 16 17:31:51 2004 +0000 Fix crashing bug when exitting player commit a2e9d1adb75a8bf45f3d837e4d56c26df2a1ac69 Author: fbaumgart Date: Sun Dec 7 20:33:38 2003 +0000 fix: perform comparison of the file extension only (to check whether we should handle the file in this input module) commit 6907c67e2a751c3349dc58e42e29989bfe87940d Author: adnans Date: Fri Dec 5 14:05:39 2003 +0000 Fix configure for new alsa driver. Remove /usr/local/aclocale from ACLOCALE path. It was causing some bootstrap trouble. commit 950d49eaa3f6ed04d1d254b1dce848ce82bb96ff Author: adnans Date: Mon Nov 10 19:57:45 2003 +0000 Make fast path compile for embed only commit 8f58814d8ec0b264bb3944992411039be7545358 Author: fbaumgart Date: Sun Nov 9 16:50:42 2003 +0000 added description of EMBEDDED mode minor spelling/wording improvements commit 3ef16044103f670ec51f0bb8bef967596731b6d7 Author: adnans Date: Sun Nov 9 13:40:35 2003 +0000 Hmm, disable fast path code for now since it breaks in other ways too. It looks like it has something to do with proper pre-buffering. commit 6f1068803ac918e0effd030fea638d7be78d2d70 Author: adnans Date: Sun Nov 9 13:30:18 2003 +0000 Fix seeking crash bug in fast path code. Seeking should still work in embedded systems *g* commit 5c740ec2dda74f41a9d32d9c05612262b3e55eba Author: adnans Date: Sun Nov 9 13:28:30 2003 +0000 Only call pthread_join if thread is actually running. Prevents horrible crash on NPTL enabled machines. commit aac01d0e85b95469de55240db9c2bcd1c545c299 Author: adnans Date: Sun Nov 2 18:30:46 2003 +0000 Do not loop the playlist automatically commit c6e9a8dbaed061a5f5d18b07a66320a9f889a638 Author: fbaumgart Date: Sun Nov 2 00:44:47 2003 +0000 documented lower resource usage for embedded target commit f5fa2cabf64039475fd8466d90318a7e54fc19a9 Author: fbaumgart Date: Sun Nov 2 00:22:43 2003 +0000 reduced memory consumption by 128 KB in embedded mode (where volume/pan/channel mix buffer was obsolete) commit 876b448e2b71686d7606e2c92192a21e6adfbd40 Author: fbaumgart Date: Sun Nov 2 00:10:51 2003 +0000 provide a working "fast-path" implementation for playing in forward direction with standard pitch. This reduces instruction count by 5% and data accesses by 8% when playing a 128 kBit/s mp3 file. commit aad3608cd1bbde08d453fca77fff6de7d09b6094 Author: fbaumgart Date: Sat Nov 1 22:09:44 2003 +0000 minor source cleanup commit c94be86a3ab404f3b1fa1e01b9a2110a0da53328 Author: fbaumgart Date: Sat Nov 1 12:01:27 2003 +0000 fix stupid typo, sorry commit 6d3367c4c2925592500db40e355ad4dcd81e63e2 Author: fbaumgart Date: Sat Nov 1 11:59:49 2003 +0000 add missing help items "prev"/"next" add commands "loop-on"/"loop-off" to enable/disable playlist looping commit 240d7f8cc50b3fac2b968f9c048541f1e0730945 Author: sjah Date: Thu Sep 18 17:31:23 2003 +0000 applied patch from Ivo Timmermans (fix for Bug#210294) commit d4ddbc0b69a1d6b014d79379d74c431c6cf447cd Author: adnans Date: Fri Sep 5 09:47:48 2003 +0000 VOLUME and PAN parameters are now given in FLOAT. The range of the values is now between 0.0 and 1.0 for volume and -1.0 - 1.0 for pan. This is a radical update and all stuff dealing with volume / pan will break! No convenience functions for now. commit 5bc4e4d45c791f1190dbce3a2bb3136f36c9cfc0 Author: adnans Date: Fri Sep 5 09:43:01 2003 +0000 Undo changes, to work with 2.4.x commit ef6cb77f94289473879058bbcc3ea084c24b3922 Author: adnans Date: Fri Sep 5 09:42:20 2003 +0000 Update ALSA detection commit fb5e5f75febe5689397dbc4cc8680d59512c950e Author: adnans Date: Fri Sep 5 09:41:50 2003 +0000 New examples and updated ignore files commit 83a64317a988eff48902176eb8e6f8ef0920a5f2 Author: fbaumgart Date: Mon Sep 1 23:48:47 2003 +0000 minor dead code removal commit 4f0ef80b1802186e79c24fb016835fe7af8ddcb2 Author: sjah Date: Mon Sep 1 14:40:55 2003 +0000 Applied patch from Jeff Cutsinger (adds ap_get_playlist_position, ap_get_file_path_for_track, ap_insert, ap_remove, ap_set_current) commit e5d1abd9885924b3bc8b2528f38494cc6ebfcc92 Author: adnans Date: Mon Aug 4 20:34:37 2003 +0000 *** empty log message *** commit 001d2727a09f034947981679c752491c826f1378 Author: adnans Date: Mon Aug 4 20:33:13 2003 +0000 Comment out master code, it doesn't make much sense commit c2c5151f7c4333c846e321b243216fe85ded1b8d Author: fbaumgart Date: Mon Jul 7 21:59:07 2003 +0000 updated email address commit 1ad43336e6dc65cd532976ba862c0459b2cc96ad Author: fbaumgart Date: Fri Jun 13 21:09:14 2003 +0000 minor cruft removal commit 2ef6eb7bc512a5dc9802658f2fa21c2591a1c915 Author: adnans Date: Sat May 31 08:20:05 2003 +0000 Fix transport control and add some test code for master mode (not used) commit 21a443ee4f09a3b1fa6701e4690397bebc153a64 Author: adnans Date: Sat May 31 07:00:54 2003 +0000 Add "noconnect" parameter. commit 5fde2bf1dd0b38e4ad5becde682ed4174d78315a Author: fbaumgart Date: Fri May 16 21:43:44 2003 +0000 fix help message commit e9050794507e62ecd4b83de1c42781daa930ea3d Author: adnans Date: Fri May 16 19:52:20 2003 +0000 Update version number commit 6ff0d5e114ac6ef418f0d79dba0e2edfe6b727ea Author: adnans Date: Fri May 16 19:50:34 2003 +0000 Decrease internal buffer a bit, create new flag P_BUFFERSIZE, not used yet commit 36a95f541fd47071dc3dbc97d92b2008714b3d03 Author: adnans Date: Fri May 16 19:20:31 2003 +0000 Make sure local_data is NULL between opens commit 9ac76546923e197bf7e9c57547f9eb28d1469142 Author: adnans Date: Fri May 16 19:19:38 2003 +0000 Format string changes commit 65094887eae91c9158295429b0c81613145649a1 Author: adnans Date: Fri May 16 19:19:11 2003 +0000 indenting commit 4f5419850f82c258f84e51e8e2c5ced5cec0f06a Author: adnans Date: Fri May 16 19:13:19 2003 +0000 Remove unused code commit 121397cf9ae75dac9de17a8b1851293dcb67c6fe Author: adnans Date: Fri May 16 19:12:56 2003 +0000 Update format string commit 2e5638a3051cf858ecec1d0ce1852596f9bc6854 Author: adnans Date: Fri May 16 19:12:11 2003 +0000 Remove gtk2 comment commit 94ce0f7a40510d090c54a04c69701b02fc7b5271 Author: adnans Date: Fri May 16 19:11:22 2003 +0000 Include assert.h commit de1df0181b88492409fe80658aa2e211a5e9aea1 Author: adnans Date: Fri May 16 19:09:15 2003 +0000 Increase buffer size a bit commit 05a576b14ba03eb84c0b1e0761cb747599c92098 Author: adnans Date: Fri May 16 19:00:17 2003 +0000 Update init function declaration commit a5945cba3be4dcad0dad32c298d93c363f4f2362 Author: fbaumgart Date: Fri May 9 22:13:10 2003 +0000 configurable font, timeout, hor/vert. offset and color (see source for configuration entry names for now) commit 0646f1c4d5546a5e87da419f88030924c6466a61 Author: fbaumgart Date: Fri May 9 21:28:19 2003 +0000 use a larger font (adobe-helvetica style) for display commit 58690aebac1a9a701acbf67e926c11e171a95913 Author: fbaumgart Date: Thu May 8 23:57:44 2003 +0000 - provide a fast path implementation for the common case (Read32) - provide a fast simple streamer which only handles a single stream with no software volume/pan calculation (EMBEDDED systems only) commit 4d7c9811133516b5bdfb3302e22b7966a32db9c9 Author: adnans Date: Tue Apr 29 20:17:24 2003 +0000 Add missing assert.h commit 51fdd3044568f821cd0f31540699797ccef03645 Author: adnans Date: Tue Apr 29 09:24:24 2003 +0000 Move decl. up commit 44d9fb151db680f56cefcde9bddc141112a633a6 Author: adnans Date: Wed Apr 23 23:21:06 2003 +0000 Remove debugging print commit 5c09215897d3401d73bee7415b2a5ec6df1fb088 Author: adnans Date: Wed Apr 23 23:20:32 2003 +0000 Increase crossfade to .4 secs commit 152f35cb3cbbe2a04e48a6efdb040b1063e5b745 Author: adnans Date: Wed Apr 23 23:17:08 2003 +0000 Update ChangeLog commit f85e442e9c9f9412572ce2e16ce48707bcc80ede Author: adnans Date: Wed Apr 23 23:13:53 2003 +0000 New --status and --quit control options. --status dumps some info about the session and --quit kills the session. commit 7457012a7a2acd1e276f6e79c9caf0db231973f3 Author: adnans Date: Wed Apr 23 22:27:44 2003 +0000 Remove printf params commit eaa580bdb9710456636ec2a175b35820d7cd8b9b Author: adnans Date: Wed Apr 23 21:36:18 2003 +0000 Fix XING header parsing commit 3396f384401cd7f5fb439109649455252708f7f1 Author: adnans Date: Sat Apr 19 11:11:21 2003 +0000 Use xosd_destroy instead of deprecated xosd_unint commit 0eaae6de877abc1bd4b90b6d27659040d70af63f Author: adnans Date: Sat Apr 19 10:58:30 2003 +0000 Default playlists to looping commit 42e8a21555eb564c06326989fb69f4b4f561a020 Author: adnans Date: Sat Apr 19 10:57:57 2003 +0000 Disable segfault capture, in order to get core files commit a10183aef7ef26a44ea17427cd7611800a6bba07 Author: adnans Date: Sat Apr 19 10:56:05 2003 +0000 Update changelog commit 67d942da57eec5293c6ce5e0ab31b6ee0863a970 Author: adnans Date: Fri Apr 18 23:48:50 2003 +0000 Add basic transport support. Use -o jack -d transport to activate transport control. commit 88bd2c16a6a443d6b9a51454f537c87688169620 Author: adnans Date: Fri Apr 18 23:47:23 2003 +0000 Change time display to buf when streaming commit 25d62e13086f1a208d1d1d9267251a324881f5b4 Author: adnans Date: Fri Apr 18 23:46:10 2003 +0000 React to move drops too (Konqueror) commit be77d15f5092a25e280380e2f6f7981945ca8d94 Author: adnans Date: Fri Apr 18 23:45:10 2003 +0000 Extra Close() commit 6f5a0ac1009da0a572484ae30f72b6afdd59656e Author: adnans Date: Fri Apr 18 23:44:28 2003 +0000 Add some debugging output commit 9164f5216e9a2557c886fa0bfb93fb4ecdffba82 Author: adnans Date: Fri Apr 18 23:43:06 2003 +0000 Tidy up output a bit commit f774c9ad0d2ee72b2bdee9f29b209a6ccb2a15ee Author: adnans Date: Fri Apr 18 23:42:27 2003 +0000 Sort prefs before writing commit a65640c0bd72341bbf0bd8064bdf3c6549896fa8 Author: adnans Date: Mon Apr 14 13:11:01 2003 +0000 Rewrote file parsing code. commit 7b682c1e39803d9e4dc252f48f90033f17c420b6 Author: adnans Date: Tue Apr 8 18:09:39 2003 +0000 Simplify text output and increase information (for streaming) commit 139d72138ce0df3a1f9060f61e4b77367c8cb7fb Author: adnans Date: Tue Apr 8 16:23:19 2003 +0000 Update to 0.99.75 commit 82a653317a98288986d7e98045691a66247576ee Author: adnans Date: Tue Apr 8 16:21:01 2003 +0000 Update to version 0.99.75 commit a18eb11ed42a403842e2e981ed8b6e272dfafd10 Author: adnans Date: Tue Apr 8 16:06:23 2003 +0000 Forgot about GetNode() call commit 8bcc9803ca993cb764da6d0f313d6b52f5deaa57 Author: adnans Date: Tue Apr 8 15:25:18 2003 +0000 Fix bug where seeking command would unintenionally be applied to a new song. commit fc196281defcc962f7a023a82a62f45b6f5a2b9e Author: adnans Date: Tue Apr 8 15:24:23 2003 +0000 Update commit d2d6d59c67c0be3ecad46c69116eb3cd174c5e9c Author: adnans Date: Tue Apr 8 15:23:31 2003 +0000 Fix potential bug in scope_feeder_func commit 0ce966fbeb585139aadf0c960263fbf890665d1c Author: adnans Date: Tue Apr 8 15:22:41 2003 +0000 Clearer text commit 0ce8f3e982ad262723e5004b6aa964c351414e09 Author: adnans Date: Tue Apr 8 15:22:00 2003 +0000 Fix a silly bug in thread creation. We would crash if StartStreaming() was called multiple times. commit 4446f0f8a7010032ce931905266ea2e5ffec241d Author: adnans Date: Tue Apr 8 15:19:18 2003 +0000 Undo previous commit. This scope is in flux right now. commit 5d0b06721f87a5f86eb238fd4b4a97f6313b5bbc Author: adnans Date: Tue Apr 8 15:17:16 2003 +0000 Change init() to accept a pointer. This is not used yet, so it can be ignored for now. commit c11da89f036f1bd3c25e9deb947e4bf8d7d247f3 Author: adnans Date: Tue Apr 8 15:15:52 2003 +0000 Modify set_buffer() call. Fix ALSA plugin to support dmix device. commit c4a205a1ea1bfaa2b7ae83ba72a7692e9d208d27 Author: adnans Date: Tue Apr 8 15:14:59 2003 +0000 Changes in plugin API's commit a2d93377b8cfa239bf0cd382c5dddcf7b1e5fd2c Author: adnans Date: Thu Mar 27 07:58:27 2003 +0000 Add pause/unpause control to libalsaplayer. Also a new --pause parameter to pause/unpause a running player from the command line. commit 74fae66a1f8befb171ff893cf06e0d4ca2d5c127 Author: adnans Date: Fri Mar 14 01:05:18 2003 +0000 Allocate mix buffer dynamically commit 9fe888e0c56911c94ef5d78317572b8d0f77916e Author: adnans Date: Fri Mar 14 00:48:47 2003 +0000 2 more spaces commit 3a9d916cac4c5b1e3b901e5409a4ac6a2e27a2bd Author: adnans Date: Fri Mar 14 00:31:02 2003 +0000 Only check .ogg files commit 67faeeed479cc94b8e382fe796db2a17e28e3ac5 Author: adnans Date: Thu Mar 13 20:28:09 2003 +0000 Dynamically allocate mix buffer. commit f8612e15d3d0e9a24c6e5b9f637f8250821c6fe2 Author: adnans Date: Thu Mar 13 20:19:57 2003 +0000 Minor change in reader_status reporting, not final. commit f3d2102f390a5245b8238c59cbc3ce6cb5d87686 Author: adnans Date: Thu Mar 13 20:13:35 2003 +0000 Get rid of the fixed mix buffer. commit 47e68335bdec635fa4c9f45929de92276cae5f6f Author: adnans Date: Thu Mar 13 15:12:45 2003 +0000 Again, a really silly static buffer was was causing trouble. commit 37029a2efae4409973c281802f83d1f5d46f6b32 Author: adnans Date: Thu Mar 13 13:09:34 2003 +0000 Fix silly thinko bug, which caused crashing in the reader plugins commit a3976b553ecfdbd9c5a573d9358295e1cece0fb5 Author: fbaumgart Date: Wed Mar 12 20:22:01 2003 +0000 minor usage string fix commit 477f4caa2879d9087dd53c219a3cb28884c5e527 Author: adnans Date: Wed Mar 12 01:07:17 2003 +0000 Get rid of silly pthread hack commit 5d307075b3f845951f23d113cfddf7d6911c223c Author: adnans Date: Tue Mar 11 23:10:27 2003 +0000 call Close() instead of just Stop(). This has ramifications for adding new songs.. commit a8d415512213bf43bfc921a949f32f75f302be56 Author: adnans Date: Tue Mar 11 23:05:12 2003 +0000 Make sure current plugin is closed beforing destroying CorePlayer object. commit 35a146c5d5504cf938785702e74d321cb0ddac09 Author: sjah Date: Tue Mar 11 21:08:02 2003 +0000 Added code for updating buffering status of http reader plugin. Don't keep played data in buffer when stream is not seekable. When buffer is seekable, use 1/3 of buffer space for played data (for seeking purpose). commit d91e98942955201ac7e7feb100a2c7ebb7c8351f Author: sjah Date: Mon Mar 10 13:01:48 2003 +0000 Not small amount of evil bugs fixed in http reader plugin. Code cleanup is also done. commit 6675f80461c07d474b7520bc15b2b3d4b5a1133c Author: adnans Date: Sun Mar 9 22:18:24 2003 +0000 Do not follow http:// files immediately for now commit 74b56e3322468ab9c2f7c18c7f65bf9df0589125 Author: sjah Date: Sun Mar 9 20:16:58 2003 +0000 Added ability to seek in vorbis streams which support seeking. Seekable streams provide tags for Vorbis and MP3. New buffering strategy for HTTP plugin. Fixed hidden buffer_pos bug. Better HTTP buffer shrinking strategy. commit eecaf1c2983d57c1c3691f22619cce674299ef0f Author: adnans Date: Sun Mar 9 16:34:00 2003 +0000 Remove some error printing commit 6fc00ff9cb639618c4366987573464a9f239bcde Author: adnans Date: Sun Mar 9 02:48:35 2003 +0000 Change reader API to include reader_status callback function. Useful for reporting back status of the reader. commit 702a18057830ac03abfc7c739c84b79d8f8c6d28 Author: adnans Date: Sun Mar 9 02:47:33 2003 +0000 Decode extra header before extracting stream parameters. commit 2d390a4fdfbcb47adc35cea4721f0c29f9ed3662 Author: adnans Date: Sun Mar 9 02:46:34 2003 +0000 Fix build when OggFlac is not installed. commit 4cd5df43cadb75259a7f181b40d9a372daac95fa Author: adnans Date: Sat Mar 8 23:12:32 2003 +0000 Require libsndfile 1.0.4 now commit 98baf1e33de76a9159ac17df5bfddc1ebe280478 Author: adnans Date: Sat Mar 8 23:09:15 2003 +0000 Fix serious bug. We were processing frames with errors! commit c916bce56911e56d65c5c653f74af4b1c7d5aba4 Author: adnans Date: Sat Mar 8 21:22:43 2003 +0000 Fix find_initial_frame() some more commit 4ab2389d279477601ee4f6fa65a1e1ab6a2397fd Author: adnans Date: Sat Mar 8 20:15:59 2003 +0000 Fix segfault commit 8d8aef9e1a0ff93d8491eaa5605b542c0903c2cd Author: adnans Date: Sat Mar 8 13:14:30 2003 +0000 Do not copy (possibly) corrupted frames. commit 37b325db7ef4bbd8490bde5f9b690a2bdc6dd13b Author: adnans Date: Sat Mar 8 11:47:25 2003 +0000 Remove some dead code commit 27ab38d27b216ed8fbb48b3058816b8fe4589c30 Author: adnans Date: Thu Mar 6 21:07:47 2003 +0000 Add code to prevent http following until we have MIME handling commit d8b7199b1e229c29bc6ebcd24fa06f42e0f3a021 Author: adnans Date: Thu Mar 6 20:57:46 2003 +0000 Disable fancy lookup since this breaks Icecast streams commit f5169ad8801498b8988513419c247523440f1226 Author: adnans Date: Mon Mar 3 08:33:47 2003 +0000 New files to support OggFlac commit 03d20b7ad79661a66007957bf6bc9dd84e534ac0 Author: adnans Date: Mon Mar 3 08:33:00 2003 +0000 OggFLAC and OggVorbis patches from Drew Hess. commit 72453a785125795d9e9bd0fc8b712c716fc5a8dd Author: fbaumgart Date: Sat Mar 1 09:16:05 2003 +0000 removed gcc'ism which prevented compiling with gcc 2.x or non-gcc commit 2da6462f28dd8e4dafbe23e6dc1df0fa5ef966e8 Author: fbaumgart Date: Fri Feb 28 23:50:33 2003 +0000 new command: "playlist-clear" minor usage output fix commit fcc346240b396ef9b7906859a0905db8589a3de6 Author: adnans Date: Fri Feb 28 08:14:11 2003 +0000 Some more fine tuning in stream init parts commit eeaed7b3ce2d2cf7174160ab6f37f0d08cf38ea8 Author: fbaumgart Date: Wed Feb 26 22:52:29 2003 +0000 fixed wrong return value on "playlist" command commit d2d735568ecc9216cae1b98296e4bed5b4e2e230 Author: fbaumgart Date: Wed Feb 26 22:13:02 2003 +0000 compile fix: do not prepend "alsaplayer" in header file path commit 7c9a2a311ffd49529e82555b947717315c2c1229 Author: adnans Date: Sun Feb 16 18:23:21 2003 +0000 Add _interface postfix to all interface plugin shared libraries. commit 9bf3cfc26973afa54d10060b55215eb19766795a Author: adnans Date: Sun Feb 16 18:20:42 2003 +0000 badbitrate is also not fatal commit bddabb463eedd6d32b0dd786c4cce1bdc7f1a883 Author: adnans Date: Sun Feb 16 15:06:31 2003 +0000 A HUGE number of warning fixes again. This time courtesy of the SuSE engineers. commit 587dd29f034d5e01b247d58e366423d33db8feac Author: adnans Date: Sun Feb 16 10:37:52 2003 +0000 Increase robustness of find_initial_frame() once again. Who says goto's are bad? ;-) commit d0d1ff824aea866ec6dcfbbdac4fb6f8b764eda8 Author: adnans Date: Sat Feb 15 05:48:13 2003 +0000 Fix ap_find_session() to work with multiple sessions (thanks to j@thing.net) commit 04685df63bf81e703ba7f6341d680e10d2442438 Author: adnans Date: Tue Feb 11 16:08:40 2003 +0000 gcc 3.3 compile fix (thanks to Takashi Iwai) commit bed0b80615ea6515ab6aae2a0d8bd3d9f2bfdb55 Author: adnans Date: Sun Feb 9 19:38:00 2003 +0000 Massive compile warning fixes. Clean up Makefiles a bit commit 340a43c9125a58c057f19213622d6c69fadc2eef Author: adnans Date: Sun Feb 9 12:51:59 2003 +0000 Remove deprecated function call and bump up required jack version to 0.50.0 commit 4f956a330d119cab90a6398f6f20a990b9c0c723 Author: adnans Date: Thu Feb 6 05:50:04 2003 +0000 Prepare for 0.99.74 release commit fcac677ea7746024f8de468fcca082a64652eb4b Author: adnans Date: Thu Feb 6 05:29:01 2003 +0000 Bug fixes commit 27d621770dcbb09f9c4b8a583b0cb6b22a58ac4a Author: adnans Date: Thu Feb 6 05:15:54 2003 +0000 Add support for multiopen (enabled by default) commit c71a58e8bb2b4de1ba0af3f0ab1f8f466891a4fc Author: adnans Date: Thu Feb 6 03:15:30 2003 +0000 Do not bail on CRC errors. commit a1e5d8848108a774a5e61cf3ee00f2c3ed494a34 Author: adnans Date: Sun Feb 2 17:25:27 2003 +0000 Catch sigpipe signals. Minor bug fixes commit 6bff2d8940734bfbeb9931070289e060b7be2c53 Author: adnans Date: Fri Jan 31 16:28:12 2003 +0000 Wrong level for closedir commit a15654ea41ca1faca8db1e20e16e95ddd4273e27 Author: adnans Date: Fri Jan 31 16:21:47 2003 +0000 Create cddb directory if it doesn't exists. Be more quiet now. commit c716da2bd402d5ea90930e799af98f14f0022d91 Author: adnans Date: Fri Jan 31 15:52:09 2003 +0000 "Handle" 401 errors commit cb45a5e8c0302e978f92234dd4c1bde99ecd9627 Author: adnans Date: Fri Jan 31 12:53:59 2003 +0000 Fix default playlist load at startup commit c22c58a55d7a1350adcf6f78ab1e7b303348f389 Author: adnans Date: Fri Jan 31 10:16:52 2003 +0000 Remove last debug print commit f9a806c65fd38224a6bdd5b75685370901e94efd Author: adnans Date: Fri Jan 31 09:02:41 2003 +0000 Make note in config about cdda build commit 6e3765faef3dba7d3b45ef22f5286f38a54b9830 Author: adnans Date: Fri Jan 31 08:58:54 2003 +0000 New utilities functions commit 0e34d2ae14297c11282cfda2afa4845c141ddf30 Author: adnans Date: Fri Jan 31 08:51:02 2003 +0000 Initial CDDB parsing support. Thanks to Anders Rune Jensen. commit 438d2621d86732cba3770f08ca17d97a94c0929c Author: adnans Date: Fri Jan 31 08:48:19 2003 +0000 Don't call mikmod_init() here commit 8092dde313b50e0dd4fb45dae9201706f066ba79 Author: adnans Date: Fri Jan 31 08:46:52 2003 +0000 Another longstanding bug, input plugin init() functions were never called commit 38f2b954f10838a6b48569dbf9f7fafb6325333a Author: adnans Date: Fri Jan 31 08:45:55 2003 +0000 Move some functions to utilities.c commit c60e329ab991b74b72dc37f812701f2042846b9a Author: adnans Date: Fri Jan 31 08:43:32 2003 +0000 Remove debugging print commit 10a09f25747226e1760744e7d425cd74ec1f7c61 Author: adnans Date: Fri Jan 31 08:29:08 2003 +0000 Eeps, parse_file_uri() was totally wrong. The escape value is actually HEX. commit 67991eb506e1a6c95cd2162c1d8c117c0a73067a Author: adnans Date: Thu Jan 30 20:35:02 2003 +0000 New libalsaplayer functions to control track and playlist looping. commit 77ea9489a6f96b7efd4a5d90aaf6eaf2fd3c01c8 Author: adnans Date: Wed Jan 29 19:05:48 2003 +0000 Support dropping of playlist files. commit 1392a728ccba2e10f08a54429e9e11f95a321d2f Author: adnans Date: Wed Jan 29 14:58:19 2003 +0000 Move helper functions to utilities.c, and do escape parsing in drag & drop handler since it's a specific dnd format thing. commit 02034ed78ba6b92e6e68a6451841aad2a8084291 Author: adnans Date: Wed Jan 29 14:47:44 2003 +0000 Basic Drag & Drop support for playlist (works from Nautilus & ROX). commit 085fcec138caea9cbb576b6a02e72627d3d8cf6c Author: adnans Date: Wed Jan 29 13:51:29 2003 +0000 Implement GetTracks() call commit c639bb4df1b75dec29da5f3854b7c1fcedecbf8e Author: adnans Date: Wed Jan 29 13:46:14 2003 +0000 New ap_get_tracks() call commit b6a52df97615f49a689346fc415d15a749ac1106 Author: adnans Date: Wed Jan 29 13:45:56 2003 +0000 New ap_get_tracks() call, to get total number of tracks (for CDDA) commit 46c8345e39f1e1e9964530059631b35ee24fe617 Author: adnans Date: Wed Jan 29 13:44:20 2003 +0000 Fix potential divide by zero condition. commit 773e75dd6bf548381ac0b38db88fef81206f7a04 Author: fbaumgart Date: Mon Jan 27 17:10:11 2003 +0000 minor readability cleanup commit 52d7ab375a6a98d5ecb3127b63e2469062f01c33 Author: fbaumgart Date: Mon Jan 27 17:06:01 2003 +0000 add xosd description commit 0a04ad18de24f7138f8ff3d50bce234683c9a29f Author: fbaumgart Date: Mon Jan 27 17:05:04 2003 +0000 printf/puts instead of fprintf commit d76bc5ace9146681fd130fd72ea4d10b70745975 Author: fbaumgart Date: Mon Jan 27 17:04:26 2003 +0000 add ap-control commit 84980b2aae179c814a58c1025765ab5c4e6413ba Author: fbaumgart Date: Mon Jan 27 17:02:24 2003 +0000 autoconf/Makefile fixes commit 72561e48ae18fdadfec9875e6bc27001c82d4cd5 Author: fbaumgart Date: Sat Jan 25 03:58:38 2003 +0000 add autoconf/configure stuff for xosd; not complete yet but on the safe side commit ca5f5267f72898d0d1a3c7c018eb141df68353ae Author: fbaumgart Date: Sat Jan 25 03:38:16 2003 +0000 new interface: "xosd", resembles daemon but with X11 OSD display commit 9c6e4f16afc1f1479b747788017f6e5622010cca Author: adnans Date: Fri Jan 24 21:27:21 2003 +0000 Remove extra include commit aac2ee868f869e81f56fdd5deab0a9b936cd6723 Author: adnans Date: Fri Jan 24 21:21:54 2003 +0000 Remove remainder of plugin loader. commit dc335ec5ac1f1c0c5d028981e9bbae9595c6f275 Author: adnans Date: Fri Jan 24 21:18:22 2003 +0000 Move the output plugin loading code to AlsaNode, where it should be. commit cfb20164a45eebbf6942d4c07e40e98d1d3ab256 Author: adnans Date: Thu Jan 23 06:35:27 2003 +0000 Fix looping behaviour. Check for LoopingSong in the playlist_looper instead of in the Next() call. commit f970895c94530f1c62bdad3ded3a7dbd2538bc82 Author: adnans Date: Mon Jan 20 19:35:35 2003 +0000 Don't hardcode paths commit c5dbc73d122719706d9c5d79d84a09de71ada4c2 Author: adnans Date: Mon Jan 20 19:00:38 2003 +0000 Better to let -l do the old thing. commit 3225a460b99535a9d319e7c53df160179370076c Author: adnans Date: Mon Jan 20 18:57:16 2003 +0000 New --startvolume parameter which mimicks old behaviour of -l. --volume now sets the volume of a running alsaplayer. commit 43fdd3cc40bb11ff1467bc0f9b5c13cf6f3135d5 Author: fbaumgart Date: Mon Jan 20 18:56:44 2003 +0000 mark ap-control as "alpha" commit 4376797e4164fcaf4d2cc133c79f89eaae7e7d37 Author: fbaumgart Date: Mon Jan 20 18:51:23 2003 +0000 ap-control new API functions commit 4bd7a85f67c3d713807690e277310a4f1727b44d Author: fbaumgart Date: Mon Jan 20 18:43:57 2003 +0000 Makefile and README for building ap-control commit f2d03020ea4cb87af6c61ce24103d824816d8535 Author: fbaumgart Date: Mon Jan 20 18:41:37 2003 +0000 enabled argument to save playlist commit a88de06842ff602691cae88b79cb6e23ba1d6848 Author: fbaumgart Date: Mon Jan 20 18:35:55 2003 +0000 small program to control alsaplayer commit 3580098a8ddecfdd70a0ddf5dba8f7254662ffd5 Author: adnans Date: Sat Jan 18 22:55:02 2003 +0000 tyop commit c96bc20deb0fff6c46efc28c316cf6d7f63d5a0f Author: adnans Date: Sat Jan 18 22:45:40 2003 +0000 Sync changes commit a5b611150437ea7a29836a3d361fe1be88b6c1fa Author: adnans Date: Sat Jan 18 20:14:33 2003 +0000 Did the permission change? commit d2fb8530d009898cd38a5a9e6a3a4d1d450c280e Author: adnans Date: Sat Jan 18 20:13:58 2003 +0000 Remove commit 0d4b345092110cce8ab98948da6e10dab0ba2fc3 Author: adnans Date: Sat Jan 18 19:31:35 2003 +0000 Replace stdint.h with inttypes.h commit fe3642547df33300957230c5ba898042025af681 Author: adnans Date: Sat Jan 18 19:13:59 2003 +0000 TODO is no longer commit 00f3c680cdcc5679c23512e4e1918ea38cf0c8bd Author: adnans Date: Sat Jan 18 19:11:48 2003 +0000 DONATIONS was moved to docs/donations.txt commit 989451da0a6f285fe87e61e52295df3c33361a0d Author: adnans Date: Sat Jan 18 19:06:34 2003 +0000 Couple of remote control control parameters. Reorganisation of help screen. commit d7c6122a871f7cea7311e16179ae8e7beaddfa2e Author: adnans Date: Sat Jan 18 19:05:54 2003 +0000 New ap_get_playlist_length() call commit 2e8e53c62883ea01b5b7c0c3605789f44bb0ba19 Author: adnans Date: Wed Jan 15 22:43:07 2003 +0000 Fix http_metadata, was using wrong variable commit 892a7cae67abaea6507cbdc5d04e9a980cf1e0b0 Author: adnans Date: Wed Jan 15 20:42:06 2003 +0000 Comment out debugging printf commit 16e5817b67ffa0cc1bb1200541e5f69618f6632a Author: adnans Date: Wed Jan 15 19:14:29 2003 +0000 Changed some parameter names commit e2fe48a14d2532defa44c075912eda3bca4e19c9 Author: adnans Date: Wed Jan 15 19:13:39 2003 +0000 Shoutcast metadata handling. commit f98c3746ed32e00353b5c3e421f761e45fd51851 Author: adnans Date: Wed Jan 15 19:13:09 2003 +0000 Fixed for metadata updates commit d076ef4b7b0dc8d09f9cf8bc6d1c9f0d9ba23eec Author: adnans Date: Wed Jan 15 19:12:45 2003 +0000 * Shoutcast metadata handling! * New reader_metadata() function in reader API. This function returns metadata extracted from the streaming source. Right now this is just the Icy-Metadata junk, if it's available from the Shoutcast server. UDP / XML datasources will probably be provided in future. commit 9b037167f6b6896f3b89629b11ac2c349483931d Author: adnans Date: Sat Jan 11 20:10:37 2003 +0000 Add support for URLs in file dialogs commit 7a203e77ff24c2c04a1f7c14640d2da528aac84d Author: adnans Date: Sat Jan 11 15:50:23 2003 +0000 Hardcode fragment_count to 3. This eliminates stuttering on my system. Esound actually looks elegant, compared to NAS! Eeeks! commit 1827d65b9751a4d6df6163705830b19519458e0a Author: adnans Date: Sat Jan 11 15:43:53 2003 +0000 Trim trailing spaces from title and artist fields. commit f19cb40194bf4eebf37004d9628d54b6c319ec22 Author: adnans Date: Sat Jan 11 13:22:30 2003 +0000 Take care of premature exits when using streaming sources. commit c1a2703ce8942e7ecb19701997d9e92e14b2eb29 Author: adnans Date: Sat Jan 11 13:20:00 2003 +0000 Update find_initial_frame to detect 11Kbit streams commit dd43a3b86746b27847d9745d5e41a05ef3214623 Author: adnans Date: Sat Jan 11 13:02:23 2003 +0000 Fix time display for non 44KHz streams commit 4cb23318abe456f3646161811bf3673d931fa773 Author: adnans Date: Fri Jan 10 07:08:01 2003 +0000 docs/donations.txt commit 716cf964aa380c40fef182f6e5fa997c7da5f51b Author: adnans Date: Fri Jan 10 06:54:09 2003 +0000 Moved donations files to docs commit 28ddebb92054cc7de8ad88a26b365236eefa3b9e Author: adnans Date: Thu Jan 9 22:16:53 2003 +0000 Prevent playlist from advancing when we're changing track manually. commit c75911674a698555da0fb4130107f08807f0205e Author: adnans Date: Thu Jan 9 09:21:26 2003 +0000 Formatting error commit 27cafb11e653590b01f5300e472e3ef78ab4588f Author: adnans Date: Thu Jan 9 09:16:25 2003 +0000 New --config parameter to select a different config file. commit 72aeecad7bf7527fa22cc7813aa0730525266894 Author: adnans Date: Wed Jan 8 19:23:11 2003 +0000 Comment out sleep. It should still work OK (decoder waits for enough initial data). commit 023b4f02d7991b09b9ec6d8994950a61a8edd30b Author: adnans Date: Wed Jan 8 19:04:14 2003 +0000 Remove legacy DOS carriage return characters from URI's. commit a34517e9c411b18acb109773e519e9e4ecaef06c Author: fbaumgart Date: Wed Jan 8 01:47:33 2003 +0000 complete implementation for ap_save_playlist and ap_shuffle_playlist commit 68e69a984d89600e48eef40ac6d32784e7d7edba Author: fbaumgart Date: Wed Jan 8 01:21:00 2003 +0000 add prototype for ap_shuffle_playlist() commit 47796c210b16bb424b54dcc86f16fe34b50c34fc Author: fbaumgart Date: Wed Jan 8 01:17:26 2003 +0000 added two API functions for: AP_SHUFFLE_PLAYLIST AP_SAVE_PLAYLIST (implementation not commited yet) commit 3ddf432eda8a2315243c51801ab93d43ddf0d91c Author: fbaumgart Date: Tue Jan 7 23:11:49 2003 +0000 more precise error message commit 49d8a7a8adc79b1da82af1e3a85e296b45502780 Author: fbaumgart Date: Tue Jan 7 22:45:10 2003 +0000 removed unused define commit 6ef772b3a78793b9ff5537ba86a37502771bcc72 Author: fbaumgart Date: Tue Jan 7 22:27:18 2003 +0000 complete previously done changes in light of the upcoming release commit 3fd27b3328f8809eb90b4f17f5004964f43b4974 Author: adnans Date: Mon Jan 6 15:49:41 2003 +0000 Let --disable-flac do the right thing. commit 49be790f8c3a117438ec18f7049b191278655aa9 Author: adnans Date: Mon Jan 6 15:36:48 2003 +0000 New files for reader API support. commit 86841571414032b29e253fe1453a5f2e45f32f39 Author: adnans Date: Mon Jan 6 09:09:34 2003 +0000 Flac plugin now supports reader API, enabling streaming support. (Drew) commit 1cc725a8ca34b46edadadfabb017b1df80911f69 Author: adnans Date: Mon Jan 6 03:36:32 2003 +0000 Remove debugging printf commit a32b2afedcc7ffc40db3f8500734c7d19d975521 Author: adnans Date: Mon Jan 6 03:29:36 2003 +0000 Remove 2 second pause at start. This was there because of the broken earlier design. commit 38ed5623b4caf1e02e89b24a7d007aaeaf115c48 Author: adnans Date: Mon Jan 6 03:28:41 2003 +0000 Print file path when we can't find a valid initial frame for some reason. commit 83c768926f7413d3ddd2cf61f194f7cb490f1f1f Author: adnans Date: Mon Jan 6 01:57:13 2003 +0000 stubs for gtk2 stuff. Update Changelog commit 5e61283a35d7f59fbf4e0e6b2a55f720892d0b28 Author: adnans Date: Mon Jan 6 01:50:46 2003 +0000 New ap_jump_to() function to jump to specific playlist entry. Also make sure playlist is paused/unpaused when it should be. As a result the -E option works much better now. commit 5b620e875d3662fef92fde43f93783dd0678cc12 Author: adnans Date: Mon Jan 6 00:31:19 2003 +0000 Changes for streaming. Displays streaming time. commit c43f5e6224adf8393fbe571ed66c0e46a4f5693d Author: adnans Date: Sun Jan 5 23:56:27 2003 +0000 Improved the whole display progress a great deal. Correctly detects the end of the playlist and also works correctly for streaming... commit e36749b9204a4c8040bd5617646096fcba36c856 Author: adnans Date: Sun Jan 5 23:27:53 2003 +0000 Implement Eof() function that tells us if the we're actually still playing anything from the playlist. commit d376d7692a2c52c8830f8b5f45505a041e2372ae Author: adnans Date: Sun Jan 5 23:26:52 2003 +0000 Do not hold the player lock in Load() during the initial open stage. commit 2a6a02b9b4f3cb7bfc9cdeffcecf2adfdff6fbea Author: adnans Date: Thu Jan 2 21:06:01 2003 +0000 Implement alsaplayer_set_error_function(). commit cb19a473da44de6ceed9ab604e95438cc1154a85 Author: adnans Date: Thu Jan 2 20:26:25 2003 +0000 Fix output plugin fallback behaviour. It broke after adding the default_output code. commit 85366239c0fb7cd16d8102e393d51a22dc9ac674 Author: adnans Date: Wed Jan 1 22:02:10 2003 +0000 Implement -E parameter, which clears the playlist before adding entries to the running alsaplayer. commit de8b813dbfe125228c1850197ebc28e7963282df Author: adnans Date: Wed Jan 1 22:01:08 2003 +0000 Do ID3 parsing when http sources are seekable. commit 0acd348dd97c2909e3d30e19ee2c516ed8fbf892 Author: adnans Date: Mon Dec 30 02:01:54 2002 +0000 Load all entries from pls files. commit 9f6a34d0c4d12e36b5c56773b7bc19fe5c0c0571 Author: adnans Date: Mon Dec 30 01:23:07 2002 +0000 Minor change in message commit 68749b7ac150a30ad4f25d6a05a8d01564e11f97 Author: adnans Date: Mon Dec 30 01:13:52 2002 +0000 Remove dead code. commit 083f809809df03a6ba9b9186d9ef95d9a33770e1 Author: adnans Date: Mon Dec 30 01:04:25 2002 +0000 Changes to support OGG streaming! commit 841a200a3a74dcf98040e4cc4cffe86f880a0028 Author: adnans Date: Sun Dec 29 23:36:01 2002 +0000 Add P_PERFECTSEEK flag commit a21bf2430bbbd8b75de4fe058564c49c820496cb Author: adnans Date: Sun Dec 29 22:59:50 2002 +0000 Use flags correctly. commit 1a6a0fc703be620687776fe24ce433df8faaf487 Author: adnans Date: Sun Dec 29 22:01:04 2002 +0000 Use existing flags instead of extra variable commit e82d39461860ee96b3a45a8f5b7c31c0a45741db Author: adnans Date: Sun Dec 29 20:48:47 2002 +0000 Update commit c2c36411284495cef2bda27e2c1b4f0aa4e94778 Author: adnans Date: Sun Dec 29 20:45:51 2002 +0000 Kill unused max_seek commit babba075da6d5bee7461c33de975fa5fe0db002e Author: adnans Date: Sun Dec 29 20:41:31 2002 +0000 Cleanup commit 2afc823396aa55d8378048bca8df7a778c8986d4 Author: adnans Date: Sun Dec 29 20:39:23 2002 +0000 Rewrote buffering to support Icecast/Shoutcast streaming. The code must be more robust since some Icecast/Shoutcast servers send cut-off initial frames and other horrible things (RIFF headers, eeks!!!) commit 49d8e3d3ece9f5964d80c8ac5fbf7a8103533c95 Author: adnans Date: Sun Dec 29 20:36:52 2002 +0000 Preliminary support for Icecast/Shoutcast. Handle 302 redirects. Note that we probably need to do some more parsing for different server responses. We also don't do any metadata gathering/parsing at this point. commit fab0a5a2436a8b76b3f75cf52f17ca35f87cbeba Author: adnans Date: Sun Dec 29 20:32:26 2002 +0000 Minor cleanups commit 7e0375d0c865e690e72ec981ce8575c721b904bd Author: adnans Date: Sun Dec 29 20:28:42 2002 +0000 Preliminary support for Icecast/Shoutcast streaming! commit 445800c4e0cb85f43f5fe94b9be659ad7161000a Author: sjah Date: Sat Dec 28 21:28:49 2002 +0000 Patch from Filip Kalinski (it adds default_output option). commit ecd310c2b673145f03724b4142092d65f92bc936 Author: adnans Date: Sat Dec 28 10:22:20 2002 +0000 Fix thinko that prevented Internet streaming support or more generally support reader plugins that do not implement SEEK support. commit 97e8f816d46d5486d75b807afecac732ba73e559 Author: fbaumgart Date: Mon Dec 23 18:37:39 2002 +0000 printf -> puts commit 37023b0a5e937c19aab0137487a3fd6009b7ed2c Author: fbaumgart Date: Mon Dec 23 18:35:54 2002 +0000 minor comments commit 8579e1c876db9ca9480330e4f0259911fabe01f6 Author: fbaumgart Date: Mon Dec 23 17:28:21 2002 +0000 fixed misleading parameter naming commit 2bf88cf5501c317fe359951ef88f250b7888decc Author: sjah Date: Mon Dec 23 15:39:44 2002 +0000 Compile jack output plugin with libjack. commit 9235f9af4349a2038bc9dea18546be9f619d29cf Author: fbaumgart Date: Mon Dec 23 14:45:20 2002 +0000 we already wait 1 s after each song/title; do not wait an additional second commit 8172bb3de81b8de3581107ce3682a4cbf3f5c666 Author: fbaumgart Date: Mon Dec 23 14:28:53 2002 +0000 renamed some confusing constants commit 20621a60a7b2cde8f1bd609e235f7db5d114c30b Author: adnans Date: Sun Dec 22 14:34:40 2002 +0000 Typo fix commit e9a31bcb86c8e95dd3d08998a4c9c91b960dd59b Author: adnans Date: Sat Dec 21 01:52:38 2002 +0000 Proper fix. The file reader should also accept plain paths instead of only file: prefixed paths (the correct uri is file:// btw!). If we force an uri rewrite on absolute paths unexpected things will happen. For instance, playlist files will now contain entries with file:// which might not be compatible with other players. We will also barf on playlist files that have none file: prefixed paths (which is all of them!) commit 4c113593738ab2afe02d7dd60777d091606065fc Author: adnans Date: Sat Dec 21 01:35:29 2002 +0000 Support loading playlists again. This was broken by the reader/uri stuff commit 1ccfad9b5f11b9888855dd2a6d0fa7bf32f80c2b Author: adnans Date: Fri Dec 20 23:17:45 2002 +0000 Fix bug in engine init() function. It would return a random value, which up till recently has always been the righ value (true) commit cecc87fa3ff2ca144b2ad88b042ab69dbec99685 Author: fbaumgart Date: Fri Dec 13 23:22:45 2002 +0000 sprintf -> strcpy commit 183ad50ef718465502fe97c9cfe3e89b5e43c10e Author: fbaumgart Date: Fri Dec 13 22:54:16 2002 +0000 avoid unneccessary GetStreamInfo() calls: previously called every second, now called once at the beginning of a title commit e5345ec47b4addc8c6a4fa1344a2efe6d698fb12 Author: fbaumgart Date: Fri Dec 13 22:36:15 2002 +0000 added comment request commit ccddbe17eb2c538cd44e659933d4a0535e935c93 Author: fbaumgart Date: Fri Dec 13 22:29:07 2002 +0000 decrease nesting commit f318a1ff5004e1c9867641092daeee4bd52673af Author: fbaumgart Date: Fri Dec 13 18:45:23 2002 +0000 just some printf -> puts replacments commit 2ba31bfe0ded2ef870693c5c98da26cd68a7a0c4 Author: sjah Date: Thu Dec 12 20:11:28 2002 +0000 Fix bug in HTTP eof function. Add reader_readline and reader_can_handle functions. Allow loading of playlist from any supporting uri (and with uri inside - absoulute or relative)... commit 71b16ddeb65e99f66a554eed7c1942d3f635acff Author: sjah Date: Wed Dec 11 21:13:16 2002 +0000 No more global URI decoding... do it only for file reader. commit 8d966d217b7c465a4c5f622f9671620c806b4a22 Author: fbaumgart Date: Tue Dec 10 20:48:17 2002 +0000 minor cleanup commit a9492207b9eb1fa17959da0d3f3fdded3d28aef3 Author: fbaumgart Date: Tue Dec 10 20:42:37 2002 +0000 commented out unused function add memory allocation check reduce some code nesting commit 5f742ead416ca33ee573860b58374ca360872f1b Author: fbaumgart Date: Tue Dec 10 16:09:25 2002 +0000 make use of strdup add several "const" to function signatures commit 150573f3dc06cb92e9a02fbf4938f17a74efd164 Author: fbaumgart Date: Mon Dec 9 18:02:54 2002 +0000 add many of those rare "const" declarations decrease some nesting levels commit 5a310326e695f735510a1cff15193d2999a1d87c Author: fbaumgart Date: Mon Dec 9 16:51:40 2002 +0000 add entry about small systems suitability commit 30630f8928676a08e76db84f81fb7e8a01434169 Author: fbaumgart Date: Mon Dec 9 16:48:15 2002 +0000 simplified some string length checks commit 2c2b3f9ee110e7964239901d59795d99b4932f8a Author: fbaumgart Date: Mon Dec 9 16:40:37 2002 +0000 commented out completely unused methods Read/WriteSamples() commit f19278191cf9ee1fd55c7b6f5dd9f38b93786ee2 Author: fbaumgart Date: Mon Dec 9 14:00:38 2002 +0000 minor cleanups commit 71123ca0a0fede1ff1aef8c0e96dbe56a9a380fc Author: fbaumgart Date: Mon Dec 9 13:53:31 2002 +0000 decrease code nesting in pcm_worker remove last remnant of top-hack commit 0c65e929aed829a1859571b5172d1dd18e2ac85a Author: sjah Date: Sun Dec 8 22:03:52 2002 +0000 Setup seekable flag commit 58659cc7e9cb0c081c61b5a7278ee5ac450948d9 Author: sjah Date: Sun Dec 8 21:57:45 2002 +0000 Support for URIs encoded in %XX form (Hello%20World.mp3) commit 3b2f3a24fdf58f9448e97ce04ca341c739f320de Author: fbaumgart Date: Sun Dec 8 14:45:34 2002 +0000 minor cleanup commit 3e5eddc50db130f8432bb037243bfd595d9fdfae Author: fbaumgart Date: Sun Dec 8 14:44:40 2002 +0000 minor source cleanup commit 5aa93c3d4d4c36b23fb9f30523a12d65096e66a3 Author: fbaumgart Date: Fri Dec 6 09:41:51 2002 +0000 spelling fix commit 086776431d4702dec27506c1dd4c20d57dd15f2f Author: fbaumgart Date: Fri Dec 6 09:08:26 2002 +0000 compile fix commit b33c4c302202003e6087804d121cd43c64862c45 Author: fbaumgart Date: Wed Dec 4 00:45:25 2002 +0000 just using the function intended for string duplication commit e90784142dc289b17b0f78875e630b592aa1b90a Author: fbaumgart Date: Wed Dec 4 00:42:46 2002 +0000 massive reduction in messing around with memory, which trashed L1/L2 data caches and produced drop-outs on small CPU systems commit cba1db5b598812b3287278bc398ffea2d8dc4561 Author: fbaumgart Date: Tue Dec 3 08:40:27 2002 +0000 stupido fix commit bbbcc5d0b6862074f29364e21ddc21e7e849f989 Author: fbaumgart Date: Mon Dec 2 19:31:56 2002 +0000 minor cleanup commit 930ad6864df1d6f97e9135783248174b95dbdc67 Author: fbaumgart Date: Mon Dec 2 19:27:23 2002 +0000 enabled "--quiet" mode in help page implemented quiet mode for text interface -> disables progress bar commit 03c255fee991f8c8c5df343370fdc22fd07109df Author: fbaumgart Date: Mon Dec 2 19:09:32 2002 +0000 allocate buffer_data on stack slightly simplify looper loop remove superfluous memset call commit faeea62299b3db8e2c507f4d5709357667429d5c Author: adnans Date: Wed Nov 27 20:12:02 2002 +0000 Fix JACK_LIBS inclusion commit a9647d9685933d22b9e315e426447fd622ee4350 Author: fbaumgart Date: Mon Nov 25 00:01:05 2002 +0000 minor simplification commit 5bb175f58979e464c15190628159ae1e3c0f5201 Author: fbaumgart Date: Sun Nov 24 15:38:17 2002 +0000 added missing "stamp-h1" commit 970e49344324bab2dbfe187097b72ad8dd955965 Author: fbaumgart Date: Sun Nov 24 15:36:54 2002 +0000 reduced nesting level in mad_frame_seek() for readability commit 03b142c952b5a4a5184690d30d5eab0d957dd48b Author: adnans Date: Sun Nov 24 14:27:47 2002 +0000 Ignore missing commit 44c09fb589a2ca77833684353c69c137b28dfc23 Author: adnans Date: Sun Nov 24 14:27:12 2002 +0000 This file is autogenerated by bootstrap commit 22d7cc24879a487a52ed929d9cfbda2380f82fd0 Author: fbaumgart Date: Sun Nov 24 02:35:11 2002 +0000 minor formatting commit 761bb2dedc3cd2bf5c972e0dab89b4c345c969c9 Author: fbaumgart Date: Sun Nov 24 02:33:30 2002 +0000 commented out "-q --quiet" option from help page (and only there) because "quiet" mode really did not affect anything... commit 87f375cad4eb9e9caf3a18ec98093532ed0e2b40 Author: fbaumgart Date: Sun Nov 24 02:25:18 2002 +0000 - removed periodic warning about using the null plugin; there is a prominent warning on startup already - use dosleep instead of usleep commit a11aa2179ea29360d3cd94d4b2f139b0deadce9a Author: fbaumgart Date: Sun Nov 24 02:19:44 2002 +0000 made socket_looper() static commit b5c9a47cab42610fbaa54000ee5e0916057212dd Author: fbaumgart Date: Sun Nov 24 02:17:37 2002 +0000 removed last remnant of TOP_HACK commit 95035be159eb9b00864897b83545b1f26bebd5a6 Author: adnans Date: Fri Nov 22 17:19:26 2002 +0000 Fix duplicate global_verbose declaration commit 6efba5963f3740916e38753ed3a77b9cad0378f2 Author: adnans Date: Wed Nov 6 21:24:25 2002 +0000 Always blank the stream_info structure passed to GetStreamInfo() commit f67c778097789cd6784f1dfff1acae1c1880b019 Author: adnans Date: Sat Nov 2 11:17:45 2002 +0000 Support JACK 0.40.0 and higher commit 018f23410185c548de2650dfa460757f2c6bbaa1 Author: adnans Date: Sun Oct 27 07:26:46 2002 +0000 Prefer sndfile plugin over wav one commit 20ca31e165ed765e863af4e3ce7cab8d10b4a15e Author: adnans Date: Sun Oct 27 07:25:59 2002 +0000 Prevent divide by zero for very small files commit 2684c47573d87892b4ebeb41e8d095dc50ce4190 Author: adnans Date: Tue Oct 22 22:16:14 2002 +0000 for i in `find -type f -name '*.am' -exec egrep '^CXXFLAGS =' -l {} \;`;do vim $i -c '%s/^CXXFLAGS /AM_CXXFLAGS /g | wq' ;done commit ca4cf99001865ce71a92f55ff3c74adfb215ddc3 Author: adnans Date: Tue Oct 22 21:02:17 2002 +0000 for i in `find -type f -name '*.am' -exec egrep '^CFLAGS =' -l {} \;`;do vim $i -c '%s/^CFLAGS /AM_CFLAGS /g | wq' ;done commit fa075ef818da0064324af6b5c37818061d71ca98 Author: adnans Date: Tue Oct 22 20:14:30 2002 +0000 Use AM_CFLAGS instead of CFLAGS commit 01905ccff490dee2edfa8fa0c0ae8585ecf6995d Author: adnans Date: Mon Oct 21 21:15:19 2002 +0000 New --background parameter to put alsaplayer in the background at startup commit 60da8bee86c4ae7729a33c1062e042ce115c56f2 Author: adnans Date: Mon Oct 21 17:38:32 2002 +0000 Be a little more verbose about things commit 600955cdf442bcffa5341480f20e20c11f3f173d Author: adnans Date: Mon Oct 21 17:36:21 2002 +0000 Reverse changes since they are actually needed for the new 1.0.4 Flac commit cb9083988d51e3b6ed42fc146b35d57cb58a46c9 Author: sjah Date: Mon Oct 21 15:21:20 2002 +0000 Segfault fix. New functions reader_eof, reader_length, reader_seekable. commit 5bfae9734049f74da2c04672cfd283fec91c6421 Author: sjah Date: Mon Oct 21 14:40:08 2002 +0000 Fix compilation error in FLAC input plugin. commit 45133cb9f01a69a580ac453893f86d6382808938 Author: sjah Date: Mon Oct 21 13:33:47 2002 +0000 Fix compilation problems for esound output plugin. commit f847cdfb19f41a41e75c0daac28d147fd7c49325 Author: adnans Date: Mon Oct 21 03:24:44 2002 +0000 Use jackd supplied sample rate, ignore any user/media supplied value. commit 6241970a4f050d2cf9a96140df84a838bca00ad2 Author: adnans Date: Mon Oct 21 02:24:59 2002 +0000 Add jack_deactive() call before jack_client_close() call. Greatly improves jack performance by minimizing hickups during close down of alsaplayer clients. commit b97b0bf3e5babbc57c3826e340d3592e07923722 Author: adnans Date: Fri Oct 18 14:57:18 2002 +0000 CD player will now load all tracks to the playlist. It will no longer play the CD as one big track! commit d089b01d428d1c09810fff79d3968c65deac7d08 Author: adnans Date: Wed Oct 16 10:03:08 2002 +0000 Do away with the multithreaded behaviour of Playlist::Insert(), this was causing to many random crashes and performance is probably even better now since we don't spawn dozens of threads. Careful locking/unlocking also prevent the interface from freezing up. commit 877414ff4c16191f1d2105f773019b98c62ff532 Author: adnans Date: Wed Oct 16 10:00:26 2002 +0000 Do not use ':' as a seperator, use '/' for now, since jack ports use ':' as separators themselves commit dacb0f9f22eca59ede2255f58b0150dd4b5e5f45 Author: adnans Date: Tue Oct 15 20:46:40 2002 +0000 Support loading of .m3u files from the command line :) commit 705355b9c5f55e4ba4579a82db9180857da87f2c Author: adnans Date: Tue Oct 15 09:08:29 2002 +0000 Cleanup commit e77718019dfa573d882ff40cab56fb4b209b095e Author: adnans Date: Sat Oct 12 19:48:29 2002 +0000 ADd "noreconnect" parameter to jack driver. When this is specified the jack driver will not try to reconnect when we timeout for any reason. commit 9ef55e0cf5101971f47be899498e87173d7b9af6 Author: adnans Date: Sat Oct 12 11:06:04 2002 +0000 Cleanups. Also change AlsaNode constructor a bit commit ab2be1b262b4b8564113765431c1ebc9ad96e40d Author: adnans Date: Sat Oct 12 11:04:55 2002 +0000 Cleanups commit d1a1474cbc9241418679ece676512b16440f09de Author: adnans Date: Sat Oct 12 11:02:59 2002 +0000 Remove suid dropping code commit bee84da158d4a0f01f38691e0be3b94748598a2c Author: adnans Date: Sat Oct 12 11:01:21 2002 +0000 Remove suid root dropping code. commit 5197658f07511346bab646502b5dc9bbd304f58f Author: adnans Date: Tue Oct 8 18:35:01 2002 +0000 Fix to compile against flac 1.0.4 (thanks to jlc) commit ed2f3c443c41db7047452cf815619f5c8b87f9f6 Author: sjah Date: Sat Oct 5 19:09:40 2002 +0000 Fix for gcc-3.2 warnings commit 1cbca4d44ef869ec4aa118135685713425d4c2b6 Author: fbaumgart Date: Thu Oct 3 22:38:35 2002 +0000 Log for a functional change unintentionally already included in my last commit: Prebuffering now fills NR_CBUF/2 PCM buffers instead of only 2. Before, right after starting to play a song the producer thread competed with the other threads for the CPU as it tried to fill the remaining buffers. I already tested that there are no adverse effect on fast systems. Overall, the patch is intended to help slow systems significantly where audio dropouts occur within the first 1 to 3 seconds of each song. commit d05142b846928fa51b7c5e3a46bf217c396fa878 Author: adnans Date: Thu Oct 3 15:41:46 2002 +0000 Swab data when we're on BIG endian machines (CK) commit fa980d58cf1f2de29c66660daa8961a4afdd7774 Author: fbaumgart Date: Thu Oct 3 10:52:45 2002 +0000 added high priority bug information commit 992538d4d75a24d24f2f8cfc7afcc957a257b21b Author: fbaumgart Date: Thu Oct 3 10:19:20 2002 +0000 renamed "AvailableBuffers()" into "FilledBuffers()" added some comments; no functional changes commit 23f0ba9fc0ebe0bcea9395ebc1d99330dbc5e5fe Author: sjah Date: Sat Sep 21 08:05:22 2002 +0000 Bug fix for the sort function. commit 795b79a758c088cdcf9429f1e1bba9e38f79979a Author: sjah Date: Thu Sep 19 17:01:07 2002 +0000 Add ap_playlist_sort function. commit b3022eba4089089938da59dc1f2f6c5697b5e79d Author: sjah Date: Thu Sep 19 16:03:24 2002 +0000 Use GPtrArray instead of GArray for pointers store. commit 7299ecb586203fb884d1eb02b65f6f75599a39e7 Author: adnans Date: Wed Sep 18 09:56:28 2002 +0000 Merge for 0.99.72 commit 2a7c33a1934db514942258c3121b41eb9c031218 Author: adnans Date: Tue Sep 17 22:49:02 2002 +0000 Fix bufferflow errors when dealing with command line paramaters, a potential exploit fix. Thanks go to KF for pointing this out. commit 01ff79fb22ba79cb50ae9c7befb4dfb078e37ec6 Author: adnans Date: Tue Sep 17 21:33:47 2002 +0000 Reverse the insert_looper race fix for now, since it causes deadlocks. commit 7dd1a79bd4fee75dc9cbc3c8cca19836ace2afd8 Author: adnans Date: Sat Sep 14 20:57:13 2002 +0000 Previous changes cause large CPU spikes, mainly because of CBUFs being incorrect a bit. commit b725263a6e67f0a4c43048b0630289974145b049 Author: adnans Date: Sat Sep 14 20:56:19 2002 +0000 Eeks, sleeping 0.8 seconds after every buffer fill is very bad! It makes the player pretty much unusable on fast machines (gaps every second). I'm thinking the real solution for slow machines is just to bump up the priority of the decoding thread, or just provide deeper buffers in the audio driver. commit d36065bf107fc4bb595c745d27456d3171467960 Author: adnans Date: Tue Sep 10 18:37:37 2002 +0000 Update cvsignore commit da6cd44e0a76b20df021940c4ae332e2ced2cbd4 Author: adnans Date: Tue Sep 10 18:35:16 2002 +0000 Merge commit b65c6640ede061a995da07e32fc715ecd8052df2 Author: adnans Date: Sat Sep 7 11:43:12 2002 +0000 Fix path/title fill-in in WAV plugin commit 6471d82f722a12a8e468e831b1befb7ac20dc16f Author: fbaumgart Date: Thu Sep 5 17:23:11 2002 +0000 just an entry for the latest commits (new API call to load playlists) commit 0386a709beb31d64ca741d035036f59c16940d96 Author: fbaumgart Date: Wed Sep 4 19:52:19 2002 +0000 insertion of playlist items is done synchronous instead of in a separate thread. This eliminates the frequent crashes due to race conditions. As a cost, there might be an occasional audio dropout (seldom). I consider this behaviour to be much better than crashing. increased readabiliy of sort_comparator minor spelling fixes commit 5c2fa8ded83cb6720dec72c2561577e966442655 Author: fbaumgart Date: Wed Sep 4 19:47:19 2002 +0000 added new command AP_ADD_PLAYLIST This reduces client/server roundtrips significantly when adding playlist items, compared to many AP_ADD_PATH calls Also, this greatly reduces the "chance" to trigger race conditions in adding playlist items commit 634f53573f780694efc1c9136c54a04054bcc8b1 Author: sjah Date: Sun Sep 1 15:20:24 2002 +0000 Add ap_playlist_shuffle(). commit 118637ff3af672ff19c49951e075d0c45c0196f6 Author: sjah Date: Sun Sep 1 09:07:04 2002 +0000 Add new function ap_playlist_clear and new signal "cleared". commit ad17523f6d303e9b31e772a51c20bd10b302cbea Author: sjah Date: Sat Aug 31 08:07:57 2002 +0000 More docs. commit 119e0c591dee2744b565c409a802747ce5838ecb Author: sjah Date: Fri Aug 30 13:50:32 2002 +0000 Add general playlist queue. New signal "inserted". commit a1c023431ee5bee370bf64b082f9e19f79fca837 Author: fbaumgart Date: Thu Aug 29 12:04:36 2002 +0000 improved function signature instead of cast'ing around commit f16c702b54f42cd70efaf3dcbefcf8fec81c3a0d Author: sjah Date: Thu Aug 29 08:13:04 2002 +0000 Start insert thread writing. Change signals name. commit 5d30c5e31f42778d8c0a4e20d9a9cf63242d41d5 Author: sjah Date: Wed Aug 28 11:14:08 2002 +0000 Ignore references dir and doxygen-build.stamp. commit a103a4433a5f884fafec891a53fb40a79ff8b93b Author: sjah Date: Wed Aug 28 11:12:48 2002 +0000 Finally document all for foxygen. Add new object for common things. Other changes for glib2. commit 3339453d77ba0f7a84f63a59204e36e3cee67886 Author: sjah Date: Tue Aug 27 12:22:21 2002 +0000 Get \" back. commit 8d932425d96115635e575bd2eec0c330498423bd Author: fbaumgart Date: Tue Aug 27 00:28:01 2002 +0000 - on title start, allow producer thread to decode some data and do so more efficiently without being interrupted by the control thread too early. This reduces audio dropouts on small CPU systems. - increased ring buffer size and especially its usage - this allows to really sleep for 0.8 s as there is still at least 70% (= 1.8 s) of buffered, decoded data left. - removed "top hack" commit c5cd0a40fefb4231c6fb470a7fa005f445adb669 Author: fbaumgart Date: Mon Aug 26 22:12:00 2002 +0000 Increased busy-waiting timeout from 100 ms to 200 ms. This is no proper solution still! At least it requires only half the CPU power with a pause not being much more audible than before. commit ba558cf1bf01924969837d85545fd04195ac7730 Author: fbaumgart Date: Mon Aug 26 21:27:23 2002 +0000 Fixed the most severe (10 ms, i.e.: very fast) busy-waiting loop. A pipe is now used to signal the daemon to stop. commit 42d340812941b2736b60a4dcdeeb1e352acc0a85 Author: fbaumgart Date: Mon Aug 26 14:15:57 2002 +0000 removed --enable-tophack from configure This was about the worst option I can think of as Alsaplayer has *massive* internal problems regarding several threads being busy-waiting. I am about to clean up most of that right now but will need a few days for testing. At least, above option seemed to camouflage the real problem from the developers also, so I removed it. The #ifdef TOP_HACK code will go away with the non-busy waiting patchsets. commit 82b596fcce774019144631c017eb59015c924918 Author: fbaumgart Date: Mon Aug 26 14:02:20 2002 +0000 replaced 100 ms busy-waiting loop with event-based loop I am not sure whether the GTK frontend gets this right, which would be to send an AP_QUIT message. GTK frontend maintainer(s), please check commit a7e19af4855dc32821035005436ba809ce0bd4ad Author: fbaumgart Date: Mon Aug 26 13:23:16 2002 +0000 spelling fix commit 9c2b589eb8a04f7ff72eec13f062cfaca62c8eee Author: fbaumgart Date: Mon Aug 26 13:10:54 2002 +0000 cosmetic and spelling fixes improved some function signatures commit 4394c77a73a328efacbd3682b3b81982e9ede733 Author: sjah Date: Mon Aug 26 12:59:21 2002 +0000 Use thread safe versions of reference counting. commit df082a888ec344dbb5ae14b8eb19a48c7b0b4649 Author: sjah Date: Mon Aug 26 04:22:03 2002 +0000 Update. commit f3d172eaea789e7af70786fbb99b728cbccb8090 Author: sjah Date: Sun Aug 25 14:57:44 2002 +0000 Make passible NULL pointer for ap_playitem_set_filename. More documented functions. commit 92d3f517d5bca66f0c030f636fe3a89da9ca97ef Author: sjah Date: Sun Aug 25 13:04:26 2002 +0000 Typo. More documented functions. commit 0d8b7d4a3f0365b39a15868c60a65f4817db1306 Author: sjah Date: Sat Aug 24 18:49:34 2002 +0000 Document ap_playlist_update_playitem and ap_playlist_get_type. Remove ap_playlist_playitem_updated. commit fcff25d5e38db21eb98e31187ae01e9bd83311f7 Author: sjah Date: Sat Aug 24 10:10:42 2002 +0000 Fail if file is NULL in playitem passed into ap_playlist_update_playitem. commit 06ed39621ed0c9beeb45d04c9850e6331a9cd2d3 Author: sjah Date: Sat Aug 24 09:57:15 2002 +0000 Implement info thread (with asynchronous queue) for glib playlist. New playlist signal "playitem-updated". New functions ap_playlist_update_playitem, ap_playlist_playitem_updated, ap_playlist_loop_playlist, ap_playlist_unloop_playlist and ap_playlist_is_looping_playlist. New playlist property "looping_playlist" and new signal for it "looping-playlist-toggled". commit a03d0061126eab54d2a4022a143ab39215d88932 Author: sjah Date: Sat Aug 24 07:22:18 2002 +0000 Add ap_ prefix for all glib objects (to avoid name collisions). commit 83db5753d778bbb3e43671c5c80456f8ca69b10f Author: sjah Date: Fri Aug 23 17:15:47 2002 +0000 Start new playlist code. Add playitem_new function. commit 69a639f0bdf77eb02981a53fc68a10c83d5706c9 Author: adnans Date: Fri Aug 23 10:55:10 2002 +0000 New DONATIONS file is up. commit 8a438e9cf616adbb648c4c6611b52c4fc1f5eaad Author: sjah Date: Fri Aug 23 07:34:04 2002 +0000 First step toward glib-2.0. commit 6b9b59a1483c1907bae4b60f41a093f5ce552583 Author: adnans Date: Thu Aug 22 08:42:49 2002 +0000 Do not join threads that may not be running. Rethink this some more. commit 30b0a5d9585453004d48c5ecf31dd4bc0c36c9a2 Author: sjah Date: Wed Aug 21 14:14:10 2002 +0000 Add initializer for notifier_mutex. Use mutexes only after initialization. commit 034159320eaf7b04e93b5f4b29ebacbb14cc89e6 Author: sjah Date: Wed Aug 21 11:55:58 2002 +0000 Ignore alsaplayer.spec. commit 161037294441be1620fc91dbb661688e3b9c91d9 Author: sjah Date: Wed Aug 21 11:54:45 2002 +0000 Memory leaks. commit 53dd875eb7bbd2ddd9624dcd2903e5c64bb456ce Author: sjah Date: Wed Aug 21 09:48:05 2002 +0000 Bug fixes. Cleanups. Merory leak fixes. commit 23e5e16737f3cab20da45ec87e4c96a2e3ee4368 Author: sjah Date: Wed Aug 21 04:02:59 2002 +0000 Follow samples to frames rename which occured on sndfile release. commit be205fe6a73c7c455701ec03425b60e6bd3f4197 Author: sjah Date: Wed Aug 21 03:15:52 2002 +0000 Ignore reference.doxygen by cvs. commit 1611ff1350b14e6b25c6c805b1c3cb6ec5befb61 Author: sjah Date: Wed Aug 21 03:13:34 2002 +0000 Add .cvsignore file. commit 89ee9c3b69f2a6a28e9b56d3baa798ddce938fc2 Author: sjah Date: Wed Aug 21 03:11:53 2002 +0000 Id3v2 should resolve text genres from its numbers. commit b45b6ee55f8952d72d94548421cfd79ea9b15de0 Author: adnans Date: Tue Aug 20 21:36:51 2002 +0000 Generic spec file by Daniel Resare commit 58e57bb3a1801259f24bcd4baace81eaa44399ed Author: sjah Date: Tue Aug 20 13:48:04 2002 +0000 Continue sparc.c -> sparc_out.c rename commit 8992213d365b9179e8f6c5e428228a13a53f9420 Author: sjah Date: Tue Aug 20 13:47:49 2002 +0000 Fix distclean target (error appears when doxygen is not installed). commit 762b7e99cc7ff4de3fb9c5ea4d2709983c9f2849 Author: sjah Date: Tue Aug 20 13:18:47 2002 +0000 Handle missing genres. commit b54b742b82718c1a41fcfd80e7fca56b7f9eacc3 Author: adnans Date: Tue Aug 20 11:06:02 2002 +0000 Fix OOPS for alsa 0.9.0rc3 commit 07f0f4a2003bb0897b6f628146ed33042a4d1807 Author: sjah Date: Sun Aug 18 13:57:54 2002 +0000 Remove dependency on libid3tag for mad plugin. commit 915898a175c852ab6fa04c110cf89ab556e8da0c Author: sjah Date: Sun Aug 18 10:32:45 2002 +0000 Cleanups. commit 30e67282c56955eef808bc0530c6af5e388e5d94 Author: sjah Date: Sun Aug 18 10:22:21 2002 +0000 Make possible compilation without sndfile. commit 955ac183ddd25e7d810c93c96905650819532baf Author: sjah Date: Sun Aug 18 10:08:27 2002 +0000 Turn on locale support. commit a3d82aae1842cf79d99e25e82f9528ad9fb6a847 Author: adnans Date: Sun Aug 18 08:01:10 2002 +0000 sndfile input plugin commit 7b178c6fa397d98732dcd3cb64fcf839bd3c3c0a Author: sjah Date: Sat Aug 17 14:58:38 2002 +0000 Add importent info! commit aacc3d81c147623671e30facc506a65a1d0eb61d Author: sjah Date: Sat Aug 17 14:57:35 2002 +0000 Add id3v2 support for mad plugin. commit d89397ab884c5813f747a062981977d891392f66 Author: sjah Date: Sat Aug 17 11:52:19 2002 +0000 Fix for another seeking bug with SEEK_END whence. commit 3c097b9c3774f24c648a6e8bce0f49a149adfe04 Author: sjah Date: Sat Aug 17 11:32:29 2002 +0000 Rewrite tag parser with reader API. commit 7a32651e01c29aa3171f3fa08b4c7c80286f6573 Author: sjah Date: Sat Aug 17 11:10:10 2002 +0000 Fixed seeking bug with SEEK_END whence. commit 62f097148f7612dd83e0ce6e5cc8e4c879cafc41 Author: sjah Date: Sat Aug 17 10:07:27 2002 +0000 Ogg allow path member in stream_info. commit 971a87ca3f90b654b8778ce1f1fae5ab0011d07e Author: sjah Date: Sat Aug 17 09:23:05 2002 +0000 Add ap_get_file_path. commit e46ff384a1a28f189a246bd1144ac381ad89dc71 Author: sjah Date: Fri Aug 16 11:49:18 2002 +0000 Add ogg vorbis tags: ALBUM, GENRE, DATE, DESCRIPTION, TRACKNUMBER commit c7fa14e3e5b286c3fe5bdfda4df0397963322b62 Author: adnans Date: Thu Aug 15 15:14:58 2002 +0000 Fix C++ compile errors on Sparc commit ae65cbf18f1a564a958961473cccf2c770e0b3d9 Author: adnans Date: Thu Aug 15 15:10:33 2002 +0000 Rename sparc to sparc_out commit c73490ee7cc755abaddba2e3a753b4b9803d8de4 Author: adnans Date: Tue Aug 13 10:55:31 2002 +0000 Sync tree with CVS commit 6d171e224a8b6cd9191eeb7912728902b4aba077 Author: adnans Date: Fri Aug 2 20:12:19 2002 +0000 Scope update commit 3363ba89b4e2f1401fea660e51c4c106aacc1dd1 Author: adnans Date: Fri Aug 2 20:09:32 2002 +0000 Debugging commit a1238d98a8dfa8de1a37818d9ba1ad5472f66aa5 Author: adnans Date: Fri Aug 2 20:06:39 2002 +0000 Jack fixes commit 3fb1fbd5606da9109fb2dc2c3db05cefb7cff431 Author: adnans Date: Fri Aug 2 20:03:18 2002 +0000 Fixed for flac 1.0.3 commit 426b13c4da500174297d793e92c1e4b9e2cc01be Author: sjah Date: Mon Jul 29 17:38:32 2002 +0000 Fix to enable DESTDIR (patch from Daniel Resare). commit a220218522a7317a7ee4f3444be5b8aa27c06c64 Author: sjah Date: Mon Jul 29 12:37:25 2002 +0000 Restore curritem after Shuffle/Sort commands. commit b05dcf614cec650119702e2c2cf0fdbf5170164d Author: sjah Date: Mon Jul 29 11:26:33 2002 +0000 Add Sort method in the Playlist class. commit 8a12f0e8b8c068e6e84daa0a9a9a795b3110ae67 Author: sjah Date: Sat Jul 27 16:24:31 2002 +0000 Don't play removed song. commit d6cea3f8683a86ea18ed8ef0970f296372db012a Author: sjah Date: Fri Jul 26 08:52:38 2002 +0000 Fix warnings for prefs code. commit 5a664c7657a76852dc0006b978c3167ec89ada65 Author: sjah Date: Fri Jul 26 08:45:11 2002 +0000 Ignore Makefile. commit 210d7a5dd45f465bf60534941a5e4c09afb2abd8 Author: sjah Date: Fri Jul 26 08:42:52 2002 +0000 Remove curl plugin. commit c745257f1cf9af91f79cce2c32ef3592f6a0eac3 Author: sjah Date: Fri Jul 26 08:28:17 2002 +0000 Make compilation with gcc 3.1 more warnings clean. commit 3e4d73eb4f8ef0c1e0b5e89174673b58ef87f60e Author: sjah Date: Wed Jul 24 04:34:59 2002 +0000 Add missing include (patch by Rupert Scammel). And allow HTTP/1.0 stream, but without seeking (error on seeking). commit b694f047e06c47a343d91942bf220e59a816c1d5 Author: sjah Date: Wed Jul 3 05:07:52 2002 +0000 HTTP plugin: Add support for 206 code.. commit 1b2f575f79b125e13b07b04bb661825af485c91f Author: sjah Date: Wed Jul 3 04:51:29 2002 +0000 HTTP plugin: Check response for protocol and return code. commit daaeeeb6e37695e6d85cb4a3cdb986e0d04468a2 Author: sjah Date: Wed Jul 3 04:13:54 2002 +0000 Return NULL if reader plugin failed. commit dfe66bcfd62cb8981c2fbf400b0adac05af7c9d5 Author: sjah Date: Wed Jul 3 04:12:28 2002 +0000 HTTP plugin: Memory leak fixed. Remove \n from error messages. commit 7db8c56e1754c3e46b1cc258bd338b33cc12e09b Author: sjah Date: Tue Jul 2 08:31:26 2002 +0000 HTTP plugin: Decrease reading lag. Remove debugging info. commit e682a170b9d883d05318b60bf9975a7f98391f80 Author: sjah Date: Mon Jul 1 08:48:10 2002 +0000 Add CorePlayer::Pause and CorePlayer::UnPause functions. commit a7c733b079729959113d8b20c44811303d4402f2 Author: sjah Date: Sat Jun 29 07:37:29 2002 +0000 http plugin: Fix memory leak. Fix EOF detecting in http_read function. Stop connecting if Content-Length header is absent (for now). commit 121d6773190a253c9f19432404b60580c1b55793 Author: sjah Date: Fri Jun 28 14:04:26 2002 +0000 http plugin: Fix memory overheads bug. Use config file for buffer_size value. commit 7a2acd124e1339c21ddaffadd078532ae1170725 Author: sjah Date: Fri Jun 28 13:41:26 2002 +0000 http plugin: Allow small buffers (near 2M). commit d95bba95ee24e45b57da3f8af2cdf5e2e223e499 Author: sjah Date: Fri Jun 28 11:32:18 2002 +0000 http plugin: Fix ugly bug which crash ogg playing. Implement fast mode. Code cleaups. commit 788c5ebfabb9e67218aa9080a9c029066742f92b Author: sjah Date: Wed Jun 26 07:25:17 2002 +0000 Vorbis plugin: Allow seeking. commit 1a7334b3028e71045188f005036547b0e2db7bb8 Author: sjah Date: Wed Jun 26 07:24:37 2002 +0000 HTTP plugin: Fix EOF detecting. commit fafebdce3b082149aa01fbed9f23550dd889d02a Author: sjah Date: Tue Jun 25 16:03:26 2002 +0000 Allow seeking. commit e8d827f640a7b9b1cb68762ec6e2f0f1a1065df8 Author: sjah Date: Tue Jun 25 16:02:22 2002 +0000 Implement prebuffering. commit c6e987716c6357e4d795207d325b5901b33f5325 Author: adnans Date: Mon Jun 24 16:14:47 2002 +0000 Update ChangeLog. Fix top-hack behaviour commit b8135c405012a8ba4ec26981627b448b6cc61272 Author: adnans Date: Thu Jun 20 17:14:34 2002 +0000 * Update Changelog * Add some more functionality to the context senstivie scope menu commit 3a064512436bbcc778620d3b2ca0be8cd4a84270 Author: sjah Date: Thu Jun 20 06:30:07 2002 +0000 Add HTTP reader. commit 2771146d36205c50de08ca0e65d99d52da6e4cf4 Author: adnans Date: Tue Jun 18 23:39:00 2002 +0000 * Scope window remembers its status (open/closed) * Scope menu has context sensitive menu. For now only "Open exclusively" is implemented. This closes all other scopes and opens the currently selected scope commit eab678d9a0a74722d4b33234ba676edf840faf29 Author: adnans Date: Mon Jun 17 20:16:33 2002 +0000 Rename FLAC stuff to FLC. commit aece3c9827fd0872b6dc778051ea18029a68b15d Author: adnans Date: Sun Jun 16 12:36:49 2002 +0000 Add path member to stream_info structure. commit 1cc2b25dc4fba32313596a07fe7ccb7f22b03973 Author: adnans Date: Sat Jun 15 13:04:20 2002 +0000 Add some gdk_flush() calls commit a35abd66d0db468348607c9d01bba899e235490e Author: adnans Date: Sat Jun 15 11:36:09 2002 +0000 Display playlist info after time data. commit 3f8d034e25adbd637523eeaed92a96cd590a1387 Author: adnans Date: Sat Jun 15 11:33:53 2002 +0000 Fix fname parsing routine commit fd4763c8318113d3639ba003e00d457e3e5b57b1 Author: adnans Date: Thu Jun 13 10:32:16 2002 +0000 Update bitrate wwhile song is playing commit 91ab3edfc29fc3e0006492b34de1d4236d1346bf Author: adnans Date: Wed Jun 12 21:40:08 2002 +0000 Small fixes to new mad_engine2 commit ce30772ba55f99f6700ac00b97c26f95f9f513c3 Author: adnans Date: Wed Jun 12 18:41:03 2002 +0000 Up low level watermark for buffer to 2048 commit a8b611250a1fcc40e80ef116fa1e67ae2d33ac1d Author: adnans Date: Wed Jun 12 18:28:51 2002 +0000 Modify mad_engine for new reader API. This meant doing away with the mmap method which made the code a hairier... commit 2ebc0d882ffaf2c7d8cde8dc05fd300966c0721f Author: adnans Date: Tue Jun 11 12:34:15 2002 +0000 * Modify vorbis plugin for new reader API. * Fix playlist crash bug when using keyboard shortcuts * Bump up version to pre3 commit 6dda849036c187c4f29957acd58637875b819312 Author: sjah Date: Tue Jun 11 11:17:44 2002 +0000 Add reader_tell function. commit 30c80471072e861cad1bf6cfbae23834ce5da8fe Author: sjah Date: Mon Jun 10 13:18:25 2002 +0000 Add Id tag. commit d4af328e6ce35373d4dedf3c93079f7f607ebba9 Author: sjah Date: Mon Jun 10 08:18:36 2002 +0000 Initial URIs support. commit 3f175e426906e055bd9b6339fef37bef29a0aafe Author: adnans Date: Sun Jun 9 10:22:48 2002 +0000 Fix for compile problem and filling in of new stream info fields (Drew) commit 45c9cd7aef2a32473d4be0e1e11760a2166cc219 Author: sjah Date: Sun Jun 9 05:27:28 2002 +0000 Code cleanup. Error message fix. commit cd6c78d6fc789710a30e01f9dbaa706e9869ce41 Author: sjah Date: Sun Jun 9 03:59:31 2002 +0000 Init interfaces_mutex. commit 19ac84df542bf6e79605998469b3ab01bea941ce Author: adnans Date: Fri Jun 7 12:03:54 2002 +0000 Changelog update, text formatting changes commit 4351f3c1e7dc166e1ee0e88f9af60f1a41d24acc Author: adnans Date: Fri Jun 7 11:57:18 2002 +0000 * --enable-tophack switch for configure. This fools CPU measuring tools like into thinking alsaplayer is superfast (0% CPU usage! :-) * Insert key brings up the "Add File" dialog in the playlist commit d064b12c67d9e6ea0e533d73ed97f3322e75fc1d Author: adnans Date: Thu Jun 6 21:59:14 2002 +0000 Map left/right cursor keys to relative +10/-10 second jump. The interesting bit is that I used libalsaplayer calls to do this! :-) commit 18620b7a14b3d83d1746398899db43dd77f37515 Author: adnans Date: Thu Jun 6 19:03:39 2002 +0000 Implement Delete (erase selected) and Enter (play current) keyboard shortcut in playlist. commit 6b75c8756fff94d79662a02bf42a15d2d07a1de1 Author: adnans Date: Thu Jun 6 14:16:06 2002 +0000 Update commit 2b8da87b2988a543f16f2728b5fc1d31ba8b8cc5 Author: adnans Date: Thu Jun 6 13:52:44 2002 +0000 * Modify layout of playlist window buttons slightly * Help screen shows available interfaces and output plugins commit 6668838f3cce613ee8025b46b1bc2ea2a293ca20 Author: adnans Date: Wed Jun 5 22:11:57 2002 +0000 Bump up version number to pre2 commit 6a79c5dbd822e27b1cf6300afd70665ba3bcf35f Author: adnans Date: Wed Jun 5 22:11:18 2002 +0000 * Move control.h to the alsaplayer directory * Query the control socket in the daemon interface commit 7d87b52821af406d16a4c6bbabd44c25bc98869f Author: adnans Date: Wed Jun 5 20:17:41 2002 +0000 Add missing include commit 86e465561e3ef4b2b78ed2e08d9fc882971e355c Author: adnans Date: Wed Jun 5 19:23:27 2002 +0000 Fix hang at exit in gtk interface commit 21b4032e75e600f5eed9c9ed4cb074a81b461641 Author: adnans Date: Wed Jun 5 18:18:30 2002 +0000 New daemon interface commit 8d275f0cb7664cf8c15a34ac1388471596cf2549 Author: adnans Date: Wed Jun 5 17:56:10 2002 +0000 Cleaned up the exit routines commit eba6bd603ca133a37c4736971de66085da731cf2 Author: adnans Date: Mon Jun 3 06:52:52 2002 +0000 Remove unused code. commit 1c8d4fb061ca0cd30c314555ef2412985e7f9642 Author: sjah Date: Sun Jun 2 17:04:37 2002 +0000 New functions ap_get_volume, ap_set_volume, ap_get_pan and ap_set_pan. commit 3e64cd00ea40bd156f2f72a7a9f1f8ab7e458aed Author: adnans Date: Sat Jun 1 21:04:16 2002 +0000 Modify coreplayer_notifier method slightly. commit c7ecefe8f1ba9fe84bf6bf72616876600fa7f5f2 Author: adnans Date: Fri May 31 23:36:13 2002 +0000 Remove unneeded locks from RegisterNotifier() function. Caused deadlocks. commit df79a0dd5a1464ac4d04ceb9cf763838d6acb117 Author: adnans Date: Fri May 31 17:11:40 2002 +0000 Silly bug in PositionUpdate() commit cde5eb1bd863d4cfb12b26665da5816cc6570ebf Author: adnans Date: Fri May 31 12:53:25 2002 +0000 Remove some debugging messages commit 8a25b5533954ced5e0fd994444df2fd76bafe0b9 Author: adnans Date: Fri May 31 12:13:51 2002 +0000 Fixed some pretty serious bugs in some ap_* messages. They were not checking the ap_connect_session() value! commit 0784afe5e6fcf298441032e1e1f663dc0424a0ad Author: adnans Date: Fri May 31 11:24:20 2002 +0000 * No more callback locking logic in Playlist and CorePlayer * New callback interface for CorePlayer (and Playlist) * New ap_add_and_play() function in libalsaplayer commit f7eebc824e2130fbcacd27bc0faa4303b334616a Author: adnans Date: Fri May 31 10:29:17 2002 +0000 Add and Play example commit 4156f0f6cb56a66b49135154721874fd05386309 Author: sjah Date: Wed May 29 09:32:50 2002 +0000 Added id3 comment parsing. commit 8b35bd5e975b3e462276d5c206394b699cef6fd0 Author: sjah Date: Wed May 29 08:27:54 2002 +0000 Added year and track number parsing. commit f103f7765aa925584b10ff6ae3e19776bdd264ce Author: adnans Date: Wed May 29 01:17:53 2002 +0000 Rename convolve.h to alsaplayer_convolve.h commit 75a17cf41e57853c648c9372cd68b1d41f8fef06 Author: adnans Date: Tue May 28 21:06:49 2002 +0000 Remove cpp_utilities.h commit 92d55967ebac63c6a2193954b1280afcf1f3b4c1 Author: adnans Date: Tue May 28 21:06:00 2002 +0000 Whoops, forgot to replace utilities.cpp with the plain .c version commit d61951e9543cd97063fe4a78122ab148e1734c50 Author: sjah Date: Tue May 28 18:24:38 2002 +0000 Fix utilites compilation. commit e7ae8d8ed7865cc2e959abd745d49aa41e242573 Author: adnans Date: Tue May 28 12:11:06 2002 +0000 Remove some cpp utilities. Bump up version to .71-pre1 commit 9a75c22480dddf2241f9e293176053e26ae775a0 Author: adnans Date: Tue May 28 12:10:30 2002 +0000 Remember speed for the PAUSE/UNPAUSE commands commit 2746b7849e122d65fbfd67b7bbdf367d0ffa74a2 Author: adnans Date: Mon May 27 11:02:31 2002 +0000 Remove some unneeded functions from cpp_utilties.cpp commit 342d91e2b41762365e3b0f869cea2b5710688a0a Author: sjah Date: Mon May 27 07:24:45 2002 +0000 Add function ap_is_playing. commit d63fee114f84946b738af6853a29831bf7406e3b Author: adnans Date: Sun May 26 13:40:24 2002 +0000 Hmm commit 04ed07ca728cff1b2d1a46ff4c05a00e3a198422 Author: adnans Date: Mon May 20 12:53:10 2002 +0000 Fix for gcc 3.1 build commit c352b33dcb558bb4026dfcd559dc0218b240ce40 Author: adnans Date: Sat May 18 09:20:43 2002 +0000 Correct implementation of ap_play() command commit b77ea6fe863b05f2a3047ee9025df58e0b55d0b7 Author: adnans Date: Thu May 16 13:36:24 2002 +0000 Remember window status, minor changes for API update commit ace09d3fdce4719de4208ce4061fdf129386e9d6 Author: adnans Date: Thu May 16 11:54:50 2002 +0000 New sample commit 1c3397cce6a11e059bd4a8e02cb249b11f65fe2a Author: adnans Date: Wed May 15 22:07:19 2002 +0000 Fix nasty NFS bug when doing mmap() on unreadable files. Update ChangeLog commit f393670d83cc35187db6b0eae6b1e301426ec361 Author: adnans Date: Wed May 15 18:57:26 2002 +0000 Remove debugging printf's commit d332eb9330ba73aefffe6d575e7439f07e07cfe7 Author: adnans Date: Wed May 15 18:52:39 2002 +0000 Bump up version to .70 New libalsaplayer function ap_set_position_relative() commit 37eea0af3450d91eca0dc9fdffb80346d9c84e70 Author: adnans Date: Wed May 15 17:50:29 2002 +0000 Check interface plugin version. Load input plugins only once. commit bb509a3372811d4b899af417bd6ee5e62601766a Author: sjah Date: Wed May 15 12:14:09 2002 +0000 Don't use filename as title. commit 542f2704aa755de20001add192f3b7152d8f9c5d Author: adnans Date: Wed May 15 10:34:48 2002 +0000 Prepare for new release. Fix -d switch for jack output plugin Fix -d switch for jack output plugin Fix -d switch for jack output plugin Fix -d switch for jack output plugin commit c1114cfa8a09ff8cfa6cbc78a44cead93aa74577 Author: sjah Date: Wed May 15 09:34:02 2002 +0000 More libalsaplayer functions: ap_get_status, ap_get_stream_type. commit 97c21b6c9fab0e4616edd6522f9351e4bf94f92f Author: adnans Date: Wed May 15 06:15:42 2002 +0000 Remove debugging message commit 8633d27fbd927a67d04307d4efa3fe441d41852c Author: adnans Date: Tue May 14 23:51:59 2002 +0000 Fix ap_key_new() declaration commit c4c4406b8e80d8c76343bdc6f5ef370c0c6e7423 Author: adnans Date: Tue May 14 23:43:58 2002 +0000 Add EXTRA_DIST commit 0751b583b0d72b8722c377dc25bdbdfbc34ca749 Author: adnans Date: Tue May 14 23:42:51 2002 +0000 Add header files to EXTRA_DIST commit cd5033c6139abf83daa0eaea3f4543ef5980d3de Author: adnans Date: Tue May 14 23:25:37 2002 +0000 More libalsaplayer functions. commit 8eb45998bcd574a3067beb6ffbb35e17a8315db3 Author: adnans Date: Tue May 14 21:19:16 2002 +0000 tyop commit 4a0b4410611d6a4bcff259e49db30bf76e82d4b1 Author: adnans Date: Tue May 14 21:17:47 2002 +0000 Update ChangeLog commit 01951d15fbca508359f7ff4fd349115e71b51c58 Author: adnans Date: Tue May 14 21:10:41 2002 +0000 New FLAC input plugin by Drew HEss. commit bf4b32618b769c441b7da54f8e62c00b39156e2d Author: adnans Date: Tue May 14 16:52:44 2002 +0000 Change ap_find_session syntax (Evgeny) commit 3a0d0673a726654a4687eaf9c652d51a1e49aaea Author: adnans Date: Tue May 14 16:45:31 2002 +0000 Fix autodetection of output plugins commit 21aefb3041452817bac34fa7050428070acf13b0 Author: adnans Date: Tue May 14 16:26:50 2002 +0000 Bump up version to -pre5 commit c07df18cd01f3ea95bb51070c1d101f6ac8369fd Author: adnans Date: Tue May 14 16:26:17 2002 +0000 output plugin API changes, now allows for callback based systems. No more dependancy on libjack in the main program. commit 7f6a198095d50a19654c0a3f4e841525a1a35315 Author: adnans Date: Tue May 14 16:22:55 2002 +0000 REAL JACK plugin debuts! All output plugins now also have an _out postfix. commit 2e5e0a10a20c1c6feebf29c41833c8683b96f774 Author: adnans Date: Mon May 13 21:57:25 2002 +0000 Remove some unused variables. commit 6c24b46448fbc4a46ec1e8cce3ed979cbf9a3db4 Author: adnans Date: Mon May 13 13:28:15 2002 +0000 Remove some debugging printf's commit 1e66088ff5472df7c81cffce455585294bd34e23 Author: adnans Date: Mon May 13 12:49:09 2002 +0000 Let AP_QUIT send a HUP signal instead of just exit(0) commit 573178e3da4f69b0b535bcda0eed918ff4be835b Author: adnans Date: Mon May 13 12:47:44 2002 +0000 Forgot to add ap_quit(int) commit 9bbc42b497fc666dfc575718dbe24b507f0eca2e Author: adnans Date: Mon May 13 11:39:14 2002 +0000 Changes to the control API, no allocation done by functions. Instead the caller should pass buffers large enough for the data which is specified in the various AP_*_MAX defines. commit a3f10a1d86223a8e7280cc2655e54fa626a7173b Author: sjah Date: Sun May 12 01:04:38 2002 +0000 Fix a bug in ap_do_do (tried to use not allocated msg). commit bdd9484da94258ebff683e3761112c47883e81cd Author: adnans Date: Sat May 11 20:26:40 2002 +0000 Change playlist/main window display of title/artist commit 5a451b3b4a05a95c9fd5c80c093e7e9a4e7b1010 Author: adnans Date: Sat May 11 03:14:56 2002 +0000 Typo commit a21e28b3d92a743beb505274769ea99c3afed93f Author: adnans Date: Sat May 11 03:13:58 2002 +0000 Update ChangeLog, TODO commit 999c332c94af5fd43a1530048b44443836846fb0 Author: adnans Date: Sat May 11 03:12:57 2002 +0000 Hmm commit 3851b9838e40bc6493d204ff707d667872275d9e Author: adnans Date: Sat May 11 03:12:40 2002 +0000 Bugfixes commit c6f4a62936115d2c422060f623a95f33afc13231 Author: adnans Date: Sat May 11 03:01:29 2002 +0000 Update speed.c example for new socket control API commit a9dab99a6bda961ab25ea796cec44f77fafa2157 Author: adnans Date: Sat May 11 03:01:05 2002 +0000 Implement more commands. Bump up shared lib version number. commit 1bf071798ddebe0767a8cf8a1525b932c8cc1340 Author: adnans Date: Sat May 11 02:28:49 2002 +0000 Implement client side remote function calls (also not yet througly tested) commit fbb6856135580756c9b3308f2c277373006febbf Author: adnans Date: Sat May 11 02:08:16 2002 +0000 Implement all existing commands on the server side (not tested, since client functions need to be written, still). commit eebec96f317932e78e299122cf89650070e72004 Author: adnans Date: Sat May 11 01:31:34 2002 +0000 Free resources as soon as possible. Fix some wrong declarations. commit 731d12884c9718474d41175baa511859bcec3094 Author: adnans Date: Sat May 11 01:09:52 2002 +0000 Include is now message.h commit 56ee5cced1029b024bb4e1ef58f9112c9fa3f60d Author: adnans Date: Sat May 11 01:05:14 2002 +0000 Bump up version to pre3 commit 1960caef6b388f8a05f99687c6d40ebe54450cac Author: adnans Date: Sat May 11 01:01:15 2002 +0000 New control socket API. Not all old commands are working yet! commit 1f0a741a3c2ebe17efa3d1b941415c08fafcddb5 Author: adnans Date: Sat May 11 01:00:32 2002 +0000 New socket control API, much more flexible than old one. commit 78f27c6e9099139cf0c6fbfd9313446955fbb2f6 Author: sjah Date: Fri May 10 00:42:03 2002 +0000 Add album and genre fields to PlayItem class. commit 4f0c854c5b5a7b92f47752c77b3fce80e5eda665 Author: sjah Date: Thu May 9 00:44:16 2002 +0000 Provide genre and album tags. commit 0d37a31133f1bc5df01f0db56a5bba1f4db2a97a Author: adnans Date: Tue May 7 09:01:00 2002 +0000 Update cvsignore commit a5b02b18cadb42cde3aca47d8a0bdde879308a8d Author: adnans Date: Tue May 7 08:57:54 2002 +0000 Add cvsignore commit 01325caf0fedc1b8f1fc1e78b0af5d1f93593fa9 Author: adnans Date: Tue May 7 08:36:06 2002 +0000 Add .xvpics commit c948632f261999885ba0766260a2fe21c11746b3 Author: adnans Date: Tue May 7 08:35:23 2002 +0000 Update ChangeLog commit d68b83cc206572187d2be5400cd8b1bc7865525e Author: adnans Date: Tue May 7 08:35:03 2002 +0000 More fixes to libalsaplayer changes commit ee8f55365f8fd4d76702d82cc617001d7f5f6ef5 Author: adnans Date: Tue May 7 08:34:43 2002 +0000 More fixes for new libalsaplayer changes commit 4b3c5228d26bdb75a0d0b7cb06a1cb1495214633 Author: sjah Date: Mon May 6 14:27:04 2002 +0000 Fixes for genre/album/artist. commit fa69495e7186b952b84878722372726c97dc4b63 Author: adnans Date: Mon May 6 02:53:36 2002 +0000 Modify libalsaplayer protocol. IMPORTANT: ap_get and ap_set return values have changed! Return values are now 0 for failure, and nonzero for success. commit d3b3c9b700fd933e43d255bd2cea4cb216720fff Author: pglgreg Date: Mon May 6 00:41:04 2002 +0000 another env. modulation bug commit 4aedc4944669e31a807f135c27b37ccac0dea2e3 Author: adnans Date: Sun May 5 18:31:58 2002 +0000 Rename author field to artist. commit 3e39cbb4418707e463fa36b1079e1131fa3e437d Author: adnans Date: Sun May 5 18:31:31 2002 +0000 Rename stream_info author field to artist and expand the structure to include genre and album strings. commit 17047ed2a7b6910aaf7484e1aa9d85fc3db81f2c Author: pglgreg Date: Sun May 5 17:38:15 2002 +0000 debug option; optimization commit 397d0cfdf4c5763e70b662a6d0b97bf97afa04f4 Author: pglgreg Date: Sun May 5 04:45:31 2002 +0000 correct correction to mod. env commit 932529c9625a883803c39c04bebdf61ddbe91e2a Author: pglgreg Date: Sun May 5 02:28:57 2002 +0000 fix freq modulation envelopes commit 59a3ad020e9ccc2e7213ff6fbc9e7b7d76f6b44f Author: adnans Date: Sat May 4 11:47:45 2002 +0000 Update README commit 27036964ec1cb45cbe0b881fd4db292488064198 Author: pglgreg Date: Fri May 3 23:34:49 2002 +0000 corrections to pcmap.c commit 1b8ff9d2d5ec35223f5f4465c1dda9fdb5ebc195 Author: pglgreg Date: Fri May 3 17:57:06 2002 +0000 more gcc warnings commit a1cb13238d40dcc5bee6b3988da8ba533e70b55a Author: pglgreg Date: Fri May 3 15:46:24 2002 +0000 fix trombone commit 57d5bb3e8011d11a9580a702138e750a1c7ac59e Author: adnans Date: Fri May 3 12:40:25 2002 +0000 Remove debugging printfs commit 0c8a29702f82fa55c30e31a1c13508299f96200f Author: adnans Date: Thu May 2 23:07:56 2002 +0000 Parse XING headers! VBR mp3's are finally 100% supported :) commit 43daee5a59b651e04daa80be197cc545cf7a0402 Author: adnans Date: Thu May 2 11:34:56 2002 +0000 Force mode 600 for control socket commit dcbc4b46fcc1958a6035db7f08289a062e562a54 Author: adnans Date: Thu May 2 10:32:14 2002 +0000 Updates commit 8827b844ddef6adbfc628c0023e10be638c4c706 Author: adnans Date: Thu May 2 10:24:22 2002 +0000 Typo fixes commit b42cc24b962dffca0bec757946d0cca8a9ac7658 Author: adnans Date: Thu May 2 01:44:08 2002 +0000 Remove all C++ style comments commit 232dcfef5bd57ca94498b7acd2b05d00d70cfa5a Author: adnans Date: Thu May 2 00:19:43 2002 +0000 Do not crash when we try to open the plugin multiple times, instead give an error message and disallow it. commit 078def772403fcaf3b827061353d36dd375d29fc Author: pglgreg Date: Wed May 1 22:38:40 2002 +0000 fix XG voice substitution commit f71f5a4152bafef4a91c90bfb221b2f9ce80de97 Author: adnans Date: Wed May 1 21:04:12 2002 +0000 Fix crashing bug when old scopes were present. commit 33fbdedd6ba4de6f96fd3ee33890bfc3d94da615 Author: pglgreg Date: Wed May 1 18:42:57 2002 +0000 fix bugs in voice substitution commit 326f9140d822b8b14017c67d73d10f605cb7bdba Author: pglgreg Date: Wed May 1 13:34:07 2002 +0000 fix no commandline midis bug commit 9ea5f27576639c73d4a4197ff242d2c730d292a4 Author: adnans Date: Tue Apr 30 13:46:45 2002 +0000 Small change in example compile line commit 8b5232e23b1bb78d89ac9038e02130205dbc250f Author: adnans Date: Tue Apr 30 13:04:10 2002 +0000 Updates for new release commit afeb555cbbfcfd16ab0b204803c036e2514e62b0 Author: adnans Date: Tue Apr 30 13:03:26 2002 +0000 Example code for using libalsaplayer commit 91b8a6baf0490ff726164da9a9b38bda8ddeccdf Author: adnans Date: Tue Apr 30 12:46:31 2002 +0000 Some API cleanups commit 324772965ea2031d987c06e3203ac0d2f02f4ece Author: adnans Date: Tue Apr 30 12:43:20 2002 +0000 Add AP_DO_QUIT typedef, not implemented yet though commit b7943000e9795e231f52093958a2d49c126fce71 Author: adnans Date: Tue Apr 30 12:42:17 2002 +0000 Changes to prepare for gracefull shutdown of interfaces. commit 8e55dfa142b05446dc4b010636385ddd3f234094 Author: adnans Date: Tue Apr 30 12:41:23 2002 +0000 Minor changes to partially cope with the apparant non-reentrancy of mikmod. Bad things will still happen with -x. commit 866c8b08455e6896a2a8b7fe32705cd867a6e190 Author: adnans Date: Tue Apr 30 12:11:28 2002 +0000 Update files to MAD 0.14b2 commit da28c058f157bd850ba1bf64ede6f168e6dc5e62 Author: pglgreg Date: Tue Apr 30 10:29:15 2002 +0000 misc. commit 7145f7b9392282bc1692dded77e082468c5a4688 Author: pglgreg Date: Mon Apr 29 17:32:36 2002 +0000 midi titles; documentation commit 2d1c335e070ed69acee0fe8241f93bfdae8278e9 Author: pglgreg Date: Mon Apr 29 00:42:15 2002 +0000 improve polyphony reduction commit 6b7ff008b4e9d2108ceaa787496b1974c943c166 Author: pglgreg Date: Sun Apr 28 18:58:54 2002 +0000 improve front panel display commit 75b1fb6bdd440c74f5b7e0cfb0777985fca2906e Author: pglgreg Date: Sun Apr 28 05:14:29 2002 +0000 voice substitution commit f9de46d5d16520285039bc049d116e5a71ab945a Author: sjah Date: Sat Apr 27 01:08:54 2002 +0000 New function to free user created prefs. commit 23890780318c249b5c21129c5f6e37eb15ad5f3f Author: pglgreg Date: Fri Apr 26 18:36:42 2002 +0000 forgot to update configure.ac commit c652679f46a01df86958cba98db71a7273f33158 Author: pglgreg Date: Fri Apr 26 13:07:38 2002 +0000 remove unused timidity dir commit 3f62d66f239e0abd3fcdf4fa8e42eeca40a1662e Author: pglgreg Date: Fri Apr 26 13:05:17 2002 +0000 patch directory no longer used commit c923a86f8a2cf5713c1c850fb13cf7b664cd035d Author: pglgreg Date: Thu Apr 25 12:20:01 2002 +0000 more on autoconfiguration commit 7627952f0fa6bb9e15c9a9bcc162d7671de3539c Author: adnans Date: Thu Apr 25 10:55:32 2002 +0000 Add stamp-h.in commit 1dfb355a2be75baf0d7ba77a967aba20d0ff9b5a Author: pglgreg Date: Thu Apr 25 00:12:21 2002 +0000 improve automatic configuration commit c5b28d1287635d45dc967de7de9b7c003ae57f9f Author: pglgreg Date: Wed Apr 24 23:56:26 2002 +0000 this accompanies PC42b.sf2 commit f02a1bfb47190e8d45e31dbf4523334f8a58cdc9 Author: pglgreg Date: Tue Apr 23 18:08:17 2002 +0000 click reduction commit 49d160e93dfc2a723f0f227dbac0f2a7f5ead23b Author: pglgreg Date: Mon Apr 22 13:30:50 2002 +0000 buffering and polyphony control commit ccb14a4f3b4ef23045b3e6628a82c60b242b66b8 Author: pglgreg Date: Sat Apr 20 22:21:41 2002 +0000 fix seg fault reading midis commit 24067f632f885bfb0b77e889026f5d0bf381ab80 Author: pglgreg Date: Sat Apr 20 17:14:04 2002 +0000 see ChangeLog, Apr 20 7am commit 6dae10445d8c7cd7b600bcb1501917a556eb6d65 Author: adnans Date: Sat Apr 20 11:59:20 2002 +0000 Add patches for python interface (bugfixes, no dependancies of course). Thanks to Evgeny Chukreev. commit e08f67db0fc15fe8b7d474df5f8a99fa7511c0c1 Author: pglgreg Date: Fri Apr 19 14:48:37 2002 +0000 see ChangeLog, Apr 19, 4am. commit a7e80268aa66631705a2c210f9a864e044c6f4e3 Author: pglgreg Date: Thu Apr 18 19:25:58 2002 +0000 see ChangeLog, Apr 18 commit 4f42ff3e9e7a7fe66bdb9481f407fc7624ed8489 Author: pglgreg Date: Thu Apr 18 05:43:29 2002 +0000 see ChangeLog, Wed. Apr 17 commit 15770f721ca7ea7b0951d5cd1ad38f647b83b535 Author: adnans Date: Tue Apr 16 00:25:57 2002 +0000 And another small fix for make distcheck commit 173216b7e306b06995f3901c7bbba7af512cbce1 Author: adnans Date: Mon Apr 15 23:32:07 2002 +0000 Small fix commit c4bb5951dfbe69548cbc023c5f5f3bacc5628936 Author: adnans Date: Mon Apr 15 18:55:21 2002 +0000 Rewrote command line parser to use getopt_long(), finally. commit 16ec50a10fbc9a268f7b1eef0e53a15f9302057f Author: adnans Date: Mon Apr 15 10:03:22 2002 +0000 Fix AP_GET_INT_SONG_LENGTH_SECOND. commit c43571dfca9f71d909c10dd45792f27772ac125c Author: adnans Date: Mon Apr 15 09:40:47 2002 +0000 Round up total time figure commit 9fde6c424b96690c7372862b3dbd4bdf4bfa33fd Author: adnans Date: Mon Apr 15 08:34:50 2002 +0000 AP_GET_INT_SONG_LENGTH_SECOND, AP_GET_INT_SONG_LENGTH_FRAME implementation. commit 1d04ad57780292744ec526c79236e6b65bdd6945 Author: pglgreg Date: Mon Apr 15 01:15:25 2002 +0000 see ChangeLog, Apr14, 2002 commit 4bf58dd4cfc9922b363c791508dfcde70d33f7ed Author: pglgreg Date: Mon Apr 15 00:04:51 2002 +0000 see ChangeLog commit 8ba1364c2276b810470b0ae0f101746b0919923a Author: adnans Date: Sun Apr 14 21:54:43 2002 +0000 Add .libs, *.[lo|la] to cvsignore commit 9058535a5853953bc4934a5ea2280defd0156ac0 Author: adnans Date: Sun Apr 14 20:41:39 2002 +0000 Remove this file per Greg's request commit 5630dc57dff54be4f0aff40ed5cbf2ff1e2fdc4e Author: pglgreg Date: Sun Apr 14 18:35:38 2002 +0000 see ChangeLog, Apr 14 commit d9dbda8823c1c8bb601cf463c6bd3a2c0cf342ee Author: pglgreg Date: Sun Apr 14 18:26:07 2002 +0000 see ChangeLog, Apr 14 commit 75a40a82c4e33bc1d99c1aba1b3bf809791f4a46 Author: pglgreg Date: Sun Apr 14 18:15:42 2002 +0000 see ChangeLog, Apr 14 commit 336689d4cdcbf74b2711662bae96ceb627d9f54c Author: adnans Date: Sun Apr 14 03:37:10 2002 +0000 ..and a few more commit 7b65bfd859dfb58099df772a4ce4a38cd595ae08 Author: adnans Date: Sun Apr 14 03:33:18 2002 +0000 Add some debugging printfs commit 7f9bae7cc46bd497f0ec8699dd6cda22f133b459 Author: adnans Date: Sun Apr 14 03:28:13 2002 +0000 Remove some debugging messages commit 978150fd9e1b4317a07f024cfc315a93c5887cbb Author: adnans Date: Sun Apr 14 01:06:06 2002 +0000 Remove libtool.m4, it must be available on the build system! commit 684bdbe0175bf5fd8c2141eaf1ee7b6f1887886d Author: adnans Date: Sun Apr 14 00:24:00 2002 +0000 Add some locking for interfaces commit 085a0918ccf33a5597644f8554e924c46df1767a Author: pglgreg Date: Sat Apr 13 23:41:09 2002 +0000 see ChangeLog commit 089771df2fd92f4b5457d0ac7615698bcb1a6a69 Author: adnans Date: Sat Apr 13 21:38:39 2002 +0000 Autogenerated commit 94e842831d34d5e623a52b6f155e8a4ade2fff0c Author: adnans Date: Sat Apr 13 21:13:55 2002 +0000 Create a C interface to the playlist interface. The functions still use STL parameters so the conversion is not total, but it removes the need for pure virtual member functions (the virtual method is still 100% supported though). commit 70905d3ef1876e1a94ba35f5a897b238fff5d098 Author: adnans Date: Sat Apr 13 16:02:34 2002 +0000 Reconstitute the plugins as C code. In the end the C++ compile was not useful for anything commit cfcaf5a229b10fc69de64a49d0fc2712a51cfc91 Author: adnans Date: Thu Apr 11 18:30:13 2002 +0000 Fix for gcc 3.0 compile commit 823e3b9a97bb3a29fa02192109a3ab22dfc62cd8 Author: adnans Date: Wed Apr 10 23:17:41 2002 +0000 Preliminary support for doxygen. scope_plugin.h is the most complete right now commit b504528ee23900fe23615c217be7eef3db679610 Author: adnans Date: Wed Apr 10 23:16:58 2002 +0000 Doxygen stuff commit 1d699ff6c33d3d1646587f47abf263f3361b28f0 Author: adnans Date: Wed Apr 10 19:08:20 2002 +0000 Add some more entries which should be ignored commit 10165457903c4c0a7e92af5ba6fcb05ba8354932 Author: adnans Date: Wed Apr 10 19:05:36 2002 +0000 *** empty log message *** commit c0a887b7610239474e6fbdc12e06965737cba23d Author: pglgreg Date: Wed Apr 10 18:40:08 2002 +0000 a patch commit 0365c212cba93b5e8cfa314069f10afd83533231 Author: pglgreg Date: Wed Apr 10 18:27:09 2002 +0000 see ChangeLog commit 7ecd3d37e4be525476a4df266fd332c9bc20370a Author: adnans Date: Wed Apr 10 15:39:07 2002 +0000 Update TODO commit 7bd8275fa736706be8750fb494f8a0ecfc8f7260 Author: adnans Date: Wed Apr 10 15:33:17 2002 +0000 Changes needed for the cleanups done to plugins, CorePlayer, etc. commit 0e00dc6e92cf4b836f768c924a58c5e79eee12a0 Author: adnans Date: Wed Apr 10 15:32:22 2002 +0000 Changes made for the new API commit a03be51df2495e355d255d0685085b4b7eeadbec Author: adnans Date: Wed Apr 10 15:31:46 2002 +0000 the Remove() procedure was not doing any interface locking so bad things happened when adding and removing entries simultaneously. commit 6f1a9092e58be8f01096bc5089d1ac0cb9a4aab0 Author: adnans Date: Wed Apr 10 15:30:46 2002 +0000 Some cleanups in the API, Load() and Unload(). Close() is now a private member. commit 418abc8206a84dc7cc42261b90088bca05120285 Author: adnans Date: Wed Apr 10 15:30:04 2002 +0000 Removed all the character array fields in the plugins, replaced by a simple character pointer. CorePlayer received some cleanups and renames. commit 078ea3e36f6fac413fdeb630983b387ea86f5f64 Author: pglgreg Date: Wed Apr 10 15:02:30 2002 +0000 see ChangeLog commit 8536213045f24fb783b89ef12ab8d86351d7c8ff Author: pglgreg Date: Wed Apr 10 14:40:50 2002 +0000 see ChangeLog commit 2d1867f049648a8b1e7484b06cf205be9c8f9cad Author: pglgreg Date: Wed Apr 10 14:28:51 2002 +0000 see ChangeLog commit 34026bed9b477c68999d4dc33ac1fc1f4908b3fd Author: pglgreg Date: Wed Apr 10 14:00:10 2002 +0000 see ChangeLog commit ad2fb8b15c4fee1ce5ccd9ffe14fea564646a784 Author: pglgreg Date: Wed Apr 10 05:38:51 2002 +0000 See ChangeLog commit b3b786a09647712271c3453d3c0016a263692d49 Author: adnans Date: Mon Apr 8 21:32:34 2002 +0000 CVS "instructions" commit 112c4715c315e64108357d3e506e2ca35f0ddef4 Author: adnans Date: Mon Apr 8 21:30:56 2002 +0000 Initial checkin of midi plugin commit 28d57d8634f63ce867b0136243bc79fadfb0852a Author: adnans Date: Mon Apr 8 19:33:50 2002 +0000 s/AlsaPlayer/FFTscope/ commit 7d0a67923e179538e3578ba8bd509fb73ea2720d Author: adnans Date: Mon Apr 8 15:33:16 2002 +0000 Some more tiny changes in the exit routines commit 7e58c65e81ef88e2611dec44bd61a4502a1ef321 Author: adnans Date: Mon Apr 8 15:25:19 2002 +0000 Let the indicator_looper thread exit gracefully, so we know the state of all the locks commit 5813a1a7c5c039ccbf804df9fa3d67c3795ecdc1 Author: adnans Date: Mon Apr 8 13:44:40 2002 +0000 Don't segfault if we're missing parameters commit dfa8207418cda72c007f38043bd8d4afeec909f2 Author: adnans Date: Mon Apr 8 10:20:40 2002 +0000 finer grained gdk locking in indicator_callback. This should have been done a long time ago. commit 45d921f07e88dd081bf14fcf6486495eb9309db1 Author: adnans Date: Mon Apr 8 09:18:27 2002 +0000 Fix another potential divide by zero situation commit 173b4a4915a4b38fe1a3e1d78162f622a3e323ef Author: adnans Date: Mon Apr 8 09:02:20 2002 +0000 Prepare for new release commit 8a307a8dacd6ef9b93637a4142078a0161854b5b Author: adnans Date: Mon Apr 8 06:48:12 2002 +0000 Ignore ltmain.sh commit b92b22155397d973979976a2d38f89147899cde9 Author: adnans Date: Mon Apr 8 06:47:45 2002 +0000 ltmain.sh should not be in the repository. commit 6a7b7c1d711af70916853b7cc45fdddf76b01799 Author: adnans Date: Sun Apr 7 03:06:52 2002 +0000 Do not update Speed(), causes havoc for now commit 26dadbd7d1fd5ab7bd1b2c395e614769649ca0e5 Author: adnans Date: Sat Apr 6 12:43:30 2002 +0000 Remove debugging prints commit 8ae748eba6b729d720a1e408d1cd4aab588d93e9 Author: adnans Date: Sat Apr 6 12:34:56 2002 +0000 When unregistering playlists do proper locking too. commit cb7c12a1d16145d0bef93f9fec06d6aa69a28050 Author: adnans Date: Sat Apr 6 12:12:27 2002 +0000 Replace the play only icon with 2 (not used yet) commit 0f1adcf3cc141ceca2bbe3c97c6146881e3c4c16 Author: adnans Date: Sat Apr 6 12:09:54 2002 +0000 More places found where locking order was not correct commit 3f4df2761cb3404cc24f9f77dbf8c405d596981c Author: adnans Date: Sat Apr 6 12:09:30 2002 +0000 Fix for deadlocks commit e7c089ea195ce1f22ee281f1fdf1c4587be91146 Author: adnans Date: Fri Apr 5 23:50:48 2002 +0000 Compile fix commit efcb8ae3b94b49cf02ed7f6b380709a1f51c3386 Author: adnans Date: Fri Apr 5 23:48:38 2002 +0000 Make sure we always acquire the locks in the same order! commit 7d1cba6729aa6407bebb931ce4264abae616ba41 Author: adnans Date: Thu Apr 4 23:06:45 2002 +0000 Modify the pause button behaviour when smooth transition is on slightly. commit 4b953f0bc89ae728c4d49a7c3eb60edc14df678e Author: adnans Date: Thu Apr 4 23:05:52 2002 +0000 Stop currently playing song when Queue is cleared. commit 6bc86485e49d829ab5ad2a120d08f9b1e6c19e90 Author: adnans Date: Thu Apr 4 13:48:36 2002 +0000 Play icon for active queue entry commit bb4c866c5601db028dc0ca4a784f56c68ea9c399 Author: adnans Date: Thu Apr 4 13:40:35 2002 +0000 Set icon instead of foreground color change for active entry commit 7fc6961db962f00eaa82f6360881afe3e71c8f0a Author: adnans Date: Thu Apr 4 11:48:15 2002 +0000 Display song info in GTK+ playlist window commit 5b51d2b0532f83b2c09eb2ea4073b3968386beeb Author: adnans Date: Wed Apr 3 22:19:40 2002 +0000 Modify EXTRA_DIST to include all *c files commit 5322dad5f3431c466399180d4170215ba8e23f41 Author: adnans Date: Wed Apr 3 20:21:42 2002 +0000 Rename cleanup() to shutdown() in input plugin and add the definition to all plugins even though most of them are empty. Also do the call from CorePlayer. commit 9f712c9dcf2080dabeb8bd798a4cae4f638b212c Author: adnans Date: Wed Apr 3 20:09:07 2002 +0000 Prepare for .58 release commit 843de7fc22a165645b4bca21357a5601270f50b7 Author: adnans Date: Wed Apr 3 20:02:59 2002 +0000 Add dot dirs commit cb841f347c94828639bedf633d10a32bfa3cc961 Author: adnans Date: Wed Apr 3 20:02:26 2002 +0000 Add .cvsignore commit ea27e155f6e70a0724135718b81ca30a65430731 Author: adnans Date: Wed Apr 3 20:01:07 2002 +0000 Initial checkin of fftscope commit 043de645636f4fe38224e06674197e2aca2bcc4e Author: adnans Date: Sun Mar 31 21:43:28 2002 +0000 Turn smooth transition off by default commit 6f7b18ea3d6486617a140d201889067fddf48c0b Author: adnans Date: Sun Mar 31 21:37:25 2002 +0000 Unpause when going to Next/Prev song commit 667a46103c47d6d8bbec217ee40bd262d4ff6af3 Author: adnans Date: Sun Mar 31 21:20:59 2002 +0000 Jump to next song if current song is removed from the playlist commit 24fb611201e45b8bae0547308e1272f6a183c130 Author: adnans Date: Sun Mar 31 19:23:12 2002 +0000 Default pitch_scale position set to 100 commit 0c0b84122511d0a7c284af69fc3090e93a4a6f86 Author: adnans Date: Sun Mar 31 14:57:57 2002 +0000 Forgot to commit commit 937d97e6673e24d65277d6ec8d98a80115822ab7 Author: adnans Date: Sun Mar 31 14:54:13 2002 +0000 Comment out dlclose call for user interface since gtk+ doesn't clean up after itself. commit 1708c59d39d1eec605387b55aebca59d5514a9b6 Author: adnans Date: Sun Mar 31 14:38:15 2002 +0000 Call gdk_flush() after gtk main loop quit because apparantly gtk doesn't care enough to clean up after itself. commit 3242a1c5996a7fd96cbc70145a6df24d7b89789c Author: adnans Date: Sun Mar 31 14:26:06 2002 +0000 Undo changes commit d792be4e623f127d38d1a5121bc9fb9eee5845ad Author: adnans Date: Sun Mar 31 14:21:30 2002 +0000 Indentation change commit e066205de9726970e371e6276ea8c9b473ba18db Author: adnans Date: Sun Mar 31 01:42:42 2002 +0000 Smooth transition for preset speed buttons (default = on, for now) commit 86832dc416a827ec0e063d5a85dfa11d3f0e7a7b Author: adnans Date: Sat Mar 30 01:53:43 2002 +0000 $Id$ commit 10eb98025b406382c0a6495d875695d344075280 Author: adnans Date: Sat Mar 30 01:52:03 2002 +0000 Lock/Unlock separation commit f6736edcbed946073421488c13d4a70e06a5f4e8 Author: adnans Date: Sat Mar 30 01:48:46 2002 +0000 Add separate Lock/Unlock calls (should really subclass this) and fixed a subtle deadlocking bug in the playlist. commit ab2e2d42814c282c69d71b318bc8ffca44d7f10a Author: adnans Date: Sat Mar 30 00:30:08 2002 +0000 Some minor debugging stuff added commit 47ed832e7982aed181df2ea5f498b6422482390f Author: adnans Date: Fri Mar 29 22:46:00 2002 +0000 Fix huuuge VM leak. Whenever a AddStreamer was called we leaked 2MB of stack space because we spawned a thread which immediately quit without ever joining it. commit dc59b295da752c61a0085f6a7f57a15924037074 Author: adnans Date: Thu Mar 28 13:25:40 2002 +0000 Add autom4te.cache commit 3a220847f27901991906759587bace9cf579435a Author: adnans Date: Thu Mar 28 13:24:44 2002 +0000 Make sure we remove any lingering libmad.la file commit c1b2752383c5819f51773238c9424c761afd7b35 Author: adnans Date: Wed Mar 27 21:42:51 2002 +0000 ID3 tag support via libid3tag commit 28a2675bf449901d77469b560d15ed7fb42426af Author: adnans Date: Tue Mar 26 20:53:47 2002 +0000 Mark current playing entry in the playlist commit 80c6559a9ebd38a89901cb8790ea5e888b0de397 Author: adnans Date: Mon Mar 25 21:51:23 2002 +0000 Update ChangeLog. Use libmad when present instead of our own copy commit 55c770f0f1633f0f6d236f8cfdac76836ff438e1 Author: adnans Date: Mon Mar 25 16:30:47 2002 +0000 Compile fix commit 9e9611b20abf3f12c3b9bd5f6fa92e0b42311ab6 Author: adnans Date: Mon Mar 25 16:28:42 2002 +0000 Remove acconfig.h and fix configure.ac accordingly commit 4774deedee16628311c5411c42208f91644f74fe Author: adnans Date: Mon Mar 25 16:15:29 2002 +0000 And these two commit 5825a9b80cf77511e4e31ae212728e0d9117877d Author: adnans Date: Mon Mar 25 15:42:33 2002 +0000 Rename include subdirectory to alsaplayer commit e4d0a2a7198fa2b0a497ea13611736c0e8378f56 Author: adnans Date: Mon Mar 25 15:33:03 2002 +0000 rename include directory to alsaplayer commit e844160feccdb928ce2780bc6cc29c9f0e555c52 Author: adnans Date: Sat Mar 23 11:15:30 2002 +0000 Add --enable-jack to enable/disable jack support commit d7ff4b72cd65d24287bf7d4b604592bff0990b29 Author: adnans Date: Fri Mar 22 01:31:58 2002 +0000 Wrong check commit e762a73e33580a87f2a8e14ed662e8ed28199123 Author: adnans Date: Fri Mar 22 01:25:32 2002 +0000 Always store full paths in m3u's commit 89a34c40ede843575990713bd0cbb5ee8d73a5a8 Author: adnans Date: Fri Mar 22 00:59:40 2002 +0000 Remember playlist content at exit. Cleaned up CorePlayer API a bit. commit 962d8ee24ec6a2217ee32724b0cf8d29d4eb732e Author: adnans Date: Thu Mar 21 22:31:24 2002 +0000 Another stab at fixing the big endian detection. commit a4fd2804dfb90b108118d4b0ddec9b27233b9f04 Author: adnans Date: Thu Mar 21 20:06:59 2002 +0000 Change window type to GTK_WINDOW_TOPLEVEL commit ae6e2577aae500afecf00101a5b2bb44c9e32a39 Author: adnans Date: Mon Mar 18 23:27:34 2002 +0000 Bump up version to .57, small bugfix to control socket shutdown routine. commit e8ac8ddeba5908fd7d977f06fc307ca109895718 Author: adnans Date: Mon Mar 18 20:32:59 2002 +0000 Modified modified start() call for scopes. Removed unused variable. All scopes also save their state now. commit bcc247119445793981ef69e47424484b3a734e7a Author: adnans Date: Mon Mar 18 16:30:48 2002 +0000 Pref calls have a new section parameter to add a hirarchical structure depth of 1. commit 07fd5c9aa48ed7166bd994ad0be5bb2e1cb6d971 Author: adnans Date: Mon Mar 18 09:36:20 2002 +0000 Renamed fft.h to alsaplayer_fft.h to prevent confusion. commit fd7a09548c6df3e2a31ac810e193d6bdb0623cd3 Author: adnans Date: Mon Mar 18 00:45:35 2002 +0000 And more cleanup commit 0725c6f708842ddd606bf6fc03b8332d4c6bbf6c Author: adnans Date: Mon Mar 18 00:42:01 2002 +0000 Some cleanups commit 85c8d147c4297be60789d1b447245f3f012c7e44 Author: adnans Date: Sun Mar 17 22:46:17 2002 +0000 Changed behaviour of Play button. commit dc291bdea215dab9bb272150a9ff40e5ab0387bf Author: adnans Date: Sun Mar 17 20:34:23 2002 +0000 Introduction of the opengl_spectrum GL based scope. This is a port of the xmms scope. It is only useful on machines with hardware GL support. commit 291f1574f7a0feddbc2f436ae532d5264e813018 Author: adnans Date: Sun Mar 17 20:32:02 2002 +0000 Changes for the pending opengl_spectrum inclusion commit 09ffab6e2cb74830526ddac7daaaf9661c2939a2 Author: adnans Date: Sun Mar 17 19:01:03 2002 +0000 add retired to .cvsignore (local tree only) commit 81f8e30df268f6df36895e44516a8bc110356c83 Author: adnans Date: Sun Mar 17 19:00:04 2002 +0000 barfft and fftscope are history. commit 1d79b72792dd02e52e6b9bb7dba4c0401ba4a8f3 Author: adnans Date: Sun Mar 17 18:56:33 2002 +0000 More fixes for the error.h rename commit 63307bafdf82c8f49f072f6a31babaf961b182ab Author: adnans Date: Sun Mar 17 12:59:09 2002 +0000 Changes for alsaplayer_error.h commit ef5cd30d52bd35d60f26ee1fde32e7787f3aaa66 Author: adnans Date: Sun Mar 17 12:55:06 2002 +0000 Install alsaplayer_error.h commit eaae865e19847e52a90fc6403bf9913d800c993e Author: adnans Date: Sun Mar 17 12:54:25 2002 +0000 Rename error.h to alsaplayer_error.h commit fb548dcd55c6b5b87cb7f9d081bed748e9c12256 Author: adnans Date: Sun Mar 17 10:43:50 2002 +0000 Proper fix for big-endian playback commit 4e340912395f0c8647547111cb6238d09b559bd7 Author: adnans Date: Sun Mar 17 10:35:09 2002 +0000 Hmm, this big-endian fix is not really a fix. Needs more investigation. commit 1fbb7362e66f7b68893214e54d7f5d7a834b3071 Author: adnans Date: Sat Mar 16 22:48:20 2002 +0000 wording change commit 43b02e630b0270ce2365501019fc4770550dfb87 Author: adnans Date: Sat Mar 16 22:47:08 2002 +0000 Formatting fixes commit 0fee7935e730bd1cab6b80ebc574415cc8d3e63b Author: adnans Date: Sat Mar 16 22:45:14 2002 +0000 Give some more details when detecting an old scope plugin commit d4c5544c77011981d99888d5aedaa3bb3e47c051 Author: adnans Date: Sat Mar 16 22:26:41 2002 +0000 Add cvsignore file commit 3f7fed7208601210a477343712f0f3efb901cbe3 Author: adnans Date: Sat Mar 16 22:25:46 2002 +0000 Add alsaplayer.pc commit d46e8935d16bb3859a058a9d1ff6a13eed76e8ba Author: adnans Date: Sat Mar 16 22:20:36 2002 +0000 Changelog modifications. Minor fix to alsa-final output plugin commit cff34ad82a40e4b75d7bb7027636744b27c25985 Author: adnans Date: Sat Mar 16 22:07:07 2002 +0000 Bump up version number and add/remove some Makefile configs commit 66e1a54064c979095c175929503f17271f72d1dc Author: adnans Date: Sat Mar 16 22:03:20 2002 +0000 Blurscope port from xmms commit 1890da8d984cce74e08225cdcc00054ff5871bec Author: adnans Date: Sat Mar 16 21:59:53 2002 +0000 Removed fftscope and and barfft scope. commit 6c1791781efdb4c8a4176d72929d567a37f01fc8 Author: adnans Date: Sat Mar 16 21:59:01 2002 +0000 Modified scope plugin API. Removed open() call and renamed close() call to shutdown(). commit 368889875fd577d561b5e9926e39e9e6694b8f87 Author: adnans Date: Sat Mar 16 21:58:25 2002 +0000 Fix crashing bug. Increased set_fft and set_data callbacks for smoother scope performance. Also modified the set_fft output data. commit e89a54447657ac387939e584f43eab00d75e8f14 Author: adnans Date: Fri Mar 15 17:52:10 2002 +0000 Some cards can't set period size of 8 (default) commit 5b79d9742e26d366ed152d71c1c42c176bd13642 Author: adnans Date: Fri Mar 15 17:00:22 2002 +0000 Programming fixes and big endian support in vorbis plugin. Thanks to commit 131e96e10ad94bbd0d836172c71726f04dc2c658 Author: adnans Date: Tue Mar 12 20:21:11 2002 +0000 Use FPM_64BIT instead of FPM_DEFAULT. Bump up version number to .57-pre1 commit 54f50a321313a4381c7eb143356a0535a3bdd135 Author: adnans Date: Tue Mar 12 17:53:13 2002 +0000 Bump up version number to .56 Tiny changes to monoscope commit bbaa43472ab5056bb50f25042ce20883a7714ab6 Author: adnans Date: Mon Mar 11 22:19:57 2002 +0000 Lots of bug fixes, thanks to Karl-Anders Wallin. commit 897bba1db1a8fde1ef441daa6ce87aad067fa199 Author: adnans Date: Mon Mar 11 18:49:10 2002 +0000 This is the wrong flag :( commit 3185f952d5172831f413c60e2211cb98c78dc8e2 Author: adnans Date: Mon Mar 11 15:20:40 2002 +0000 Add SND_PCM_NONBLOCK to snd_pcm_open() call so we don't just sit there waiting for other processes to finish. commit 151b3df98b6ff69a5c33ced46def3efa85010af2 Author: adnans Date: Mon Mar 11 13:17:31 2002 +0000 Tiny mesh update commit 897e77f6778e437eea7e7fca4fc0678d0fdbabda Author: adnans Date: Mon Mar 11 13:16:28 2002 +0000 Formatting commit eb33ab8bb2d40e417278b28fe6aa909340debef6 Author: adnans Date: Mon Mar 11 13:14:18 2002 +0000 Remove global session limit. commit 6ffb1e81a5a9f6b48709439aee6960b1567f5f70 Author: adnans Date: Mon Mar 11 02:36:48 2002 +0000 Add headers that are needed by interface plugins commit 6345ff597d9f60d7ff41f2996447f38e823e6e11 Author: adnans Date: Mon Mar 11 01:55:25 2002 +0000 Haha, turned out this was *STILL* not fixed, here's another try :-) commit 2f979247a2ea306322a967a2726aa75e13dbd7f6 Author: adnans Date: Sun Mar 10 15:41:06 2002 +0000 Bump up input plugin version number commit c8be5d37f80faedf676e2b4acf257fcc499ede71 Author: adnans Date: Sun Mar 10 15:41:05 2002 +0000 Add status field to stream_info structure and use it in gtk interface. commit 2ee36c493e70508748fa2261b342af1ec8cb7ac1 Author: adnans Date: Sun Mar 10 14:20:15 2002 +0000 Whoop, this is the real fix for the playlist ordering problem. commit 31560fe39fd0c5cf8dec421d2c1e7944e4dff2a9 Author: adnans Date: Sun Mar 10 14:09:01 2002 +0000 Introduce --verbose option. Prints copyright info and other verbose stuff. By default don't print these. commit 9b6e0c7ea5b5003a71f908b4fd8fd689dfa06336 Author: adnans Date: Sun Mar 10 13:13:38 2002 +0000 Update manpage commit 2dd99fc43f91686864872f6c02832842a59c2897 Author: adnans Date: Sun Mar 10 12:55:13 2002 +0000 Let meshscope build with new scope_plugin commit 91c0728451eb82baeacc1f7dcfe89790621b6ec4 Author: adnans Date: Sun Mar 10 12:54:33 2002 +0000 Fix MAD build for non-x86 platforms commit b548b95a2d43cc7a128cd2138e7afbb3c0b0598c Author: adnans Date: Sun Mar 10 11:18:21 2002 +0000 Bump up version number to 1.1 commit e6b7346a5abbbbe3a9d530c4c0880bbe065eafed Author: adnans Date: Sun Mar 10 11:17:40 2002 +0000 Small modification to gtk+ interface, raise all the controls. Fixed the Insert call of the playlist, don't "append", but "insert"! commit f21120b17473778d33fa6bb143a93068f4accc8b Author: adnans Date: Sun Mar 10 11:14:09 2002 +0000 Add Lock() / Unlock() call to Playlist object commit 9e3718a2652f4d2bd8c23725e109388754e92ae3 Author: adnans Date: Sun Mar 10 11:13:24 2002 +0000 Fix bug in AP_DO_PLAY, don't Start() blindly. commit d7600981a135ed6d7f4ef5310f7fe7b2330688ac Author: adnans Date: Sun Mar 10 11:12:42 2002 +0000 Remove ap_connect_session from public interface. It doesn't belong there and is confusing. commit 5d56c63a20d061032aaa1cdb336d8dd8fa3dccae Author: adnans Date: Fri Mar 8 20:30:02 2002 +0000 Update ChangeLog with missing info about removed QT interface plugin commit 1ffd5e89af173a741850cb78a241d7ff988918dd Author: adnans Date: Fri Mar 8 20:24:12 2002 +0000 Bump up versioning to 0.99.55 proper, ChangeLog updated commit fae83c751305ab2c1e40a7bf89f02988095e211b Author: adnans Date: Fri Mar 8 20:18:29 2002 +0000 Modified scope interface. New set_fft() call to offload duplicate calculations from scopes that want FFT data. Scopes can of course still do their own internal FFT, such as synaescope. Also lowered the scope sleep param to 25ms. commit 48560e38a7a44c33378f03b7497df7073b15a11b Author: adnans Date: Thu Mar 7 15:16:45 2002 +0000 Fix the plugin so it recognizes "Track xx.cdda" again. commit 5e537bf232fcd60f93feb3bb0e938bf146842e3a Author: adnans Date: Thu Mar 7 14:29:50 2002 +0000 Make jack ports terminal. commit 1c6f58d300bae9e3c6f6e1683624df7a6057dca2 Author: adnans Date: Wed Mar 6 00:12:17 2002 +0000 Preferences for default_playlist_add_path, default_playlist_load_path, default_playlist_save_path, default_play_path.. I.e. file dialogs remember their last used path. commit 8dc53c1441f7eb20daee8ee16b253a0e5f51b958 Author: adnans Date: Tue Mar 5 11:48:34 2002 +0000 copyright update and $Id$ commit 4fecf2f921631215df6c4d9f8f2fc67e2a7778bb Author: adnans Date: Tue Mar 5 11:47:54 2002 +0000 copyright update commit 32f62c4189d2aa5b51360338209b3b854653120e Author: adnans Date: Tue Mar 5 11:42:29 2002 +0000 Minor changes to copyright and addition of $Id$ commit 4bae08e5c44aca0147cd8659a8fc8f5f0a40a4d1 Author: adnans Date: Tue Mar 5 02:24:50 2002 +0000 spelling/case fixes commit 68e1d8874b365cc300d2c94745d3bc4ed7936769 Author: adnans Date: Tue Mar 5 02:22:38 2002 +0000 Do a more graceful exit if initial jack connect fails commit 841e9e508f0a241649e2d777c3097b866d99cddd Author: adnans Date: Tue Mar 5 00:46:20 2002 +0000 Install CorePlayer.h Playlist.h SampleBuffer.h AlsaNode.h commit 99b818782e7958b40c870ef5469965b200747a55 Author: adnans Date: Sun Mar 3 19:45:55 2002 +0000 get/set bool prefs functions commit a4c6cff31efb68e69fbdc7460041bbec71d2ddd9 Author: adnans Date: Fri Mar 1 20:10:11 2002 +0000 Compile fix, add some missing headers (thanks go to Michael Duelli) commit efb25a67be1b4cae73b26eac45c434f469ced4bd Author: adnans Date: Fri Mar 1 14:48:33 2002 +0000 Remove Qt plugin from build, will come back again as separate package. Bumped up version number to .55-pre1 commit 6d0f69e8b63de626c4c6ae6c9bd31c4b10c33957 Author: adnans Date: Thu Feb 28 16:28:57 2002 +0000 Update documentation. commit a71903f559a653cc8f255d4738e3b083ba6cae3f Author: adnans Date: Thu Feb 28 16:28:25 2002 +0000 Make the output plugin loading more robust commit 6c21912479d7f88b3079b9878bc6ffdd5b129c9f Author: adnans Date: Thu Feb 28 00:25:33 2002 +0000 Modify the return value of the set_sample_rate() output plugin function. Also made the alsa output plugin more flexible when it comes to setting the sample rate. commit 47824784086a8493266d7dda92a53c7f4e255626 Author: adnans Date: Wed Feb 27 20:34:23 2002 +0000 m4 directory and bootstrap script are also packaged in tarball commit 297f626ddccd70e1b4da1713b7582b8c1f4695eb Author: adnans Date: Wed Feb 27 20:21:10 2002 +0000 Update libtool. commit a8f228bd0880ad456db1cb85ec75fd0894d287a2 Author: adnans Date: Wed Feb 27 20:16:38 2002 +0000 Fix warning commit c2227322f29f6657924645af634adef4c1ab17b4 Author: adnans Date: Wed Feb 27 11:55:25 2002 +0000 add libtool.m4 commit 3e8cedd15876b90b6ecd6d381b8a21d1b02d01fd Author: adnans Date: Wed Feb 27 11:52:23 2002 +0000 Forgot some #ifdef USE_JACK encapsulation commit 0afb555aaa188c2bd85b96d7a11c496d056a209a Author: adnans Date: Tue Feb 26 23:44:09 2002 +0000 Bail if we encounter too many errors in reading the config file. commit 9b2350229ea5da7bf9fc73f003b41346f50c5f29 Author: adnans Date: Tue Feb 26 22:42:23 2002 +0000 Update ChangeLog commit f174480850a88117abd4987ad7a06d9fbffa0e33 Author: adnans Date: Tue Feb 26 22:41:22 2002 +0000 Fix NAS detection and plugin. commit 0806d7f66f43af8c13bdd02ba8fdd8d2ebc03946 Author: adnans Date: Tue Feb 26 19:59:35 2002 +0000 Update ChangeLog commit f228c2bfea1283a4f76b8011d5734748890a40dc Author: adnans Date: Tue Feb 26 19:52:00 2002 +0000 period_size and period_count prefs commit f7302f844944299a5c2b35d14578aba061f767e2 Author: adnans Date: Tue Feb 26 19:27:12 2002 +0000 default_interface and fallback_interface prefs commit 4283879e7d1e2784729c639135633e345fd75c6f Author: adnans Date: Tue Feb 26 19:26:47 2002 +0000 Remove Default from the name commit 5d21f18dc5f44b88db1aa4e654d2ea6ef51f0609 Author: adnans Date: Tue Feb 26 18:56:56 2002 +0000 Whoops, fix so we can actually store more than 1 pref :-) Also made the jack output ports prefs (jack.outpu1 & jack.output2) commit ec39747135bc76e6eea2a55a5473cedce8dbc0b2 Author: adnans Date: Tue Feb 26 13:20:44 2002 +0000 Removed unused variable commit 138c2a5d7c4cbb5f4584d59c868fe7c5254947a3 Author: adnans Date: Tue Feb 26 13:18:48 2002 +0000 Copyright notice update commit 4b672afce0fe3809f29373c27199c9d8f0891e66 Author: adnans Date: Tue Feb 26 13:17:40 2002 +0000 Modifications to the prefs system. prefs_get_* functions now take a default value which is stored in the config file (initial population of the register) commit bba0cc8f5499fc9582a665269109d444f2ea7a98 Author: adnans Date: Tue Feb 26 13:16:36 2002 +0000 cdda.device prefs, finally! commit d3ef01cdb18653d7fdda6eb3662c1c0d0a6e942e Author: adnans Date: Tue Feb 26 12:17:45 2002 +0000 Add global ap_prefs pointer commit a8388dad510804a9427bc88e702e5881f01805a3 Author: adnans Date: Tue Feb 26 03:28:54 2002 +0000 Preferences system commit 592393d684385a2362468b471241d5e7b903d139 Author: adnans Date: Sun Feb 24 16:13:00 2002 +0000 Use package config (alsaplayer.pc) instead of our own alsaplayer-config script. commit 5486d40679ef7afed6854eb0b9a503071f64bb7c Author: adnans Date: Sun Feb 24 02:28:05 2002 +0000 Make stream type more brief commit 6ed5700c88c07d4b4c5de0a088c38612d7453454 Author: adnans Date: Sun Feb 24 02:24:55 2002 +0000 Place the pause button between the pos/neg 100% buttons. commit 396615098d269e9f3647139e92728d11a02c1740 Author: adnans Date: Sat Feb 23 22:32:15 2002 +0000 *** empty log message *** commit 324cf5f50172515529994944b54e7edc15e5de8c Author: adnans Date: Sat Feb 23 22:31:39 2002 +0000 Do a fast to slow falloff commit 8a338c009c200324f710f0ce8bdb9dd9632a634c Author: adnans Date: Sat Feb 23 03:22:37 2002 +0000 Introduce --session parameter to select session to use (for --enqueue) commit 99d4f60ee481aefb716494f23403f694e906971e Author: adnans Date: Sat Feb 23 03:12:44 2002 +0000 remove ControlSocket.h commit 1226bee3b881d790e37aa2a6042fd9d475da9fb9 Author: adnans Date: Sat Feb 23 03:07:42 2002 +0000 s/CLI/TEXT/ commit fea041b5ced5b355c5dced6688f1e97f796777a2 Author: adnans Date: Sat Feb 23 03:00:59 2002 +0000 Make socket setup smarter i.e. wipe stale sockets and reuse them. commit 64010565cf5d899dccde3069017e50e6633eb7ed Author: adnans Date: Sat Feb 23 02:59:53 2002 +0000 Fix silly bug that allowed connections to first session only. Also add error checking when communicating commit 26529f231df81a21a57e07a52ced3a77d7891236 Author: adnans Date: Fri Feb 22 21:57:27 2002 +0000 Add gtk.m4 for AM_PATH_GTK commit 8a120a97de2d1e5d645a977f08aa487d47d23734 Author: adnans Date: Fri Feb 22 20:17:23 2002 +0000 Report xruns with the (aproximate) length commit 567a05276c43356dfe4e0b77b6b1880d3cb605df Author: adnans Date: Fri Feb 22 20:03:43 2002 +0000 Fix --with-jack parameter commit f6d04383cfd5b6ad133a855ece94cff53a282e59 Author: adnans Date: Fri Feb 22 12:29:59 2002 +0000 call jack_client_close() from restarter thread commit b8a4b8d47a534a0c907b4e9fca1dfb852cee311e Author: adnans Date: Fri Feb 22 12:05:19 2002 +0000 Attempt to reconnect to jack if we timeout. commit 34e56885aed811ad803aaa55412a2061dde2f3b3 Author: adnans Date: Wed Feb 20 15:06:22 2002 +0000 Forgot libalsaplayer and alsaplayer-config script commit f04abee9f65feec664141c588b4f1d655d9b3a7b Author: adnans Date: Wed Feb 20 14:56:06 2002 +0000 config.h.in is also autogenerated commit 4c1f5361a35479ab686a77151b959eeb23e16a87 Author: adnans Date: Wed Feb 20 14:54:33 2002 +0000 last batch of .cvsignore updates commit 48f3e7c3d5030647f451b91128db8d1bfd84cb25 Author: adnans Date: Wed Feb 20 14:21:44 2002 +0000 Forgot to copy this commit c9aba802b08be2f7e9bb5a291638282d3a577e4c Author: adnans Date: Wed Feb 20 14:20:58 2002 +0000 Add *.la commit 8581510e91b415ceec601113e5f6e70f88c0d70e Author: adnans Date: Wed Feb 20 14:19:43 2002 +0000 Add .cvsignore for mad commit 99a3567069095c3e24a764a01f09e8a54bb88ed2 Author: adnans Date: Wed Feb 20 14:18:44 2002 +0000 more files to ignore commit d291a0671e7f6e86b1e8e40e1b2990a0dacbd156 Author: adnans Date: Tue Feb 19 01:50:30 2002 +0000 Add commit b1ecf4f31e4988f6414eeecee2ca5e0d2926afb5 Author: adnans Date: Mon Feb 18 19:27:51 2002 +0000 Make some output verbose, and remove socket error message printf commit e6771734837473eb196d9670b341322342565be1 Author: adnans Date: Mon Feb 18 19:05:14 2002 +0000 Multiple sessions support for socket control. commit e41abdb5d7b035ab404fe9084a1f808cee3568ab Author: adnans Date: Mon Feb 18 18:11:28 2002 +0000 Replace "cli" with "text". commit 9fb5be78badd0fa0b4fad24002be7c715304a657 Author: adnans Date: Mon Feb 18 16:18:21 2002 +0000 Implement AP_SET_INT_POS_FRAME and AP_GET_INT_POS_FRAME. Make the stream info for mp3's more brief. commit 533076a7c2beecf56c559d2b974dc25d6158dbc1 Author: adnans Date: Mon Feb 18 13:32:13 2002 +0000 Introduce alsaplayer-config. commit c6c7c4c189c69e76bd3c7b018c5724d13aedfe41 Author: adnans Date: Mon Feb 18 12:44:23 2002 +0000 Install the plugin headers in $(prefx)/include/alsaplayer commit 3fdd24ff40dead671912eec2a723a393a0ebc69b Author: adnans Date: Mon Feb 18 12:43:52 2002 +0000 Add --with-jack option to configure script and make the JACK detection process more robust. commit 82383ee0c3483744b0ce0389aa5ecf685e024ab7 Author: adnans Date: Sun Feb 17 14:52:37 2002 +0000 Updated ChangeLog. Reflect session name in gtk+ interface commit 3024c4b95ed394f73de1bcc9b2e200a4dba26eb2 Author: adnans Date: Sun Feb 17 14:52:01 2002 +0000 More implementation commit d409c1703809895b559866d8aa85f69b78d77f7d Author: adnans Date: Sun Feb 17 14:50:40 2002 +0000 Wrong location commit 434ebe1df808ced8822d97484b1757551bffe87d Author: adnans Date: Sat Feb 16 15:41:52 2002 +0000 Make --enqueue work on local paths too. JACK connection name reflects the session name. commit 6e45328333dd975a9a3fa9d1dde49ddc90ea16ad Author: adnans Date: Sat Feb 16 14:36:55 2002 +0000 Introduce session name option commit 330d2de8683c8b10de060b72c474a960a6e73cc6 Author: adnans Date: Sat Feb 16 14:36:26 2002 +0000 AlsaPlayer.h for global parameters and other application wide stuff commit 04541c29eebc9e034743bc3cd582fc15cba3e992 Author: adnans Date: Sat Feb 16 13:04:47 2002 +0000 Do not crash on 0 byte files commit 4fd50437478df6890f4930325fe4ccd57e221655 Author: adnans Date: Sat Feb 16 12:23:01 2002 +0000 Remove old workaround commit a2a39c5d86854b1003237419c1df5169a0ae3cd3 Author: adnans Date: Sat Feb 16 11:34:01 2002 +0000 Create a workaround for autoconf/automake sillyness. If you only include C++ files (.cpp) it will not define $(LINK), only $(CXXLINK) even though it will reference $(LINK), bah! commit 230254b2a121d0838881d23f06b4e94eacdeb1e7 Author: adnans Date: Sat Feb 16 11:19:15 2002 +0000 *** empty log message *** commit 0ddffabc104bd2bead25f8b2fb19206c5ddfd544 Author: adnans Date: Sat Feb 16 02:50:44 2002 +0000 Implement AP_GET_INT_POS_SECOND commit f830cdfd82f252b891da1622d1dbac00662971c7 Author: adnans Date: Sat Feb 16 02:41:09 2002 +0000 Implement AP_SET_INT_POS_SECOND, so seeking is now possible from an external interface. commit ae636f174f55d9230698b2d549a8c25a09a137dd Author: adnans Date: Sat Feb 16 02:40:17 2002 +0000 Add GetChannels() and GetFrameSize() call so we can deduce frames from seconds (frame = second * GetSampleRate() * GetChannels() * 2 / GetFrameSize()) commit c688c2f15e0ab38790ba8ee1c7d3a1b696a1d71e Author: adnans Date: Sat Feb 16 02:07:27 2002 +0000 Add locking capability to Clear() and use it. commit a84ca137b054ea494fe3616bc8894cc4c2a134a4 Author: adnans Date: Sat Feb 16 02:06:57 2002 +0000 Add locking capability to Clear() commit 73de89e6091d7bb122a0b6ddc6afa62650a52fd4 Author: adnans Date: Sat Feb 16 00:55:33 2002 +0000 case change commit fd9ebc7ff8eb22f56b7d9948f293636697aa714f Author: adnans Date: Sat Feb 16 00:54:09 2002 +0000 Bumped up version number to 0.99.54. Created libalsaplayer for remote controlling alsaplayer. Documentation will follow commit d1595fb1abf6cfc59038b1671ce856d237317da9 Author: adnans Date: Sat Feb 16 00:53:12 2002 +0000 New ControlSocket structure commit e8d90586ab9fe93ae85e403974c1ed53a0ec950c Author: adnans Date: Sat Feb 16 00:50:06 2002 +0000 Changed this interface commit fe5dc1c49578eeeff9e4398429a8f016daf93861 Author: adnans Date: Thu Feb 14 07:34:09 2002 +0000 This file does not belong here commit 35b96710ae82461d386a807a156cd3afa861b5b5 Author: adnans Date: Wed Feb 13 18:20:31 2002 +0000 More work on the control socket commit cdf97d50e23ba92b3568353d58ea7ea780939c4b Author: adnans Date: Wed Feb 13 07:40:32 2002 +0000 Add ControlSocket.cpp to build commit 7e7a7c358ee70a87cfb0fdfc8c7ca9199b38a859 Author: adnans Date: Wed Feb 13 07:39:42 2002 +0000 Control Socket interface (in separate file this time) commit 7831e48d9a350a4dd5c7bfb964ef3c0abbd43fd8 Author: adnans Date: Wed Feb 13 07:39:01 2002 +0000 Update ControlSocket interface commit 7392b22bf5a91ccd68c0f2e067a7a3a87a1fd48e Author: adnans Date: Tue Feb 12 22:37:13 2002 +0000 Drop root before initializing gtk+, when run as suid root commit c6c372d7fc4d7cbe65f2badd89e6f0bb62bd8f96 Author: adnans Date: Tue Feb 12 22:23:47 2002 +0000 More cleanups commit 6d2a7e019d2ee0b997fa9afe5f9a012b057764e0 Author: adnans Date: Mon Feb 11 02:22:41 2002 +0000 More socket command imlementations. Also changed copyright notice to reflect we're already in 2002. commit ff37607b5768665d4c9fc1868bfc53030bc79272 Author: adnans Date: Mon Feb 11 02:16:25 2002 +0000 Remove some debugging code commit 43ddedf701b3f123d05921deea0d26d4f93f3bc3 Author: adnans Date: Mon Feb 11 00:47:21 2002 +0000 Control socket interface! This is very rudimentary, just proof of concept. I will continue to improve it over the next few days. Mini client coming up very soon! commit 8298f3f89e0c4ee123dff1b3cc48ed35b03ba09c Author: adnans Date: Mon Feb 11 00:46:02 2002 +0000 Header for control socket support. commit 919b54bd6d88e0081d9dca5ca790f539a0d6c33e Author: adnans Date: Sun Feb 10 17:32:21 2002 +0000 More robustness for decoding first frame commit d60c467e2794534da27b83f6103ad8519fb645cc Author: adnans Date: Sun Feb 10 16:38:03 2002 +0000 Do not misdetect TAG (ID3v1) headers. commit 2c5d9c7eeaa4b06c06f7eb2be2c282cce374fe07 Author: adnans Date: Sun Feb 10 15:40:17 2002 +0000 Updated to 0.13.0b and made the find_initial_frame() a bit more aggressive. commit b91f630ec75390b71c8a8d0793659342860d58ba Author: adnans Date: Sun Feb 10 10:14:41 2002 +0000 Dead code removal, always a nice thing. commit df53e78a94a4290177074a94795ad6608ac18645 Author: adnans Date: Sat Feb 9 11:09:21 2002 +0000 Minor cleanups, remove some jack related printfs, and terminate alsaplayer if jack stops calling us. commit d1b6655443d2f16957d5f709cdbacbb9bef8ff36 Author: adnans Date: Fri Feb 8 23:47:00 2002 +0000 Allow the user to select the jack ports to connect to (thanks go to Mark Gibson) commit 239d4e4bde337eab888997592b69bee400b872c0 Author: adnans Date: Fri Feb 8 01:54:39 2002 +0000 Add some more autogenerated files to cvsignore commit 611660a4840d30f597707f1cab11f4735f762e55 Author: adnans Date: Fri Feb 8 01:45:32 2002 +0000 Edit Changelog and bump up version number to 0.99.53 commit 0c7f296ced47673bf497379979d56c409c2be772 Author: adnans Date: Fri Feb 8 01:44:33 2002 +0000 Bump up version number to 7 commit 815bb4d173819b28255cd28167bf6a3483e96613 Author: adnans Date: Fri Feb 8 01:43:44 2002 +0000 Rename libvorbis to libvorbis_in so it doesn't clash with the real libvorbis commit 739085b62d8156e82238bb3d9a1e13e158f8a964 Author: adnans Date: Fri Feb 8 01:42:43 2002 +0000 Update interface every 500ms, instead of every 200ms commit ec10609ddffb1428170cf9b1ab11ff8b5cf4ddb6 Author: adnans Date: Fri Feb 8 01:41:58 2002 +0000 Change naming of jack ports slightly commit 9e1359782c5467d4d263d6bea0716c664c9c233f Author: adnans Date: Fri Feb 8 01:11:26 2002 +0000 Sync up with latest jack CVS commit 285cf71a4edcf444836421ea99050a0e91734b8f Author: adnans Date: Fri Jan 18 19:28:53 2002 +0000 Comment out CXXLINK line, uncomment if the CDDA plygin doesn't build for you. commit 2dd5c8d28e2008581a95b1391932ab3765adf971 Author: adnans Date: Fri Jan 18 18:11:50 2002 +0000 Use new JACK alsa names commit ece3dd271e6ebc6aeb85eb0ab14e08a23cf4bb25 Author: adnans Date: Thu Dec 6 06:29:59 2001 +0000 Jack related fixes. commit 16807e3a0366cedcd676a2751e0fd04b6f5733c7 Author: adnans Date: Sat Dec 1 14:31:27 2001 +0000 Remove weird char from error message (bad vim, bad) commit 357a28af184351d27c7bedd1ea5ca07bdb972271 Author: adnans Date: Sat Dec 1 14:16:48 2001 +0000 *** empty log message *** commit 393e0668f779af488ea69df63173c444ff42a716 Author: adnans Date: Wed Nov 28 13:22:19 2001 +0000 Fix for devfs commit 7f37556cba0901e00067391150a24e18d4b7d8cc Author: adnans Date: Tue Nov 27 15:42:54 2001 +0000 Add commit ed7133487669172585a0f01d16118e73a4c5bcc5 Author: adnans Date: Tue Nov 27 02:32:59 2001 +0000 JACK support commit 1e00a1071b0f0865afde5498021b5a953f3f8ba3 Author: adnans Date: Tue Nov 27 02:32:33 2001 +0000 VS: ---------------------------------------------------------------------- JACK support commit 1b971c27e5875f21ed40660330416bed38fe9e8c Author: adnans Date: Tue Nov 27 02:30:55 2001 +0000 alsaplayer_error() changes commit 97729a663c61021d0d227e6af56a99b379048c10 Author: adnans Date: Tue Nov 27 02:30:23 2001 +0000 Add error.h commit b33efdb495503e4148756da93fd0d0c204cbe2b1 Author: adnans Date: Tue Nov 27 02:28:17 2001 +0000 Changes for JACK support. commit 2b8d0614b01a9e23f70867888acb40b1c763eac5 Author: adnans Date: Tue Nov 27 01:08:28 2001 +0000 Define LINK as CXXLINK since libtool autoconf/automake gets it wrong. commit 07a05dcdac46acc442ccf0fce53246cc258756db Author: adnans Date: Mon Nov 26 20:57:17 2001 +0000 Error messages done with alsaplayer_error() commit 9c99f73d6086da29b457cd83d009a4309eb49893 Author: adnans Date: Mon Nov 26 15:48:07 2001 +0000 Make scope data size availability independant of fragment size. This is accomplished by adding an accumulitive buffer to the scope_feeder() function. Scopes will now work even when you have a fragment size smaller than 1024 bytes. Also note that scope display is now MUCH BETTER!! (there probably is an ancient bug in the old data buffering code, will not fix that). commit ae365ff148c17f0a2c8260601e9251040fd556d5 Author: adnans Date: Sat Nov 24 13:24:16 2001 +0000 Give Paul some credits :) commit a4d4433d14f79a3b5b04a9ce4eaa237acdd5ca59 Author: adnans Date: Sat Nov 24 13:23:39 2001 +0000 Switch all error message to alsaplayer_error() commit 967cf1d1da078a279b0fda148a371184d98b86b3 Author: adnans Date: Sat Nov 24 13:21:11 2001 +0000 Global alsaplayer_error() function for error reporting. commit 29e1193554f095cf47d2aa8e98f86bbec1b9cf6e Author: adnans Date: Sat Nov 24 12:15:21 2001 +0000 Fix crashing bug if gdk_font_load() fails for some reason. commit 4f8e346c6cfa4994bb86004894813fe2fd66c7de Author: adnans Date: Thu Nov 22 22:10:36 2001 +0000 Updated CVS blurb commit 11fd05a424b2dd812dc50e70aa1d2773eb795ead Author: adnans Date: Tue Nov 20 14:41:07 2001 +0000 Check error status after setting sample rate commit fb0c6064a48c3e8fd0272d1132da2bf25fe91cd0 Author: adnans Date: Tue Nov 20 14:38:15 2001 +0000 Add --crossfade parameter to command line and make crossfading between songs optional. It is off by default. commit 81ca67d9beabd2e42d86011b62faf387d7841783 Author: adnans Date: Tue Nov 20 14:37:30 2001 +0000 Add crossfade support to Playlist objects commit fb0abfa0b787aa22b9d4461520bc312e9ec40b7c Author: adnans Date: Tue Nov 20 14:36:49 2001 +0000 Minor error reporting change commit 6c4d3bde6989baf666ec0fdca5f5da87019ba228 Author: adnans Date: Sun Nov 11 14:13:29 2001 +0000 Do not crash on (invalid) mp3 files smaller than 16K. commit 74372cdf953a96fddfe0821ed0c1fb4b51e0e3d2 Author: adnans Date: Sun Nov 4 11:44:11 2001 +0000 Stop() command worked incorrectly with the new player setup. commit 8fd114eb97f0567abb784be4329395b18ad49879 Author: adnans Date: Fri Nov 2 12:51:54 2001 +0000 150 -> 110 frames for cross. commit b38526b52ab40cb30d213a91d79f3d9fc7b1f8e6 Author: adnans Date: Fri Nov 2 12:48:19 2001 +0000 Cross "fade" code! Very experimental, please test! BTW, there's no way to turn this off yet, other than to comment the lines in playlist_looper(). I'm working on the prefs system :-) commit e2e453c9ab822158da4e67cd8aebc5accc14477b Author: adnans Date: Fri Nov 2 12:26:30 2001 +0000 Bumped up speed control to -333 and 333%. Also prepared the interface to take into account mid-play changes of the internal Playlist CorePLayer object. If the object changes, the playlists reflects this since it queries the Playlist everytime it's about to use the CorePlayer object. commit 1196e0b090a2296af087ccd0c38415d88ebaca4e Author: adnans Date: Fri Nov 2 11:45:14 2001 +0000 Change email address commit df4dc9524f3b86d0c91deca9117165fd21292b59 Author: adnans Date: Fri Nov 2 10:42:49 2001 +0000 Made middle horizontal line solid. commit 90a7dd862b03b7f5543dab5a8a9427cb0eaa7b5b Author: adnans Date: Thu Nov 1 13:03:30 2001 +0000 aclocal.m4 should not be in CVS since it's autogenerated by ./bootstrap commit ba9f27c30b7c444efd11afcb9f8d4f76d24db64c Author: adnans Date: Thu Nov 1 13:01:39 2001 +0000 Update ChangeLog commit 83818641310057e6821afb48e911913c0c1b7a82 Author: adnans Date: Thu Nov 1 12:55:39 2001 +0000 Changes needed for the new qt plugin commit 3462867cf9a352eb118d93947cd111b362ee2901 Author: adnans Date: Thu Nov 1 12:43:48 2001 +0000 Modifications for the new Playlist / CorePlayer setup. commit 03c86afcd30eff39585228ac3ef4c57ef6be15e2 Author: adnans Date: Thu Nov 1 11:55:13 2001 +0000 Interface plugin changes. Removed CorePlayer pointe passing to interface_start(). The CorePlayer object is now contained in the Playlist class. There is also a new constructor to the Playlist that accepts an AlsaNode. When this constructor is used the CorePlayer object is created and owned by the Playlist object itself. commit 20d9a0e4013d10d05d3bdbdd5d6db68fa2615ae8 Author: adnans Date: Thu Nov 1 11:11:58 2001 +0000 Convolve is back, hopefully. The convolve_match() function was causing a segfault. Commenting out a line fixed this crash, but I'm still not sure why it actually crashes, most likely a wrong assignment + memory overwrite at some point. At least this line doesn't impact the convolve effec too much so I'll put this is now and see if it blows up on other boxes ;-) commit c6d6ad903f51285fc1ac56b8547f0049a8c45432 Author: adnans Date: Thu Nov 1 11:08:50 2001 +0000 Dirty fix to stop convolve_match() from doing bad things. Still needs further investigation, in particular line 262. commit 617c6f0ad19479221bfe5f9022cd0c3392c1f6d9 Author: adnans Date: Thu Nov 1 03:26:57 2001 +0000 Rewrote the logbarfft to use indexed images. The code is actually readable now. File size went from 10 to 6K! commit 08019d3c0174ca0bb119a19b4dd8c663dc0f43ff Author: adnans Date: Thu Nov 1 02:59:07 2001 +0000 Fix one off bug in color allocation routine. commit 65181638b47c78f57462a4d7f8b4ea7125405b3c Author: adnans Date: Wed Oct 31 20:58:06 2001 +0000 Fix mono playback. It should actually work now! :) commit db3178beb2901e36d512169a479e467728e1e300 Author: adnans Date: Wed Oct 31 20:49:29 2001 +0000 Increase the number of bars to 32 commit 7c0efabf9813984f1759a4d9aed934ddbe6dad5a Author: adnans Date: Wed Oct 31 16:20:41 2001 +0000 Renamen cli interface to text commit c0a5823655a11a9ceaaa2924b95439bbcb8ccc7d Author: adnans Date: Wed Oct 31 14:13:48 2001 +0000 Remove cli directory commit 1fd240c2f9aa59327ce398755fb28076e4b061e0 Author: adnans Date: Wed Oct 31 14:11:47 2001 +0000 Rename cli interface plugin to text commit 4099ab7ead2cca6961460fa1ba2f5782e4b4b4e6 Author: adnans Date: Wed Oct 31 14:01:14 2001 +0000 Add the ability to select the interface plugin from the executable name. For example you can make a symbolic link to alsaplayer called alsaplayer-qt and the qt plugin will be loaded by default. commit d00b5c3ce38c607ed7e6b520260713a543a0f3f7 Author: adnans Date: Thu Oct 18 00:52:52 2001 +0000 New Qt code from Rik, improved playlist amongst other things. It now requires Qt3 compiled with -thread support. commit 150d7874ad12ce81ed92ce71892cde6015de8c4e Author: adnans Date: Thu Oct 18 00:29:41 2001 +0000 These files are autogenerated, they should not be in CVS (thanks, rikkus) commit 9ad0289749f651f6a84d395f738cd7074033b8ce Author: adnans Date: Wed Oct 17 12:09:06 2001 +0000 This file is autogenerated by bootstrap commit 2dae04965dff30c8136711870db117bdb140ca36 Author: adnans Date: Wed Oct 17 11:56:03 2001 +0000 Add check for madvise commit a22fc9f06fe9344ad5a4be196784800f70934715 Author: adnans Date: Wed Oct 17 11:55:37 2001 +0000 Made madvise() call conditional commit ca880b338d7da9c1944e16629f4184fb82db0162 Author: adnans Date: Sun Oct 14 23:21:51 2001 +0000 Fixed --enable-prefer-mad handling (default to yes) commit c0fe803f6b7d94fcae4773f35f96ec591f452c23 Author: adnans Date: Sun Oct 14 22:39:22 2001 +0000 Prefer the MAD plugin over de mpg123 one by default now commit f343e12cf286149e9d1f0bc8c2d399e0d6878470 Author: adnans Date: Sun Oct 14 22:35:32 2001 +0000 Insert scope feeder at end of audio bus (POS_END) commit d9615b656ea6b21f72df73b874b0a3119648b88f Author: adnans Date: Sun Oct 14 22:16:29 2001 +0000 Bump up version number to .52 and commit new 'missing' file commit 92c5abf05143cb26981f71690d8ebacd9b3e2f82 Author: adnans Date: Sun Oct 14 22:14:56 2001 +0000 Rebuild glade interface and qt builder interface commit 0a4db4c5aca8aea91b4fd5174f5554a6df9e06c3 Author: adnans Date: Sun Oct 14 22:13:25 2001 +0000 Bug fix (not sure what anymore, check CVS message) commit adc267cd799829971f54f8da80662b2f4fd33bee Author: adnans Date: Sun Oct 14 22:12:55 2001 +0000 Modify input_plugin frame_to_sec function to return long instead of unsigned long commit 57e0bc255884ab04d44acb51243bf3bf546ef409 Author: adnans Date: Sun Oct 14 22:12:29 2001 +0000 Modify frame_to_sec function to return long instead of unsigned long commit 2d020423e83ec574d8fd9ed591bc9fb2381171a7 Author: adnans Date: Sun Oct 14 22:11:47 2001 +0000 Changes to make --enable-prefer-mad work commit ac4975c9ed6a927664038d2dc06a2f1dc63d05c0 Author: adnans Date: Sun Oct 14 22:11:10 2001 +0000 Convert plugin to C++ commit 557b82bfcd810e7985d93e5e0dd26cd065a70d16 Author: adnans Date: Sun Oct 14 22:10:20 2001 +0000 Add extern "C" statement commit 348c330189fe9133effbdf0a4e1ad3ae7a7f37b2 Author: adnans Date: Sun Oct 14 19:29:08 2001 +0000 Made the set_rate call more robust by using _near. Should fix failure to start on some (high end) cards. commit 1a126719dbb6d9c60f115d977a2e2ac5f17fca39 Author: adnans Date: Sat Sep 22 20:00:49 2001 +0000 Fix the Makefiles.am, replaced += with = commit 27ed59cb282745430c2ab73fb1bf019d2acc862f Author: adnans Date: Sat Sep 22 19:53:19 2001 +0000 Fixed CFLAGS line commit 425738e331b7558d4e965c3fbdd2df81107a8dd8 Author: adnans Date: Fri Sep 21 10:10:54 2001 +0000 Comment cleanup and removal of http:// checking commit 9725079a3df707a8ac9718809981a4536d5d0998 Author: adnans Date: Thu Sep 20 18:20:36 2001 +0000 Only set the seeking flag if we actually do forward seeking. Cached frame positions don't really need seeking indication. commit a7c4fa3f7d79aacabe775a6d6e73c3423453fbc0 Author: adnans Date: Mon Sep 17 11:20:49 2001 +0000 Remove static member of error_str commit e9ed0f65162c4cc893074d4adc8532986597b5c5 Author: adnans Date: Mon Sep 17 11:12:54 2001 +0000 Skip a few frames after initial seek so there are no audible glitches when seeking forward in a file for the first time (cached seeking already had code to skip frames). commit 242c0ae9cd802762ed2015ae7157386f004b9ecc Author: adnans Date: Mon Sep 17 09:02:36 2001 +0000 Add support for stream positioning. When subscribing you can now pass POS_BEGIN, POS_MIDDLE, POS_END to tell the Node object you want to subscribe at the beginning, middle or end of the audio chain. A subscriber that does visualization only will for example want to be position at POS_END (right before data goes out to the soundcard). commit 2c9924f58cb18bb4407465c8bb8061aaebb4a58f Author: adnans Date: Mon Sep 17 09:00:28 2001 +0000 Support bits for stream positioning. commit e798bead09e806469f2be95cc58b8613e4ed5c3a Author: adnans Date: Sun Sep 16 11:02:58 2001 +0000 Replaced by vorbis_engine.cpp commit 4f182a2b9c1acd701a6ac4e8f1fdc0fc741e85df Author: adnans Date: Sun Sep 16 11:02:33 2001 +0000 This is the C++ variant of vorbis_engine.c commit 731ec97642bc2e1b96b5b4e98b914ac78665f811 Author: adnans Date: Sun Sep 16 11:02:04 2001 +0000 Changes for C++ compile of the plugin commit d880a8a9694afc6e7a5fdffc7ff520347769f699 Author: adnans Date: Sun Sep 16 10:58:02 2001 +0000 Convert mad engine to C++. Only the plugin file compiles with C++. All the madlib files are still compiled with regular gcc. commit 3e6380acb35cbc1c4d942a93af63897695c4f101 Author: adnans Date: Sun Sep 16 10:56:31 2001 +0000 *** empty log message *** commit 6ff1f43ddc09653a7b147198c1d05e8b45ff02ce Author: adnans Date: Sun Sep 16 00:50:59 2001 +0000 Bump up version number to alpha2 commit 2a012d8758567ea52f97b5dbf461c705c170760a Author: adnans Date: Sun Sep 16 00:48:03 2001 +0000 Debugging code removed. Rebuild gtk+ interface from glade source commit aa7ec63f4299a1e29b8037d21c03d0dac03a91eb Author: adnans Date: Sun Sep 16 00:46:51 2001 +0000 Cleaned up a bit (removed some C++ style comments). commit d1ed2dbdebba10a875f27dd766071393eb02782b Author: adnans Date: Sun Sep 16 00:37:25 2001 +0000 Remove some debugging info and modify display commit 8f9d92dbe0c2d15c071a85c699bb0da2d220b4c3 Author: adnans Date: Sun Sep 16 00:20:27 2001 +0000 Sample accurate seeking! Seeking is slow, but very accurate. commit ecc9992b59ba34106870e72b79d73074e5008245 Author: adnans Date: Sat Sep 15 00:07:29 2001 +0000 Rewrote it so it mmap()'s the file. This might not be ideal, but it will make programming initial support for seek that much easier. The original code was not very efficient anyway. Once seek is implemented I will look at adding normal read() support again. commit b0c487d316d44bb373f2ffc1fcec85276475dd9a Author: adnans Date: Fri Sep 14 23:17:03 2001 +0000 Sync ltmain.sh with libtool commit 573b288dd5ae5c855335fff2ea3709328b70dd31 Author: adnans Date: Fri Sep 14 08:45:05 2001 +0000 Stream format info is now displayed. commit 2b66bb82a460072ffa3fed04f7989bea759d3dea Author: adnans Date: Fri Sep 14 04:47:33 2001 +0000 Time display and *broken* seek function. commit 70454e750f1fb5b3db71b334d6771be17c4acf3c Author: adnans Date: Wed Sep 12 23:03:35 2001 +0000 Fix crash if headers were bigger than 16K (ID3v2). commit f8e36e0c047479e92c898e58cb74840a7cea7c8e Author: adnans Date: Wed Sep 12 17:15:04 2001 +0000 Fix some memory leaks commit 019aaae7af5593a60cb09b5742621e89558dd5e5 Author: adnans Date: Wed Sep 12 13:28:05 2001 +0000 Do not crash when we fail to open a file. commit a7b701978d63fd9ceb21404fe35a7e64d15767cd Author: adnans Date: Wed Sep 12 12:52:09 2001 +0000 Continue playing after recoverable MAD error. More debugging output. commit c9df0947a28a840f0113fab40ce3938a3a2a5f7f Author: adnans Date: Tue Sep 11 08:10:55 2001 +0000 Modified can_handle function to do extension based identification only. The vorbis library gets upset when you feed it some files that are not OGG. commit bc525978a188c5d7b5612c500ae99940e3c005c1 Author: adnans Date: Tue Sep 11 00:47:40 2001 +0000 Very nasty bug fix!! Thanks to electric fence and [kernelwork]. The CorePlayer was calling into input_plugins without them being initialized or opened. Bad bad bad! commit 5f72ff369322bb345e2c383440cd789dac372c24 Author: adnans Date: Tue Sep 11 00:46:15 2001 +0000 Add ready flag. commit 99a5da15bc946e1332e180bd10419a696aec2ae1 Author: adnans Date: Mon Sep 10 23:46:40 2001 +0000 Fixed nasty bug that caused segfaulting. Cleaned up local data structure and also made the initial parser function detect RIFF encapsulated MP3 (ugh!) commit d0bfbd99f7b44b979222d42df38a9c214d2a3855 Author: adnans Date: Mon Sep 10 22:01:45 2001 +0000 Fix buffer bug. This could prematurely stop some streams (Ilkka). commit b14496686e69917065ddcdfd5f0e46adbbf93236 Author: adnans Date: Mon Sep 10 18:25:57 2001 +0000 Version updating. commit 2ca2f4752529ffe79ff134d34aa9f671d1597258 Author: adnans Date: Mon Sep 10 17:52:38 2001 +0000 Demote mpg123 capabilities! It now reports 0.8 for mp3's. This means that the MAD plugin is now the prefered MP3 player (with 0.9). However, the MAD plugin is not feature complete so beware. commit 4857c59141cf64cde069e5da9f1d86aaae0fcba4 Author: adnans Date: Mon Sep 10 17:37:57 2001 +0000 First batch of changes. Audio output and ID3v2 skipping (not parsing). commit 96d5dbd99bbde00cd27193559865121738b44327 Author: adnans Date: Mon Sep 10 09:37:42 2001 +0000 Changed button text on file dialogs and modified their behaviour accordingly commit b60eac7dcab319ca6a2985a303a898f158846f89 Author: adnans Date: Mon Sep 10 00:53:10 2001 +0000 Bump up version number to .51-alpha1 commit 7afb481e889d263099eeb208dbad301caa073c39 Author: adnans Date: Mon Sep 10 00:28:52 2001 +0000 Modified Shuffle definition and bumped up SCOPE_SLEEP to 30ms commit 0850b0fc4f1dd7c4b6446c00b4ab8217063e31d1 Author: adnans Date: Sun Sep 9 23:22:35 2001 +0000 Shuffle implemented in playlist. commit c3697576ff1131ac737262da838f9b9b27554360 Author: adnans Date: Sun Sep 9 23:21:58 2001 +0000 Shuffle implementation. commit 7bdc2c9f8320fa7762505d25961a9d47dba8b2b4 Author: adnans Date: Sun Sep 9 19:05:54 2001 +0000 Close the dialog when pressing OK for Playlist loading. commit a5431467ec430a85682d570b1f8bb87ffc7c2f1a Author: adnans Date: Sun Sep 9 19:02:44 2001 +0000 Added code to only include /usr/local/share/aclocal to aclocal command if the directory actually exists. commit 23e22fb88b4014b8a5509646031e900895aa70de Author: adnans Date: Sun Sep 9 18:55:33 2001 +0000 Fix Load/Save functionality and added some debugging output for Add... commit a9be69587f9b986be99f90c570533888d08ea0c0 Author: adnans Date: Sun Sep 9 18:11:43 2001 +0000 New MAD plugin work in progress. The mad_engine.c must be filled in still. commit 24816f4a002e357603f3e8046dccd378a26a0e81 Author: adnans Date: Sun Sep 9 18:09:25 2001 +0000 Added mad subdirectory commit 7e22d3d30cd2a11ec83e58db1ea59fb764a05a66 Author: adnans Date: Sun Sep 9 11:09:31 2001 +0000 Formatting improvements of ac_arg_enable help text commit 65e1976e3d853cd2b57248a2a55085e5627062ce Author: adnans Date: Sat Sep 8 22:14:10 2001 +0000 Sync up CVS with 0.99.50 release. commit c81ed2874675ce09e110ff76016cd83d2d7433f2 Author: adnans Date: Sat Sep 8 21:51:48 2001 +0000 Compiler fixes for Redhat gcc 2.96 commit 7f96b3d0e664f8ce685028ff018088c496ba48a4 Author: adnans Date: Sat Sep 8 21:51:14 2001 +0000 Updated Changelog commit 3d711f4eaf853267523ca57d212bb088a2525473 Author: adnans Date: Sat Sep 8 21:50:52 2001 +0000 Version bump to .50 proper. Tiny cleanups. commit 4c82bd3def77c2e599e981eb2d8353cf51355f3c Author: adnans Date: Sat Sep 8 20:12:42 2001 +0000 Preperations for mad plugin. Commented out AC_CANONICAL_HOST. commit e0bde985e17e132fdb7e53e91a4b5435f6548e89 Author: adnans Date: Sat Sep 8 20:10:07 2001 +0000 Spiced up the display a bit. commit 7b496ce419ccf11dc0936be97708a2a5b5f3f534 Author: adnans Date: Fri Sep 7 12:46:04 2001 +0000 Added a copyright notice and $Id keyword commit e496d4eabd383c247bfe778f63bf2fbc611f36a4 Author: adnans Date: Fri Sep 7 12:44:43 2001 +0000 Added $Id: keyword commit 8e242aee377b862c7010b3616ed9ed0ac9633e26 Author: adnans Date: Fri Sep 7 12:40:09 2001 +0000 Keyword test commit 5ee61a71f4b8e40b82f34d1551be34d94cef493a Author: adnans Date: Thu Sep 6 13:24:16 2001 +0000 Playlist/SOng looping by Patrick Shirkey. Use parameters -P or -S for playlist looping and song looping respectively. commit ffd12dec6d9e878128b5a7a1ed683a0a3104985d Author: adnans Date: Thu Sep 6 13:09:01 2001 +0000 Added AS stuff, correctly this time. commit b7cbb7959b34f64f59410ee9043484b045f98bd6 Author: adnans Date: Thu Sep 6 08:09:47 2001 +0000 Added @DFLAGS@ commit 371610de26c86a4d91c067171cf20af20bb51e8a Author: adnans Date: Wed Sep 5 21:55:06 2001 +0000 Missed this one at initial checkin of qt plugin commit a428eb57885016b1d720c4f1ba766b3e2c311bc7 Author: adnans Date: Wed Sep 5 21:51:05 2001 +0000 Try 5 commit 4feb3c721d0d965c1dd44550541d68e7888b393c Author: adnans Date: Wed Sep 5 21:49:24 2001 +0000 Try 4 commit bda61a8c27211092481e71568d8d7e4608f047e1 Author: adnans Date: Wed Sep 5 21:46:29 2001 +0000 Bump version to alpha4. Test CVS commit mail :) commit aeb3e3ccde8d7e522145fc25eee4e127b96f63d3 Author: adnans Date: Wed Sep 5 14:00:36 2001 +0000 Removed C++ style syntax commit 7180b81e3957f80798b3a104fc9685ab3a3a64c1 Author: adnans Date: Wed Sep 5 08:16:20 2001 +0000 Moved CFLAGS out of conditional blocks commit bccdcfc040b0275a6dccf2e8d7d66d202a02c0c3 Author: adnans Date: Tue Sep 4 16:52:45 2001 +0000 Replace sleep with dosleep commit 10fd35ab020a1cb242e9367c87f833d403f9a235 Author: adnans Date: Tue Sep 4 16:27:41 2001 +0000 Minor cleanup commit d6809ab016589037ba7ff7f99f03323695f937e0 Author: adnans Date: Tue Sep 4 15:28:56 2001 +0000 Try 2 commit 9abe4a76e50b87868d1dea6539bd90566572635b Author: adnans Date: Tue Sep 4 15:18:30 2001 +0000 Define ASFLAGS commit b14d738a1d3538d40df11a8735ba1ddaaf52bdb3 Author: adnans Date: Tue Sep 4 15:17:31 2001 +0000 ASFLAGS set commit 392fc4d226cc396ea4a670c48497529ad9a2c3b6 Author: adnans Date: Tue Sep 4 13:20:50 2001 +0000 Import Qt interface plugin by Rik Hemsley commit 684475d91ad9f9456d67d3178b9d39dcbd774343 Author: adnans Date: Tue Sep 4 12:49:12 2001 +0000 Typo fix commit 6d7dcebca975283126f5a596726897a7264646f8 Author: adnans Date: Tue Sep 4 12:46:05 2001 +0000 Fixed locking bugs exposed by fixing the pthread_join bug :-) The gtk callback function must release the GDK lock before it calls stop_* or else it will deadlock. After stop_* it should reacquire the lock. commit 7b67c7fe3f79b60a278597d3c064e5de9a1fd9fb Author: adnans Date: Tue Sep 4 12:33:15 2001 +0000 Fixed bootstrapping bug reported by Patrick commit 6515c8c1d8ccd19b4bd896799dada4093caaeaad Author: adnans Date: Tue Sep 4 12:10:13 2001 +0000 Added output if bootstrapping succeeded commit 2603b5398383b4579db80c9939e9584076a772bc Author: adnans Date: Tue Sep 4 12:06:06 2001 +0000 Cleanups commit 463fc2789929c9d471b6dc14a24ac098a496d819 Author: adnans Date: Tue Sep 4 12:05:43 2001 +0000 Added handle entry and bumped up version number commit 1f44f3ddddbd05b37b3d325a7e46e1a1d82a2cdc Author: adnans Date: Tue Sep 4 12:05:18 2001 +0000 Cleanups. commit dd42f5f1d38f2119f1dc4ac130e4d53a991f0dfd Author: adnans Date: Tue Sep 4 12:00:36 2001 +0000 Code to unload scope addons. Also modified the scope linked list a bit. commit 46a84bb06013da964f348268a25d2e02a852ebe0 Author: adnans Date: Tue Sep 4 11:59:58 2001 +0000 Fixed a silly threading bug. I was passing the pthread_t address instead of the pthread value to pthread_join so there was never any joining going on!! commit 9217a59324c74a58b9cc942fe8308e77eb693011 Author: adnans Date: Tue Sep 4 11:57:42 2001 +0000 Disabled convolve routine since it contains a bug. Will investigate this further. commit df04bce67fd8690974f170d32a0c86d28ff9de0e Author: adnans Date: Tue Sep 4 07:02:58 2001 +0000 Ogg Vorbis m4 macros. commit 0d4d078483d0a5b04c754d3b4d56ccb161d34a0b Author: adnans Date: Mon Sep 3 18:14:19 2001 +0000 Added '-I /usr/local/share/aclocal' to aclocal commit 469c968fcf963832f88e9f6a0acf1a262d8d7a09 Author: adnans Date: Mon Sep 3 10:52:44 2001 +0000 added .xvpics commit 03a09a914105e97fce110023507504e0f6d14ec1 Author: adnans Date: Mon Sep 3 09:50:27 2001 +0000 One line instructions for build :) commit 6a18d2d07f426acd8ddc9d68012f6ddb0b1b04ab Author: adnans Date: Mon Sep 3 09:40:07 2001 +0000 acinclude.m4 compromised of these files. commit 36dc96a62696b87efa0a53c63492b8d60ab68888 Author: adnans Date: Mon Sep 3 09:34:45 2001 +0000 acinclude.m4 is now autogenerated by bootstrap commit b3a6fe3a91beea47900b72174edb833a5d698de2 Author: adnans Date: Mon Sep 3 09:34:15 2001 +0000 Autogenerate acinclude.m4 commit a9f141c240d85f27b0fb895317b266fe92b8a1e6 Author: adnans Date: Mon Sep 3 00:18:06 2001 +0000 New menu button image. More scope cleanup hacking. commit da27e0c20d144677b9c8fabadda007db36bb0745 Author: adnans Date: Mon Sep 3 00:17:26 2001 +0000 New menu button image commit d24867d8b5ef27b6e97af554e2601a803ec54053 Author: adnans Date: Sun Sep 2 19:58:35 2001 +0000 Added bootstrap script and replaced configure.in with configure.ac commit c269d5c9fabfdedbf9adcce5921951106fd1c2dd Author: adnans Date: Sun Sep 2 18:47:40 2001 +0000 Reran libtoolize. These files should be generated by the upcoming bootstrap script :) commit 8cee77509dcaae1134b45ec765ae3d224bb6023e Author: adnans Date: Sun Sep 2 18:43:10 2001 +0000 Remove qt directory from build process commit 2b3b2d7b00c31b624b17a401cb5d9d3d048db3c6 Author: adnans Date: Sun Sep 2 18:32:38 2001 +0000 Correctly added template for symbol 'HAVE_QT' this time commit 3e9c36479e319815354be9e7baa3de498142e657 Author: adnans Date: Sun Sep 2 17:43:40 2001 +0000 Commented lock debugging printf commit cfedfd6509125a459bbb6886cde69e17a1777878 Author: adnans Date: Sun Sep 2 17:42:47 2001 +0000 Wait for the adder thread so we don't crash and burn if it's still running. commit ce937a833c514f2584811f5768393321782c664d Author: adnans Date: Sun Sep 2 17:38:57 2001 +0000 Added template for symbol 'HAVE_QT' commit 2e92331f3982163a478a73725269351f627b54e4 Author: adnans Date: Sun Sep 2 16:58:50 2001 +0000 Modified default optimization flags: -funroll-all-loops -> -funroll-loops and added -fexpensive-optimizations commit c75a6ad1fdabf46a89499a006d3dc648995c92e2 Author: adnans Date: Sun Sep 2 16:53:07 2001 +0000 Scopes window changes. and PlaylistWindow locking functions added. gtk.cpp also received some code to aid in unloading scope plugins (not complete) commit c6931f4eb66deabf6d0aad834b9d5470cc085825 Author: adnans Date: Sun Sep 2 16:52:07 2001 +0000 Add CbLock and CbUnlock functions. Added code to unload the scope plugins. However for some reason we crash if we actually call dlclose. I think it has something to do with gtk+ itself. Not sure. dlclose() commented out. commit 75cdfd36d67798da0ecefffd1e5a45b9e74754a4 Author: adnans Date: Sun Sep 2 16:50:33 2001 +0000 Minor cleanups commit 8b568a4a34769984d2076f3c892d1d1bc7a7be28 Author: adnans Date: Sun Sep 2 16:50:08 2001 +0000 *** empty log message *** commit cacaccbbb50a02cedc19a71e97f27044e98aa763 Author: adnans Date: Sun Sep 2 16:49:22 2001 +0000 Added CbLock and CbUnlock functionality. commit 6057bd5e3c4bb49db5f5da270d080348ac9fea0d Author: adnans Date: Sun Sep 2 16:47:36 2001 +0000 Added CbLock and CbUnlock virtual functions. These can be left empty by Playlist interfaces, but must be defined. For interfaces that require locking (like the GTK Playlist) these will be called whenever a Cb* function is executed and the locking parameter is set (see playlist_looper for an example). commit dff3f570fd8d3ea181fd1361a89d358dfd19a623 Author: adnans Date: Sun Sep 2 16:45:37 2001 +0000 Modified scopes window to be more descriptive. commit 3c70f357adcd192a8dae3abe678437197801acd2 Author: adnans Date: Sun Sep 2 11:39:43 2001 +0000 Changed load/unload message of Input plugins. commit be7dbc2c14e2670652c5d3fd31230e528d1f6597 Author: adnans Date: Sun Sep 2 11:39:16 2001 +0000 Unloads scope plugins when closing down. Also deletes the scopes node. commit 08ef97e88a13cd86dd04b704a970e999db26edfb Author: adnans Date: Sun Sep 2 11:08:53 2001 +0000 Removed qt subdir for now commit 39230e94c3d4394399e7f4841f17a4aea13dffbd Author: adnans Date: Sun Sep 2 11:04:28 2001 +0000 New toplevel .cvsignore file commit c1e5d9d797c305b6f6765eb4446e1bf7ed229b72 Author: adnans Date: Sun Sep 2 11:03:28 2001 +0000 Bumped up scope_plugin API version since there's a new handle entry in there. Support for actually unloading scope plugins is there (not used yet). Added support for Qt library detection (not used for now). commit a6f668bf0fb496a297fe1a5ced7370c34a5eebf9 Author: adnans Date: Sun Sep 2 10:52:50 2001 +0000 Missed these .cvsignore commit 9652dac91cd874f63a608decab73a1bd733ea629 Author: adnans Date: Sun Sep 2 10:43:05 2001 +0000 Added .cvsignore files. Thanks go to [Despair] commit 307304e6c6935e3ba55b2be0ac32633dcee895f9 Author: adnans Date: Sun Sep 2 09:10:18 2001 +0000 Changed printf text commit 0758f45bca41c2a58a838d985ceffb1a3a38cb03 Author: adnans Date: Sun Sep 2 01:26:37 2001 +0000 Increase resync frames from 3 to 4, hopefully more accurate sound output after a seek. commit 7ba6393e4b0c1698a26e4e8bd6925a6ad899d6b2 Author: adnans Date: Sat Sep 1 20:03:19 2001 +0000 Bumped up input plugin API to v5. Added a handle entry to the struct. We actually unload input plugins now :) commit dfefdb6d9ba153badd31d1987e70b7cc6e12f684 Author: adnans Date: Sat Sep 1 20:00:34 2001 +0000 Added UnregisterPlugins() call that actually unloads the input plugins the CorePlayer object is destroyed. Also made RegisterPlugin() a private member function. commit d892dc9f0dc0c88dd6473c41ad347f68d3e1101e Author: adnans Date: Sat Sep 1 19:59:48 2001 +0000 Added UnregisterPlugins() call that actually unloads the input plugins the CorePlayer object is destroyed. commit c97a8c60b7d8ba19d6b56bf10471ae794c1c4c18 Author: adnans Date: Sat Sep 1 19:58:39 2001 +0000 Cleaned up some code. Removed global volume parameter definitions. Add some error checking after new declerations. commit 6f3233f93833a90cb5ce4891ecbb47f753be7f9e Author: adnans Date: Fri Aug 31 03:16:30 2001 +0000 Removed printf from playlist window Changed volume scale in gladesrc commit 823b511d51a0b890affd9e2ddc8999ca932c74dd Author: adnans Date: Wed Aug 29 20:33:41 2001 +0000 Made the volume slider logarithmic commit f0a5a856e4c248ad6d395067475c2b9498468b7b Author: adnans Date: Wed Aug 29 11:15:34 2001 +0000 Renamed Get/SetMasterVolume() to Get/SetVolume() commit 204caef8b8686aac4fc6b1d16cd26f2c3f33d568 Author: adnans Date: Wed Aug 29 11:15:12 2001 +0000 Renamed Get/SetMasterVolume() to Get/SetVolume() Added documenting comment to a couple of member functions commit 7414d24916e325884c3cb8510179ce7952aa9661 Author: adnans Date: Wed Aug 29 10:36:18 2001 +0000 Must be generated after checkout wiht autoconf2.50 commit b7611ff4d9985756891e0976897dc804024ac2ce Author: adnans Date: Wed Aug 29 09:06:30 2001 +0000 Bumped up version number to alpha3 commit d3397941630a7f16a07617b90066d931720cb46e Author: adnans Date: Wed Aug 29 08:53:59 2001 +0000 Initial revision commit 246a4103ba3e93e5447a0ad72fdd0346f97f9c46 Author: (no author) <(no author)@d285aa52-1d29-0410-9d4c-b54c28f01bc6> Date: Wed Aug 29 08:53:59 2001 +0000 New repository initialized by cvs2svn. alsaplayer-0.99.82/ChangeLog.old000066400000000000000000001702051466261456500164130ustar00rootroot00000000000000Sat Jun 28 2014 Dominique Michel dominique.michel@vtxnet.ch app/ControlSocket.cpp: Fix seek and relative seek wrong time scale. Fixes: https://github.com/alsaplayer/alsaplayer/issues/4 interface/gtk2/gtk_interface.cpp: Add missing seconds duration display. extra/alsaplayer.desktop: Fix for flac MIME type. app/ControlSocket.cpp: Fix missing header, use system PATH_MAX. alsaplayer/CorePlayer.h: Add missing linux specific header. reader/http/http.c: Initialize host and path to NULL, avoiding double free with http. input/flac/FlacPlugin.cpp: Avoid const char to char conversion. app/Main.cpp: Fix long option. Thanks to piem Paul Brossier from Debian for these last 7 patches. AUTHORS: Add Erik de Castro Lopo. interface/gtk2/AboutDialog.cpp: Some updates. Wed Jun 27 2014 Dominique Michel dominique.michel@vtxnet.ch input/mikmod/mikmod_engine.c: Fix for files wrongly loaded as mikmod files. Thanks to Hermann Schwaerzler for reporting. Fixes: https://github.com/alsaplayer/alsaplayer/issues/9 app/Main.cpp: Fixed short and long option for --loopsong; changed to '-L'. Modified patch from Hermann Schwaerzler. app/Main.cpp: Added -S --shuffle remote option. Patch from Hermann Schwaerzler. app/Main.cpp: Change --looplist to a remote control option. Patch from Hermann Schwaerzler. app/Main.cpp: Change --looplist to a on/off switch. Modified patch from Herman Schwaerzler. Fixes: https://github.com/alsaplayer/alsaplayer/pull/8 app/Main.cpp: Change --loopsong to a remote control option and on/off switch. Updated the -h option. alsaplayer.1.in: updated man page. Wed dec 11 19:50:00 +0100 Dominique Michel dominique.michel@vtxnet.ch Updated TODO. Fixes: https://github.com/alsaplayer/alsaplayer/issues/2 Tue dec 03 2013 Dominique Michel dominique.michel@vtxnet.ch Fix for speed when pauding/unpausing from the console with JACK. Fixes: https://github.com/alsaplayer/alsaplayer/issues/1 2012-11-25 gettextize * m4/gettext.m4: Upgrade to gettext-0.18.1. * m4/iconv.m4: Upgrade to gettext-0.18.1. * m4/lib-ld.m4: Upgrade to gettext-0.18.1. * m4/lib-link.m4: Upgrade to gettext-0.18.1. * m4/lib-prefix.m4: Upgrade to gettext-0.18.1. * m4/nls.m4: Upgrade to gettext-0.18.1. * m4/po.m4: Upgrade to gettext-0.18.1. * m4/progtest.m4: Upgrade to gettext-0.18.1. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.18.1. Sat Mar 26 08:44:46 2011 +0100 Dominique Michel dominique.michel@vtxnet.ch patch from Patrick Shirkey Moves the entry in the playlist instead of duplicates them. Tue Mar 22 22:21:00 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com input/flac/FlacPlugin.cpp : Add frame_count() method. Tue Mar 22 22:20:28 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com input/mad/mad_engine.c : Remove debug. Tue Mar 22 22:10:55 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com Fix compiler warnings uncovered by new warning flags. Tue Mar 22 22:07:40 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com Fix compiler warnings uncovered by new warning flags. Tue Mar 22 20:23:16 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com Add frame_count() function to input_plugin struct. Tue Mar 22 20:20:59 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com configure.ac : Add more warning flags. Tue Mar 22 20:18:26 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com m4/add_*flags.m4 : Test new flags in isolation. Mon Mar 21 19:46:56 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com input/flac/FlacMetadataTag.cpp : Fix compiler warning. Mon Mar 21 19:44:41 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com configure.ac : When debug is enabled add -fstack-protect to CFLAGS. Sun Mar 20 15:17:54 2011 +0100 Dominique Michel dominique.michel@vtxnet.ch Added the last commits into the ChangeLog Sat Mar 19 21:49:30 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com Lift the actual alsaplayer code up a directory. Sat Mar 19 20:41:54 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com Move experimental fftscope midi and python dirs into attic. Sat Mar 19 19:48:52 2011 +1100 Erik de Castro Lopo erikd@mega-nerd.com Add .gitignore file. Sat Mar 19 07:21:03 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Fix two minor valgrind warnings. Sat Mar 19 07:12:42 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Make sure all AM_CFLAGS have @DFLAGS@. Sat Mar 19 03:49:45 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Fix compiler warnings. Sat Mar 19 01:52:40 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Change the way CFLAGS and CXXFLAGS are set up. Sat Mar 19 00:29:21 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Add m4 macros add_cflags.m4 and add_cxxflags.m4. Fri Mar 18 23:23:30 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 configure.ac : More cleanups. Fri Mar 18 22:45:46 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Silence doxygen output noise. Explicitly output doxygen warnings. Fri Mar 18 21:18:12 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Minor configure.ac tweaks. Fri Mar 18 20:52:11 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Fix compiler warnings. Fri Mar 18 11:33:36 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Clean up C string handling. Add functions ap_strlcpy() and ap_strlcat() and replace all instances of strcat/strcpy/strncat/strncpy. Fri Mar 18 09:32:06 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Replace #include of message.c with message.h. Also required having the alsaplayer app link to libalsaplayer.co. Fri Mar 18 07:04:56 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Remove deprecated OggFlac stuff. Wed Mar 16 10:04:14 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 interface/gtk2/gtk_interface.cpp : Fix compile issue arising from configure.ac changes. Tue Mar 15 11:15:26 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 configure.ac : Cleanup. Tue Mar 15 11:14:16 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 docs/reference.doxygen.in : Remove deprecated tags. Tue Mar 15 09:11:00 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Remove m4/audiofile.m4. Tue Mar 15 08:38:15 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Fix compiler warnings. Tue Mar 15 08:20:19 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 configure.ac : Insist on external gettext. Tue Mar 15 08:16:02 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Remove typecast on return value of malloc() in C code. Tue Mar 15 07:45:17 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/sndfile/sndfile_engine.c : Only handle FLAC if libsndfile has FLAC support. Tue Mar 15 07:33:34 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Replace more sprintfs with snprintf. Tue Mar 15 06:56:40 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Replace all uses of sprintf and snprintf. Tue Mar 15 06:28:18 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/vorbis/vorbis_engine.c : Fix compiler warning. Tue Mar 15 06:23:17 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Purge bundled gettext library in intl/ directory. Tue Mar 15 02:41:19 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/vorbis/vorbis_engine.c : Accept files with 'oga' extension. Mon Mar 14 09:04:26 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Terminology update. Change 'frame' to 'block' where appropriate. Alsaplayer used to use the work 'frame' to describe a block of N (N > 1) stereo sample pairs. The MPEG encoder/decoder and and speech related DSP algorithms also use 'frame' this way. However, Jack, Alsa, libsndfile, Apple's CoreAudio and others use the word 'frame' to describe the M samples (where M is the number of channels) that belong to the same sampling instance. With this change we leave change Alsaplayer to agree with Jack, Alsa etc. Sun Mar 13 21:41:41 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Remove input/mpg123/ directory. This code wasn't currently being used, doesn't compile and bundles what looks like a really old, hacked version of the mpg123 sources. We already have the mad MP3 decoder and after the changes to the internals are done, we can look at doing a MP3 input using libmpg123 instead. Sun Mar 13 15:54:40 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 TODO : Add new section at top of file. Sun Mar 13 10:24:05 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Rename output/alsa-final => output/alsa. Sun Mar 13 10:12:15 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Purge alsa-0.5 output plugin. Sat Mar 12 23:32:30 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 First step on the way to convert internal data format to float. Originally all audio data was passed aroung Alsaplayer using char* pointers even though the audio data was actually always 16 bit stereo PCM. This first step changes all the char* pointers to short*. Sat Mar 12 22:44:31 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 configure.ac : Remove left over audiofile cruft. Sat Mar 12 22:11:10 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/sndfile/sndfile_engine.c : Reject files with > 2 channels. Sat Mar 12 12:42:35 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/ : Prefer sndfile plugin over flac because sndfile handles 24 bit flac files. Sat Mar 12 12:35:58 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/sndfile/sndfile_engine.c : Reject all files starting with 'http://'. Sat Mar 12 10:23:25 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Remove redundant wav and audiofile plugins. Sat Mar 12 02:33:21 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/flac/FlacPlugin.cpp : FIx segfault when FLAC fails to open a file. Fri Mar 11 09:09:48 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/sndfile/sndfile_engine.c : Cleanup. Fri Mar 11 07:44:58 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 alsaplayer/output_plugin.h : Fix doxygen comment. Fri Mar 11 07:44:10 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 input/sndfile/sndfile_engine.c : Remove unused function getfilenamefrompath. Fri Mar 11 07:42:59 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 docs/reference.doxygen.in : Remove deprecated USE_WINDOWS_ENCODING. Sun Feb 6 21:00:13 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Remove old debugging cruft. Sat Jan 29 23:35:48 2011 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Fix compiler warnings in jack output plugin. No able to figure out how to force it to use jack so this is untested. Wed Nov 10 17:30:12 2010 +0000 dominique_libre dominique_libre@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Fix compilation failure on 64 bits systems with recent gcc versions Wed Nov 10 11:29:22 2010 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Add AM_SILENT_RULES to configure.ac. Wed Nov 10 11:26:35 2010 +0000 mega-nerd mega-nerd@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Fix bootstrap aclocal invocation. Tue Nov 9 22:46:45 2010 +0000 dominique_libre dominique_libre@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Erik de Castro Lopo: patch that remove the keyword from file headers, confuses Bzr Tue Nov 9 21:08:42 2010 +0000 dominique_libre dominique_libre@d285aa52-1d29-0410-9d4c-b54c28f01bc6 Erik de Castro Lopo: patch that fix automake warnings about underquoted macro names. Sun Nov 7 2010 -------------- * Applied a patch by Dominik Kuhlen that fix a lot of compilation warnings. * The same patch fix double-free errors after closing AP (start with a playlist, click shuffle and exit). * Updated the date into the About dialog. Wed Jul 29 2009 --------------- * A missing string: fixes compiling with libmikmod-3.2.0-beta2, Thanks to Has de Goede and Fedora. " Gcc: Restauring some optimisation CFLAGS Sun Jul 26 2009 --------------- * Cleaned up CFLAGS. * Add missong limit.h: fixes compiling with >=glibc-2.8 by Bernard Cafrelli. * Flac plugin; fix building with glibc 2.10+. * Id3tag configure option added, thanks to gentoo. Sat Mar 29 2008 --------------- * Updated the prefernece section and the speed description of the man page. Wed Dec 19 2007 --------------- * GÅ©nther Stibbe: 2 bug fixes in id3 tag support: - The last char in id3 tag was missing when a special charachter is in the tag. - If an id3 string is longer that the max, the \0 at the end of the string was missing. * Hans Fugal: preliminary fix for OSX: replaced include by . Wed Dec 5 2007 -------------- * Juuso Alasuutari: Fix getting JACK sample rate Sun Nov 18 2007 --------------- * Madej: Added initial systray icon function in gtk2. * configure: added --enable-systray and gtk2 test for systray (need gtk+-2.10). Sun Nov 4 2007 -------------- * Peter Lemenkov: - Renamed README.CVS to README.SVN and cleaned up README. - Save path of playing file for future use in CorePlayer. - Don't stop if we cannot find plugin->stream_info (prepare for future generic metadata parsing). - Fix memleak with path copying. - Moved stream_info structure from inout_object to its own header (we reuse it further). - Removed dead code - all sound fx (surround, downsampling etc) must be handled by specific plugins. - Another PATH_MAX substitution instead of mysterious 1024 - AlsaNode.h: No need to include bits from esound here. Sat Nov 3 2007 -------------- * alsaplayer.desktop: removed deprecated keys and fixed Version and MimeType keys. Removed the -E option in the Exec key. We don't need this X option anymore with the GTK2 interface. Mon Oct 29 2007 --------------- * Madej: fixed segfault with PLAY shortcut * Flacstream: change unsigned int to size_t applied to old API (from Debian) * Changed flac plugin version to reflete the name of the different flac versions * Updated config.sub & config.guess Wed Oct 11 2007 --------------- * Hubert Chan: Replaced GTK2 code in mad plugin by Glib2 code Mon Oct 8 2007 -------------- * Madej: fixed song title in title bar when unknow name * Fixed crash at startup with "main.default_interface=gtk" in AP config file * Fixed flac and oggflac test in configure Sun Oct 7 2007 -------------- * Fixed libmad in configure and added --enable-mad option * Removed obsolete gtk1 test in configure * Changed the echo statement about nls in configure * Madej: song title in title bar with preference option Sat Oct 6 2007 -------------- * Ryan Hill: fix man page spellning * More spellning fixes in the man page Sat Sep 29 2007 --------------- * Hubert Chan: Fixed loading of the gtk2 config file Sat Sep 8 2007 -------------- * Added a few words in the man page about Jack output Wed Sep 5 2007 -------------- " Updated Swedish translation from Lars Lindqvist " Fix for buffer overflow in vorbis input plugin from Erik Sjölund Sat Jul 14 2007 --------------- * Updated TODO Thu Jul 12 2007 --------------- * Changed exception in COPYING Mon Jul 9 2007 --------- * Peter Lemenkov: added necessary #defines for systems w/o PATH_MAX * Removed duplicated PATH_MAX stuff. Sun Jul 08 ---------- * Peter Lemenkov: Reorganized code for loading input modules (CorePlayer.cpp). We should test module before actual assignment. * Updated licence to GPL-v3 or later. * Changed numeric value for maximum lenght of pathname to standard macro definition when avaible. (Peter Lemenkov and Hubert Chan) Sat Jul 07 ---------- * Workaround by Hubert Chan when the album name is on multiple lines (cdda input plugin). Tue June 26 ----------- * Fixed typo in header of the german translation. * Initial swedish translation. Need work. * Removed wrong category in the desktop file. Added some MIME types. He validate now. Mon June 25 ----------- * Madej: updated polish translation. * Frank Baumgart: german translation. Sun June 24 ----------- * Madej: fixed icon when "don't start playing at startup" is selected in the preferences. * Moved interface/qt into trunk/experimental/obsolete. Sat June 23 ----------- * Removed Makefile.in files from the scopes2 tree. * Added French translation. * Moved GTK1 stuff out of the tree. " Main.cpp: Fixed help message and gtk2 launch at startup when no $DISPLAY. * Madej: Fixed segafult when closing a scope wondow. 2007-06-22 gettextize * Madej: * m4/gettext.m4: New file, from gettext-0.16.1. * m4/iconv.m4: New file, from gettext-0.16.1. * m4/lib-ld.m4: New file, from gettext-0.16.1. * m4/lib-link.m4: New file, from gettext-0.16.1. * m4/lib-prefix.m4: New file, from gettext-0.16.1. * m4/nls.m4: New file, from gettext-0.16.1. * m4/po.m4: New file, from gettext-0.16.1. * m4/progtest.m4: New file, from gettext-0.16.1. * m4/codeset.m4: New file, from gettext-0.16.1. * m4/glibc2.m4: New file, from gettext-0.16.1. * m4/glibc21.m4: New file, from gettext-0.16.1. * m4/intdiv0.m4: New file, from gettext-0.16.1. * m4/intl.m4: New file, from gettext-0.16.1. * m4/intldir.m4: New file, from gettext-0.16.1. * m4/intmax.m4: New file, from gettext-0.16.1. * m4/inttypes_h.m4: New file, from gettext-0.16.1. * m4/inttypes-pri.m4: New file, from gettext-0.16.1. * m4/lcmessage.m4: New file, from gettext-0.16.1. * m4/lock.m4: New file, from gettext-0.16.1. * m4/longdouble.m4: New file, from gettext-0.16.1. * m4/longlong.m4: New file, from gettext-0.16.1. * m4/printf-posix.m4: New file, from gettext-0.16.1. * m4/size_max.m4: New file, from gettext-0.16.1. * m4/stdint_h.m4: New file, from gettext-0.16.1. * m4/uintmax_t.m4: New file, from gettext-0.16.1. * m4/ulonglong.m4: New file, from gettext-0.16.1. * m4/visibility.m4: New file, from gettext-0.16.1. * m4/wchar_t.m4: New file, from gettext-0.16.1. * m4/wint_t.m4: New file, from gettext-0.16.1. * m4/xsize.m4: New file, from gettext-0.16.1. * m4/Makefile.am (EXTRA_DIST): Add the new files. * Makefile.am (SUBDIRS): Add intl, po. (ACLOCAL_AMFLAGS): New variable. (EXTRA_DIST): Add config.rpath. * configure.ac (AC_OUTPUT): Add intl/Makefile, po/Makefile.in. *Madej: fix for the play at start function. Wed June 20 2007 ---------------- * Removed EffectsWindow files and references as we don't use it. Mon June 18 2007 ---------------- * Madej: improved loop and looper buttons, Fri June 15 2007 ---------------- * Madej: Added don't close window checkbox in the addfile window. * Takashi Iwai: fixes the build of FLAC plugin on 64 bits. * Takashi Iwai: fixes possible buffer overflow due to typos for snprintf (Main.cpp). * Takashi Iwai: Fixes the possible buffer overflow in the cdda engine. * Madej: mad patch, add extended header support in mp3 files (utf-8, utf-16, utf-16be, iso-8859-1). * Madej: adds some new dialogs (which are not really in use yet), changes behaviour when we remove files, remove some warnings, fixes memory leak (must be still in gtk1), brings back insert button. * Madej: adds back folders prefs in gtk2. Wed June 13 2007 ---------------- * Madej: Added mute and center button, fixed drag and drop as well as an horrible crash when pressing Enter. Tue June 12 2007 ---------------- * Madej patch: GTK2, initial commit of a preferences window. * Peter Lemenkov: Removed old .cvsignore files. * Fixed horrible mistake in the desktop file. Mon June 11 2007 ---------------- * Added fflush function in daemon interface, fix bug 1052028. * Madej patch: initial drag and drop support in playlist (copy and move (with shift)). Sun June 10 2007 ---------------- * Madej: fixed Credits window to look better. * Removed unwanted wmclass from GTK2 and scopes2. * Madej: Added playlist height options in preferences. * Madej: Fix for quit function: it will save the prefs both when quiting from the title bar and the quit menu. Sat June 9 2007 --------------- * Madej patch: restore open file dialog on the play button when the playlist is empty; clicking on clear will stop playing; fixed some warnings. * Madej: fix strange speed behaviour when unpausing with jack and smooth transition; changed mouse wheel behaviour: scroll up with increase the volume or the speed, the balance will go to the right. Fri June 8 2007 --------------- * Madej patch: fix weird speed behaviour when resuming from pause with jack output. Thu June 7 2007 --------------- * Madej work: GTK2: the buttons use gtk themes. * Madej patch: Fix the volume awarness of the gtk2 interface. It will react correctly to volume change from the console. Wed June 6 2007 --------------- * CDDA engine: patch form Hubert Chan (Debian) that fix the CDDB support on port 888. Madej's html support on port 80 is left. * Madej: 2 patches that fix info display resizing with the font size. * Madej: sizes in config file, stop and play icons in playlist, infobox collor changing. Tue June 5 2007 --------------- * Madej patch: fix the speed awarness of the GTK2 interface. When the speed is changed from a console, 2 clicks on pause with resume playing at the last used speed. * One more from Madej: The playlist window schrink-expand with the playlist button. * Madej: Playlist is now in the main window. Mon June 4 2007 --------------- * New patch from Madej for GTK2: new info window. * Added wm class and ressource in blurscopes. Sun June 3 2007 --------------- * Madej: Added labels in the GTK2 interface, second loop function for songs and info window. * Madej: Fix for the cdda engine, cddb use html on port 80. Sat June 2 2007 --------------- * Updated/added the copyright and license information.. * Added filename description and preferences section in the man page. * Changed contact information. Please use "Dominique Michel" now. Fri June 1 2007 -------------- * Madej: lot of code cleaning on the GTK2 interface, about window, tooltips, main window can be resized, loop in playlist work * CDDA engine: removed directory in server name * Updated TODO list and AUTHORS Thu May 31 2007 --------------- * Madej patch: html handling in cdda_engine * Updated AUTHORS file Tue May 29 2007 --------------- * Updated TODO list Mon May 28 2007 --------------- * Fixed GTK2 version to GTK2+-2.8.0 in configure.ac * Updated TODO * Changed cddb_servername to the correct directory and cddb_serverport to 80 * New Madej patch: Added --disable-opengl configure option * Fixed keybindings missbehaviour and improved play button Sat May 26 2007 --------------- * Backported to gtk interface Madej's fix for AP crash with transparency support. * Changed the default cddb server to cddb.cddb.org * Changed default interface to gtk2. * Fixed the behaviour of the play button. It work now as explained in the man page. Fri May 25 2007 --------------- * Madej patch: added the same keybindins and loop function in gtk2 as in gtk. * Deleted non needed gui folder in gtk2 interface. * Removed obsolete gtk2 folder. * New Madej patch. Fixed Alsaplayer (gtk2) crash when transparency support is enabled in X. * Fixed return value in CbSetCurrent (gtk2 only issue). Thu May 24 2007 --------------- * The desktop file will launch the gtk2 interface. * New Madej patch: Add scopes support in the gtk2 interface. * Updated obsolete doxygen functions. * Madej patch: Lifting of the gtk2 interface. Wed May 23 2007 --------------- * Moved the existing and not working gtk2 interface in interface/gtk2obsolete * Committed a new and working gtk2 interface in interface/gtk2 This new interface was kindly provide by Madej from Poland. Tue May 22 2007 --------------- * Fixed the CFLAGS to use AM-CFLAGS Sat May 19 2007 --------------- * Updated config.guess and config.sub with latest savannah version. * Added missing include in app/CorePlayer so it will compile with never gcc and non gcc compilers. Thanks to Debian for this fix. * Applied Debian patch from Viktor Radnai and Paul Brossier. Add basic keyboard navigation (skip, pause, etc.), loop mode (looping inside a selection), pressing play button or key during playback return to the beginning of the song, speed changes one musical semitone a time using the keyboard (handy for changing the key the song is played back in). * Added keyboard shortcuts for speed +/- 1 comma (useful to tune the player when playing some musical instrument at the same time). * Updated the man page with those keyboard bindings. Tue Apr 24 2007 --------------- * Added Player fredesktop sub-category in alsaplayer.desktop. * Fixed the make system so at it will install alsaplayer.desktop. * Fixed a bug in the make system (docs/Makefile.am was looking for a wrong file with the uninstall process). Wed Apr 6 2007 -------------- * Added support for flac-1.1.3 and flac-1.1.4 in flac input plugin. Thanks to Jens Maurer for providing the patch. Modified the patch so at alsaplayer still will work well with older flac versions. Thu Mar 22 2007 --------------- * Fixed frame size with small wav files in app/CorePlayer.cpp. Thanks to Silvan Calarco for providing the fix. Wed Mar 02 2007 --------------- * Added a note about the correct use of the daemon interface in the man page. Tue Feb 13 2007 --------------- * Fixed thread in AlsaNode.cpp * Fixed output format in alsa-0.5 output plugin Wed Feb 9 2007 -------------- * A desktop file Thu Feb 1 2007 -------------- * Fixed Makefile to work with gtk gtk2 configure options. * Various importants security fixes commited by Debian for its distribution and for the alsaplayer. They include fixes in the http reader, the alsa output plugin, the ccda engine, for reading flac metada tags, for playing correctly mono audiofiles, fix in the text interface and the gtk interface, in the jack output plugin, in the main interface, and in the cdda engine. Those patches solve the vulnerabilities found by Luigy Auriemma (see http://secunia.com/advisories/21422/) * A new man page (Thanks to Debian). Fri Dec 5 21:41:50 CET 2003 ---------------------------- * Code cleanups * Fix for NPTL enabled systems (Redhat, Debian). * Fix for new ALSA driver release * Do not loop the playlist by default * Fix filename handling with percent signs * lower resource usage (RAM + CPU) for embedded target * VOLUME and PAN values are now FLOATS. Interface coders, take note!! * xosd interface: larger standard font * xosd interface: configurable font, timeout, hor/vert. offset and color Thu Apr 24 01:16:41 CEST 2003 ----------------------------- * Fix XING header parsing * Basic start/stop transport control support in JACK plugin * Playlist is set to looping by default * Add --pause parameter to pause/unpause a running player * Add --status parameter to dump some info about a session * Add --quit parameter to quit a session * Added support for ALSA's dmix device. Improved the alsa plugin. * Fixed a pretty silly bug in AlsaNode which caused crashing when adding multiple subscribers. * API Update: scope_plugin, init takes a pointer argument (not used yet) * API Update: input_plugin, stream_info structure expanded (not used yet) * API Update: output_plugin, set_buffer call. * Remove --background parameter, use & * Eliminate extra memcpy in streaming core * Remove static JACK mixbuffer. * Remove the confusing Load/Unload calls from CorePlayer. Open/Close now. * Made MAD plugin a bit more robust * Fix crashing bug when shoutcast/icecast stream is not in sync * Add _interface postfix to all interface plugin shared libraries * More warning fixes for gcc 3.3 * Fix a whole bunch of compiler warnings. * Remove deprecated JACK function call, requires jack 0.50.0 or higher now Thu Feb 6 06:49:35 CET 2003 ---------------------------- * New: Initial CDDB parsing for CDDA plugin (Anders) * New: xosd interface ("-i xosd") * New: lightweight ap-control program (see examples directory) to control alsaplayer operation * New API functions for randomizing and saving the current playlist * FLAC plugin converted to reader API (Drew) which means we can now also receive remote FLAC streams. * Shoutcast metadata handling. * OGG plugin also supports Icecast/Shoutcast streaming! * Add initial support for Icecast/Shoutcast streaming! * Support pls playlist loading (no metadata loading) * Add preliminary HTTP 302 redirect handling in http reader plugin * MAD plugin works correctly with non-seekable sources now * Text interface works much better now * --quiet mode disables progress bar in text mode interface * Improved ogg vorbis performance * New -E option, which replaces the queue in a running alsaplayer * New -c option, which lets you select a specific config file for use * New ap_jump_to() libalsaplayer function which allows jumping to specific playlist tracks. * New libalsaplayer functions for looping control * Fix playlist loading * Fix FLAC playback support * Fix crashing bug when fragment size was bigger than 16K * Fix timedisplay for none 44KHz OGG streams * NAS output plugin fixes Sun Dec 1 17:11:03 CET 2002 ---------------------------- * New --background parameter to put alsaplayer in the background at startup * Accept m3u (playlist) files on the command line * JACK output plugin fixes; use jack's samplerate, properly deactive before disconnecting from jack. * CDDA player now adds all tracks to the playlist, instead of playing the audio CD as one huge CD track. Idea from Patrick Shirkey. * Fix small reentrancy problem in CDDA plugin * Remove threading from Playlist::Insert(), it was causing too much trouble. * Bump up input_plugin version, change open() param for const char *path. Wed Sep 18 11:52:43 CEST 2002 ----------------------------- * Code cleanups * JACK related updates * commandline buffer overflow fixes. * libcurl dependancy remove, rewritten http/ftp reader. * New sndfile input plugin, not ready for production use, and does not use the reader API for now. * extended API; complete playlists may be loaded now * removed --enable-tophack. It just hid internal problems from the developers. Mon Jun 24 18:34:04 CEST 2002 ----------------------------- * MAD plugin converted to new reader plugin API. This also means we don't use mmap() any longer. Now also handles files with large ID3 tags better. * New reader plugin system by Evgeny. This brings in URI support i.e. you can now play directly from ftp and http sources (needs libcurl for now) * --enable-tophack switch to configure. This enables some code that fools (simple) CPU measuring tools like top into thinking AlsaPlayer is infinitely fast i.e. top will show that we use 0% CPU even with lots of scopes open and mp3's decoding! Whenever someone complains about AlsaPlayer CPU usage, just enable this and the problem will magically disappear *grin* * Keyboard shortcuts for playlist: Insert, Delete, Return, Left, Right keys. * List available interfaces and output plugins in help screen. * New callback API for CorePlayer so interfaces get notified when something happens. * New ap_add_and_play(), ap_get|set_volume|pan() calls for libalsaplayer * New info calls: ap_get_genre(), int ap_get_year(), ap_get_track_number() and ap_get_comment(). * Modify layout of playlist window buttons slightly Thu May 16 00:08:08 CEST 2002 ----------------------------- * JACK plugin is now a *real* plugin. Minor changes to the output plugin API to accommodate this. * Changes for latest JACK, at least 0.28.2 required now. * Add genre and album parsing in MAD plugin (Evgeny) * NEW FLAC input plugin by Drew Hess, FLAC details at http://flac.sf.net/ * Complete reimplentation of socket control API (libalsaplayer) This breaks all old libalsaplayer apps, fortunately there aren't that many right now. The new API is much more flexible. It is partly based on ideas from BeOS' (RIP) BMessage. * Parse XING headers so VBR mp3's get the correct time (finally! :) * Load input plugins only once * Check interface plugin version * Include prefs_free() call, should have been in the previous version * Force control socket to be read/write for the owner only * Fix crashing bug when old visual scopes were present. * Stop the mikmod plugin from crashing. This plugin was not reentrant, and it still isn't, not until libmikmod can handle multiple files simultaneously :( * Fix nasty NFS gotcha bug when attempting to mmap() files we don't have read permission for (bus error) Tue Apr 30 13:43:07 CEST 2002 ----------------------------- * Update included MAD files to 0.14b2. * Add -I interface for interfaces that want scripts (e.g. python interface) * Removed mpg123 based plugin from tarball. It will probably make a comeback as a (sample) standalone input plugin * Rewrote command line parsing, is much more flexible now. * libalsaplayer: Change ap_session_running() return values to 1 for "running" and 0 for "not running" * Round the total time calculation of mp3's upwards * Implement some more libalsaplayer commands (AP_GET_INT_SONG_LENGTH_SECOND) * Implement C interface for playlist interface subscription. It still uses some STL based datatypes for some parameters so the conversion is not total, just enough to not need pure virtual member functions. * Made the song scanning function more efficient. * Fix nasty bug with CDDA menu entry. * No playlist interface locking was done when playlist entries were removed. Mon Apr 8 14:41:39 CEST 2002 ----------------------------- * Song artist - title - time displaying in the playlist. * Allow multiple selections in playlist for easier deletes. * Found the real source of all the subtle deadlocks. We weren't acquiring locks in the same order all the time, a thinko. * Replace foreground color change with icon for active entry in playlist Mon Apr 1 03:06:08 CEST 2002 ----------------------------- * Unpause when going to Next/Prev song * Smooth speed transition, configurable with "gtk_interface.smooth_transition" in ~/.alsaplayer/config * Renamed cleanup to shutdown in input_plugin, bumped up version number * Bump up input plugin version number * Found another subtle playlist locking bug * Fixed huuge stack leak! * ID3 tag support in mad plugin, using libid3tag! * gtk+ playlist marks active entry * Renamed mad input plugin to mad_in * Added check for libmad, and use it if present instead of our own copy * Renamed 'include' -> 'alsaplayer' Tue Mar 19 00:08:04 CET 2002 ---------------------------- * Scopes will now remember their state * Added a section parameter to the prefs system * Changed behaviour of PLAY button in gtk interface * Fix MAD playback on big-endian machines. * Doubled the set_data and set_fft rate for smoother scope output * Changed fft data output slightly * New Blurscope and OpenGL Spectrum analyzer scopes, ported over from xmms * Retired fftscope and logfftscope scope plugins. They were just (bad) versions of logbarscope * Fix crashing bug when loading old scopes * Removed scope_open() call since it was never used. Also renamed scope_close() to scope_shutdown() to better reflect its intended function. Tue Mar 12 18:54:48 CET 2002 ---------------------------- * Fix bugs in external.cpp (libalsaplayer) * Remove global session limit * Add status field to stream_info in input plugin * Fix build problem for MAD plugin on non-x86 platforms * Remove ap_connect_session from public interface * Fixed GTK playlist insert bug * Fixed a bug in the AP_DO_PLAY remote command Fri Mar 8 21:28:05 CET 2002 ---------------------------- * Modified scope plugin interface, optional set_fft() call to scope. There is a global FFT calculation routine fso scopes can feed off this instead. Doing internal FFT is of course still possible, see synaescope. * Fix CDDA (CD) plugin to recognize "Track XX.cdda" files again * Make our jack output ports terminal. * alsaplayer will now remember the paths of the play, add, load and save dialogs whenever you sucessfully complete one of these actions (all paths default to / initially) * Removed Qt plugin since it was causing build problems for many folks. Will make it back, but as a separate plugin. Tue Feb 26 20:56:34 CET 2002 ---------------------------- * More improvements to libalsaplayer. pkg-config support * alsaplayer headers are also installed by default. First version that is really ready for external plugin development. * Preferences system, finally! The code is there, now we need to use it pervasively. The prefs system is also available to plugins of course. * More JACK improvements, we try to reconnect if we timeout. * configure flag --with-jack now works * The logfftscope does a fast to slow falldown, very subtle change. * The MAD plugin is now much smarter at detecting the correct start of MP3 files. * Placed the pause button inbetween the -100 and +100 speed buttons. Makes more sense since pause is speed 0. * Fix NAS detection and nas_set_buffer() function. * Some more cleanups to the code. Sat Feb 16 12:59:23 CET 2002 ---------------------------- * libalsaplayer becomes reality. Using this lib external programs are able to control an alsaplayer process (set speed, seek, etc) * Fix cdda build process * You can now select to which JACK ports alsaplayer (jackplayer) should connect to. * When using JACK exit cleanly if we timeout. * Code freeze turned out to be coding session :) Fri Feb 8 02:25:49 CET 2002 ---------------------------- * More jack related changes, sync up with latest CVS * Renamed libvorbis.so input plugin to libvorbis_in.so to prevent collision with the real libvorbis.so * Bumped up plugin version to 7 to stop old libvorbis from loading. Clean manually... * Code freeze for the next week or so since I want to document all the various plugin API's Mon Nov 26 22:57:36 CET 2001 ---------------------------- * Modified AlsaNode to output through JACK (jackit.sf.net). After successfull compile just start alsaplayer with -o jack, or make a symbolic link from "jackplayer" to the alsaplayer binary. For more information on JACK visit the website at http://jackit.sf.net * Added -x option to crossfade between songs. Note that fading is not done yet and that the cross time is not configurable. This feature is still in the "proof of concept" stage. * The scopes in the gtk interface plugin are now fed a fixed block of audio data instead of a single fragment. This greatly increases the quality of the scope display and the scopes will now work even if you have a fragment size of less than 1024 bytes. They also work fine when jack output is used. Thu Nov 1 14:53:23 CET 2001 ---------------------------- * Fix MAD input plugin to play MONO files correctly * Convert Monoscope to use indexed images * Changed interface_plugin API. interface_start() no longer has a CorePlayer parameter, instead the CorePlayer object is now part of the Playlist objects. * Converted the input plugins to compile as C++. This will allow greaters flexibility as to what can be done inside input plugins. * Updated Qt interface plugin (rikkus) * Add a dirty fix for the convolve_match routine called in Monoscope. Further investigation is still neded. * Renamed the cli (command line interface) to text * Various other tiny bug fixes Sun Oct 14 23:10:55 CEST 2001 ----------------------------- * Made alsa output plugin more flexible when setting sampling rate. This should fix startup failures on some audio cards * MAD plugin inclusion. * Add --enable-prefer-mad configure switch to load the MAD plugin over de mpg123 plugin for MP3. The MAD plugin doesn't do song info display yet so. * Lots of bug fixes Sat Sep 8 23:38:02 CEST 2001 ----------------------------- * Fixed another nasty threading bug. The scope windows never really joined since the wrong thread id value was passed * Modified the cli interface output slightly, better looking * Added a new menu pixmap button. This is less confusing. * Modified the scope window to be less confusing also. * Many small cleanups to the code to make some compilers complain less. * A new Qt interface plugin was added, courtesy Rik Hemsley. This plugin still needs work, lots of functionality is still missing, but it will improve. * Unload scope plugins at gtk interface exit. * Disabled convolve in Monoscope. The convolve function has a bug that overwrites some parts of memory, but it's subtle enough to not crash during runtime. It will be back once we figure out the exact nature of the bug. * Another bunch of autoconf fixes and cleanups. Tue Aug 28 11:16:15 CEST 2001 ----------------------------- * Interface plugins are reality! Woohoo :) * New gtk+ interface plugin (spaghetti code) * Crude command line interface plugin * Moved load_input_plugins inside the CorePlayer class, where it belongs * Cleaned up Playlist class * Removed many of the global variables * Modified CorePlayer class to do stream mixing. Multiple instances of CorePlayer are now possible in combination with reentrant plugins allow for simultaneous playback of multiple streams (with internal mixing). Wed Aug 22 11:17:20 CEST 2001 ----------------------------- * Fixed a nasty threading bug. The Playlist interface was updated without proper GDK locking. This caused an Xlib async when you had lots of things going on. * Fixed a crashing bug in GTK code. This bug was only reliably triggerable with Ximian's GTK package. If you've been getting GDK BadDrawable errors at startup, here is the fix! * Fixed OGG VORBIS mono playback. non 44KHZ stream might still have problems. Please report. * Lots of fixes in the configure script. * New --disable-mikmod configure option to disable mikmod plugin building * Added a close button to the playlist window Mon Aug 20 17:32:13 CEST 2001 ----------------------------- * NEW!! OGG VORBIS input plugin. Full speed control too! * Major restructuring of the configure script. Many packages were simply misdetected (nas, esd, audiofile) * Fixes for GCC 3.0. Everything should build with g++ 3.0 now Mon Aug 13 18:33:33 CEST 2001 ----------------------------- * Updated for latest ALSA CVS (0.9beta6) * New configure option --disable-gtk, to build without GUI code (defaults to --enable-gtk) * Minor bug fixes Mon Dec 11 02:31:34 CET 2000 ---------------------------- * Works with latest CVS 0.6.0 version (as of Dec 7). WILL NOT WORK WITH 0.5.x FOR NOW! * Removed -c/--card, introduced -d/--device to reflect the flexibilty of the new snd_pcm_open() call. Default value is "hw:0,0" for first device on first card (same as before) * Fixed MONO mp3 playback bug, should fix the "Frame too large" errors * Next release should have completely decoupled interface/gui * Fixed include problem in app/SampleBuffer.cpp Fri Apr 14 20:53:57 CEST 2000 ----------------------------- * Woah, has it been that long?! * New NAS (Network Audio System) output plugin by Erik Inge Bolsø * Esound output plugin should be included once again * Mini bug fixes Mon Nov 8 19:51:11 CET 1999 ---------------------------- * Fixed MONO mp3 bug, finally, for real! * More GUI separation code from Richard * Playlist code reworked almost completely (Richard) * Minor cleanups to the various scopes * Monoscope fixed, smooth again Sun Oct 10 00:46:03 CEST 1999 ----------------------------- * Added new alsa2 output plugin which adds suppor for the PCM v2 tree in the ALSA CVS repository Mon Oct 4 14:13:57 CEST 1999 ----------------------------- * Playlist fixes. Handles m3u files correctly. Saving a playlist will automatically append .m3u to it, if it's not there already. * Audiofile plugin is not build by default, it is only useful for WAV files right now and the dedicated WAV plugin does a better job anyway. * WAV plugin fixes, plays many more WAV variants. It does need a complete overhaul though. Soon * Eject button is in place. Functionality should be about right * Multiple file select! Yes, you can now add multiple files to the playlist in one go * Fixes to the configure.in process. Should work very well on SGI/Irix now * Fixed MP2 playback, whoops, forgot to add support after changing the input plugins to be pure C. * All input plugins are now pure C coded. This makes portability much simpler and also makes writing a plugin much easier. Support for shared memory areas will be looked at in the near future. This might be useful for multiple instances of a plugin. * The input plugin interface was expanded a bit. see input_plugin.h for details * Reorganized the source code layout. input, output and scopes directory are now directly under the root tree instead of in app relevant. * Offtopic: new mailing lists, thanks to Richard Boulton. And while we're off-topic, "The Matrix" DVD works flawlessly here, whoopee :) Wed Sep 29 20:26:03 CEST 1999 ----------------------------- * Will take songs from the command line vim /usr/s Sat Sep 25 11:47:16 CEST 1999 ----------------------------- * New NULL output plugin that simulates a soundcard. This allows you to experiment with the player even if you don't have auidio hardware. * The NULL plugin allowed me to debug all the scopes on Sparc hardware remotely. Fixed a longstanding bug in Spacescope and Stereoscope! * Cleaned up some gtk calls. It's getting clearer every day * Fixed a silly bug in AlsaDAC that prevented output plugin autoselection * Added 2 tiny icons to the interface that identify the balance and volume controls Wed Sep 8 15:38:00 CEST 1999 ----------------------------- * Fixed some bugs, cleaned up some code * Reintroduced the WAV plugin. You no longer need audiofile to play WAVs * Made the CDDA plugin compile only on Linux platforms * Removed the hard coded plugin names. Everything is now loaded dynamically Tue Aug 17 09:07:51 SRT 1999 ---------------------------- * Fixes to the source tree so it compiles for gcc 2.95. Thanks to everyone who sent in patches :) * NEW Synaescope! This is a port of Synaesthesia to the AlsaPlayer scope plugin architecture. Thanks Richard, it rocks! * Stereoscope returns, lets see if its more stable now. * Other cleanups to the code Sat Aug 14 18:37:07 SRT 1999 ---------------------------- * Fixed levelmeter and spacescope set_data functions. It should fix the problem on SGI and Sparc boxes * Added correct casting in several places to keep gcc 2.95+ happy Wed Aug 11 09:54:43 SRT 1999 ---------------------------- * Pause button now toggles between pause and play * UI changes, for the better I hope. I hacked in an Eject button but removed it again (the code is still there). Somehow I still think an "Eject" button is not right. File selection will improve soon so that should make it obsolete anyway. * Increased pitch range to 233% * Scope plugins are now loaded dynamically! Except for Monoscope and FFtscope which keep the fft and convolve routines linked in until that prob is resolved. * As a result of the dynamic scope plugins the stripped main binary is only about 150K now! Tue Jul 20 14:44:41 SRT 1999 ---------------------------- * Minor changes to the MikMod plugin Mon Jul 19 15:01:31 SRT 1999 ---------------------------- * Major changes in thread synchronization, using pthread_join() * Fixes for MikMod crashes * New experimental layout of main GUI * Updated audiofile library plugin to v0.2.1 Tue Jul 13 17:28:26 SRT 1999 ---------------------------- * Bumped the default SCOPE nice level to 15 (again). This makes a HUGE difference for slower machines. Performance should be much better now. Scopes should not suck up CPU cycles that are badly needed by the decoder and soundcard feader threads!! * Modifications to the audiofile library plugin, should work much better now, but we're not there yet * Added yet antoher incarnation of the FFTscope, this one is called the logFFTscope with a logarithmic X-axis (Petr Janecek) * Disabled the default reverb level in the MikMod plugin. This should dramatically decrease the CPU usage and actually improves the sound output. * Added genuine audiofile library detection for SGI boxes (Michael Pruett) * Fixed some crashing MikMod plugin bugs. Started looking at potential race conditions in the code. We should be save for now. * Removed the 50ms delay time before feeding the next song to the soundcard. This might have a negative effect on slow boxes (stuttering output at the start of the first song). Please report problems. Thu Jul 8 12:35:35 SRT 1999 ---------------------------- * Minor changes to the MikMod plugin. Requires libmikmod 3.1.7 now. * Modified time indicator to display "No time data" when there's none available (the plugin hasn't implemented it yet, etc..) Tue Jul 6 03:07:06 SRT 1999 ---------------------------- * New MikMod plugin from Paul Fisher. Thanks! AlsaPlayer can now do MODS, weehaa!! * Removed aplay plugin for now. It is cuasing a bit of trouble for other plugin coders and the code is really hackish anyway. * Also disabled the sterescope. It has been the source of crashing bugs on Sparc and selected x86/linux boxes. Have to figure out how/where. * Added audiofile plugin from Michael Preutt. Thanks! It still needs work though. This will perhaps replace the aplay entirely since audiofile supports many more formats. * Preparing code for the CVS tree * Added gtk_set_locale() call Thu Jul 1 11:21:30 CEST 1999 ----------------------------- * Bug fixes to the gtk+ code, delete_events were mishandled and that caused many unexplained segfaults when closing scope windows. * Improved monoscope and fft code * Removed 'active' icon in Scopes Window, it didn't work very well and I got too many 'bug' reports on it not working ;-] * New SGI audio library output plugin by Michael Pruett. He also discovered the gtk+ bugs. Thanks! MAJOR CHANGE: I switched to the new mpg123 0.59r code. This needs lots of testing. It seems to work ok on my x86 box. The nice thing is that I finally understand most of the mpg123 code that's getting called from the glue code. This also brings support for shoutcast/icecast a little closer (it's not here yet!!). There are some internal changes needed to support 'streaming' media. Support for 3DNOW ccelleration is now also a possibility. Now, who wants to make libmpg123 reentrant? :) Sun Jun 27 20:15:26 CEST 1999 ----------------------------- * fft lib thread-safe fixes from Richard Boulton * Modified Monoscope by Ralph Loader! Cool stuff * New FFTscope II!, modified FFTscope with few bars and fall-off * Minor changes in the engine Fri Jun 25 17:59:09 CEST 1999 ----------------------------- * Fixed some configure.in bugs * NEW! UltraSparc native output addon!!! Thu Jun 24 13:12:06 CEST 1999 ----------------------------- * New FFTscope implementation by Richard Boulton! Many thanks! * Fixed spacescope hanging in 8-bit mode, thanks Fice :) * Replaced redundant code in scopes with MACRO Thu Jun 24 00:23:31 CEST 1999 ----------------------------- * Output plugins are now compiled using plain C. C++ compilation was not needed and automake was screwing up with conditional compiles * Major configure work. The configure process should now build all configurable output modules (ALSA, OSS and ESD). * New -o,--ouput switch to select the output method to use Mon Jun 21 14:40:08 CEST 1999 ----------------------------- * Important performance bug fixed. An extra memset in the (tight) soundcard loop was not needed at all. This should really help especially for low latency playback! * Put the indicator callback update in a thread. I don't trust the gtk+ timeout system. I keep wondering which commercial company will use gtk+ for their apps?! * Fixed ALSA scope synchro bug Sat Jun 19 22:17:13 CEST 1999 ----------------------------- * Yes! Input and output plugins are now loaded dynamically! This means you will have to do a 'make install' to copy the files to the right location. Future versions will allow for custom plugin paths and more flexibility. * Changed the font of the main window * Added another function the output_plugin structure: get_latency() * returns the latency introduced by the hardware * The scopes should be synced with music using esound (0.2.12) now * Bug fixes, and bug additions no doubt * Selecting something in the "Play File" dialog closes the dialog Fri Jun 18 00:06:29 CEST 1999 ----------------------------- * Weeh! stupid bug in Playlist.cpp. The playlist loader couldn't handle paths with spaces in them. Fixed. * Some instability for mp3 playback under Solaris. Needs more investigation. Fixed up some code, but that's not the main prob. Wed Jun 16 15:44:19 CEST 1999 ----------------------------- * Delete dac object at program exit * Added functionality to load/save buttons in playlist window * Internal changes/cleanups * Added 2 new functions to input_plugin struct: nr_tracks() * return number of tracks in stream track_seek() * seek to a track * Many changes in the various input plugins, all except the mpg123 plugin should be ready for multi open. the mpg123 plugin needs a lot of work since the decoder itself is not reentrant. I hear xaudio is, and perhaps the skysound also. I'll be working on plugin docs sometime this summer. * Upped ringbuffer fragment count from 20 to 44. This uses more memory but buffers a lot more data in RAM for playback (see app/CorePlayer.h) * plugin->close(obj) is now called only once, as it should * RESYNC_FRAMES is now 3 in mpg123 plugin, should make reverse playback a wee bit faster :) * squashed some more bugs * ID3 tag info is displayed in the main window (when present) Mon Jun 7 10:30:30 CEST 1999 ----------------------------- * Optimized display info output. Fields are only redrawn if their text has changed. The update frequency has als been bought down from 10HZ to 5HZ * Added check for snd_pcm_t / void handles so it compiles with older versions of alsa-lib * Disabled the usleep() hack in ALSAOutput.cpp, produces crackles. I'm almost 100% sure this is an ALSA bug. Sun Jun 6 11:16:57 MEST 1999 ----------------------------- Some small bug fixes. First public f.n. release Tue May 11 09:35:23 CEST 1999 ----------------------------- Woah, what is it with all these gaping holes in the Changelog file? Frankly I'm still a horrible documenter. Bug fixes: * Last (partial) ringbuffer partition is also played. It was being skipped earlier since it was marked empty. pcm_worker() does the right thing now * Fixed a bug where the player would sometimes do a CPU hogging loop on MP3 streams with garbage at the start. There was already some code in mpg123 to strip this crap out but the read_frame_init() function was not called at the start of each new stream. Happens when you don't bother checking what use a function is :) * Fixed some potential divide by zero errors. * Added some more 'check pointer for NULL before using it' code * Fixed a bug in the audio data buffering code. Still wondering when that cast from void* to int* made it in there (I hear that's bad practice) * Cleaned up the CorePlayer class. Not sure if I need to abstract it more * Cleaned up some stale code in the scopes. Plugification still needs to be done for scopes btw * Cast sum to (short) in app/mpg123/decode_4to1.c WRITE_SAMPLE(...) * Cast sum to (short) in app/mpg123/decode_2to1.c WRITE_SAMPLE(...) * Cast sum to (short) in app/mpg123/decode_ntom.c WRITE_SAMPLE(...) * More configure.in hacking. The player should compile on Solaris/UltraSparc * Added an --enable-debug switch for -DDEBUG and -g * Check for esd only if we compile for esd output New: * CD button. When pressed should start playing your AUDIO CD in /dev/cdrom * Experimental 8-bit WAV support, thanks to Tkil for the algorithm * Parameters at startup! Available options: -h,--help print this help message -f,--fragsize # fragment size in bytes [default=4096] -g,--fragcount # fragment count [default=8] -c,--card # use card number [default=0] -n,--nogui start in command line mode -q,--quiet quiet operation. no output -v,--version print version of this program * NOGUI mode. Yes, you can now use the player in your scripts. Controls are still missing though (I'm trying to learn Python. *hint hint*) * Doesn't do subsecond display by default. Thu Apr 15 15:02:34 CEST 1999 ----------------------------- Keeping track of what I'm hacking is not something I do often. But here goes: Many (many!) changes to the internal structures of the player. The plugin system should be very solid now. It only took me about 1 hour to write a CDDA plugin, and most of it was cutting and pasting stuff and getting to know the ioctl CD interface. New: * CDDA plugin for true CD Digital Audio playback! You get speed (pitch) control for free too! Thu Mar 4 11:57:12 CET 1999 ---------------------------- Fixes: * Cleanup of automake builds. Distrubtions can now be build by simply doing a 'make dist' in the source tree, cool! Automatically fixed the .deps/ inclusion prob! * Started serious thinking about the marshaller thread. This is the main reason there is no function playlist yet. Since the program is threaded we can't use simple function calls in some places, messaging is needed. MAJOR CHANGE: I switched from the old (and buggy) amp mpeg decoding engine to mpg123. This makes the whole player about 10x more stable since mpg123 has very robust error correction (compared to amp, which had none :). The speed is about the same with full optimization. It also looks like the floating point exceptions that were occuring were happening inside the amp engine, woohoo! And of course mpg123 has a much clearer license than amp... *Psyched* Mon Mar 1 07:39:02 CET 1999 ---------------------------- Fixes: * Cleanups everywhere, restructuring of code * I finally sat down and figured out how autoconf works. So from now on compiling should be as easy as running configure and make (yeah right) * packed up a pr3 release, still only really interesting to C coders or real enthousiasts Thu Feb 18 00:19:23 CET 1999 ---------------------------- Fixes: * Started logging changes into a Changelog * Massive cleanups everywhere, most code gets throught the -Wall test The GLADE code is the only part that produces minor warnings. Standard flag in the Makefile now * Finally (finally!) got the buffering code right (crossing fingers). It turns out there was way too much (and incorrect) locking done on various datastructures. The only mutex that survived was the counter_mutex. The producer functions blocks on this mutex as soon as there are enough buffers ready for the consumer. The consumers unblocks the producer as soon as its starts consuming the next block. * Fixed a nasty bug where consumer could start reading a buffer that was being written to by the producer! The solution was very simple. Since we don't really care about a missed buffer read that much we just return an empty PCM block if there are currently no buffers available. The reason why we don't care is because this case is very rare in normal day use. This is a simple and elegant solution. This should also fix the race condition (a real life one!) which occured sometimes (the producer would start producing at full CPU speed never blocking untill it ran out of st(r)eam. * Made the playlist do something. gtk_object_set_data() rocks! * Tidying up for PR3 release * Threaded file/directory loading in playlist (directory recursion is done in a separate thread) * Minor GUI updates * Scope threads now die when closing their window ??? Jan 24 00:00:00 CET 1999 ---------------------------- * Somewhat usable now * Fixed loads of race conditions/threading issues * Implemented all scopes for 8-, 16- and 32-bit X displays * Added more threading (each scope runs in its own thread) * Functional FX and SCOPES button * Software volume and balance controls (leaves the hardware mixer alone) * Minor GUI redesign (glade is ok) * Double buffered counters * Further design on Playlist layout (it's *NOT* working yet) * Minor code cleanups, still very hackish/ugly Earlier additions ----------------- * The base code was started on in August 1998, with on and off coding. Various redesigns and new ideas were implemnted/scrapped/reimplemented * A semi working player core appeared at the end of 1998. * Coding on my BeOS player BeMP has virtually stopped, there are no more challenges to it. I haven't even bothered porting it to R4 (maybe to R4.5) since BeOS boots are few and far apart. UPDATE: Well, after 3 more years of lingering Be, Inc. finally sold its assets to Palm in 2001. Thanks for the experience Be! alsaplayer-0.99.82/Dockerfile000066400000000000000000000004651466261456500160560ustar00rootroot00000000000000FROM ubuntu:latest AS builder RUN apt-get update && apt-get -y install build-essential intltool libtool m4 automake RUN apt-get -y install libjack-dev RUN apt-get -y install libglib2.0-dev RUN apt-get -y install libgtk2.0-dev WORKDIR /src/alsaplayer COPY . . RUN ./autogen.sh RUN ./configure RUN make install alsaplayer-0.99.82/INSTALL000066400000000000000000000033251466261456500151130ustar00rootroot00000000000000Installation should be as simple as doing a ./configure;make install Use ./configure --prefix=/path/to/install to change the default install location of /usr/local. I install alsaplayer in my /opt tree so I configure it as follows: ./configure --prefix=/opt The alsaplayer binary will then be placed in /opt/bin after the make install. (it is in /usr/local/bin by default). For a complete list of configure options run the configure script with --help If you have questions about the install phase feel free to email me at: dominique@tuxfamily.org GTK2 interface ============== In order to get AlsaPlayer's GTK2 interface, gtk+ >= 2.8.0 must be installed in your system with its devel package. For the systray icon to be compiled in, gtk+ >= 2.10 is required and you must run configure with --enable-systray. When closing and re-opening the playlist window, you can get the default size as defined in the source code instead of the last used size. This is a bug in gtk+, not in alsaplayer. It have been fixed in gtk+-2.12. Installing from CVS =================== If you have a copy of alsaplayer checked out from the CVS, you should run the bootstrap script to create the autogenerated files. After this step you should run configure, and then run make to compile it. Installing over an existing version =================================== Since the various plugin API's are still in flux it might be that newer versions plugins are not compatible with the versions you have currently installed. It is therefore best to erase everything under ${prefix}/lib/alsaplayer (i.e. /usr/local/lib/alsaplayer) if you get errors about invalid versions. If AlsaPlayer exits prematurely with signal 7 (Bus error) the above might also help. alsaplayer-0.99.82/Makefile.am000066400000000000000000000004601466261456500161130ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign SUBDIRS = po libalsaplayer interface output input app alsaplayer extra docs \ examples m4 reader scopes2 EXTRA_DIST = config.rpath autogen.sh alsaplayer.spec pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = alsaplayer.pc man_MANS = alsaplayer.1 ACLOCAL_AMFLAGS = -I m4 alsaplayer-0.99.82/README.md000066400000000000000000000110351466261456500153360ustar00rootroot00000000000000# AlsaPlayer - PCM audio player for Linux and compatible OSes Original version written by Andy Lo A Foe (andy@loafoe.nl) GZK2 interface written by Madej from Poland. Contributions from many other peoples. See the AUTHORS file for details. ## DESCRIPTION AlsaPlayer is a PCM player developed on the Linux Operating System. Since the first public beta release it support has been added for various other Operating Systems (mostly Unix variants). AlsaPlayer was written in the first place to excercise the new ALSA (Advanced Linux Sound Architecture) driver and library system. ## INTERFACE PLUGINS This cool feature allows you to completely customize your user interface. I.e. the core of AlsaPlayer is decoupled from the user interface. The default GTK2 interface is the best supported one. Among others, there is also a text only interface. ## INPUT PLUGINS The program is very much plugin based. New file formats can be added simply by writing a new input plugin. The only requirement is that the data can be presented in PCM audio format.The following plugins are in various states of usability: - OGG vorbis plugin, works flawlessly, uses the ogg/vorbis libs http://www.vorbis.com/ - MPEG audio plugin, based on mpg123 0.59r, works quite well, being phased out however for: - MAD based audio plugin, based on the new MAD MPEG decoder library, uses a tiny bit more CPU, but has much better output quality then mpg123. http://www.mars.org/home/rob/proj/mpeg/ - CDDA plugin, play back audio CD's by ripping the data digitally off the disk - MikMod plugin, play back all MikMod supported module formats, no random seeking in modules yet. http://www.mikmod.org/ - Audiofile library plugin, this one needs a bit of work still http://oss.sgi.com/projects/audiofile/ - FLAC (including OggFLAC) plugin with support for FLAC >= 1.3. ## OUTPUT PLUGINS AlsaPlayer also uses a plugin system for outputting audio data. The output mechanism was designed with ALSA in mind of course. Many other Unix audio systems map quite well on to it however. Supported output plugins include: - ALSA, default plugin, best supported. - OSS and OSS/Lite - Esound - Sparc (tested on UltraSparc) - SGI - JACK, http://jackit.sf.net, this plugin is actually built-in since its differs radically from all the others. It is callback based. This is my preferred output method these days. The underlying audio driver is ALSA. ## SCOPE PLUGINS Just as input and output support gets loaded in dynamically, scope (or visualization) plugins are laoded in dynamically also. This enables anyone to develop a visualization plugin without changing a single line of code in the main program. A few scope plugins are provided in the main alsaplayer distribution: - Monoscope - Spacescope - Levelmeter - Blurscope - OpenGL spectrum - logFFtscope Nothing stops you from writing a kick ass *FULLSCREEN* (DGA) or even a *Hardwarde Accellerated OpenGL* visualization plugin for AlsaPlayer! ## EFFECTS PLUGINS Work in progress... ## SCOKET CONTROL AlsaPlayer can be controlled from an external program. You only need to link your application against the supplied libalsaplayer.so and in order to control AlsaPlayer from your own applications. Seeking, speed control and playlist advancement are only a few of the commands available to you. See the "examples" directory for sample implementations. ## INSTALLATION Installing AlsaPlayer from source should be as easy as executing the configure script and then make. The configure script will try to detect all input and output plugins for your system. *IMPORTANT*: Make sure you run 'make install' after the compilation is finished. The various plugins need to be in a specific place on your system. If you don't want to install it on your system right away you can always use a different --prefix when running configure. ## EMBEDDED MODE For target systems with low CPU and RAM ressources you can run configure with "CFLAGS=-DEMBEDDED". This reduces CPU and RAM usage but imposes the following limitations: - no mixing of streams; single-stream only - no software volume/pan (hardware volume/pan unaffected) - no effect plugins ## RUNNING Just fire up the executable. You can pass files to play on the command line too. These will be added to the queue while the first entry will start playing automatically. The CD like button hides the menu. All other controls should be straight forward. Improvements to the interface will follow soon. ## OTHER INFO - WWW Page : http://alsaplayer.sourceforge.net/ - Original author, Email : - Administrator, Email: alsaplayer-0.99.82/TODO000066400000000000000000000066451466261456500145620ustar00rootroot00000000000000TODO list (March 2011, Erik de Castro Lopo) - Check that malloc result isn't cast. - Remove #Include "message.c" from app/Main.cpp - Check all usage of strncpy, strcpy, strcat etc. - Switch to float as internal data format. - Clean up input/output/etc plugin APIs. - Improve interpolation quality of varispeed. - Clean out GTK+/Glib 1.x cruft. - Add streaming support for all plugins. - Look into using libmagic to determing file types. - Improve the can_handle() function of all input plugins. - Accept audio files as well as playlists in the file open dialog. User request: ------------- Add support for multi-channel audio files. This will probably require substantial rewriting. Some voluteer? If so, add you in the TODO list. Old TODO list follows. These have not necessarily been dropped. -------------------------------------------------------------------------------- TODO list (2007 June 23) - The gtk2 interface is in fast progress. It provide the same level of functionality as the gtk1 one and more is under development. A big thanks to Madej for his work on this interface. * sound quality improvements: - convert all internal sound representation to 32 bits floats and convert back to int for alsa (doing that globally will be the easiest way). - use libsamplerate for resampling (pref option for quality). - sndfile input plugin reduce everything to 16 bits. Floating point wav files produce silence (such as Ardour generated files). Fix it. * Other important things to do: - Modify threading to use conditional wait; more portable - global: move libalsaplayer to a standalone application with unix-sockets or TCP- (UDP-?) based interface. This will include (list of ideas at that time): - Adding TCP-based control module in parallel with unix-socket based one. - Separating libalsaplayer and checking for crossplatform-readiness. - Separating all the interfaces. - gtk2: traslation in more languages; check the actual translations. - flac: check the Makefile. With flac>= 1.3, the oggflac test is not needed. Maybe separate the flac>1.3 patch into separated files. - flac: stream support. - scope plugins: option to scale some of the scopes (at least Synaescope) at full screen or double size. (double size will be faster and easier to implement). - Check if the MIME types in the desktop file are correct. - freedesktop icon. - cddb: fix the multiple DTITLE line so at both lines are displayed and not only the first one as now. - cddb: Switch from C-style string to C++ style coding should help eliminate buffer overflow. Maybe adapt xine support or use http://libcddb.sourceforge.net - check for possible buffer overflows in CorePlayer. - Change the default playlist drag and drop to LMB=>move and LMB+shift=copy - Improve the input plugins in trunk/experimental in order to merge them into AP (at least those compatible with the GPL). - gtk2: playlist prints "Unknown" and the filename for untagged files. Print the last 2 folder names in the path so at the user can use */Author/Album/file for such files. Know bugs: - fix the quiet option, see http://bugs.debian.org/cgi-bin/bug-report.cgi?bug=412112 Old TODO list order according to priority, highest first - Write proper documentation for the plugin APIs - Complete default interface redesign - Proper CD player controls - Skin support (only the main window) - Remember position when saving playlists - accomplish suitability for small/embedded systems (Frank Baumgart) alsaplayer-0.99.82/alsaplayer.1.in000066400000000000000000000247311466261456500167120ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH ALSAPLAYER 1 "29 March 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME alsaplayer \- plays various sound files .SH SYNOPSIS .B alsaplayer .RI [ options ] " " [ " filename ..." ] .SH DESCRIPTION This manual page documents briefly the .B alsaplayer command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invoke bold face and italics, .\" respectively. \fBalsaplayer\fP is a generic music player that can play back a large amount of file formats. .PP If files are specified on the command line, these files are played. Otherwise alsaplayer plays its playlist from its last run, if any. .SH FILENAME Play the specified file(s). Can be a file or an URL. .TP .B CD.cdda Special filename. Play a CD. /dev/cdrom will be used by default. Otherwise, AlsaPlayer will use the device specified in your config file (usually ~/.alsaplayer/config). .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .B \-c, \-\-config Use the given config file for this session. .TP .B \-h, \-\-help Print this help message. .TP .B \-i, \-\-interface Use the specified interface instead of the default one. .TP .B \-I, \-\-script Specify the script to pass to the interface plugin. .TP .B \-l, \-\-startvolume Start with this volume [default=1.0]. .TP .B \-p, \-\-path Set the path alsaplayer looks for add-ons. .TP .B \-q, \-\-quiet Quiet operation, no output. .TP .B \-s, \-\-session-name name Name this session "name" .TP .B \-v, \-\-version Print version of this program. .TP .B \-\-verbose Be verbose about the output. .TP .B \-\-nosave Do not save playlist content at exit. .SS Player control: .TP .B \-n, \-\-session # Select session # [default=0] .TP .B \-e, \-\-enqueue file(s) Enqueue file(s) in a running alsaplayer. .TP .B \-E, \-\-replace file(s) Clears and queues file(s) in a running alsaplayer. .TP .B \-\-status Get some information about the session. .TP .B \-\-volume # Set software volume [0.0-1.0]. .TP .B \-\-start Start playing. .TP .B \-\-stop Stop playing. .TP .B \-\-pause Pause/unpause playing. .TP .B \-\-prev Jump to the previous track. .TP .B \-\-next Jump to the next track. .TP .B \-\-seek Jump to the specified second in the current track. .TP .B \-\-relative Jump seconds from current position. .TP .B \-\-speed Set the playback speed with -10 <= <= 10. 1.0 = normal speed, -1.0 = normal speed backwards. Be aware that alsaplayer respect your LOCALE. That implies that the decimal point will vary accordingly. I.e., with french LOCALE, a valid speed value is 1,5 and not 1.5. .TP .B \-\-jump # Jump to the specified playlist track. .TP .B \-\-loopsong Switch file looping on or off [default off]. .TP .B \-\-looplist Switch playlist looping on or off [default off]. .TP .B \-S, \-\-shuffle Shuffle the playlist .TP .B \-\-clear Clear the whole playlist .TP .B \-\-quit Quit the session. .SS Sound driver options: .TP .B \-d, \-\-device string Select the specific device for the output plugin. For the ALSA plugin, the default is "default". For the JACK plugin, the default is "alsa_pcm:playback_1,alsa_pcm:playback_2". .TP .B \-f, \-\-fragsize # Set fragment size in bytes [default=4096]. .TP .B \-F, \-\-frequency # Set the output frequency [default=44100]. .TP .B \-g, \-\-fragcount # Fragment count [default=8]. .TP .B \-r, \-\-realtime Enable realtime scheduling. To use this as a normal user, alsaplayer must be SUID root. .TP .B \-o, \-\-output [alsa|esound|jack|nas|null|oss|sgi|sparc] Use the specified output driver. .SS Experimental options: .TP .B \-x,\-\-crossfade Crossfade playlist entries. .SH JACK OUTPUT PLUGIN For use with JACK, -F is mandatory for best results. The value of sample rate must be the same as the one used by jackd. .TP If you forget the -F parameter, the sound can be very bad. The only remedy at that time is to restart both jackd and AlsaPlayer. .SH DAEMON INTERFACE With the daemon interface, it is mandatory to add the -s option. You must process in two steps to get sound with it. First launch the daemon: .TP .B alsaplayer -i daemon -s .TP and then add some song: .TP .B alsaplayer -e .SH GTK+ INTERFACE The gtk+ interface provide some basic keyboard controls: .TP .B v Stop .TP .B x Play .TP .B c Pause .TP .B b Next Song .TP .B z Previous Song .TP .B g Seek Forward .TP .B a Seek Backward .TP .B f Forward Play .TP .B s Reverse Play .TP .B t Speed Up one musical semitone. (handy for changing the key the song is played back in) .TP .B q Speed Down one musical semitone. .TP .B h Speed Up one comma. (handy to tune the song instead of the guitar when playing at the same time as listening) .TP .B i Speed Down one comma. .TP .B r Volume Up .TP .B w Volume Down .TP .B l Loop .SH PREFERENCES AlsaPlayer have a preferences file located in ~/.alsaplayer/config. To modify the preferences setting by hand, you must exit from the running program and edit this file. The default value is put in the description below when appropriate: .SS General settings .TP .B main.default_interface=gtk2 Specify the default interface. .TP .B main.default_output=alsa Specify the default sound server. .TP .B main.multiopen=true Specify if it is possible to run multiple AlsaPlayer instances. .TP .B main.period_count=8 Number of periods in the sound buffer .TP .B main.period_size=4096 Frames per period in the sound buffer .TP .B main.play_on_start=false Start playing at launch time .SS Output settings .TP .B jack.output1=alsa_pcm:playback_1 Output device 1 when using JACK sound server .TP .B jack.output2=alsa_pcm:playback_2 Output device 2 when using JACK sound server .SS Input settings .TP .B cdda.cddb_servername=freedb.freedb.org Server used by the cdda input module to retrieve the cddb information. .TP .B cdda.cddb_serverport=80 Port used by the cdda input module to retrieve the cddb information. .TP .B cdda.device=/dev/cdrom Device used by the cdda input module to retrieve the CD. .TP .B cdda.do_cddb_lookup=true Must AlsaPlayer retrieve or not the cddb information. .TP .B http.buffer_size=1048576 Size of the input buffer when is an URL. .TP .B mad.parse_id3=true Parse or not the Id3 tags. .SS GTK+ interface settings .TP .B gtk2_interface.background_colour=#000000 Default background color of the interface. The playlist windows will use the background color from your gtk+ theme. .TP .B gtk2_interface.default_play_path=~/ Default path used by the Add file function .TP .B gtk2_interface.default_playlist_add_path=/ Default path used by the Add file function in the Playlist window .TP .B gtk2_interface.default_playlist_load_path=/ Default path used by the Load playlist function .TP .B gtk2_interface.default_playlist_save_path=/ Default path used by the Save playlist function .TP .B gtk2_interface.font_colour=#ffffff Default font color of the interface. The playlist windows will use the font color from your gtk+ theme. .TP .B gtk2_interface_font= Default font of the interface. The playlist windows will use the font from your gtk+ theme. The main window will also use that font if none is specified. .TP .B gtk2_interface.height=118 Default height of the interface. .TP .B gtk2_interface.loop=0 Start in loop mode. .TP .B gtk2_interface.play_on_add=false Jump playing to a new song when added. .TP .B gtk2_interface.play_on_title=false Show song title in title bar. .TP .B gtk2_interface.playlist_active=false Launch or not the playlist window at start up. .TP .B gtk2_interface.playlist_height=0 Default height of the playlist window. This value combined with the defaukt value of gtk2_interface.height correspond to no visible playlist. .TP .B gtk2_interface.sopeswindow_active=false Launch or not the scopes selector window at start up. .TP .B gtk2_interface.smooth_transition=false Will functions such as pause use a smooth speed transition. .TP .B gtk2_interface.width=529 Width of the interface. .SS XOSD interface settings .TP .B xosd_interface.color=#55ff55 Colour used by the XOSD interface. .TP .B xosd_interface.outline_color=black Colour used by the XOSD interface outline. Colors can be specified using hexadecimal notation prefixed by #, or by their name as in the file rgb.txt from your X11 distribution. .TP .B xosd_interface.font=-adobe-helvetica-medium-r-normal-*-24-*-*-*-*-*-*-* .TP .B xosd_interface.shadow=1 Shadow offset .TP .B xosd_interface.outline_offset=1 Wide of the outline .TP .B xosd_interface.h_offset=20 Display horizontal offset from the left of the screen .TP .B xosd_interface.timeout=5 Set the display time. .TP .B xosd_interface.v_offset=20 Display vertical offset from the top of the screen .SS Scopes settings .TP .B blurscope.active=false Launch or not the blurscope plugin at start up. .TP .B fftscope.active=false Launch or not the fftscope plugin at start up. .TP .B levelmeter.active=false Launch or not the levelmeter scope plugin at start up. .TP .B logbarfft.active=false Launch or not the logbar scope plugin at start up. .TP .B monoscope.active=false Launch or not the monoscope scope plugin at start up. .TP .B opengl_spectrum.active=false Launch or not the spectrumgl scope plugin at start up. .TP .B opengl_spectrum.height=480 Height of the spectrumgl scope plugin .TP .B opengl_spectrum.width=640 Width of the spectrumgl scope plugin .TP .B spacescope.active=false Launch or not the spacescope plugin at start up. .TP .B synaescope.active=false Launch or not the synaescope plugin at start up. .SH SEE ALSO .BR mikmod (1), .BR mpg123 (1). .SH AUTHOR This manual page was written by Ivo Timmermans , for the Debian GNU/Linux system (but may be used by others). FILENAME, GTK, DAEMON INTERFACE and PREFERENCES sections added by Dominique Michel from the Alsaplayer team. alsaplayer-0.99.82/alsaplayer.pc.in000066400000000000000000000007351466261456500171520ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ plugindir=@libdir@/@PACKAGE@ alsaplayer_includedir=@includedir@/@PACKAGE@ inputplugindir=${plugindir}/input outputplugindir=${plugindir}/output scopeplugindir=${plugindir}/scopes interfaceplugindir=${plugindir}/interface Name: AlsaPlayer Description: AlsaPlayer audio player with plugin support Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lalsaplayer -ldl Cflags: -I${alsaplayer_includedir} alsaplayer-0.99.82/alsaplayer.spec.in000066400000000000000000000040131466261456500174730ustar00rootroot00000000000000Summary: A advanced, graphical PCM audio player Name: alsaplayer Version: @VERSION@ Release: 1 URL: http://www.alsaplayer.org/ Source0: http://www.alsaplayer.org/%{name}-%{version}.tar.bz2 License: GPL Group: Applications/Multimedia BuildRoot: %{_tmppath}/%{name}-root # FIXME: check out what packages are available in different # distributions. # These are correct for both redhat and mandrake BuildRequires: gtk+-devel, libvorbis-devel, mikmod # These are redhat only #BuildRequires: libmad, esound-devel, audiofile-devel %description AlsaPlayer is a new PCM player developed on the Linux Operating System. AlsaPlayer was written in the first place to excercise the new ALSA (Advanced Linux Sound Architecture) driver and library system. It has now developed into a versitile audio player with rich plugin system. The Input Plugins plugins include: OGG, MPEG, MAD, CDDA, MikMod, FLAC and Audiofile. The Output Plugins include: ALSA, OSS and OSS/Lite, Esound, Sparc (tested on UltraSparc), SGI, and JACK. There are also a few scope plugins included. %package devel Group: Development/Libraries Requires: %{name} = %{version}-%{release} Summary: Files needed for building applications with libalsaplayer %description devel The functionality of the alsaplayer is also exposed via a c programming library. This package is neede to compile programs that uses the library. %prep %setup -q %build automake ./configure --prefix=%{_prefix} --mandir=%{_datadir}/man --enable-audiofile make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=%{buildroot} install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README INSTALL AUTHORS COPYING TODO docs/wishlist.txt %{_libdir}/pkgconfig/* %{_libdir}/*.so.* %{_libdir}/alsaplayer/* %{_bindir}/* %{_datadir}/man/man*/* %files devel %{_includedir}/alsaplayer/* %doc docs/reference/html %{_libdir}/*.so %{_libdir}/*.la %changelog * Mon Jul 29 2002 Daniel Resare - Initial build. * Sun Jul 06 2007 Dominique Michel - Added FLAC input plugin in description. alsaplayer-0.99.82/alsaplayer/000077500000000000000000000000001466261456500162145ustar00rootroot00000000000000alsaplayer-0.99.82/alsaplayer/AlsaNode.h000066400000000000000000000044761466261456500200660ustar00rootroot00000000000000/* AlsaNode.h * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __AlsaNode_h__ #define __AlsaNode_h__ #ifdef __linux__ #define USE_REALTIME #endif #define OUTPUT_RATE 44100 #include #include #include #include "output_plugin.h" #define MAX_OUTPUT_PLUGINS 32 #define MAX_SUB 32 #define POS_BEGIN 0x0 #define POS_MIDDLE 0x1 #define POS_END 0x2 typedef bool(*streamer_type)(void *arg, void *buf, int size); typedef struct _subscriber { int ID; streamer_type streamer; bool active; void *arg; } subscriber; class AlsaNode { private: output_plugin plugins[MAX_OUTPUT_PLUGINS]; output_plugin *plugin; int plugin_count; subscriber subs[MAX_SUB]; pthread_mutex_t queue_mutex; pthread_mutex_t thread_mutex; void *handle; int count; int follow_id; int fragment_size; int nr_fragments; int sample_freq; int external_latency; char driver_name [512]; char driver_args [1024]; char client_name[32]; bool realtime_sched; bool thread_running; bool init; bool looping; static void looper(void *); pthread_t looper_thread; public: AlsaNode(const char *name, const char *args, int realtime=0); ~AlsaNode(); int SetSamplingRate(int freq); int SamplingRate() { return sample_freq; } int SetStreamBuffers(int frag_size, int count, int channels); int RegisterPlugin(output_plugin *the_plugin); int RegisterPlugin(const char *plugin = NULL); int GetLatency(); int GetFragmentSize() { return fragment_size; } void StartStreaming(); void StopStreaming(); bool IsInStream(int); int AddStreamer(streamer_type str, void *arg, int); bool RemoveStreamer(int); bool ReadyToRun(); }; #endif alsaplayer-0.99.82/alsaplayer/AlsaPlayer.h000066400000000000000000000020421466261456500204200ustar00rootroot00000000000000/* AlsaPlayer.h * Copyright (C) 2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __AlsaPlayer_h__ #define __AlsaPlayer_h__ extern char *global_session_name; extern char *global_plugin_dir; extern char *global_interface_script; extern const char *global_pluginroot; extern int global_verbose; extern int global_session_id; extern int global_quiet; #endif alsaplayer-0.99.82/alsaplayer/AlsaSubscriber.h000066400000000000000000000022221466261456500212670ustar00rootroot00000000000000/* AlsaSubscriber.h * Copyright (C) 1998 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __AlsaSubscriber_h__ #define __AlsaSubscriber_h__ #include "AlsaNode.h" #include class AlsaSubscriber { private: AlsaNode *the_node; int the_ID; int preferred_pos; public: AlsaSubscriber(); ~AlsaSubscriber(); void Subscribe(AlsaNode *node, int pos=POS_BEGIN); void Unsubscribe(); void EnterStream(streamer_type str, void *arg); void ExitStream(); }; #endif alsaplayer-0.99.82/alsaplayer/CorePlayer.h000066400000000000000000000126261466261456500204410ustar00rootroot00000000000000/* CorePlayer.h * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __CorePlayer_h__ #define __CorePlayer_h__ #include #include #include #include #include "SampleBuffer.h" #include "AlsaNode.h" #include "AlsaSubscriber.h" #include "input_plugin.h" #ifdef __linux__ #include #endif // __linux__ // some arch don't define PATH_MAX #ifndef PATH_MAX #define PATH_MAX 1024 #endif // Tunable parameters #define BUF_SIZE (10240) // Size of a single ringbuffer partition #define NR_BUF 16 // Number of partitions in ringbuffer #define NR_CBUF 8 // Number of partitions to read ahead // (equals 2.6 seconds). NOTE: NR_CBUF // should NEVER exceed (NR_BUF/2), it doesn't // make sense otherwise #define MAX_INPUT_PLUGINS 16 typedef void(*volume_changed_type)(void *, float new_vol); typedef void(*speed_changed_type)(void *, float new_speed); typedef void(*pan_changed_type)(void *, float new_pan); typedef void(*position_notify_type)(void *, int pos); typedef void(*stop_notify_type)(void *); typedef void(*start_notify_type)(void *); typedef struct _coreplayer_notifier { void *data; volume_changed_type volume_changed; speed_changed_type speed_changed; pan_changed_type pan_changed; position_notify_type position_notify; start_notify_type start_notify; stop_notify_type stop_notify; } coreplayer_notifier; typedef struct _sample_buf { int start; _sample_buf *next, *prev; SampleBuffer *buf; } sample_buf; class CorePlayer // Much more abstraction to come, well maybe not { private: int total_blocks; int write_buf_changed; int read_direction; int blocks_in_buffer; int jump_point; int last_read; bool streaming; int repitched; int new_block_number; float pitch_point; float pitch; float pitch_multi; float real_pitch; bool jumped; bool producing; float volume; float pan; int output_rate; int input_rate; AlsaNode *node; AlsaSubscriber *sub; float save_speed; std::set notifiers; // INPUT plugin stuff input_object *the_object; input_plugin *plugin; // Pointer to the current plugin pthread_t producer_thread; pthread_mutex_t player_mutex; pthread_mutex_t counter_mutex; pthread_cond_t producer_ready; pthread_mutex_t thread_mutex; pthread_mutex_t notifier_mutex; #if !defined(EMBEDDED) // this buffer is used to apply volume/pan and mixing channels char *input_buffer; #endif sample_buf *buffer; sample_buf *read_buf, *write_buf, *new_write_buf; int BlockSeek(int); int FilledBuffers(); void ResetBuffer(); void SetSpeedMulti(float multi) { pitch_multi = multi; } void update_pitch(); void kill_producer(); static void producer_func(void *data); static bool streamer_func(void *, void *, int); int pcm_worker(sample_buf *dest, int start); int Read32(void *, int); int SetDirection(int dir); int GetDirection() { return read_direction; } void load_input_addons(); void unregister_plugins(); void UnregisterPlugins(); void Lock(); void Unlock(); void LockNotifiers(); void UnlockNotifiers(); int RegisterPlugin(input_plugin *the_plugin); public: // Static members static int plugins_loaded; static int plugin_count; static pthread_mutex_t plugins_mutex; static input_plugin plugins[MAX_INPUT_PLUGINS]; CorePlayer(AlsaNode *node=(AlsaNode *)NULL); ~CorePlayer(); void RegisterNotifier(coreplayer_notifier *, void *data); void UnRegisterNotifier(coreplayer_notifier *); AlsaNode *GetNode() { return node; } int GetPosition(); // Current position in blocks void PositionUpdate(); // Notify the interfaces about the position int SetSpeed(float val); // Set the playback speed: 1.0 = 100% float GetSpeed(); // Get speed float GetVolume() { return volume; } // Get Volume level void SetVolume(float vol); // Set volume level float GetPan() { return pan; } // Get Pan level void SetPan(float p); // Set Pan level: // 0.0 = center // -1.0 = right channel muted // 1.0 = left channel muted int GetCurrentTime(int block=-1); // Returns the time position of block in // hundreths of seconds int GetStreamInfo(stream_info *info); // Return stream info int GetBlocks(); // Total number of blocks int GetTracks(); // Total number of tracks int GetSampleRate(); // Samplerat of this player int GetChannels(); // Number of channels int GetBlockSize(); // Block size in bytes input_plugin * GetPlayer(const char *); // This one is temporary int GetLatency() { if (node) return node->GetLatency(); else return 0; } bool Open(const char *path = (const char *)NULL); void Close(); bool Start(); void Stop(); int Seek(int pos); bool CanSeek(); void Pause (); void UnPause (); bool IsPaused (); int IsActive() { return streaming; } int IsPlaying() { return producing; } }; #endif alsaplayer-0.99.82/alsaplayer/Effects.h000066400000000000000000000022641466261456500177500ustar00rootroot00000000000000/* Effects.h * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __Effects_h__ #define __Effects_h__ #define DELAY_BUF_SIZE ((44100 * 2 * 2) * 2) #define MAX_CHUNK (32768 * 2) extern "C" { void clear_buffer(void); void init_effects(void); void echo_effect32(void *buf, int size, int delay, int vol); void volume_effect32(void *buf, int size, float left, float right=-100.0); void buffer_effect(void *buf, int size); char *delay_feed(int delay, int max_size); } #endif alsaplayer-0.99.82/alsaplayer/Makefile.am000066400000000000000000000012041466261456500202450ustar00rootroot00000000000000EXTRA_DIST = input_plugin.h output_plugin.h scope_plugin.h SampleBuffer.h \ scope_config.h alsaplayer_convolve.h alsaplayer_fft.h utilities.h \ interface_plugin.h stream_info.h CorePlayer.h Playlist.h AlsaNode.h \ AlsaSubscriber.h Effects.h alsaplayer_error.h AlsaPlayer.h prefs.h \ control.h reader.h object.h playitem.h alsaplayerincludedir = $(includedir)/alsaplayer alsaplayerinclude_HEADERS = input_plugin.h output_plugin.h scope_plugin.h \ interface_plugin.h stream_info.h CorePlayer.h Playlist.h SampleBuffer.h AlsaNode.h \ Effects.h utilities.h alsaplayer_error.h AlsaSubscriber.h \ prefs.h AlsaPlayer.h control.h reader.h alsaplayer-0.99.82/alsaplayer/Playlist.h000066400000000000000000000177531466261456500202030ustar00rootroot00000000000000/* Playlist.h * Copyright (C) 1999-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __Playlist_h__ #define __Playlist_h__ #include "CorePlayer.h" #include #include #include #define MAGIC_ID "# 1.0.0 (Do not edit!)" enum plist_result {E_PL_SUCCESS = 0, E_PL_DUBIOUS, E_PL_BAD}; enum plist_format {PL_FORMAT_M3U}; // This variable should be initialized when the program started. extern pthread_mutex_t playlist_sort_seq_mutex; class PlayItem { private: bool parsed; bool eof; public: PlayItem(std::string filename_new) { filename = filename_new; playtime = 0; parsed = false; marked_to_keep_curritem = 0; UnsetEof(); } bool Parsed() { return parsed; } void SetEof() { eof = true; } void UnsetEof() { eof = false; } bool Eof() { return eof; } void SetParsed() { parsed = true; } std::string filename; std::string title; std::string artist; std::string album; std::string genre; std::string year; std::string track; std::string comment; int playtime; bool marked_to_keep_curritem; // Don't use it if you don't what is it! }; // C interface for the playlist typedef void(*cbsetcurrent_type)(void *data, unsigned pos); typedef void(*cbinsert_type)(void *data, std::vector &items, unsigned pos); typedef void(*cbremove_type)(void *data, unsigned start, unsigned end); typedef void(*cbupdated_type)(void *data, PlayItem &, unsigned); typedef void(*cbclear_type)(void *data); typedef struct _playlist_interface { void *data; cbsetcurrent_type cbsetcurrent; cbinsert_type cbinsert; cbremove_type cbremove; cbupdated_type cbupdated; cbclear_type cbclear; } playlist_interface; class PlaylistInterface { private: public: // Note: it is not permissible to call any Playlist methods in // one of these callback methods - will cause deadlock. // Callbacks - Called when: // Current position changed virtual void CbSetCurrent(unsigned pos) = 0; // Some items were inserted // Note: pos is the position to insert at // So - pos == 0 means insert items at beginning // pos == n means insert at end, ie append, where n is number of // items already in list // Note: CbSetCurrent will be called after this callback. virtual void CbInsert(std::vector &items, unsigned pos) = 0; // Item was updated virtual void CbUpdated(PlayItem &item, unsigned pos) = 0; // Tracks from position start to end inclusive were removed // Note: CbSetCurrent will be called after this callback. virtual void CbRemove(unsigned, unsigned) = 0; // List was been cleared. Current position is now 0. virtual void CbClear() = 0; }; class Playlist { friend void playlist_looper(void *data); friend void insert_looper(void *); friend void info_looper(Playlist *); private: CorePlayer *player1; CorePlayer *player2; int total_time; int total_size; // Mutex to stop moving onto next song while we're modifying the playlist pthread_mutex_t playlist_mutex; // Mutex for loading playlists pthread_mutex_t playlist_load_mutex; // Interfaces mutex pthread_mutex_t interfaces_mutex; // Thread which starts new song when previous one finishes // -- would be nice to get rid of this eventually... // (perhaps by setting a callback on the player to be called // when the song finishes) pthread_t playlist_thread; // Flags used by thread to exit neatly bool active; // True until set to false by destructor bool paused; // Playlist is paused bool shuffled; // Playlis is shuffled bool loopingSong; // Loop the current song bool loopingPlaylist; // Loop the Playlist bool crossfade; // Crossfade the playlist bool onebyone; // Stop after each song AlsaNode *our_node; // Node CorePlayer *coreplayer; // Core player - set this std::vector queue; // List of files to play unsigned curritem; // Position of next file to play std::set interfaces; // Things to tell when things change std::set cinterfaces; // C version void Looper(void *data); void LockInterfaces(); void UnlockInterfaces(); bool PlayFile(PlayItem const &); public: void Lock(); void Unlock(); void Stop(); bool CanPlay(std::string const &); bool Eof(); Playlist(AlsaNode *); ~Playlist(); // Get CorePLayer object CorePlayer *GetCorePlayer() { return coreplayer; } AlsaNode *GetNode() { return our_node; } PlayItem *GetItem(unsigned); // Get the number of items in the playlist (0 if playlist is empty) int Length(); // Move to specified item in playlist and play from there // Position 1 is first item, n is last item where n is length of list void Play(unsigned); void Next(); // Start playing next item in playlist void Prev(); // Start playing previous item in playlist int GetCurrent() { return curritem; } // Return current item void SetCurrent(unsigned pos); // Set current item // Insert items at position - 0 = beginning, 1 = after first item, etc void Insert(std::vector const &, unsigned); // To insert just one item: void Insert(std::string const &, unsigned); // Add several items and play them immediately // (Avoids possible concurrency problems) void AddAndPlay(std::vector const &); // Add just one item and play it void AddAndPlay(std::string const &); // Remove tracks from position start to end inclusive // Position 1 is first track, n is last track where n is length of list void Remove(unsigned start, unsigned end); // Shuffle playlist void Shuffle(); void UnShuffle() { shuffled = false; } bool Shuffled() { return shuffled; } // Sort playlist according to seq void Sort (std::string const &seq); // Clear playlist void Clear(); // Pause controls bool IsPaused() { return paused; } void Pause() { paused = true; } void UnPause() { paused = false; } // Crossfade controls bool Crossfading() { return crossfade; } void Crossfade() { crossfade = true; } void UnCrossfade() { crossfade = false; } // Loop_Song controls bool LoopingSong() { return loopingSong; } void LoopSong() { loopingSong = true; } void UnLoopSong() { loopingSong = false; } // Loop_Playlist controls bool LoopingPlaylist() { return loopingPlaylist; } void LoopPlaylist() { loopingPlaylist = true; } void UnLoopPlaylist() { loopingPlaylist = false; } // Play songs one by one bool IsOneByOne() { return onebyone; } void SetOneByOne() { onebyone = true; } void UnSetOneByOne() { onebyone = false; } // Save playlist to file enum plist_result Save(std::string, enum plist_format) const; // Load playlist from file enum plist_result Load(std::string const &, unsigned, bool); // Register to receive callbacks void Register(PlaylistInterface *); void Register(playlist_interface *); void RegisterNotifier(coreplayer_notifier *, void *data); void UnRegisterNotifier(coreplayer_notifier *); // Unregister - must do this before a registered interface is deleted void UnRegister(PlaylistInterface *); void UnRegister(playlist_interface *); std::vector& GetQueue() { return queue; } }; inline void Playlist::Insert(std::string const &path, unsigned pos) { std::vector items; items.push_back(path); Insert(items, pos); } inline void Playlist::AddAndPlay(std::string const &path) { std::vector items; items.push_back(path); Playlist::AddAndPlay(items); } #endif alsaplayer-0.99.82/alsaplayer/SampleBuffer.h000066400000000000000000000034521466261456500207440ustar00rootroot00000000000000/* SampleBuffer.h * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __SampleBuffer_h__ #define __SampleBuffer_h__ #include enum { SAMPLE_SIZE_1, SAMPLE_SIZE_2, SAMPLE_SIZE_4 }; enum { DIR_FORWARD, DIR_BACK }; #define SAMPLE_MONO SAMPLE_SIZE_1 #define SAMPLE_STEREO SAMPLE_SIZE_2 #define SAMPLE_AC3 SAMPLE_SIZE_6 class SampleBuffer { private: int sample_size; int buffer_size; int read_direction; //int read_index; //int write_index; pthread_mutex_t lock; public: int read_index; int write_index; short *buffer_data; SampleBuffer(int mode, int size); ~SampleBuffer(); int WriteSamples(void *data, int length); int ReadSamples(void *data, int length); int Seek(int index); void SetReadDirection(int rd); void ResetRead(); int GetBufferSizeBytes(int block_size = -1); int GetBufferSize(); int GetSamplesInBuffer(); int GetReadIndex(); int GetReadDirection(); void* GetSamples(); void SetSamples(int); int GetFreeSamples(); int GetAvailableSamples(); int GetSampleSize() { return sample_size; } void Clear(); }; #endif alsaplayer-0.99.82/alsaplayer/alsaplayer_convolve.h000066400000000000000000000026611466261456500224420ustar00rootroot00000000000000/* alsaplayer_convolve.h: Header for convolutions. * * Copyright (C) 1999 Ralph Loader * * This file is part of AlsaPlayer * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef CONVOLVE_H #define CONVOLVE_H #ifdef __cplusplus extern "C" { #endif /* convolve_match takes two blocks, one twice the size of the other. The * sizes of these are CONVOLVE_BIG and CONVOLVE_SMALL respectively. */ #define CONVOLVE_DEPTH 8 #define CONVOLVE_SMALL (1 << CONVOLVE_DEPTH) #define CONVOLVE_BIG (CONVOLVE_SMALL * 2) /* Convolution stuff */ typedef struct _struct_convolve_state convolve_state; convolve_state *convolve_init (void); void convolve_close (convolve_state * state); int convolve_match (const int * lastchoice, const short int * input, convolve_state * state); #ifdef __cplusplus } #endif #endif alsaplayer-0.99.82/alsaplayer/alsaplayer_error.h000066400000000000000000000020721466261456500217340ustar00rootroot00000000000000/* error.h - error functions * Copyright (C) 2002 Andy Lo A Foe * * This file is part of AlsaPlayer * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __alsaplayer_error_h__ #define __alsaplayer_error_h__ #ifdef __cplusplus extern "C" { #endif extern void (*alsaplayer_error)(const char *fmt, ...); void alsaplayer_set_error_function (void (*func)(const char *, ...)); #ifdef __cplusplus }; #endif #endif /* __alsaplayer_error_h__ */ alsaplayer-0.99.82/alsaplayer/alsaplayer_fft.h000066400000000000000000000031431466261456500213620ustar00rootroot00000000000000/* alsaplayer_fft.h: Header for iterative implementation of a FFT * Copyright (C) 1999 Richard Boulton * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef _FFT_H_ #define _FFT_H_ #define FFT_BUFFER_SIZE_LOG 9 #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) /* sound sample - should be an signed 16 bit value */ typedef short int sound_sample; #ifdef __cplusplus extern "C" { #endif /* FFT library */ typedef struct _struct_fft_state fft_state; fft_state *fft_init (void); extern void fft_perform (const sound_sample *input, double *output, fft_state *state); extern void fft_close (fft_state *state); /* Convolution stuff */ typedef struct _struct_convolve_state convolve_state; extern convolve_state *convolve_init (void); extern int convolve_match (const int * lastchoice, const sound_sample * input, convolve_state * state); extern void convolve_close (convolve_state * state); #ifdef __cplusplus } #endif #endif /* _FFT_H_ */ alsaplayer-0.99.82/alsaplayer/control.h000066400000000000000000000072001466261456500200440ustar00rootroot00000000000000/* control.h * Copyright (C) 2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __CONTROL_H__ #define __CONTROL_H__ #define AP_SESSION_MAX 256 #define AP_TITLE_MAX 256 #define AP_ARTIST_MAX 256 #define AP_ALBUM_MAX 256 #define AP_GENRE_MAX 256 #define AP_STREAM_TYPE_MAX 256 #define AP_STATUS_MAX 256 #define AP_COMMENT_MAX 256 #define AP_TRACK_NUMBER_MAX 10 #define AP_YEAR_MAX 10 #define AP_FILE_PATH_MAX 1024 #ifdef __cplusplus extern "C" { #endif int ap_find_session(char *session_name, int *session); int ap_session_running(int session); int ap_version(void); int ap_play(int session); int ap_stop(int session); int ap_pause(int session); int ap_unpause(int session); int ap_next(int session); int ap_prev(int session); int ap_ping(int session); int ap_quit(int session); int ap_clear_playlist(int session); int ap_add_path(int session, const char *path); int ap_add_and_play(int session, const char *path); int ap_add_playlist(int session, const char *playlistfile); int ap_shuffle_playlist(int session); int ap_save_playlist(int session); int ap_get_playlist_length(int session, int *length); int ap_set_speed(int session, float speed); int ap_get_speed(int session, float *val); int ap_set_volume(int session, float volume); int ap_get_volume(int session, float *volume); int ap_set_pan(int session, float pan); int ap_get_pan(int session, float *pan); int ap_is_paused(int session , int *paused); int ap_set_looping(int session, int val); int ap_is_looping(int session, int *val); int ap_set_onebyone(int session, int val); int ap_is_onebyone(int session, int *val); int ap_set_playlist_looping(int session, int val); int ap_is_playlist_looping(int session, int *val); int ap_get_tracks(int session, int *nr_tracks); int ap_get_session_name(int session, char *str); int ap_get_title(int session, char *str); int ap_get_artist(int session, char *str); int ap_get_album(int session, char *str); int ap_get_genre(int session, char *str); int ap_get_year(int session, char *str); int ap_get_track_number(int session, char *str); int ap_get_comment(int session, char *str); int ap_get_file_path (int session, char *str); int ap_set_position(int session, int pos); int ap_get_position(int session, int *val); int ap_set_position_relative(int session, int pos); int ap_get_length(int session, int *length); int ap_set_block(int session, int block); int ap_get_block(int session, int *val); int ap_get_blocks(int session, int *val); int ap_get_stream_type(int session, char *str); int ap_get_status(int session, char *str); int ap_is_playing(int session, int *val); int ap_sort (int session, char *seq); int ap_jump_to(int session, int pos); int ap_get_playlist_position(int session, int *pos); int ap_get_file_path_for_track(int session, char* path, int pos); int ap_insert(int session, const char*, int pos); int ap_remove(int session, int pos); int ap_set_current(int session, int pos); int ap_get_playlist(int session, int *argc, char ***the_list); #ifdef __cplusplus } #endif #endif alsaplayer-0.99.82/alsaplayer/input_plugin.h000066400000000000000000000173331466261456500211110ustar00rootroot00000000000000/* input_plugin.h - Use this to write input plugins * Copyright (C) 1999-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __input_plugin_h__ #define __input_plugin_h__ #include "stream_info.h" #include /** * Set this flag if your plugin is able to seek in the stream */ #define P_SEEK 1 /** Set this flag if your plugin is able to do sample accurate seeking * in the stream. This is required for reverse speed playback. */ #define P_PERFECTSEEK 2 /** * Set this flag if your plugin is reentrant. */ #define P_REENTRANT 4 /** * Set this flag if the stream is file based (local disk file) */ #define P_FILEBASED 8 /** * Set this if the stream is a real stream e.g. HTTP or UDP based */ #define P_STREAMBASED 16 /** * Set minimal buffer */ #define P_BUFFERING 32 /* * Format of version number is 0x1000 + version * So 0x1001 is *binary* format version 1 * THE VERSION NUMBER IS *NOT* A USER SERVICABLE PART! */ /** * The base version number of the scope plugin. Set at 0x1000. */ #define INPUT_PLUGIN_BASE_VERSION 0x1000 /** * The version of the input plugin API. This should be incremented * whenever structural changes are made to the API. This value should * only be changed by the maintainers. */ #define INPUT_PLUGIN_VERSION (INPUT_PLUGIN_BASE_VERSION + 16) /** * This is a structure that keeps frequently used parameters of an * input instance. It also contains a pointer to any local_data * that might be allocated by the plugin itself. */ typedef struct _input_object { /** * Flag that should be set to 1 if your plugin is ready to accept * play_block() callback */ int ready; /** * Stream specific flags that should be set in the open() call. * Read the description of the P_* definitions for details. */ int flags; /** * The total number of blocks in the stream. Should be set in the * open() call. */ int nr_blocks; /** * The number of tracks, if any, in the stream. Should be set in * the open() call. */ int nr_tracks; /** * The number of PCM channels in the stream. Should always be 2 * at this time. */ int nr_channels; /** * The block size in bytes. play_block() will be called with this * value. */ int block_size; /** If your plugin needs extra space for its own variables assign the * allocated data structure to this pointer */ void *local_data; /** Path of the currently played file * */ char* path; /** * The object mutex. Used to lock and unlock the data structures. * Initialized and called from the HOST. */ pthread_mutex_t object_mutex; } input_object; /** * input plugin binary version. Must be set to INPUT_PLUGIN_VERSION */ typedef int input_version_type; /** * Capability flags for this plugin **/ typedef int input_flags_type; /** * Init plugin */ typedef int(*input_init_type)(void); /** * Prepare the plugin for removal */ typedef void(*input_shutdown_type)(void); /** * Handle for plugin. Filled in by the host */ typedef void* input_plugin_handle_type; /** * @param path Path to stream * * Returns a rating between 0.0 and 1.0 for how * well this plugin can handle the given path * 1.0 = Excellent * 0.0 = Huh? */ typedef float(*input_can_handle_type)(const char *path); /** * @param obj input object * @param path path of stream to open * * Open stream */ typedef int(*input_open_type)(input_object *obj, const char *path); /** * @param obj input object * * Close stream */ typedef void(*input_close_type)(input_object *obj); /** * @param obj input object * @param buffer buffer where we should write the block to * * Play/decode a single block. This function should write exactly one block * to the buffer. If there is not enough PCM data to fill the block * it should be padded with zeros (silence). */ typedef int(*input_play_block_type)(input_object *obj, short *buffer); /** * @param obj input object * @param block * * Seek to a specific block number */ typedef int(*input_block_seek_type)(input_object *obj, int block); /** * @param obj input object * * Returns the block size in bytes */ typedef int(*input_block_size_type)(input_object *obj); /** * @param obj input object * * Returns the total number of blocks in the stream */ typedef int(*input_nr_blocks_type)(input_object *obj); /** * @param obj input object * * Returns the number of frames sample for in the stream (where a frame is * one singled sample for every channel). */ typedef int64_t (*input_frame_count_type)(input_object *obj); /** * @param obj input object * @param block block number * * Returns the offset from the start time in centiseconds (100th of a second) * for the block given. */ typedef long(*input_block_to_sec_type)(input_object *obj ,int block); /** * @param obj input object * * Returns the sample rate of the stream */ typedef int(*input_sample_rate_type)(input_object *obj); /** * @param obj input object * * Returns number of channels in the stream */ typedef int(*input_channels_type)(input_object *obj); /** * @param obj input object * @param info pointer to stream_info structure * * Return stream info of the current stream. You should not allocate * space for the stream_info structure. The HOST will take care of that. */ typedef int(*input_stream_info_type)(input_object *obj,stream_info *info); /** * @param obj input object * * Return number of tracks. Optional */ typedef int(*input_nr_tracks_type)(input_object *obj); /* @param obj input object * @param track track to seek to * * Seek to a track. Optional */ typedef int(*input_track_seek_type)(input_object *obj, int track); typedef struct _input_plugin { /** * Must be set to INPUT_PLUGIN_VERSION */ input_version_type version; /** * Fixed flags for the plugin (P_*) */ input_flags_type flags; /** * Should point the a character array containing the name of this plugin */ const char *name; /** * Should point to a character array containing the name of the * author(s) of this plugin. */ const char *author; /** * dlopen() handle of this plugin. Filled in by the HOST. */ void *handle; input_init_type init; input_shutdown_type shutdown; input_plugin_handle_type plugin_handle; input_can_handle_type can_handle; input_open_type open; input_close_type close; input_play_block_type play_block; input_block_seek_type block_seek; input_block_size_type block_size; input_nr_blocks_type nr_blocks; input_frame_count_type frame_count; input_block_to_sec_type block_to_sec; input_sample_rate_type sample_rate; input_channels_type channels; input_stream_info_type stream_info; input_nr_tracks_type nr_tracks; input_track_seek_type track_seek; } input_plugin; /** * Every input plugin should have an input_plugin_info() function that * returns a pointer to an input_plugin structure that is set up with * pointers to your implementations. If your plugin is compiled using * C++ make sure you 'extern "C"' the input_plugin_info() function or * else the HOST will not be able to load the plugin. */ typedef input_plugin*(*input_plugin_info_type)(void); #ifdef __cplusplus extern "C" #endif input_plugin* input_plugin_info (void); #endif alsaplayer-0.99.82/alsaplayer/interface_plugin.h000066400000000000000000000033551466261456500217110ustar00rootroot00000000000000/* interface_plugin.h * Copyright (C) 2001-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __interface_plugin_h__ #define __interface_plugin_h__ #include "CorePlayer.h" #include "Playlist.h" /* * Format of version number is 0x1000 + version * So 0x1001 is *binary* format version 1 * THE VERSION NUMBER IS *NOT* A USER SERVICABLE PART! */ #define INTERFACE_PLUGIN_BASE_VERSION 0x1000 #define INTERFACE_PLUGIN_VERSION (INTERFACE_PLUGIN_BASE_VERSION + 4) typedef int interface_version_type; typedef int(*interface_init_type)(); typedef int(*interface_start_type)(Playlist *, int, char **); typedef int(*interface_running_type)(); typedef int(*interface_stop_type)(); typedef void(*interface_close_type)(); typedef struct _interface_plugin { interface_version_type version; const char *name; const char *author; void *handle; interface_init_type init; interface_start_type start; interface_running_type running; interface_stop_type stop; interface_close_type close; } interface_plugin; typedef interface_plugin*(*interface_plugin_info_type)(); #endif alsaplayer-0.99.82/alsaplayer/object.h000066400000000000000000000062071466261456500176400ustar00rootroot00000000000000/* object.h - Threads safe version of functions from GObject. * Copyright (C) 2002 Evgeny Chukreev * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __OBJECT_H__ #define __OBJECT_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @file object.h * * @brief Declarations for #ApObject and #ApObjectClass. * */ /** * @brief Returns the type ID of the #ApObject type. */ #define AP_TYPE_OBJECT (ap_object_get_type ()) /** * @brief Cast a #ApObject or derived pointer * into a (ApObject*) pointer. * * Depending on the current debugging level, this function may invoke * certain runtime checks to identify invalid casts */ #define AP_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AP_TYPE_OBJECT, ApObject)) /** * @brief Check whether a valid #ApObject * pointer is of type #AP_TYPE_OBJECT. */ #define AP_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AP_TYPE_OBJECT)) /** * @brief This is opaque structure for an object type. * * All the fields in the #ApObject structure are private to the #ApObject * implementation and should never be accessed directly. */ typedef struct _ApObject ApObject; /** * @brief This is opaque structure for a object class. * * All the fields in the #ApObjectClass structure are private * to the #ApObjectClass implementation and should never be accessed directly. */ typedef struct _ApObjectClass ApObjectClass; struct _ApObject { /* Parent object structure. * * The gobject structure needs to be the first * element in the playitem structure in order for * the object mechanism to work correctly. This * allows a ApPlayItem pointer to be cast to a * GObject pointer. */ GObject gobject; guint ref; GStaticRecMutex mutex; }; struct _ApObjectClass { /* Parent class structure. * * The gobject class structure needs to be the first * element in the playitem class structure in order for * the class mechanism to work correctly. This allows a * ApPlayItemClass pointer to be cast to a GObjectClass * pointer. */ GObjectClass gobject_class; }; GType ap_object_get_type (void) G_GNUC_CONST; void ap_object_ref (ApObject *object); void ap_object_unref (ApObject *object); void ap_object_lock (ApObject *object); void ap_object_unlock (ApObject *object); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __OBJECT_H__ */ alsaplayer-0.99.82/alsaplayer/old_playlist.h000066400000000000000000000177531466261456500211010ustar00rootroot00000000000000/* Playlist.h * Copyright (C) 1999-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __Playlist_h__ #define __Playlist_h__ #include "CorePlayer.h" #include #include #include #define MAGIC_ID "# 1.0.0 (Do not edit!)" enum plist_result {E_PL_SUCCESS = 0, E_PL_DUBIOUS, E_PL_BAD}; enum plist_format {PL_FORMAT_M3U}; // This variable should be initialized when the program started. extern pthread_mutex_t playlist_sort_seq_mutex; class PlayItem { private: bool parsed; bool eof; public: PlayItem(std::string filename_new) { filename = filename_new; playtime = 0; parsed = false; marked_to_keep_curritem = 0; UnsetEof(); } bool Parsed() { return parsed; } void SetEof() { eof = true; } void UnsetEof() { eof = false; } bool Eof() { return eof; } void SetParsed() { parsed = true; } std::string filename; std::string title; std::string artist; std::string album; std::string genre; std::string year; std::string track; std::string comment; int playtime; bool marked_to_keep_curritem; // Don't use it if you don't what is it! }; // C interface for the playlist typedef void(*cbsetcurrent_type)(void *data, unsigned pos); typedef void(*cbinsert_type)(void *data, std::vector &items, unsigned pos); typedef void(*cbremove_type)(void *data, unsigned start, unsigned end); typedef void(*cbupdated_type)(void *data, PlayItem &, unsigned); typedef void(*cbclear_type)(void *data); typedef struct _playlist_interface { void *data; cbsetcurrent_type cbsetcurrent; cbinsert_type cbinsert; cbremove_type cbremove; cbupdated_type cbupdated; cbclear_type cbclear; } playlist_interface; class PlaylistInterface { private: public: // Note: it is not permissible to call any Playlist methods in // one of these callback methods - will cause deadlock. // Callbacks - Called when: // Current position changed virtual void CbSetCurrent(unsigned pos) = 0; // Some items were inserted // Note: pos is the position to insert at // So - pos == 0 means insert items at beginning // pos == n means insert at end, ie append, where n is number of // items already in list // Note: CbSetCurrent will be called after this callback. virtual void CbInsert(std::vector &items, unsigned pos) = 0; // Item was updated virtual void CbUpdated(PlayItem &item, unsigned pos) = 0; // Tracks from position start to end inclusive were removed // Note: CbSetCurrent will be called after this callback. virtual void CbRemove(unsigned, unsigned) = 0; // List was been cleared. Current position is now 0. virtual void CbClear() = 0; }; class Playlist { friend void playlist_looper(void *data); friend void insert_looper(void *); friend void info_looper(Playlist *); private: CorePlayer *player1; CorePlayer *player2; int total_time; int total_size; // Mutex to stop moving onto next song while we're modifying the playlist pthread_mutex_t playlist_mutex; // Mutex for loading playlists pthread_mutex_t playlist_load_mutex; // Interfaces mutex pthread_mutex_t interfaces_mutex; // Thread which starts new song when previous one finishes // -- would be nice to get rid of this eventually... // (perhaps by setting a callback on the player to be called // when the song finishes) pthread_t playlist_thread; // Flags used by thread to exit neatly bool active; // True until set to false by destructor bool paused; // Playlist is paused bool shuffled; // Playlis is shuffled bool loopingSong; // Loop the current song bool loopingPlaylist; // Loop the Playlist bool crossfade; // Crossfade the playlist bool onebyone; // Stop after each song AlsaNode *our_node; // Node CorePlayer *coreplayer; // Core player - set this std::vector queue; // List of files to play unsigned curritem; // Position of next file to play std::set interfaces; // Things to tell when things change std::set cinterfaces; // C version void Looper(void *data); void LockInterfaces(); void UnlockInterfaces(); bool PlayFile(PlayItem const &); public: void Lock(); void Unlock(); void Stop(); bool CanPlay(std::string const &); bool Eof(); Playlist(AlsaNode *); ~Playlist(); // Get CorePLayer object CorePlayer *GetCorePlayer() { return coreplayer; } AlsaNode *GetNode() { return our_node; } PlayItem *GetItem(unsigned); // Get the number of items in the playlist (0 if playlist is empty) int Length(); // Move to specified item in playlist and play from there // Position 1 is first item, n is last item where n is length of list void Play(unsigned); void Next(); // Start playing next item in playlist void Prev(); // Start playing previous item in playlist int GetCurrent() { return curritem; } // Return current item void SetCurrent(unsigned pos); // Set current item // Insert items at position - 0 = beginning, 1 = after first item, etc void Insert(std::vector const &, unsigned); // To insert just one item: void Insert(std::string const &, unsigned); // Add several items and play them immediately // (Avoids possible concurrency problems) void AddAndPlay(std::vector const &); // Add just one item and play it void AddAndPlay(std::string const &); // Remove tracks from position start to end inclusive // Position 1 is first track, n is last track where n is length of list void Remove(unsigned start, unsigned end); // Shuffle playlist void Shuffle(); void UnShuffle() { shuffled = false; } bool Shuffled() { return shuffled; } // Sort playlist according to seq void Sort (std::string const &seq); // Clear playlist void Clear(); // Pause controls bool IsPaused() { return paused; } void Pause() { paused = true; } void UnPause() { paused = false; } // Crossfade controls bool Crossfading() { return crossfade; } void Crossfade() { crossfade = true; } void UnCrossfade() { crossfade = false; } // Loop_Song controls bool LoopingSong() { return loopingSong; } void LoopSong() { loopingSong = true; } void UnLoopSong() { loopingSong = false; } // Loop_Playlist controls bool LoopingPlaylist() { return loopingPlaylist; } void LoopPlaylist() { loopingPlaylist = true; } void UnLoopPlaylist() { loopingPlaylist = false; } // Play songs one by one bool IsOneByOne() { return onebyone; } void SetOneByOne() { onebyone = true; } void UnSetOneByOne() { onebyone = false; } // Save playlist to file enum plist_result Save(std::string, enum plist_format) const; // Load playlist from file enum plist_result Load(std::string const &, unsigned, bool); // Register to receive callbacks void Register(PlaylistInterface *); void Register(playlist_interface *); void RegisterNotifier(coreplayer_notifier *, void *data); void UnRegisterNotifier(coreplayer_notifier *); // Unregister - must do this before a registered interface is deleted void UnRegister(PlaylistInterface *); void UnRegister(playlist_interface *); std::vector& GetQueue() { return queue; } }; inline void Playlist::Insert(std::string const &path, unsigned pos) { std::vector items; items.push_back(path); Insert(items, pos); } inline void Playlist::AddAndPlay(std::string const &path) { std::vector items; items.push_back(path); Playlist::AddAndPlay(items); } #endif alsaplayer-0.99.82/alsaplayer/output_plugin.h000066400000000000000000000073011466261456500213040ustar00rootroot00000000000000/* output_plugin.h * Copyright (C) 1999-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __output_plugin_h__ #define __output_plugin_h__ #define OUTPUT_PLUGIN_BASE_VERSION 0x1000 #define OUTPUT_PLUGIN_VERSION (OUTPUT_PLUGIN_BASE_VERSION + 6) typedef int output_version_type; typedef int(*output_init_type)(void); typedef int(*output_open_type)(const char *path); typedef void(*output_close_type)(void); typedef int(*output_write_type)(short *data, int short_count); typedef int(*output_start_callbacks_type)(void *data); typedef int(*output_set_buffer_type)(int *frag_size, int *frag_count, int *channels); typedef unsigned int(*output_set_sample_rate_type)(unsigned int rate); typedef int(*output_get_queue_count_type)(void); typedef int(*output_get_latency_type)(void); typedef struct _output_plugin { /** * Version of output plugin. Must be OUTPUT_PLUGIN_VERSION */ output_version_type version; /** * Name of output plugin */ const char *name; /** * Author of the plugin */ const char *author; /** * Initialize output plugin. Called before the plugin is * opened for use */ output_init_type init; /** * @param path The path or device designation that should be used * * Opens the output plugin. A value of 1 should be returned on * success, 0 on failure. */ output_open_type open; /** * Close the output plugin */ output_close_type close; /** * @param data Buffer that contains the data * @param byte_count Number of bytes that should be read from the buffer * * Write out data to the output device. This is a byte count and * will typically be the same size as a fragment. A value of 1 should * be returned on success, 0 on failure. */ output_write_type write; /** * @param data pointer to bufs structure in AlsaNode * * This function is used for callback based plugins like JACK */ output_start_callbacks_type start_callbacks; /** * @param frag_size Fragment size to use (in bytes) * @param frag_count Fragment count to use (in bytes) * @param channels Number of channels to use * * Set up the output device with the given parameters. Some output * devices do not accept such configurations in which case they * should just be ignored, but still expect frag_size data chunks * in the write function. A value of 1 should be returned on success, * 0 on failure. */ output_set_buffer_type set_buffer; /** * @param rate Sample rate to use * * Set the sample rate of the output device. A value of 1 should be * returned on success, 0 on failure. */ output_set_sample_rate_type set_sample_rate; /** * Returns the number of bytes pending in the hardware buffer of * output device. This function is optional. */ output_get_queue_count_type get_queue_count; /** * Returns the latency of the output device in bytes. This function * is optional. */ output_get_latency_type get_latency; } output_plugin; typedef output_plugin*(*output_plugin_info_type)(void); #ifdef __cplusplus extern "C" #endif output_plugin* output_plugin_info (void); #endif alsaplayer-0.99.82/alsaplayer/playitem.h000066400000000000000000000110731466261456500202130ustar00rootroot00000000000000/* playitem.h * Copyright (C) 2002 Evgeny Chukreev * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __PLAYITEM_H__ #define __PLAYITEM_H__ #include #include #include "object.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @file playitem.h * * @brief Declarations for #ApPlayItem and #ApPlayItemClass. */ /** * @brief Returns the type ID of the #ApPlayItem type. */ #define AP_TYPE_PLAYITEM (ap_playitem_get_type ()) /** * @brief Cast a #ApPlayItem or derived pointer * into a (ApPlayItem*) pointer. * * Depending on the current debugging level, this function may invoke * certain runtime checks to identify invalid casts */ #define AP_PLAYITEM(playitem) (G_TYPE_CHECK_INSTANCE_CAST ((playitem), AP_TYPE_PLAYITEM, ApPlayItem)) /** * @brief Check whether a valid #ApPlayItem * pointer is of type #AP_TYPE_PLAYITEM. */ #define AP_IS_PLAYITEM(playitem) (G_TYPE_CHECK_INSTANCE_TYPE ((playitem), AP_TYPE_PLAYITEM)) /** * @brief This is opaque structure for a playitem type. * * All the fields in the #ApPlayItem structure are private to the #ApPlayItem * implementation and should never be accessed directly. */ typedef struct _ApPlayItem ApPlayItem; /** * @brief This is opaque structure for a playlist class. * * All the fields in the #ApPlayItemClass structure are private * to the #ApPlayItemClass implementation and should never be accessed directly. */ typedef struct _ApPlayItemClass ApPlayItemClass; struct _ApPlayItem { /* Parent object structure. * * The ap_object structure needs to be the first * element in the playitem structure in order for * the object mechanism to work correctly. This * allows a ApPlayItem pointer to be cast to a * ApObject pointer. */ ApObject ap_object; gchar *filename; gchar *title; gchar *artist; gchar *album; gchar *genre; gchar *comment; guint year; guint track; guint playtime; }; struct _ApPlayItemClass { /* Parent class structure. * * The ap_object class structure needs to be the first * element in the playitem class structure in order for * the class mechanism to work correctly. This allows a * ApPlayItemClass pointer to be cast to a ApObjectClass * pointer. */ ApObjectClass ap_object_class; }; GType ap_playitem_get_type (void) G_GNUC_CONST; ApPlayItem* ap_playitem_new (const gchar *filename); void ap_playitem_set_filename (ApPlayItem *playitem, const gchar *filename); void ap_playitem_set_title (ApPlayItem *playitem, const gchar *title); void ap_playitem_set_artist (ApPlayItem *playitem, const gchar *artist); void ap_playitem_set_album (ApPlayItem *playitem, const gchar *album); void ap_playitem_set_genre (ApPlayItem *playitem, const gchar *genre); void ap_playitem_set_comment (ApPlayItem *playitem, const gchar *comment); void ap_playitem_set_year (ApPlayItem *playitem, guint year); void ap_playitem_set_track (ApPlayItem *playitem, guint track); void ap_playitem_set_playtime (ApPlayItem *playitem, guint playtime); G_CONST_RETURN gchar* ap_playitem_get_filename (ApPlayItem *playitem); G_CONST_RETURN gchar* ap_playitem_get_title (ApPlayItem *playitem); G_CONST_RETURN gchar* ap_playitem_get_artist (ApPlayItem *playitem); G_CONST_RETURN gchar* ap_playitem_get_album (ApPlayItem *playitem); G_CONST_RETURN gchar* ap_playitem_get_genre (ApPlayItem *playitem); G_CONST_RETURN gchar* ap_playitem_get_comment (ApPlayItem *playitem); guint ap_playitem_get_year (ApPlayItem *playitem); guint ap_playitem_get_track (ApPlayItem *playitem); guint ap_playitem_get_playtime (ApPlayItem *playitem); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PLAYITEM_H__ */ alsaplayer-0.99.82/alsaplayer/prefs.h000066400000000000000000000044451466261456500175130ustar00rootroot00000000000000/* prefs.h - Preferences system header * Copyright (C) 2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * Inspired by xine's prefs * */ #ifndef __prefs_h__ #define __prefs_h__ #ifdef __cplusplus extern "C" { #endif struct _prefs_key { char *section; char *key; char *value; struct _prefs_key *next; }; typedef struct _prefs_key prefs_key_t; struct _prefs_handle { char *filename; int loaded; int count; prefs_key_t *keys; prefs_key_t *last; }; typedef struct _prefs_handle prefs_handle_t; prefs_handle_t *prefs_load(const char *filename); void prefs_free(prefs_handle_t *prefs); void prefs_set_int(prefs_handle_t *prefs, const char *section, const char *key, int val); void prefs_set_string(prefs_handle_t *prefs, const char *section, const char *key, const char *val); void prefs_set_float(prefs_handle_t *prefs, const char *section, const char *key, float val); void prefs_set_bool(prefs_handle_t *prefs, const char *section, const char *key, int val); int prefs_get_int(prefs_handle_t *prefs, const char *section, const char *key, int default_val); const char *prefs_get_string(prefs_handle_t *prefs, const char *section, const char *key, const char *default_val); float prefs_get_float(prefs_handle_t *prefs, const char *section, const char *key, float default_val); int prefs_get_bool(prefs_handle_t *prefs, const char *section, const char *key, int default_val); prefs_key_t* prefs_sort(prefs_handle_t *prefs); int prefs_save(prefs_handle_t *prefs); /* Global alsaplayer prefs handle. Only use if !NULL of course! */ extern prefs_handle_t *ap_prefs; #ifdef __cplusplus } /* extern "C" */ #endif #endif /* __prefs_h__ */ alsaplayer-0.99.82/alsaplayer/reader.h000066400000000000000000000121121466261456500176240ustar00rootroot00000000000000/* reader.h * Copyright (C) 2002 Evgeny Chukreev * Copyright (C) 2003 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __READER_H__ #define __READER_H__ #include /* * Format of version number is 0x1000 + version * So 0x1001 is *binary* format version 1 * THE VERSION NUMBER IS *NOT* A USER SERVICABLE PART! */ /** * The base version number of the reader plugin. Set at 0x1000. */ #define READER_PLUGIN_BASE_VERSION 0x1000 /** * The version of the reader plugin API. This should be incremented * whenever structural changes are made to the API. This value should * only be changed by the maintainers. */ #define READER_PLUGIN_VERSION (READER_PLUGIN_BASE_VERSION + 5) /** * reader plugin binary version. Must be set to READER_PLUGIN_VERSION */ typedef int reader_version_type; /** * Init plugin */ typedef int (*reader_init_type)(void); /** * Prepare the plugin for removal */ typedef void(*reader_shutdown_type)(void); /** * @param uri URI to stream * * Returns a rating between 0.0 and 1.0 for how * well this plugin can handle the given URI * 1.0 = Excellent * 0.0 = Huh? */ typedef float (*reader_can_handle_type)(const char *uri); typedef void (*reader_status_type)(void *data, const char *str); /** * @param uri URI of stream to open * @param status Callback function to report reader status. May be NULL * @param data Data pointer to pass to callback function. * * Open stream */ typedef void *(*reader_open_type)(const char *uri, reader_status_type status, void *data); /** * @param d stream descriptor (returned by reader_open_type function). * * Close stream */ typedef void(*reader_close_type)(void *d); /* TODO: describe */ typedef size_t (*reader_metadata_type)(void *d, size_t size, void *); typedef size_t (*reader_read_type)(void *ptr, size_t size, void *d); typedef int (*reader_seek_type)(void *d, long offset, int whence); typedef long (*reader_tell_type)(void *d); typedef long (*reader_length_type)(void *d); typedef int (*reader_eof_type)(void *d); typedef int (*reader_seekable_type)(void *d); typedef float (*reader_can_expand_type)(const char *uri); typedef char **(*reader_expand_type)(const char *uri); typedef struct _reader_plugin { /** * Must be set to INPUT_PLUGIN_VERSION */ reader_version_type version; /** * Should point the a character array containing the name of this plugin */ char *name; /** * Should point to a character array containing the name of the * author(s) of this plugin. */ char *author; /** * dlopen() handle of this plugin. Filled in by the HOST. */ void *handle; reader_init_type init; reader_shutdown_type shutdown; reader_can_handle_type can_handle; reader_open_type open; reader_close_type close; reader_read_type read; reader_metadata_type metadata; reader_seek_type seek; reader_tell_type tell; reader_can_expand_type can_expand; reader_expand_type expand; reader_length_type length; reader_eof_type eof; reader_seekable_type seekable; } reader_plugin; typedef struct _reader_type { void *fd; void *data; reader_plugin *plugin; } reader_type; void reader_init (void); /* ******************************** API for input plugins ************** */ #ifdef __cplusplus extern "C" { #endif int reader_can_handle (const char *uri); reader_type *reader_open (const char *uri, reader_status_type status, void *data); int reader_close (reader_type *h); size_t reader_metadata (reader_type *h, size_t size, void *); size_t reader_read (void *ptr, size_t size, reader_type *h); int reader_seek (reader_type *h, long offset, int whence); long reader_tell (reader_type *h); long reader_length (reader_type *h); int reader_seekable (reader_type *h); int reader_eof (reader_type *h); int reader_readline (reader_type *h, char *buf, int size); char **reader_expand (const char *uri); void reader_free_expanded (char **list); #ifdef __cplusplus } #endif /* ********************************************************************* */ /** * Every reader plugin should have an reader_plugin_info() function that * returns a pointer to an reader_plugin structure that is set up with * pointers to your implementations. If your plugin is compiled using * C++ make sure you 'extern "C"' the reader_plugin_info() function or * else the HOST will not be able to load the plugin. */ typedef reader_plugin *(*reader_plugin_info_type)(void); #ifdef __cplusplus extern "C" #endif reader_plugin * reader_plugin_info (void); #endif alsaplayer-0.99.82/alsaplayer/scope_config.h000066400000000000000000000015741466261456500210320ustar00rootroot00000000000000/* scope_config.h * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __scope_config_h__ #define __scope_config_h__ #include "scope_plugin.h" #include "utilities.h" #endif alsaplayer-0.99.82/alsaplayer/scope_plugin.h000066400000000000000000000160201466261456500210530ustar00rootroot00000000000000/* scope_plugin.h * Copyright (C) 1999-2002 Andy Lo A Foe * * This file is part of AlsaPlayer * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __scope_plugin_h__ #define __scope_plugin_h__ /* * Format of version number is 0x1000 + version * So 0x1001 is *binary* format version 1 * THE VERSION NUMBER IS *NOT* A USER SERVICABLE PART! */ /** * The base version number of the scope plugin. Set at 0x1000 */ #define SCOPE_PLUGIN_BASE_VERSION 0x1000 /** * The version of the scope plugin API. This should be increased * whenever structural changes are made to the API. This value should * only be changed by the maintainers. */ #define SCOPE_PLUGIN_VERSION (SCOPE_PLUGIN_BASE_VERSION + 7) /** * The default nice level scope plugins should be set at. Most scope plugins * are just eye candy and as such should not interfere with other processes * on your system. They should only use CPU cycles that would otherwise be * wasted. Setting the scopes to a nice level of 10 or higher pretty much * insures this. If you don't like this policy you can lower the value. Keep * in mind that negative values will only work if you run the HOST as root */ #define SCOPE_NICE 10 /** * The default sleep time in microseconds for scopes. After every render * iteration a scope should sleep for this amount of time. You should use the * dosleep() call i.e. dosleep(SCOPE_SLEEP). A value of 20000 will let scopes * run at 100000/20000 = 50 blocks per second. If the scopes are consuming * too much CPU consider raising this value. */ #define SCOPE_SLEEP 20000 /** * The value of the RED component of the default background * color for scope windows. Value should be from 0-255 */ #define SCOPE_BG_RED 0 /** * The value of the GREEN component of the default background * color for scope windows. Value should be from 0-255 */ #define SCOPE_BG_GREEN 0 /** * The value of the BLUE component of the default background * color for scope windows. Value should be from 0-255 */ #define SCOPE_BG_BLUE 0 /** * The API this scope was compiled against. It should always be set * to SCOPE_PLUGIN_VERSION. Failing to set this will most likely result * in a scope plugin that won't load. */ typedef int scope_version_type; /** * The init function of a scope plugin. This function should initialize * all data structures needed for the scope plugin. Return value should be * 1 on success, 0 if initialization fails. * * @param Set to NULL. This currently used for internal plugins only */ typedef int(*scope_init_type)(void *arg); /** * This function will be called when the HOST wants to activate the scope. * It should pop up the scope window and start rendering the PCM or FFT data */ typedef void(*scope_start_type)(void); /** * This function should tell the HOST if the scope is running i.e. on-screen * and rendering. A value of 1 should be returned if this is the case, 0 if * the scope is not active. */ typedef int(*scope_running_type)(void); /** * This function should stop and close the scope window if it was running. * It should just return if the scope is not running. */ typedef void(*scope_stop_type)(void); /** * The shutdown function is called just before the plugin is unloaded or just * before the HOST decides to exit. All data structures allocated in the init * routine should be freed here. */ typedef void(*scope_shutdown_type)(void); /** * @param buffer pointer to buffer data * @param count number of short (int16) samples in buffer * * The set_data function should be defined if your scope wants to get it hands * on PCM data. The format of the buffer is short (int16) interleaved stereo * data. A count value of 1024 means there are 2048 short samples in the * buffer. These samples are interleaved, so even sample positions are * from the left channel, uneven sample positions from the right channel. * The API will be changed to accommodate variable channels in the not too * distant future. */ typedef void(*scope_set_data_type)(void *buffer, int count); /** * @param buffer buffer with FFT values * @param samples number of FFT values per channel * @param channels number of channels * * This function should be defined if your scope wants to get FFT data. * The HOST typically calculates 256 FFT values per channel (going from * low frequency range to high). The value is betwee 0-256. The buffer format * is NON-interleaved int (int32). So if samples = 256 and channels = 2 then * there are 2 * 256 number of samples in the buffer. The first 256 are for * channel 1, the other 256 for channel 2. */ typedef void(*scope_set_fft_type)(void *buffer, int samples, int channels); /** * You should declare a scope_plugin variable and populate it with pointers * of the specific functions implemented by your scope */ typedef struct _scope_plugin { /** * Set to SCOPE_PLUGIN_VERSION */ scope_version_type version; /** * Point to a character array with the name of the scope */ char *name; /** * Point to a character array with the name of the author(s) of * the scope */ char *author; /** * Pointer to a dlopen() handle. This is filled in by the HOST. * Set to NULL. */ void *handle; /** * Should point to the implentation of your init() function. * Required by the HOST. */ scope_init_type init; /** * Should point to the implementation of your start() function. * Required by the HOST. */ scope_start_type start; /** * Should point to the implementation of your running() function. * Required by the HOST. */ scope_running_type running; /** * Should point to the implementation of your stop() function. * Required by the HOST. */ scope_stop_type stop; /** * Should point to the implementation of your shutdown() function. * Required by the HOST. */ scope_shutdown_type shutdown; /** Should point to the function that collects PCM data. If you * don't want PCM data set to NULL. */ scope_set_data_type set_data; /** Should point to the function that collects FFT data. If you * don't want FFT data set to NULL. NB. set_data and set_fft can't * both be NULL, at least one must be set. */ scope_set_fft_type set_fft; } scope_plugin; /** * Every scope plugin should have a scope_plugin_info() function that * returns a pointer to a scope_plugin structure that is filled with pointers * to your function implementations. */ typedef scope_plugin*(*scope_plugin_info_type)(void); #ifdef __cplusplus extern "C" #endif scope_plugin* scope_plugin_info(void); #endif alsaplayer-0.99.82/alsaplayer/stream_info.h000066400000000000000000000044111466261456500206730ustar00rootroot00000000000000 /* stream_info.h * Copyright (C) 2007 Peter Lemenkov * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __stream_info_h__ #define __stream_info_h__ #define SI_MAX_FIELD_LEN 128 #ifdef __linux__ #include #endif // __linux__ // some arch don't define PATH_MAX #ifndef PATH_MAX #define PATH_MAX 1024 #endif /** * This structure is used to describe a stream/song */ typedef struct _stream_info { /** * Should describe what type of stream this is (MP3, OGG, etc). May * also contain format data and things like sample rate. Text */ char stream_type[SI_MAX_FIELD_LEN+1]; /** * Author of the stream. Usually the name of the Artist or Band */ char artist[SI_MAX_FIELD_LEN+1]; /** * The song title. */ char title[SI_MAX_FIELD_LEN+1]; /** * The album name. */ char album[SI_MAX_FIELD_LEN+1]; /** * The genre of this song */ char genre[SI_MAX_FIELD_LEN+1]; /** * The year of this song */ char year[10]; /** * The track number of this song */ char track[10]; /** * The comment of this song */ char comment[SI_MAX_FIELD_LEN+1]; /** * The status of the plugin. Can have something like "Seeking..." * or perhaps "Buffering" depending on what the plugin instance is * doing. */ char status[SI_MAX_FIELD_LEN+1]; /** * The path of the stream */ char path[PATH_MAX+1]; /** * The number of channels */ int channels; /** * The number of tracks */ int tracks; /** * The current track; */ int current_track; /** * The sampling rate */ int sample_rate; /** * The bitrate */ int bitrate; } stream_info; #endif // __stream_info_h__ alsaplayer-0.99.82/alsaplayer/utilities.h000066400000000000000000000026751466261456500204120ustar00rootroot00000000000000/* utilities.h * Copyright (C) 1999 Richard Boulton * * This file is part of AlsaPlayer * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #ifndef __utilities_h__ #define __utilities_h__ #ifdef __cplusplus extern "C" { #endif // Magic macros for stringizing #define STRINGISE(a) _STRINGISE(a) // Not sure why this is needed, but // sometimes fails without it. #define _STRINGISE(a) #a // Now do the stringising // Sleep for specified number of micro-seconds // Used by scopes and things, so use C-style linkage void dosleep(unsigned int); void parse_file_uri_free(char *); void parse_percent_free(char *); char *get_homedir(void); char *get_prefsdir(void); char *parse_file_uri(const char *); char *parse_percent(const char *); int is_playlist(const char *); int is_uri(const char *); #ifdef __cplusplus } #endif #endif alsaplayer-0.99.82/app/000077500000000000000000000000001466261456500146375ustar00rootroot00000000000000alsaplayer-0.99.82/app/AlsaNode.cpp000066400000000000000000000270521466261456500170370ustar00rootroot00000000000000/* AlsaNode.cpp - AlsaNode virtual Node class * Copyright (C) 1999-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include "AlsaPlayer.h" #include "config.h" #include "prefs.h" #include #include #include #ifdef USE_REALTIME #include #endif #include #include #include #include #include #include "AlsaNode.h" #include "utilities.h" #include "alsaplayer_error.h" #include "ap_string.h" static const char *default_output_addons[] = { "alsa", "jack", "oss", "nas", "sparc", "sgi", "esound", "null", NULL }; extern void exit_sighandler(int); AlsaNode::AlsaNode(const char *name, const char *args, int realtime) { follow_id = 1; count = 0; plugin_count = 0; plugin = NULL; nr_fragments = fragment_size = external_latency = 0; init = false; thread_running = false; realtime_sched = realtime; sample_freq = OUTPUT_RATE; // Parse driver name,args if (name && *name) { ap_strlcpy(driver_name, name, sizeof (driver_name)); } if (args && *args) { ap_strlcpy(driver_args, args, sizeof (driver_args)); } for (int i = 0; i < MAX_SUB; i++) { memset(&subs[i], 0, sizeof(subscriber)); } if (global_session_name) snprintf(client_name, sizeof (client_name), "%s", global_session_name); else snprintf(client_name, sizeof (client_name), "alsaplayer-%d", getpid()); pthread_mutex_init(&thread_mutex, NULL); pthread_mutex_init(&queue_mutex, NULL); } AlsaNode::~AlsaNode() { StopStreaming(); assert(plugin); plugin->close(); if (driver_name) { driver_name [0] = 0; } if (driver_args) { driver_args [0] = 0; } } int AlsaNode::RegisterPlugin(const char *module) { char path[1024]; const char *pluginroot; void *our_handle; struct stat statbuf; output_plugin_info_type output_plugin_info; if (!global_pluginroot) pluginroot = ADDON_DIR; else pluginroot = global_pluginroot; if (module) { snprintf(path, sizeof(path), "%s/output/lib%s_out.so", pluginroot, module); if (stat(path, &statbuf) != 0) { return false; } if ((our_handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL))) { output_plugin_info = (output_plugin_info_type) dlsym(our_handle, "output_plugin_info"); if (output_plugin_info) { if (RegisterPlugin(output_plugin_info())) { return true; } dlclose(our_handle); alsaplayer_error("Failed to register plugin: %s", path); return false; } else { alsaplayer_error("Symbol error in shared object: %s", path); dlclose(our_handle); return false; } } else { alsaplayer_error("%s\n", dlerror()); } } else { for (int i = 0; default_output_addons[i]; i++) { snprintf(path, sizeof(path)-1, "%s/output/lib%s_out.so", pluginroot, default_output_addons[i]); if (stat(path, &statbuf) != 0) continue; if ((our_handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL))) { output_plugin_info = (output_plugin_info_type) dlsym(our_handle, "output_plugin_info"); if (output_plugin_info) { #ifdef DEBUG alsaplayer_error("Loading output plugin: %s", path); #endif if (RegisterPlugin(output_plugin_info())) { if (!ReadyToRun()) { alsaplayer_error("%s failed to init", path); continue; // This is not clean } return true; // Return as soon as we load one successfully! } else { alsaplayer_error("%s failed to load", path); } } else { alsaplayer_error("could not find symbol in shared object"); } dlclose(our_handle); } else { alsaplayer_error("%s\n", dlerror()); } } } // If we arrive here it means we haven't found any suitable output-addons alsaplayer_error ("\nI could not find a suitable output module on your\n" "system. Make sure they're in \"%s/output/\".\n" "Use the -o parameter to select one.\n", pluginroot); return false; } int AlsaNode::SetSamplingRate(int freq) { int actual_rate; assert(plugin); if ((actual_rate = plugin->set_sample_rate(freq))) { sample_freq = actual_rate; return actual_rate; } else { return 0; } } int AlsaNode::SetStreamBuffers(int frag_size, int frag_count, int channels) { assert(plugin); int size; int counter; int chans; size = frag_size; counter = frag_count; chans = channels; if (plugin->set_buffer(&size, &counter, &chans)) { nr_fragments = counter; fragment_size = size; return 1; } else { return 0; } } #define MAX_WRITE (64*1024) void AlsaNode::looper(void *pointer) { short *buffer_data = NULL; AlsaNode *node = (AlsaNode *)pointer; int read_size = node->GetFragmentSize(); bool status; signal(SIGINT, exit_sighandler); assert(node->plugin); buffer_data = new short [MAX_WRITE+1]; if (!buffer_data) { alsaplayer_error("Error allocating mix buffer"); return; } memset(buffer_data, 0, (MAX_WRITE+1) * sizeof (buffer_data [0])); #ifdef DEBUG alsaplayer_error("THREAD-%d=soundcard thread\n", getpid()); #endif #ifdef USE_REALTIME if (node->realtime_sched) { struct sched_param sp; memset(&sp, 0, sizeof(sp)); sp.sched_priority = sched_get_priority_max(SCHED_FIFO); if (sched_setscheduler(0, SCHED_FIFO, &sp) != 0) { if (node->fragment_size < 1024) { alsaplayer_error("***NOTE***: please consider scheduling real-time!"); } } else { mlockall(MCL_CURRENT); if (global_verbose) alsaplayer_error("real-time scheduling on"); } } #endif node->looping = true; read_size = node->GetFragmentSize(); if (read_size > MAX_WRITE) { alsaplayer_error("Fragment size too large. Exitting looper"); pthread_exit(NULL); } while (node->looping) { subscriber *i; int c; memset(buffer_data, 0, read_size * sizeof(short)); for (c = 0; c < MAX_SUB; c++) { i = &node->subs[c]; // Skip inactive streamers if (!i->active || !i->streamer) { continue; } //printf("streaming %d\n", i->ID); status = i->streamer(i->arg, buffer_data, read_size / sizeof(short)); if (status == false) { // Disable this streamer i->active = false; } } node->plugin->write(buffer_data, read_size); read_size = node->GetFragmentSize(); // Change on the fly } delete []buffer_data; //alsaplayer_error("Exitting looper thread..."); pthread_exit(NULL); } bool AlsaNode::IsInStream(int the_id) { int c; pthread_mutex_lock(&queue_mutex); for (c = 0; c < MAX_SUB; c++) { if (subs[c].ID == the_id) { pthread_mutex_unlock(&queue_mutex); return true; } } pthread_mutex_unlock(&queue_mutex); return false; } int AlsaNode::RegisterPlugin(output_plugin *the_plugin) { int version; if (plugin_count == MAX_OUTPUT_PLUGINS) { alsaplayer_error("Maximum number of output plugins reached (%d)", MAX_OUTPUT_PLUGINS); return 0; } output_plugin *tmp = &plugins[plugin_count]; tmp->version = the_plugin->version; if ((version = tmp->version) != OUTPUT_PLUGIN_VERSION) { alsaplayer_error("Wrong version on plugin (v%d, wanted v%d)", version - 0x1000, OUTPUT_PLUGIN_VERSION - 0x1000); return 0; } tmp->name = the_plugin->name; tmp->author = the_plugin->author; tmp->init = the_plugin->init; tmp->open = the_plugin->open; tmp->close = the_plugin->close; tmp->write = the_plugin->write; tmp->start_callbacks = the_plugin->start_callbacks; tmp->set_buffer = the_plugin->set_buffer; tmp->set_sample_rate = the_plugin->set_sample_rate; tmp->get_queue_count = the_plugin->get_queue_count; tmp->get_latency = the_plugin->get_latency; /* No longer ready to play. */ init = false; /* If we already have a plugin, close the old one. */ if (plugin) { //alsaplayer_error("Closing already opened plugin?!"); plugin->close(); } /* Remember this plugin - it's the one we're going to use. */ plugin = tmp; if (!plugin->init() || !plugin->open(driver_args)) { alsaplayer_error("Failed to initialize plugin!"); plugin = NULL; return 0; // Unclean but good enough for now } #if 0 /* Schedule realtime from this point on */ if (realtime_sched) { struct sched_param sp; memset(&sp, 0, sizeof(sp)); sp.sched_priority = sched_get_priority_max(SCHED_FIFO); if (sched_setscheduler(0, SCHED_FIFO, &sp) != 0) { alsaplayer_error("failed to set up real-time scheduling!"); } else { mlockall(MCL_CURRENT); alsaplayer_error("real-time scheduling on"); } } #endif /* If this is a callback based plugin, immediately start */ if (plugin->start_callbacks) { if (!plugin->start_callbacks(subs)) { plugin->close(); plugin = NULL; return 0; } } init = true; if (global_verbose) fprintf(stdout, "Output plugin: %s\n", plugin->name); return 1; } int AlsaNode::AddStreamer(streamer_type str, void *arg, int preferred_pos) { int c; subscriber *i; pthread_mutex_lock(&queue_mutex); switch (preferred_pos) { case POS_BEGIN: case POS_MIDDLE: for (c = 0; c < MAX_SUB; c++) { i = &subs[c]; if (!i->active) { // found an empty slot i->ID = follow_id++; i->streamer = str; i->arg = arg; i->active = true; // Default is stream directly count++; pthread_mutex_unlock(&queue_mutex); return i->ID; } } break; case POS_END: for (c = MAX_SUB-1; c >= 0; c--) { i = &subs[c]; if (!i->active) { // found an empty slot i->ID = follow_id++; i->streamer = str; i->arg = arg; i->active = true; // Default is stream directly count++; pthread_mutex_unlock(&queue_mutex); return i->ID; } } break; default: break; } alsaplayer_error("oversubscribed....!"); pthread_mutex_unlock(&queue_mutex); return -1; } bool AlsaNode::RemoveStreamer(int the_id) { int c; subscriber *i; pthread_mutex_lock(&queue_mutex); for (c = 0; c < MAX_SUB; c++) { i = &subs[c]; if (i->ID == the_id) { i->active = false; pthread_mutex_unlock(&queue_mutex); return true; } } alsaplayer_error("Streamer not found"); pthread_mutex_unlock(&queue_mutex); return false; } void AlsaNode::StartStreaming() { assert(plugin); if (plugin->start_callbacks) return; pthread_mutex_lock(&thread_mutex); if (thread_running) { //alsaplayer_error("Already looping..."); pthread_mutex_unlock(&thread_mutex); return; } //alsaplayer_error("Creating looper thread"); pthread_create(&looper_thread, NULL, (void * (*)(void *))looper, this); thread_running = true; pthread_mutex_unlock(&thread_mutex); } void AlsaNode::StopStreaming() { assert(plugin); if (plugin->start_callbacks) { return; } looping = false; pthread_mutex_lock(&thread_mutex); if (thread_running) { if (pthread_join(looper_thread, NULL)) { // Hmmm } thread_running = false; } pthread_mutex_unlock(&thread_mutex); } bool AlsaNode::ReadyToRun() { return init; } int AlsaNode::GetLatency() { int counter = 0; assert(plugin); //if (plugin->start_callbacks) { // return (fragment_size * nr_fragments); //} if (plugin->get_queue_count && (counter = plugin->get_queue_count()) >= 0) { return counter; } else if (plugin->get_latency && (counter = plugin->get_latency()) >= 0) { return counter; } else return (external_latency + ((nr_fragments-1) * fragment_size)); } alsaplayer-0.99.82/app/AlsaSubscriber.cpp000066400000000000000000000037041466261456500202530ustar00rootroot00000000000000/* AlsaSubscriber.cpp - Subscriber class to interface with AlsaNode * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include "AlsaSubscriber.h" #include #include #include #include #include #include #include #include #include #include #include #include AlsaSubscriber::AlsaSubscriber() { the_node = NULL; the_ID = -1; preferred_pos = POS_BEGIN; } AlsaSubscriber::~AlsaSubscriber() { if (the_node && the_node->IsInStream(the_ID)) ExitStream(); Unsubscribe(); } void AlsaSubscriber::Subscribe(AlsaNode *node, int pos) { the_node = node; preferred_pos = pos; } void AlsaSubscriber::Unsubscribe() { if (the_node && the_node->IsInStream(the_ID)) { the_node->RemoveStreamer(the_ID); } the_node = NULL; the_ID = -1; } void AlsaSubscriber::EnterStream(streamer_type str, void *arg) { if (the_node) { the_ID = the_node->AddStreamer(str, arg, preferred_pos); the_node->StartStreaming(); } } void AlsaSubscriber::ExitStream() { if (the_node && the_node->IsInStream(the_ID)) { if (!the_node->RemoveStreamer(the_ID)) { puts("ERROR! Failed to remove streamer"); } else { the_ID = -1; } } } alsaplayer-0.99.82/app/ControlSocket.cpp000066400000000000000000000421601466261456500201370ustar00rootroot00000000000000/* ControlSocket.cpp * Copyright (C) 2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include "AlsaPlayer.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "control.h" #include "message.h" #include "Playlist.h" #include "interface_plugin.h" #include "alsaplayer_error.h" #define MAX_AP_SESSIONS 1024 static pthread_t socket_thread; static int socket_thread_running = 0; struct socket_params { Playlist *playlist; interface_plugin *ui; }; static void socket_looper(void *arg) { int socket_fd = 0; struct socket_params *sp = (struct socket_params *)arg; Playlist *playlist = sp->playlist; PlayItem *item; interface_plugin *ui = sp->ui; CorePlayer *player; fd_set set; struct sockaddr_un saddr; stream_info info; char session_name[32]; char strnum[64]; char tmp[512]; long total_time; float *float_val; char *path; int32_t *int_val; socklen_t len; int fd; int fsize = 0; int session_id = 0; int session_ok = 0; int nr_requests = 0; int playlist_length = 0; int pc = 0; ap_message_t *msg; struct passwd *pwd; socket_thread_running = 1; if (!playlist) { alsaplayer_error("No playlist for control socket"); return; } pwd = getpwuid(geteuid()); if ((socket_fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { alsaplayer_error("Error setting up control socket"); return; } saddr.sun_family = AF_UNIX; while (session_id < MAX_AP_SESSIONS && !session_ok) { if (!ap_ping(session_id)) { snprintf(saddr.sun_path, sizeof (saddr.sun_path), "/tmp/alsaplayer_%s_%d", pwd == NULL ? "anonymous" : pwd->pw_name, session_id); unlink(saddr.sun_path); // Clean up a bit } else { // Live session so skip it immediately session_id++; continue; } snprintf(saddr.sun_path, sizeof (saddr.sun_path), "/tmp/alsaplayer_%s_%d", pwd == NULL ? "anonymous" : pwd->pw_name, session_id); if (bind(socket_fd, (struct sockaddr *) &saddr, sizeof (saddr)) != -1) { chmod(saddr.sun_path, 00600); // Force permission listen(socket_fd, 100); session_ok = 1; } else { session_id++; } } if (!session_ok) { alsaplayer_error("Out of alsaplayer sockets (MAX = %d)", MAX_AP_SESSIONS); return; } global_session_id = session_id; while (socket_thread_running) { FD_ZERO(&set); FD_SET(socket_fd, &set); len = sizeof (saddr); if ((select(socket_fd + 1, &set, NULL, NULL, NULL) <= 0) || ((fd = accept(socket_fd, (struct sockaddr *) &saddr, &len)) == -1)) continue; // So we have a connection msg = ap_message_receive(fd); // Check for broken connection if (!msg) { close(fd); continue; } // Check version if (msg->header.version != AP_CONTROL_VERSION) { alsaplayer_error("protocol version mismatch (server): %x != %x", msg->header.version, AP_CONTROL_VERSION); close(fd); continue; } ap_message_t *reply = ap_message_new(); //alsaplayer_error("server: got something (%x)", msg->header.cmd); player = playlist->GetCorePlayer(); nr_requests++; switch(msg->header.cmd) { case AP_PING: //alsaplayer_error("ping received"); ap_message_add_int32(reply, "pong", 10281975); ap_message_add_int32(reply, "ack", 1); break; case AP_ADD_AND_PLAY: if ((path = ap_message_find_string(msg, "path1"))) { playlist->AddAndPlay(strdup(path)); } playlist->UnPause(); ap_message_add_int32(reply, "ack", 1); break; case AP_SORT: if ((path = ap_message_find_string(msg, "seq"))) { playlist->Sort(path); } ap_message_add_int32(reply, "ack", 1); break; case AP_ADD_PATH: if ((path = ap_message_find_string(msg, "path1"))) { playlist->Insert(path, playlist->Length()); } ap_message_add_int32(reply, "ack", 1); break; case AP_ADD_PLAYLIST: if ((path = ap_message_find_string(msg, "path1"))) { playlist->Load(path, playlist->Length(), 0); } ap_message_add_int32(reply, "ack", 1); break; case AP_PLAY: if (player) { playlist->UnPause(); if (player->IsPlaying()) { if (player->GetSpeed() == 0.0) { player->SetSpeed(1.0); ap_message_add_int32(reply, "ack", 1); break; } player->Seek(0); ap_message_add_int32(reply, "ack", 1); break; } else { ap_message_add_int32(reply, "ack", player->Start() ? 1 : 0); break; } } ap_message_add_int32(reply, "ack", 0); break; case AP_NEXT: playlist->Next(); playlist->UnPause(); ap_message_add_int32(reply, "ack", 1); break; case AP_PREV: playlist->Prev(); playlist->UnPause(); ap_message_add_int32(reply, "ack", 1); break; case AP_JUMP_TO: if ((int_val = ap_message_find_int32(msg, "int"))) { playlist->Play(*int_val); playlist->UnPause(); ap_message_add_int32(reply, "ack", 1); } else { ap_message_add_int32(reply, "ack", 0); } break; case AP_SHUFFLE_PLAYLIST: playlist->Shuffle(); ap_message_add_int32(reply, "ack", 1); break; case AP_STOP: playlist->Stop(); ap_message_add_int32(reply, "ack", 1); break; case AP_PAUSE: playlist->Pause(); if (player) player->Pause(); ap_message_add_int32(reply, "ack", 1); break; case AP_UNPAUSE: playlist->UnPause(); if (player) player->UnPause(); ap_message_add_int32(reply, "ack", 1); break; case AP_CLEAR_PLAYLIST: playlist->Clear(); ap_message_add_int32(reply, "ack", 1); break; case AP_SAVE_PLAYLIST: if (getenv("HOME") == NULL) { ap_message_add_int32(reply, "ack", 0); } else { char save_path[PATH_MAX]; snprintf(save_path, sizeof(save_path)-1, "%s/.alsaplayer/latest.m3u", getenv("HOME")); playlist->Save(save_path, PL_FORMAT_M3U); ap_message_add_int32(reply, "ack", 1); } break; case AP_QUIT: // Woah, this is very dirty! XXX FIXME XXX if (ui) ui->stop(); break; case AP_SET_SPEED: if ((float_val=ap_message_find_float(msg, "speed"))) { player = playlist->GetCorePlayer(); if (player) { player->SetSpeed(*float_val); ap_message_add_int32(reply, "ack", 1); } } break; case AP_GET_SPEED: if (player) { ap_message_add_float(reply, "speed", player->GetSpeed()); ap_message_add_int32(reply, "ack", 1); } break; case AP_IS_PAUSED: ap_message_add_int32(reply, "int", playlist->IsPaused()); ap_message_add_int32(reply, "ack", 1); break; case AP_IS_PLAYING: if (player) { ap_message_add_int32(reply, "int", player->IsPlaying()); ap_message_add_int32(reply, "ack", 1); } break; case AP_IS_LOOPING: ap_message_add_int32(reply, "int", playlist->LoopingSong()); ap_message_add_int32(reply, "ack", 1); break; case AP_SET_LOOPING: if ((int_val = ap_message_find_int32(msg, "int"))) { if (*int_val) { playlist->LoopSong(); } else { playlist->UnLoopSong(); } ap_message_add_int32(reply, "ack", 1); } break; case AP_IS_ONEBYONE: ap_message_add_int32(reply, "int", playlist->IsOneByOne()); ap_message_add_int32(reply, "ack", 1); break; case AP_SET_ONEBYONE: if ((int_val = ap_message_find_int32(msg, "int"))) { if (*int_val) { playlist->SetOneByOne(); } else { playlist->UnSetOneByOne(); } ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_PLAYLIST: playlist->Lock(); playlist_length = playlist->Length(); ap_message_add_int32(reply, "items", playlist->Length()); for (pc=1; pc <= playlist_length; pc++) { snprintf(strnum, sizeof (strnum), "%d", pc); item = playlist->GetItem(pc); if (item->title.size()) { snprintf(tmp, sizeof (tmp), "%s %s", item->title.c_str(), item->artist.size() ? (std::string("- ") + item->artist).c_str() : ""); ap_message_add_string(reply, strnum, tmp); } else { snprintf(tmp, sizeof (tmp), "%s", item->filename.c_str()); path = strrchr(tmp, '/'); if (path) { path++; } else { path = tmp; } ap_message_add_string(reply, strnum, path); } } playlist->Unlock(); ap_message_add_int32(reply, "ack", 1); break; case AP_IS_PLAYLIST_LOOPING: ap_message_add_int32(reply, "int", playlist->LoopingPlaylist()); ap_message_add_int32(reply, "ack", 1); break; case AP_SET_PLAYLIST_LOOPING: if ((int_val = ap_message_find_int32(msg, "int"))) { if (*int_val) { playlist->LoopPlaylist(); } else { playlist->UnLoopPlaylist(); } ap_message_add_int32(reply, "ack", 1); } break; case AP_SET_VOLUME: if (player) { if ((float_val = ap_message_find_float(msg, "float"))) { player->SetVolume (*float_val); ap_message_add_int32(reply, "ack", 1); } } break; case AP_GET_VOLUME: if (player) { ap_message_add_float(reply, "float", player->GetVolume()); ap_message_add_int32(reply, "ack", 1); } break; case AP_SET_PAN: if (player) { if ((float_val = ap_message_find_float(msg, "float"))) { player->SetPan (*float_val); ap_message_add_int32(reply, "ack", 1); } } break; case AP_GET_PAN: if (player) { ap_message_add_float(reply, "float", player->GetPan()); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_TITLE: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.title); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_FILE_PATH: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.path); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_ARTIST: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.artist); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_ALBUM: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.album); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_COMMENT: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.comment); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_TRACKS: if (player) { ap_message_add_int32(reply, "int", player->GetTracks()); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_GENRE: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.genre); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_YEAR: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.year); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_TRACK_NUMBER: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.track); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_STREAM_TYPE: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.stream_type); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_STATUS: if (player) { player->GetStreamInfo(&info); ap_message_add_string(reply, "string", info.status); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_SESSION_NAME: if (global_session_name) { ap_message_add_string(reply, "string", global_session_name); } else { snprintf(session_name, sizeof (session_name), "alsaplayer-%d", global_session_id); ap_message_add_string(reply, "string", session_name); } ap_message_add_int32(reply, "ack", 1); break; case AP_GET_POS_SECOND: if (player) { ap_message_add_int32(reply, "int", player->GetCurrentTime() / 100); ap_message_add_int32(reply, "ack", 1); } break; case AP_SET_POS_SECOND_RELATIVE: if (player) { if ((int_val = ap_message_find_int32(msg, "int"))) { fsize = player->GetBlockSize(); if (fsize) { *int_val += ( player->GetCurrentTime() / 100); *int_val *= player->GetSampleRate(); *int_val /= fsize; *int_val *= player->GetChannels(); // *int_val *= 2; // 16-bit ("2" x 8-bit)a if (*int_val < 0) *int_val = 0; player->Seek(*int_val); } } } ap_message_add_int32(reply, "ack", 1); break; case AP_SET_POS_SECOND: if (player) { if ((int_val = ap_message_find_int32(msg, "int"))) { fsize = player->GetBlockSize(); if (fsize) { *int_val *= player->GetSampleRate(); *int_val /= fsize; *int_val *= player->GetChannels(); // *int_val *= 2; // 16-bit ("2" x 8-bit) player->Seek(*int_val); } } } ap_message_add_int32(reply, "ack", 1); break; case AP_GET_PLAYLIST_LENGTH: ap_message_add_int32(reply, "int", (int32_t)playlist->Length()); ap_message_add_int32(reply, "ack", 1); break; case AP_GET_SONG_LENGTH_SECOND: if (player) { total_time = player->GetCurrentTime(player->GetBlocks()); ap_message_add_int32(reply, "int", (int32_t)(total_time / 100)); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_SONG_LENGTH_BLOCK: if (player) { ap_message_add_int32(reply, "int", player->GetBlocks()); ap_message_add_int32(reply, "ack", 1); } break; case AP_GET_POS_BLOCK: if (player) { ap_message_add_int32(reply, "int", player->GetPosition()); ap_message_add_int32(reply, "ack", 1); } break; case AP_SET_POS_BLOCK: if (player) { if ((int_val = ap_message_find_int32(msg, "int"))) { player->Seek(*int_val); ap_message_add_int32(reply, "ack", 1); } } break; case AP_GET_PLAYLIST_POSITION: ap_message_add_int32(reply, "int", (int32_t)playlist->GetCurrent()); ap_message_add_int32(reply, "ack", 1); break; case AP_GET_FILE_PATH_FOR_TRACK: if((int_val = ap_message_find_int32(msg, "int"))) { if(0 < *int_val && *int_val <= playlist->Length()) { ap_message_add_string(reply, "string", playlist->GetQueue()[(*int_val)-1].filename.c_str()); ap_message_add_int32(reply, "ack", 1); } else { ap_message_add_int32(reply, "ack", 0); } } break; case AP_INSERT: if((int_val = ap_message_find_int32(msg, "int"))) { if(-1 < *int_val && *int_val <= playlist->Length()) { path = ap_message_find_string(msg, "string"); playlist->Insert(path, *int_val); ap_message_add_int32(reply, "ack", 1); } else { ap_message_add_int32(reply, "ack", 0); } } break; case AP_REMOVE: if((int_val = ap_message_find_int32(msg, "int"))) { if(0 < *int_val && *int_val <= playlist->Length()) { playlist->Remove(*int_val, *int_val); ap_message_add_int32(reply, "ack", 1); } else { ap_message_add_int32(reply, "ack", 0); } } break; case AP_SET_CURRENT: if((int_val = ap_message_find_int32(msg, "int"))) { if(0 < *int_val && *int_val <= playlist->Length()) { playlist->SetCurrent(*int_val); ap_message_add_int32(reply, "ack", 1); } else { ap_message_add_int32(reply, "ack", 0); } } break; default: alsaplayer_error("CMD unknown or not implemented= %x", msg->header.cmd); break; } //alsaplayer_error("Sending reply"); ap_message_send(fd, reply); ap_message_delete(reply); ap_message_delete(msg); close(fd); } if (global_verbose) { alsaplayer_error("control: received %ld requests", nr_requests); } unlink(saddr.sun_path); } void control_socket_start(Playlist *playlist, interface_plugin *ui) { static struct socket_params sp; sp.playlist = playlist; sp.ui = ui; pthread_create(&socket_thread, NULL, (void * (*)(void *))socket_looper, &sp); } void control_socket_stop() { socket_thread_running = 0; pthread_cancel(socket_thread); pthread_join(socket_thread, NULL); } alsaplayer-0.99.82/app/CorePlayer.cpp000066400000000000000000000745351466261456500174260ustar00rootroot00000000000000/* CorePlayer.cpp - Core player object, most of the hacking is done here! * Copyright (C) 1998-2003 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ /* Issues: - Things need to be cleaned up! */ #include "AlsaPlayer.h" #include "CorePlayer.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "Effects.h" #include "utilities.h" #include "alsaplayer_error.h" #include "ap_string.h" //#include "MetadataReader.h" //TODO // some arch don't define PATH_MAX #ifndef PATH_MAX #define PATH_MAX 1024 #endif extern void exit_sighandler(int); static char addon_dir[PATH_MAX]; int CorePlayer::plugin_count = 0; int CorePlayer::plugins_loaded = 0; pthread_mutex_t CorePlayer::plugins_mutex = PTHREAD_MUTEX_INITIALIZER; input_plugin CorePlayer::plugins[MAX_INPUT_PLUGINS]; void CorePlayer::Lock() { if (pthread_mutex_lock(&player_mutex)) alsaplayer_error("FIRE!!!!!"); } void CorePlayer::Unlock() { pthread_mutex_unlock(&player_mutex); } void CorePlayer::LockNotifiers() { pthread_mutex_lock(¬ifier_mutex); } void CorePlayer::UnlockNotifiers() { pthread_mutex_unlock(¬ifier_mutex); } void CorePlayer::RegisterNotifier(coreplayer_notifier *core_notif, void *data) { if (!core_notif) { alsaplayer_error("Notifier is NULL"); return; } if (data) core_notif->data = data; if (core_notif->speed_changed) core_notif->speed_changed(core_notif->data, GetSpeed()); if (core_notif->pan_changed) core_notif->pan_changed(core_notif->data, GetPan()); if (core_notif->volume_changed) core_notif->volume_changed(core_notif->data, GetVolume()); if (core_notif->position_notify) core_notif->position_notify(core_notif->data, GetPosition()); LockNotifiers(); notifiers.insert(core_notif); UnlockNotifiers(); } void CorePlayer::UnRegisterNotifier(coreplayer_notifier *core_notif) { if (!core_notif) return; LockNotifiers(); notifiers.erase(notifiers.find(core_notif)); UnlockNotifiers(); } void CorePlayer::load_input_addons() { char path[PATH_MAX]; DIR *dir; struct stat buf; dirent *entry; input_plugin_info_type input_plugin_info; snprintf(path, sizeof (path), "%s/input", addon_dir); memset(plugins, 0, sizeof(plugins)); if ((dir = opendir(path)) == NULL) return; while ((entry = readdir(dir)) != NULL) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } snprintf(path, sizeof (path), "%s/input/%s", addon_dir, entry->d_name); if (stat(path, &buf)) continue; if (!S_ISREG(buf.st_mode)) continue; void *handle; char *ext = strrchr(path, '.'); if (!ext) continue; ext++; if (strcasecmp(ext, "so")) continue; if ((handle = dlopen(path, RTLD_NOW |RTLD_GLOBAL)) == NULL) { alsaplayer_error("%s", dlerror()); continue; } input_plugin_info = (input_plugin_info_type) dlsym(handle, "input_plugin_info"); if (!input_plugin_info) { alsaplayer_error("Could not find input_plugin_info symbol in shared object `%s'", path); dlclose(handle); continue; } //alsaplayer_error("Loading input plugin: %s", path); input_plugin *the_plugin = input_plugin_info(); if (the_plugin) { the_plugin->handle = handle; } if (!RegisterPlugin(the_plugin)) { alsaplayer_error("Error loading %s", path); dlclose(handle); continue; } } closedir(dir); } CorePlayer::CorePlayer(AlsaNode *the_node) { int i; /* Init mutexes */ pthread_mutex_init(&counter_mutex, NULL); pthread_mutex_init(&player_mutex, NULL); pthread_mutex_init(¬ifier_mutex, NULL); pthread_cond_init(&producer_ready, NULL); producer_thread = 0; total_blocks = 0; streaming = false; producing = false; jumped = false; //plugin_count = 0; plugin = NULL; jump_point = repitched = write_buf_changed = 0; new_block_number = 0; read_direction = DIR_FORWARD; node = the_node; pitch = 1.0; sub = NULL; last_read = -1; input_rate = output_rate = 44100; SetSpeedMulti(1.0); SetSpeed(1.0); SetVolume(1.0); SetPan(0.0); buffer = NULL; the_object = NULL; save_speed = 0.0; // allocate ringbuffer partition pointer table if ((buffer = new sample_buf[NR_BUF]) == NULL) { alsaplayer_error("Out of memory in CorePlayer::CorePlayer"); exit(1); } for (i=0; i < NR_BUF; i++) { buffer[i].buf = new SampleBuffer(SAMPLE_STEREO, BUF_SIZE); if (buffer[i].buf == NULL) { alsaplayer_error("Out of memory in CorePlayer::CorePlayer"); exit(1); } // Set up next/prev pointers if (i > 0) { buffer[i].prev = &buffer[i-1]; buffer[i-1].next = &buffer[i]; } buffer[i].start = -1; } // Connect head and tail buffer[0].prev = &buffer[NR_BUF-1]; buffer[NR_BUF-1].next = &buffer[0]; //memset(plugins, 0, sizeof(plugins)); read_buf = write_buf = buffer; the_object = new input_object; the_object->ready = 0; pthread_mutex_init(&the_object->object_mutex, NULL); ap_strlcpy(addon_dir, ADDON_DIR, sizeof (addon_dir)); // Load the input addons pthread_mutex_lock(&plugins_mutex); if (!plugins_loaded) { plugins_loaded = 1; load_input_addons(); } #if !defined(EMBEDDED) if ((input_buffer = new char[128 * 1024]) == NULL) { alsaplayer_error("cannot allocate mix buffer"); exit(1); } #endif pthread_mutex_unlock(&plugins_mutex); } void CorePlayer::ResetBuffer() { for (int i=0; i < NR_BUF; i++) { buffer[i].start = -1; buffer[i].buf->Clear(); } } CorePlayer::~CorePlayer() { int i; UnregisterPlugins(); for (i=0; i < NR_BUF; i++) { delete buffer[i].buf; } pthread_mutex_destroy(&counter_mutex); pthread_mutex_destroy(&player_mutex); pthread_mutex_destroy(&the_object->object_mutex); delete []buffer; delete the_object; #if !defined(EMBEDDED) delete []input_buffer; #endif } void CorePlayer::UnregisterPlugins() { input_plugin *tmp; Stop(); Close(); Lock(); for (int i = 0; i < plugin_count; i++) { tmp = &plugins[i]; //alsaplayer_error("Unloading Input plugin: %s", tmp->name); if (tmp->handle) { //tmp->shutdown(); // Shutdown plugin dlclose(tmp->handle); tmp->handle = NULL; tmp = NULL; } } Unlock(); } int CorePlayer::RegisterPlugin(input_plugin *the_plugin) { int version; int error_count = 0; input_plugin *tmp; if (the_plugin->name == NULL) { alsaplayer_error("No name"); error_count++; } if (the_plugin->author == NULL) { alsaplayer_error("No author"); error_count++; } if (the_plugin->init == NULL) { alsaplayer_error("No init function"); error_count++; } if (the_plugin->can_handle == NULL) { alsaplayer_error("No can_handle function"); error_count++; } if (the_plugin->open == NULL) { alsaplayer_error("No open function"); error_count++; } if (the_plugin->close == NULL) { alsaplayer_error("No close function"); error_count++; } if (the_plugin->play_block == NULL) { alsaplayer_error("No play_block function"); error_count++; } if (the_plugin->block_seek == NULL) { alsaplayer_error("No block_seek function"); error_count++; } if (the_plugin->nr_blocks == NULL) { alsaplayer_error("No nr_blocks function"); error_count++; } if (the_plugin->frame_count == NULL) { alsaplayer_error("No frame_count function"); error_count++; } if (the_plugin->block_size == NULL) { alsaplayer_error("No block_size function"); error_count++; } if (the_plugin->channels == NULL) { alsaplayer_error("No channels function"); error_count++; } if (the_plugin->stream_info == NULL) { alsaplayer_error("No stream_info function"); // error_count++; // we don't require this function since generic metadata parsing } if (the_plugin->shutdown == NULL) { alsaplayer_error("No shutdown function"); error_count++; } if (error_count) { alsaplayer_error("At least %d error(s) were detected", error_count); return 0; } tmp = &plugins[plugin_count]; tmp->version = the_plugin->version; if (tmp->version) { if ((version = tmp->version) != INPUT_PLUGIN_VERSION) { alsaplayer_error("Wrong version number on plugin (v%d, wanted v%d)", version - INPUT_PLUGIN_BASE_VERSION, INPUT_PLUGIN_VERSION - INPUT_PLUGIN_BASE_VERSION); // this is a minor error actually // no need to stop there // return 0; } } tmp->name = the_plugin->name; tmp->author = the_plugin->author; tmp->init = the_plugin->init; tmp->can_handle = the_plugin->can_handle; tmp->open = the_plugin->open; tmp->close = the_plugin->close; tmp->play_block = the_plugin->play_block; tmp->block_seek = the_plugin->block_seek; tmp->block_size = the_plugin->block_size; tmp->nr_blocks = the_plugin->nr_blocks; tmp->block_to_sec = the_plugin->block_to_sec; tmp->sample_rate = the_plugin->sample_rate; tmp->channels = the_plugin->channels; tmp->stream_info = the_plugin->stream_info; tmp->shutdown = the_plugin->shutdown; tmp->nr_tracks = the_plugin->nr_tracks; tmp->track_seek = the_plugin->track_seek; if (!tmp->init()) { alsaplayer_error("Plugin failed to initialize (\"%s\")", tmp->name); return 0; } plugin_count++; if (global_verbose) alsaplayer_error("Loading Input plugin: %s", tmp->name); return 1; } int CorePlayer::GetCurrentTime(int block) { long result = 0; Lock(); if (plugin && the_object && the_object->ready) { result = plugin->block_to_sec(the_object, block < 0 ? GetPosition() : block); } Unlock(); if (result < 0) { alsaplayer_error("Huh, negative????"); } return (int)result; } int CorePlayer::GetPosition() { int result; if (jumped) // HACK! return jump_point; if (read_buf && plugin && the_object && the_object->ready) { if (read_buf->start < 0) return 0; int block_size = plugin->block_size(the_object); if (block_size) { result = (read_buf->start + (read_buf->buf->read_index * 4) / block_size); if (result < 0) { alsaplayer_error("Found the error!"); } return result; } else return 0; } else { return 0; } } int CorePlayer::GetBlocks() { int result = 0; Lock(); if (plugin && the_object && the_object->ready) result = plugin->nr_blocks(the_object); Unlock(); return result; } int CorePlayer::GetTracks() { int result = 0; Lock(); if (plugin && the_object && the_object->ready) { if (plugin->nr_tracks) { result = plugin->nr_tracks(the_object); } else { result = 1; } } Unlock(); return result; } int CorePlayer::GetChannels() { return 2; // Hardcoded for now } int CorePlayer::GetBlockSize() { int result = 0; Lock(); if (plugin && the_object && the_object->ready) result = plugin->block_size(the_object); Unlock(); return result; } int CorePlayer::GetSampleRate() { int result = 0; Lock(); if (plugin && the_object && the_object->ready) result = plugin->sample_rate(the_object); Unlock(); return result; } int CorePlayer::GetStreamInfo(stream_info *info) { int result = 0; memset(info, 0, sizeof(stream_info)); Lock(); if (plugin && plugin->stream_info && info && the_object) { result = plugin->stream_info(the_object, info); } if (plugin && info && the_object) { if (plugin->stream_info) { // plugin provides its own metadata parser result = plugin->stream_info(the_object, info); } else{ // we'll use generic metadata parser //TODO result = get_stream_info (the_object->path, info); } } Unlock(); return result; } // This is the first function to get documented. Believe it or not // it was the most difficult to get right! We absolutely NEED to have // a known state of all the threads of our object! bool CorePlayer::Start() { float result; int tries; if (IsPlaying()) return false; if (!node) { alsaplayer_error("CorePlayer does not have a node"); return false; } Lock(); // First check if we have a filename to play if (!the_object->ready) { Unlock(); return false; } producing = true; // So Read32() doesn't generate an error streaming = true; jumped = false; ResetBuffer(); last_read = -1; output_rate = node->SamplingRate(); input_rate = plugin->sample_rate(the_object); if (input_rate == output_rate) SetSpeedMulti(1.0); else SetSpeedMulti((float) input_rate / (float) output_rate); update_pitch(); write_buf_changed = 0; read_buf = write_buf; result = GetSpeed(); if (result < 0.0) { int start_block = plugin->nr_blocks(the_object) - 16; write_buf->start = start_block > 0 ? start_block : 0; SetDirection(DIR_BACK); } else { write_buf->start = 0; SetDirection(DIR_FORWARD); } pthread_create(&producer_thread, NULL, (void * (*)(void *))producer_func, this); // allow producer to actually start producing dosleep(20000); //alsaplayer_error("Prebuffering..."); // wait up to 4 seconds to get all (really: half) the PCM buffers filled tries = 100; while (--tries && (FilledBuffers() < NR_CBUF / 2) && producing) { //alsaplayer_error("Waiting for buffers..."); dosleep(40000); } sub = new AlsaSubscriber(); if (!sub) { alsaplayer_error("Subscriber creation failed :-(\n"); Unlock(); return false; } sub->Subscribe(node); //alsaplayer_error("Starting streamer thread..."); sub->EnterStream(streamer_func, this); Unlock(); // Notify std::set::const_iterator i; LockNotifiers(); for (i = notifiers.begin(); i != notifiers.end(); i++) { if ((*i)->start_notify) { (*i)->start_notify((*i)->data); } } UnlockNotifiers(); return true; } void CorePlayer::Stop() { Lock(); if (sub) { delete sub; sub = NULL; } producing = false; streaming = false; //alsaplayer_error("Signalling 6..."); pthread_cond_signal(&producer_ready); #ifdef DEBUG alsaplayer_error("Waiting for producer_thread to finish..."); #endif if (producer_thread) { if (pthread_join(producer_thread, NULL)) { alsaplayer_error("producer_thread not running..."); } } pthread_mutex_destroy(&counter_mutex); pthread_mutex_init(&counter_mutex, NULL); producer_thread = 0; //alsaplayer_error("producer_func is gone now..."); ResetBuffer(); Unlock(); // Notify std::set::const_iterator i; LockNotifiers(); for (i = notifiers.begin(); i != notifiers.end(); i++) { if ((*i)->stop_notify) { (*i)->stop_notify((*i)->data); } } UnlockNotifiers(); } void CorePlayer::SetVolume(float val) { if (val > 2.0) { alsaplayer_error("ERROR: volume out of bound (%.2f)", val); return; } volume = val; std::set::const_iterator i; LockNotifiers(); for (i = notifiers.begin(); i != notifiers.end(); i++) { if ((*i)->volume_changed) (*i)->volume_changed((*i)->data, volume); } UnlockNotifiers(); } void CorePlayer::SetPan(float val) { pan = val; std::set::const_iterator i; LockNotifiers(); for (i = notifiers.begin(); i != notifiers.end(); i++) { if ((*i)->pan_changed) (*i)->pan_changed((*i)->data, pan); } UnlockNotifiers(); } void CorePlayer::PositionUpdate() { std::set::const_iterator i; LockNotifiers(); for (i = notifiers.begin(); i != notifiers.end(); i++) { if ((*i)->position_notify) (*i)->position_notify((*i)->data, GetPosition()); } UnlockNotifiers(); } int CorePlayer::SetSpeed(float val) { if (val < 0.0 && !CanSeek()) val = 0.0; // Do not allow reverse play if we can't seek //alsaplayer_error("new speed = %.2f", val); pitch_point = val; repitched = 1; std::set::const_iterator i; LockNotifiers(); for (i = notifiers.begin(); i != notifiers.end(); i++) { if ((*i)->speed_changed) (*i)->speed_changed((*i)->data, pitch_point); } UnlockNotifiers(); return 0; } float CorePlayer::GetSpeed() { if (repitched) { // Pitch was changed so return this instead return pitch_point; } float ret_pitch = pitch / pitch_multi; return (read_direction == DIR_FORWARD ? ret_pitch : -ret_pitch); } bool CorePlayer::CanSeek() { if (plugin && the_object && the_object->ready) { if (the_object->flags & P_SEEK) return true; } return false; } int CorePlayer::Seek(int index) { jump_point = index; jumped = true; return 0; } int CorePlayer::BlockSeek(int index) { if (plugin && the_object && the_object->ready) index = plugin->block_seek(the_object, index); else index = -1; return index; } void CorePlayer::Close() { Lock(); if (plugin && the_object && the_object->ready) { free (the_object->path); the_object->ready = 0; plugin->close(the_object); } Unlock(); } // Find best plugin to play a file input_plugin * CorePlayer::GetPlayer(const char *path) { // Check we've got a path if (!*path) { return NULL; } float best_support = 0.0; input_plugin *best_plugin = NULL; // Go through plugins, asking them for (int i = 0; i < plugin_count; i++) { input_plugin *p = plugins + i; float sl = p->can_handle(path); if (sl > best_support) { best_support = sl; best_plugin = p; if (sl == 1.0) break; } } // Return best plugin, if there is one if(best_support <= 0.0) return NULL; return best_plugin; } bool CorePlayer::Open(const char *path) { input_plugin *best_plugin; int block_size = 0; Close(); if (path == NULL || strlen(path) == 0) { alsaplayer_error("No path supplied"); return false; } if ((best_plugin = GetPlayer(path)) == NULL) { alsaplayer_error("No suitable plugin found for \"%s\"", path); return false; } Lock(); the_object->local_data = NULL; if (best_plugin->open(the_object, path)) { if ((block_size = best_plugin->block_size(the_object)) > BUF_SIZE) { alsaplayer_error("CRITICAL ERROR: this plugin advertised a buffer size\n" "larger than %d bytes. This is not supported by AlsaPlayer!\n" "Contact the author to fix this problem.\n" "TECHNICAL: A possible solution is to divide the block size\n" "in 2 and double the number of effective blocks. This can be\n" "handled relatively easily in the plugin (hopefully).\n\n" "We will retreat, as chaos and despair await us on\n" "this chosen path........................................", BUF_SIZE); best_plugin->close(the_object); Unlock(); return false; } else { if (!block_size) { alsaplayer_error("No blocksize"); best_plugin->close(the_object); Unlock(); return false; } // result = true } } else { best_plugin->close(the_object); Unlock(); return false; } // Copy path into input_object structure for future use the_object->path = strdup (path); // including trailing \0 the_object->ready = 1; plugin = best_plugin; blocks_in_buffer = read_buf->buf->GetBufferSizeBytes(plugin->block_size(the_object)) / plugin->block_size(the_object); Unlock(); return true; } #ifdef DEBUG void print_buf(sample_buf *start) { sample_buf *c = start; for (int i = 0; i < NR_BUF; i++, c = c->next) { alsaplayer_error("%d ", c->start); } } #endif int CorePlayer::SetDirection(int direction) { sample_buf *tmp_buf; int buffers = 0; if (read_direction != direction) { tmp_buf = read_buf; switch(direction) { case DIR_FORWARD: while (buffers < NR_BUF-1 && tmp_buf->next->start == (tmp_buf->start + blocks_in_buffer)) { buffers++; tmp_buf = tmp_buf->next; } break; case DIR_BACK: while (buffers < NR_BUF-1 && tmp_buf->prev->start == (tmp_buf->start - blocks_in_buffer)) { buffers++; tmp_buf = tmp_buf->prev; } } new_write_buf = tmp_buf; new_block_number = new_write_buf->start; write_buf_changed = 1; read_direction = direction; //alsaplayer_error("Signalling...1"); pthread_cond_signal(&producer_ready); } return 0; } // return number of buffers already filled with (decoded) PCM data // int CorePlayer::FilledBuffers() { int result = 0; sample_buf *tmp = read_buf; if (read_buf == write_buf) { return 0; } switch (read_direction) { case DIR_FORWARD: while (tmp->next != write_buf) { tmp = tmp->next; result++; } break; case DIR_BACK: while (tmp->prev != write_buf) { tmp = tmp->prev; result++; } break; } return result; // We can't use a buffer that is potentially being written to // so a value of 1 should still return no buffers } void CorePlayer::update_pitch() { if (pitch_point < 0) { SetDirection(DIR_BACK); pitch = -pitch_point; } else { SetDirection(DIR_FORWARD); pitch = pitch_point; } pitch *= pitch_multi; repitched = 0; } /* FIXME: some documentation needed returns the number of samples put into output buffer negative return values indicate errors */ int CorePlayer::Read32(void *data, int samples) { if (repitched) { update_pitch(); } if (pitch == 0.0 || (read_buf == write_buf)) { if (write_buf->next->start == -2 || !producing) { return -2; } //alsaplayer_error("Nothing to play (spitting out silence)"); memset(data, 0, samples * 4); return samples; } int use_read_direction = read_direction; int *out_buf = (int *)data; int *in_buf = (int *)read_buf->buf->buffer_data; in_buf += read_buf->buf->read_index; int buf_index = 0; int tmp_index = 0; int check_index = read_buf->buf->read_index; int base_corr = 0; float use_pitch = pitch; if (jumped) { int i; jumped = false; new_write_buf = read_buf; // ---- Testing area ---- sample_buf *sb; for (i=0, sb = buffer; i < NR_BUF; i++, sb = sb->next) { sb->start = -1; sb->buf->Clear(); } // ---- Testing area ---- new_write_buf->start = jump_point; new_block_number = jump_point; write_buf_changed = 1; //alsaplayer_error("Signalling 2..."); pthread_cond_signal(&producer_ready); } #ifdef EMBEDDED // provide a fast path implementation for the common case (no pitch) if ((use_read_direction == DIR_FORWARD) && (use_pitch == 1.0)) { // calculate amount of samples available in current read buffer int samplesInBuffer = read_buf->buf->write_index - check_index; if (samplesInBuffer >= samples) { // copy the whole block (usually 4KB) at once memcpy(out_buf, in_buf, samples * 4); tmp_index = samples - 1; } else { if (samplesInBuffer <= 0) { memset(data, 0, samples * 4); return samples; } // use rest of current block if (samplesInBuffer) memcpy(out_buf, in_buf, samplesInBuffer * 4); // get next block read_buf = read_buf->next; //alsaplayer_error("Signalling 3..."); pthread_cond_signal(&producer_ready); read_buf->buf->SetReadDirection(DIR_FORWARD); read_buf->buf->ResetRead(); in_buf = (int *)read_buf->buf->buffer_data; check_index = samples - samplesInBuffer; memcpy(out_buf + samplesInBuffer, in_buf, (samples - samplesInBuffer) * 4); tmp_index = -1; } } else #endif if (use_read_direction == DIR_FORWARD) { while (buf_index < samples) { tmp_index = (int) ((float)use_pitch*(float)(buf_index-base_corr)); if ((check_index + tmp_index) > (read_buf->buf->write_index)-1) { if (read_buf->next->start < 0 || read_buf->next == write_buf) { if (read_buf->next->start == -2) { //alsaplayer_error("Next in queue (2)"); return -2; } memset(data, 0, samples * 4); if (!producing) { //alsaplayer_error("blah 1"); return -1; } return samples; } else if (read_buf->next->start != read_buf->start + blocks_in_buffer) { alsaplayer_error("------ WTF!!? %d - %d", read_buf->next->start, read_buf->start); } read_buf = read_buf->next; //alsaplayer_error("Signalling 4..."); pthread_cond_signal(&producer_ready); read_buf->buf->SetReadDirection(DIR_FORWARD); read_buf->buf->ResetRead(); in_buf = (int *)read_buf->buf->buffer_data; base_corr = buf_index; check_index = 0; // Recalc tmp_index = (int)((float)use_pitch*(float)(buf_index-base_corr)); } out_buf[buf_index++] = *(in_buf + tmp_index); } } else { // DIR_BACK while (buf_index < samples) { tmp_index = (int)((float)use_pitch*(float)(buf_index-base_corr)); if ((check_index - tmp_index) < 0) { if (read_buf->prev->start < 0 || read_buf->prev == write_buf) { // printf("Back (%d %d) ", FilledBuffers(), read_buf->prev->start); // print_buf(read_buf->prev); if (!producing) { //printf("blah 2\n"); return -1; } memset(data, 0, samples * 4); return samples; } read_buf = read_buf->prev; //alsaplayer_error("Signalling 5..."); pthread_cond_signal(&producer_ready); read_buf->buf->SetReadDirection(DIR_BACK); read_buf->buf->ResetRead(); int buf_size = read_buf->buf->write_index; in_buf = (int *)read_buf->buf->buffer_data; in_buf += (buf_size + (check_index - tmp_index)); base_corr = buf_index; check_index = buf_size-1; // Recalc tmp_index = (int)((float)use_pitch*(float)(buf_index-base_corr)); } out_buf[buf_index++] = *(in_buf - tmp_index); } } read_buf->buf->Seek(check_index + ((use_read_direction == DIR_FORWARD) ? tmp_index+1 : -((tmp_index+1) > check_index ? check_index : tmp_index+1))); if (!samples) alsaplayer_error("Humm, I copied nothing?"); return samples; } int CorePlayer::pcm_worker(sample_buf *dest, int start) { int result = 0; int blocks_read = 0; int samples_written = 0; short *sample_buffer; if (!dest || !the_object || !the_object->ready) { return -1; } int count = dest->buf->GetBufferSizeBytes(plugin->block_size(the_object)); dest->buf->Clear(); if (last_read != start) { BlockSeek(start); } if (start < 0) { return -1; } sample_buffer = dest->buf->buffer_data; while (count > 0 && producing) { if (!plugin->play_block(the_object, sample_buffer + samples_written)) { dest->start = start; #ifdef DEBUG alsaplayer_error("blocks read = %d", blocks_read); #endif count = 0; } else { samples_written += plugin->block_size(the_object); // OPTIMIZE! blocks_read++; } count -= plugin->block_size(the_object); } dest->start = start; last_read = dest->start + blocks_read; dest->buf->SetSamples(samples_written >> 1); // Check if rates are still the same if ((result = plugin->sample_rate(the_object)) != input_rate) { alsaplayer_error("WARNING: Sample rate changed in midstream (new = %d)", result); input_rate = result; SetSpeedMulti((float) input_rate / (float) output_rate); update_pitch(); } return blocks_read; } // fill PCM buffers with (decoded) data // void CorePlayer::producer_func(void *data) { CorePlayer *obj = (CorePlayer *)data; int blocks_read; #ifdef DEBUG alsaplayer_error("Starting new producer_func..."); #endif while (obj->producing) { if (obj->write_buf_changed) { obj->write_buf_changed = 0; obj->write_buf = obj->new_write_buf; obj->write_buf->start = obj->new_block_number; } // still at least one buffer left to fill? if (obj->FilledBuffers() < (NR_CBUF-1)) { //alsaplayer_error("producer: filling buffer"); switch (obj->read_direction) { case DIR_FORWARD: blocks_read = obj->pcm_worker(obj->write_buf, obj->write_buf->start); if (blocks_read != obj->blocks_in_buffer) { obj->producing = false; obj->write_buf->next->start = -2; } obj->write_buf = obj->write_buf->next; obj->write_buf->start = obj->write_buf->prev->start + obj->blocks_in_buffer; break; case DIR_BACK: blocks_read = obj->pcm_worker(obj->write_buf, obj->write_buf->start); if (blocks_read != obj->blocks_in_buffer) { if (obj->write_buf->start >= 0) alsaplayer_error("an ERROR occured or EOF (%d)", obj->write_buf->start); obj->write_buf->prev->start = -2; obj->producing = false; } obj->write_buf = obj->write_buf->prev; obj->write_buf->start = obj->write_buf->next->start - obj->blocks_in_buffer; break; } } else { //alsaplayer_error("producer: waiting for free buffer"); pthread_mutex_lock(&obj->counter_mutex); //alsaplayer_error("Waiting for a signal..."); pthread_cond_wait(&obj->producer_ready, &obj->counter_mutex); //alsaplayer_error("Got signalled..."); pthread_mutex_unlock(&obj->counter_mutex); //alsaplayer_error("producer: unblocked"); } } //alsaplayer_error("Exitting producer_func (producing = %d)", obj->producing); pthread_exit(NULL); } extern int global_bal; extern int global_vol_left; extern int global_vol_right; extern int global_vol; extern int global_pitch; extern int global_reverb_on; extern int global_reverb_delay; extern int global_reverb_feedback; #ifdef EMBEDDED // the simple streamer only handles a single stream with no software // volume/pan calculation; intended for slow systems/embedded system use bool CorePlayer::streamer_func(void *arg, void *data, int size) { CorePlayer *obj = (CorePlayer *)arg; if (obj->Read32(data, size / sizeof(short)) >= 0) return true; obj->streaming = false; return false; } #else bool CorePlayer::streamer_func(void *arg, void *data, int size) { CorePlayer *obj = (CorePlayer *)arg; int count; if ((count = obj->Read32(obj->input_buffer, size / sizeof(short))) >= 0) { float v, p, left, right; p = obj->pan; v = obj->volume; if (v != 1.0 || p != 0.0) { if (p == 0.0) { left = right = 1.0; } else if (p > 0) { right = 1.0; left = 1.0 - p; } else { left = 1.0; right = 1.0 + p; } if (v != 1.0) { left *= v; right *= v; } //printf("v = %d, p = %d, left = %d, right = %d\n", // p, v, left, right); volume_effect32(obj->input_buffer, count, left, right); } // Now add the data to the current stream int16_t *in_buffer; int16_t *out_buffer; int32_t level; in_buffer = (int16_t *)obj->input_buffer; out_buffer = (int16_t *)data; for (int i=0; i < size ; i++) { level = *(in_buffer++) + *out_buffer; if (level > 32767) level = 32767; else if (level < -32768) level = -32768; *(out_buffer++) = (int16_t) level; } return true; } else { //alsaplayer_error("Exiting from streamer_func..."); obj->streaming = false; return false; } } #endif bool CorePlayer::IsPaused() { return ((GetSpeed() == 0.0) ? true : false); } void CorePlayer::Pause() { save_speed = GetSpeed (); SetSpeed (0.0); } void CorePlayer::UnPause() { if (save_speed) SetSpeed (save_speed); else SetSpeed (1.0); } alsaplayer-0.99.82/app/Effects.cpp000066400000000000000000000076301466261456500167300ustar00rootroot00000000000000/* Effects.cpp - Various effects implementations, needs a cleanup * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include #include #include #include "Effects.h" static char buf[DELAY_BUF_SIZE]; static char cont_buf[MAX_CHUNK]; static int head = 0; void init_effects() { memset(buf, 0, sizeof(buf)); } extern "C" { void clear_buffer(void) { memset(buf, 0, sizeof(buf)); } } void buffer_effect(void *buffer, int size) { int tmp; char *input = (char *)buffer; if ((head + size) > DELAY_BUF_SIZE) { memcpy(buf + head, input, DELAY_BUF_SIZE - head); tmp = (DELAY_BUF_SIZE - head); memcpy(buf, (input + tmp), size - tmp); head = size - tmp; } else { memcpy(buf + head, input, size); head += size; } } void echo_effect32(void *buffer, int size, int delay, int vol) { int tail; int tmp; int gap = ((44100 * 2 * 2) / 1000) * delay; if (size % 4) { printf("Warning, size is not a multiple of 4\n"); } tail = (head - gap) < 0 ? DELAY_BUF_SIZE + (head - gap) : head - gap; short *s = (short *)(buf + tail); short *d = (short *)buffer; int i, v; if ((tail + size) > DELAY_BUF_SIZE) { tmp = DELAY_BUF_SIZE - tail; for (i = 0; i < tmp / 2; i++) { v = ((*(s++) * vol)/100) + *d; *(d++) = (v>32767) ? 32767 : ((v<-32768) ? -32768 : v); } tmp = size - (DELAY_BUF_SIZE - tail); s = (short *)buf; for (i = 0; i < tmp / 2; i++) { v = ((*(s++) * vol)/100) + *d; *(d++) = (v>32767) ? 32767 : ((v<-32768) ? -32768 : v); } } else { for (i = 0; i < size / 2; i++) { v = ((*(s++) * vol)/100) + *d; *(d++) = (v>32767) ? 32767 : ((v<-32768) ? -32768 : v); } } } void volume_effect32(void *buffer, int length, float left, float right) { short *data = (short *)buffer; if (right == -100.0) right=left; for (int i=0; i < length << 1; i+=2) { int v=(int) ((*(data) * (int)(left * 100)) / 100); *(data++)=(v>32767) ? 32767 : ((v<-32768) ? -32768 : v); v=(int) ((*(data) * (int)(right * 100)) / 100); *(data++)=(v>32767) ? 32767 : ((v<-32768) ? -32768 : v); } } char *delay_feed(int delay_bytes, int max_size) { int copy; int copied = 0; int use_head = head; //memset(cont_buf, 0xf, max_size); #if 1 if ((copy = use_head - delay_bytes) < 0) { // Wraparound to end of buffer copy = abs(copy); if (copy <= max_size) { memcpy(cont_buf, buf + DELAY_BUF_SIZE - copy, copy); copied+=copy; memcpy(&cont_buf[copy], buf, max_size - copy); copied+=(max_size - copy); } else { memcpy(cont_buf, buf + DELAY_BUF_SIZE - copy, max_size); copied+=max_size; } //printf("copied = %d\n", copied); return cont_buf; } #else if ((copy = (use_head - delay_bytes + max_size)) > DELAY_BUF_SIZE) { //printf("%d\n", DELAY_BUF_SIZE - (use_head - delay_bytes)); memcpy(cont_buf, &buf[use_head - delay_bytes], DELAY_BUF_SIZE - (use_head - delay_bytes)); memcpy(cont_buf + DELAY_BUF_SIZE - copy, buf, max_size - (DELAY_BUF_SIZE - copy)); return cont_buf; } #endif //memcpy(cont_buf, buf + use_head - delay_bytes, max_size); return (buf + use_head - delay_bytes); //return cont_buf; } alsaplayer-0.99.82/app/Main.cpp000066400000000000000000000671141466261456500162400ustar00rootroot00000000000000/* Main.cpp - main() function and other utils * Copyright (C) 1998-2004 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * VIM: set ts=8 * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef ENABLE_NLS #include #define _(String) gettext(String) #define N_(String) noop_gettext(String) #else #define _(String) (String) #define N_(String) String #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "AlsaPlayer.h" #include "SampleBuffer.h" #include "CorePlayer.h" #include "Playlist.h" #include "Effects.h" #include "input_plugin.h" #include "output_plugin.h" #include "interface_plugin.h" #include "utilities.h" #include "prefs.h" #include "alsaplayer_error.h" #include "message.h" #include "control.h" #include "reader.h" #include "ap_string.h" #define MAX_REMOTE_SESSIONS 32 Playlist *playlist = NULL; int global_reverb_on = 0; int global_reverb_delay = 2; int global_reverb_feedback = 0; int global_verbose = 0; int global_session_id = -1; int global_quiet = 0; char *global_session_name = NULL; char *global_interface_script = NULL; const char *global_pluginroot = NULL; prefs_handle_t *ap_prefs = NULL; void control_socket_start(Playlist *, interface_plugin *ui); void control_socket_stop(); static const char *default_pcm_device = "default"; extern "C" { /* This code was swiped from Paul Davis' JACK */ static void default_alsaplayer_error(const char *fmt, ...) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fputc('\n', stderr); } void (*alsaplayer_error) (const char *fmt, ...) = &default_alsaplayer_error; void alsaplayer_set_error_function(void (*func)(const char *, ...)) { alsaplayer_error = func; } }; /* extern "C" { */ void nonfatal_sighandler(int x) { alsaplayer_error("Warning: alsaplayer interrupted by signal %d", x); } void exit_sighandler(int x) { static int sigcount = 0; ++sigcount; if (sigcount == 1) { alsaplayer_error("alsaplayer interrupted by signal %d", x); exit(1); } if (sigcount > 5) { kill(getpid(), SIGKILL); } } interface_plugin_info_type load_interface(const char *name) { void *handle; char path[1024]; const char *pluginroot; struct stat statbuf; interface_plugin_info_type plugin_info; interface_plugin *ui; if (!global_pluginroot) pluginroot = ADDON_DIR; else pluginroot = global_pluginroot; if (!name) return NULL; if (strchr(name, '.')) ap_strlcpy(path, name, sizeof(path)); else snprintf(path, sizeof(path), "%s/interface/lib%s_interface.so", pluginroot, name); #ifdef DEBUG alsaplayer_error("Loading interface plugin: %s\n", path); #endif if (stat(path, &statbuf) != 0) // Error reading object return NULL; handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL); if (!handle) { alsaplayer_error("%s\n", dlerror()); return NULL; } plugin_info = (interface_plugin_info_type) dlsym(handle, "interface_plugin_info"); if (!plugin_info) { alsaplayer_error("symbol error in shared object: %s", path); dlclose(handle); return NULL; } interface_plugin *plugin = plugin_info(); if (plugin) plugin->handle = handle; ui = plugin_info(); if (ui->version != INTERFACE_PLUGIN_VERSION) { alsaplayer_error("Wrong interface plugin version (v%d, wanted v%d)", ui->version, INTERFACE_PLUGIN_VERSION - INTERFACE_PLUGIN_BASE_VERSION); alsaplayer_error("Error loading %s", path); alsaplayer_error("Please remove this file from your system"); return NULL; } return plugin_info; } extern int init_reverb(); extern bool reverb_func(void *arg, void *data, int size); static const char *copyright_string = "AlsaPlayer " VERSION "\n(C) 1999-2004 Andy Lo A Foe and others."; static void list_available_plugins(const char *plugindir) { char path[1024]; const char *pluginroot; struct stat buf; bool first = true; if (!plugindir) return; if (!global_pluginroot) pluginroot = ADDON_DIR; else pluginroot = global_pluginroot; snprintf(path, sizeof(path), "%s/%s", pluginroot, plugindir); DIR *dir = opendir(path); dirent *entry; if (!dir) return; while ((entry = readdir(dir)) != NULL) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } snprintf(path, sizeof(path), "%s/%s/%s", pluginroot, plugindir, entry->d_name); if (stat(path, &buf)) { continue; } if (S_ISREG(buf.st_mode)) { char *ext = strrchr(path, '.'); if (!ext) continue; ext++; if (strcasecmp(ext, "so")) { continue; } snprintf(path, sizeof(path), "%s", entry->d_name); ext = strrchr(path, '.'); if (ext) *ext = '\0'; if (strncmp(path, "lib", 3)) { continue; } char *name = path + 3; if (strcmp(plugindir, "output") == 0) { // Remove trailing _out ext = strrchr(name, '_'); if (ext) *ext = '\0'; } else if (strcmp(plugindir, "interface") == 0) { // Remove trailing _interface ext = strrchr(name, '_'); if (ext) *ext = '\0'; } if (first) { // don't print comma first = false; } else { printf(" | "); } printf("%s", name); } } } static void help() { printf( "\n" "Usage: alsaplayer [options] [filename ...]\n" "\n" "Available options:\n" "\n" " -c,--config file use given config file for this session\n" " -h,--help print this help message\n" " -i,--interface iface use specific interface [default=gtk2]. choices:\n"); printf( " [ "); list_available_plugins("interface"); printf( " ]\n" " -I,--script file script to pass to interface plugin\n" " -n,--session n use this session id [default=0]\n" " -l,--startvolume vol start with this volume [default=1.0]\n" " -p,--path path set the path alsaplayer looks for add-ons\n" " -q,--quiet quiet operation. less output\n" " -s,--session-name name name this session \"name\"\n" " -v,--version print version of this program\n" " --verbose be verbose about the output\n" " --nosave do not save playlist content at exit\n" "\n" "Player control (use -n to select a session other than the default):\n" "\n" " -e,--enqueue file(s) queue files in running alsaplayer\n" " -E,--replace file(s) clears and queues files in running alsaplayer\n" " --status get some information about session\n" " --volume vol set software volume [0.0-1.0]\n" " --start start playing\n" " --stop stop playing\n" " --pause pause/unpause playing\n" " --prev jump to previous track\n" " --next jump to next track\n" " --seek second jump to specified second in current track\n" " --relative second jump second seconds from current position\n" " --speed speed floating point speed parameter\n" " 1.0 = normal speed, -1.0 normal speed backwards\n" " --jump track jump to specified playlist track\n" " --looplist on|off switch playlist looping on or off [default off]\n" " --loopsong on|off switch song looping on or off [default off]\n" " -t,--onebyone on|off switch stop after each track on or off [default off]\n" " -S,--shuffle shuffle playlist\n" " --clear clear whole playlist\n" " --quit quit session\n" "\n" "Sound driver options:\n" "\n" " -d,--device string select specific device in output plugin\n" " for the ALSA plugin: [default=\"default\"]\n" " for the JACK plugin: [default=\"alsa_pcm:playback_1,alsa_pcm:playback_2\"]\n" " -f,--fragsize n fragment size in bytes [default=4096]\n" " -F,--frequency n output frequency in Hz [default=%d]\n" " -g,--fragcount n fragment count [default=8]\n" " -r,--realtime enable realtime scheduling (with proper rights)\n" " -o,--output output use specific output driver [default=alsa]. choices:\n", OUTPUT_RATE); printf( " [ "); list_available_plugins("output"); printf( " ]\n" "\n" "Experimental options:\n" "\n" " -x,--crossfade crossfade playlist entries\n" "\n"); } static void version() { printf("%s %s\n", PACKAGE, VERSION); } static int get_interface_from_argv0 (char *argv0, char *str) { char *bs = strrchr (argv0, '/'); if (bs) argv0 = ++bs; if (sscanf(argv0, "alsaplayer-%s", str) == 1) return 1; if (sscanf(argv0, "jackplayer-%s", str) == 1) return 1; return 0; } int main(int argc, char **argv) { const char *device_param = default_pcm_device; char *prefsdir; char thefile[1024]; char str[1024]; float start_vol = 1.0; int ap_result = 0; int use_fragsize = -1; // Initialized int use_fragcount = -1; // later int do_loopsong = 0; int do_looplist = 0; int do_enqueue = 0; int do_replace = 0; int do_realtime = 0; int do_remote_control = 0; int do_shuffle = 0; int do_start = 0; int do_stop = 0; int do_prev = 0; int do_next = 0; int do_pause = 0; int do_jump = -1; int do_clear = 0; int do_seek = -1; int do_relative = 0; int do_setvol = 0; int do_quit = 0; int do_status = 0; int do_speed = 0; float speed_val = 0.0; int do_onebyone = 0; int use_freq = OUTPUT_RATE; float use_vol = 1.0; int use_session = 0; int do_crossfade = 0; int do_save = 1; int bool_val = 0; const char *use_output = NULL; char *use_interface = NULL; char *use_config = NULL; char *use_loopsong = NULL; char *use_onebyone = NULL; char *use_looplist = NULL; int opt; int option_index; const char *options = "Cc:d:eEf:F:g:hi:J:I:l:n:NMp:qrs:vRSQVxo:"; struct option long_options[] = { /* { "long_option", take_argument, 0, 'short_option' }, */ { "config", 1, 0, 'c' }, { "device", 1, 0, 'd' }, { "enqueue", 0, 0, 'e' }, { "replace", 0, 0, 'E' }, { "fragsize", 1, 0, 'f' }, { "frequency", 1, 0, 'F' }, { "fragcount", 1, 0, 'g' }, { "help", 0, 0, 'h' }, { "interface", 1, 0, 'i' }, { "volume", 1, 0, 'Y' }, { "session", 1, 0, 'n' }, { "nosave", 0, 0, 'N' }, { "path", 1, 0, 'p' }, { "quiet", 0, 0, 'q' }, { "realtime", 0, 0, 'r' }, { "script", 1, 0, 'I'}, { "session-name", 1, 0, 's' }, { "version", 0, 0, 'v' }, { "verbose", 0, 0, 'V' }, { "reverb", 0, 0, 'R' }, { "loopsong", 1, 0, 'L' }, { "looplist", 1, 0, 'P' }, { "crossfade", 0, 0, 'x' }, { "output", 1, 0, 'o' }, { "stop", 0, 0, 'U' }, { "pause", 0, 0, 'O' }, { "start", 0, 0, 'T' }, { "shuffle", 0, 0, 'S' }, { "prev", 0, 0, 'Q' }, { "next", 0, 0, 'M' }, { "jump", 1, 0, 'J' }, { "seek", 1, 0, 'X' }, { "relative", 1, 0, 'Z' }, { "speed", 1, 0, 'H' }, { "clear", 0, 0, 'C' }, { "startvolume", 1, 0, 'l' }, { "quit", 0, 0, 'A' }, { "status", 0, 0, 'B' }, { "onebyone", 1, 0, 't' }, // Options that we want to be able to pass on to gtk_init(). See man // gtk-options(7). // Give all of these an option number of 128 because we're going to // ignore them option switch statement anyway. { "gtk-module", 1, 0, 128 }, { "gtk-debug", 1, 0, 128 }, { "gtk-no-debug", 1, 0, 128 }, { "g-fatal-warnings", 0, 0, 128 }, { "display", 1, 0, 128 }, { "screen", 1, 0, 128 }, { "sync", 0, 0, 128 }, { "no-xshm", 0, 0, 128 }, { "name", 1, 0, 128 }, { "class", 1, 0, 128 }, { "gxid_host", 1, 0, 128 }, { "gxid_port", 1, 0, 128 }, { "xim-preedit", 0, 0, 128 }, { "xim-status", 0, 0, 128 }, { "gdk-debug", 1, 0, 128 }, { "gdk-no-debug", 1, 0, 128 }, // End of list marker. { 0, 0, 0, 0 } }; // First setup signal handler signal(SIGPIPE, nonfatal_sighandler); // PIPE (socket control) signal(SIGTERM, exit_sighandler); // kill signal(SIGHUP, exit_sighandler); // kill -HUP / xterm closed signal(SIGINT, exit_sighandler); // Interrupt from keyboard signal(SIGQUIT, exit_sighandler); // Quit from keyboard // fatal errors signal(SIGBUS, exit_sighandler); // bus error //signal(SIGSEGV, exit_sighandler); // segfault signal(SIGILL, exit_sighandler); // illegal instruction signal(SIGFPE, exit_sighandler); // floating point exc. signal(SIGABRT, exit_sighandler); // abort() // Enable locale support #ifdef ENABLE_NLS setlocale (LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); bind_textdomain_codeset (PACKAGE, "UTF-8"); #endif // Init global mutexes pthread_mutex_init(&playlist_sort_seq_mutex, NULL); #if !defined(EMBEDDED) init_effects(); #endif // Init random number generator std::srand(time(0)); while ((opt = getopt_long(argc, argv, options, long_options, &option_index)) != EOF) { switch(opt) { case 'A': do_remote_control = 1; do_quit = 1; break; case 'B': do_remote_control = 1; do_status = 1; break; case 'c': if (strlen(optarg) < 1023) { use_config = optarg; } else { alsaplayer_error("config file path too long"); return 1; } break; case 'd': device_param = optarg; break; case 'E': do_replace = 1; case 'e': do_enqueue = 1; break; case 'f': use_fragsize = atoi(optarg); if (!use_fragsize) { alsaplayer_error("invalid fragment size"); return 1; } if (use_fragsize > 32768) { alsaplayer_error("fragment size (%d) out of range (0-32768)", use_fragsize); return 1; } break; case 'F': use_freq = atoi(optarg); if (use_freq < 8000 || use_freq > 48000) { alsaplayer_error("frequency (%d) out of range (8000-48000)", use_freq); return 1; } break; case 'g': use_fragcount = atoi(optarg); if (use_fragcount < 2 || use_fragcount > 128) { alsaplayer_error("fragcount (%d) out of range (2-128)", use_fragcount); return 1; } break; case 'h': help(); return 0; case 'H': if ((sscanf(optarg, "%f", &speed_val))) { do_remote_control = 1; do_speed = 1; } break; case 'i': use_interface = optarg; break; case 'l': start_vol = atof(optarg); if (start_vol < 0.0 || start_vol > 1.0) { alsaplayer_error("volume (%.3f) out of range: using 1.0", start_vol); start_vol = 1.0; } break; case 'L': do_remote_control = 1; do_loopsong = 1; use_loopsong = optarg; break; case 'Y': do_remote_control = 1; do_setvol = 1; use_vol = atof(optarg); if (use_vol < 0.0 || use_vol > 1.0) { alsaplayer_error("volume (%.3f) out of range: using 1.0", use_vol); use_vol = 1.0; } break; case 'n': use_session = atoi(optarg); break; case 'N': do_save = 0; break; case 'O': do_remote_control = 1; do_pause = 1; break; case 'p': global_pluginroot = optarg; break; case 'q': global_quiet = 1; break; case 'r': do_realtime = 1; break; case 's': if (strlen(optarg) < 32) { global_session_name = strdup(optarg); } else { alsaplayer_error("max 32 char session name, ignoring"); } break; case 'v': version(); return 0; case 'V': global_verbose = 1; break; case 'R': break; case 'P': do_remote_control = 1; do_looplist = 1; use_looplist = optarg; break; case 'x': do_crossfade = 1; break; case 'o': use_output = optarg; break; case '?': return 1; case 'I': global_interface_script = optarg; break; case 'U': do_remote_control = 1; do_stop = 1; break; case 'T': do_remote_control = 1; do_start = 1; break; case 'S': do_remote_control = 1; do_shuffle = 1; break; case 'Q': do_remote_control = 1; do_prev = 1; break; case 'M': do_remote_control = 1; do_next = 1; break; case 'J': do_remote_control = 1; do_jump = atoi(optarg); break; case 'C': do_remote_control = 1; do_clear = 1; break; case 'X': do_remote_control = 1; do_seek = atoi(optarg); break; case 'Z': do_remote_control = 1; do_relative = 1; do_seek = atoi(optarg); break; case 't': do_remote_control = 1; do_onebyone = 1; use_onebyone = optarg; break; case 128: // Gtk-option which we ignore. break; default: alsaplayer_error("Unknown option '%c'", opt); break; } } prefsdir = get_prefsdir(); mkdir(prefsdir, 0700); /* XXX We don't do any error checking here */ snprintf(thefile, sizeof(thefile)-21, "%s/config", prefsdir); if (use_config) ap_prefs = prefs_load(use_config); else ap_prefs = prefs_load(thefile); if (!ap_prefs) { alsaplayer_error("Invalid config file %s\n", use_config ? use_config : thefile); return 1; } /* Initialize some settings (and populate the prefs system if needed */ if (use_fragsize < 0) use_fragsize = prefs_get_int(ap_prefs, "main", "period_size", 4096); if (use_fragcount < 0) use_fragcount = prefs_get_int(ap_prefs, "main", "period_count", 8); if (global_verbose) puts(copyright_string); if (!global_pluginroot) { global_pluginroot = strdup (ADDON_DIR); } if (use_session == 0) { for (; use_session < MAX_REMOTE_SESSIONS+1; use_session++) { ap_result = ap_session_running(use_session); if (ap_result) break; } if (use_session == (MAX_REMOTE_SESSIONS+1)) { //alsaplayer_error("No remote session found"); if (do_remote_control) { alsaplayer_error("No active sessions"); return 1; } do_enqueue = 0; } else { //alsaplayer_error("Found session %d", use_session); if (prefs_get_bool(ap_prefs, "main", "multiopen", 1) == 0) { // We should not spawn another alsaplayer //alsaplayer_error("Using session %d, not doing multiopen", use_session); do_enqueue = 1; do_replace = 1; } } } // Check if we're in remote control mode if (do_remote_control) { if (do_quit) { ap_quit(use_session); return 0; } else if (do_status) { char res[1024]; float fres; int ires; fprintf(stdout, "---------------- Session ----------------\n"); if (ap_get_session_name(use_session, res) && strlen(res)) fprintf(stdout, "name: %s\n", res); if (ap_get_playlist_length(use_session, &ires)) fprintf(stdout, "playlist_length: %d\n", ires); if (ap_get_volume(use_session, &fres)) fprintf(stdout, "volume: %.2f\n", fres); if (ap_get_speed(use_session, &fres)) fprintf(stdout, "speed: %d%%\n", (int)(fres * 100)); fprintf(stdout, "-------------- Current Track ------------\n"); if (ap_get_artist(use_session, res) && strlen(res)) fprintf(stdout, "artist: %s\n", res); if (ap_get_title(use_session, res) && strlen(res)) fprintf(stdout, "title: %s\n", res); if (ap_get_album(use_session, res) && strlen(res)) fprintf(stdout, "album: %s\n", res); if (ap_get_genre(use_session, res) && strlen(res)) fprintf(stdout, "genre: %s\n", res); if (ap_get_file_path(use_session, res) && strlen(res)) fprintf(stdout, "path: %s\n", res); if (ap_get_blocks(use_session, &ires)) fprintf(stdout, "blocks: %d\n", ires); if (ap_get_length(use_session, &ires)) fprintf(stdout, "length: %d second%s\n", ires, (ires == 1) ? "": "s"); if (ap_get_position(use_session, &ires)) fprintf(stdout, "position: %d\n", ires); fprintf(stdout, "-----------------------------------------\n"); return 0; } else if (do_setvol) { ap_set_volume(use_session, use_vol); return 0; } else if (do_shuffle) { ap_shuffle_playlist(use_session); return 0; } else if (do_start) { ap_play(use_session); return 0; } else if (do_stop) { ap_stop(use_session); return 0; } else if (do_pause) { if (ap_is_paused(use_session, &bool_val)) { if (bool_val) ap_unpause(use_session); else ap_pause(use_session); } return 0; } else if (do_next) { ap_next(use_session); return 0; } else if (do_prev) { ap_prev(use_session); return 0; } else if (do_jump >= 0) { ap_jump_to(use_session, do_jump); return 0; } else if (do_clear) { ap_clear_playlist(use_session); return 0; } else if (do_relative) { if (do_seek != 0) ap_set_position_relative(use_session, do_seek); return 0; } else if (do_speed) { if (speed_val < -10.0 || speed_val > 10.0) { alsaplayer_error("Speed out of range, must be between -10.00 and 10.00"); return 1; } ap_set_speed(use_session, speed_val); return 0; } else if (do_seek >= 0) { ap_set_position(use_session, do_seek); return 0; } else if (do_loopsong) { if (strcasecmp(use_loopsong, "on") != 0) { do_loopsong = false; } ap_set_looping(use_session, do_loopsong); return 0; } else if (do_onebyone) { if (strcasecmp(use_onebyone, "on") != 0) { do_onebyone = false; } ap_set_onebyone(use_session, do_onebyone); return 0; } else if (do_looplist) { if (strcasecmp(use_looplist, "on") != 0) { do_looplist = false; } ap_set_playlist_looping(use_session, do_looplist); return 0; } else alsaplayer_error("No remote control command executed."); } // Check if we need to enqueue the files if (do_enqueue) { char queue_name[2048]; int count = 0; int was_playing = 0; int playlist_length = 0; count = optind; ap_result = 1; if (do_replace && count < argc) { ap_is_playing(use_session, &was_playing); if (was_playing) { ap_stop(use_session); } ap_clear_playlist(use_session); } else { ap_get_playlist_length(use_session, &playlist_length); if (!playlist_length) { // Empty list so fire up after add was_playing = 1; } } while (count < argc && ap_result) { if (is_playlist(argv[count])) { ap_add_playlist(use_session, argv[count]); count++; continue; } if (argv[count][0] != '/' && strncmp(argv[count], "http://", 7) != 0 && strncmp(argv[count], "ftp://", 6) != 0) { // Not absolute so append cwd if (getcwd(queue_name, 1024) == NULL) { alsaplayer_error("error getting cwd"); return 1; } ap_strlcat(queue_name, "/", sizeof(queue_name)); ap_strlcat(queue_name, argv[count], sizeof(queue_name)); } else ap_strlcpy(queue_name, argv[count], sizeof(queue_name)); count++; //alsaplayer_error("Adding %s", queue_name); ap_result = ap_add_path(use_session, queue_name); //alsaplayer_error("ap_result = %d", ap_result); } if (was_playing) ap_jump_to(use_session, 1); if (ap_result) return 0; } AlsaNode *node; // Check if we want jack if (strcmp(argv[0], "jackplayer") == 0) { use_output = "jack"; } // Check the output option if (use_output == NULL) { use_output = prefs_get_string(ap_prefs, "main", "default_output", "alsa"); } // Else do the usual plugin based thing node = new AlsaNode(use_output, device_param, do_realtime); if (!node->RegisterPlugin(use_output)) { alsaplayer_error("Failed to load output plugin \"%s\". Trying defaults.", use_output); if (!node->RegisterPlugin()) return 1; } int output_is_ok = 0; int output_alternate = 0; do { if (!node || !node->ReadyToRun()) { alsaplayer_error ("failed to load output plugin (%s). exitting...", use_output ? use_output: "alsa,etc."); return 1; } if (!node->SetSamplingRate(use_freq) || !node->SetStreamBuffers(use_fragsize, use_fragcount, 2)) { alsaplayer_error ("failed to configure output device...trying OSS"); /* Special case for OSS, since it's easiest to get going, so try it */ if (!output_alternate) { output_alternate = 1; node->RegisterPlugin("oss"); continue; } else { return 1; } } output_is_ok = 1; /* output device initialized */ } while (!output_is_ok); // Initialise reader reader_init (); // Initialise playlist - must be done before things try to register with it playlist = new Playlist(node); if (!prefs_get_bool(ap_prefs, "main", "play_on_start", false)) playlist->Pause(); else playlist->UnPause(); if (!playlist) { alsaplayer_error("Failed to create Playlist object"); return 1; } // Add any command line arguments to the playlist if (optind < argc) { std::vector < std::string > newitems; while (optind < argc) { if (is_playlist(argv[optind])) { if (global_verbose) alsaplayer_error("Loading playlist (%s)", argv[optind]); playlist->Load(std::string(argv[optind++]), playlist->Length(), false); } else { newitems.push_back(std::string(argv[optind++])); } } playlist->Insert(newitems, playlist->Length()); } else { prefsdir = get_prefsdir(); snprintf(thefile, sizeof(thefile)-28, "%s/alsaplayer.m3u", prefsdir); playlist->Load(thefile, playlist->Length(), false); } // Loop song if (do_loopsong) { playlist->LoopSong(); } // Loop Playlist if (do_looplist) { playlist->LoopPlaylist(); } // Play songs one by one if (do_onebyone) { playlist->SetOneByOne(); } // Cross fading if (do_crossfade) { playlist->Crossfade(); } // Set start volume playlist->GetCorePlayer()->SetVolume(start_vol); interface_plugin_info_type interface_plugin_info; interface_plugin *ui; if (get_interface_from_argv0 (argv[0], str)) use_interface = str; if (use_interface && *use_interface) { if (!(interface_plugin_info = load_interface(use_interface))) { alsaplayer_error("Failed to load interface %s\n", use_interface); goto _fatal_err; } } else { const char *interface = prefs_get_string (ap_prefs, "main", "default_interface", "gtk2"); // if we're trying to use the old gtk-1 interface, use gtk-2 instead if (strcmp (interface, "gtk") == 0) interface = "gtk2"; // if we're trying to use the gtk interface, but we have no // $DISPLAY, use the text interface instead if (strcmp (interface, "gtk2") == 0 && !getenv("DISPLAY")) interface = "text"; if (!(interface_plugin_info = load_interface(interface))) { if (!(interface_plugin_info = load_interface(prefs_get_string (ap_prefs, "main", "fallback_interface", "text")))) { alsaplayer_error("Failed to load text interface. This is bad (%s,%s,%s)", interface, interface, global_pluginroot); goto _fatal_err; } } } if (interface_plugin_info) { ui = interface_plugin_info(); if (global_verbose) printf("Interface plugin: %s\n", ui->name); if (!ui->init()) { alsaplayer_error("Failed to load interface plugin. Should fall back to text\n"); } else { control_socket_start(playlist, ui); ui->start(playlist, argc, argv); ui->close(); // Unfortunately gtk+ is a pig when it comes to // cleaning up its resources; it doesn't! // so we can never safely dlclose gtk+ based // user interfaces, bah! //dlclose(ui->handle); control_socket_stop(); } } // Save playlist before exit prefsdir = get_prefsdir(); snprintf(thefile, sizeof(thefile)-25, "%s/alsaplayer", prefsdir); playlist->Save(thefile, PL_FORMAT_M3U); // Save preferences if (ap_prefs && do_save) { if (prefs_save(ap_prefs) < 0) { alsaplayer_error("failed to save preferences."); } } _fatal_err: delete playlist; //delete p; delete node; if (global_session_name) free(global_session_name); return 0; } alsaplayer-0.99.82/app/Makefile.am000066400000000000000000000024151466261456500166750ustar00rootroot00000000000000## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ## If you would like to negotiate alternate licensing terms, you may do ## so by contacting the author: Andy Lo A Foe ## if ARCH_ULTRA SUN_LIBS = -lresolv endif LIBS = -lpthread -ldl $(SUN_LIBS) COMMON_FLAGS = @DFLAGS@ -D_REENTRANT -DADDON_DIR=\"$(ADDON_DIR)\" AM_CPPFLAGS = -I../intl -I$(top_srcdir)/intl \ -I$(top_srcdir)/alsaplayer -I$(top_srcdir)/libalsaplayer AM_CFLAGS = $(COMMON_FLAGS) $(AM_CPPFLAGS) AM_CXXFLAGS = $(COMMON_FLAGS) $(AM_CPPFLAGS) bin_PROGRAMS = alsaplayer localedir = $(datadir)/locale alsaplayer_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" alsaplayer_LDFLAGS = -export-dynamic alsaplayer_SOURCES = AlsaSubscriber.cpp \ AlsaNode.cpp Effects.cpp \ Main.cpp CorePlayer.cpp Playlist.cpp \ SampleBuffer.cpp \ reverbst.cpp \ fft.c convolve.c utilities.c \ ControlSocket.cpp \ prefs.c reader.cpp alsaplayer_LDADD = $(top_builddir)/libalsaplayer/libalsaplayer.la jackplayer: ln -s alsaplayer jackplayer alsaplayer-0.99.82/app/Playlist.cpp000066400000000000000000000636351466261456500171610ustar00rootroot00000000000000/* PlayList.cpp - playlist window 'n stuff * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include #include #include #include #include #include #include #include #include "Playlist.h" #include "CorePlayer.h" #include "utilities.h" #include "config.h" #include "alsaplayer_error.h" #include "reader.h" #define READBUFSIZE 1024 #define MAXLOADFAILURES 100 #define MAXRECURSEDEPTH 10 static void additems(std::vector *items, std::string path, int depth); // Pointer to sequence of sorting fields. // This is temporary variable, it is valid while Sort function active. // Meaning of chars: // a - sort by artist in descending direction, // A - sort by astist in ascending direction, // l - sort by album in descending direction, // L - sort by album in ascending direction, // t - sort by title in descending direction, // T - sort by title in ascending direction, // y - sort by year in descending direction, // Y - sort by year in ascending direction, // n - sort by track number in descending direction, // N - sort by track number in ascending direction, // c - sort by comment in descending direction, // C - sort by comment in ascending direction, // f - sort by filename in descending direction, // F - sort by filename in ascending direction, // g - sort by genre in descending direction, // G - sort by genre in ascending direction, // p - sort by playtime in descending direction, // P - sort by playtime in ascending direction. static const char *sort_seq; #define DESCENDING 0 #define ASCENDING 1 #define COMPARE(WHAT,DIRECTION) { int rc = a.WHAT.compare(b.WHAT); \ if (rc == 0) continue; \ return (DIRECTION == DESCENDING) ? rc > 0 : rc < 0; } // Function is similar to strcmp, but this is for PlayItem type. // This function uses sort_seq variable. Also this function should // be keept optimized for speed. static int sort_comparator (const PlayItem &a, const PlayItem &b) { int ai, bi; // For each kind of sorting field for (const char *t = sort_seq; *t; t++) { switch (*t) { case 't': // Compare titles, descending COMPARE(title, DESCENDING); case 'T': // Compare titles, ascending COMPARE(title, ASCENDING); case 'a': // Compare artists, descending COMPARE(artist, DESCENDING); case 'A': // Compare artists, ascending COMPARE(artist, ASCENDING); case 'l': // Compare albums, descending COMPARE(album, DESCENDING); case 'L': // Compare albums, ascending COMPARE(album, ASCENDING); case 'g': // Compare genres, descending COMPARE(genre, DESCENDING); case 'G': // Compare genres, ascending COMPARE(genre, ASCENDING); case 'f': // Compare filenames, descending COMPARE(filename, DESCENDING); case 'F': // Compare filenames, ascending COMPARE(filename, ASCENDING); case 'c': // Compare comments, descending COMPARE(comment, DESCENDING); case 'C': // Compare comments, ascending COMPARE(comment, ASCENDING); case 'y': // Compare years, descending ai = atoi (a.year.c_str ()); bi = atoi (b.year.c_str ()); if (ai == bi) continue; return ai > bi; case 'Y': // Compare years, ascending ai = atoi (a.year.c_str ()); bi = atoi (b.year.c_str ()); if (ai == bi) continue; return ai < bi; case 'n': // Compare tracks, descending ai = atoi (a.track.c_str ()); bi = atoi (b.track.c_str ()); if (ai == bi) continue; return ai > bi; case 'N': // Compare tracks, ascending ai = atoi (a.track.c_str ()); bi = atoi (b.track.c_str ()); if (ai == bi) continue; return ai < bi; case 'p': // Compare playtimes, descending if (a.playtime == b.playtime) continue; return a.playtime > b.playtime; case 'P': // Compare playtimes, ascending if (a.playtime == b.playtime) continue; return a.playtime < b.playtime; } } // Don't sort return 0; } /* end of: sort_comparator */ // Since sort_seq variable is a global variable, it should be locked when it is in use // This variable should be initialized when the program started. pthread_mutex_t playlist_sort_seq_mutex; void info_looper(Playlist *playlist) { CorePlayer *myplayer; stream_info info; int t_sec, count; std::set::const_iterator i; std::set::const_iterator j; if (!playlist) return; myplayer = new CorePlayer(NULL); if (!myplayer) return; std::vector::iterator p = playlist->queue.begin(); count = 0; while (playlist->active) { //playlist->Lock (); const char *path; if (p >= playlist->queue.end()) { /* Playlist cleared, shrinked or its an end of list */ //playlist->Unlock (); break; } if (!(*p).Parsed()) { path = (*p).filename.c_str(); if (path && !strstr(path, "http://") && myplayer->Open((*p).filename.c_str())) { // Examine file t_sec = myplayer->GetCurrentTime(myplayer->GetBlocks()); if (t_sec) { t_sec /= 100; (*p).playtime = t_sec; } else { (*p).playtime = -1; } if (myplayer->GetStreamInfo(&info)) { (*p).title = info.title; (*p).artist = info.artist; (*p).album = info.album; (*p).genre = info.genre; (*p).year = info.year; (*p).track = info.track; (*p).comment = info.comment; } myplayer->Close(); } (*p).SetParsed(); // Notify interface of update playlist->LockInterfaces(); if (playlist->interfaces.size() > 0) { for(i = playlist->interfaces.begin(); i != playlist->interfaces.end(); i++) { (*i)->CbUpdated((*p), count); } } if (playlist->cinterfaces.size() > 0) { for (j = playlist->cinterfaces.begin(); j != playlist->cinterfaces.end(); j++) { (*j)->cbupdated((*j)->data, (*p), count); } } playlist->UnlockInterfaces(); } p++; count++; //playlist->Unlock (); } delete myplayer; //alsaplayer_error("exit info_looper()"); } void playlist_looper(void *data) { #ifdef DEBUG printf("THREAD-%d=playlist thread\n", getpid()); #endif /* DEBUG */ Playlist *pl = (Playlist *)data; CorePlayer *coreplayer; if(!pl) return; while(pl->active) { if (!pl->IsPaused()) { if (!(coreplayer = (CorePlayer *)(pl->coreplayer))) return; if (!coreplayer->IsActive()) { if (pl->Length()) { if (pl->LoopingSong()) { pl->Play(pl->GetCurrent()); } else { pl->Next(); if(pl->IsOneByOne()) { pl->Stop(); } } // TODO? set a flag to skip the dosleep() } } if (pl->Crossfading() && pl->Length() && pl->coreplayer->GetSpeed() >= 0.0) { // Cross example // Calc the block to sec value int nr_blocks = coreplayer->GetBlocks(); int totaltime = coreplayer->GetCurrentTime(nr_blocks); float blocktime = (float)totaltime / (float)nr_blocks; float xstart = 300; // 3.0 seconds float xblock = xstart / blocktime; //alsaplayer_error("xblock = %.2f", xblock); if ((coreplayer->GetBlocks() - coreplayer->GetPosition()) < (int)xblock) { if (pl->player1->IsActive() && pl->player2->IsActive()) { alsaplayer_error("Stopping players in playlist_looper"); pl->player1->Stop(); pl->player2->Stop(); } if (pl->player1->IsActive()) { pl->player2->SetSpeed(pl->coreplayer->GetSpeed()); pl->coreplayer = pl->player2; } else { pl->player1->SetSpeed(pl->coreplayer->GetSpeed()); pl->coreplayer = pl->player1; } pl->Next(); // TODO? set a flag to skip the dosleep() } } } // Update the position: notifier information pl->coreplayer->PositionUpdate(); dosleep(200000); } } class PlInsertItems { public: Playlist *playlist; std::vector items; unsigned position; PlInsertItems(Playlist *pl) { playlist = pl; } }; // Thread which performs an insert to playlist void insert_looper(void *data) { std::set::const_iterator i; std::set::const_iterator j; PlInsertItems * items = (PlInsertItems *)data; Playlist *playlist = items->playlist; // Stop the list being changed while we add these items playlist->Lock(); // First vetting of the list, and recurse through directories std::vector vetted_items; std::vector::const_iterator k = items->items.begin(); while(k != items->items.end() && playlist->active) { additems(&(vetted_items), *k++, MAXRECURSEDEPTH); } std::vector newitems; if(vetted_items.size() > 0) { char cwd[PATH_MAX + 1]; std::vector::const_iterator path; if (!getcwd(cwd, PATH_MAX)) { alsaplayer_error("Failed to get current working directory"); cwd[0] = 0; } // Check items for adding to list for(path = vetted_items.begin(); path != vetted_items.end() && playlist->active; path++) { // Check that item is valid if(!playlist->CanPlay(*path)) { //alsaplayer_error("Can't find a player for `%s'\n", path->c_str()); } else { newitems.push_back(PlayItem(*path)); } } } // Check position is valid if(playlist->queue.size() < items->position) { items->position = playlist->queue.size(); } // Add to list playlist->queue.insert(playlist->queue.begin() + items->position, newitems.begin(), newitems.end()); if(playlist->curritem > items->position) playlist->curritem += newitems.size(); if(playlist->curritem == 0) { playlist->curritem = 1; } // Tell the subscribing interfaces about the changes playlist->LockInterfaces(); if(playlist->interfaces.size() > 0) { for(i = playlist->interfaces.begin(); i != playlist->interfaces.end(); i++) { (*i)->CbInsert(newitems, items->position); (*i)->CbSetCurrent(playlist->curritem); } } if (playlist->cinterfaces.size() > 0) { for (j = playlist->cinterfaces.begin(); j != playlist->cinterfaces.end(); j++) { (*j)->cbinsert((*j)->data, newitems, items->position); (*j)->cbsetcurrent((*j)->data, playlist->curritem); } } playlist->UnlockInterfaces(); // Free the list again /* Metadate gathering is disabled for now. It completely * breaks streaming and it was never very efficient. A complete * reimplementation will follow shortly */ if (playlist->active) info_looper(playlist); playlist->Unlock(); delete items; } void Playlist::LockInterfaces() { pthread_mutex_lock(&interfaces_mutex); } void Playlist::UnlockInterfaces() { pthread_mutex_unlock(&interfaces_mutex); } // Playlist class Playlist::Playlist(AlsaNode *the_node) { our_node = the_node; player1 = new CorePlayer(the_node); player2 = new CorePlayer(the_node); if (!player1 || !player2) { puts("Cannot create player objects in Playlist constructor"); return; } coreplayer = player1; curritem = 0; active = true; total_time = total_size = 0; UnPause(); UnLoopSong(); // Default values UnLoopPlaylist(); // for looping UnCrossfade(); // and crossfading pthread_mutex_init(&playlist_mutex, NULL); pthread_mutex_init(&interfaces_mutex, NULL); pthread_mutex_init(&playlist_load_mutex, NULL); pthread_create(&playlist_thread, NULL, (void * (*)(void *))playlist_looper, this); } Playlist::~Playlist() { active = false; pthread_join(playlist_thread, NULL); interfaces.clear(); // Unregister all interfaces if (player1) delete player1; if (player2) delete player2; Lock(); Unlock(); pthread_mutex_destroy(&playlist_mutex); } // Return number of items in playlist int Playlist::Length() { return queue.size(); } // Request to move to specified item void Playlist::Play(unsigned item) { std::set::const_iterator i; std::set::const_iterator j; Lock(); if(item < 1) item = 1; if(item <= queue.size()) { curritem = item; PlayFile(queue[curritem - 1]); } else { curritem = queue.size(); Stop(); } LockInterfaces(); // Tell the subscribing interfaces about the change if(interfaces.size() > 0) { for(i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbSetCurrent(curritem); } } if (cinterfaces.size() > 0) { for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbsetcurrent((*j)->data, curritem); } } UnlockInterfaces(); Unlock(); } // Request to move to next item void Playlist::Next() { std::set::const_iterator i; std::set::const_iterator j; Lock(); unsigned olditem = curritem; if(queue.size() > 0) { if(curritem < queue.size()) { curritem++; PlayFile(queue[curritem - 1]); } else if (curritem == queue.size()){ if (LoopingPlaylist()){ curritem = 1; PlayFile(queue[curritem -1]); } else { Stop(); // Close track } } } //puts("Notifying playlists..."); // Tell the subscribing interfaces about the change if (curritem != olditem) { if (interfaces.size() > 0) { for (i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbSetCurrent(curritem); } } if (cinterfaces.size() > 0) { for (j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbsetcurrent((*j)->data, curritem); } } } Unlock(); } // Request to move to previous item void Playlist::Prev() { std::set::const_iterator i; std::set::const_iterator j; Lock(); unsigned olditem = curritem; if(curritem > queue.size()) { curritem = queue.size(); } if(curritem > 1) { curritem--; } if(curritem != 0) { PlayFile(queue[curritem - 1]); } // Tell the subscribing interfaces about the change if(curritem != olditem) { if(interfaces.size() > 0) { for(i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbSetCurrent(curritem); } } if (cinterfaces.size() > 0) { for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbsetcurrent((*j)->data, curritem); } } } Unlock(); } void Playlist::Lock() { pthread_mutex_lock(&playlist_mutex); } void Playlist::Unlock() { pthread_mutex_unlock(&playlist_mutex); } // Request to put a new item at end of playlist void Playlist::Insert(std::vector const & paths, unsigned position) { // Prepare to do insert PlInsertItems * items = new PlInsertItems(this); items->position = position; // Copy list std::vector::const_iterator i = paths.begin(); while(i != paths.end()) { items->items.push_back(*i++); } insert_looper(items); } // Add some items start them playing void Playlist::AddAndPlay(std::vector const &paths) { // There is a possible concurrency problem here, if we're trying // to insert items into the playlist at the same time as this is // called - the other new items could get inserted after the Play() // call, but before our items, causing the wrong ones to be played // However, this is sufficiently unlikely in practice, and fiddly // to fix, (and relatively harmless) that we can ignore it. // Move current play point to off end of list (stops play) int next_pos = Length() + 1; // Now add the new items Insert(paths, Length()); // Wait for insert to finish Play(next_pos); } void Playlist::SetCurrent(unsigned pos) { std::set::const_iterator i; std::set::const_iterator j; Lock(); curritem = pos; // Tell the subscribing interfaces about the change if(interfaces.size() > 0) { for(i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbSetCurrent(curritem); } } if(cinterfaces.size() > 0) { for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbsetcurrent((*j)->data, curritem); } } Unlock(); } // Remove tracks from position start to end inclusive void Playlist::Remove(unsigned start, unsigned end) { bool restart = 0; std::set::const_iterator i; std::set::const_iterator j; if(start > end) { unsigned tmp = end; end = start; start = tmp; } Lock(); if(start < 1) start = 1; if(start > queue.size()) start = queue.size(); if(end < 1) end = 1; if(end > queue.size()) end = queue.size(); queue.erase(queue.begin() + start - 1, queue.begin() + end); if (curritem >= start) { if(curritem > end) { curritem -= (end + 1 - start); } else { curritem = start; restart = 1; } } else if (queue.size() == 0) { curritem = 0; restart = 1; } // Tell the subscribing interfaces about the change if (interfaces.size() > 0) { for(i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbRemove(start, end); if (!restart) (*i)->CbSetCurrent(curritem); } } if (cinterfaces.size() > 0) { for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbremove((*j)->data, start, end); if (!restart) (*j)->cbsetcurrent((*j)->data, curritem); } } Unlock(); if (restart && curritem == 0) { Stop (); } else if (restart) { Play (curritem); } } // Randomize playlist void Playlist::Shuffle() { std::set::const_iterator i; std::set::const_iterator j; std::vector::iterator p; if (!queue.size ()) return; Lock(); // Mark curritem if (curritem > 0) { (*(queue.begin() + curritem - 1)).marked_to_keep_curritem = 1; } // Shuffle random_shuffle(queue.begin(), queue.end()); // Search new location of the playing song for (p = queue.begin (), curritem = 1; p != queue.end (); p++, curritem++) { if ((*p).marked_to_keep_curritem == 1) { (*p).marked_to_keep_curritem = 0; break; } } // Tell the subscribing interfaces about the change if(interfaces.size() > 0) { // Clear and repopulate for(i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbClear(); (*i)->CbInsert(queue, 0); (*i)->CbSetCurrent(curritem); } } if (cinterfaces.size() > 0) { for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbclear((*j)->data); (*j)->cbinsert((*j)->data, queue, 0); (*j)->cbsetcurrent((*j)->data, curritem); } } Unlock(); } // Empty playlist void Playlist::Clear() { std::set::const_iterator i; std::set::const_iterator j; Lock(); queue.clear(); curritem = 0; // Tell the subscribing interfaces about the change if(interfaces.size() > 0) { for(i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbClear(); } } if(cinterfaces.size() > 0) { for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbclear((*j)->data); } } Unlock(); } enum plist_result Playlist::Save(std::string file, enum plist_format format) const { switch(format) { case PL_FORMAT_M3U: if(file.length() < 4 || strcasecmp(file.substr(file.length() - 4).c_str(), ".m3u")) { file += ".m3u"; } //cout << "Saving to " << file << endl; std::ofstream out_list(file.c_str()); if(!out_list) return E_PL_BAD; //out_list << MAGIC_ID << endl; std::vector::const_iterator p = queue.begin(); while(p != queue.end()) { out_list << (*p).filename << std::endl; p++; } } return E_PL_SUCCESS; } // Returns: // E_PL_SUCCESS on success, // E_PL_DUBIOUS if file doesn't appear to be in a known format, // E_PL_BAD if file definitely isn't in a known format. // If "force" is true, will try to load anyway instead of returning E_PL_DUBIOUS enum plist_result Playlist::Load(std::string const &uri, unsigned position, bool force) { int pls = 0; // Check extension if(!force) { if(!is_playlist(uri.c_str())) return E_PL_DUBIOUS; } // Open Playlist reader_type *f = reader_open (uri.c_str(), NULL, NULL); if (!f) return E_PL_BAD; // Base part of m3u uri, might need it later std::string base = uri; std::string::size_type i = base.rfind('/'); if (i != std::string::npos) base.erase(i); base += '/'; // Read the file char path[READBUFSIZE + 1]; memset(path, 0,READBUFSIZE); std::vector newfiles; // Give up if too many failures (so we don't wait for almost ever if // someone tries clicking on an mp3 file...) // However, if its just that some of the files don't exist anymore, // don't give up. unsigned successes = 0; unsigned failures = 0; while(failures < MAXLOADFAILURES || failures < successes) { char *s, *p; if (!reader_readline (f, path, READBUFSIZE)) break; std::string newfile; if (*path == '#') { // Comment... skip it for now continue; } else if ((s=strstr(path, "File"))) { p = strstr(s, "="); if (p) { p++; // Make sure there are no trailing EOL's if ((s = strstr(p, "\r"))) *s = '\0'; if ((s = strstr(p, "\n"))) *s = '\0'; //alsaplayer_error("URI: %s", p); newfile = std::string(p); } else { continue; } } else if (pls && (strncasecmp(path, "Title", 5) == 0 || strncasecmp(path, "Length", 6) == 0)) { /* Ignore title/length lines */ continue; } else if (*path=='/') { newfile = std::string(path); /* These 2 */ } else if (reader_can_handle (path)) { newfile = std::string(path); /* Should be one */ } else if (*path == '\0') { // No path failures++; continue; } else { // This is probably realtive URI or not supported URI type. newfile = base + std::string(path); } // Test result if (!reader_can_handle (newfile.c_str())) continue; // Add this file newfiles.push_back(newfile); successes++; } // Entire file should be loaded /* if (!reader_eof(f)) { reader_close (f); return E_PL_BAD; } */ reader_close (f); // Do the insert Insert(newfiles, position); return E_PL_SUCCESS; } void Playlist::RegisterNotifier(coreplayer_notifier *notif, void *data) { player1->RegisterNotifier(notif, data); player2->RegisterNotifier(notif, data); } void Playlist::UnRegisterNotifier(coreplayer_notifier *notif) { player1->UnRegisterNotifier(notif); player2->UnRegisterNotifier(notif); } void Playlist::Register(playlist_interface *pl_if) { LockInterfaces(); cinterfaces.insert(pl_if); UnlockInterfaces(); if (queue.size()) { LockInterfaces(); pl_if->cbinsert(pl_if->data, queue, 0); UnlockInterfaces(); } LockInterfaces(); pl_if->cbsetcurrent(pl_if->data, curritem); UnlockInterfaces(); } void Playlist::Register(PlaylistInterface * pl_if) { LockInterfaces(); interfaces.insert(pl_if); // Tell the interfaces about the current state pl_if->CbClear(); if(queue.size()) { pl_if->CbInsert(queue, 0); } pl_if->CbSetCurrent(curritem); UnlockInterfaces(); } void Playlist::UnRegister(playlist_interface *pl_if) { if (!pl_if) return; LockInterfaces(); cinterfaces.erase(cinterfaces.find(pl_if)); UnlockInterfaces(); } void Playlist::UnRegister(PlaylistInterface * pl_if) { if (!pl_if) return; LockInterfaces(); interfaces.erase(interfaces.find(pl_if)); UnlockInterfaces(); } void Playlist::Stop() { Pause(); player1->Stop(); player2->Stop(); } bool Playlist::PlayFile(PlayItem const & item) { bool result; Pause(); coreplayer->Stop(); coreplayer->Close(); result = coreplayer->Open(item.filename.c_str()); if (result) { result = coreplayer->Start(); if (coreplayer->GetSpeed() == 0.0) { // Unpause coreplayer->SetSpeed(1.0); } } UnPause(); return result; } // Check if we are able to play a given file bool Playlist::CanPlay(std::string const & path) { bool result = (coreplayer->GetPlayer(path.c_str()) != NULL); //alsaplayer_error("CanPlay result = %d", result); return result; } // Sort playlist void Playlist::Sort (std::string const &seq) { std::set::const_iterator i; std::set::const_iterator j; std::vector::iterator p; if (!queue.size ()) return; Lock(); // We will use global sort_seq variable, so lock it pthread_mutex_lock(&playlist_sort_seq_mutex); // Let the sort_comparator function know seq value sort_seq = seq.c_str (); // Mark curritem (*(queue.begin() + curritem - 1)).marked_to_keep_curritem = 1; // Sort sort (queue.begin(), queue.end(), sort_comparator); // Let other playlists use sort_seq variable pthread_mutex_unlock(&playlist_sort_seq_mutex); // Search new location of the playing song for (p = queue.begin (), curritem = 1; p != queue.end (); p++, curritem++) if ((*p).marked_to_keep_curritem == 1) break; (*(queue.begin() + curritem - 1)).marked_to_keep_curritem = 0; // Tell the subscribing interfaces about the change if (interfaces.size() > 0) { // Clear and repopulate for(i = interfaces.begin(); i != interfaces.end(); i++) { (*i)->CbClear(); (*i)->CbInsert(queue, 0); (*i)->CbSetCurrent(curritem); } } if (cinterfaces.size() > 0) { for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) { (*j)->cbclear((*j)->data); (*j)->cbinsert((*j)->data, queue, 0); (*j)->cbsetcurrent((*j)->data, curritem); } } Unlock(); } bool Playlist::Eof() { int length; if (!(length=Length())) return true; if (LoopingPlaylist()) return false; if (curritem == queue.size() && !GetCorePlayer()->IsActive()) return true; return false; } PlayItem *Playlist::GetItem(unsigned item) { if(item < 1) item = 1; if(item > queue.size()) { item = queue.size(); } return &queue[item-1]; } // Add a path to list, recursing through (to a maximum of depth subdirectories) static void additems(std::vector *items, std::string path, int depth) { if(depth < 0) return; // Try expand this URI char **expanded = reader_expand (path.c_str ()); if (expanded) { char **c_uri = expanded; while (*c_uri) additems (items, *(c_uri++), depth-1); reader_free_expanded (expanded); } else { items->push_back(path); } } alsaplayer-0.99.82/app/SampleBuffer.cpp000066400000000000000000000116441466261456500177240ustar00rootroot00000000000000/* SampleBuffer.cpp - SampleBuffer object, used in the ringbuffer * Copyright (C) 1998-2002 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include "SampleBuffer.h" #include #include #include #include #include "alsaplayer_error.h" // NOTE: THIS IS FOR STEREO 16-BIT SAMPLES ONLY SampleBuffer::SampleBuffer(int mode, int size) { // Find out the sample size switch(mode) { case SAMPLE_STEREO: sample_size = 4; break; default: alsaplayer_error("Unsupported SAMPLE size"); exit(1); } // Allocate buffer data if ((buffer_data = new short [size]) == NULL) { alsaplayer_error("Out of memory in SampleBuffer::SampleBuffer()"); exit(1); } // Init other stuff SetReadDirection(DIR_FORWARD); read_index = write_index = 0; buffer_size = size / sample_size; } SampleBuffer::~SampleBuffer() { delete []buffer_data; } void SampleBuffer::Clear() { read_index = write_index = 0; //memset(buffer_data, 0, buffer_size * sample_size); } int SampleBuffer::Seek(int index) { if (index < 0 || index > write_index) { /* alsaplayer_error("index out of range (%d)\n", index); */ return -1; } read_index = index; return read_index; } #if 0 // these methods are completely unused; FB int SampleBuffer::WriteSamples(void *data, int nr) { int add = 0; int *dest = (int *)buffer_data + write_index; int *src = (int *)data; if (nr < GetFreeSamples()) { // Simply copy everything //memcpy(dest, data, nr * sample_size); for (int c=0; c < nr; c++) { *(dest++) = *(src++); } write_index += nr; return nr; } else { add = GetFreeSamples(); //memcpy(dest, data, add * sample_size); for (int c=0; c < add; c++) { *(dest++) = *(src++); } write_index += add; // Paranoia check //assert (write_index == GetBufferSize()); //if (GetReadDirection() == DIR_BACK) { // read_index = write_index; // Hmmm!! //} return add; } } int SampleBuffer::ReadSamples(void *data, int nr) { int *src = (int *)buffer_data + read_index; int *dest = (int *)data; switch (GetReadDirection()) { case DIR_FORWARD: if (nr <= (GetBufferSize() - read_index)) { //memcpy(data, src, (nr * sample_size)); for (int c=0; c < nr; c++) { *(dest++) = *(src++); } read_index += nr; return nr; } else { int count = GetBufferSize() - read_index; //memcpy(data, src, count * sample_size); for (int c=0; c < count; c++) { *(dest++) = *(src++); } read_index += count; // Paranoia check assert(read_index == GetBufferSize()); return count; } break; case DIR_BACK: //alsaplayer_error("Backwards...."); int *s, *d; //if (read_index > GetFreeSamples()) // read_index = GetFreeSamples(); if (read_index < nr) nr = read_index; s = (int *)(buffer_data) + (read_index * sample_size); d = (int *)data; //alsaplayer_error("From %d to %d", read_index, read_index-nr); for (int i=0; i < nr; i++) { *(d++) = *(s--); } read_index -= nr; return nr; } return -1; } #endif void SampleBuffer::SetSamples(int count) { write_index = count; } void *SampleBuffer::GetSamples() { return buffer_data; } void SampleBuffer::SetReadDirection(int rd) { read_direction = rd; } int SampleBuffer::GetSamplesInBuffer() { return write_index; } int SampleBuffer::GetBufferSize() { return buffer_size; } int SampleBuffer::GetBufferSizeBytes(int block_size) { if (block_size < 0) return buffer_size * sample_size; else { int byte_count = buffer_size * sample_size; int block_mul = block_size * (byte_count / block_size); return block_mul; } } int SampleBuffer::GetReadIndex() { return read_index; } int SampleBuffer::GetReadDirection() { return read_direction; } void SampleBuffer::ResetRead() { #if 1 switch (GetReadDirection()) { case DIR_FORWARD: read_index = 0; break; case DIR_BACK: read_index = write_index; break; } #else read_index = 0; #endif return; } int SampleBuffer::GetAvailableSamples() { //alsaplayer_error("read = %d, write = %d", read_index, write_index); switch(GetReadDirection()) { case DIR_FORWARD: if (write_index < read_index) { return 0; } else { return (write_index - read_index); } break; case DIR_BACK: return read_index; } return -1; } int SampleBuffer::GetFreeSamples() { return (buffer_size - write_index); } alsaplayer-0.99.82/app/convolve.c000066400000000000000000000226331466261456500166440ustar00rootroot00000000000000/* Karatsuba convolution * * Copyright (C) 1999 Ralph Loader * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ /* The algorithm is based on the following. For the convolution of a pair * of pairs, (a,b) * (c,d) = (0, a.c, a.d+b.c, b.d), we can reduce the four * multiplications to three, by the formulae a.d+b.c = (a+b).(c+d) - a.c - * b.d. A similar relation enables us to compute a 2n by 2n convolution * using 3 n by n convolutions, and thus a 2^n by 2^n convolution using 3^n * multiplications (as opposed to the 4^n that the quadratic algorithm * takes. */ /* For large n, this is slower than the O(n log n) that the FFT method * takes, but we avoid using complex numbers, and we only have to compute * one convolution, as opposed to 3 FFTs. We have good locality-of- * reference as well, which will help on CPUs with tiny caches. */ /* E.g., for a 512 x 512 convolution, the FFT method takes 55 * 512 = 28160 * (real) multiplications, as opposed to 3^9 = 19683 for the Karatsuba * algorithm. We actually want 257 outputs of a 256 x 512 convolution; * that doesn't appear to give an easy advantage for the FFT algorithm, but * for the Karatsuba algorithm, it's easy to use two 256 x 256 * convolutions, taking 2 x 3^8 = 12312 multiplications. [This difference * is that the FFT method "wraps" the arrays, doing a 2^n x 2^n -> 2^n, * while the Karatsuba algorithm pads with zeros, doing 2^n x 2^n -> 2.2^n * - 1]. */ /* There's a big lie above, actually... for a 4x4 convolution, it's quicker * to do it using 16 multiplications than the more complex Karatsuba * algorithm... So the recursion bottoms out at 4x4s. This increases the * number of multiplications by a factor of 16/9, but reduces the overheads * dramatically. */ /* The convolution algorithm is implemented as a stack machine. We have a * stack of commands, each in one of the forms "do a 2^n x 2^n * convolution", or "combine these three length 2^n outputs into one * 2^{n+1} output." */ #include #include "alsaplayer_convolve.h" typedef union stack_entry_s { struct {const double * left, * right; double * out;} v; struct {double * main, * null;} b; } stack_entry; #define STACK_SIZE (CONVOLVE_DEPTH * 3) struct _struct_convolve_state { double left [CONVOLVE_BIG]; double right [CONVOLVE_SMALL * 3]; double scratch [CONVOLVE_SMALL * 3]; stack_entry stack[STACK_SIZE]; }; /* * Initialisation routine - sets up tables and space to work in. * Returns a pointer to internal state, to be used when performing calls. * On error, returns NULL. * The pointer should be freed when it is finished with, by convolve_close(). */ convolve_state *convolve_init(void) { return malloc (sizeof(convolve_state)); } /* * Free the state allocated with convolve_init(). */ void convolve_close(convolve_state *state) { if (state) free(state); } static void convolve_4 (double * out, const double * left, const double * right) /* This does a 4x4 -> 7 convolution. For what it's worth, the slightly odd * ordering gives about a 1% speed up on my Pentium II. */ { double l0, l1, l2, l3, r0, r1, r2, r3; double a; l0 = left[0]; r0 = right[0]; a = l0 * r0; l1 = left[1]; r1 = right[1]; out[0] = a; a = (l0 * r1) + (l1 * r0); l2 = left[2]; r2 = right[2]; out[1] = a; a = (l0 * r2) + (l1 * r1) + (l2 * r0); l3 = left[3]; r3 = right[3]; out[2] = a; out[3] = (l0 * r3) + (l1 * r2) + (l2 * r1) + (l3 * r0); out[4] = (l1 * r3) + (l2 * r2) + (l3 * r1); out[5] = (l2 * r3) + (l3 * r2); out[6] = l3 * r3; } static void convolve_run (stack_entry * top, unsigned size, double * scratch) /* Interpret a stack of commands. The stack starts with two entries; the * convolution to do, and an illegal entry used to mark the stack top. The * size is the number of entries in each input, and must be a power of 2, * and at least 8. It is OK to have out equal to left and/or right. * scratch must have length 3*size. The number of stack entries needed is * 3n-4 where size=2^n. */ { do { const double * left; const double * right; double * out; /* When we get here, the stack top is always a convolve, * with size > 4. So we will split it. We repeatedly split * the top entry until we get to size = 4. */ left = top->v.left; right = top->v.right; out = top->v.out; top++; do { double * s_left, * s_right; unsigned i; /* Halve the size. */ size >>= 1; /* Allocate the scratch areas. */ s_left = scratch + size * 3; /* s_right is a length 2*size buffer also used for * intermediate output. */ s_right = scratch + size * 4; /* Create the intermediate factors. */ for (i = 0; i < size; i++) { double l = left[i] + left[i + size]; double r = right[i] + right[i + size]; s_left[i + size] = r; s_left[i] = l; } /* Push the combine entry onto the stack. */ top -= 3; top[2].b.main = out; top[2].b.null = NULL; /* Push the low entry onto the stack. This must be * the last of the three sub-convolutions, because * it may overwrite the arguments. */ top[1].v.left = left; top[1].v.right = right; top[1].v.out = out; /* Push the mid entry onto the stack. */ top[0].v.left = s_left; top[0].v.right = s_right; top[0].v.out = s_right; /* Leave the high entry in variables. */ left += size; right += size; out += size * 2; } while (size > 4); /* When we get here, the stack top is a group of 3 * convolves, with size = 4, followed by some combines. */ convolve_4 (out, left, right); convolve_4 (top[0].v.out, top[0].v.left, top[0].v.right); convolve_4 (top[1].v.out, top[1].v.left, top[1].v.right); top += 2; /* Now process combines. */ do { /* b.main is the output buffer, mid is the middle * part which needs to be adjusted in place, and * then folded back into the output. We do this in * a slightly strange way, so as to avoid having * two loops. */ double * outx = top->b.main; double * mid = scratch + size * 4; unsigned int i; top++; outx[size * 2 - 1] = 0; for (i = 0; i < size-1; i++) { double lo; double hi; lo = mid[0] - (outx[0] + outx[2 * size]) + outx[size]; hi = mid[size] - (outx[size] + outx[3 * size]) + outx[2 * size]; outx[size] = lo; outx[2 * size] = hi; outx++; mid++; } size <<= 1; } while (top->b.null == NULL); } while (top->b.main != NULL); } int convolve_match (const int * lastchoice, const short * input, convolve_state * state) /* lastchoice is a 256 sized array. input is a 512 array. We find the * contiguous length 256 sub-array of input that best matches lastchoice. * A measure of how good a sub-array is compared with the lastchoice is * given by the sum of the products of each pair of entries. We maximise * that, by taking an appropriate convolution, and then finding the maximum * entry in the convolutions. state is a (non-NULL) pointer returned by * convolve_init. */ { double avg; double best; int p = 0; int i; double * left = state->left; double * right = state->right; double * scratch = state->scratch; stack_entry * top = state->stack + STACK_SIZE - 1; #if 1 for (i = 0; i < 512; i++) left[i] = input[i]; avg = 0; for (i = 0; i < 256; i++) { double a = lastchoice[255 - i]; right[i] = a; avg += a; } #endif /* We adjust the smaller of the two input arrays to have average * value 0. This makes the eventual result insensitive to both * constant offsets and positive multipliers of the inputs. */ avg /= 256; for (i = 0; i < 256; i++) right[i] -= avg; /* End-of-stack marker. */ #if 0 /* The following line produces a CRASH, need to figure out why?!! */ top[1].b.null = scratch; #endif top[1].b.main = NULL; /* The low 256x256, of which we want the high 256 outputs. */ top->v.left = left; top->v.right = right; top->v.out = right + 256; convolve_run (top, 256, scratch); /* The high 256x256, of which we want the low 256 outputs. */ top->v.left = left + 256; top->v.right = right; top->v.out = right; convolve_run (top, 256, scratch); /* Now find the best position amoungs this. Apart from the first * and last, the required convolution outputs are formed by adding * outputs from the two convolutions above. */ best = right[511]; right[767] = 0; p = -1; for (i = 0; i < 256; i++) { double a = right[i] + right[i + 512]; if (a > best) { best = a; p = i; } } p++; #if 0 { /* This is some debugging code... */ int bad = 0; best = 0; for (i = 0; i < 256; i++) best += ((double) input[i+p]) * ((double) lastchoice[i] - avg); for (i = 0; i < 257; i++) { double tot = 0; unsigned int j; for (j = 0; j < 256; j++) tot += ((double) input[i+j]) * ((double) lastchoice[j] - avg); if (tot > best) printf ("(%i)", i); if (tot != left[i + 255]) printf ("!"); } printf ("%i\n", p); } #endif return p; } alsaplayer-0.99.82/app/fft.c000066400000000000000000000205651466261456500155720ustar00rootroot00000000000000/* fft.c: Iterative implementation of a FFT * Copyright (C) 1999 Richard Boulton * Convolution stuff by Ralph Loader * This file is part of AlsaPlayer (C) 1998 - 2002 * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ /* * TODO * Remove compiling in of FFT_BUFFER_SIZE? (Might slow things down, but would * be nice to be able to change size at runtime.) * Finish making / checking thread-safety. * More optimisations. */ #include "alsaplayer_fft.h" #include #include #ifndef PI #ifdef M_PI #define PI M_PI #else #define PI 3.14159265358979323846 /* pi */ #endif #endif #ifdef __cplusplus extern "C" { #endif /* ########### */ /* # Structs # */ /* ########### */ struct _struct_fft_state { /* Temporary data stores to perform FFT in. */ double real[FFT_BUFFER_SIZE]; double imag[FFT_BUFFER_SIZE]; }; /* ############################# */ /* # Local function prototypes # */ /* ############################# */ static void fft_prepare(const sound_sample *input, double * re, double * im); static void fft_calculate(double * re, double * im); static void fft_output(const double *re, const double *im, double *output); static int reverseBits(unsigned int initial); /* #################### */ /* # Global variables # */ /* #################### */ /* Table to speed up bit reverse copy */ static unsigned int bitReverse[FFT_BUFFER_SIZE]; /* The next two tables could be made to use less space in memory, since they * overlap hugely, but hey. */ static double sintable[FFT_BUFFER_SIZE / 2]; static double costable[FFT_BUFFER_SIZE / 2]; /* ############################## */ /* # Externally called routines # */ /* ############################## */ /* --------- */ /* FFT stuff */ /* --------- */ /* * Initialisation routine - sets up tables and space to work in. * Returns a pointer to internal state, to be used when performing calls. * On error, returns NULL. * The pointer should be freed when it is finished with, by fft_close(). */ fft_state *fft_init(void) { fft_state *state; unsigned int i; state = malloc (sizeof(fft_state)); if(!state) return NULL; for(i = 0; i < FFT_BUFFER_SIZE; i++) { bitReverse[i] = reverseBits(i); } for(i = 0; i < FFT_BUFFER_SIZE / 2; i++) { double j = 2 * PI * i / FFT_BUFFER_SIZE; costable[i] = cos(j); sintable[i] = sin(j); } return state; } /* * Do all the steps of the FFT, taking as input sound data (as described in * sound.h) and returning the intensities of each frequency as doubles in the * range 0 to ((FFT_BUFFER_SIZE / 2) * 32768) ^ 2 * * FIXME - the above range assumes no frequencies present have an amplitude * larger than that of the sample variation. But this is false: we could have * a wave such that its maximums are always between samples, and it's just * inside the representable range at the places samples get taken. * Question: what _is_ the maximum value possible. Twice that value? Root * two times that value? Hmmm. Think it depends on the frequency, too. * * The input array is assumed to have FFT_BUFFER_SIZE elements, * and the output array is assumed to have (FFT_BUFFER_SIZE / 2 + 1) elements. * state is a (non-NULL) pointer returned by fft_init. */ void fft_perform(const sound_sample *input, double *output, fft_state *state) { /* Convert data from sound format to be ready for FFT */ fft_prepare(input, state->real, state->imag); /* Do the actual FFT */ fft_calculate(state->real, state->imag); /* Convert the FFT output into intensities */ fft_output(state->real, state->imag, output); } /* * Free the state. */ void fft_close(fft_state *state) { if(state) free(state); } /* ########################### */ /* # Locally called routines # */ /* ########################### */ /* * Prepare data to perform an FFT on */ static void fft_prepare(const sound_sample *input, double * re, double * im) { unsigned int i; double *realptr = re; double *imagptr = im; /* Get input, in reverse bit order */ for(i = 0; i < FFT_BUFFER_SIZE; i++) { *realptr++ = input[bitReverse[i]]; *imagptr++ = 0; } } /* * Take result of an FFT and calculate the intensities of each frequency * Note: only produces half as many data points as the input had. * This is roughly a consequence of the Nyquist sampling theorm thingy. * (FIXME - make this comment better, and helpful.) * * The two divisions by 4 are also a consequence of this: the contributions * returned for each frequency are split into two parts, one at i in the * table, and the other at FFT_BUFFER_SIZE - i, except for i = 0 and * FFT_BUFFER_SIZE which would otherwise get double (and then 4* when squared) * the contributions. */ static void fft_output(const double * re, const double * im, double *output) { double *outputptr = output; const double *realptr = re; const double *imagptr = im; double *endptr = output + FFT_BUFFER_SIZE / 2; #ifdef DEBUG unsigned int i, j; #endif while(outputptr <= endptr) { *outputptr = (*realptr * *realptr) + (*imagptr * *imagptr); outputptr++; realptr++; imagptr++; } /* Do divisions to keep the constant and highest frequency terms in scale * with the other terms. */ *output /= 4; *endptr /= 4; #ifdef DEBUG printf("Recalculated input:\n"); for(i = 0; i < FFT_BUFFER_SIZE; i++) { double val_real = 0; double val_imag = 0; for(j = 0; j < FFT_BUFFER_SIZE; j++) { double fact_real = cos(- 2 * j * i * PI / FFT_BUFFER_SIZE); double fact_imag = sin(- 2 * j * i * PI / FFT_BUFFER_SIZE); val_real += fact_real * re[j] - fact_imag * im[j]; val_imag += fact_real * im[j] + fact_imag * re[j]; } printf("%5d = %8f + i * %8f\n", i, val_real / FFT_BUFFER_SIZE, val_imag / FFT_BUFFER_SIZE); } printf("\n"); #endif } /* * Actually perform the FFT */ static void fft_calculate(double * re, double * im) { unsigned int i, j, k; unsigned int exchanges; double fact_real, fact_imag; double tmp_real, tmp_imag; unsigned int factfact; /* Set up some variables to reduce calculation in the loops */ exchanges = 1; factfact = FFT_BUFFER_SIZE / 2; /* Loop through the divide and conquer steps */ for(i = FFT_BUFFER_SIZE_LOG; i != 0; i--) { /* In this step, we have 2 ^ (i - 1) exchange groups, each with * 2 ^ (FFT_BUFFER_SIZE_LOG - i) exchanges */ /* Loop through the exchanges in a group */ for(j = 0; j != exchanges; j++) { /* Work out factor for this exchange * factor ^ (exchanges) = -1 * So, real = cos(j * PI / exchanges), * imag = sin(j * PI / exchanges) */ fact_real = costable[j * factfact]; fact_imag = sintable[j * factfact]; /* Loop through all the exchange groups */ for(k = j; k < FFT_BUFFER_SIZE; k += exchanges << 1) { int k1 = k + exchanges; /* newval[k] := val[k] + factor * val[k1] * newval[k1] := val[k] - factor * val[k1] **/ #ifdef DEBUG printf("%d %d %d\n", i,j,k); printf("Exchange %d with %d\n", k, k1); printf("Factor %9f + i * %8f\n", fact_real, fact_imag); #endif /* FIXME - potential scope for more optimization here? */ tmp_real = fact_real * re[k1] - fact_imag * im[k1]; tmp_imag = fact_real * im[k1] + fact_imag * re[k1]; re[k1] = re[k] - tmp_real; im[k1] = im[k] - tmp_imag; re[k] += tmp_real; im[k] += tmp_imag; #ifdef DEBUG for(k1 = 0; k1 < FFT_BUFFER_SIZE; k1++) { printf("%5d = %8f + i * %8f\n", k1, re[k1], im[k1]); } #endif } } exchanges <<= 1; factfact >>= 1; } } static int reverseBits(unsigned int initial) { unsigned int reversed = 0, loop; for(loop = 0; loop < FFT_BUFFER_SIZE_LOG; loop++) { reversed <<= 1; reversed += (initial & 1); initial >>= 1; } return reversed; } #ifdef __cplusplus } #endif alsaplayer-0.99.82/app/object.c000066400000000000000000000114721466261456500162560ustar00rootroot00000000000000/* object.c - Threads safe version of functions from GObject. * Copyright (C) 2002 Evgeny Chukreev * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include #include "object.h" /* --- prototypes --- */ static void ap_object_class_init (ApObjectClass *class); static void ap_object_init (ApObject *object); static void ap_object_finalize (GObject *object); /* --- variables --- */ static gpointer parent_class = NULL; static GStaticMutex ref_mutex = G_STATIC_MUTEX_INIT; /* --- functions --- */ static void ap_object_class_init (ApObjectClass *class) { /* Like aliases */ GObjectClass *gobject_class = G_OBJECT_CLASS (class); /* Peek parent class */ parent_class = g_type_class_peek_parent (class); /* Init GObject Class */ gobject_class->finalize = ap_object_finalize; } /* ap_object_class_init */ static void ap_object_init (ApObject *object) { /* Local reference counter */ object->ref = 1; /* Init mutex for this item */ g_static_rec_mutex_init (&object->mutex); } /* ap_object_init() */ static void ap_object_finalize (GObject *gobject) { ApObject *object = AP_OBJECT (gobject); /* Destroy local mutex */ g_static_rec_mutex_free (&object->mutex); G_OBJECT_CLASS (parent_class)->finalize (gobject); } /* ap_object_finalize */ /* ******************************************************************** */ /* Public functions. */ /** * @brief Register the #ApObjectClass if necessary, * and returns the type ID associated to it. * * @return The type ID of the #ApObjectClass. **/ GType ap_object_get_type (void) { static GType type = 0; static const GTypeInfo object_info = { sizeof (ApObjectClass), NULL, NULL, (GClassInitFunc) ap_object_class_init, NULL, NULL, sizeof (ApObject), 0, (GInstanceInitFunc) ap_object_init, NULL }; if (!type) { /* First time create */ type = g_type_register_static (G_TYPE_OBJECT, /* Parent Type */ "ApObject", /* Name */ &object_info, /* Type Info */ 0); /* Flags */ } return type; }; /* ap_object_get_type */ /** * @param object An #ApObject. * * @brief Adds a reference to the given object. * * This function is the thread safe version of the g_object_ref(). * * @see ap_object_unref() **/ void ap_object_ref (ApObject *object) { g_return_if_fail (AP_IS_OBJECT (object)); g_static_mutex_lock (&ref_mutex); object->ref++; g_static_mutex_unlock (&ref_mutex); } /** * @param object An #ApObject. * * @brief Inverse of ap_object_unref(). * * This functions is the thread safe version of the g_object_unref(). * * @see ap_object_ref() **/ void ap_object_unref (ApObject *object) { g_return_if_fail (AP_IS_OBJECT (object)); g_static_mutex_lock (&ref_mutex); if (object->ref == 1) { g_static_mutex_unlock (&ref_mutex); g_object_unref (object); } else { object->ref--; g_static_mutex_unlock (&ref_mutex); } } /** * @param object An #ApObject. * * @brief Locks object. * * If object is already locked by another thread, * the current thread will block until object * in unlocked by the other thread. * * @note Object can be locked multiple times * by one thread. If you enter it n times * you have to unlock it n times again * to let other threads lock it. * * @see ap_object_unlock() **/ void ap_object_lock (ApObject *object) { g_return_if_fail (AP_IS_OBJECT (object)); g_static_rec_mutex_lock (&object->mutex); } /* ap_object_lock */ /** * @param object An #ApObject. * * @brief Unlocks object. * * If another thread is blocked in a ap_object_lock() * call for object, it will be woken and can lock object itself. * * @note Object can be locked multiple times * by one thread. If you enter it n times * you have to unlock it n times again * to let other threads lock it. * * @see ap_object_lock() **/ void ap_object_unlock (ApObject *object) { g_return_if_fail (AP_IS_OBJECT (object)); g_static_rec_mutex_unlock (&object->mutex); } /* ap_object_lock */ alsaplayer-0.99.82/app/prefs.c000066400000000000000000000175301466261456500161300ustar00rootroot00000000000000/* prefs.c - Preferences system * Copyright (C) 2002-2004 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * Inspired by xine's prefs * */ #include #include #include #include #include "alsaplayer_error.h" #include "prefs.h" #ifdef __cplusplus extern "C" { #endif static int prefs_cmp(const void *p1, const void *p2) { int res; prefs_key_t *a = (prefs_key_t *)p1; prefs_key_t *b = (prefs_key_t *)p2; int s1len, s2len; char *s1, *s2; s1len = strlen(a->section)+strlen(a->key)+1; s2len = strlen(b->section)+strlen(b->key)+1; s1 = malloc(s1len); s2 = malloc(s2len); snprintf(s1, s1len, "%s%s", a->section, a->key); snprintf(s2, s2len, "%s%s", b->section, b->key); res = strcmp(s1, s2); free(s1); free(s2); return res; } prefs_key_t *prefs_sort(prefs_handle_t *prefs) { prefs_key_t *array; prefs_key_t *p; int c; array = malloc(prefs->count * sizeof(prefs_key_t)); if (!array) return NULL; for (c=0, p = prefs->keys; c < prefs->count; c++, p = p->next) { array[c] = *p; } qsort(array, prefs->count, sizeof(prefs_key_t), prefs_cmp); return array; } prefs_handle_t *prefs_load(const char *filename) { FILE *fd; prefs_handle_t *prefs; char buf[1024]; char *val; char *key; int error_count = 0; if (!filename) return NULL; prefs = malloc(sizeof(prefs_handle_t)); if (!prefs) return NULL; memset(prefs, 0, sizeof(prefs_handle_t)); if ((fd = fopen(filename, "r")) == NULL) { if ((fd = fopen(filename, "w")) == NULL) { free(prefs); return NULL; } } while (fgets(buf, 1023, fd) && error_count < 5) { buf[1023] = 0; if (strlen(buf) < 1024) buf[strlen(buf)-1] = 0; /* get rid of '\n' */ else { error_count++; continue; } if (buf[0] == '#') continue; if ((val = strchr(buf, '='))) { *val = 0; /* replace value separator with 0 */ val++; if ((key = strchr(buf, '.'))) { *key = 0; /* replace section separator with 0 */ key++; prefs_set_string(prefs, buf, key, val); } else { alsaplayer_error("Found old prefs format (%s), ignoring", buf); continue; } } else { error_count++; } } fclose(fd); if (error_count >= 5) { /* too many errors */ fprintf(stderr, "*** WARNING: Too many errors in %s\n" "*** WARNING: It is probably corrupted! Please remove it.\n", filename); return NULL; } prefs->filename = strdup(filename); return prefs; } void prefs_set_int(prefs_handle_t *prefs, const char *section, const char *key, int val) { char str[1024]; assert(prefs); assert(key); assert(section); snprintf(str, sizeof (str), "%d", val); prefs_set_string(prefs, section, key, str); } void prefs_set_bool(prefs_handle_t *prefs, const char *section, const char *key, int val) { char str[1024]; assert(prefs); assert(key); assert(section); snprintf(str, sizeof (str), "%s", val ? "true" : "false"); prefs_set_string(prefs, section, key, str); } static prefs_key_t *prefs_find_key(prefs_handle_t *prefs, const char *section, const char *key) { prefs_key_t *entry; assert(prefs); assert(key); assert(section); entry = prefs->keys; while (entry) { if (strcmp(entry->section, section)==0 && strcmp(entry->key, key)==0) return entry; entry = entry->next; } return NULL; } void prefs_set_string(prefs_handle_t *prefs, const char *section, const char *key, const char *val) { prefs_key_t *entry; assert(prefs); assert(key); assert(section); if ((entry = prefs_find_key(prefs, section, key))) { /* Already in prefs, replace */ free(entry->value); entry->value = strdup(val); } else { /* New entry */ entry = malloc(sizeof(prefs_key_t)); if (!entry) return; /* Set all field to NULL */ memset(entry, 0, sizeof(prefs_key_t)); entry->section = strdup(section); if (!entry->section) { free(entry); return; } entry->key = strdup(key); if (!entry->key) { free(entry->section); free(entry); return; } entry->value = strdup(val); if (!entry->value) { free(entry->section); free(entry->key); free(entry); return; } /* XXX Need to protect the following with a mutex */ if (prefs->last) { prefs->last->next = entry; } else { /* First key */ prefs->keys = entry; } prefs->count++; prefs->last = entry; } } void prefs_set_float(prefs_handle_t *prefs, const char *section, const char *key, float val) { char str[1024]; assert(prefs); assert(key); assert(section); snprintf(str, sizeof (str), "%.6f", val); prefs_set_string(prefs, section, key, str); } int prefs_get_bool(prefs_handle_t *prefs, const char *section, const char *key, int default_val) { char str[1024]; const char *res; assert(prefs); assert(key); assert(section); snprintf(str, sizeof (str), "%s", default_val ? "true" : "false"); res = prefs_get_string(prefs, section, key, str); if (strncasecmp(res, "true", 4) == 0 || strncasecmp(res, "yes", 3) == 0 || strncasecmp(res, "1", 1) == 0) { return 1; } return 0; } int prefs_get_int(prefs_handle_t *prefs, const char *section, const char *key, int default_val) { char str[1024]; const char *res; int val; assert(prefs); assert(key); assert(section); snprintf(str, sizeof (str), "%d", default_val); res = prefs_get_string(prefs, section, key, str); if (sscanf(res, "%d", &val) != 1) return default_val; return val; } const char *prefs_get_string(prefs_handle_t *prefs, const char *section, const char *key, const char *default_val) { prefs_key_t *entry; assert(prefs); assert(key); assert(section); if ((entry = prefs_find_key(prefs, section, key))) { return entry->value; } else { prefs_set_string(prefs, section, key, default_val); } return default_val; } float prefs_get_float(prefs_handle_t *prefs, const char *section, const char *key, float default_val) { char str[1024]; const char *res; float val; assert(prefs); assert(key); assert(section); snprintf(str, sizeof (str), "%.6f", default_val); res = prefs_get_string(prefs, section, key, str); if (sscanf(res, "%f", &val) != 1) return default_val; return val; } int prefs_save(prefs_handle_t *prefs) { FILE *fd; prefs_key_t *entry = NULL; prefs_key_t *sorted = NULL; int c; assert(prefs); if (!prefs->filename || !strlen(prefs->filename)) { return -1; } sorted = prefs_sort(prefs); if ((fd = fopen(prefs->filename, "w")) == NULL) { return -1; } entry = prefs->keys; fprintf(fd, "#\n" "# alsaplayer config file\n" "#\n" "# Only edit this file if the application is not active.\n" "# Any modifications might (will!) be lost otherwise.\n" "#\n"); if (sorted) { for (c=0; c < prefs->count; c++) { fprintf(fd, "%s.%s=%s\n", sorted[c].section, sorted[c].key, sorted[c].value); } free(sorted); } else { while (entry) { fprintf(fd, "%s.%s=%s\n", entry->section, entry->key, entry->value); entry = entry->next; } } fclose(fd); return 0; } // Function to free user created prefs void prefs_free(prefs_handle_t *prefs) { prefs_key_t *entry; assert(prefs); entry = prefs->keys; while (entry) { prefs_key_t *next = entry->next; free (entry->section); free (entry->key); free (entry->value); free (entry); entry = next; } if (prefs->filename) free (prefs->filename); free (prefs); } #ifdef __cplusplus } #endif alsaplayer-0.99.82/app/reader.cpp000066400000000000000000000210351466261456500166060ustar00rootroot00000000000000/* reader.cpp * Copyright (C) 2002 Evgeny Chukreev * Copyright (C) 2003 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include #include #include #include #include #include #include "AlsaPlayer.h" #include "alsaplayer_error.h" #include "reader.h" #define MAX_READER_PLUGINS 10 static reader_plugin plugins [MAX_READER_PLUGINS]; static int plugin_count = 0; static int register_plugin (reader_plugin *the_plugin) { int version; int error_count = 0; reader_plugin *tmp = &plugins[plugin_count]; /* check version */ tmp->version = the_plugin->version; if (tmp->version) { if ((version = tmp->version) != READER_PLUGIN_VERSION) { alsaplayer_error("Wrong version number on plugin (v%d, wanted v%d)", version - READER_PLUGIN_BASE_VERSION, READER_PLUGIN_VERSION - READER_PLUGIN_BASE_VERSION); return 0; } } memcpy (tmp, the_plugin, sizeof (reader_plugin)); /* checks */ if (tmp->name == NULL) { alsaplayer_error("No name"); error_count++; } if (tmp->author == NULL) { alsaplayer_error("No author"); error_count++; } if (tmp->init == NULL) { alsaplayer_error("No init function"); error_count++; } if (tmp->can_handle == NULL) { alsaplayer_error("No can_handle function"); error_count++; } if (tmp->open == NULL) { alsaplayer_error("No open function"); error_count++; } if (tmp->close == NULL) { alsaplayer_error("No close function"); error_count++; } if (tmp->shutdown == NULL) { alsaplayer_error("No shutdown function"); error_count++; } if (tmp->seek == NULL) { alsaplayer_error("No seek function"); error_count++; } if (tmp->length == NULL) { alsaplayer_error("No length function"); error_count++; } if (tmp->eof == NULL) { alsaplayer_error("No eof function"); error_count++; } if (tmp->seekable == NULL) { alsaplayer_error("No seekable function"); error_count++; } if (tmp->expand == NULL) { alsaplayer_error("No expand function"); error_count++; } if (tmp->can_expand == NULL) { alsaplayer_error("No can_expand function"); error_count++; } if (error_count) { alsaplayer_error("At least %d error(s) were detected", error_count); return 0; } plugin_count++; if (global_verbose) alsaplayer_error("Loading reader plugin: %s", tmp->name); /* Initialize plugin */ tmp->init (); return 1; } /** * Call this function to load reader plugins. * This function should be called only once. */ void reader_init (void) { char path[1024]; DIR *dir; struct stat buf; struct dirent *entry; reader_plugin_info_type reader_plugin_info; void *handle; char *ext; /* Initialize plugins array */ memset (plugins, 0, sizeof(plugins)); /* Trying to open plugins dir */ if (!(dir = opendir (ADDON_DIR "/reader"))) return; /* for each entry in opened dir */ while ((entry = readdir(dir)) != NULL) { /* skip .. and . entries */ if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) continue; /* compose full plugin path */ snprintf(path, sizeof (path), "%s/reader/%s", ADDON_DIR, entry->d_name); if (stat(path, &buf)) continue; /* skip not regular files */ if (!S_ISREG(buf.st_mode)) continue; /* handle only .so files */ ext = strrchr(path, '.'); if (!ext++) continue; if (strcasecmp(ext, "so")) continue; /* trying to load plugin */ if ((handle = dlopen(path, RTLD_NOW |RTLD_GLOBAL)) == NULL) { alsaplayer_error("%s", dlerror()); continue; } reader_plugin_info = (reader_plugin_info_type) dlsym(handle, "reader_plugin_info"); if (!reader_plugin_info) { alsaplayer_error("Could not find reader_plugin_info symbol in shared object `%s'", path); dlclose(handle); continue; } reader_plugin *the_plugin; the_plugin = reader_plugin_info(); if (the_plugin) the_plugin->handle = handle; if (!register_plugin(the_plugin)) { alsaplayer_error("Error loading %s", path); dlclose(handle); continue; } } /* end of: while ((entry = readdir(dir)) != NULL) */ closedir(dir); } /////////////////////////////////////// API for input plugins!!! ///////// extern "C" { // Check for ability to handle this kind of URI int reader_can_handle (const char *uri) { int i = plugin_count; reader_plugin *plugin = plugins; if (!uri) { return 0; } // Search for best reader plugin for (;i--;plugin++) { if (plugin->can_handle (uri) > 0) return 1; } return 0; } void reader_status(const char *str) { alsaplayer_error(str); } // Like fopen reader_type *reader_open (const char *uri, reader_status_type status, void *data) { int i = plugin_count; reader_plugin *plugin = plugins, *best_plugin = NULL; float max_q = 0.0; reader_type *h = (reader_type*)malloc (sizeof(reader_type)); // Check for memory if (!h) return NULL; // Search for best reader plugin for (;i--;plugin++) { float q = plugin->can_handle (uri); if (q == 1.0) { best_plugin = plugin; break; } if (q > max_q) { max_q = q; best_plugin = plugin; } } /* use this plugin */ if (best_plugin) { h->plugin = best_plugin; h->fd = h->plugin->open (uri, status, data); /* If fail to open */ if (h->fd == NULL) { free (h); return NULL; } return h; } /* First chance failed. */ free (h); /* Second chance!!! (try treat it as a file) */ if (strncmp (uri, "file:", 5)) { char new_uri [1024]; snprintf (new_uri, 1024, "file:%s", uri); return reader_open (new_uri, status, data); } /* Couldn't find reader */ return NULL; } // Like fclose int reader_close (reader_type *h) { h->plugin->close (h->fd); free (h); return 0; } // Like nothing else :) size_t reader_metadata (reader_type *h, size_t size, void *data) { return h->plugin->metadata (h->fd, size, data); } // Like fread size_t reader_read (void *ptr, size_t size, reader_type *h) { return h->plugin->read (ptr, size, h->fd); } // Like fseek int reader_seek (reader_type *h, long offset, int whence) { return h->plugin->seek (h->fd, offset, whence); } // Like ftell long reader_tell (reader_type *h) { return h->plugin->tell (h->fd); } // Like feof int reader_eof (reader_type *h) { return h->plugin->eof (h->fd); } // length of stream long reader_length (reader_type *h) { return h->plugin->length (h->fd); } // length of stream int reader_seekable (reader_type *h) { return h->plugin->seekable (h->fd); } // try to expand URI. // Function returns list of pointers to the expanded URIs. // or NULL if this URI is not expandable.... // You should free it with the reader_free_expanded function. char **reader_expand (const char *uri) { int i = plugin_count; reader_plugin *plugin = plugins, *best_plugin = NULL; float max_q = 0.0; // Search for best reader plugin for (;i--;plugin++) { float q = plugin->can_expand (uri); if (q == 1.0) { best_plugin = plugin; break; } if (q > max_q) { max_q = q; best_plugin = plugin; } } /* use this plugin */ if (best_plugin) { return best_plugin->expand (uri); } /* Second chance!!! (try treat it as a file) */ if (strncmp (uri, "file:", 5)) { char new_uri [1024]; snprintf (new_uri, 1024, "file:%s", uri); return reader_expand (new_uri); } /* Couldn't find reader */ return NULL; } /** * Free memory allocated for expanded list */ void reader_free_expanded (char **list) { char **uri = list; if (!list) return; while (*uri) free (*(uri++)); free (list); } /** * Read line from stream. */ int reader_readline (reader_type *h, char *buf, int size) { int len = 0; if (!h || !buf) { return 0; } while (size && !reader_eof(h)) { reader_read (buf, 1, h); if (*buf == '\n') break; len++; buf++; size--; } *buf = '\0'; return len; } } /* end of: extern "C" */ alsaplayer-0.99.82/app/reverbst.cpp000066400000000000000000000155201466261456500172020ustar00rootroot00000000000000/* * reverbst.c -- mono reverberation filtration * * Written and copywritten by Philip Edelbrock, * Copyright (C) 1999 * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * Version 1.0.1: updated licence to GPL3 or later * */ #include #include #include #include #include #include #include "CorePlayer.h" int fbper; float decayamt; long sampling=44100; /* Sound card interface defs and vars */ #define SAMPLING_RATE sampling int audio_fd; /* Left channel Filter design parameters */ #define COMB_L_GAIN_1 (double)-0.40 #define COMB_L_DELAY_1 (-(log10(-(COMB_L_GAIN_1)) * decayamt * SAMPLING_RATE)/ 3.0) #define COMB_L_GAIN_2 (double)-0.42 #define COMB_L_DELAY_2 (-(log10(-(COMB_L_GAIN_2)) * decayamt * SAMPLING_RATE)/ 3.0) #define COMB_L_GAIN_3 (double)-0.44 #define COMB_L_DELAY_3 (-(log10(-(COMB_L_GAIN_3)) * decayamt * SAMPLING_RATE)/ 3.0) #define COMB_L_GAIN_4 (double)-0.60 #define COMB_L_DELAY_4 (-(log10(-(COMB_L_GAIN_4)) * decayamt * SAMPLING_RATE)/ 3.0) const double COMB_L_GAIN[4]={COMB_L_GAIN_1,COMB_L_GAIN_2,COMB_L_GAIN_3,COMB_L_GAIN_4}; long COMB_L_DELAY[4]; #define MAXDELAY (long)24000 /* Global vars for filters */ double lmem1[MAXDELAY]; double lmem2[MAXDELAY]; double lmem3[MAXDELAY]; double lmem4[MAXDELAY]; long lstep[4]={0,0,0,0}; double lallpassmem1=0; double lallpassmem2=0; /* Right channel Filter design parameters */ #define COMB_R_GAIN_1 (double)-0.42 #define COMB_R_DELAY_1 (-(log10(-(COMB_R_GAIN_1)) * decayamt * SAMPLING_RATE)/ 3.0) #define COMB_R_GAIN_2 (double)-0.47 #define COMB_R_DELAY_2 (-(log10(-(COMB_R_GAIN_2)) * decayamt * SAMPLING_RATE)/ 3.0) #define COMB_R_GAIN_3 (double)-0.48 #define COMB_R_DELAY_3 (-(log10(-(COMB_R_GAIN_3)) * decayamt * SAMPLING_RATE)/ 3.0) #define COMB_R_GAIN_4 (double)-0.59 #define COMB_R_DELAY_4 (-(log10(-(COMB_R_GAIN_4)) * decayamt * SAMPLING_RATE)/ 3.0) const double COMB_R_GAIN[4]={COMB_R_GAIN_1,COMB_R_GAIN_2,COMB_R_GAIN_3,COMB_R_GAIN_4}; long COMB_R_DELAY[4]; /* Mixing value -- Value from 0 to 1 for the ammount of reverb */ #define AMMOUNT ((float)fbper/100.0) /* Global vars for filters */ double rmem1[MAXDELAY]; double rmem2[MAXDELAY]; double rmem3[MAXDELAY]; double rmem4[MAXDELAY]; long rstep[4]={0,0,0,0}; double rallpassmem1=0; double rallpassmem2=0; /* Fill the comb histories with silence */ void initdelays(void) { COMB_R_DELAY[0]=(long)COMB_R_DELAY_1; COMB_R_DELAY[1]=(long)COMB_R_DELAY_2; COMB_R_DELAY[2]=(long)COMB_R_DELAY_3; COMB_R_DELAY[3]=(long)COMB_R_DELAY_4; COMB_L_DELAY[0]=(long)COMB_L_DELAY_1; COMB_L_DELAY[1]=(long)COMB_L_DELAY_2; COMB_L_DELAY[2]=(long)COMB_L_DELAY_3; COMB_L_DELAY[3]=(long)COMB_L_DELAY_4; #ifdef DEBUG printf("comb delays: %li,%li,%li,%li %li,%li,%li,%li\n", COMB_L_DELAY[0],COMB_L_DELAY[1],COMB_L_DELAY[2],COMB_L_DELAY[3], COMB_R_DELAY[0],COMB_R_DELAY[1],COMB_R_DELAY[2],COMB_R_DELAY[3]); #endif if ((COMB_R_DELAY[0]>MAXDELAY)||(COMB_R_DELAY[1]>MAXDELAY)|| (COMB_R_DELAY[2]>MAXDELAY)||(COMB_R_DELAY[3]>MAXDELAY)|| (COMB_L_DELAY[0]>MAXDELAY)||(COMB_L_DELAY[1]>MAXDELAY)|| (COMB_L_DELAY[2]>MAXDELAY)||(COMB_L_DELAY[3]>MAXDELAY)) { printf("Arrays not large enough! Increase MAXDELAY.\n"); exit(1); } } /* Filter functions */ double allpass1(double sample,int rl) { double temp; if (rl) { temp=lallpassmem1 - sample; lallpassmem1=0.70710678 * (sample + lallpassmem1); return temp; } else { temp=rallpassmem1 - sample; rallpassmem1=0.70710678 * (sample + rallpassmem1); return temp; } } double allpass2(double sample,int rl) { double temp; if (rl) { temp=lallpassmem2 - sample; lallpassmem2=0.70710678 * (sample + lallpassmem2); return temp; } else { temp=rallpassmem2 - sample; rallpassmem2=0.70710678 * (sample + rallpassmem2); return temp; } } double comb(double sample,long combid,int rl) { double temp; double *memtemp=NULL; if (rl == 0) { if (combid == 0) memtemp=lmem1; if (combid == 1) memtemp=lmem2; if (combid == 2) memtemp=lmem3; if (combid == 3) memtemp=lmem4; } else { if (combid == 0) memtemp=rmem1; if (combid == 1) memtemp=rmem2; if (combid == 2) memtemp=rmem3; if (combid == 3) memtemp=rmem4; } if (rl == 0) { memtemp[lstep[combid]]=sample + (COMB_L_GAIN[combid] * memtemp[((lstep[combid] + 1) % COMB_L_DELAY[combid])]); temp= memtemp[((lstep[combid] + 1) % COMB_L_DELAY[combid])]; lstep[combid]++; if (lstep[combid] >= COMB_L_DELAY[combid]) lstep[combid]=0; return temp; } else { memtemp[rstep[combid]]=sample + (COMB_R_GAIN[combid] * memtemp[((rstep[combid] + 1) % COMB_R_DELAY[combid])]); temp= memtemp[((rstep[combid] + 1) % COMB_R_DELAY[combid])]; rstep[combid]++; if (rstep[combid] >= COMB_R_DELAY[combid]) rstep[combid]=0; return temp; } } /* Put the filters together here */ double reverb(double sample,int rl) { //return (comb(sample,0,rl) +comb(sample,3,rl))/2.0; return ((1.0 - AMMOUNT) * sample) + (AMMOUNT * allpass2( allpass1( (comb(sample,0,rl) + comb(sample,1,rl) + comb(sample,2,rl) + comb(sample,3,rl)) / 4 ,rl) ,rl)); } /* Main sampling/playback loop */ int init_reverb() { //int i,len; char samprate[255]="44100\0"; char fbdist[255]="20\0"; char decay[255]="2.000\0"; //long c; /* Convert args */ if (sscanf(samprate,"%li",&sampling) == 0) {printf("Bad samprate arg.\n");exit(1);} if (sscanf(fbdist,"%i",&fbper) == 0) {printf("Bad fbdist arg.\n");exit(1);} if (sscanf(decay,"%f",&decayamt) == 0) {printf("Bad decay arg.\n");exit(1);} if (sampling < 4000) {printf("Bad samprate value.\n");exit(1);} if ((fbper > 100) || (fbper < 0)) {printf("Bad fbdist value.\n");exit(1);} if (decayamt < 0) {printf("Bad decay value.\n");exit(1);} printf("\nUsing these parameters: samprate=%ld fbdist=%d decay=%f\n\n",sampling,fbper,decayamt); initdelays(); return 0; } bool reverb_func(void *arg, void *data, int size) { // This is an optimization hack CorePlayer *p = (CorePlayer *)arg; if (!p->IsActive()) return true; // End hack short *buffer = (short *)data; long c; for (int i=0; i < size/2; i++) { c = buffer[i]; long r; if (i % 2) r = (long)(reverb(c, 1)); else r = (long)(reverb(c, 0)); if (r > 32767) r = 32767; else if (r < -32768) r = -32768; buffer[i] = (short)r; } return true; } alsaplayer-0.99.82/app/utilities.c000066400000000000000000000065721466261456500170300ustar00rootroot00000000000000/* utilities.c * Copyright (C) 1999 Richard Boulton * Copyright (C) 2003 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include #include #include #include #include #include "utilities.h" #include "alsaplayer_error.h" /* Threads and usleep does not work, select is very portable */ #include #include #include void dosleep(unsigned int msec) { struct timeval time; time.tv_sec=0; time.tv_usec=msec; select(0, NULL, NULL, NULL, &time); } void parse_file_uri_free(char *p) { if (p) free(p); } char *get_homedir(void) { char *homedir = NULL; if ((homedir = getenv("HOME")) == NULL) { homedir = strdup("/tmp"); } return homedir; } char *get_prefsdir(void) { static char prefs_path [PATH_MAX]; static int prefs_path_init = 0; char *homedir; if (prefs_path_init) { return prefs_path; } homedir = get_homedir(); snprintf(prefs_path, sizeof (prefs_path), "%s/.alsaplayer", homedir); prefs_path_init = 1; return prefs_path; } #if 0 static voidencode_percent_free(char *p) { if (p) free(p); } char *encode_percent(const char *furi) { char *res; int c, i, o, t; if (!furi) return NULL; /* count the percent signs */ c = 0; i = 0; t = strlen(furi); while (i < t) { if (furi[i++] == '%') { c++; } } res = malloc(t + c + 1); if (res) { i = 0; o = 0; while (i < t) { if (furi[i] == '%') { res[o++] = '%'; } res[o++] = furi[i++]; } } return res; } #endif char *parse_file_uri(const char *furi) { char *res; char escape[4]; int r,w, t, percent, e, val; alsaplayer_error("parsing: %s", furi); if (!furi) return NULL; if ((strncmp(furi, "file:", 5) != 0) || !is_uri(furi)) { return NULL; } t=strlen(furi); res = malloc(t+1); r=5; w=0; e=0; percent = 0; while (r < t) { switch(furi[r]) { case '%': if (percent) { res[w++] = '%'; percent = 0; } else { percent = 1; e = 0; } break; default: if (percent) { escape[e++] = furi[r]; escape[e]=0; if (e == 2) { if ((sscanf(escape, "%x", &val) == 1)) { res[w++] = val; } else { alsaplayer_error("unandled percent escape (%s)", escape); } percent = 0; } } else { res[w++] = furi[r]; } break; } r++; res[w] = 0; } alsaplayer_error("parsed to: %s", res); return res; } int is_playlist(const char *path) { char *ext; if (!path) return 0; ext = strrchr(path, '.'); if (!ext) return 0; ext++; if (strncasecmp(ext, "pls", 3) == 0 || strncasecmp(ext, "m3u", 3) == 0) { return 1; } return 0; } int is_uri(const char *path) { if (strstr(path, "://")) return 1; return 0; } alsaplayer-0.99.82/attic/000077500000000000000000000000001466261456500151635ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/000077500000000000000000000000001466261456500176605ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/ape/000077500000000000000000000000001466261456500204255ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/ape/ChangeLog000066400000000000000000000023201466261456500221740ustar00rootroot00000000000000* Sun Nov 4 2007 Peter Lemenkov - Save path of playing file for future use in CorePlayer - prevent double free attempt (since we now store and handle currently playing track's path in CorePlayer). * Tue Apr 3 2007 Peter Lemenkov - Fix for endianness * Tue Apr 3 2007 Dominique Michel - Conditional PREFIX in Makefile * Tue Apr 3 2007 Peter Lemenkov - Preparation for using of tags - Use of input_object->path * Tue Feb 27 2007 Peter Lemenkov - Removed unused variables - Small cleanups * Thu Feb 15 2007 Peter Lemenkov - Many cleanups * Wed Feb 14 2007 Peter Lemenkov - Cosmetic fix for all BE-architectures [0.0.0.6] * Some optimization and cosmetic fixes [0.0.0.5] * Quick hack for PPC-arch [0.0.0.4] * APE tags now parsed. This allows by enabling HAVE_TAGLIB (enabled by default) in the Makefile. Needs TagLib ( http://developer.kde.org/~wheeler/taglib.html ) [0.0.0.3] * fixed ading new files (quick and dirty workaround, see ape_play_frame and now_play) [0.0.0.2] * fixed displaying version of ape-file [0.0.0.1] * Initial release alsaplayer-0.99.82/attic/experimental/ape/Makefile000066400000000000000000000006751466261456500220750ustar00rootroot00000000000000PREFIX? = /usr/local # choose suitable compiler CC = gcc CFLAGS = -fPIC -DBUILD_CROSS_PLATFORM -I$(PREFIX) LINKER_FLAGS = -L${PREFIX}/lib -lmac LINKER_OBJECTS = mac_engine.o # bumps the empty 'make' command all: $(LINKER_OBJECTS) $(CC) -shared mac_engine.o $(LINKER_FLAGS) -o mac_engine.so .cpp.o: $(CC) -c $(CFLAGS) -o $@ $< install: cp mac_engine.so $(PREFIX)/lib/alsaplayer/input/ clean: rm -f $(LINKER_OBJECTS) mac_engine.so *~ alsaplayer-0.99.82/attic/experimental/ape/mac_engine.cpp000066400000000000000000000133721466261456500232240ustar00rootroot00000000000000/* * mac_engine.cpp (C) 2005-2007 by Peter Lemenkov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include /* memset */ #ifdef __BIG_ENDIAN #include /* swab */ #endif #include #include #include #include #include //#include #include //#include #define BLOCK_SIZE 4096 /* We can use any block size we like */ static int ape_init(void) { return 1; } static void ape_shutdown(void) { return; } static float ape_can_handle(const char *path) { int ret = 0; wchar_t* pUTF16 = GetUTF16FromANSI (path); IAPEDecompress* temp = CreateIAPEDecompress(pUTF16, &ret); delete temp; free (pUTF16); if(ret == ERROR_SUCCESS) return 1.0; return 0.0; } static int ape_open(input_object *obj, const char *path) { int ret = 0; void* datasource = NULL; if (!obj) return 0; if ((datasource = reader_open(path, NULL, NULL)) == NULL) { return 0; } obj->flags = 0; if (reader_seekable ((reader_type*)datasource)) { obj->flags |= P_SEEK; obj->flags |= P_PERFECTSEEK; obj->flags |= P_FILEBASED; } else obj->flags |= P_STREAMBASED; wchar_t* pUTF16 = GetUTF16FromANSI (path); obj->local_data = CreateIAPEDecompress(pUTF16, &ret); free (pUTF16); obj->nr_channels = ((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_CHANNELS); obj->nr_tracks = 1; obj->frame_size = BLOCK_SIZE; return 1; } static void ape_close(input_object *obj) { if (!obj || !(obj->local_data)) return; free (obj->local_data); obj->local_data = NULL; } static long ape_frame_to_sec (input_object *obj, int frame) { if (!obj || !(obj->local_data)) return 0; return (frame * obj->frame_size) / \ (((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_SAMPLE_RATE) * \ obj->nr_channels * \ ((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_BYTES_PER_SAMPLE) / 100); } static int ape_sample_rate(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return ((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_SAMPLE_RATE); } static int ape_channels(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return obj->nr_channels; } static int ape_stream_info (input_object *obj, stream_info *info) { if (!obj || !(obj->local_data) || !info) return 0; // CAPETag *tag = (CAPETag *)((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_TAG); // TagLib_File* tag_file = taglib_file_new(const char *filename); sprintf(info->stream_type, "APE version %.2f", float (((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_FILE_VERSION)) / 1000); strcpy(info->status, "playing..."); strcpy(info->artist, "Artist"); strcpy(info->title, "Title"); strcpy(info->album, "Album"); strcpy(info->genre, "Genre"); strcpy(info->year, "Year"); strcpy(info->track, "Tracknum"); strcpy(info->comment, "Comment"); strcpy(info->path, obj->path); info->channels = obj->nr_channels; info->tracks = 1; // number of tracks info->current_track = 1; // number of current track info->sample_rate = ((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_SAMPLE_RATE); info->bitrate = ((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_AVERAGE_BITRATE); // printf ("ape: artist[%s], title[%s], path[%s]\n", info->artist, info->title, info->path); return 1; } static int ape_nr_frames(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return (((IAPEDecompress*) obj->local_data)->GetInfo(APE_INFO_WAV_DATA_BYTES) / obj->frame_size); } static int ape_frame_size(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return obj->frame_size; } static int ape_frame_seek(input_object *obj, int frame) { int64_t pos; if (!obj || !(obj->local_data)) return 0; if (obj->flags & P_STREAMBASED) return 0; ((IAPEDecompress*) obj->local_data)->Seek(frame * obj->frame_size / 4); return frame; } static int ape_play_frame (input_object *obj, char *buf) { int nRead = 0; int i; if (!obj || !(obj->local_data)) return 0; ((IAPEDecompress*) obj->local_data)->GetData (buf, 1024, &nRead); #ifdef __BIG_ENDIAN__ swab(buf, buf, (nRead * 4)); #endif if (nRead != 0) return 1; return 0; } static input_plugin ape_plugin; #ifdef __cplusplus extern "C" { #endif input_plugin *input_plugin_info (void) { memset(&ape_plugin, 0, sizeof(input_plugin)); ape_plugin.version = INPUT_PLUGIN_VERSION; ape_plugin.name = "Monkey's Audio plugin ver. 0.0.0.7"; ape_plugin.author = "Peter Lemenkov"; ape_plugin.init = ape_init; ape_plugin.shutdown = ape_shutdown; ape_plugin.can_handle = ape_can_handle; ape_plugin.open = ape_open; ape_plugin.close = ape_close; ape_plugin.play_frame = ape_play_frame; ape_plugin.frame_seek = ape_frame_seek; ape_plugin.frame_size = ape_frame_size; ape_plugin.nr_frames = ape_nr_frames; ape_plugin.frame_to_sec = ape_frame_to_sec; ape_plugin.sample_rate = ape_sample_rate; ape_plugin.channels = ape_channels; ape_plugin.stream_info = ape_stream_info; /* TODO */ return &ape_plugin; } #ifdef __cplusplus } #endif alsaplayer-0.99.82/attic/experimental/ffmpeg/000077500000000000000000000000001466261456500211245ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/ffmpeg/ChangeLog000066400000000000000000000000001466261456500226640ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/ffmpeg/Makefile000066400000000000000000000010521466261456500225620ustar00rootroot00000000000000PREFIX? = /usr # choose suitable compiler COMPILATOR = g++ DEBUG = -Wall -O2 CFLAGS = -fPIC CPPFLAGS = -I$(PREFIX)/include `pkg-config libavcodec libavformat --cflags` LINKER_FLAGS = -L${PREFIX}/lib `pkg-config libavcodec libavformat --libs` LINKER_OBJECTS = ffmpeg_engine.o # bumps the empty 'make' command all: $(LINKER_OBJECTS) $(CC) -shared -fPIC $(LINKER_OBJECTS) $(LINKER_FLAGS) -o ffmpeg_engine.so .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< install: cp ffmpeg_engine.so $(PREFIX)/lib/alsaplayer/input/ clean: rm -f *.so *.o *~ alsaplayer-0.99.82/attic/experimental/ffmpeg/ffmpeg_engine.c000066400000000000000000000216561466261456500240730ustar00rootroot00000000000000/* * ffmpeg_engine.cpp (C) 2007 by Peter Lemenkov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include /* memset */ #include #include #include #include #include #include #ifdef __BIG_ENDIAN #include /* BE to LE */ #include /* swab */ #endif #define BLOCK_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE /* We can use any block size we like */ //#define BLOCK_SIZE 4096 /* We can use any block size we like */ typedef struct tag_ffmpeg_data { AVFormatContext* format; AVCodecContext* codec_context; AVCodec* codec; int audio_stream_num; } ffmpeg_data ; static int ffmpeg_init(void) { av_register_all (); return 1; } static void ffmpeg_shutdown(void) { return; } static float ffmpeg_can_handle(const char *path) { AVFormatContext *pFormatCtx; if(av_open_input_file(&pFormatCtx, path, NULL, 0, NULL)!=0) return 0.0; if(av_find_stream_info(pFormatCtx)<0) return 0.0; av_close_input_file(pFormatCtx); return 1.0; } static int ffmpeg_open(input_object *obj, const char *path) { int i; int audioStream = -1; void* datasource = NULL; /* AVFormatContext* format; AVCodecContext* codec_context; AVCodec* codec; */ if (!obj) return 0; if ((datasource = reader_open(path, NULL, NULL)) == NULL) return 0; obj->flags = 0; if (reader_seekable ((reader_type*)datasource)) { obj->flags |= P_SEEK; obj->flags |= P_PERFECTSEEK; obj->flags |= P_FILEBASED; } else obj->flags |= P_STREAMBASED; obj->local_data = (ffmpeg_data*) calloc (1, sizeof (ffmpeg_data)); if(av_open_input_file(&(((ffmpeg_data*)obj->local_data)->format), path, NULL, 0, NULL)!=0) return 0; if(av_find_stream_info((((ffmpeg_data*)obj->local_data)->format))<0) return 0; // TODO remove it later dump_format((((ffmpeg_data*)obj->local_data)->format), 0, path, 0); for(i=0; i<(((ffmpeg_data*)obj->local_data)->format)->nb_streams; i++) if((((ffmpeg_data*)obj->local_data)->format)->streams[i]->codec->codec_type==CODEC_TYPE_AUDIO){ audioStream=i; printf ("Audiostream: %u\n", i); break; } if(audioStream==-1) return 0; // Didn't find a audio stream ((ffmpeg_data*)obj->local_data)->audio_stream_num = audioStream; // Get a pointer to the codec context for the video stream ((ffmpeg_data*)obj->local_data)->codec_context=(((ffmpeg_data*)obj->local_data)->format)->streams[audioStream]->codec; // Find the decoder for the stream ((ffmpeg_data*)obj->local_data)->codec=avcodec_find_decoder((((ffmpeg_data*)obj->local_data)->codec_context)->codec_id); if (!((ffmpeg_data*)obj->local_data)->codec) return 0; if(avcodec_open(((ffmpeg_data*)obj->local_data)->codec_context, ((ffmpeg_data*)obj->local_data)->codec)<0) return 0; obj->nr_channels = (((ffmpeg_data*)obj->local_data)->format)->streams[audioStream]->codec->channels; obj->nr_tracks = 1; obj->frame_size = BLOCK_SIZE; printf ("ffmpeg_open: return\n \ \t\tnr_channels[%u]\n \ \t\tnr_tracks[%u]\n \ \t\tframe_size[%u]\n \ \t\tpath[%s]\n \ \t\tsamplerate[%u]\n \ \t\tbit_rate[%u]\n \ \t\tbits_per_sample[%d]\n \ ", obj->nr_channels, obj->nr_tracks, obj->frame_size, obj->path, ((ffmpeg_data*)obj->local_data)->codec_context->sample_rate, ((ffmpeg_data*)obj->local_data)->codec_context->bit_rate, ((ffmpeg_data*)obj->local_data)->codec_context->bits_per_sample); return 1; } static void ffmpeg_close(input_object *obj) { printf("ffmpeg_close: begin\n"); if (!obj || !(obj->local_data)) return; if (((ffmpeg_data*)obj->local_data)->codec_context){ printf("ffmpeg_close: destroying codec_context\n"); avcodec_close(((ffmpeg_data*)obj->local_data)->codec_context); ((ffmpeg_data*)obj->local_data)->codec_context = NULL; } if (((ffmpeg_data*)obj->local_data)->format){ printf("ffmpeg_close: destroying format\n"); av_close_input_file (((ffmpeg_data*)obj->local_data)->format); ((ffmpeg_data*)obj->local_data)->format = NULL; } printf("ffmpeg_close: destroying local_data\n"); free (obj->local_data); obj->local_data = NULL; printf("ffmpeg_close: return\n"); } static long ffmpeg_frame_to_sec (input_object *obj, int frame) { printf("ffmpeg_frame_to_sec %d\n", frame); AVCodecContext* codec; if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context)) return 0; codec = ((ffmpeg_data*)obj->local_data)->codec_context; printf ("ffmpeg_frame_to_sec: return %u\n", (frame * obj->frame_size) / (codec->sample_rate * 2 * 2 * obj->nr_channels) * 100); return (frame * obj->frame_size) / (codec->sample_rate * 2 * 2 /* TODO codec->bits_per_sample */ * obj->nr_channels) * 100; } static int ffmpeg_sample_rate(input_object *obj) { AVCodecContext* codec; if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context)) return 0; codec = ((ffmpeg_data*)obj->local_data)->codec_context; printf ("ffmpeg_sample_rate: return %u\n", codec->sample_rate); return codec->sample_rate; } static int ffmpeg_channels(input_object *obj) { if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context)) return 0; printf ("ffmpeg_channels: return %u\n", obj->nr_channels); return obj->nr_channels; } static int ffmpeg_stream_info (input_object *obj, stream_info *info) { printf("ffmpeg_stream_info\n"); AVCodecContext* codec; if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context)) return 0; // codec = ((ffmpeg_data*)obj->local_data)->pCodecCtx; codec = ((ffmpeg_data*)obj->local_data)->codec_context; sprintf(info->stream_type, "FFmpeg\n"); strcpy(info->status, "playing..."); strcpy(info->path, obj->path); info->channels = obj->nr_channels; info->tracks = 1; // number of tracks info->current_track = 1; // number of current track info->sample_rate = codec->sample_rate; info->bitrate = codec->bit_rate; return 1; } static int ffmpeg_nr_frames(input_object *obj) { printf("ffmpeg_nr_frames\n"); if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context)) return 0; // return (WavpackGetNumSamples (obj->local_data) * WavpackGetBytesPerSample (obj->local_data) * obj->nr_channels / obj->frame_size); return 0; } static int ffmpeg_frame_size(input_object *obj) { if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context)) return 0; printf("ffmpeg_frame_size return %d\n", obj->frame_size); return obj->frame_size; } static int ffmpeg_frame_seek(input_object *obj, int frame) { if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context) || obj->flags & P_STREAMBASED) return 0; printf("ffmpeg_frame_seek return %d\n", frame); return frame; } static int ffmpeg_play_frame (input_object *obj, char *buf) { printf("ffmpeg_play_frame\n"); AVPacket pkt; int i = AVCODEC_MAX_AUDIO_FRAME_SIZE; if (!obj || !(obj->local_data) || !(((ffmpeg_data*)obj->local_data)->codec_context)) return 0; av_read_packet (((ffmpeg_data*)obj->local_data)->format, &pkt); avcodec_decode_audio2 ( ((ffmpeg_data*)obj->local_data)->codec_context, buf, &i, pkt.data, pkt.size); swab(buf, buf, i/2); av_free_packet (&pkt); printf("ffmpeg_play_frame return %d\n", i); return i; } static input_plugin ffmpeg_plugin; #ifdef __cplusplus extern "C" { #endif input_plugin *input_plugin_info (void) { memset(&ffmpeg_plugin, 0, sizeof(input_plugin)); ffmpeg_plugin.version = INPUT_PLUGIN_VERSION; ffmpeg_plugin.name = "FFmpeg plugin ver. 0.0.0.0"; ffmpeg_plugin.author = "Peter Lemenkov"; ffmpeg_plugin.init = ffmpeg_init; // TODO ffmpeg_plugin.shutdown = ffmpeg_shutdown; // TODO ffmpeg_plugin.can_handle = ffmpeg_can_handle; // TODO ffmpeg_plugin.open = ffmpeg_open; // TODO ffmpeg_plugin.close = ffmpeg_close; // TODO ffmpeg_plugin.play_frame = ffmpeg_play_frame; // TODO ffmpeg_plugin.frame_seek = ffmpeg_frame_seek; // TODO ffmpeg_plugin.frame_size = ffmpeg_frame_size; // TODO ffmpeg_plugin.nr_frames = ffmpeg_nr_frames; // TODO ffmpeg_plugin.frame_to_sec = ffmpeg_frame_to_sec; // TODO ffmpeg_plugin.sample_rate = ffmpeg_sample_rate; // TODO ffmpeg_plugin.channels = ffmpeg_channels; // TODO ffmpeg_plugin.stream_info = ffmpeg_stream_info; // TODO return &ffmpeg_plugin; } #ifdef __cplusplus } #endif alsaplayer-0.99.82/attic/experimental/obsolete/000077500000000000000000000000001466261456500214745ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/Makefile.am000066400000000000000000000004741466261456500235350ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign SUBDIRS = intl po interface output input scopes app alsaplayer extra docs \ libalsaplayer examples m4 reader scopes2 EXTRA_DIST = config.rpath bootstrap alsaplayer.spec pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = alsaplayer.pc man_MANS = alsaplayer.1 ACLOCAL_AMFLAGS = -I m4 alsaplayer-0.99.82/attic/experimental/obsolete/README000066400000000000000000000011141466261456500223510ustar00rootroot00000000000000Here is some obsolete stuffs. We moved them from the main tree and don't have any plan to pursue any kind of development with this. The qt interface has never worked. If you want to use the gtk1 interface, look for the release called alsaplayer-0.99.80-gtk1. It contain a few fixes that have never been released in the older releases. The scope folder contain the gtk1 visualization plugins. The fftscope folder contain the gtk1 version of /trunk/fftscope. input/mad contain the code of the mad input plugin before removing the outdated mad code that was included with AlsaPlayer. alsaplayer-0.99.82/attic/experimental/obsolete/configure.ac000066400000000000000000000446441466261456500237760ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(alsaplayer) ALSAPLAYER_MAJOR_VERSION=0 ALSAPLAYER_MINOR_VERSION=99 ALSAPLAYER_MICRO_VERSION=80 BETA=-rc2 ALSAPLAYER_VERSION=$ALSAPLAYER_MAJOR_VERSION.$ALSAPLAYER_MINOR_VERSION.${ALSAPLAYER_MICRO_VERSION}${BETA} AM_INIT_AUTOMAKE(alsaplayer, ${ALSAPLAYER_VERSION}) AM_MAINTAINER_MODE dnl ======================================================= dnl alsaplayer control variables and their default values dnl this config procedure shamelessly stolen from libmikmod dnl ======================================================= have_gtk=no have_gtk2=no have_glib=no dnl have_qt=no have_opengl=no have_audiofile=no have_oggvorbis=no have_flac=no have_oggflac=no have_alsa_05x=no have_alsa_final=no have_oss=no have_esd=no have_sparc=no have_sgi=no have_nas=no have_mikmod=no have_jack=no have_xosd=no dynload=no use_3dnow_asm=no use_libmad=no use_libid3tag=no prefer_mad=yes if test "x$x_includes" = "xNONE" then x_includes=/usr/X11R6/include fi if test "x$x_libraries" = "xNONE" then x_libraries=/usr/X11R6/lib fi dnl Check for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_INSTALL AC_GNU_SOURCE AM_GNU_GETTEXT AC_PROG_LN_S dnl static libs make no sense for alsaplayer AM_DISABLE_STATIC AM_PROG_LIBTOOL AM_PROG_CC_C_O AC_PROG_MAKE_SET AM_PATH_GTK(1.2.6, have_gtk=yes , have_gtk=no, gthread) AM_PATH_GLIB(1.2.6, have_glib=yes, have_glib=no) AM_PATH_LIBMIKMOD(3.1.7, have_mikmod=yes, have_mikmod=no) AM_PATH_OGG(have_ogg=yes, have_ogg=no) AM_PATH_VORBIS(have_vorbis=yes, have_vorbis=no) AM_PATH_AUDIOFILE(0.1.7, have_audiofile=yes, have_audiofile=no) AC_CHECK_LIB(audiofile, afOpenFile, [have_audiofile=yes AUDIOFILE_CFLAGS="" AUDIOFILE_LIBS="-laudiofile" AC_SUBST(AUDIOFILE_CFLAGS) AC_SUBST(AUDIOFILE_LIBS) ], ) AC_HEADER_STDC dnl ====================== dnl PKGCONFIG preparations dnl ====================== if test -z $PKG_CONFIG_PATH; then PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig fi export PKG_CONFIG_PATH dnl =============== dnl Debugging stuff dnl =============== AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging (default=no)],, enable_debug=no) if test "$enable_debug" = yes; then DFLAGS="$DFLAGS -g" fi AC_ARG_ENABLE(profiling, [ --enable-profiling Enable profiling (-pg)],, enable_profiling=no) if test "$enable_profiling" = yes; then DFLAGS="$DFLAGS -pg" fi AC_SUBST(DFLAGS) dnl ========= dnl NLS stuff dnl ========= AC_ARG_ENABLE(nls, [ --enable-nls Enabled NLS support (default=yes)],, enable_nls=no) if test "$enable_nls" = yes; then echo No nls support yet fi dnl ====== dnl OpenGL dnl ====== AC_ARG_ENABLE(opengl, [ --enable-opengl Enable OpenGL plugins (default=yes)],, enable_opengl=yes) if test "x$enable_opengl" = xyes; then LIBS_save=$LIBS OPENGL_LIBS=error AC_CHECK_LIB(GL, glBegin, OPENGL_LIBS="-lGL -lpthread") if test "x$OPENGL_LIBS" = xerror; then AC_CHECK_LIB(MesaGL, glBegin, OPENGL_LIBS="-lMesaGL -lpthread") fi have_opengl_headers=yes AC_CHECK_HEADERS(GL/gl.h GL/glx.h,,have_opengl_headers=no) if test "x$OPENGL_LIBS" = xerror || test "x$have_opengl_headers" = xno; then have_opengl=no else have_opengl=yes fi LIBS=$LIBS_save else AC_MSG_RESULT([*** Disabling OpenGL plugins per user request ***]) have_opengl=no fi AC_SUBST(OPENGL_LIBS) AM_CONDITIONAL(HAVE_OPENGL, test "x$have_opengl" = xyes) dnl ================ dnl Some input stuff dnl ================ if test "$have_glib" = "no" then have_gtk=no have_gtk2=no fi if test "$have_ogg" = "yes" then if test "$have_vorbis" = "yes" then have_oggvorbis=yes else have_oggvorbis=no fi else have_oggvorbis=no fi AC_ARG_ENABLE(mikmod, [ --enable-mikmod Enable Mikmod plugin (default=yes)], [if test "$enableval" = "no" then if test "$have_mikmod" = "yes" then have_mikmod=no fi fi]) AC_ARG_ENABLE(oggvorbis, [ --enable-oggvorbis Enable Ogg Vorbis plugin (default=yes)], [if test "$enableval" = "no" then if test "$have_oggvorbis" = "yes" then have_oggvorbis=no fi fi]) AM_CONDITIONAL(HAVE_OGGVORBIS,test "$have_oggvorbis" = "yes") audiofile_enable=no AC_ARG_ENABLE(audiofile, [ --enable-audiofile Enable Audiofile plugin (default=no)], [if test "$enableval" = "yes" then if test "$have_audiofile" = "yes" then audiofile_enable=yes fi fi]) if test "$audiofile_enable" = "yes" then have_audiofile=yes else have_audiofile=no fi dnl ============ dnl flac library dnl ============ AC_CHECK_LIB(FLAC, FLAC__stream_decoder_new, FLC_LDADD="-lFLAC -lm"; have_flac=yes; AC_DEFINE(HAVE_LIBFLC, 1, [Define if you have FLAC library (-lFLAC)]), have_flac=no; FLC_LDADD=, -lm) AC_ARG_ENABLE(flac, [ --enable-flac Enable FLAC plugin (default=yes)], [if test "$enableval" = "no" then if test "$have_flac" = "yes" then have_flac=no fi fi]) dnl =============== dnl OggFLAC library dnl =============== AC_CHECK_LIB(OggFLAC, OggFLAC__stream_decoder_new, OGGFLC_LDADD="-lOggFLAC -logg"; have_oggflac=yes; AC_DEFINE(HAVE_LIBOGGFLC, 1, [Define if you have OggFLAC library (-lOggFLAC)]), have_oggflac=no; OGGFLC_LDADD=, -lOggFLAC -lFLAC -logg -lm) AC_ARG_ENABLE(oggflac, [ --enable-oggflac Enable OggFLAC plugin (default=yes)], [if test "$enableval" = "no" then if test "$have_oggflac" = "yes" then have_oggflac=no fi fi]) dnl =========== dnl MAD library dnl =========== AC_CHECK_LIB(mad, mad_stream_init, MAD_LDADD=-lmad; use_libmad=yes; AC_DEFINE(HAVE_LIBMAD, 1, [Define if you have MAD library (-lmad)]), use_libmad=no; MAD_LDADD=, -lmad) dnl ============== dnl id3tab library dnl ============== oldcflags=$CFLAGS CFLAGS="$CFLAGS -lz" AC_CHECK_LIB(id3tag, id3_file_open, FLC_LDADD="$FLC_LDADD -lid3tag -lz"; use_libid3tag=yes; AC_DEFINE(HAVE_LIBID3TAG, 1, [Define if you have libid3tag library (-lid3tag)]), use_libid3tag=no) CFLAGS=$oldcflags AC_SUBST(FLC_LDADD) AC_SUBST(OGGFLC_LDADD) AC_SUBST(MAD_LDADD) dnl ================= dnl audiofile library dnl ================= AM_CONDITIONAL(HAVE_AUDIOFILE,test "x$have_audiofile" = xyes) dnl ========== dnl JACK stuff dnl ========== PKG_CHECK_MODULES(JACK, jack >= 0.61.0, have_jack=yes, have_jack=no) AC_SUBST(JACK_LIBS) AC_SUBST(JACK_CFLAGS) dnl ========== dnl XOSD stuff dnl nb.: by checking for "xosd_create" instead of "xosd_init", we dnl implicitely require xosd 2.x instead of 1.x dnl (which is exactly what we want) dnl ========== AC_CHECK_LIB(xosd, xosd_create, XOSD_LDADD=-lxosd; have_xosd=yes; AC_DEFINE(HAVE_LIBXOSD, 1, [Define if you have XOSD library (-lxosd)]), have_xosd=no; XOSD_LDADD=, -lxosd) AM_CONDITIONAL(HAVE_XOSD, test "x$have_xosd" = xyes) dnl ========== dnl GTK2 stuff dnl ========== PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.8.0 gthread-2.0 >= 2.0.3 pango, have_gtk2=yes, have_gtk2=no) AC_SUBST(GTK2_LIBS) AC_SUBST(GTK2_CFLAGS) dnl ================== dnl libsndfile library dnl ================== have_sndfile=no PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.4, have_sndfile=yes, have_sndfile=no) AC_SUBST(SNDFILE_LIBS) AC_SUBST(SNDFILE_CFLAGS) AM_CONDITIONAL(HAVE_SNDFILE, test "x$have_sndfile" = xyes) dnl =============== dnl POSIX.4 threads dnl =============== AC_CHECK_LIB(pthread,pthread_create, , AC_MSG_ERROR([** POSIX.4 threads not installed or broken **])) dnl ====================== dnl Check for header files dnl ====================== AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(linux/cdrom.h) AC_CHECK_HEADERS(sys/soundcard.h) AC_CHECK_HEADERS(sys/audioio.h) AC_CHECK_HEADERS(audio/audiolib.h) AC_CHECK_HEADERS(libintl.h) AC_CHECK_HEADERS(mad.h) AC_CHECK_HEADERS(id3tag.h) AC_CHECK_HEADERS(FLAC/stream_decoder.h) AC_CHECK_HEADERS(OggFLAC/stream_decoder.h) dnl ========== dnl ALSA stuff dnl ========== AC_MSG_CHECKING(for alsa version) AC_EGREP_CPP([AP_maGiC_VALUE], [ #include #if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR) #if SND_LIB_MAJOR==0 && SND_LIB_MAJOR==5 AP_maGiC_VALUE #endif #endif ], have_alsa_05x=yes ALSA_LIB="-lasound" AC_MSG_RESULT([found 0.5.x]), AC_EGREP_CPP([AP_maGiC_VALUE], [ #include #if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR) #if SND_LIB_MAJOR>0 || (SND_LIB_MAJOR==0 && SND_LIB_MINOR>=6) AP_maGiC_VALUE #endif #endif ], have_alsa_final=yes ALSA_LIB="-lasound" AC_MSG_RESULT([found latest]) ) ) dnl ========= dnl ESD stuff dnl ========= AM_PATH_ESD(0.2.4, have_esd=yes, have_esd=no) dnl =========== dnl SPARC stuff dnl =========== if test "$ac_cv_header_sys_audioio_h" = "yes" then have_sparc=yes else have_sparc=no fi dnl ========= dnl OSS stuff dnl ========= if test "$ac_cv_header_sys_soundcard_h" = "yes" then have_oss=yes else have_oss=no fi dnl ========= dnl SGI stuff dnl ========= AC_CHECK_LIB(audio, alOpenPort, [have_sgi=yes SGI_LIBS=-laudio], have_sgi=no) AC_SUBST(SGI_LIBS) dnl ========= dnl NAS stuff dnl ========= oldcflags=$CFLAGS CFLAGS="$CFLAGS -I$x_includes -L$x_libraries -lXt" AC_CHECK_LIB(audio,AuStartFlow, [have_nas=yes NAS_LIB="-L$x_libraries -laudio -lXt"], have_nas=no) CFLAGS=$oldcflags AC_SUBST(NAS_LIB) dnl ====================== dnl JACK conditional stuff dnl ====================== AC_ARG_ENABLE(jack,[ --enable-jack Enable jack support (default=yes)],[if test "$enableval" = "no" then have_jack=no fi]) dnl ===================================================== dnl Sound output stuff. This will go away once everything dnl is really modular dnl ===================================================== AC_ARG_ENABLE(alsa, [ --enable-alsa Enable ALSA (default=yes)], [if test "$enableval" = "no" then have_alsa=no fi]) AC_ARG_ENABLE(esd, [ --enable-esd Enable esd driver (default=yes)], [if test "$enableval" = "no" then have_esd=no fi]) AC_ARG_ENABLE(sparc, [ --enable-sparc Enable SPARC driver (default=yes)], [if test "$enableval" = "no" then have_sparc=no fi]) AC_ARG_ENABLE(oss, [ --enable-oss Enable OSS driver (default=yes)], [if test "$enableval" = "no" then have_oss=no fi]) AC_ARG_ENABLE(sgi, [ --enable-sgi Enable SGI driver (default=yes)], [if test "$enableval" = "no" then have_sgi=no fi]) AC_ARG_ENABLE(gtk2, [ --enable-gtk2 Enable GTK2 graphical interface (default=yes)], [if test "$enableval" = "no" then have_gtk2=no fi]) AC_ARG_ENABLE(gtk, [ --enable-gtk Enable GTK graphical interface (default=yes)], [if test "$enableval" = "no" then have_gtk=no fi]) AC_ARG_ENABLE(nas, [ --enable-nas Enable NAS driver (default=yes)], [if test "$enableval" = "no" then have_nas=no fi]) dnl AC_ARG_ENABLE(qt, dnl [ --enable-qt Enable Qt graphical interface (default=no)], dnl [ dnl if test "x$enableval" = "xno" dnl then dnl have_qt=no dnl else dnl AM_PATH_QT(have_qt=yes, have_qt=no) dnl fi dnl ], dnl [have_qt=no] dnl ) if test "x$ac_cv_header_mad_h" = "xno" then use_libmad=no fi if test "x$ac_cv_header_id3tag_h" = "xno" then use_libid3tag=no fi dnl ======= dnl DOXYGEN dnl ======= AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false) if test $HAVE_DOXYGEN = "false"; then AC_MSG_WARN([*** doxygen not found, docs will not be built]) fi AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN) AM_CONDITIONAL(USE_LIBMAD,test "x$use_libmad" = xyes) AM_CONDITIONAL(USE_LIBID3TAG, test "x$use_libid3tag" = xyes) AM_CONDITIONAL(HAVE_FLC, test "x$have_flac" = xyes) AM_CONDITIONAL(HAVE_OGGFLC, test "x$have_oggflac" = xyes) AM_CONDITIONAL(HAVE_JACK, test "x$have_jack" = xyes) AM_CONDITIONAL(HAVE_ALSA_05X, test "x$have_alsa_05x" = xyes) AM_CONDITIONAL(HAVE_ALSA_FINAL, test "x$have_alsa_final" = xyes) AM_CONDITIONAL(HAVE_OSS, test "x$have_oss" = xyes) AM_CONDITIONAL(HAVE_ESD, test "x$have_esd" = xyes) AM_CONDITIONAL(HAVE_SPARC, test "x$have_sparc" = xyes) AM_CONDITIONAL(HAVE_SGI, test "x$have_sgi" = xyes) AM_CONDITIONAL(HAVE_NAS, test "x$have_nas" = xyes) AM_CONDITIONAL(HAVE_LINUX_CDROM,test "x$ac_cv_header_linux_cdrom_h" = xyes) AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = xyes) AM_CONDITIONAL(HAVE_GTK2, test "x$have_gtk2" = xyes) dnl AM_CONDITIONAL(HAVE_QT, test "x$have_qt" = xyes) AM_CONDITIONAL(HAVE_MIKMOD,test "x$have_mikmod" = xyes) AM_CONDITIONAL(PREFER_MAD, test "x$prefer_mad" = "xyes") dnl ============ dnl Machine type dnl ============ AC_MSG_CHECKING(machine architecture) AC_SUBST(ARCH_TYPE) ARCH_TYPE=`uname -m` AC_MSG_RESULT($ARCH_TYPE) AM_CONDITIONAL(ARCH_X86,test "$ARCH_TYPE" = "i486" || test "$ARCH_TYPE" = "i586" || test "$ARCH_TYPE" = "i686" ) AM_CONDITIONAL(ARCH_486,test "$ARCH_TYPE" = "i486") AM_CONDITIONAL(ARCH_586,test "$ARCH_TYPE" = "i586") AM_CONDITIONAL(ARCH_686,test "$ARCH_TYPE" = "i686") AM_CONDITIONAL(ARCH_PPC,test "$ARCH_TYPE" = "ppc") AM_CONDITIONAL(ARCH_ULTRA,test "$ARCH_TYPE" = "sun4u") dnl cruft to satisfy gtk2's Makefile. Leave it in for now AM_CONDITIONAL(BUILD_EXTERNAL, test "a" = "b") AC_MSG_CHECKING(for gcc optimization flags) old_cflags=$CFLAGS CFLAGS="$CFLAGS -O2 -fexpensive-optimizations -funroll-loops -finline-functions -ffast-math -Wall" AC_TRY_COMPILE([#include ], [ printf ("hello, world"); ], [ EXTRA_OPT_CFLAGS="-O2 -fexpensive-optimizations -funroll-loops -finline-functions -ffast-math -Wall"],[ EXTRA_OPT_CFLAGS=""]) CFLAGS=$old_cflags AC_MSG_RESULT([$EXTRA_OPT_CFLAGS]) ARCH_CFLAGS="$EXTRA_OPT_CFLAGS $CFLAGS" if test "$ARCH_TYPE" = "i486" || test "$ARCH_TYPE" = "i586" || test "$ARCH_TYPE" = "i686" then AC_DEFINE(ARCH_X86, 1, [Define if on x86 platform]) fi if test "$ARCH_TYPE" = "i486" then AC_DEFINE(ARCH_486, 1, [Define if on a 486 platform]) fi if test "$ARCH_TYPE" = "i586" then AC_DEFINE(ARCH_586, 1, [Define if on a 586 platform]) fi if test "$ARCH_TYPE" = "i686" then AC_DEFINE(ARCH_686, 1, [Define if on a 686 platform]) # EXTRA_CPU_CFLAGS=$(if $CC -march=i686 -S -o /dev/null -xc /dev/null > /dev/null; then echo "-march=i686"; fi) fi if test "$ARCH_TYPE" = "ppc" then AC_DEFINE(ARCH_PPC, 1, [Define if on a PPC platform]) fi if test "$ARCH_TYPE" = "sun4u" then AC_DEFINE(ARCH_ULTRA, 1, [Define if on a SUN ULTRA platform]) fi if test "$have_gtk" = "yes" then AC_DEFINE(HAVE_GTK, 1, [Define if we have gtk+]) fi if test "$have_gtk2" = "yes" then AC_DEFINE(HAVE_GTK2, 1, [Define if we have gtk2]) fi dnl if test "$have_qt" = "yes" dnl then dnl AC_DEFINE(HAVE_QT, 1, [Define if we have Qt]) dnl fi dnl ================================================================ dnl Special assembly options. Note: Need to fix the above arch code! dnl ================================================================ dnl AC_CANONICAL_HOST AM_CONFIG_HEADER(config.h) case "$host" in i?86-* | k?-* | athlon-*) dnl catch i386,i486,i586,i686,k6,k7 AC_DEFINE(FPM_INTEL, 1, [Define if we are on Intel]) ;; *-*) echo "host_alias = $host_alias" AC_DEFINE(FPM_64BIT, 1, [Use this otherwise]) ;; esac ARCH_CFLAGS="$ARCH_CFLAGS $EXTRA_CPU_CFLAGS" AC_SUBST(ARCH_CFLAGS) dnl ============================================================ dnl Check for typedefs, structures, and compiler characteristics dnl ============================================================ AC_C_CONST AC_TYPE_SIZE_T dnl =========================== dnl Check for library functions dnl =========================== AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_FUNC_MMAP AC_CHECK_FUNCS(madvise) AC_CHECK_FUNCS(strdup strstr) ADDON_DIR=${libdir}/$PACKAGE dnl ================ dnl Create Makefiles dnl ================ AC_SUBST(ARCH_CFLAGS) AC_SUBST(ALSA_LIB) AC_SUBST(ADDON_DIR) AC_SUBST(AS) AC_SUBST(ASFLAGS) AC_SUBST(ALSAPLAYER_MAJOR_VERSION) AC_SUBST(ALSAPLAYER_MINOR_VERSION) AC_SUBST(ALSAPLAYER_MICRO_VERSION) AC_SUBST(ALSAPLAYER_VERSION) AC_OUTPUT([ intl/Makefile po/Makefile.in Makefile alsaplayer.1 alsaplayer.pc alsaplayer.spec app/Makefile interface/Makefile interface/gtk/Makefile interface/gtk/pixmaps/Makefile interface/gtk/gui/Makefile interface/gtk2/Makefile interface/gtk2/pixmaps/Makefile interface/text/Makefile interface/daemon/Makefile interface/xosd/Makefile scopes/Makefile scopes/monoscope/Makefile scopes/levelmeter/Makefile scopes/spacescope/Makefile scopes/logbarfft/Makefile scopes/synaescope/Makefile scopes/blurscope/Makefile scopes/opengl_spectrum/Makefile scopes2/Makefile scopes2/monoscope/Makefile scopes2/levelmeter/Makefile scopes2/spacescope/Makefile scopes2/logbarfft/Makefile scopes2/synaescope/Makefile scopes2/blurscope/Makefile scopes2/opengl_spectrum/Makefile output/Makefile output/alsa-0.5.x/Makefile output/alsa-final/Makefile output/jack/Makefile output/oss/Makefile output/esound/Makefile output/sgi/Makefile output/sparc/Makefile output/null/Makefile output/nas/Makefile input/Makefile input/mad/Makefile input/cdda/Makefile input/mikmod/Makefile input/wav/Makefile input/vorbis/Makefile input/audiofile/Makefile input/flac/Makefile input/sndfile/Makefile reader/Makefile reader/file/Makefile reader/http/Makefile alsaplayer/Makefile libalsaplayer/Makefile extra/Makefile examples/Makefile m4/Makefile docs/Makefile docs/reference.doxygen ]) echo " Configuration: Install path: ${prefix} Use libmad shared library: ${use_libmad} Enable libid3tag support: ${use_libid3tag} Build GTK interface: ${have_gtk} Build GTK2 interface: ${have_gtk2} Build XOSD interface: ${have_xosd} Build OpenGL based visual plugins: ${have_opengl} Build alsa 0.5.x output plugin: ${have_alsa_05x} Build alsa 0.9.x output plugin: ${have_alsa_final} Build jack output plugin: ${have_jack} Build oss output plugin: ${have_oss} Build esound output plugin: ${have_esd} Build sparc output plugin: ${have_sparc} Build sgi output plugin: ${have_sgi} Build nas output plugin: ${have_nas} Build vorbis input plugin: ${have_oggvorbis} Build cdda input plugin: ${ac_cv_header_linux_cdrom_h} Build mikmod input plugin: ${have_mikmod} Build audiofile input plugin: ${have_audiofile} Build FLAC input plugin: ${have_flac} Build OggFLAC input plugin: ${have_oggflac} Build sndfile input plugin: ${have_sndfile}" echo if test $have_jack = "no" -a $have_sparc = "no" -a $have_alsa_05x = "no" -a $have_alsa_final = "no" -a $have_oss = "no" -a $have_esd = "no" -a $have_sgi = "no" -a $have_nas = "no" then echo " **WARNING**: NO OUTPUT MODULES selected. AlsaPlayer won't be **WARNING**: able to produce sound output unless you manually **WARNING**: add output modules to: **WARNING**: ${prefix}/alsaplayer/output/" echo fi echo Now type \'make\' to build AlsaPlayer. alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/000077500000000000000000000000001466261456500233055ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/AUTHORS000066400000000000000000000002451466261456500243560ustar00rootroot00000000000000Andy Lo A Foe based on code by Richard Boulton Tinic Uro Debugging by Dominique Michel alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/ChangeLog000066400000000000000000000012101466261456500250510ustar00rootroot00000000000000Sun June 10 2007 ---------------- * Fixed Makefile.am to work with the gtk2 folder and 'make dist' Sat May 26 2007 --------------- * FftScope for GTK2 initial commit * Changed GTK2 micro version to 4-gtk2 in order to avoid collision with the GTK1 scope Tue May 22 22:21:44 CEST 2007 ----------------------------- * Makefile.am use AM_CFLAGS instead of CFLAGS Mon May 21 21:40:08 CEST 2007 ----------------------------- * Fixed quit function. Thu May 16 15:38:22 CEST 2002 ----------------------------- * Remember window status * Follow minor API changes Sun Mar 31 15:39:14 CEST 2002 ----------------------------- * First packaged release alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/Makefile.am000066400000000000000000000006431466261456500253440ustar00rootroot00000000000000fftscopeltlibs = libfftscope.la fftscopeldflags = -export-dynamic -avoid-version @GTK_LIBS@ fftscopesources = fftscope.c SUBDIRS = gtk2 lib_LTLIBRARIES = $(fftscopeltlibs) libdir = $(SCOPEPLUGIN_DIR) AM_CFLAGS = -D_REENTRANT -I$(top_builddir) @GTK_CFLAGS@ @ALSAPLAYER_CFLAGS@ libfftscope_la_LDFLAGS = $(fftscopeldflags) LIBS = libfftscope_la_SOURCES= $(fftscopesources) EXTRA_DIST = bootstrap fftscope.png gtk2 alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/NEW000066400000000000000000000000001466261456500236470ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/NEWS000066400000000000000000000002441466261456500240040ustar00rootroot00000000000000Mon May 21 21:40:08 CEST 2007 ----------------------------- Bug fix release. Sun Mar 31 15:39:14 CEST 2002 ----------------------------- First packaged release. alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/README000066400000000000000000000016651466261456500241750ustar00rootroot00000000000000Introduction ------------ This is the first released external visualization scope for AlsaPlayer It will hopefully be a good starting point for others. The scope API is generic enough to be useful in other projects. The ultimate goal is to create a system wide visualization by either tapping straight into ALSA or the jack sound server. To learn more about AlsaPlayer please visit the webpage; http://www.alsaplayer.org Building -------- Make sure you have AlsaPlayer installed, including the development files (libalsaplayer0-dev if you are using a packaging system). Running ./configure && make && make install should build and install the FFTscope on your system. You will have to restart a running alsaplayer for the new scope to show up. If you want to install only the GTK2 version of FftScope, cd into the gtk2 folder before processing. Author ------ You can reach me at andy@loafoe.com Maintainer ---------- dominique@tuxfamily.org alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/bootstrap000077500000000000000000000023211466261456500252460ustar00rootroot00000000000000#! /bin/sh # Check Autoconf version if [ -x `which autoconf` ]; then AC_VER=`autoconf --version | head -1 | sed 's/^[^0-9]*//'` AC_VER_MAJOR=`echo $AC_VER | cut -f1 -d'.'` AC_VER_MINOR=`echo $AC_VER | cut -f2 -d'.' | sed 's/[^0-9]*$//'` if [ "$AC_VER_MAJOR" -lt "2" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "13" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "50" ]; then if [ ! -e configure.in ]; then ln -s configure.ac configure.in fi echo "If you see some warnings about cross-compiling, don't worry; this is normal." else rm -f configure.in fi else echo Autoconf not found. AlsaPlayer CVS requires autoconf to bootstrap itself. exit 1 fi run_cmd() { echo running $* ... if ! $*; then echo failed! exit 1 fi } # Check if /usr/local/share/aclocal exists if [ -d /usr/local/share/aclocal ]; then ACLOCAL_INCLUDE="$ACLOCAL_INCLUDE -I /usr/local/share/aclocal" fi run_cmd aclocal $ACLOCAL_INCLUDE run_cmd autoheader run_cmd libtoolize --automake run_cmd automake --add-missing run_cmd autoconf echo echo "Now type './configure' to configure the FFTscope" echo alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/configure.ac000066400000000000000000000035041466261456500255750ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(fftscope.c) FFTSCOPE_MAJOR_VERSION=1 FFTSCOPE_MINOR_VERSION=0 FFTSCOPE_MICRO_VERSION=5 BETA= FFTSCOPE_VERSION=$FFTSCOPE_MAJOR_VERSION.$FFTSCOPE_MINOR_VERSION.${FFTSCOPE_MICRO_VERSION}${BETA} AM_INIT_AUTOMAKE(fftscope, ${FFTSCOPE_VERSION}) AM_MAINTAINER_MODE if test "x$x_includes" = "xNONE" then x_includes=/usr/X11R6/include fi if test "x$x_libraries" = "xNONE" then x_libraries=/usr/X11R6/lib fi dnl Check for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AM_DISABLE_STATIC AM_PROG_LIBTOOL AC_PROG_MAKE_SET AM_PATH_GTK(1.2.6, have_gtk=yes , have_gtk=no, gthread) AM_PATH_GLIB(1.2.6, have_glib=yes, have_glib=no) AC_HEADER_STDC dnl pkg-config stuff if test -z $PKG_CONFIG_PATH; then PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig fi AC_ARG_WITH(alsaplayer, [ --with-alsaplayer Location of alsaplayer build dir (will prepend to PKG_CONFIG_PATH)], [PKG_CONFIG_PATH="${withval}:${PKG_CONFIG_PATH}"],) export PKG_CONFIG_PATH PKG_CHECK_MODULES(ALSAPLAYER, alsaplayer >= 0.99.60) PLUGIN_DIR=`pkg-config alsaplayer --variable=plugindir` INTERFACEPLUGIN_DIR=`pkg-config alsaplayer --variable=interfaceplugindir` INPUTPLUGIN_DIR=`pkg-config alsaplayer --variable=inputplugindir` OUTPUTPLUGIN_DIR=`pkg-config alsaplayer --variable=outputplugindir` SCOPEPLUGIN_DIR=`pkg-config alsaplayer --variable=scopeplugindir` AC_SUBST(ALSAPLAYER_LIBS) AC_SUBST(ALSAPLAYER_CFLAGS) AC_SUBST(PLUGIN_DIR) AC_SUBST(INTERFACEPLUGIN_DIR) AC_SUBST(INPUTPLUGIN_DIR) AC_SUBST(OUTPUTPLUGIN_DIR) AC_SUBST(SCOPEPLUGIN_DIR) AM_CONFIG_HEADER(config.h) AC_SUBST(FFTSCOPE_MAJOR_VERSION) AC_SUBST(FFTSCOPE_MINOR_VERSION) AC_SUBST(FFTSCOPE_MICRO_VERSION) AC_SUBST(FFTSCOPE_VERSION) AC_OUTPUT([ Makefile ]) echo echo Now type \'make\' to build the FFTscope. echo alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/fftscope.c000066400000000000000000000161061466261456500252660ustar00rootroot00000000000000/* fftscope.c * Copyright (C) 2002 Andy Lo A Foe * Copyright (C) 1999 Richard Boulton * Original code by Tinic Uro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 2002-03-30: converted to use indexed pixmap * * $Id: fftscope.c 1119 2007-05-21 19:30:33Z dominique_libre $ * */ #include #include #include #include #include #include #include #include #include "prefs.h" #include "alsaplayer/scope_plugin.h" #include "alsaplayer/utilities.h" #define SCOPE_HEIGHT 128 /* Only tested for 64 and 128 */ static int act_fft[512]; static GdkImage *image = NULL; static GtkWidget *scope_win = NULL; static GdkRgbCmap *color_map = NULL; static GtkWidget *area = NULL; static int ready_state = 0; static pthread_t fftscope_thread; static pthread_mutex_t fftscope_mutex; static int is_init = 0; static int running = 0; static void fftscope_hide(); static void stop_fftscope(); static const int default_colors[] = { 10, 20, 30, 230, 230, 230 }; /* * Important note: the set_fft and set_data calls should NEVER contain * calls that can block. These functions are called from the main audio * thread so they should ideally not do any heavy computation and definitely * not contain blocking calls. * * fft_buffer is an int array with samples * channels integers * All fft samples are grouped per channel so the data is NON-interleaved * */ void fftscope_set_fft(void *fft_buffer, int samples, int channels) { if (!fft_buffer || (samples * channels) > 512) { memset(act_fft, 0, sizeof(act_fft)); return; } /* Just store data for later use inside the render thread */ memcpy(act_fft, fft_buffer, (sizeof(int)) * samples * channels); } /* The actual FFTscope renderer function. */ static void the_fftscope() { guint8 *loc; guint8 bits[256 * 129]; int i, h; running = 1; while (running) { int w; guint val; memset(bits, 128, 256 * SCOPE_HEIGHT); for (i = 0; i < 256; i++) { val = (act_fft[i] + act_fft[i + 256]) / (64 * (128 / SCOPE_HEIGHT)); if (val > (SCOPE_HEIGHT-1)) { val = (SCOPE_HEIGHT-1); } loc = bits + i + 256 * (SCOPE_HEIGHT-1); for (h = val; h > 0; h--) { *loc = h; loc -= 256; } } GDK_THREADS_ENTER(); gdk_draw_indexed_image(area->window, area->style->white_gc, 0, 0, 256, SCOPE_HEIGHT, GDK_RGB_DITHER_NONE, bits, 256, color_map); gdk_flush(); GDK_THREADS_LEAVE(); dosleep(SCOPE_SLEEP); } GDK_THREADS_ENTER(); fftscope_hide(); GDK_THREADS_LEAVE(); } static gboolean close_fftscope_window(GtkWidget * widget, GdkEvent * event, gpointer data) { GDK_THREADS_LEAVE(); stop_fftscope(); GDK_THREADS_ENTER(); return TRUE; } /* Init function. Here we setup all the gtk stuff */ static GtkWidget *init_fftscope_window() { GtkWidget *fftscope_win; GtkStyle *style; GdkColor color; guint32 colors[129]; int i; pthread_mutex_init(&fftscope_mutex, NULL); style = gtk_style_new(); fftscope_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(fftscope_win), "FFTscope"); gtk_widget_set_usize(fftscope_win, 256, SCOPE_HEIGHT); gtk_window_set_wmclass(GTK_WINDOW(fftscope_win), "FFTscope", "AlsaPlayer"); gtk_window_set_policy(GTK_WINDOW(fftscope_win), FALSE, FALSE, FALSE); style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(fftscope_win))); color.red = SCOPE_BG_RED << 8; color.blue = SCOPE_BG_BLUE << 8; color.green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_widget_set_style(GTK_WIDGET(fftscope_win), style); for (i = 0; i < 32; i++) { colors[i * 2] = colors[i * 2 + 1] = ((i * 8) << 16) + (255 << 8); colors[i * 2 + 64] = colors[i * 2 + 65] = (255 << 16) + (((31 - i) * 8) << 8); } colors[128] = 0; color_map = gdk_rgb_cmap_new(colors, 129); area = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(fftscope_win), area); gtk_widget_realize(area); gdk_window_set_background(area->window, &color); gtk_widget_show(area); gtk_widget_show(fftscope_win); /* Signals */ gtk_signal_connect(GTK_OBJECT(fftscope_win), "delete_event", GTK_SIGNAL_FUNC(close_fftscope_window), fftscope_win); /* Clear and show the window */ gdk_window_clear(fftscope_win->window); gdk_flush(); ready_state = 1; return fftscope_win; } static void fftscope_hide() { gint x, y; if (scope_win) { gdk_window_get_root_origin(scope_win->window, &x, &y); gtk_widget_hide(scope_win); gtk_widget_set_uposition(scope_win, x, y); } } /* Called to stop the FFTscope window */ static void stop_fftscope() { running = 0; pthread_join(fftscope_thread, NULL); } /* This is our main looper */ static void run_fftscope(void *data) { nice(SCOPE_NICE); // Be nice to most processes the_fftscope(); pthread_mutex_unlock(&fftscope_mutex); pthread_exit(NULL); } /* Called to startup the FFTscope */ static void start_fftscope() { if (!is_init) { scope_win = init_fftscope_window(); is_init = 1; } if (pthread_mutex_trylock(&fftscope_mutex) != 0) { printf("fftscope already running\n"); return; } gtk_widget_show(scope_win); pthread_create(&fftscope_thread, NULL, (void *(*)(void *)) run_fftscope, NULL); } /* Init function */ static int init_fftscope() { int i; memset(act_fft, 0, sizeof(act_fft)); if (prefs_get_bool(ap_prefs, "fftscope", "active", 0)) start_fftscope(); return 1; } /* Are we running? */ static int fftscope_running() { return running; } /* Shutdown function. Should deallocate stuff here too */ static void shutdown_fftscope(void) { prefs_set_bool(ap_prefs, "fftscope", "active", fftscope_running()); if (fftscope_running()) { stop_fftscope(); } } /* The C struct that contains all our functions */ static scope_plugin fftscope_plugin; /* Our entry point so the HOST can get to the above struct */ scope_plugin *scope_plugin_info() { memset(&fftscope_plugin, 0, sizeof(scope_plugin)); fftscope_plugin.version = SCOPE_PLUGIN_VERSION; fftscope_plugin.name = "FFTscope"; fftscope_plugin.author = "Andy Lo-A-Foe, Richard Boulton & Dominique Michel"; fftscope_plugin.init = init_fftscope; fftscope_plugin.start = start_fftscope; fftscope_plugin.running = fftscope_running; fftscope_plugin.stop = stop_fftscope; fftscope_plugin.shutdown = shutdown_fftscope; fftscope_plugin.set_fft = fftscope_set_fft; /* We don't assign set_data since it's not needed for this plugin */ return &fftscope_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/fftscope/fftscope.png000066400000000000000000000313521466261456500256300ustar00rootroot00000000000000‰PNG  IHDR;Ëž[£=bKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ!8`ÎX" IDATxœí}½²%9rÞ—‰º=íé8ÆD¬» jÄÕÏJZj †~-F‡þ(…"HS2DóŒq¨'˜äÐéXO’Áh9)§ë¬±Œ1–O@wfîA¦ŒPYªNsëܾwßtœ©  P@™ÈL$è·~ö/ ",¡ª9‡Û,+¿~לURÚ¬ö®‚R†ˆ˜Y2”—öYa&U¨rÌlÕŠHŒ1Æh¥ˆÈ*`æBÕ¼ý²\…*rAK_é#Å“Ràcy¢PU‰ª†˜¹üi¯BU'URøï…0MÓ4æ Æ(£œì>U!Uˆ33§‰DU©=ÎcwfUÕÔ@õ¯¢|¦ÒBMEED-á ìÉV9bŒ£ªŠjŒ1׬P¤¯Ed¥A*rj?Š*‹¤×eß4„à^ uJD¢õÂÁDašlÄxRQˆ¬y©‰P•ôòÔª8Yî+2ç¾Û]öèSÒ.²7#\—‹Ðac@ɶ%"r:BPæ;" ÌÅ—«´MUc^œP±Q÷F5ÞüyºâB~~QÙKš7mU›R‘†.Uÿ¥¤jžŒ—†–ye˜§ ¢FcØ ›ï×êÐFåÓ­°ìÿD@yÓM™]ŠÖ7ºÝ3”ç>³át)ì%N¶¯²¬Ùòç-š¼&"!"3óÌ‹¸ÌI\ IŽ]6 h–‹² Ê­8óÉ"l½óvÌßQ/–òdÚÑ\­ ûí^8Å^RƒïÿÌjXóçÌfý˜¨ïmVªù«ÒÒBÏsÕùËu‡‹¿.ܾ•ÁZ*-­íVHDfM¤dÞyyµœŸ2?W¢÷:¢LoA²= ³Bk¡S-6Í‚3®NÓdÍ4ÿÇ|›Dg–µ™åôýƒUO0"'¢È4aÖ?Ío>M9ÌFÒD$%v‚{u~b]¼¨F[æ™Éü‹Ü| ü÷RÕƒuÅÝþ<¦Â­gõ³’:n_…mÐÚ-mVK3%Ý˙ꖷØ<ì«*߯ ]þU´Cþ–²  2Î[¬³Hɽ]/pì«è¨ªÃdÁ\ƒ-ïªY#÷Ô†¼÷ y-檔Ÿ[:ãHzº{íU;Ý;L/çOÙ¸ªä™Cà˜W«ù²D‰‰¬>?zþveŠñ¯;[¼%»¡¬Pœu:Å:X¼"$Y|ç†hûžõ¥ðØ~ßv3ÙêvÍ ‘G2ÙRm—˜}®.9­ch5—ñ’ç£lÆÈÛ”’b%*Ââ£ÎCÜm8Û‹ŠßÖYåYî…)UOñ]KñåCZx«¯Ö¦(·`NåÍ/"?Ѧâ2‘¢á0‡À Ñè(KÌ@ì)š)Í;TÊä·6Qga¢"T¸—šGÜðšçší/±Ïc‰h—橛㿢ƒ¾}Ù½š§nVk2U…½–ú®zŸÇó ¦U{ZØÎÁh(Öï/·Õ¨.éÇo)u. GÏ…b%רł¸bJ”Ç4->…㱞¼É¦ÿüŒCùö™nY[zª9º:ß ÿŠ\Ó<MÚÃ|÷,º6(L!åAÍê(V¶*³ÈB\©æ­ìD³N¡4Be«$šÃ2DLª f<øñ–Ö§yÀ«ªŠ „2©Ío5y ÖswUùÌճϙ/0Í ÝB+䘺ö­ÿüÝß¼}```Æ_ÿ;ÿBÉ6ÝcÖƒ˜ÍtÈÆ!“­Öz )óÌ7ªÚ D¨±x€÷ïßÜ-À»wïÞ¾}ûõ×_ߢò ·oïÞ½ûòË/UÒzGY•,h˜}* ÑB!¯cß½{÷Å_øûöíÛRù¯ýëc[;0PÁ7Ül<û“žb=üª¤,=D¿õ³UÖXòج¡!jœ«õ÷ÿûßÿíýû÷¥YǼ¼Œ2ç^óÀ@‹Û··oß¾yóæË/¿ü?ý׶ʱ}s4I,×ÿ^¥@Ýmw r-ä:ð”¸Åx{óæñج¬Æ~ƒGº¥x)6êJWt·NÕ³~kÜ!¿È«‹ýèG»_ÎÀÀ5øñŒ<ÞÞ.îïï3¹--´KÕ±z#ËlÝ9°·…ÇØUÿû‹_üâÀÖ ´¸Å¸­èÙ`f¾[ÀÂlÖbab¢Ÿüö¿Ñ¼cÈ3Ì"I ªuŪjnôvËŸ¿û¯~[äõ_åÀÀKD—.>ÿû¿çÂSé鋤›5RÅ£ƒœ¯îCåΖ¯ýa!«hç’™|ž9Œmþä'?A.Ì…”gJ$¢©Î®@Úw©fݱ=MªYó” ©ù*—«Ö¿lÕ\rßf]ýkõ Ï@…O?ýô@ë l¬çg?ûÙŸþéŸZ [º0i¶ÐWöjÍ[ŽQï‘Ènaô·ÿáïIVZqãÎf-ѪÂÜ*¼T §a{ûöíýý½‰ÿ*¦pêâ.´Ç5Ò¾ûÿüç¿üå/»tñ7öo‰(Õ‰™ò® µhtneZr§tøžHf°µæ =ŠEößÝÐ-3Ö#_nl=x¡(>Ž ?Òö«c¾úê«rýóŸÿ¼\·t‘7è£ìÈÒ>¼²í!­*IÎÖÛzïóº×sbC±­¼Žƒ¦½£ªøá¡ ¶ÇOèk#͓⋖bÏòØK½ là¾,{ ø÷VóZVõªKV™®¨óyâ,™íïΓñX,‚ï°€ÐêÑ´FVU “®xö®ØáôŸ.®â±ûG@yÑ/ˆÇnpÈ=̳[¦JüòË/[òóYå½ùtW[ÉZíÏ{ÈlgwžŒÇV`ðÑWB.p…µ”‰z‡ÿ\‡Ã×±ö~_]ãoÛY;±F®×•Tx‰2ùK\Ǧ #¡&{MÁV™1¾¼Í`kЕëØ+¶¼ k¸h»-;íÖö’+ŸæemáØCf;{ô”ëØb{M1Ûzá>ç ÃÄ2ˆÀd‡ˆê)ž¢ŠRrYTÊG,Ø?˜,«ÔXj?kýꫯ®L¹=vƒE_Š=ôüUƒÇ<ñ p–ÌöwᨑvÖ+‚|"T™9;AÄ¢;ΪbæÀ˜9ïH¿ª vD>f¯}%w§®øÒAðRxì-±† ãÐcZµ³aÏû×±gñd<6ÓjQ5•[KŒKL’Õ–²fíÄnÇ’s¶éJîðy:;©Ôt*—Þ~–˜_„xü||ž|=Û<¶,%Õ¢U\S æìclša9¢ˆL–T­`«];›x<†=öp¬™a,½ÍZK÷XËÝsï3Ä µÇzsk±ô̧Ÿ¨Úþuf¨æSm¡1ÆEÔ˜Š>‘ãÌèÊÉ1>rŸ§G*œÖÊ•¾s»ÕÄg‰¬+.‡ô,c­yÁ•ÂÈ.VãOªù,¼jSåÒV˜ýÝåÂE¢‡ÏVkݱŽxzÜz{…Â|ÏÞ‚Š˜<§µu¬qTN9šÔÝ „€r®^>/¬D@žý§l—±ç½ƒÇ>g¼D‰wžf{ÑÛ;Ëc§i N""1 M«¢ ‹?^6»kD4%/Ef‹23~äs{;õÔ—ËèÊëe^ydI«áG?úQµÌž›ÔSu ¨žmÃÎÖðœöñvýî  Ã8"êÙu¬)†CÈq(Tgñ¸ÿ*f¢ŸþÎK.‹`µSëXý)ËŠÔtÑDôg¿øú«¯¾òLßâÙX"ŽÀö¾‡Cªzxxàã<z¾¿¿ÿ­ßþ÷”C:U§×–ótüv<87Fúéïü²]Èò®£X ¦î»ý"¬y7…'ôSÀýýýçÿàßy%ðÃÃ-c î]gýAŽÌ¦ª“æµé#[æð³&þøÇ?öŠì•òõóÏ?/ò¬—3mªÑr1ØŠhÞ,G8ƨ k~ Š0'­ÕÚ¦´‹h`àù ÕcU—Ù «b¦OÌ…&ìÏ9… Á)¾›)§fî[S’¦ˆ2 O ÿý›¿ù›ž»¾¾íõ¤M_+90ðrñÙgŸýú׿þæ›oþò/ÿò¯þê¯,Ñ›a“è›#PdI8§«¨ÛÜ3Åx‚‚“µ1„Àᎈ,È[&ÎT•(¨Â‚H=eÿ^y‚Îjå’çéveûÀÀÀ•Èd¹ðâÊy¢Õ–ǘ²z €õmH4¼¦+Þ…Ác<Òz5Ÿ†S`f.ÌFnóÜ”´lšB›ÊVG¡ðC˜V]¦µñég¢iš^9çF!¢B^KŽFÃUuÞ{V]SWî­ÐÒäËZÇ;ð¬Y#-·¬޲¼ÎÈóʼn`ÁM¯Ôý>RcBôL0pÿ3ûõDKDSv!¶˜msT§…jbáH/ˆwóØséƒÇ| 'Ê’,U50Ïj`Ïib™(ùõ‹¨—[×N)š ºì%ÚB *Q>¡cÞPT[ ~>¨vñu1xìÀ€GTeóU"`6ö$Ø6:Ktn‡é )FþQ¯—žièpK€ }в·Î ·èj]Á•™'Û - KÑÙ»7ùÜýí}Œ?S‹ÁcD‘¼öä, 'y´EtÌ<™bkùAâº.œñµh÷ÁÎéçRÁ˜ž,T¢qWK!¢$œXDº Ö0±ñcuîŽS¯X\õc¬i‰`«ˆÄansÔb‘åî.õUwN•3”)šËV»á”vái”("Ó^¶Ä%WÓb1s¦^V;…zjjðØâÀDY‹Ôým!"S®Am,"!£X«o'¢ÌF´!¨8«ª…ŸŸmâk÷Û¦ |T°ÃèŠ=¶l5·\ÍÇÁvoœ>ùä3¡Õ›þ*mîI6$fNŽÇ" J¤½‰ÁcZ´žØ!´N¶@õǼk>Ò蓉Tèt:Å™9„ÀJ!¡òT±Ác ÊÂ5GV«AýÓ^̓"…)70®;M“­]…ðp:™Fj–™3Å]ñÀÀ0yÖûžMÈDøðð<íV¯J¢wÌ@ˆ&壢Ç:v`à2”cq0ok-Dkì¶-‹=9DÄSŒ1„«N¢³†rO§Á˜A±š”˜H•ÀÔÕAW/„óR1p¨ˆ³ðž§6É듌…>؉ÑΫªßÿpw7Ù±ÛùødWú'ßíëñ…sÁÀ³„Úv9ɧïÌçY5*'@PÅãI¶"MyY06Oã(¢ߥ wpgámÚà±™P$ï~+îÀD`êã7¥C$%¯c1WÝ!yFœBÞ·“9¸ÛÙs¾ßöyl'ýÛËz¾c.xV¨¨Æ›^yX¸îÛy:°íÉX»<Ô}®”PŽö0Š·-ïe[ìs÷yÚµ[a`àƒÁè˧ˆ(‘xy–™N­i¨„e³›‰‰§PŠ‘ÃÞ} üµ}é7౯xƨH©u'®ÊOµÂ*‰»šwð0šiØïÇ%¥Æ:v` ÀëŠ-¡:x² Ò-¬;åàI[±æPQM~ÿšª¤eTÔ-¬qÎ6}ðØ ™lÕ«‰íÂK»Æ/Ed"&U‚Øv;‹H¡9ª…k#Õ´qG5Þ·ÛƒÇ ôÐúKx‚bædXÍŽD4i`ŠBJú QÉb*‚™” 'QÙê±ùàááÁlB磟çl9ñà±%ººâ'-ûۺu²s°àÈÝl¹¥P”¨ÝŸ Îâõ å¤hÐÕÀÀy°“B¸»»+ZæìâïB7QÌ9Þqf«ç×±¯›” pn=xìÀ SQ§­¼Õl/«c§ãڹᠬ`»”ãݯ£«×·r»¸<5mèbŠ1UU,í7Ÿ¸Jùºˆ¸•ûØÁc¿Ý.ù ;ðCÂTeGŠ8$.Ü£ºžÃvƒ<šÇz§Éi“íÇöxSm‹kx¬nIÙW`ðØgˆbOM¿>Âx•µÄd²0f}³šË)1ò¦Y¨(”`gÜU˜½Ñ2Ïc·]ÿKÉ‹èk/=z"¸e›w¡[¢‘¨¹ô—ñZZ†¢xÿ«ÊRÅj{y£f&bIçd{ñÖ)öù¬c‡£ÅÀó*5¤8Ÿ¯C ³OU,N…ùÎQbv†–±OT¨ pn«Ýsá±Ïû7½µ˜¼‹bIÍãÅ)ì¥@>äNˆÒQÂ#99ÙÙ<¹|{1íù? ;ðB±tîP욃ªæóð|؇JÚ^'¾€Ý&É•ñ|Ș™Ç";!zì㱯›‹6k`àšO¬LଞµJssÑ{\¤+žÉR«+ÞI«ƒÇ<7Ð#°°ÇSà RÎI(Ò²9'ñÚù–Û^Šhyl“^¥¬ñØoWrEŠÃÙxà¥a"gÌMf˜#Ź=îFå!½ŠÈ^rõ)ß6éŠÇG¨‡¯Ø ·n;{Ú[`)æ8ÁL¶²eæ¼çàhkõQSø {.hÜÀÀ„I©D¡ÍÉmd63Ѩ±§O̧n•kUÕ6ß+xl›^ñØ×õM›•Ÿ+3xìÀ3„³ËÌÔÔCK±ÙÖZNÑB/ö?gHœ#WÃQëØê¢ÌAC¥4ðQ ›!§[ˆ²ŽØN²3ëW¶Þ½{÷GôGß|ó €Ï>ûìW¿úÁcÏÒa]feê8ËcnO?ýô›o¾yûöíoüÆo]xÝ/.TOëQ¨w{ËÛ·oË/€7oÞØõañé<'ÄÁëØ&Œ-üZ’¢\V·yßã’x0Õ­.:º'nMg?ï†p¸~ïÕì±ÃcµéÚŽ!¹1#oTÒjÏNÝ{g,e®ú#öä î¨kŸ~]ñ!øàºâU"oÖ±]:ŸÙN¯µ–U…#ë–¬[³ë¥¨¼-¨ˆªÊeü°Êbž»á²$ \'¶ÃM^ÿ Å®UûØïuYÖZΣžÕ-ð´ýzTV[äÒ o¡yêŒUéËŠL LjlË‘»QSò6/ö¯d•È«ˆ>؆.š±¯Ž•9…iy¶îúhÛb…=¦ôCMcÓÄÕ½ùцºK²Vsê»–†›ÛÖ œ½k;ë å‘v$ôæ§eîEâÜÆ›m r_s;´/¬oOE>OûTD9Žº»TÏ]ì¡åE{ên­ó‡Kžµ’¥ËLÉ*»‰ã†YµN7j_NßÐŒìQš<>뉈–‹TXqÕëmÇ‘>O·Æ‚Ç^èAÑɵmò›wmUÞU¥l©ÔÖŸ²¼kÑÚg«`üagí7Ëz”þö™dÕš§KÉc``à)ÑPloA°_§êïÞÐåÞR}GU®³µ®ç¼Ñ³FÖÇ–ÕXwžŠÇb´lMSCDøa£¶îP’.1Çuøê…TÔ}Öþ*´¹¸èö O¼¶Ü Ýüóê¬Ç6ì¬uäÖYÚR,÷ˆs?Åñ†åPï˜UûnOåÝ=YÖÀ…Ø9á^—u èŠõ#ä Ãìô+nqKË tÅ+Ϻø®6ëèo»YÏQ·¿!+>Ý÷þ?nÌñ‡'ÁIEND®B`‚alsaplayer-0.99.82/attic/experimental/obsolete/input/000077500000000000000000000000001466261456500226335ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/000077500000000000000000000000001466261456500233745ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/D.dat000066400000000000000000000635331466261456500242630ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: D.dat 1252 2007-07-08 15:46:19Z dominique_libre $ */ /* * These are the coefficients for the subband synthesis window. This is a * reordered version of Table B.3 from ISO/IEC 11172-3. * * Every value is parameterized so that shift optimizations can be made at * compile-time. For example, every value can be right-shifted 12 bits to * minimize multiply instruction times without any loss of accuracy. */ { PRESHIFT(0x00000000) /* 0.000000000 */, /* 0 */ -PRESHIFT(0x0001d000) /* -0.000442505 */, PRESHIFT(0x000d5000) /* 0.003250122 */, -PRESHIFT(0x001cb000) /* -0.007003784 */, PRESHIFT(0x007f5000) /* 0.031082153 */, -PRESHIFT(0x01421000) /* -0.078628540 */, PRESHIFT(0x019ae000) /* 0.100311279 */, -PRESHIFT(0x09271000) /* -0.572036743 */, PRESHIFT(0x1251e000) /* 1.144989014 */, PRESHIFT(0x09271000) /* 0.572036743 */, PRESHIFT(0x019ae000) /* 0.100311279 */, PRESHIFT(0x01421000) /* 0.078628540 */, PRESHIFT(0x007f5000) /* 0.031082153 */, PRESHIFT(0x001cb000) /* 0.007003784 */, PRESHIFT(0x000d5000) /* 0.003250122 */, PRESHIFT(0x0001d000) /* 0.000442505 */, PRESHIFT(0x00000000) /* 0.000000000 */, -PRESHIFT(0x0001d000) /* -0.000442505 */, PRESHIFT(0x000d5000) /* 0.003250122 */, -PRESHIFT(0x001cb000) /* -0.007003784 */, PRESHIFT(0x007f5000) /* 0.031082153 */, -PRESHIFT(0x01421000) /* -0.078628540 */, PRESHIFT(0x019ae000) /* 0.100311279 */, -PRESHIFT(0x09271000) /* -0.572036743 */, PRESHIFT(0x1251e000) /* 1.144989014 */, PRESHIFT(0x09271000) /* 0.572036743 */, PRESHIFT(0x019ae000) /* 0.100311279 */, PRESHIFT(0x01421000) /* 0.078628540 */, PRESHIFT(0x007f5000) /* 0.031082153 */, PRESHIFT(0x001cb000) /* 0.007003784 */, PRESHIFT(0x000d5000) /* 0.003250122 */, PRESHIFT(0x0001d000) /* 0.000442505 */ }, { -PRESHIFT(0x00001000) /* -0.000015259 */, /* 1 */ -PRESHIFT(0x0001f000) /* -0.000473022 */, PRESHIFT(0x000da000) /* 0.003326416 */, -PRESHIFT(0x00207000) /* -0.007919312 */, PRESHIFT(0x007d0000) /* 0.030517578 */, -PRESHIFT(0x0158d000) /* -0.084182739 */, PRESHIFT(0x01747000) /* 0.090927124 */, -PRESHIFT(0x099a8000) /* -0.600219727 */, PRESHIFT(0x124f0000) /* 1.144287109 */, PRESHIFT(0x08b38000) /* 0.543823242 */, PRESHIFT(0x01bde000) /* 0.108856201 */, PRESHIFT(0x012b4000) /* 0.073059082 */, PRESHIFT(0x0080f000) /* 0.031478882 */, PRESHIFT(0x00191000) /* 0.006118774 */, PRESHIFT(0x000d0000) /* 0.003173828 */, PRESHIFT(0x0001a000) /* 0.000396729 */, -PRESHIFT(0x00001000) /* -0.000015259 */, -PRESHIFT(0x0001f000) /* -0.000473022 */, PRESHIFT(0x000da000) /* 0.003326416 */, -PRESHIFT(0x00207000) /* -0.007919312 */, PRESHIFT(0x007d0000) /* 0.030517578 */, -PRESHIFT(0x0158d000) /* -0.084182739 */, PRESHIFT(0x01747000) /* 0.090927124 */, -PRESHIFT(0x099a8000) /* -0.600219727 */, PRESHIFT(0x124f0000) /* 1.144287109 */, PRESHIFT(0x08b38000) /* 0.543823242 */, PRESHIFT(0x01bde000) /* 0.108856201 */, PRESHIFT(0x012b4000) /* 0.073059082 */, PRESHIFT(0x0080f000) /* 0.031478882 */, PRESHIFT(0x00191000) /* 0.006118774 */, PRESHIFT(0x000d0000) /* 0.003173828 */, PRESHIFT(0x0001a000) /* 0.000396729 */ }, { -PRESHIFT(0x00001000) /* -0.000015259 */, /* 2 */ -PRESHIFT(0x00023000) /* -0.000534058 */, PRESHIFT(0x000de000) /* 0.003387451 */, -PRESHIFT(0x00245000) /* -0.008865356 */, PRESHIFT(0x007a0000) /* 0.029785156 */, -PRESHIFT(0x016f7000) /* -0.089706421 */, PRESHIFT(0x014a8000) /* 0.080688477 */, -PRESHIFT(0x0a0d8000) /* -0.628295898 */, PRESHIFT(0x12468000) /* 1.142211914 */, PRESHIFT(0x083ff000) /* 0.515609741 */, PRESHIFT(0x01dd8000) /* 0.116577148 */, PRESHIFT(0x01149000) /* 0.067520142 */, PRESHIFT(0x00820000) /* 0.031738281 */, PRESHIFT(0x0015b000) /* 0.005294800 */, PRESHIFT(0x000ca000) /* 0.003082275 */, PRESHIFT(0x00018000) /* 0.000366211 */, -PRESHIFT(0x00001000) /* -0.000015259 */, -PRESHIFT(0x00023000) /* -0.000534058 */, PRESHIFT(0x000de000) /* 0.003387451 */, -PRESHIFT(0x00245000) /* -0.008865356 */, PRESHIFT(0x007a0000) /* 0.029785156 */, -PRESHIFT(0x016f7000) /* -0.089706421 */, PRESHIFT(0x014a8000) /* 0.080688477 */, -PRESHIFT(0x0a0d8000) /* -0.628295898 */, PRESHIFT(0x12468000) /* 1.142211914 */, PRESHIFT(0x083ff000) /* 0.515609741 */, PRESHIFT(0x01dd8000) /* 0.116577148 */, PRESHIFT(0x01149000) /* 0.067520142 */, PRESHIFT(0x00820000) /* 0.031738281 */, PRESHIFT(0x0015b000) /* 0.005294800 */, PRESHIFT(0x000ca000) /* 0.003082275 */, PRESHIFT(0x00018000) /* 0.000366211 */ }, { -PRESHIFT(0x00001000) /* -0.000015259 */, /* 3 */ -PRESHIFT(0x00026000) /* -0.000579834 */, PRESHIFT(0x000e1000) /* 0.003433228 */, -PRESHIFT(0x00285000) /* -0.009841919 */, PRESHIFT(0x00765000) /* 0.028884888 */, -PRESHIFT(0x0185d000) /* -0.095169067 */, PRESHIFT(0x011d1000) /* 0.069595337 */, -PRESHIFT(0x0a7fe000) /* -0.656219482 */, PRESHIFT(0x12386000) /* 1.138763428 */, PRESHIFT(0x07ccb000) /* 0.487472534 */, PRESHIFT(0x01f9c000) /* 0.123474121 */, PRESHIFT(0x00fdf000) /* 0.061996460 */, PRESHIFT(0x00827000) /* 0.031845093 */, PRESHIFT(0x00126000) /* 0.004486084 */, PRESHIFT(0x000c4000) /* 0.002990723 */, PRESHIFT(0x00015000) /* 0.000320435 */, -PRESHIFT(0x00001000) /* -0.000015259 */, -PRESHIFT(0x00026000) /* -0.000579834 */, PRESHIFT(0x000e1000) /* 0.003433228 */, -PRESHIFT(0x00285000) /* -0.009841919 */, PRESHIFT(0x00765000) /* 0.028884888 */, -PRESHIFT(0x0185d000) /* -0.095169067 */, PRESHIFT(0x011d1000) /* 0.069595337 */, -PRESHIFT(0x0a7fe000) /* -0.656219482 */, PRESHIFT(0x12386000) /* 1.138763428 */, PRESHIFT(0x07ccb000) /* 0.487472534 */, PRESHIFT(0x01f9c000) /* 0.123474121 */, PRESHIFT(0x00fdf000) /* 0.061996460 */, PRESHIFT(0x00827000) /* 0.031845093 */, PRESHIFT(0x00126000) /* 0.004486084 */, PRESHIFT(0x000c4000) /* 0.002990723 */, PRESHIFT(0x00015000) /* 0.000320435 */ }, { -PRESHIFT(0x00001000) /* -0.000015259 */, /* 4 */ -PRESHIFT(0x00029000) /* -0.000625610 */, PRESHIFT(0x000e3000) /* 0.003463745 */, -PRESHIFT(0x002c7000) /* -0.010848999 */, PRESHIFT(0x0071e000) /* 0.027801514 */, -PRESHIFT(0x019bd000) /* -0.100540161 */, PRESHIFT(0x00ec0000) /* 0.057617187 */, -PRESHIFT(0x0af15000) /* -0.683914185 */, PRESHIFT(0x12249000) /* 1.133926392 */, PRESHIFT(0x075a0000) /* 0.459472656 */, PRESHIFT(0x0212c000) /* 0.129577637 */, PRESHIFT(0x00e79000) /* 0.056533813 */, PRESHIFT(0x00825000) /* 0.031814575 */, PRESHIFT(0x000f4000) /* 0.003723145 */, PRESHIFT(0x000be000) /* 0.002899170 */, PRESHIFT(0x00013000) /* 0.000289917 */, -PRESHIFT(0x00001000) /* -0.000015259 */, -PRESHIFT(0x00029000) /* -0.000625610 */, PRESHIFT(0x000e3000) /* 0.003463745 */, -PRESHIFT(0x002c7000) /* -0.010848999 */, PRESHIFT(0x0071e000) /* 0.027801514 */, -PRESHIFT(0x019bd000) /* -0.100540161 */, PRESHIFT(0x00ec0000) /* 0.057617187 */, -PRESHIFT(0x0af15000) /* -0.683914185 */, PRESHIFT(0x12249000) /* 1.133926392 */, PRESHIFT(0x075a0000) /* 0.459472656 */, PRESHIFT(0x0212c000) /* 0.129577637 */, PRESHIFT(0x00e79000) /* 0.056533813 */, PRESHIFT(0x00825000) /* 0.031814575 */, PRESHIFT(0x000f4000) /* 0.003723145 */, PRESHIFT(0x000be000) /* 0.002899170 */, PRESHIFT(0x00013000) /* 0.000289917 */ }, { -PRESHIFT(0x00001000) /* -0.000015259 */, /* 5 */ -PRESHIFT(0x0002d000) /* -0.000686646 */, PRESHIFT(0x000e4000) /* 0.003479004 */, -PRESHIFT(0x0030b000) /* -0.011886597 */, PRESHIFT(0x006cb000) /* 0.026535034 */, -PRESHIFT(0x01b17000) /* -0.105819702 */, PRESHIFT(0x00b77000) /* 0.044784546 */, -PRESHIFT(0x0b619000) /* -0.711318970 */, PRESHIFT(0x120b4000) /* 1.127746582 */, PRESHIFT(0x06e81000) /* 0.431655884 */, PRESHIFT(0x02288000) /* 0.134887695 */, PRESHIFT(0x00d17000) /* 0.051132202 */, PRESHIFT(0x0081b000) /* 0.031661987 */, PRESHIFT(0x000c5000) /* 0.003005981 */, PRESHIFT(0x000b7000) /* 0.002792358 */, PRESHIFT(0x00011000) /* 0.000259399 */, -PRESHIFT(0x00001000) /* -0.000015259 */, -PRESHIFT(0x0002d000) /* -0.000686646 */, PRESHIFT(0x000e4000) /* 0.003479004 */, -PRESHIFT(0x0030b000) /* -0.011886597 */, PRESHIFT(0x006cb000) /* 0.026535034 */, -PRESHIFT(0x01b17000) /* -0.105819702 */, PRESHIFT(0x00b77000) /* 0.044784546 */, -PRESHIFT(0x0b619000) /* -0.711318970 */, PRESHIFT(0x120b4000) /* 1.127746582 */, PRESHIFT(0x06e81000) /* 0.431655884 */, PRESHIFT(0x02288000) /* 0.134887695 */, PRESHIFT(0x00d17000) /* 0.051132202 */, PRESHIFT(0x0081b000) /* 0.031661987 */, PRESHIFT(0x000c5000) /* 0.003005981 */, PRESHIFT(0x000b7000) /* 0.002792358 */, PRESHIFT(0x00011000) /* 0.000259399 */ }, { -PRESHIFT(0x00001000) /* -0.000015259 */, /* 6 */ -PRESHIFT(0x00031000) /* -0.000747681 */, PRESHIFT(0x000e4000) /* 0.003479004 */, -PRESHIFT(0x00350000) /* -0.012939453 */, PRESHIFT(0x0066c000) /* 0.025085449 */, -PRESHIFT(0x01c67000) /* -0.110946655 */, PRESHIFT(0x007f5000) /* 0.031082153 */, -PRESHIFT(0x0bd06000) /* -0.738372803 */, PRESHIFT(0x11ec7000) /* 1.120223999 */, PRESHIFT(0x06772000) /* 0.404083252 */, PRESHIFT(0x023b3000) /* 0.139450073 */, PRESHIFT(0x00bbc000) /* 0.045837402 */, PRESHIFT(0x00809000) /* 0.031387329 */, PRESHIFT(0x00099000) /* 0.002334595 */, PRESHIFT(0x000b0000) /* 0.002685547 */, PRESHIFT(0x00010000) /* 0.000244141 */, -PRESHIFT(0x00001000) /* -0.000015259 */, -PRESHIFT(0x00031000) /* -0.000747681 */, PRESHIFT(0x000e4000) /* 0.003479004 */, -PRESHIFT(0x00350000) /* -0.012939453 */, PRESHIFT(0x0066c000) /* 0.025085449 */, -PRESHIFT(0x01c67000) /* -0.110946655 */, PRESHIFT(0x007f5000) /* 0.031082153 */, -PRESHIFT(0x0bd06000) /* -0.738372803 */, PRESHIFT(0x11ec7000) /* 1.120223999 */, PRESHIFT(0x06772000) /* 0.404083252 */, PRESHIFT(0x023b3000) /* 0.139450073 */, PRESHIFT(0x00bbc000) /* 0.045837402 */, PRESHIFT(0x00809000) /* 0.031387329 */, PRESHIFT(0x00099000) /* 0.002334595 */, PRESHIFT(0x000b0000) /* 0.002685547 */, PRESHIFT(0x00010000) /* 0.000244141 */ }, { -PRESHIFT(0x00002000) /* -0.000030518 */, /* 7 */ -PRESHIFT(0x00035000) /* -0.000808716 */, PRESHIFT(0x000e3000) /* 0.003463745 */, -PRESHIFT(0x00397000) /* -0.014022827 */, PRESHIFT(0x005ff000) /* 0.023422241 */, -PRESHIFT(0x01dad000) /* -0.115921021 */, PRESHIFT(0x0043a000) /* 0.016510010 */, -PRESHIFT(0x0c3d9000) /* -0.765029907 */, PRESHIFT(0x11c83000) /* 1.111373901 */, PRESHIFT(0x06076000) /* 0.376800537 */, PRESHIFT(0x024ad000) /* 0.143264771 */, PRESHIFT(0x00a67000) /* 0.040634155 */, PRESHIFT(0x007f0000) /* 0.031005859 */, PRESHIFT(0x0006f000) /* 0.001693726 */, PRESHIFT(0x000a9000) /* 0.002578735 */, PRESHIFT(0x0000e000) /* 0.000213623 */, -PRESHIFT(0x00002000) /* -0.000030518 */, -PRESHIFT(0x00035000) /* -0.000808716 */, PRESHIFT(0x000e3000) /* 0.003463745 */, -PRESHIFT(0x00397000) /* -0.014022827 */, PRESHIFT(0x005ff000) /* 0.023422241 */, -PRESHIFT(0x01dad000) /* -0.115921021 */, PRESHIFT(0x0043a000) /* 0.016510010 */, -PRESHIFT(0x0c3d9000) /* -0.765029907 */, PRESHIFT(0x11c83000) /* 1.111373901 */, PRESHIFT(0x06076000) /* 0.376800537 */, PRESHIFT(0x024ad000) /* 0.143264771 */, PRESHIFT(0x00a67000) /* 0.040634155 */, PRESHIFT(0x007f0000) /* 0.031005859 */, PRESHIFT(0x0006f000) /* 0.001693726 */, PRESHIFT(0x000a9000) /* 0.002578735 */, PRESHIFT(0x0000e000) /* 0.000213623 */ }, { -PRESHIFT(0x00002000) /* -0.000030518 */, /* 8 */ -PRESHIFT(0x0003a000) /* -0.000885010 */, PRESHIFT(0x000e0000) /* 0.003417969 */, -PRESHIFT(0x003df000) /* -0.015121460 */, PRESHIFT(0x00586000) /* 0.021575928 */, -PRESHIFT(0x01ee6000) /* -0.120697021 */, PRESHIFT(0x00046000) /* 0.001068115 */, -PRESHIFT(0x0ca8d000) /* -0.791213989 */, PRESHIFT(0x119e9000) /* 1.101211548 */, PRESHIFT(0x05991000) /* 0.349868774 */, PRESHIFT(0x02578000) /* 0.146362305 */, PRESHIFT(0x0091a000) /* 0.035552979 */, PRESHIFT(0x007d1000) /* 0.030532837 */, PRESHIFT(0x00048000) /* 0.001098633 */, PRESHIFT(0x000a1000) /* 0.002456665 */, PRESHIFT(0x0000d000) /* 0.000198364 */, -PRESHIFT(0x00002000) /* -0.000030518 */, -PRESHIFT(0x0003a000) /* -0.000885010 */, PRESHIFT(0x000e0000) /* 0.003417969 */, -PRESHIFT(0x003df000) /* -0.015121460 */, PRESHIFT(0x00586000) /* 0.021575928 */, -PRESHIFT(0x01ee6000) /* -0.120697021 */, PRESHIFT(0x00046000) /* 0.001068115 */, -PRESHIFT(0x0ca8d000) /* -0.791213989 */, PRESHIFT(0x119e9000) /* 1.101211548 */, PRESHIFT(0x05991000) /* 0.349868774 */, PRESHIFT(0x02578000) /* 0.146362305 */, PRESHIFT(0x0091a000) /* 0.035552979 */, PRESHIFT(0x007d1000) /* 0.030532837 */, PRESHIFT(0x00048000) /* 0.001098633 */, PRESHIFT(0x000a1000) /* 0.002456665 */, PRESHIFT(0x0000d000) /* 0.000198364 */ }, { -PRESHIFT(0x00002000) /* -0.000030518 */, /* 9 */ -PRESHIFT(0x0003f000) /* -0.000961304 */, PRESHIFT(0x000dd000) /* 0.003372192 */, -PRESHIFT(0x00428000) /* -0.016235352 */, PRESHIFT(0x00500000) /* 0.019531250 */, -PRESHIFT(0x02011000) /* -0.125259399 */, -PRESHIFT(0x003e6000) /* -0.015228271 */, -PRESHIFT(0x0d11e000) /* -0.816864014 */, PRESHIFT(0x116fc000) /* 1.089782715 */, PRESHIFT(0x052c5000) /* 0.323318481 */, PRESHIFT(0x02616000) /* 0.148773193 */, PRESHIFT(0x007d6000) /* 0.030609131 */, PRESHIFT(0x007aa000) /* 0.029937744 */, PRESHIFT(0x00024000) /* 0.000549316 */, PRESHIFT(0x0009a000) /* 0.002349854 */, PRESHIFT(0x0000b000) /* 0.000167847 */, -PRESHIFT(0x00002000) /* -0.000030518 */, -PRESHIFT(0x0003f000) /* -0.000961304 */, PRESHIFT(0x000dd000) /* 0.003372192 */, -PRESHIFT(0x00428000) /* -0.016235352 */, PRESHIFT(0x00500000) /* 0.019531250 */, -PRESHIFT(0x02011000) /* -0.125259399 */, -PRESHIFT(0x003e6000) /* -0.015228271 */, -PRESHIFT(0x0d11e000) /* -0.816864014 */, PRESHIFT(0x116fc000) /* 1.089782715 */, PRESHIFT(0x052c5000) /* 0.323318481 */, PRESHIFT(0x02616000) /* 0.148773193 */, PRESHIFT(0x007d6000) /* 0.030609131 */, PRESHIFT(0x007aa000) /* 0.029937744 */, PRESHIFT(0x00024000) /* 0.000549316 */, PRESHIFT(0x0009a000) /* 0.002349854 */, PRESHIFT(0x0000b000) /* 0.000167847 */ }, { -PRESHIFT(0x00002000) /* -0.000030518 */, /* 10 */ -PRESHIFT(0x00044000) /* -0.001037598 */, PRESHIFT(0x000d7000) /* 0.003280640 */, -PRESHIFT(0x00471000) /* -0.017349243 */, PRESHIFT(0x0046b000) /* 0.017257690 */, -PRESHIFT(0x0212b000) /* -0.129562378 */, -PRESHIFT(0x0084a000) /* -0.032379150 */, -PRESHIFT(0x0d78a000) /* -0.841949463 */, PRESHIFT(0x113be000) /* 1.077117920 */, PRESHIFT(0x04c16000) /* 0.297210693 */, PRESHIFT(0x02687000) /* 0.150497437 */, PRESHIFT(0x0069c000) /* 0.025817871 */, PRESHIFT(0x0077f000) /* 0.029281616 */, PRESHIFT(0x00002000) /* 0.000030518 */, PRESHIFT(0x00093000) /* 0.002243042 */, PRESHIFT(0x0000a000) /* 0.000152588 */, -PRESHIFT(0x00002000) /* -0.000030518 */, -PRESHIFT(0x00044000) /* -0.001037598 */, PRESHIFT(0x000d7000) /* 0.003280640 */, -PRESHIFT(0x00471000) /* -0.017349243 */, PRESHIFT(0x0046b000) /* 0.017257690 */, -PRESHIFT(0x0212b000) /* -0.129562378 */, -PRESHIFT(0x0084a000) /* -0.032379150 */, -PRESHIFT(0x0d78a000) /* -0.841949463 */, PRESHIFT(0x113be000) /* 1.077117920 */, PRESHIFT(0x04c16000) /* 0.297210693 */, PRESHIFT(0x02687000) /* 0.150497437 */, PRESHIFT(0x0069c000) /* 0.025817871 */, PRESHIFT(0x0077f000) /* 0.029281616 */, PRESHIFT(0x00002000) /* 0.000030518 */, PRESHIFT(0x00093000) /* 0.002243042 */, PRESHIFT(0x0000a000) /* 0.000152588 */ }, { -PRESHIFT(0x00003000) /* -0.000045776 */, /* 11 */ -PRESHIFT(0x00049000) /* -0.001113892 */, PRESHIFT(0x000d0000) /* 0.003173828 */, -PRESHIFT(0x004ba000) /* -0.018463135 */, PRESHIFT(0x003ca000) /* 0.014801025 */, -PRESHIFT(0x02233000) /* -0.133590698 */, -PRESHIFT(0x00ce4000) /* -0.050354004 */, -PRESHIFT(0x0ddca000) /* -0.866363525 */, PRESHIFT(0x1102f000) /* 1.063217163 */, PRESHIFT(0x04587000) /* 0.271591187 */, PRESHIFT(0x026cf000) /* 0.151596069 */, PRESHIFT(0x0056c000) /* 0.021179199 */, PRESHIFT(0x0074e000) /* 0.028533936 */, -PRESHIFT(0x0001d000) /* -0.000442505 */, PRESHIFT(0x0008b000) /* 0.002120972 */, PRESHIFT(0x00009000) /* 0.000137329 */, -PRESHIFT(0x00003000) /* -0.000045776 */, -PRESHIFT(0x00049000) /* -0.001113892 */, PRESHIFT(0x000d0000) /* 0.003173828 */, -PRESHIFT(0x004ba000) /* -0.018463135 */, PRESHIFT(0x003ca000) /* 0.014801025 */, -PRESHIFT(0x02233000) /* -0.133590698 */, -PRESHIFT(0x00ce4000) /* -0.050354004 */, -PRESHIFT(0x0ddca000) /* -0.866363525 */, PRESHIFT(0x1102f000) /* 1.063217163 */, PRESHIFT(0x04587000) /* 0.271591187 */, PRESHIFT(0x026cf000) /* 0.151596069 */, PRESHIFT(0x0056c000) /* 0.021179199 */, PRESHIFT(0x0074e000) /* 0.028533936 */, -PRESHIFT(0x0001d000) /* -0.000442505 */, PRESHIFT(0x0008b000) /* 0.002120972 */, PRESHIFT(0x00009000) /* 0.000137329 */ }, { -PRESHIFT(0x00003000) /* -0.000045776 */, /* 12 */ -PRESHIFT(0x0004f000) /* -0.001205444 */, PRESHIFT(0x000c8000) /* 0.003051758 */, -PRESHIFT(0x00503000) /* -0.019577026 */, PRESHIFT(0x0031a000) /* 0.012115479 */, -PRESHIFT(0x02326000) /* -0.137298584 */, -PRESHIFT(0x011b5000) /* -0.069168091 */, -PRESHIFT(0x0e3dd000) /* -0.890090942 */, PRESHIFT(0x10c54000) /* 1.048156738 */, PRESHIFT(0x03f1b000) /* 0.246505737 */, PRESHIFT(0x026ee000) /* 0.152069092 */, PRESHIFT(0x00447000) /* 0.016708374 */, PRESHIFT(0x00719000) /* 0.027725220 */, -PRESHIFT(0x00039000) /* -0.000869751 */, PRESHIFT(0x00084000) /* 0.002014160 */, PRESHIFT(0x00008000) /* 0.000122070 */, -PRESHIFT(0x00003000) /* -0.000045776 */, -PRESHIFT(0x0004f000) /* -0.001205444 */, PRESHIFT(0x000c8000) /* 0.003051758 */, -PRESHIFT(0x00503000) /* -0.019577026 */, PRESHIFT(0x0031a000) /* 0.012115479 */, -PRESHIFT(0x02326000) /* -0.137298584 */, -PRESHIFT(0x011b5000) /* -0.069168091 */, -PRESHIFT(0x0e3dd000) /* -0.890090942 */, PRESHIFT(0x10c54000) /* 1.048156738 */, PRESHIFT(0x03f1b000) /* 0.246505737 */, PRESHIFT(0x026ee000) /* 0.152069092 */, PRESHIFT(0x00447000) /* 0.016708374 */, PRESHIFT(0x00719000) /* 0.027725220 */, -PRESHIFT(0x00039000) /* -0.000869751 */, PRESHIFT(0x00084000) /* 0.002014160 */, PRESHIFT(0x00008000) /* 0.000122070 */ }, { -PRESHIFT(0x00004000) /* -0.000061035 */, /* 13 */ -PRESHIFT(0x00055000) /* -0.001296997 */, PRESHIFT(0x000bd000) /* 0.002883911 */, -PRESHIFT(0x0054c000) /* -0.020690918 */, PRESHIFT(0x0025d000) /* 0.009231567 */, -PRESHIFT(0x02403000) /* -0.140670776 */, -PRESHIFT(0x016ba000) /* -0.088775635 */, -PRESHIFT(0x0e9be000) /* -0.913055420 */, PRESHIFT(0x1082d000) /* 1.031936646 */, PRESHIFT(0x038d4000) /* 0.221984863 */, PRESHIFT(0x026e7000) /* 0.151962280 */, PRESHIFT(0x0032e000) /* 0.012420654 */, PRESHIFT(0x006df000) /* 0.026840210 */, -PRESHIFT(0x00053000) /* -0.001266479 */, PRESHIFT(0x0007d000) /* 0.001907349 */, PRESHIFT(0x00007000) /* 0.000106812 */, -PRESHIFT(0x00004000) /* -0.000061035 */, -PRESHIFT(0x00055000) /* -0.001296997 */, PRESHIFT(0x000bd000) /* 0.002883911 */, -PRESHIFT(0x0054c000) /* -0.020690918 */, PRESHIFT(0x0025d000) /* 0.009231567 */, -PRESHIFT(0x02403000) /* -0.140670776 */, -PRESHIFT(0x016ba000) /* -0.088775635 */, -PRESHIFT(0x0e9be000) /* -0.913055420 */, PRESHIFT(0x1082d000) /* 1.031936646 */, PRESHIFT(0x038d4000) /* 0.221984863 */, PRESHIFT(0x026e7000) /* 0.151962280 */, PRESHIFT(0x0032e000) /* 0.012420654 */, PRESHIFT(0x006df000) /* 0.026840210 */, -PRESHIFT(0x00053000) /* -0.001266479 */, PRESHIFT(0x0007d000) /* 0.001907349 */, PRESHIFT(0x00007000) /* 0.000106812 */ }, { -PRESHIFT(0x00004000) /* -0.000061035 */, /* 14 */ -PRESHIFT(0x0005b000) /* -0.001388550 */, PRESHIFT(0x000b1000) /* 0.002700806 */, -PRESHIFT(0x00594000) /* -0.021789551 */, PRESHIFT(0x00192000) /* 0.006134033 */, -PRESHIFT(0x024c8000) /* -0.143676758 */, -PRESHIFT(0x01bf2000) /* -0.109161377 */, -PRESHIFT(0x0ef69000) /* -0.935195923 */, PRESHIFT(0x103be000) /* 1.014617920 */, PRESHIFT(0x032b4000) /* 0.198059082 */, PRESHIFT(0x026bc000) /* 0.151306152 */, PRESHIFT(0x00221000) /* 0.008316040 */, PRESHIFT(0x006a2000) /* 0.025909424 */, -PRESHIFT(0x0006a000) /* -0.001617432 */, PRESHIFT(0x00075000) /* 0.001785278 */, PRESHIFT(0x00007000) /* 0.000106812 */, -PRESHIFT(0x00004000) /* -0.000061035 */, -PRESHIFT(0x0005b000) /* -0.001388550 */, PRESHIFT(0x000b1000) /* 0.002700806 */, -PRESHIFT(0x00594000) /* -0.021789551 */, PRESHIFT(0x00192000) /* 0.006134033 */, -PRESHIFT(0x024c8000) /* -0.143676758 */, -PRESHIFT(0x01bf2000) /* -0.109161377 */, -PRESHIFT(0x0ef69000) /* -0.935195923 */, PRESHIFT(0x103be000) /* 1.014617920 */, PRESHIFT(0x032b4000) /* 0.198059082 */, PRESHIFT(0x026bc000) /* 0.151306152 */, PRESHIFT(0x00221000) /* 0.008316040 */, PRESHIFT(0x006a2000) /* 0.025909424 */, -PRESHIFT(0x0006a000) /* -0.001617432 */, PRESHIFT(0x00075000) /* 0.001785278 */, PRESHIFT(0x00007000) /* 0.000106812 */ }, { -PRESHIFT(0x00005000) /* -0.000076294 */, /* 15 */ -PRESHIFT(0x00061000) /* -0.001480103 */, PRESHIFT(0x000a3000) /* 0.002487183 */, -PRESHIFT(0x005da000) /* -0.022857666 */, PRESHIFT(0x000b9000) /* 0.002822876 */, -PRESHIFT(0x02571000) /* -0.146255493 */, -PRESHIFT(0x0215c000) /* -0.130310059 */, -PRESHIFT(0x0f4dc000) /* -0.956481934 */, PRESHIFT(0x0ff0a000) /* 0.996246338 */, PRESHIFT(0x02cbf000) /* 0.174789429 */, PRESHIFT(0x0266e000) /* 0.150115967 */, PRESHIFT(0x00120000) /* 0.004394531 */, PRESHIFT(0x00662000) /* 0.024932861 */, -PRESHIFT(0x0007f000) /* -0.001937866 */, PRESHIFT(0x0006f000) /* 0.001693726 */, PRESHIFT(0x00006000) /* 0.000091553 */, -PRESHIFT(0x00005000) /* -0.000076294 */, -PRESHIFT(0x00061000) /* -0.001480103 */, PRESHIFT(0x000a3000) /* 0.002487183 */, -PRESHIFT(0x005da000) /* -0.022857666 */, PRESHIFT(0x000b9000) /* 0.002822876 */, -PRESHIFT(0x02571000) /* -0.146255493 */, -PRESHIFT(0x0215c000) /* -0.130310059 */, -PRESHIFT(0x0f4dc000) /* -0.956481934 */, PRESHIFT(0x0ff0a000) /* 0.996246338 */, PRESHIFT(0x02cbf000) /* 0.174789429 */, PRESHIFT(0x0266e000) /* 0.150115967 */, PRESHIFT(0x00120000) /* 0.004394531 */, PRESHIFT(0x00662000) /* 0.024932861 */, -PRESHIFT(0x0007f000) /* -0.001937866 */, PRESHIFT(0x0006f000) /* 0.001693726 */, PRESHIFT(0x00006000) /* 0.000091553 */ }, { -PRESHIFT(0x00005000) /* -0.000076294 */, /* 16 */ -PRESHIFT(0x00068000) /* -0.001586914 */, PRESHIFT(0x00092000) /* 0.002227783 */, -PRESHIFT(0x0061f000) /* -0.023910522 */, -PRESHIFT(0x0002d000) /* -0.000686646 */, -PRESHIFT(0x025ff000) /* -0.148422241 */, -PRESHIFT(0x026f7000) /* -0.152206421 */, -PRESHIFT(0x0fa13000) /* -0.976852417 */, PRESHIFT(0x0fa13000) /* 0.976852417 */, PRESHIFT(0x026f7000) /* 0.152206421 */, PRESHIFT(0x025ff000) /* 0.148422241 */, PRESHIFT(0x0002d000) /* 0.000686646 */, PRESHIFT(0x0061f000) /* 0.023910522 */, -PRESHIFT(0x00092000) /* -0.002227783 */, PRESHIFT(0x00068000) /* 0.001586914 */, PRESHIFT(0x00005000) /* 0.000076294 */, -PRESHIFT(0x00005000) /* -0.000076294 */, -PRESHIFT(0x00068000) /* -0.001586914 */, PRESHIFT(0x00092000) /* 0.002227783 */, -PRESHIFT(0x0061f000) /* -0.023910522 */, -PRESHIFT(0x0002d000) /* -0.000686646 */, -PRESHIFT(0x025ff000) /* -0.148422241 */, -PRESHIFT(0x026f7000) /* -0.152206421 */, -PRESHIFT(0x0fa13000) /* -0.976852417 */, PRESHIFT(0x0fa13000) /* 0.976852417 */, PRESHIFT(0x026f7000) /* 0.152206421 */, PRESHIFT(0x025ff000) /* 0.148422241 */, PRESHIFT(0x0002d000) /* 0.000686646 */, PRESHIFT(0x0061f000) /* 0.023910522 */, -PRESHIFT(0x00092000) /* -0.002227783 */, PRESHIFT(0x00068000) /* 0.001586914 */, PRESHIFT(0x00005000) /* 0.000076294 */ } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/Makefile.am000066400000000000000000000020721466261456500254310ustar00rootroot00000000000000 EXTRA_DIST = D.dat huffman.h mad.h stream.h fixed.h \ imdct_s.dat qc_table.dat synth.h bit.h frame.h layer12.h \ rq_table.dat timer.h global.h layer3.h sf_table.dat bit.c \ frame.c layer12.c stream.c timer.c fixed.c huffman.c \ layer3.c synth.c xing.c xing.h mad_engine.c mad_inltlibs = libmad_in.la mad_inldflags = -export-dynamic -avoid-version if USE_LIBMAD mad_insources = mad_engine.c xing.c else mad_insources = bit.c frame.c layer12.c stream.c timer.c \ fixed.c huffman.c layer3.c synth.c mad_engine.c xing.c endif if HAVE_GTK2 extra_cflags = @GTK2_CFLAGS@ extra_libs = @GTK2_LIBS@ else extra_cflags = extra_libs = endif lib_LTLIBRARIES = $(mad_inltlibs) libdir = $(ADDON_DIR)/input COMMON_CFLAGS = -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @ARCH_CFLAGS@ -D_REENTRANT @DFLAGS@ AM_CFLAGS = $(COMMON_CFLAGS) AM_CXXFLAGS = $(CFLAGS) INCLUDES = -I$(ROOT_DIR)/app $(extra_cflags) libmad_in_la_SOURCES = $(mad_insources) libmad_in_la_LDFLAGS = $(mad_inldflags) @MAD_LDADD@ $(extra_cflags) libmad_in_la_LIBADD = $(extra_libs) CLEANFILES = libmad.la alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/bit.c000066400000000000000000000152661466261456500243300ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: bit.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # ifdef HAVE_LIMITS_H # include # else # define CHAR_BIT 8 # endif # include "bit.h" /* * This is the lookup table for computing the CRC-check word. * As described in section 2.4.3.1 and depicted in Figure A.9 * of ISO/IEC 11172-3, the generator polynomial is: * * G(X) = X^16 + X^15 + X^2 + 1 */ static unsigned short const crc_table[256] = { 0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011, 0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022, 0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072, 0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041, 0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2, 0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1, 0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1, 0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082, 0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192, 0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1, 0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1, 0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2, 0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151, 0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162, 0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132, 0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101, 0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312, 0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321, 0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371, 0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342, 0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1, 0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2, 0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2, 0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381, 0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291, 0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2, 0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2, 0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1, 0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252, 0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261, 0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231, 0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202 }; # define CRC_POLY 0x8005 /* * NAME: bit->init() * DESCRIPTION: initialize bit pointer struct */ void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte) { bitptr->byte = byte; bitptr->cache = 0; bitptr->left = CHAR_BIT; } /* * NAME: bit->length() * DESCRIPTION: return number of bits between start and end points */ unsigned int mad_bit_length(struct mad_bitptr const *begin, struct mad_bitptr const *end) { return begin->left + CHAR_BIT * (end->byte - (begin->byte + 1)) + (CHAR_BIT - end->left); } /* * NAME: bit->nextbyte() * DESCRIPTION: return pointer to next unprocessed byte */ unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr) { return bitptr->left == CHAR_BIT ? bitptr->byte : bitptr->byte + 1; } /* * NAME: bit->skip() * DESCRIPTION: advance bit pointer */ void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len) { bitptr->byte += len / CHAR_BIT; bitptr->left -= len % CHAR_BIT; if (bitptr->left > CHAR_BIT) { bitptr->byte++; bitptr->left += CHAR_BIT; } if (bitptr->left < CHAR_BIT) bitptr->cache = *bitptr->byte; } /* * NAME: bit->read() * DESCRIPTION: read an arbitrary number of bits and return their UIMSBF value */ unsigned long mad_bit_read(struct mad_bitptr *bitptr, unsigned int len) { register unsigned long value; if (bitptr->left == CHAR_BIT) bitptr->cache = *bitptr->byte; if (len < bitptr->left) { value = (bitptr->cache & ((1 << bitptr->left) - 1)) >> (bitptr->left - len); bitptr->left -= len; return value; } /* remaining bits in current byte */ value = bitptr->cache & ((1 << bitptr->left) - 1); len -= bitptr->left; bitptr->byte++; bitptr->left = CHAR_BIT; /* more bytes */ while (len >= CHAR_BIT) { value = (value << CHAR_BIT) | *bitptr->byte++; len -= CHAR_BIT; } if (len > 0) { bitptr->cache = *bitptr->byte; value = (value << len) | (bitptr->cache >> (CHAR_BIT - len)); bitptr->left -= len; } return value; } # if 0 /* * NAME: bit->write() * DESCRIPTION: write an arbitrary number of bits */ void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len, unsigned long value) { unsigned char *ptr; ptr = (unsigned char *) bitptr->byte; /* ... */ } # endif /* * NAME: bit->crc() * DESCRIPTION: compute CRC-check word */ unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len, unsigned short init) { register unsigned int crc; for (crc = init; len >= 32; len -= 32) { register unsigned long data; data = mad_bit_read(&bitptr, 32); crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 24)) & 0xff]; crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 16)) & 0xff]; crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 8)) & 0xff]; crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 0)) & 0xff]; } switch (len / 8) { case 3: crc = (crc << 8) ^ crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; case 2: crc = (crc << 8) ^ crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; case 1: crc = (crc << 8) ^ crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; len %= 8; case 0: break; } while (len--) { register unsigned int msb; msb = mad_bit_read(&bitptr, 1) ^ (crc >> 15); crc <<= 1; if (msb & 1) crc ^= CRC_POLY; } return crc & 0xffff; } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/bit.h000066400000000000000000000030761466261456500243310ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: bit.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_BIT_H # define LIBMAD_BIT_H struct mad_bitptr { unsigned char const *byte; unsigned short cache; unsigned short left; }; void mad_bit_init(struct mad_bitptr *, unsigned char const *); # define mad_bit_finish(bitptr) /* nothing */ unsigned int mad_bit_length(struct mad_bitptr const *, struct mad_bitptr const *); # define mad_bit_bitsleft(bitptr) ((bitptr)->left) unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); void mad_bit_skip(struct mad_bitptr *, unsigned int); unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/fixed.c000066400000000000000000000033641466261456500246450ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: fixed.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include "fixed.h" /* * NAME: fixed->abs() * DESCRIPTION: return absolute value of a fixed-point number */ mad_fixed_t mad_f_abs(mad_fixed_t x) { return x < 0 ? -x : x; } /* * NAME: fixed->div() * DESCRIPTION: perform division using fixed-point math */ mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y) { mad_fixed_t q, r; unsigned int bits; q = mad_f_abs(x / y); if (x < 0) { x = -x; y = -y; } r = x % y; if (y < 0) { x = -x; y = -y; } if (q > mad_f_intpart(MAD_F_MAX) && !(q == -mad_f_intpart(MAD_F_MIN) && r == 0 && (x < 0) != (y < 0))) return 0; for (bits = MAD_F_FRACBITS; bits && r; --bits) { q <<= 1, r <<= 1; if (r >= y) r -= y, ++q; } /* round */ if (2 * r >= y) ++q; /* fix sign */ if ((x < 0) != (y < 0)) q = -q; return q << bits; } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/fixed.h000066400000000000000000000323511466261456500246500ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: fixed.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H # if SIZEOF_INT >= 4 typedef signed int mad_fixed_t; typedef signed int mad_fixed64hi_t; typedef unsigned int mad_fixed64lo_t; # else typedef signed long mad_fixed_t; typedef signed long mad_fixed64hi_t; typedef unsigned long mad_fixed64lo_t; # endif # if defined(_MSC_VER) # define mad_fixed64_t signed __int64 # elif 1 || defined(__GNUC__) # define mad_fixed64_t signed long long # endif # if defined(FPM_FLOAT) typedef double mad_sample_t; # else typedef mad_fixed_t mad_sample_t; # endif /* * Fixed-point format: 0xABBBBBBB * A == whole part (sign + 3 bits) * B == fractional part (28 bits) * * Values are signed two's complement, so the effective range is: * 0x80000000 to 0x7fffffff * -8.0 to +7.9999999962747097015380859375 * * The smallest representable value is: * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9) * * 28 bits of fractional accuracy represent about * 8.6 digits of decimal accuracy. * * Fixed-point numbers can be added or subtracted as normal * integers, but multiplication requires shifting the 64-bit result * from 56 fractional bits back to 28 (and rounding.) * * Changing the definition of MAD_F_FRACBITS is only partially * supported, and must be done with care. */ # define MAD_F_FRACBITS 28 # if MAD_F_FRACBITS == 28 # define MAD_F(x) ((mad_fixed_t) (x##L)) # else # if MAD_F_FRACBITS < 28 # warning "MAD_F_FRACBITS < 28" # define MAD_F(x) ((mad_fixed_t) \ (((x##L) + \ (1L << (28 - MAD_F_FRACBITS - 1))) >> \ (28 - MAD_F_FRACBITS))) # elif MAD_F_FRACBITS > 28 # error "MAD_F_FRACBITS > 28 not currently supported" # define MAD_F(x) ((mad_fixed_t) \ ((x##L) << (MAD_F_FRACBITS - 28))) # endif # endif # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) # define MAD_F_ONE MAD_F(0x10000000) # define mad_f_tofixed(x) ((mad_fixed_t) \ ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) # define mad_f_todouble(x) ((double) \ ((x) / (double) (1L << MAD_F_FRACBITS))) # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) /* (x should be positive) */ # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) # define mad_f_add(x, y) ((x) + (y)) # define mad_f_sub(x, y) ((x) - (y)) # if defined(FPM_FLOAT) # error "FPM_FLOAT not yet supported" # undef MAD_F # define MAD_F(x) mad_f_todouble(x) # define mad_f_mul(x, y) ((x) * (y)) # define mad_f_scale64 # undef ASO_ZEROCHECK # elif defined(FPM_64BIT) /* * This version should be the most accurate if 64-bit types are supported by * the compiler, although it may not be the most efficient. */ # if defined(OPT_ACCURACY) # define mad_f_mul(x, y) \ ((mad_fixed_t) \ ((((mad_fixed64_t) (x) * (y)) + \ (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS)) # else # define mad_f_mul(x, y) \ ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS)) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Intel --------------------------------------------------------------- */ # elif defined(FPM_INTEL) # if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable: 4035) /* no return value */ static __forceinline mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) { enum { fracbits = MAD_F_FRACBITS }; __asm { mov eax, x imul y shrd eax, edx, fracbits } /* implicit return of eax */ } # pragma warning(pop) # define mad_f_mul mad_f_mul_inline # define mad_f_scale64 # else /* * This Intel version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("imull %3" \ : "=a" (lo), "=d" (hi) \ : "%a" (x), "rm" (y) \ : "cc") # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addl %2,%0\n\t" \ "adcl %3,%1" \ : "=rm" (lo), "=rm" (hi) \ : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ : "cc"); \ }) # endif /* OPT_ACCURACY */ # if defined(OPT_ACCURACY) /* * Surprisingly, this is faster than SHRD followed by ADC. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed64hi_t __hi_; \ mad_fixed64lo_t __lo_; \ mad_fixed_t __result; \ asm ("addl %4,%2\n\t" \ "adcl %5,%3" \ : "=rm" (__lo_), "=rm" (__hi_) \ : "0" (lo), "1" (hi), \ "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ : "cc"); \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # elif defined(OPT_INTEL) /* * Alternate Intel scaling that may or may not perform better. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrl %3,%1\n\t" \ "shll %4,%2\n\t" \ "orl %2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), \ "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif /* OPT_ACCURACY */ # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- ARM ----------------------------------------------------------------- */ # elif defined(FPM_ARM) /* * This ARM V4 version is as accurate as FPM_64BIT but much faster. The * least significant bit is properly rounded at no CPU cycle cost! */ # if 1 /* * This is faster than the default implementation via MAD_F_MLX() and * mad_f_scale64(). */ # define mad_f_mul(x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ mad_fixed_t __result; \ asm ("smull %0, %1, %3, %4\n\t" \ "movs %0, %0, lsr %5\n\t" \ "adc %2, %0, %1, lsl %6" \ : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ : "%r" (x), "r" (y), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif # define MAD_F_MLX(hi, lo, x, y) \ asm ("smull %0, %1, %2, %3" \ : "=&r" (lo), "=&r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("smlal %0, %1, %2, %3" \ : "+r" (lo), "+r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLN(hi, lo) \ asm ("rsbs %0, %2, #0\n\t" \ "rsc %1, %3, #0" \ : "=r" (lo), "=r" (hi) \ : "0" (lo), "1" (hi) \ : "cc") # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("movs %0, %1, lsr %3\n\t" \ "adc %0, %0, %2, lsl %4" \ : "=&r" (__result) \ : "r" (lo), "r" (hi), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- MIPS ---------------------------------------------------------------- */ # elif defined(FPM_MIPS) /* * This MIPS version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" (x), "r" (y)) # if defined(HAVE_MADD_ASM) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" (x), "r" (y)) # elif defined(HAVE_MADD16_ASM) /* * This loses significant accuracy due to the 16-bit integer limit in the * multiply/accumulate instruction. */ # define MAD_F_ML0(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd16 %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) # endif # if defined(OPT_SPEED) # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS))) # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- SPARC --------------------------------------------------------------- */ # elif defined(FPM_SPARC) /* * This SPARC V8 version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("smul %2, %3, %0\n\t" \ "rd %%y, %1" \ : "=r" (lo), "=r" (hi) \ : "%r" (x), "rI" (y)) /* --- PowerPC ------------------------------------------------------------- */ # elif defined(FPM_PPC) /* * This PowerPC version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ do { \ asm ("mullw %0,%1,%2" \ : "=r" (lo) \ : "%r" (x), "r" (y)); \ asm ("mulhw %0,%1,%2" \ : "=r" (hi) \ : "%r" (x), "r" (y)); \ } \ while (0) # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addc %0,%2,%3\n\t" \ "adde %1,%4,%5" \ : "=r" (lo), "=r" (hi) \ : "%r" (lo), "r" (__lo), \ "%r" (hi), "r" (__hi) \ : "xer"); \ }) # endif # if defined(OPT_ACCURACY) /* * This is slower than the truncating version below it. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result, __round; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("extrwi %0,%1,1,0" \ : "=r" (__round) \ : "r" (__result)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ asm ("add %0,%1,%2" \ : "=r" (__result) \ : "%r" (__result), "r" (__round)); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ __result; \ }) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Default ------------------------------------------------------------- */ # elif defined(FPM_DEFAULT) /* * This version is the most portable but it loses significant accuracy. * Furthermore, accuracy is biased against the second argument, so care * should be taken when ordering operands. * * The scale factors are constant as this is not used with SSO. * * Pre-rounding is required to stay within the limits of compliance. */ # if defined(OPT_SPEED) # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) # else # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ (((y) + (1L << 15)) >> 16)) # endif /* ------------------------------------------------------------------------- */ # else # error "no FPM selected" # endif /* default implementations */ # if !defined(mad_f_mul) # define mad_f_mul(x, y) \ ({ register mad_fixed64hi_t __hi; \ register mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ mad_f_scale64(__hi, __lo); \ }) # endif # if !defined(MAD_F_MLA) # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) # endif # if !defined(MAD_F_ML0) # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) # endif # if !defined(MAD_F_MLN) # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) # endif # if !defined(MAD_F_MLZ) # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) # endif # if !defined(mad_f_scale64) # if defined(OPT_ACCURACY) # define mad_f_scale64(hi, lo) \ ((((mad_fixed_t) \ (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) # else # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) \ (((hi) << (32 - MAD_F_SCALEBITS)) | \ ((lo) >> MAD_F_SCALEBITS))) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* C routines */ mad_fixed_t mad_f_abs(mad_fixed_t); mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/frame.c000066400000000000000000000274631466261456500246460ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: frame.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # include "bit.h" # include "stream.h" # include "frame.h" # include "timer.h" # include "layer12.h" # include "layer3.h" static unsigned long const bitrate_table[5][15] = { /* MPEG-1 */ { 0, 32000, 64000, 96000, 128000, 160000, 192000, 224000, /* Layer I */ 256000, 288000, 320000, 352000, 384000, 416000, 448000 }, { 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, /* Layer II */ 128000, 160000, 192000, 224000, 256000, 320000, 384000 }, { 0, 32000, 40000, 48000, 56000, 64000, 80000, 96000, /* Layer III */ 112000, 128000, 160000, 192000, 224000, 256000, 320000 }, /* MPEG-2 LSF */ { 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, /* Layer I */ 128000, 144000, 160000, 176000, 192000, 224000, 256000 }, { 0, 8000, 16000, 24000, 32000, 40000, 48000, 56000, /* Layers */ 64000, 80000, 96000, 112000, 128000, 144000, 160000 } /* II & III */ }; static unsigned int const samplerate_table[3] = { 44100, 48000, 32000 }; static int (*const decoder_table[3])(struct mad_stream *, struct mad_frame *) = { mad_layer_I, mad_layer_II, mad_layer_III }; /* * NAME: header->init() * DESCRIPTION: initialize header struct */ void mad_header_init(struct mad_header *header) { header->layer = 0; header->mode = 0; header->mode_extension = 0; header->emphasis = 0; header->bitrate = 0; header->samplerate = 0; header->crc_check = 0; header->crc_target = 0; header->flags = 0; header->private_bits = 0; header->duration = mad_timer_zero; } /* * NAME: frame->init() * DESCRIPTION: initialize frame struct */ void mad_frame_init(struct mad_frame *frame) { mad_header_init(&frame->header); frame->options = 0; frame->overlap = 0; mad_frame_mute(frame); } /* * NAME: frame->finish() * DESCRIPTION: deallocate any dynamic memory associated with frame */ void mad_frame_finish(struct mad_frame *frame) { mad_header_finish(&frame->header); if (frame->overlap) { free(frame->overlap); frame->overlap = 0; } } /* * NAME: decode_header() * DESCRIPTION: read header data and following CRC word */ static int decode_header(struct mad_header *header, struct mad_stream *stream) { unsigned int index; header->flags = 0; header->private_bits = 0; /* header() */ /* syncword */ mad_bit_skip(&stream->ptr, 11); /* MPEG 2.5 indicator (really part of syncword) */ if (mad_bit_read(&stream->ptr, 1) == 0) header->flags |= MAD_FLAG_MPEG_2_5_EXT; /* ID */ if (mad_bit_read(&stream->ptr, 1) == 0) header->flags |= MAD_FLAG_LSF_EXT; else if (header->flags & MAD_FLAG_MPEG_2_5_EXT) { stream->error = MAD_ERROR_LOSTSYNC; return -1; } /* layer */ header->layer = 4 - mad_bit_read(&stream->ptr, 2); if (header->layer == 4) { stream->error = MAD_ERROR_BADLAYER; return -1; } /* protection_bit */ if (mad_bit_read(&stream->ptr, 1) == 0) { header->flags |= MAD_FLAG_PROTECTION; header->crc_check = mad_bit_crc(stream->ptr, 16, 0xffff); } /* bitrate_index */ index = mad_bit_read(&stream->ptr, 4); if (index == 15) { stream->error = MAD_ERROR_BADBITRATE; return -1; } if (header->flags & MAD_FLAG_LSF_EXT) header->bitrate = bitrate_table[3 + (header->layer >> 1)][index]; else header->bitrate = bitrate_table[header->layer - 1][index]; /* sampling_frequency */ index = mad_bit_read(&stream->ptr, 2); if (index == 3) { stream->error = MAD_ERROR_BADSAMPLERATE; return -1; } header->samplerate = samplerate_table[index]; if (header->flags & MAD_FLAG_LSF_EXT) { header->samplerate /= 2; if (header->flags & MAD_FLAG_MPEG_2_5_EXT) header->samplerate /= 2; } /* padding_bit */ if (mad_bit_read(&stream->ptr, 1)) header->flags |= MAD_FLAG_PADDING; /* private_bit */ if (mad_bit_read(&stream->ptr, 1)) header->private_bits |= MAD_PRIVATE_HEADER; /* mode */ header->mode = 3 - mad_bit_read(&stream->ptr, 2); /* mode_extension */ header->mode_extension = mad_bit_read(&stream->ptr, 2); /* copyright */ if (mad_bit_read(&stream->ptr, 1)) header->flags |= MAD_FLAG_COPYRIGHT; /* original/copy */ if (mad_bit_read(&stream->ptr, 1)) header->flags |= MAD_FLAG_ORIGINAL; /* emphasis */ header->emphasis = mad_bit_read(&stream->ptr, 2); # if defined(OPT_STRICT) /* * ISO/IEC 11172-3 says this is a reserved emphasis value, but * streams exist which use it anyway. Since the value is not important * to the decoder proper, we allow it unless OPT_STRICT is defined. */ if (header->emphasis == MAD_EMPHASIS_RESERVED) { stream->error = MAD_ERROR_BADEMPHASIS; return -1; } # endif /* error_check() */ /* crc_check */ if (header->flags & MAD_FLAG_PROTECTION) header->crc_target = mad_bit_read(&stream->ptr, 16); return 0; } /* * NAME: free_bitrate() * DESCRIPTION: attempt to discover the bitstream's free bitrate */ static int free_bitrate(struct mad_stream *stream, struct mad_header const *header) { struct mad_bitptr keep_ptr; unsigned long rate = 0; unsigned int pad_slot, slots_per_frame; unsigned char const *ptr = 0; keep_ptr = stream->ptr; pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0; slots_per_frame = (header->layer == MAD_LAYER_III && (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; while (mad_stream_sync(stream) == 0) { struct mad_stream peek_stream; struct mad_header peek_header; peek_stream = *stream; peek_header = *header; if (decode_header(&peek_header, &peek_stream) == 0 && peek_header.layer == header->layer && peek_header.samplerate == header->samplerate) { unsigned int N; ptr = mad_bit_nextbyte(&stream->ptr); N = ptr - stream->this_frame; if (header->layer == MAD_LAYER_I) { rate = (unsigned long) header->samplerate * (N - 4 * pad_slot + 4) / 48 / 1000; } else { rate = (unsigned long) header->samplerate * (N - pad_slot + 1) / slots_per_frame / 1000; } if (rate >= 8) break; } mad_bit_skip(&stream->ptr, 8); } stream->ptr = keep_ptr; if (rate < 8 || (header->layer == MAD_LAYER_III && rate > 640)) { stream->error = MAD_ERROR_LOSTSYNC; return -1; } stream->freerate = rate * 1000; return 0; } /* * NAME: header->decode() * DESCRIPTION: read the next frame header from the stream */ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) { register unsigned char const *ptr, *end; unsigned int pad_slot, N; ptr = stream->next_frame; end = stream->bufend; if (ptr == 0) { stream->error = MAD_ERROR_BUFPTR; goto fail; } /* stream skip */ if (stream->skiplen) { if (!stream->sync) ptr = stream->this_frame; if (end - ptr < stream->skiplen) { stream->skiplen -= end - ptr; stream->next_frame = end; stream->error = MAD_ERROR_BUFLEN; goto fail; } ptr += stream->skiplen; stream->skiplen = 0; stream->sync = 1; } sync: /* synchronize */ if (stream->sync) { if (end - ptr < MAD_BUFFER_GUARD) { stream->next_frame = ptr; stream->error = MAD_ERROR_BUFLEN; goto fail; } else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { /* mark point where frame sync word was expected */ stream->this_frame = ptr; stream->next_frame = ptr + 1; stream->error = MAD_ERROR_LOSTSYNC; goto fail; } } else { mad_bit_init(&stream->ptr, ptr); if (mad_stream_sync(stream) == -1) { if (end - stream->next_frame >= MAD_BUFFER_GUARD) stream->next_frame = end - MAD_BUFFER_GUARD; stream->error = MAD_ERROR_BUFLEN; goto fail; } ptr = mad_bit_nextbyte(&stream->ptr); } /* begin processing */ stream->this_frame = ptr; stream->next_frame = ptr + 1; /* possibly bogus sync word */ mad_bit_init(&stream->ptr, stream->this_frame); if (decode_header(header, stream) == -1) goto fail; /* calculate frame duration */ mad_timer_set(&header->duration, 0, 32 * MAD_NSBSAMPLES(header), header->samplerate); /* calculate free bit rate */ if (header->bitrate == 0) { if ((stream->freerate == 0 || !stream->sync || (header->layer == MAD_LAYER_III && stream->freerate > 640000)) && free_bitrate(stream, header) == -1) goto fail; header->bitrate = stream->freerate; header->flags |= MAD_FLAG_FREEFORMAT; } /* calculate beginning of next frame */ pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0; if (header->layer == MAD_LAYER_I) N = ((12 * header->bitrate / header->samplerate) + pad_slot) * 4; else { unsigned int slots_per_frame; slots_per_frame = (header->layer == MAD_LAYER_III && (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; N = (slots_per_frame * header->bitrate / header->samplerate) + pad_slot; } /* verify there is enough data left in buffer to decode this frame */ if (N + MAD_BUFFER_GUARD > end - stream->this_frame) { stream->next_frame = stream->this_frame; stream->error = MAD_ERROR_BUFLEN; goto fail; } stream->next_frame = stream->this_frame + N; if (!stream->sync) { /* check that a valid frame header follows this frame */ ptr = stream->next_frame; if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { ptr = stream->next_frame = stream->this_frame + 1; goto sync; } stream->sync = 1; } header->flags |= MAD_FLAG_INCOMPLETE; return 0; fail: stream->sync = 0; return -1; } /* * NAME: frame->decode() * DESCRIPTION: decode a single frame from a bitstream */ int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream) { frame->options = stream->options; /* header() */ /* error_check() */ if (!(frame->header.flags & MAD_FLAG_INCOMPLETE) && mad_header_decode(&frame->header, stream) == -1) goto fail; /* audio_data() */ frame->header.flags &= ~MAD_FLAG_INCOMPLETE; if (decoder_table[frame->header.layer - 1](stream, frame) == -1) { if (!MAD_RECOVERABLE(stream->error)) stream->next_frame = stream->this_frame; goto fail; } /* ancillary_data() */ if (frame->header.layer != MAD_LAYER_III) { struct mad_bitptr next_frame; mad_bit_init(&next_frame, stream->next_frame); stream->anc_ptr = stream->ptr; stream->anc_bitlen = mad_bit_length(&stream->ptr, &next_frame); mad_bit_finish(&next_frame); } return 0; fail: stream->anc_bitlen = 0; return -1; } /* * NAME: frame->mute() * DESCRIPTION: zero all subband values so the frame becomes silent */ void mad_frame_mute(struct mad_frame *frame) { unsigned int s, sb; for (s = 0; s < 36; ++s) { for (sb = 0; sb < 32; ++sb) { frame->sbsample[0][s][sb] = frame->sbsample[1][s][sb] = 0; } } if (frame->overlap) { for (s = 0; s < 18; ++s) { for (sb = 0; sb < 32; ++sb) { (*frame->overlap)[0][sb][s] = (*frame->overlap)[1][sb][s] = 0; } } } } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/frame.h000066400000000000000000000077041466261456500246470ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: frame.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_FRAME_H # define LIBMAD_FRAME_H # include "fixed.h" # include "timer.h" # include "stream.h" enum mad_layer { MAD_LAYER_I = 1, /* Layer I */ MAD_LAYER_II = 2, /* Layer II */ MAD_LAYER_III = 3 /* Layer III */ }; enum mad_mode { MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ MAD_MODE_STEREO = 3 /* normal LR stereo */ }; enum mad_emphasis { MAD_EMPHASIS_NONE = 0, /* no emphasis */ MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ }; struct mad_header { enum mad_layer layer; /* audio layer (1, 2, or 3) */ enum mad_mode mode; /* channel mode (see above) */ int mode_extension; /* additional mode info */ enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ unsigned long bitrate; /* stream bitrate (bps) */ unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short crc_check; /* frame CRC accumulator */ unsigned short crc_target; /* final target CRC checksum */ int flags; /* flags (see below) */ int private_bits; /* private bits (see below) */ mad_timer_t duration; /* audio playing time of frame */ }; struct mad_frame { struct mad_header header; /* MPEG audio header */ int options; /* decoding options (from stream) */ mad_fixed_t sbsample[2][36][32]; /* synthesis subband filter samples */ mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ }; # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) # define MAD_NSBSAMPLES(header) \ ((header)->layer == MAD_LAYER_I ? 12 : \ (((header)->layer == MAD_LAYER_III && \ ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) enum { MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ }; enum { MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ }; void mad_header_init(struct mad_header *); # define mad_header_finish(header) /* nothing */ int mad_header_decode(struct mad_header *, struct mad_stream *); void mad_frame_init(struct mad_frame *); void mad_frame_finish(struct mad_frame *); int mad_frame_decode(struct mad_frame *, struct mad_stream *); void mad_frame_mute(struct mad_frame *); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/global.h000066400000000000000000000031371466261456500250110ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: global.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_GLOBAL_H # define LIBMAD_GLOBAL_H /* conditional debugging */ # if defined(DEBUG) && defined(NDEBUG) # error "cannot define both DEBUG and NDEBUG" # endif # if defined(DEBUG) # include # endif /* conditional features */ # if defined(OPT_SPEED) && defined(OPT_ACCURACY) # error "cannot optimize for both speed and accuracy" # endif # if defined(OPT_SPEED) && !defined(OPT_SSO) # define OPT_SSO # endif # if defined(HAVE_UNISTD_H) && defined(HAVE_WAITPID) && \ defined(HAVE_FCNTL) && defined(HAVE_PIPE) && defined(HAVE_FORK) # define USE_ASYNC # endif # if !defined(HAVE_ASSERT_H) # if defined(NDEBUG) # define assert(x) /* nothing */ # else # define assert(x) do { if (!(x)) abort(); } while (0) # endif # endif # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/huffman.c000066400000000000000000002167071466261456500252010ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: huffman.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include "huffman.h" /* * These are the Huffman code words for Layer III. * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3. * * These tables support decoding up to 4 Huffman code bits at a time. */ # if defined(__GNUC__) || \ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) # define PTR(offs, bits) { .ptr = { 0, bits, offs } } # define V(v, w, x, y, hlen) { .value = { 1, hlen, v, w, x, y } } # else # define PTR(offs, bits) { { 0, bits, offs } } # if defined(WORDS_BIGENDIAN) # define V(v, w, x, y, hlen) { { 1, hlen, (v << 11) | (w << 10) | \ (x << 9) | (y << 8) } } # else # define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \ (x << 2) | (y << 3) } } # endif # endif static union huffquad const hufftabA[] = { /* 0000 */ PTR(16, 2), /* 0001 */ PTR(20, 2), /* 0010 */ PTR(24, 1), /* 0011 */ PTR(26, 1), /* 0100 */ V(0, 0, 1, 0, 4), /* 0101 */ V(0, 0, 0, 1, 4), /* 0110 */ V(0, 1, 0, 0, 4), /* 0111 */ V(1, 0, 0, 0, 4), /* 1000 */ V(0, 0, 0, 0, 1), /* 1001 */ V(0, 0, 0, 0, 1), /* 1010 */ V(0, 0, 0, 0, 1), /* 1011 */ V(0, 0, 0, 0, 1), /* 1100 */ V(0, 0, 0, 0, 1), /* 1101 */ V(0, 0, 0, 0, 1), /* 1110 */ V(0, 0, 0, 0, 1), /* 1111 */ V(0, 0, 0, 0, 1), /* 0000 ... */ /* 00 */ V(1, 0, 1, 1, 2), /* 16 */ /* 01 */ V(1, 1, 1, 1, 2), /* 10 */ V(1, 1, 0, 1, 2), /* 11 */ V(1, 1, 1, 0, 2), /* 0001 ... */ /* 00 */ V(0, 1, 1, 1, 2), /* 20 */ /* 01 */ V(0, 1, 0, 1, 2), /* 10 */ V(1, 0, 0, 1, 1), /* 11 */ V(1, 0, 0, 1, 1), /* 0010 ... */ /* 0 */ V(0, 1, 1, 0, 1), /* 24 */ /* 1 */ V(0, 0, 1, 1, 1), /* 0011 ... */ /* 0 */ V(1, 0, 1, 0, 1), /* 26 */ /* 1 */ V(1, 1, 0, 0, 1) }; static union huffquad const hufftabB[] = { /* 0000 */ V(1, 1, 1, 1, 4), /* 0001 */ V(1, 1, 1, 0, 4), /* 0010 */ V(1, 1, 0, 1, 4), /* 0011 */ V(1, 1, 0, 0, 4), /* 0100 */ V(1, 0, 1, 1, 4), /* 0101 */ V(1, 0, 1, 0, 4), /* 0110 */ V(1, 0, 0, 1, 4), /* 0111 */ V(1, 0, 0, 0, 4), /* 1000 */ V(0, 1, 1, 1, 4), /* 1001 */ V(0, 1, 1, 0, 4), /* 1010 */ V(0, 1, 0, 1, 4), /* 1011 */ V(0, 1, 0, 0, 4), /* 1100 */ V(0, 0, 1, 1, 4), /* 1101 */ V(0, 0, 1, 0, 4), /* 1110 */ V(0, 0, 0, 1, 4), /* 1111 */ V(0, 0, 0, 0, 4) }; # undef V # undef PTR # if defined(__GNUC__) || \ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) # define PTR(offs, bits) { .ptr = { 0, bits, offs } } # define V(x, y, hlen) { .value = { 1, hlen, x, y } } # else # define PTR(offs, bits) { { 0, bits, offs } } # if defined(WORDS_BIGENDIAN) # define V(x, y, hlen) { { 1, hlen, (x << 8) | (y << 4) } } # else # define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } } # endif # endif static union huffpair const hufftab0[] = { /* */ V(0, 0, 0) }; static union huffpair const hufftab1[] = { /* 000 */ V(1, 1, 3), /* 001 */ V(0, 1, 3), /* 010 */ V(1, 0, 2), /* 011 */ V(1, 0, 2), /* 100 */ V(0, 0, 1), /* 101 */ V(0, 0, 1), /* 110 */ V(0, 0, 1), /* 111 */ V(0, 0, 1) }; static union huffpair const hufftab2[] = { /* 000 */ PTR(8, 3), /* 001 */ V(1, 1, 3), /* 010 */ V(0, 1, 3), /* 011 */ V(1, 0, 3), /* 100 */ V(0, 0, 1), /* 101 */ V(0, 0, 1), /* 110 */ V(0, 0, 1), /* 111 */ V(0, 0, 1), /* 000 ... */ /* 000 */ V(2, 2, 3), /* 8 */ /* 001 */ V(0, 2, 3), /* 010 */ V(1, 2, 2), /* 011 */ V(1, 2, 2), /* 100 */ V(2, 1, 2), /* 101 */ V(2, 1, 2), /* 110 */ V(2, 0, 2), /* 111 */ V(2, 0, 2) }; static union huffpair const hufftab3[] = { /* 000 */ PTR(8, 3), /* 001 */ V(1, 0, 3), /* 010 */ V(1, 1, 2), /* 011 */ V(1, 1, 2), /* 100 */ V(0, 1, 2), /* 101 */ V(0, 1, 2), /* 110 */ V(0, 0, 2), /* 111 */ V(0, 0, 2), /* 000 ... */ /* 000 */ V(2, 2, 3), /* 8 */ /* 001 */ V(0, 2, 3), /* 010 */ V(1, 2, 2), /* 011 */ V(1, 2, 2), /* 100 */ V(2, 1, 2), /* 101 */ V(2, 1, 2), /* 110 */ V(2, 0, 2), /* 111 */ V(2, 0, 2) }; static union huffpair const hufftab5[] = { /* 000 */ PTR(8, 4), /* 001 */ V(1, 1, 3), /* 010 */ V(0, 1, 3), /* 011 */ V(1, 0, 3), /* 100 */ V(0, 0, 1), /* 101 */ V(0, 0, 1), /* 110 */ V(0, 0, 1), /* 111 */ V(0, 0, 1), /* 000 ... */ /* 0000 */ PTR(24, 1), /* 8 */ /* 0001 */ V(3, 2, 4), /* 0010 */ V(3, 1, 3), /* 0011 */ V(3, 1, 3), /* 0100 */ V(1, 3, 4), /* 0101 */ V(0, 3, 4), /* 0110 */ V(3, 0, 4), /* 0111 */ V(2, 2, 4), /* 1000 */ V(1, 2, 3), /* 1001 */ V(1, 2, 3), /* 1010 */ V(2, 1, 3), /* 1011 */ V(2, 1, 3), /* 1100 */ V(0, 2, 3), /* 1101 */ V(0, 2, 3), /* 1110 */ V(2, 0, 3), /* 1111 */ V(2, 0, 3), /* 000 0000 ... */ /* 0 */ V(3, 3, 1), /* 24 */ /* 1 */ V(2, 3, 1) }; static union huffpair const hufftab6[] = { /* 0000 */ PTR(16, 3), /* 0001 */ PTR(24, 1), /* 0010 */ PTR(26, 1), /* 0011 */ V(1, 2, 4), /* 0100 */ V(2, 1, 4), /* 0101 */ V(2, 0, 4), /* 0110 */ V(0, 1, 3), /* 0111 */ V(0, 1, 3), /* 1000 */ V(1, 1, 2), /* 1001 */ V(1, 1, 2), /* 1010 */ V(1, 1, 2), /* 1011 */ V(1, 1, 2), /* 1100 */ V(1, 0, 3), /* 1101 */ V(1, 0, 3), /* 1110 */ V(0, 0, 3), /* 1111 */ V(0, 0, 3), /* 0000 ... */ /* 000 */ V(3, 3, 3), /* 16 */ /* 001 */ V(0, 3, 3), /* 010 */ V(2, 3, 2), /* 011 */ V(2, 3, 2), /* 100 */ V(3, 2, 2), /* 101 */ V(3, 2, 2), /* 110 */ V(3, 0, 2), /* 111 */ V(3, 0, 2), /* 0001 ... */ /* 0 */ V(1, 3, 1), /* 24 */ /* 1 */ V(3, 1, 1), /* 0010 ... */ /* 0 */ V(2, 2, 1), /* 26 */ /* 1 */ V(0, 2, 1) }; static union huffpair const hufftab7[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 2), /* 0011 */ V(1, 1, 4), /* 0100 */ V(0, 1, 3), /* 0101 */ V(0, 1, 3), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(52, 2), /* 16 */ /* 0001 */ PTR(56, 1), /* 0010 */ PTR(58, 1), /* 0011 */ V(1, 5, 4), /* 0100 */ V(5, 1, 4), /* 0101 */ PTR(60, 1), /* 0110 */ V(5, 0, 4), /* 0111 */ PTR(62, 1), /* 1000 */ V(2, 4, 4), /* 1001 */ V(4, 2, 4), /* 1010 */ V(1, 4, 3), /* 1011 */ V(1, 4, 3), /* 1100 */ V(4, 1, 3), /* 1101 */ V(4, 1, 3), /* 1110 */ V(4, 0, 3), /* 1111 */ V(4, 0, 3), /* 0001 ... */ /* 0000 */ V(0, 4, 4), /* 32 */ /* 0001 */ V(2, 3, 4), /* 0010 */ V(3, 2, 4), /* 0011 */ V(0, 3, 4), /* 0100 */ V(1, 3, 3), /* 0101 */ V(1, 3, 3), /* 0110 */ V(3, 1, 3), /* 0111 */ V(3, 1, 3), /* 1000 */ V(3, 0, 3), /* 1001 */ V(3, 0, 3), /* 1010 */ V(2, 2, 3), /* 1011 */ V(2, 2, 3), /* 1100 */ V(1, 2, 2), /* 1101 */ V(1, 2, 2), /* 1110 */ V(1, 2, 2), /* 1111 */ V(1, 2, 2), /* 0010 ... */ /* 00 */ V(2, 1, 1), /* 48 */ /* 01 */ V(2, 1, 1), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 00 */ V(5, 5, 2), /* 52 */ /* 01 */ V(4, 5, 2), /* 10 */ V(5, 4, 2), /* 11 */ V(5, 3, 2), /* 0000 0001 ... */ /* 0 */ V(3, 5, 1), /* 56 */ /* 1 */ V(4, 4, 1), /* 0000 0010 ... */ /* 0 */ V(2, 5, 1), /* 58 */ /* 1 */ V(5, 2, 1), /* 0000 0101 ... */ /* 0 */ V(0, 5, 1), /* 60 */ /* 1 */ V(3, 4, 1), /* 0000 0111 ... */ /* 0 */ V(4, 3, 1), /* 62 */ /* 1 */ V(3, 3, 1) }; # if 0 /* this version saves 8 entries (16 bytes) at the expense of an extra lookup in 4 out of 36 cases */ static union huffpair const hufftab8[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 2), /* 0010 */ V(1, 2, 4), /* 0011 */ V(2, 1, 4), /* 0100 */ V(1, 1, 2), /* 0101 */ V(1, 1, 2), /* 0110 */ V(1, 1, 2), /* 0111 */ V(1, 1, 2), /* 1000 */ V(0, 1, 3), /* 1001 */ V(0, 1, 3), /* 1010 */ V(1, 0, 3), /* 1011 */ V(1, 0, 3), /* 1100 */ V(0, 0, 2), /* 1101 */ V(0, 0, 2), /* 1110 */ V(0, 0, 2), /* 1111 */ V(0, 0, 2), /* 0000 ... */ /* 0000 */ PTR(36, 3), /* 16 */ /* 0001 */ PTR(44, 2), /* 0010 */ PTR(48, 1), /* 0011 */ V(1, 5, 4), /* 0100 */ V(5, 1, 4), /* 0101 */ PTR(50, 1), /* 0110 */ PTR(52, 1), /* 0111 */ V(2, 4, 4), /* 1000 */ V(4, 2, 4), /* 1001 */ V(1, 4, 4), /* 1010 */ V(4, 1, 3), /* 1011 */ V(4, 1, 3), /* 1100 */ V(0, 4, 4), /* 1101 */ V(4, 0, 4), /* 1110 */ V(2, 3, 4), /* 1111 */ V(3, 2, 4), /* 0001 ... */ /* 00 */ PTR(54, 2), /* 32 */ /* 01 */ V(2, 2, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(5, 5, 3), /* 36 */ /* 001 */ V(5, 4, 3), /* 010 */ V(4, 5, 2), /* 011 */ V(4, 5, 2), /* 100 */ V(5, 3, 1), /* 101 */ V(5, 3, 1), /* 110 */ V(5, 3, 1), /* 111 */ V(5, 3, 1), /* 0000 0001 ... */ /* 00 */ V(3, 5, 2), /* 44 */ /* 01 */ V(4, 4, 2), /* 10 */ V(2, 5, 1), /* 11 */ V(2, 5, 1), /* 0000 0010 ... */ /* 0 */ V(5, 2, 1), /* 48 */ /* 1 */ V(0, 5, 1), /* 0000 0101 ... */ /* 0 */ V(3, 4, 1), /* 50 */ /* 1 */ V(4, 3, 1), /* 0000 0110 ... */ /* 0 */ V(5, 0, 1), /* 52 */ /* 1 */ V(3, 3, 1), /* 0001 00 ... */ /* 00 */ V(1, 3, 2), /* 54 */ /* 01 */ V(3, 1, 2), /* 10 */ V(0, 3, 2), /* 11 */ V(3, 0, 2), }; # else static union huffpair const hufftab8[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ V(1, 2, 4), /* 0011 */ V(2, 1, 4), /* 0100 */ V(1, 1, 2), /* 0101 */ V(1, 1, 2), /* 0110 */ V(1, 1, 2), /* 0111 */ V(1, 1, 2), /* 1000 */ V(0, 1, 3), /* 1001 */ V(0, 1, 3), /* 1010 */ V(1, 0, 3), /* 1011 */ V(1, 0, 3), /* 1100 */ V(0, 0, 2), /* 1101 */ V(0, 0, 2), /* 1110 */ V(0, 0, 2), /* 1111 */ V(0, 0, 2), /* 0000 ... */ /* 0000 */ PTR(48, 3), /* 16 */ /* 0001 */ PTR(56, 2), /* 0010 */ PTR(60, 1), /* 0011 */ V(1, 5, 4), /* 0100 */ V(5, 1, 4), /* 0101 */ PTR(62, 1), /* 0110 */ PTR(64, 1), /* 0111 */ V(2, 4, 4), /* 1000 */ V(4, 2, 4), /* 1001 */ V(1, 4, 4), /* 1010 */ V(4, 1, 3), /* 1011 */ V(4, 1, 3), /* 1100 */ V(0, 4, 4), /* 1101 */ V(4, 0, 4), /* 1110 */ V(2, 3, 4), /* 1111 */ V(3, 2, 4), /* 0001 ... */ /* 0000 */ V(1, 3, 4), /* 32 */ /* 0001 */ V(3, 1, 4), /* 0010 */ V(0, 3, 4), /* 0011 */ V(3, 0, 4), /* 0100 */ V(2, 2, 2), /* 0101 */ V(2, 2, 2), /* 0110 */ V(2, 2, 2), /* 0111 */ V(2, 2, 2), /* 1000 */ V(0, 2, 2), /* 1001 */ V(0, 2, 2), /* 1010 */ V(0, 2, 2), /* 1011 */ V(0, 2, 2), /* 1100 */ V(2, 0, 2), /* 1101 */ V(2, 0, 2), /* 1110 */ V(2, 0, 2), /* 1111 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(5, 5, 3), /* 48 */ /* 001 */ V(5, 4, 3), /* 010 */ V(4, 5, 2), /* 011 */ V(4, 5, 2), /* 100 */ V(5, 3, 1), /* 101 */ V(5, 3, 1), /* 110 */ V(5, 3, 1), /* 111 */ V(5, 3, 1), /* 0000 0001 ... */ /* 00 */ V(3, 5, 2), /* 56 */ /* 01 */ V(4, 4, 2), /* 10 */ V(2, 5, 1), /* 11 */ V(2, 5, 1), /* 0000 0010 ... */ /* 0 */ V(5, 2, 1), /* 60 */ /* 1 */ V(0, 5, 1), /* 0000 0101 ... */ /* 0 */ V(3, 4, 1), /* 62 */ /* 1 */ V(4, 3, 1), /* 0000 0110 ... */ /* 0 */ V(5, 0, 1), /* 64 */ /* 1 */ V(3, 3, 1) }; # endif static union huffpair const hufftab9[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 3), /* 0010 */ PTR(40, 2), /* 0011 */ PTR(44, 2), /* 0100 */ PTR(48, 1), /* 0101 */ V(1, 2, 4), /* 0110 */ V(2, 1, 4), /* 0111 */ V(2, 0, 4), /* 1000 */ V(1, 1, 3), /* 1001 */ V(1, 1, 3), /* 1010 */ V(0, 1, 3), /* 1011 */ V(0, 1, 3), /* 1100 */ V(1, 0, 3), /* 1101 */ V(1, 0, 3), /* 1110 */ V(0, 0, 3), /* 1111 */ V(0, 0, 3), /* 0000 ... */ /* 0000 */ PTR(50, 1), /* 16 */ /* 0001 */ V(3, 5, 4), /* 0010 */ V(5, 3, 4), /* 0011 */ PTR(52, 1), /* 0100 */ V(4, 4, 4), /* 0101 */ V(2, 5, 4), /* 0110 */ V(5, 2, 4), /* 0111 */ V(1, 5, 4), /* 1000 */ V(5, 1, 3), /* 1001 */ V(5, 1, 3), /* 1010 */ V(3, 4, 3), /* 1011 */ V(3, 4, 3), /* 1100 */ V(4, 3, 3), /* 1101 */ V(4, 3, 3), /* 1110 */ V(5, 0, 4), /* 1111 */ V(0, 4, 4), /* 0001 ... */ /* 000 */ V(2, 4, 3), /* 32 */ /* 001 */ V(4, 2, 3), /* 010 */ V(3, 3, 3), /* 011 */ V(4, 0, 3), /* 100 */ V(1, 4, 2), /* 101 */ V(1, 4, 2), /* 110 */ V(4, 1, 2), /* 111 */ V(4, 1, 2), /* 0010 ... */ /* 00 */ V(2, 3, 2), /* 40 */ /* 01 */ V(3, 2, 2), /* 10 */ V(1, 3, 1), /* 11 */ V(1, 3, 1), /* 0011 ... */ /* 00 */ V(3, 1, 1), /* 44 */ /* 01 */ V(3, 1, 1), /* 10 */ V(0, 3, 2), /* 11 */ V(3, 0, 2), /* 0100 ... */ /* 0 */ V(2, 2, 1), /* 48 */ /* 1 */ V(0, 2, 1), /* 0000 0000 ... */ /* 0 */ V(5, 5, 1), /* 50 */ /* 1 */ V(4, 5, 1), /* 0000 0011 ... */ /* 0 */ V(5, 4, 1), /* 52 */ /* 1 */ V(0, 5, 1) }; static union huffpair const hufftab10[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 2), /* 0011 */ V(1, 1, 4), /* 0100 */ V(0, 1, 3), /* 0101 */ V(0, 1, 3), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(52, 3), /* 16 */ /* 0001 */ PTR(60, 2), /* 0010 */ PTR(64, 3), /* 0011 */ PTR(72, 1), /* 0100 */ PTR(74, 2), /* 0101 */ PTR(78, 2), /* 0110 */ PTR(82, 2), /* 0111 */ V(1, 7, 4), /* 1000 */ V(7, 1, 4), /* 1001 */ PTR(86, 1), /* 1010 */ PTR(88, 2), /* 1011 */ PTR(92, 2), /* 1100 */ V(1, 6, 4), /* 1101 */ V(6, 1, 4), /* 1110 */ V(6, 0, 4), /* 1111 */ PTR(96, 1), /* 0001 ... */ /* 0000 */ PTR(98, 1), /* 32 */ /* 0001 */ PTR(100, 1), /* 0010 */ V(1, 4, 4), /* 0011 */ V(4, 1, 4), /* 0100 */ V(4, 0, 4), /* 0101 */ V(2, 3, 4), /* 0110 */ V(3, 2, 4), /* 0111 */ V(0, 3, 4), /* 1000 */ V(1, 3, 3), /* 1001 */ V(1, 3, 3), /* 1010 */ V(3, 1, 3), /* 1011 */ V(3, 1, 3), /* 1100 */ V(3, 0, 3), /* 1101 */ V(3, 0, 3), /* 1110 */ V(2, 2, 3), /* 1111 */ V(2, 2, 3), /* 0010 ... */ /* 00 */ V(1, 2, 2), /* 48 */ /* 01 */ V(2, 1, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(7, 7, 3), /* 52 */ /* 001 */ V(6, 7, 3), /* 010 */ V(7, 6, 3), /* 011 */ V(5, 7, 3), /* 100 */ V(7, 5, 3), /* 101 */ V(6, 6, 3), /* 110 */ V(4, 7, 2), /* 111 */ V(4, 7, 2), /* 0000 0001 ... */ /* 00 */ V(7, 4, 2), /* 60 */ /* 01 */ V(5, 6, 2), /* 10 */ V(6, 5, 2), /* 11 */ V(3, 7, 2), /* 0000 0010 ... */ /* 000 */ V(7, 3, 2), /* 64 */ /* 001 */ V(7, 3, 2), /* 010 */ V(4, 6, 2), /* 011 */ V(4, 6, 2), /* 100 */ V(5, 5, 3), /* 101 */ V(5, 4, 3), /* 110 */ V(6, 3, 2), /* 111 */ V(6, 3, 2), /* 0000 0011 ... */ /* 0 */ V(2, 7, 1), /* 72 */ /* 1 */ V(7, 2, 1), /* 0000 0100 ... */ /* 00 */ V(6, 4, 2), /* 74 */ /* 01 */ V(0, 7, 2), /* 10 */ V(7, 0, 1), /* 11 */ V(7, 0, 1), /* 0000 0101 ... */ /* 00 */ V(6, 2, 1), /* 78 */ /* 01 */ V(6, 2, 1), /* 10 */ V(4, 5, 2), /* 11 */ V(3, 5, 2), /* 0000 0110 ... */ /* 00 */ V(0, 6, 1), /* 82 */ /* 01 */ V(0, 6, 1), /* 10 */ V(5, 3, 2), /* 11 */ V(4, 4, 2), /* 0000 1001 ... */ /* 0 */ V(3, 6, 1), /* 86 */ /* 1 */ V(2, 6, 1), /* 0000 1010 ... */ /* 00 */ V(2, 5, 2), /* 88 */ /* 01 */ V(5, 2, 2), /* 10 */ V(1, 5, 1), /* 11 */ V(1, 5, 1), /* 0000 1011 ... */ /* 00 */ V(5, 1, 1), /* 92 */ /* 01 */ V(5, 1, 1), /* 10 */ V(3, 4, 2), /* 11 */ V(4, 3, 2), /* 0000 1111 ... */ /* 0 */ V(0, 5, 1), /* 96 */ /* 1 */ V(5, 0, 1), /* 0001 0000 ... */ /* 0 */ V(2, 4, 1), /* 98 */ /* 1 */ V(4, 2, 1), /* 0001 0001 ... */ /* 0 */ V(3, 3, 1), /* 100 */ /* 1 */ V(0, 4, 1) }; static union huffpair const hufftab11[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 3), /* 0100 */ V(1, 2, 4), /* 0101 */ PTR(72, 1), /* 0110 */ V(1, 1, 3), /* 0111 */ V(1, 1, 3), /* 1000 */ V(0, 1, 3), /* 1001 */ V(0, 1, 3), /* 1010 */ V(1, 0, 3), /* 1011 */ V(1, 0, 3), /* 1100 */ V(0, 0, 2), /* 1101 */ V(0, 0, 2), /* 1110 */ V(0, 0, 2), /* 1111 */ V(0, 0, 2), /* 0000 ... */ /* 0000 */ PTR(74, 2), /* 16 */ /* 0001 */ PTR(78, 3), /* 0010 */ PTR(86, 2), /* 0011 */ PTR(90, 1), /* 0100 */ PTR(92, 2), /* 0101 */ V(2, 7, 4), /* 0110 */ V(7, 2, 4), /* 0111 */ PTR(96, 1), /* 1000 */ V(7, 1, 3), /* 1001 */ V(7, 1, 3), /* 1010 */ V(1, 7, 4), /* 1011 */ V(7, 0, 4), /* 1100 */ V(3, 6, 4), /* 1101 */ V(6, 3, 4), /* 1110 */ V(6, 0, 4), /* 1111 */ PTR(98, 1), /* 0001 ... */ /* 0000 */ PTR(100, 1), /* 32 */ /* 0001 */ V(1, 5, 4), /* 0010 */ V(6, 2, 3), /* 0011 */ V(6, 2, 3), /* 0100 */ V(2, 6, 4), /* 0101 */ V(0, 6, 4), /* 0110 */ V(1, 6, 3), /* 0111 */ V(1, 6, 3), /* 1000 */ V(6, 1, 3), /* 1001 */ V(6, 1, 3), /* 1010 */ V(5, 1, 4), /* 1011 */ V(3, 4, 4), /* 1100 */ V(5, 0, 4), /* 1101 */ PTR(102, 1), /* 1110 */ V(2, 4, 4), /* 1111 */ V(4, 2, 4), /* 0010 ... */ /* 0000 */ V(1, 4, 4), /* 48 */ /* 0001 */ V(4, 1, 4), /* 0010 */ V(0, 4, 4), /* 0011 */ V(4, 0, 4), /* 0100 */ V(2, 3, 3), /* 0101 */ V(2, 3, 3), /* 0110 */ V(3, 2, 3), /* 0111 */ V(3, 2, 3), /* 1000 */ V(1, 3, 2), /* 1001 */ V(1, 3, 2), /* 1010 */ V(1, 3, 2), /* 1011 */ V(1, 3, 2), /* 1100 */ V(3, 1, 2), /* 1101 */ V(3, 1, 2), /* 1110 */ V(3, 1, 2), /* 1111 */ V(3, 1, 2), /* 0011 ... */ /* 000 */ V(0, 3, 3), /* 64 */ /* 001 */ V(3, 0, 3), /* 010 */ V(2, 2, 2), /* 011 */ V(2, 2, 2), /* 100 */ V(2, 1, 1), /* 101 */ V(2, 1, 1), /* 110 */ V(2, 1, 1), /* 111 */ V(2, 1, 1), /* 0101 ... */ /* 0 */ V(0, 2, 1), /* 72 */ /* 1 */ V(2, 0, 1), /* 0000 0000 ... */ /* 00 */ V(7, 7, 2), /* 74 */ /* 01 */ V(6, 7, 2), /* 10 */ V(7, 6, 2), /* 11 */ V(7, 5, 2), /* 0000 0001 ... */ /* 000 */ V(6, 6, 2), /* 78 */ /* 001 */ V(6, 6, 2), /* 010 */ V(4, 7, 2), /* 011 */ V(4, 7, 2), /* 100 */ V(7, 4, 2), /* 101 */ V(7, 4, 2), /* 110 */ V(5, 7, 3), /* 111 */ V(5, 5, 3), /* 0000 0010 ... */ /* 00 */ V(5, 6, 2), /* 86 */ /* 01 */ V(6, 5, 2), /* 10 */ V(3, 7, 1), /* 11 */ V(3, 7, 1), /* 0000 0011 ... */ /* 0 */ V(7, 3, 1), /* 90 */ /* 1 */ V(4, 6, 1), /* 0000 0100 ... */ /* 00 */ V(4, 5, 2), /* 92 */ /* 01 */ V(5, 4, 2), /* 10 */ V(3, 5, 2), /* 11 */ V(5, 3, 2), /* 0000 0111 ... */ /* 0 */ V(6, 4, 1), /* 96 */ /* 1 */ V(0, 7, 1), /* 0000 1111 ... */ /* 0 */ V(4, 4, 1), /* 98 */ /* 1 */ V(2, 5, 1), /* 0001 0000 ... */ /* 0 */ V(5, 2, 1), /* 100 */ /* 1 */ V(0, 5, 1), /* 0001 1101 ... */ /* 0 */ V(4, 3, 1), /* 102 */ /* 1 */ V(3, 3, 1) }; static union huffpair const hufftab12[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 2), /* 0100 */ PTR(68, 3), /* 0101 */ PTR(76, 1), /* 0110 */ V(1, 2, 4), /* 0111 */ V(2, 1, 4), /* 1000 */ PTR(78, 1), /* 1001 */ V(0, 0, 4), /* 1010 */ V(1, 1, 3), /* 1011 */ V(1, 1, 3), /* 1100 */ V(0, 1, 3), /* 1101 */ V(0, 1, 3), /* 1110 */ V(1, 0, 3), /* 1111 */ V(1, 0, 3), /* 0000 ... */ /* 0000 */ PTR(80, 2), /* 16 */ /* 0001 */ PTR(84, 1), /* 0010 */ PTR(86, 1), /* 0011 */ PTR(88, 1), /* 0100 */ V(5, 6, 4), /* 0101 */ V(3, 7, 4), /* 0110 */ PTR(90, 1), /* 0111 */ V(2, 7, 4), /* 1000 */ V(7, 2, 4), /* 1001 */ V(4, 6, 4), /* 1010 */ V(6, 4, 4), /* 1011 */ V(1, 7, 4), /* 1100 */ V(7, 1, 4), /* 1101 */ PTR(92, 1), /* 1110 */ V(3, 6, 4), /* 1111 */ V(6, 3, 4), /* 0001 ... */ /* 0000 */ V(4, 5, 4), /* 32 */ /* 0001 */ V(5, 4, 4), /* 0010 */ V(4, 4, 4), /* 0011 */ PTR(94, 1), /* 0100 */ V(2, 6, 3), /* 0101 */ V(2, 6, 3), /* 0110 */ V(6, 2, 3), /* 0111 */ V(6, 2, 3), /* 1000 */ V(6, 1, 3), /* 1001 */ V(6, 1, 3), /* 1010 */ V(1, 6, 4), /* 1011 */ V(6, 0, 4), /* 1100 */ V(3, 5, 4), /* 1101 */ V(5, 3, 4), /* 1110 */ V(2, 5, 4), /* 1111 */ V(5, 2, 4), /* 0010 ... */ /* 0000 */ V(1, 5, 3), /* 48 */ /* 0001 */ V(1, 5, 3), /* 0010 */ V(5, 1, 3), /* 0011 */ V(5, 1, 3), /* 0100 */ V(3, 4, 3), /* 0101 */ V(3, 4, 3), /* 0110 */ V(4, 3, 3), /* 0111 */ V(4, 3, 3), /* 1000 */ V(5, 0, 4), /* 1001 */ V(0, 4, 4), /* 1010 */ V(2, 4, 3), /* 1011 */ V(2, 4, 3), /* 1100 */ V(4, 2, 3), /* 1101 */ V(4, 2, 3), /* 1110 */ V(1, 4, 3), /* 1111 */ V(1, 4, 3), /* 0011 ... */ /* 00 */ V(3, 3, 2), /* 64 */ /* 01 */ V(4, 1, 2), /* 10 */ V(2, 3, 2), /* 11 */ V(3, 2, 2), /* 0100 ... */ /* 000 */ V(4, 0, 3), /* 68 */ /* 001 */ V(0, 3, 3), /* 010 */ V(3, 0, 2), /* 011 */ V(3, 0, 2), /* 100 */ V(1, 3, 1), /* 101 */ V(1, 3, 1), /* 110 */ V(1, 3, 1), /* 111 */ V(1, 3, 1), /* 0101 ... */ /* 0 */ V(3, 1, 1), /* 76 */ /* 1 */ V(2, 2, 1), /* 1000 ... */ /* 0 */ V(0, 2, 1), /* 78 */ /* 1 */ V(2, 0, 1), /* 0000 0000 ... */ /* 00 */ V(7, 7, 2), /* 80 */ /* 01 */ V(6, 7, 2), /* 10 */ V(7, 6, 1), /* 11 */ V(7, 6, 1), /* 0000 0001 ... */ /* 0 */ V(5, 7, 1), /* 84 */ /* 1 */ V(7, 5, 1), /* 0000 0010 ... */ /* 0 */ V(6, 6, 1), /* 86 */ /* 1 */ V(4, 7, 1), /* 0000 0011 ... */ /* 0 */ V(7, 4, 1), /* 88 */ /* 1 */ V(6, 5, 1), /* 0000 0110 ... */ /* 0 */ V(7, 3, 1), /* 90 */ /* 1 */ V(5, 5, 1), /* 0000 1101 ... */ /* 0 */ V(0, 7, 1), /* 92 */ /* 1 */ V(7, 0, 1), /* 0001 0011 ... */ /* 0 */ V(0, 6, 1), /* 94 */ /* 1 */ V(0, 5, 1) }; static union huffpair const hufftab13[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 2), /* 0100 */ V(1, 1, 4), /* 0101 */ V(0, 1, 4), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(68, 4), /* 16 */ /* 0001 */ PTR(84, 4), /* 0010 */ PTR(100, 4), /* 0011 */ PTR(116, 4), /* 0100 */ PTR(132, 4), /* 0101 */ PTR(148, 4), /* 0110 */ PTR(164, 3), /* 0111 */ PTR(172, 3), /* 1000 */ PTR(180, 3), /* 1001 */ PTR(188, 3), /* 1010 */ PTR(196, 3), /* 1011 */ PTR(204, 3), /* 1100 */ PTR(212, 1), /* 1101 */ PTR(214, 2), /* 1110 */ PTR(218, 3), /* 1111 */ PTR(226, 1), /* 0001 ... */ /* 0000 */ PTR(228, 2), /* 32 */ /* 0001 */ PTR(232, 2), /* 0010 */ PTR(236, 2), /* 0011 */ PTR(240, 2), /* 0100 */ V(8, 1, 4), /* 0101 */ PTR(244, 1), /* 0110 */ PTR(246, 1), /* 0111 */ PTR(248, 1), /* 1000 */ PTR(250, 2), /* 1001 */ PTR(254, 1), /* 1010 */ V(1, 5, 4), /* 1011 */ V(5, 1, 4), /* 1100 */ PTR(256, 1), /* 1101 */ PTR(258, 1), /* 1110 */ PTR(260, 1), /* 1111 */ V(1, 4, 4), /* 0010 ... */ /* 0000 */ V(4, 1, 3), /* 48 */ /* 0001 */ V(4, 1, 3), /* 0010 */ V(0, 4, 4), /* 0011 */ V(4, 0, 4), /* 0100 */ V(2, 3, 4), /* 0101 */ V(3, 2, 4), /* 0110 */ V(1, 3, 3), /* 0111 */ V(1, 3, 3), /* 1000 */ V(3, 1, 3), /* 1001 */ V(3, 1, 3), /* 1010 */ V(0, 3, 3), /* 1011 */ V(0, 3, 3), /* 1100 */ V(3, 0, 3), /* 1101 */ V(3, 0, 3), /* 1110 */ V(2, 2, 3), /* 1111 */ V(2, 2, 3), /* 0011 ... */ /* 00 */ V(1, 2, 2), /* 64 */ /* 01 */ V(2, 1, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 0000 */ PTR(262, 4), /* 68 */ /* 0001 */ PTR(278, 4), /* 0010 */ PTR(294, 4), /* 0011 */ PTR(310, 3), /* 0100 */ PTR(318, 2), /* 0101 */ PTR(322, 2), /* 0110 */ PTR(326, 3), /* 0111 */ PTR(334, 2), /* 1000 */ PTR(338, 1), /* 1001 */ PTR(340, 2), /* 1010 */ PTR(344, 2), /* 1011 */ PTR(348, 2), /* 1100 */ PTR(352, 2), /* 1101 */ PTR(356, 2), /* 1110 */ V(1, 15, 4), /* 1111 */ V(15, 1, 4), /* 0000 0001 ... */ /* 0000 */ V(15, 0, 4), /* 84 */ /* 0001 */ PTR(360, 1), /* 0010 */ PTR(362, 1), /* 0011 */ PTR(364, 1), /* 0100 */ V(14, 2, 4), /* 0101 */ PTR(366, 1), /* 0110 */ V(1, 14, 4), /* 0111 */ V(14, 1, 4), /* 1000 */ PTR(368, 1), /* 1001 */ PTR(370, 1), /* 1010 */ PTR(372, 1), /* 1011 */ PTR(374, 1), /* 1100 */ PTR(376, 1), /* 1101 */ PTR(378, 1), /* 1110 */ V(12, 6, 4), /* 1111 */ V(3, 13, 4), /* 0000 0010 ... */ /* 0000 */ PTR(380, 1), /* 100 */ /* 0001 */ V(2, 13, 4), /* 0010 */ V(13, 2, 4), /* 0011 */ V(1, 13, 4), /* 0100 */ V(11, 7, 4), /* 0101 */ PTR(382, 1), /* 0110 */ PTR(384, 1), /* 0111 */ V(12, 3, 4), /* 1000 */ PTR(386, 1), /* 1001 */ V(4, 11, 4), /* 1010 */ V(13, 1, 3), /* 1011 */ V(13, 1, 3), /* 1100 */ V(0, 13, 4), /* 1101 */ V(13, 0, 4), /* 1110 */ V(8, 10, 4), /* 1111 */ V(10, 8, 4), /* 0000 0011 ... */ /* 0000 */ V(4, 12, 4), /* 116 */ /* 0001 */ V(12, 4, 4), /* 0010 */ V(6, 11, 4), /* 0011 */ V(11, 6, 4), /* 0100 */ V(3, 12, 3), /* 0101 */ V(3, 12, 3), /* 0110 */ V(2, 12, 3), /* 0111 */ V(2, 12, 3), /* 1000 */ V(12, 2, 3), /* 1001 */ V(12, 2, 3), /* 1010 */ V(5, 11, 3), /* 1011 */ V(5, 11, 3), /* 1100 */ V(11, 5, 4), /* 1101 */ V(8, 9, 4), /* 1110 */ V(1, 12, 3), /* 1111 */ V(1, 12, 3), /* 0000 0100 ... */ /* 0000 */ V(12, 1, 3), /* 132 */ /* 0001 */ V(12, 1, 3), /* 0010 */ V(9, 8, 4), /* 0011 */ V(0, 12, 4), /* 0100 */ V(12, 0, 3), /* 0101 */ V(12, 0, 3), /* 0110 */ V(11, 4, 4), /* 0111 */ V(6, 10, 4), /* 1000 */ V(10, 6, 4), /* 1001 */ V(7, 9, 4), /* 1010 */ V(3, 11, 3), /* 1011 */ V(3, 11, 3), /* 1100 */ V(11, 3, 3), /* 1101 */ V(11, 3, 3), /* 1110 */ V(8, 8, 4), /* 1111 */ V(5, 10, 4), /* 0000 0101 ... */ /* 0000 */ V(2, 11, 3), /* 148 */ /* 0001 */ V(2, 11, 3), /* 0010 */ V(10, 5, 4), /* 0011 */ V(6, 9, 4), /* 0100 */ V(10, 4, 3), /* 0101 */ V(10, 4, 3), /* 0110 */ V(7, 8, 4), /* 0111 */ V(8, 7, 4), /* 1000 */ V(9, 4, 3), /* 1001 */ V(9, 4, 3), /* 1010 */ V(7, 7, 4), /* 1011 */ V(7, 6, 4), /* 1100 */ V(11, 2, 2), /* 1101 */ V(11, 2, 2), /* 1110 */ V(11, 2, 2), /* 1111 */ V(11, 2, 2), /* 0000 0110 ... */ /* 000 */ V(1, 11, 2), /* 164 */ /* 001 */ V(1, 11, 2), /* 010 */ V(11, 1, 2), /* 011 */ V(11, 1, 2), /* 100 */ V(0, 11, 3), /* 101 */ V(11, 0, 3), /* 110 */ V(9, 6, 3), /* 111 */ V(4, 10, 3), /* 0000 0111 ... */ /* 000 */ V(3, 10, 3), /* 172 */ /* 001 */ V(10, 3, 3), /* 010 */ V(5, 9, 3), /* 011 */ V(9, 5, 3), /* 100 */ V(2, 10, 2), /* 101 */ V(2, 10, 2), /* 110 */ V(10, 2, 2), /* 111 */ V(10, 2, 2), /* 0000 1000 ... */ /* 000 */ V(1, 10, 2), /* 180 */ /* 001 */ V(1, 10, 2), /* 010 */ V(10, 1, 2), /* 011 */ V(10, 1, 2), /* 100 */ V(0, 10, 3), /* 101 */ V(6, 8, 3), /* 110 */ V(10, 0, 2), /* 111 */ V(10, 0, 2), /* 0000 1001 ... */ /* 000 */ V(8, 6, 3), /* 188 */ /* 001 */ V(4, 9, 3), /* 010 */ V(9, 3, 2), /* 011 */ V(9, 3, 2), /* 100 */ V(3, 9, 3), /* 101 */ V(5, 8, 3), /* 110 */ V(8, 5, 3), /* 111 */ V(6, 7, 3), /* 0000 1010 ... */ /* 000 */ V(2, 9, 2), /* 196 */ /* 001 */ V(2, 9, 2), /* 010 */ V(9, 2, 2), /* 011 */ V(9, 2, 2), /* 100 */ V(5, 7, 3), /* 101 */ V(7, 5, 3), /* 110 */ V(3, 8, 2), /* 111 */ V(3, 8, 2), /* 0000 1011 ... */ /* 000 */ V(8, 3, 2), /* 204 */ /* 001 */ V(8, 3, 2), /* 010 */ V(6, 6, 3), /* 011 */ V(4, 7, 3), /* 100 */ V(7, 4, 3), /* 101 */ V(5, 6, 3), /* 110 */ V(6, 5, 3), /* 111 */ V(7, 3, 3), /* 0000 1100 ... */ /* 0 */ V(1, 9, 1), /* 212 */ /* 1 */ V(9, 1, 1), /* 0000 1101 ... */ /* 00 */ V(0, 9, 2), /* 214 */ /* 01 */ V(9, 0, 2), /* 10 */ V(4, 8, 2), /* 11 */ V(8, 4, 2), /* 0000 1110 ... */ /* 000 */ V(7, 2, 2), /* 218 */ /* 001 */ V(7, 2, 2), /* 010 */ V(4, 6, 3), /* 011 */ V(6, 4, 3), /* 100 */ V(2, 8, 1), /* 101 */ V(2, 8, 1), /* 110 */ V(2, 8, 1), /* 111 */ V(2, 8, 1), /* 0000 1111 ... */ /* 0 */ V(8, 2, 1), /* 226 */ /* 1 */ V(1, 8, 1), /* 0001 0000 ... */ /* 00 */ V(3, 7, 2), /* 228 */ /* 01 */ V(2, 7, 2), /* 10 */ V(1, 7, 1), /* 11 */ V(1, 7, 1), /* 0001 0001 ... */ /* 00 */ V(7, 1, 1), /* 232 */ /* 01 */ V(7, 1, 1), /* 10 */ V(5, 5, 2), /* 11 */ V(0, 7, 2), /* 0001 0010 ... */ /* 00 */ V(7, 0, 2), /* 236 */ /* 01 */ V(3, 6, 2), /* 10 */ V(6, 3, 2), /* 11 */ V(4, 5, 2), /* 0001 0011 ... */ /* 00 */ V(5, 4, 2), /* 240 */ /* 01 */ V(2, 6, 2), /* 10 */ V(6, 2, 2), /* 11 */ V(3, 5, 2), /* 0001 0101 ... */ /* 0 */ V(0, 8, 1), /* 244 */ /* 1 */ V(8, 0, 1), /* 0001 0110 ... */ /* 0 */ V(1, 6, 1), /* 246 */ /* 1 */ V(6, 1, 1), /* 0001 0111 ... */ /* 0 */ V(0, 6, 1), /* 248 */ /* 1 */ V(6, 0, 1), /* 0001 1000 ... */ /* 00 */ V(5, 3, 2), /* 250 */ /* 01 */ V(4, 4, 2), /* 10 */ V(2, 5, 1), /* 11 */ V(2, 5, 1), /* 0001 1001 ... */ /* 0 */ V(5, 2, 1), /* 254 */ /* 1 */ V(0, 5, 1), /* 0001 1100 ... */ /* 0 */ V(3, 4, 1), /* 256 */ /* 1 */ V(4, 3, 1), /* 0001 1101 ... */ /* 0 */ V(5, 0, 1), /* 258 */ /* 1 */ V(2, 4, 1), /* 0001 1110 ... */ /* 0 */ V(4, 2, 1), /* 260 */ /* 1 */ V(3, 3, 1), /* 0000 0000 0000 ... */ /* 0000 */ PTR(388, 3), /* 262 */ /* 0001 */ V(15, 15, 4), /* 0010 */ V(14, 15, 4), /* 0011 */ V(13, 15, 4), /* 0100 */ V(14, 14, 4), /* 0101 */ V(12, 15, 4), /* 0110 */ V(13, 14, 4), /* 0111 */ V(11, 15, 4), /* 1000 */ V(15, 11, 4), /* 1001 */ V(12, 14, 4), /* 1010 */ V(13, 12, 4), /* 1011 */ PTR(396, 1), /* 1100 */ V(14, 12, 3), /* 1101 */ V(14, 12, 3), /* 1110 */ V(13, 13, 3), /* 1111 */ V(13, 13, 3), /* 0000 0000 0001 ... */ /* 0000 */ V(15, 10, 4), /* 278 */ /* 0001 */ V(12, 13, 4), /* 0010 */ V(11, 14, 3), /* 0011 */ V(11, 14, 3), /* 0100 */ V(14, 11, 3), /* 0101 */ V(14, 11, 3), /* 0110 */ V(9, 15, 3), /* 0111 */ V(9, 15, 3), /* 1000 */ V(15, 9, 3), /* 1001 */ V(15, 9, 3), /* 1010 */ V(14, 10, 3), /* 1011 */ V(14, 10, 3), /* 1100 */ V(11, 13, 3), /* 1101 */ V(11, 13, 3), /* 1110 */ V(13, 11, 3), /* 1111 */ V(13, 11, 3), /* 0000 0000 0010 ... */ /* 0000 */ V(8, 15, 3), /* 294 */ /* 0001 */ V(8, 15, 3), /* 0010 */ V(15, 8, 3), /* 0011 */ V(15, 8, 3), /* 0100 */ V(12, 12, 3), /* 0101 */ V(12, 12, 3), /* 0110 */ V(10, 14, 4), /* 0111 */ V(9, 14, 4), /* 1000 */ V(8, 14, 3), /* 1001 */ V(8, 14, 3), /* 1010 */ V(7, 15, 4), /* 1011 */ V(7, 14, 4), /* 1100 */ V(15, 7, 2), /* 1101 */ V(15, 7, 2), /* 1110 */ V(15, 7, 2), /* 1111 */ V(15, 7, 2), /* 0000 0000 0011 ... */ /* 000 */ V(13, 10, 2), /* 310 */ /* 001 */ V(13, 10, 2), /* 010 */ V(10, 13, 3), /* 011 */ V(11, 12, 3), /* 100 */ V(12, 11, 3), /* 101 */ V(15, 6, 3), /* 110 */ V(6, 15, 2), /* 111 */ V(6, 15, 2), /* 0000 0000 0100 ... */ /* 00 */ V(14, 8, 2), /* 318 */ /* 01 */ V(5, 15, 2), /* 10 */ V(9, 13, 2), /* 11 */ V(13, 9, 2), /* 0000 0000 0101 ... */ /* 00 */ V(15, 5, 2), /* 322 */ /* 01 */ V(14, 7, 2), /* 10 */ V(10, 12, 2), /* 11 */ V(11, 11, 2), /* 0000 0000 0110 ... */ /* 000 */ V(4, 15, 2), /* 326 */ /* 001 */ V(4, 15, 2), /* 010 */ V(15, 4, 2), /* 011 */ V(15, 4, 2), /* 100 */ V(12, 10, 3), /* 101 */ V(14, 6, 3), /* 110 */ V(15, 3, 2), /* 111 */ V(15, 3, 2), /* 0000 0000 0111 ... */ /* 00 */ V(3, 15, 1), /* 334 */ /* 01 */ V(3, 15, 1), /* 10 */ V(8, 13, 2), /* 11 */ V(13, 8, 2), /* 0000 0000 1000 ... */ /* 0 */ V(2, 15, 1), /* 338 */ /* 1 */ V(15, 2, 1), /* 0000 0000 1001 ... */ /* 00 */ V(6, 14, 2), /* 340 */ /* 01 */ V(9, 12, 2), /* 10 */ V(0, 15, 1), /* 11 */ V(0, 15, 1), /* 0000 0000 1010 ... */ /* 00 */ V(12, 9, 2), /* 344 */ /* 01 */ V(5, 14, 2), /* 10 */ V(10, 11, 1), /* 11 */ V(10, 11, 1), /* 0000 0000 1011 ... */ /* 00 */ V(7, 13, 2), /* 348 */ /* 01 */ V(13, 7, 2), /* 10 */ V(4, 14, 1), /* 11 */ V(4, 14, 1), /* 0000 0000 1100 ... */ /* 00 */ V(12, 8, 2), /* 352 */ /* 01 */ V(13, 6, 2), /* 10 */ V(3, 14, 1), /* 11 */ V(3, 14, 1), /* 0000 0000 1101 ... */ /* 00 */ V(11, 9, 1), /* 356 */ /* 01 */ V(11, 9, 1), /* 10 */ V(9, 11, 2), /* 11 */ V(10, 10, 2), /* 0000 0001 0001 ... */ /* 0 */ V(11, 10, 1), /* 360 */ /* 1 */ V(14, 5, 1), /* 0000 0001 0010 ... */ /* 0 */ V(14, 4, 1), /* 362 */ /* 1 */ V(8, 12, 1), /* 0000 0001 0011 ... */ /* 0 */ V(6, 13, 1), /* 364 */ /* 1 */ V(14, 3, 1), /* 0000 0001 0101 ... */ /* 0 */ V(2, 14, 1), /* 366 */ /* 1 */ V(0, 14, 1), /* 0000 0001 1000 ... */ /* 0 */ V(14, 0, 1), /* 368 */ /* 1 */ V(5, 13, 1), /* 0000 0001 1001 ... */ /* 0 */ V(13, 5, 1), /* 370 */ /* 1 */ V(7, 12, 1), /* 0000 0001 1010 ... */ /* 0 */ V(12, 7, 1), /* 372 */ /* 1 */ V(4, 13, 1), /* 0000 0001 1011 ... */ /* 0 */ V(8, 11, 1), /* 374 */ /* 1 */ V(11, 8, 1), /* 0000 0001 1100 ... */ /* 0 */ V(13, 4, 1), /* 376 */ /* 1 */ V(9, 10, 1), /* 0000 0001 1101 ... */ /* 0 */ V(10, 9, 1), /* 378 */ /* 1 */ V(6, 12, 1), /* 0000 0010 0000 ... */ /* 0 */ V(13, 3, 1), /* 380 */ /* 1 */ V(7, 11, 1), /* 0000 0010 0101 ... */ /* 0 */ V(5, 12, 1), /* 382 */ /* 1 */ V(12, 5, 1), /* 0000 0010 0110 ... */ /* 0 */ V(9, 9, 1), /* 384 */ /* 1 */ V(7, 10, 1), /* 0000 0010 1000 ... */ /* 0 */ V(10, 7, 1), /* 386 */ /* 1 */ V(9, 7, 1), /* 0000 0000 0000 0000 ... */ /* 000 */ V(15, 14, 3), /* 388 */ /* 001 */ V(15, 12, 3), /* 010 */ V(15, 13, 2), /* 011 */ V(15, 13, 2), /* 100 */ V(14, 13, 1), /* 101 */ V(14, 13, 1), /* 110 */ V(14, 13, 1), /* 111 */ V(14, 13, 1), /* 0000 0000 0000 1011 ... */ /* 0 */ V(10, 15, 1), /* 396 */ /* 1 */ V(14, 9, 1) }; static union huffpair const hufftab15[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 4), /* 0100 */ PTR(80, 4), /* 0101 */ PTR(96, 3), /* 0110 */ PTR(104, 3), /* 0111 */ PTR(112, 2), /* 1000 */ PTR(116, 1), /* 1001 */ PTR(118, 1), /* 1010 */ V(1, 1, 3), /* 1011 */ V(1, 1, 3), /* 1100 */ V(0, 1, 4), /* 1101 */ V(1, 0, 4), /* 1110 */ V(0, 0, 3), /* 1111 */ V(0, 0, 3), /* 0000 ... */ /* 0000 */ PTR(120, 4), /* 16 */ /* 0001 */ PTR(136, 4), /* 0010 */ PTR(152, 4), /* 0011 */ PTR(168, 4), /* 0100 */ PTR(184, 4), /* 0101 */ PTR(200, 3), /* 0110 */ PTR(208, 3), /* 0111 */ PTR(216, 4), /* 1000 */ PTR(232, 3), /* 1001 */ PTR(240, 3), /* 1010 */ PTR(248, 3), /* 1011 */ PTR(256, 3), /* 1100 */ PTR(264, 2), /* 1101 */ PTR(268, 3), /* 1110 */ PTR(276, 3), /* 1111 */ PTR(284, 2), /* 0001 ... */ /* 0000 */ PTR(288, 2), /* 32 */ /* 0001 */ PTR(292, 2), /* 0010 */ PTR(296, 2), /* 0011 */ PTR(300, 2), /* 0100 */ PTR(304, 2), /* 0101 */ PTR(308, 2), /* 0110 */ PTR(312, 2), /* 0111 */ PTR(316, 2), /* 1000 */ PTR(320, 1), /* 1001 */ PTR(322, 1), /* 1010 */ PTR(324, 1), /* 1011 */ PTR(326, 2), /* 1100 */ PTR(330, 1), /* 1101 */ PTR(332, 1), /* 1110 */ PTR(334, 2), /* 1111 */ PTR(338, 1), /* 0010 ... */ /* 0000 */ PTR(340, 1), /* 48 */ /* 0001 */ PTR(342, 1), /* 0010 */ V(9, 1, 4), /* 0011 */ PTR(344, 1), /* 0100 */ PTR(346, 1), /* 0101 */ PTR(348, 1), /* 0110 */ PTR(350, 1), /* 0111 */ PTR(352, 1), /* 1000 */ V(2, 8, 4), /* 1001 */ V(8, 2, 4), /* 1010 */ V(1, 8, 4), /* 1011 */ V(8, 1, 4), /* 1100 */ PTR(354, 1), /* 1101 */ PTR(356, 1), /* 1110 */ PTR(358, 1), /* 1111 */ PTR(360, 1), /* 0011 ... */ /* 0000 */ V(2, 7, 4), /* 64 */ /* 0001 */ V(7, 2, 4), /* 0010 */ V(6, 4, 4), /* 0011 */ V(1, 7, 4), /* 0100 */ V(5, 5, 4), /* 0101 */ V(7, 1, 4), /* 0110 */ PTR(362, 1), /* 0111 */ V(3, 6, 4), /* 1000 */ V(6, 3, 4), /* 1001 */ V(4, 5, 4), /* 1010 */ V(5, 4, 4), /* 1011 */ V(2, 6, 4), /* 1100 */ V(6, 2, 4), /* 1101 */ V(1, 6, 4), /* 1110 */ PTR(364, 1), /* 1111 */ V(3, 5, 4), /* 0100 ... */ /* 0000 */ V(6, 1, 3), /* 80 */ /* 0001 */ V(6, 1, 3), /* 0010 */ V(5, 3, 4), /* 0011 */ V(4, 4, 4), /* 0100 */ V(2, 5, 3), /* 0101 */ V(2, 5, 3), /* 0110 */ V(5, 2, 3), /* 0111 */ V(5, 2, 3), /* 1000 */ V(1, 5, 3), /* 1001 */ V(1, 5, 3), /* 1010 */ V(5, 1, 3), /* 1011 */ V(5, 1, 3), /* 1100 */ V(0, 5, 4), /* 1101 */ V(5, 0, 4), /* 1110 */ V(3, 4, 3), /* 1111 */ V(3, 4, 3), /* 0101 ... */ /* 000 */ V(4, 3, 3), /* 96 */ /* 001 */ V(2, 4, 3), /* 010 */ V(4, 2, 3), /* 011 */ V(3, 3, 3), /* 100 */ V(4, 1, 2), /* 101 */ V(4, 1, 2), /* 110 */ V(1, 4, 3), /* 111 */ V(0, 4, 3), /* 0110 ... */ /* 000 */ V(2, 3, 2), /* 104 */ /* 001 */ V(2, 3, 2), /* 010 */ V(3, 2, 2), /* 011 */ V(3, 2, 2), /* 100 */ V(4, 0, 3), /* 101 */ V(0, 3, 3), /* 110 */ V(1, 3, 2), /* 111 */ V(1, 3, 2), /* 0111 ... */ /* 00 */ V(3, 1, 2), /* 112 */ /* 01 */ V(3, 0, 2), /* 10 */ V(2, 2, 1), /* 11 */ V(2, 2, 1), /* 1000 ... */ /* 0 */ V(1, 2, 1), /* 116 */ /* 1 */ V(2, 1, 1), /* 1001 ... */ /* 0 */ V(0, 2, 1), /* 118 */ /* 1 */ V(2, 0, 1), /* 0000 0000 ... */ /* 0000 */ PTR(366, 1), /* 120 */ /* 0001 */ PTR(368, 1), /* 0010 */ V(14, 14, 4), /* 0011 */ PTR(370, 1), /* 0100 */ PTR(372, 1), /* 0101 */ PTR(374, 1), /* 0110 */ V(15, 11, 4), /* 0111 */ PTR(376, 1), /* 1000 */ V(13, 13, 4), /* 1001 */ V(10, 15, 4), /* 1010 */ V(15, 10, 4), /* 1011 */ V(11, 14, 4), /* 1100 */ V(14, 11, 4), /* 1101 */ V(12, 13, 4), /* 1110 */ V(13, 12, 4), /* 1111 */ V(9, 15, 4), /* 0000 0001 ... */ /* 0000 */ V(15, 9, 4), /* 136 */ /* 0001 */ V(14, 10, 4), /* 0010 */ V(11, 13, 4), /* 0011 */ V(13, 11, 4), /* 0100 */ V(8, 15, 4), /* 0101 */ V(15, 8, 4), /* 0110 */ V(12, 12, 4), /* 0111 */ V(9, 14, 4), /* 1000 */ V(14, 9, 4), /* 1001 */ V(7, 15, 4), /* 1010 */ V(15, 7, 4), /* 1011 */ V(10, 13, 4), /* 1100 */ V(13, 10, 4), /* 1101 */ V(11, 12, 4), /* 1110 */ V(6, 15, 4), /* 1111 */ PTR(378, 1), /* 0000 0010 ... */ /* 0000 */ V(12, 11, 3), /* 152 */ /* 0001 */ V(12, 11, 3), /* 0010 */ V(15, 6, 3), /* 0011 */ V(15, 6, 3), /* 0100 */ V(8, 14, 4), /* 0101 */ V(14, 8, 4), /* 0110 */ V(5, 15, 4), /* 0111 */ V(9, 13, 4), /* 1000 */ V(15, 5, 3), /* 1001 */ V(15, 5, 3), /* 1010 */ V(7, 14, 3), /* 1011 */ V(7, 14, 3), /* 1100 */ V(14, 7, 3), /* 1101 */ V(14, 7, 3), /* 1110 */ V(10, 12, 3), /* 1111 */ V(10, 12, 3), /* 0000 0011 ... */ /* 0000 */ V(12, 10, 3), /* 168 */ /* 0001 */ V(12, 10, 3), /* 0010 */ V(11, 11, 3), /* 0011 */ V(11, 11, 3), /* 0100 */ V(13, 9, 4), /* 0101 */ V(8, 13, 4), /* 0110 */ V(4, 15, 3), /* 0111 */ V(4, 15, 3), /* 1000 */ V(15, 4, 3), /* 1001 */ V(15, 4, 3), /* 1010 */ V(3, 15, 3), /* 1011 */ V(3, 15, 3), /* 1100 */ V(15, 3, 3), /* 1101 */ V(15, 3, 3), /* 1110 */ V(13, 8, 3), /* 1111 */ V(13, 8, 3), /* 0000 0100 ... */ /* 0000 */ V(14, 6, 3), /* 184 */ /* 0001 */ V(14, 6, 3), /* 0010 */ V(2, 15, 3), /* 0011 */ V(2, 15, 3), /* 0100 */ V(15, 2, 3), /* 0101 */ V(15, 2, 3), /* 0110 */ V(6, 14, 4), /* 0111 */ V(15, 0, 4), /* 1000 */ V(1, 15, 3), /* 1001 */ V(1, 15, 3), /* 1010 */ V(15, 1, 3), /* 1011 */ V(15, 1, 3), /* 1100 */ V(9, 12, 3), /* 1101 */ V(9, 12, 3), /* 1110 */ V(12, 9, 3), /* 1111 */ V(12, 9, 3), /* 0000 0101 ... */ /* 000 */ V(5, 14, 3), /* 200 */ /* 001 */ V(10, 11, 3), /* 010 */ V(11, 10, 3), /* 011 */ V(14, 5, 3), /* 100 */ V(7, 13, 3), /* 101 */ V(13, 7, 3), /* 110 */ V(4, 14, 3), /* 111 */ V(14, 4, 3), /* 0000 0110 ... */ /* 000 */ V(8, 12, 3), /* 208 */ /* 001 */ V(12, 8, 3), /* 010 */ V(3, 14, 3), /* 011 */ V(6, 13, 3), /* 100 */ V(13, 6, 3), /* 101 */ V(14, 3, 3), /* 110 */ V(9, 11, 3), /* 111 */ V(11, 9, 3), /* 0000 0111 ... */ /* 0000 */ V(2, 14, 3), /* 216 */ /* 0001 */ V(2, 14, 3), /* 0010 */ V(10, 10, 3), /* 0011 */ V(10, 10, 3), /* 0100 */ V(14, 2, 3), /* 0101 */ V(14, 2, 3), /* 0110 */ V(1, 14, 3), /* 0111 */ V(1, 14, 3), /* 1000 */ V(14, 1, 3), /* 1001 */ V(14, 1, 3), /* 1010 */ V(0, 14, 4), /* 1011 */ V(14, 0, 4), /* 1100 */ V(5, 13, 3), /* 1101 */ V(5, 13, 3), /* 1110 */ V(13, 5, 3), /* 1111 */ V(13, 5, 3), /* 0000 1000 ... */ /* 000 */ V(7, 12, 3), /* 232 */ /* 001 */ V(12, 7, 3), /* 010 */ V(4, 13, 3), /* 011 */ V(8, 11, 3), /* 100 */ V(13, 4, 2), /* 101 */ V(13, 4, 2), /* 110 */ V(11, 8, 3), /* 111 */ V(9, 10, 3), /* 0000 1001 ... */ /* 000 */ V(10, 9, 3), /* 240 */ /* 001 */ V(6, 12, 3), /* 010 */ V(12, 6, 3), /* 011 */ V(3, 13, 3), /* 100 */ V(13, 3, 2), /* 101 */ V(13, 3, 2), /* 110 */ V(13, 2, 2), /* 111 */ V(13, 2, 2), /* 0000 1010 ... */ /* 000 */ V(2, 13, 3), /* 248 */ /* 001 */ V(0, 13, 3), /* 010 */ V(1, 13, 2), /* 011 */ V(1, 13, 2), /* 100 */ V(7, 11, 2), /* 101 */ V(7, 11, 2), /* 110 */ V(11, 7, 2), /* 111 */ V(11, 7, 2), /* 0000 1011 ... */ /* 000 */ V(13, 1, 2), /* 256 */ /* 001 */ V(13, 1, 2), /* 010 */ V(5, 12, 3), /* 011 */ V(13, 0, 3), /* 100 */ V(12, 5, 2), /* 101 */ V(12, 5, 2), /* 110 */ V(8, 10, 2), /* 111 */ V(8, 10, 2), /* 0000 1100 ... */ /* 00 */ V(10, 8, 2), /* 264 */ /* 01 */ V(4, 12, 2), /* 10 */ V(12, 4, 2), /* 11 */ V(6, 11, 2), /* 0000 1101 ... */ /* 000 */ V(11, 6, 2), /* 268 */ /* 001 */ V(11, 6, 2), /* 010 */ V(9, 9, 3), /* 011 */ V(0, 12, 3), /* 100 */ V(3, 12, 2), /* 101 */ V(3, 12, 2), /* 110 */ V(12, 3, 2), /* 111 */ V(12, 3, 2), /* 0000 1110 ... */ /* 000 */ V(7, 10, 2), /* 276 */ /* 001 */ V(7, 10, 2), /* 010 */ V(10, 7, 2), /* 011 */ V(10, 7, 2), /* 100 */ V(10, 6, 2), /* 101 */ V(10, 6, 2), /* 110 */ V(12, 0, 3), /* 111 */ V(0, 11, 3), /* 0000 1111 ... */ /* 00 */ V(12, 2, 1), /* 284 */ /* 01 */ V(12, 2, 1), /* 10 */ V(2, 12, 2), /* 11 */ V(5, 11, 2), /* 0001 0000 ... */ /* 00 */ V(11, 5, 2), /* 288 */ /* 01 */ V(1, 12, 2), /* 10 */ V(8, 9, 2), /* 11 */ V(9, 8, 2), /* 0001 0001 ... */ /* 00 */ V(12, 1, 2), /* 292 */ /* 01 */ V(4, 11, 2), /* 10 */ V(11, 4, 2), /* 11 */ V(6, 10, 2), /* 0001 0010 ... */ /* 00 */ V(3, 11, 2), /* 296 */ /* 01 */ V(7, 9, 2), /* 10 */ V(11, 3, 1), /* 11 */ V(11, 3, 1), /* 0001 0011 ... */ /* 00 */ V(9, 7, 2), /* 300 */ /* 01 */ V(8, 8, 2), /* 10 */ V(2, 11, 2), /* 11 */ V(5, 10, 2), /* 0001 0100 ... */ /* 00 */ V(11, 2, 1), /* 304 */ /* 01 */ V(11, 2, 1), /* 10 */ V(10, 5, 2), /* 11 */ V(1, 11, 2), /* 0001 0101 ... */ /* 00 */ V(11, 1, 1), /* 308 */ /* 01 */ V(11, 1, 1), /* 10 */ V(11, 0, 2), /* 11 */ V(6, 9, 2), /* 0001 0110 ... */ /* 00 */ V(9, 6, 2), /* 312 */ /* 01 */ V(4, 10, 2), /* 10 */ V(10, 4, 2), /* 11 */ V(7, 8, 2), /* 0001 0111 ... */ /* 00 */ V(8, 7, 2), /* 316 */ /* 01 */ V(3, 10, 2), /* 10 */ V(10, 3, 1), /* 11 */ V(10, 3, 1), /* 0001 1000 ... */ /* 0 */ V(5, 9, 1), /* 320 */ /* 1 */ V(9, 5, 1), /* 0001 1001 ... */ /* 0 */ V(2, 10, 1), /* 322 */ /* 1 */ V(10, 2, 1), /* 0001 1010 ... */ /* 0 */ V(1, 10, 1), /* 324 */ /* 1 */ V(10, 1, 1), /* 0001 1011 ... */ /* 00 */ V(0, 10, 2), /* 326 */ /* 01 */ V(10, 0, 2), /* 10 */ V(6, 8, 1), /* 11 */ V(6, 8, 1), /* 0001 1100 ... */ /* 0 */ V(8, 6, 1), /* 330 */ /* 1 */ V(4, 9, 1), /* 0001 1101 ... */ /* 0 */ V(9, 4, 1), /* 332 */ /* 1 */ V(3, 9, 1), /* 0001 1110 ... */ /* 00 */ V(9, 3, 1), /* 334 */ /* 01 */ V(9, 3, 1), /* 10 */ V(7, 7, 2), /* 11 */ V(0, 9, 2), /* 0001 1111 ... */ /* 0 */ V(5, 8, 1), /* 338 */ /* 1 */ V(8, 5, 1), /* 0010 0000 ... */ /* 0 */ V(2, 9, 1), /* 340 */ /* 1 */ V(6, 7, 1), /* 0010 0001 ... */ /* 0 */ V(7, 6, 1), /* 342 */ /* 1 */ V(9, 2, 1), /* 0010 0011 ... */ /* 0 */ V(1, 9, 1), /* 344 */ /* 1 */ V(9, 0, 1), /* 0010 0100 ... */ /* 0 */ V(4, 8, 1), /* 346 */ /* 1 */ V(8, 4, 1), /* 0010 0101 ... */ /* 0 */ V(5, 7, 1), /* 348 */ /* 1 */ V(7, 5, 1), /* 0010 0110 ... */ /* 0 */ V(3, 8, 1), /* 350 */ /* 1 */ V(8, 3, 1), /* 0010 0111 ... */ /* 0 */ V(6, 6, 1), /* 352 */ /* 1 */ V(4, 7, 1), /* 0010 1100 ... */ /* 0 */ V(7, 4, 1), /* 354 */ /* 1 */ V(0, 8, 1), /* 0010 1101 ... */ /* 0 */ V(8, 0, 1), /* 356 */ /* 1 */ V(5, 6, 1), /* 0010 1110 ... */ /* 0 */ V(6, 5, 1), /* 358 */ /* 1 */ V(3, 7, 1), /* 0010 1111 ... */ /* 0 */ V(7, 3, 1), /* 360 */ /* 1 */ V(4, 6, 1), /* 0011 0110 ... */ /* 0 */ V(0, 7, 1), /* 362 */ /* 1 */ V(7, 0, 1), /* 0011 1110 ... */ /* 0 */ V(0, 6, 1), /* 364 */ /* 1 */ V(6, 0, 1), /* 0000 0000 0000 ... */ /* 0 */ V(15, 15, 1), /* 366 */ /* 1 */ V(14, 15, 1), /* 0000 0000 0001 ... */ /* 0 */ V(15, 14, 1), /* 368 */ /* 1 */ V(13, 15, 1), /* 0000 0000 0011 ... */ /* 0 */ V(15, 13, 1), /* 370 */ /* 1 */ V(12, 15, 1), /* 0000 0000 0100 ... */ /* 0 */ V(15, 12, 1), /* 372 */ /* 1 */ V(13, 14, 1), /* 0000 0000 0101 ... */ /* 0 */ V(14, 13, 1), /* 374 */ /* 1 */ V(11, 15, 1), /* 0000 0000 0111 ... */ /* 0 */ V(12, 14, 1), /* 376 */ /* 1 */ V(14, 12, 1), /* 0000 0001 1111 ... */ /* 0 */ V(10, 14, 1), /* 378 */ /* 1 */ V(0, 15, 1) }; static union huffpair const hufftab16[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 2), /* 0100 */ V(1, 1, 4), /* 0101 */ V(0, 1, 4), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(68, 3), /* 16 */ /* 0001 */ PTR(76, 3), /* 0010 */ PTR(84, 2), /* 0011 */ V(15, 15, 4), /* 0100 */ PTR(88, 2), /* 0101 */ PTR(92, 1), /* 0110 */ PTR(94, 4), /* 0111 */ V(15, 2, 4), /* 1000 */ PTR(110, 1), /* 1001 */ V(1, 15, 4), /* 1010 */ V(15, 1, 4), /* 1011 */ PTR(112, 4), /* 1100 */ PTR(128, 4), /* 1101 */ PTR(144, 4), /* 1110 */ PTR(160, 4), /* 1111 */ PTR(176, 4), /* 0001 ... */ /* 0000 */ PTR(192, 4), /* 32 */ /* 0001 */ PTR(208, 3), /* 0010 */ PTR(216, 3), /* 0011 */ PTR(224, 3), /* 0100 */ PTR(232, 3), /* 0101 */ PTR(240, 3), /* 0110 */ PTR(248, 3), /* 0111 */ PTR(256, 3), /* 1000 */ PTR(264, 2), /* 1001 */ PTR(268, 2), /* 1010 */ PTR(272, 1), /* 1011 */ PTR(274, 2), /* 1100 */ PTR(278, 2), /* 1101 */ PTR(282, 1), /* 1110 */ V(5, 1, 4), /* 1111 */ PTR(284, 1), /* 0010 ... */ /* 0000 */ PTR(286, 1), /* 48 */ /* 0001 */ PTR(288, 1), /* 0010 */ PTR(290, 1), /* 0011 */ V(1, 4, 4), /* 0100 */ V(4, 1, 4), /* 0101 */ PTR(292, 1), /* 0110 */ V(2, 3, 4), /* 0111 */ V(3, 2, 4), /* 1000 */ V(1, 3, 3), /* 1001 */ V(1, 3, 3), /* 1010 */ V(3, 1, 3), /* 1011 */ V(3, 1, 3), /* 1100 */ V(0, 3, 4), /* 1101 */ V(3, 0, 4), /* 1110 */ V(2, 2, 3), /* 1111 */ V(2, 2, 3), /* 0011 ... */ /* 00 */ V(1, 2, 2), /* 64 */ /* 01 */ V(2, 1, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(14, 15, 3), /* 68 */ /* 001 */ V(15, 14, 3), /* 010 */ V(13, 15, 3), /* 011 */ V(15, 13, 3), /* 100 */ V(12, 15, 3), /* 101 */ V(15, 12, 3), /* 110 */ V(11, 15, 3), /* 111 */ V(15, 11, 3), /* 0000 0001 ... */ /* 000 */ V(10, 15, 2), /* 76 */ /* 001 */ V(10, 15, 2), /* 010 */ V(15, 10, 3), /* 011 */ V(9, 15, 3), /* 100 */ V(15, 9, 3), /* 101 */ V(15, 8, 3), /* 110 */ V(8, 15, 2), /* 111 */ V(8, 15, 2), /* 0000 0010 ... */ /* 00 */ V(7, 15, 2), /* 84 */ /* 01 */ V(15, 7, 2), /* 10 */ V(6, 15, 2), /* 11 */ V(15, 6, 2), /* 0000 0100 ... */ /* 00 */ V(5, 15, 2), /* 88 */ /* 01 */ V(15, 5, 2), /* 10 */ V(4, 15, 1), /* 11 */ V(4, 15, 1), /* 0000 0101 ... */ /* 0 */ V(15, 4, 1), /* 92 */ /* 1 */ V(15, 3, 1), /* 0000 0110 ... */ /* 0000 */ V(15, 0, 1), /* 94 */ /* 0001 */ V(15, 0, 1), /* 0010 */ V(15, 0, 1), /* 0011 */ V(15, 0, 1), /* 0100 */ V(15, 0, 1), /* 0101 */ V(15, 0, 1), /* 0110 */ V(15, 0, 1), /* 0111 */ V(15, 0, 1), /* 1000 */ V(3, 15, 2), /* 1001 */ V(3, 15, 2), /* 1010 */ V(3, 15, 2), /* 1011 */ V(3, 15, 2), /* 1100 */ PTR(294, 4), /* 1101 */ PTR(310, 3), /* 1110 */ PTR(318, 3), /* 1111 */ PTR(326, 3), /* 0000 1000 ... */ /* 0 */ V(2, 15, 1), /* 110 */ /* 1 */ V(0, 15, 1), /* 0000 1011 ... */ /* 0000 */ PTR(334, 2), /* 112 */ /* 0001 */ PTR(338, 2), /* 0010 */ PTR(342, 2), /* 0011 */ PTR(346, 1), /* 0100 */ PTR(348, 2), /* 0101 */ PTR(352, 2), /* 0110 */ PTR(356, 1), /* 0111 */ PTR(358, 2), /* 1000 */ PTR(362, 2), /* 1001 */ PTR(366, 2), /* 1010 */ PTR(370, 2), /* 1011 */ V(14, 3, 4), /* 1100 */ PTR(374, 1), /* 1101 */ PTR(376, 1), /* 1110 */ PTR(378, 1), /* 1111 */ PTR(380, 1), /* 0000 1100 ... */ /* 0000 */ PTR(382, 1), /* 128 */ /* 0001 */ PTR(384, 1), /* 0010 */ PTR(386, 1), /* 0011 */ V(0, 13, 4), /* 0100 */ PTR(388, 1), /* 0101 */ PTR(390, 1), /* 0110 */ PTR(392, 1), /* 0111 */ V(3, 12, 4), /* 1000 */ PTR(394, 1), /* 1001 */ V(1, 12, 4), /* 1010 */ V(12, 0, 4), /* 1011 */ PTR(396, 1), /* 1100 */ V(14, 2, 3), /* 1101 */ V(14, 2, 3), /* 1110 */ V(2, 14, 4), /* 1111 */ V(1, 14, 4), /* 0000 1101 ... */ /* 0000 */ V(13, 3, 4), /* 144 */ /* 0001 */ V(2, 13, 4), /* 0010 */ V(13, 2, 4), /* 0011 */ V(13, 1, 4), /* 0100 */ V(3, 11, 4), /* 0101 */ PTR(398, 1), /* 0110 */ V(1, 13, 3), /* 0111 */ V(1, 13, 3), /* 1000 */ V(12, 4, 4), /* 1001 */ V(6, 11, 4), /* 1010 */ V(12, 3, 4), /* 1011 */ V(10, 7, 4), /* 1100 */ V(2, 12, 3), /* 1101 */ V(2, 12, 3), /* 1110 */ V(12, 2, 4), /* 1111 */ V(11, 5, 4), /* 0000 1110 ... */ /* 0000 */ V(12, 1, 4), /* 160 */ /* 0001 */ V(0, 12, 4), /* 0010 */ V(4, 11, 4), /* 0011 */ V(11, 4, 4), /* 0100 */ V(6, 10, 4), /* 0101 */ V(10, 6, 4), /* 0110 */ V(11, 3, 3), /* 0111 */ V(11, 3, 3), /* 1000 */ V(5, 10, 4), /* 1001 */ V(10, 5, 4), /* 1010 */ V(2, 11, 3), /* 1011 */ V(2, 11, 3), /* 1100 */ V(11, 2, 3), /* 1101 */ V(11, 2, 3), /* 1110 */ V(1, 11, 3), /* 1111 */ V(1, 11, 3), /* 0000 1111 ... */ /* 0000 */ V(11, 1, 3), /* 176 */ /* 0001 */ V(11, 1, 3), /* 0010 */ V(0, 11, 4), /* 0011 */ V(11, 0, 4), /* 0100 */ V(6, 9, 4), /* 0101 */ V(9, 6, 4), /* 0110 */ V(4, 10, 4), /* 0111 */ V(10, 4, 4), /* 1000 */ V(7, 8, 4), /* 1001 */ V(8, 7, 4), /* 1010 */ V(10, 3, 3), /* 1011 */ V(10, 3, 3), /* 1100 */ V(3, 10, 4), /* 1101 */ V(5, 9, 4), /* 1110 */ V(2, 10, 3), /* 1111 */ V(2, 10, 3), /* 0001 0000 ... */ /* 0000 */ V(9, 5, 4), /* 192 */ /* 0001 */ V(6, 8, 4), /* 0010 */ V(10, 1, 3), /* 0011 */ V(10, 1, 3), /* 0100 */ V(8, 6, 4), /* 0101 */ V(7, 7, 4), /* 0110 */ V(9, 4, 3), /* 0111 */ V(9, 4, 3), /* 1000 */ V(4, 9, 4), /* 1001 */ V(5, 7, 4), /* 1010 */ V(6, 7, 3), /* 1011 */ V(6, 7, 3), /* 1100 */ V(10, 2, 2), /* 1101 */ V(10, 2, 2), /* 1110 */ V(10, 2, 2), /* 1111 */ V(10, 2, 2), /* 0001 0001 ... */ /* 000 */ V(1, 10, 2), /* 208 */ /* 001 */ V(1, 10, 2), /* 010 */ V(0, 10, 3), /* 011 */ V(10, 0, 3), /* 100 */ V(3, 9, 3), /* 101 */ V(9, 3, 3), /* 110 */ V(5, 8, 3), /* 111 */ V(8, 5, 3), /* 0001 0010 ... */ /* 000 */ V(2, 9, 2), /* 216 */ /* 001 */ V(2, 9, 2), /* 010 */ V(9, 2, 2), /* 011 */ V(9, 2, 2), /* 100 */ V(7, 6, 3), /* 101 */ V(0, 9, 3), /* 110 */ V(1, 9, 2), /* 111 */ V(1, 9, 2), /* 0001 0011 ... */ /* 000 */ V(9, 1, 2), /* 224 */ /* 001 */ V(9, 1, 2), /* 010 */ V(9, 0, 3), /* 011 */ V(4, 8, 3), /* 100 */ V(8, 4, 3), /* 101 */ V(7, 5, 3), /* 110 */ V(3, 8, 3), /* 111 */ V(8, 3, 3), /* 0001 0100 ... */ /* 000 */ V(6, 6, 3), /* 232 */ /* 001 */ V(2, 8, 3), /* 010 */ V(8, 2, 2), /* 011 */ V(8, 2, 2), /* 100 */ V(4, 7, 3), /* 101 */ V(7, 4, 3), /* 110 */ V(1, 8, 2), /* 111 */ V(1, 8, 2), /* 0001 0101 ... */ /* 000 */ V(8, 1, 2), /* 240 */ /* 001 */ V(8, 1, 2), /* 010 */ V(8, 0, 2), /* 011 */ V(8, 0, 2), /* 100 */ V(0, 8, 3), /* 101 */ V(5, 6, 3), /* 110 */ V(3, 7, 2), /* 111 */ V(3, 7, 2), /* 0001 0110 ... */ /* 000 */ V(7, 3, 2), /* 248 */ /* 001 */ V(7, 3, 2), /* 010 */ V(6, 5, 3), /* 011 */ V(4, 6, 3), /* 100 */ V(2, 7, 2), /* 101 */ V(2, 7, 2), /* 110 */ V(7, 2, 2), /* 111 */ V(7, 2, 2), /* 0001 0111 ... */ /* 000 */ V(6, 4, 3), /* 256 */ /* 001 */ V(5, 5, 3), /* 010 */ V(0, 7, 2), /* 011 */ V(0, 7, 2), /* 100 */ V(1, 7, 1), /* 101 */ V(1, 7, 1), /* 110 */ V(1, 7, 1), /* 111 */ V(1, 7, 1), /* 0001 1000 ... */ /* 00 */ V(7, 1, 1), /* 264 */ /* 01 */ V(7, 1, 1), /* 10 */ V(7, 0, 2), /* 11 */ V(3, 6, 2), /* 0001 1001 ... */ /* 00 */ V(6, 3, 2), /* 268 */ /* 01 */ V(4, 5, 2), /* 10 */ V(5, 4, 2), /* 11 */ V(2, 6, 2), /* 0001 1010 ... */ /* 0 */ V(6, 2, 1), /* 272 */ /* 1 */ V(1, 6, 1), /* 0001 1011 ... */ /* 00 */ V(6, 1, 1), /* 274 */ /* 01 */ V(6, 1, 1), /* 10 */ V(0, 6, 2), /* 11 */ V(6, 0, 2), /* 0001 1100 ... */ /* 00 */ V(5, 3, 1), /* 278 */ /* 01 */ V(5, 3, 1), /* 10 */ V(3, 5, 2), /* 11 */ V(4, 4, 2), /* 0001 1101 ... */ /* 0 */ V(2, 5, 1), /* 282 */ /* 1 */ V(5, 2, 1), /* 0001 1111 ... */ /* 0 */ V(1, 5, 1), /* 284 */ /* 1 */ V(0, 5, 1), /* 0010 0000 ... */ /* 0 */ V(3, 4, 1), /* 286 */ /* 1 */ V(4, 3, 1), /* 0010 0001 ... */ /* 0 */ V(5, 0, 1), /* 288 */ /* 1 */ V(2, 4, 1), /* 0010 0010 ... */ /* 0 */ V(4, 2, 1), /* 290 */ /* 1 */ V(3, 3, 1), /* 0010 0101 ... */ /* 0 */ V(0, 4, 1), /* 292 */ /* 1 */ V(4, 0, 1), /* 0000 0110 1100 ... */ /* 0000 */ V(12, 14, 4), /* 294 */ /* 0001 */ PTR(400, 1), /* 0010 */ V(13, 14, 3), /* 0011 */ V(13, 14, 3), /* 0100 */ V(14, 9, 3), /* 0101 */ V(14, 9, 3), /* 0110 */ V(14, 10, 4), /* 0111 */ V(13, 9, 4), /* 1000 */ V(14, 14, 2), /* 1001 */ V(14, 14, 2), /* 1010 */ V(14, 14, 2), /* 1011 */ V(14, 14, 2), /* 1100 */ V(14, 13, 3), /* 1101 */ V(14, 13, 3), /* 1110 */ V(14, 11, 3), /* 1111 */ V(14, 11, 3), /* 0000 0110 1101 ... */ /* 000 */ V(11, 14, 2), /* 310 */ /* 001 */ V(11, 14, 2), /* 010 */ V(12, 13, 2), /* 011 */ V(12, 13, 2), /* 100 */ V(13, 12, 3), /* 101 */ V(13, 11, 3), /* 110 */ V(10, 14, 2), /* 111 */ V(10, 14, 2), /* 0000 0110 1110 ... */ /* 000 */ V(12, 12, 2), /* 318 */ /* 001 */ V(12, 12, 2), /* 010 */ V(10, 13, 3), /* 011 */ V(13, 10, 3), /* 100 */ V(7, 14, 3), /* 101 */ V(10, 12, 3), /* 110 */ V(12, 10, 2), /* 111 */ V(12, 10, 2), /* 0000 0110 1111 ... */ /* 000 */ V(12, 9, 3), /* 326 */ /* 001 */ V(7, 13, 3), /* 010 */ V(5, 14, 2), /* 011 */ V(5, 14, 2), /* 100 */ V(11, 13, 1), /* 101 */ V(11, 13, 1), /* 110 */ V(11, 13, 1), /* 111 */ V(11, 13, 1), /* 0000 1011 0000 ... */ /* 00 */ V(9, 14, 1), /* 334 */ /* 01 */ V(9, 14, 1), /* 10 */ V(11, 12, 2), /* 11 */ V(12, 11, 2), /* 0000 1011 0001 ... */ /* 00 */ V(8, 14, 2), /* 338 */ /* 01 */ V(14, 8, 2), /* 10 */ V(9, 13, 2), /* 11 */ V(14, 7, 2), /* 0000 1011 0010 ... */ /* 00 */ V(11, 11, 2), /* 342 */ /* 01 */ V(8, 13, 2), /* 10 */ V(13, 8, 2), /* 11 */ V(6, 14, 2), /* 0000 1011 0011 ... */ /* 0 */ V(14, 6, 1), /* 346 */ /* 1 */ V(9, 12, 1), /* 0000 1011 0100 ... */ /* 00 */ V(10, 11, 2), /* 348 */ /* 01 */ V(11, 10, 2), /* 10 */ V(14, 5, 2), /* 11 */ V(13, 7, 2), /* 0000 1011 0101 ... */ /* 00 */ V(4, 14, 1), /* 352 */ /* 01 */ V(4, 14, 1), /* 10 */ V(14, 4, 2), /* 11 */ V(8, 12, 2), /* 0000 1011 0110 ... */ /* 0 */ V(12, 8, 1), /* 356 */ /* 1 */ V(3, 14, 1), /* 0000 1011 0111 ... */ /* 00 */ V(6, 13, 1), /* 358 */ /* 01 */ V(6, 13, 1), /* 10 */ V(13, 6, 2), /* 11 */ V(9, 11, 2), /* 0000 1011 1000 ... */ /* 00 */ V(11, 9, 2), /* 362 */ /* 01 */ V(10, 10, 2), /* 10 */ V(14, 1, 1), /* 11 */ V(14, 1, 1), /* 0000 1011 1001 ... */ /* 00 */ V(13, 4, 1), /* 366 */ /* 01 */ V(13, 4, 1), /* 10 */ V(11, 8, 2), /* 11 */ V(10, 9, 2), /* 0000 1011 1010 ... */ /* 00 */ V(7, 11, 1), /* 370 */ /* 01 */ V(7, 11, 1), /* 10 */ V(11, 7, 2), /* 11 */ V(13, 0, 2), /* 0000 1011 1100 ... */ /* 0 */ V(0, 14, 1), /* 374 */ /* 1 */ V(14, 0, 1), /* 0000 1011 1101 ... */ /* 0 */ V(5, 13, 1), /* 376 */ /* 1 */ V(13, 5, 1), /* 0000 1011 1110 ... */ /* 0 */ V(7, 12, 1), /* 378 */ /* 1 */ V(12, 7, 1), /* 0000 1011 1111 ... */ /* 0 */ V(4, 13, 1), /* 380 */ /* 1 */ V(8, 11, 1), /* 0000 1100 0000 ... */ /* 0 */ V(9, 10, 1), /* 382 */ /* 1 */ V(6, 12, 1), /* 0000 1100 0001 ... */ /* 0 */ V(12, 6, 1), /* 384 */ /* 1 */ V(3, 13, 1), /* 0000 1100 0010 ... */ /* 0 */ V(5, 12, 1), /* 386 */ /* 1 */ V(12, 5, 1), /* 0000 1100 0100 ... */ /* 0 */ V(8, 10, 1), /* 388 */ /* 1 */ V(10, 8, 1), /* 0000 1100 0101 ... */ /* 0 */ V(9, 9, 1), /* 390 */ /* 1 */ V(4, 12, 1), /* 0000 1100 0110 ... */ /* 0 */ V(11, 6, 1), /* 392 */ /* 1 */ V(7, 10, 1), /* 0000 1100 1000 ... */ /* 0 */ V(5, 11, 1), /* 394 */ /* 1 */ V(8, 9, 1), /* 0000 1100 1011 ... */ /* 0 */ V(9, 8, 1), /* 396 */ /* 1 */ V(7, 9, 1), /* 0000 1101 0101 ... */ /* 0 */ V(9, 7, 1), /* 398 */ /* 1 */ V(8, 8, 1), /* 0000 0110 1100 0001 ... */ /* 0 */ V(14, 12, 1), /* 400 */ /* 1 */ V(13, 13, 1) }; static union huffpair const hufftab24[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ V(15, 15, 4), /* 0100 */ PTR(64, 4), /* 0101 */ PTR(80, 4), /* 0110 */ PTR(96, 4), /* 0111 */ PTR(112, 4), /* 1000 */ PTR(128, 4), /* 1001 */ PTR(144, 4), /* 1010 */ PTR(160, 3), /* 1011 */ PTR(168, 2), /* 1100 */ V(1, 1, 4), /* 1101 */ V(0, 1, 4), /* 1110 */ V(1, 0, 4), /* 1111 */ V(0, 0, 4), /* 0000 ... */ /* 0000 */ V(14, 15, 4), /* 16 */ /* 0001 */ V(15, 14, 4), /* 0010 */ V(13, 15, 4), /* 0011 */ V(15, 13, 4), /* 0100 */ V(12, 15, 4), /* 0101 */ V(15, 12, 4), /* 0110 */ V(11, 15, 4), /* 0111 */ V(15, 11, 4), /* 1000 */ V(15, 10, 3), /* 1001 */ V(15, 10, 3), /* 1010 */ V(10, 15, 4), /* 1011 */ V(9, 15, 4), /* 1100 */ V(15, 9, 3), /* 1101 */ V(15, 9, 3), /* 1110 */ V(15, 8, 3), /* 1111 */ V(15, 8, 3), /* 0001 ... */ /* 0000 */ V(8, 15, 4), /* 32 */ /* 0001 */ V(7, 15, 4), /* 0010 */ V(15, 7, 3), /* 0011 */ V(15, 7, 3), /* 0100 */ V(6, 15, 3), /* 0101 */ V(6, 15, 3), /* 0110 */ V(15, 6, 3), /* 0111 */ V(15, 6, 3), /* 1000 */ V(5, 15, 3), /* 1001 */ V(5, 15, 3), /* 1010 */ V(15, 5, 3), /* 1011 */ V(15, 5, 3), /* 1100 */ V(4, 15, 3), /* 1101 */ V(4, 15, 3), /* 1110 */ V(15, 4, 3), /* 1111 */ V(15, 4, 3), /* 0010 ... */ /* 0000 */ V(3, 15, 3), /* 48 */ /* 0001 */ V(3, 15, 3), /* 0010 */ V(15, 3, 3), /* 0011 */ V(15, 3, 3), /* 0100 */ V(2, 15, 3), /* 0101 */ V(2, 15, 3), /* 0110 */ V(15, 2, 3), /* 0111 */ V(15, 2, 3), /* 1000 */ V(15, 1, 3), /* 1001 */ V(15, 1, 3), /* 1010 */ V(1, 15, 4), /* 1011 */ V(15, 0, 4), /* 1100 */ PTR(172, 3), /* 1101 */ PTR(180, 3), /* 1110 */ PTR(188, 3), /* 1111 */ PTR(196, 3), /* 0100 ... */ /* 0000 */ PTR(204, 4), /* 64 */ /* 0001 */ PTR(220, 3), /* 0010 */ PTR(228, 3), /* 0011 */ PTR(236, 3), /* 0100 */ PTR(244, 2), /* 0101 */ PTR(248, 2), /* 0110 */ PTR(252, 2), /* 0111 */ PTR(256, 2), /* 1000 */ PTR(260, 2), /* 1001 */ PTR(264, 2), /* 1010 */ PTR(268, 2), /* 1011 */ PTR(272, 2), /* 1100 */ PTR(276, 2), /* 1101 */ PTR(280, 3), /* 1110 */ PTR(288, 2), /* 1111 */ PTR(292, 2), /* 0101 ... */ /* 0000 */ PTR(296, 2), /* 80 */ /* 0001 */ PTR(300, 3), /* 0010 */ PTR(308, 2), /* 0011 */ PTR(312, 3), /* 0100 */ PTR(320, 1), /* 0101 */ PTR(322, 2), /* 0110 */ PTR(326, 2), /* 0111 */ PTR(330, 1), /* 1000 */ PTR(332, 2), /* 1001 */ PTR(336, 1), /* 1010 */ PTR(338, 1), /* 1011 */ PTR(340, 1), /* 1100 */ PTR(342, 1), /* 1101 */ PTR(344, 1), /* 1110 */ PTR(346, 1), /* 1111 */ PTR(348, 1), /* 0110 ... */ /* 0000 */ PTR(350, 1), /* 96 */ /* 0001 */ PTR(352, 1), /* 0010 */ PTR(354, 1), /* 0011 */ PTR(356, 1), /* 0100 */ PTR(358, 1), /* 0101 */ PTR(360, 1), /* 0110 */ PTR(362, 1), /* 0111 */ PTR(364, 1), /* 1000 */ PTR(366, 1), /* 1001 */ PTR(368, 1), /* 1010 */ PTR(370, 2), /* 1011 */ PTR(374, 1), /* 1100 */ PTR(376, 2), /* 1101 */ V(7, 3, 4), /* 1110 */ PTR(380, 1), /* 1111 */ V(7, 2, 4), /* 0111 ... */ /* 0000 */ V(4, 6, 4), /* 112 */ /* 0001 */ V(6, 4, 4), /* 0010 */ V(5, 5, 4), /* 0011 */ V(7, 1, 4), /* 0100 */ V(3, 6, 4), /* 0101 */ V(6, 3, 4), /* 0110 */ V(4, 5, 4), /* 0111 */ V(5, 4, 4), /* 1000 */ V(2, 6, 4), /* 1001 */ V(6, 2, 4), /* 1010 */ V(1, 6, 4), /* 1011 */ V(6, 1, 4), /* 1100 */ PTR(382, 1), /* 1101 */ V(3, 5, 4), /* 1110 */ V(5, 3, 4), /* 1111 */ V(4, 4, 4), /* 1000 ... */ /* 0000 */ V(2, 5, 4), /* 128 */ /* 0001 */ V(5, 2, 4), /* 0010 */ V(1, 5, 4), /* 0011 */ PTR(384, 1), /* 0100 */ V(5, 1, 3), /* 0101 */ V(5, 1, 3), /* 0110 */ V(3, 4, 4), /* 0111 */ V(4, 3, 4), /* 1000 */ V(2, 4, 3), /* 1001 */ V(2, 4, 3), /* 1010 */ V(4, 2, 3), /* 1011 */ V(4, 2, 3), /* 1100 */ V(3, 3, 3), /* 1101 */ V(3, 3, 3), /* 1110 */ V(1, 4, 3), /* 1111 */ V(1, 4, 3), /* 1001 ... */ /* 0000 */ V(4, 1, 3), /* 144 */ /* 0001 */ V(4, 1, 3), /* 0010 */ V(0, 4, 4), /* 0011 */ V(4, 0, 4), /* 0100 */ V(2, 3, 3), /* 0101 */ V(2, 3, 3), /* 0110 */ V(3, 2, 3), /* 0111 */ V(3, 2, 3), /* 1000 */ V(1, 3, 2), /* 1001 */ V(1, 3, 2), /* 1010 */ V(1, 3, 2), /* 1011 */ V(1, 3, 2), /* 1100 */ V(3, 1, 2), /* 1101 */ V(3, 1, 2), /* 1110 */ V(3, 1, 2), /* 1111 */ V(3, 1, 2), /* 1010 ... */ /* 000 */ V(0, 3, 3), /* 160 */ /* 001 */ V(3, 0, 3), /* 010 */ V(2, 2, 2), /* 011 */ V(2, 2, 2), /* 100 */ V(1, 2, 1), /* 101 */ V(1, 2, 1), /* 110 */ V(1, 2, 1), /* 111 */ V(1, 2, 1), /* 1011 ... */ /* 00 */ V(2, 1, 1), /* 168 */ /* 01 */ V(2, 1, 1), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0010 1100 ... */ /* 000 */ V(0, 15, 1), /* 172 */ /* 001 */ V(0, 15, 1), /* 010 */ V(0, 15, 1), /* 011 */ V(0, 15, 1), /* 100 */ V(14, 14, 3), /* 101 */ V(13, 14, 3), /* 110 */ V(14, 13, 3), /* 111 */ V(12, 14, 3), /* 0010 1101 ... */ /* 000 */ V(14, 12, 3), /* 180 */ /* 001 */ V(13, 13, 3), /* 010 */ V(11, 14, 3), /* 011 */ V(14, 11, 3), /* 100 */ V(12, 13, 3), /* 101 */ V(13, 12, 3), /* 110 */ V(10, 14, 3), /* 111 */ V(14, 10, 3), /* 0010 1110 ... */ /* 000 */ V(11, 13, 3), /* 188 */ /* 001 */ V(13, 11, 3), /* 010 */ V(12, 12, 3), /* 011 */ V(9, 14, 3), /* 100 */ V(14, 9, 3), /* 101 */ V(10, 13, 3), /* 110 */ V(13, 10, 3), /* 111 */ V(11, 12, 3), /* 0010 1111 ... */ /* 000 */ V(12, 11, 3), /* 196 */ /* 001 */ V(8, 14, 3), /* 010 */ V(14, 8, 3), /* 011 */ V(9, 13, 3), /* 100 */ V(13, 9, 3), /* 101 */ V(7, 14, 3), /* 110 */ V(14, 7, 3), /* 111 */ V(10, 12, 3), /* 0100 0000 ... */ /* 0000 */ V(12, 10, 3), /* 204 */ /* 0001 */ V(12, 10, 3), /* 0010 */ V(11, 11, 3), /* 0011 */ V(11, 11, 3), /* 0100 */ V(8, 13, 3), /* 0101 */ V(8, 13, 3), /* 0110 */ V(13, 8, 3), /* 0111 */ V(13, 8, 3), /* 1000 */ V(0, 14, 4), /* 1001 */ V(14, 0, 4), /* 1010 */ V(0, 13, 3), /* 1011 */ V(0, 13, 3), /* 1100 */ V(14, 6, 2), /* 1101 */ V(14, 6, 2), /* 1110 */ V(14, 6, 2), /* 1111 */ V(14, 6, 2), /* 0100 0001 ... */ /* 000 */ V(6, 14, 3), /* 220 */ /* 001 */ V(9, 12, 3), /* 010 */ V(12, 9, 2), /* 011 */ V(12, 9, 2), /* 100 */ V(5, 14, 2), /* 101 */ V(5, 14, 2), /* 110 */ V(11, 10, 2), /* 111 */ V(11, 10, 2), /* 0100 0010 ... */ /* 000 */ V(14, 5, 2), /* 228 */ /* 001 */ V(14, 5, 2), /* 010 */ V(10, 11, 3), /* 011 */ V(7, 13, 3), /* 100 */ V(13, 7, 2), /* 101 */ V(13, 7, 2), /* 110 */ V(14, 4, 2), /* 111 */ V(14, 4, 2), /* 0100 0011 ... */ /* 000 */ V(8, 12, 2), /* 236 */ /* 001 */ V(8, 12, 2), /* 010 */ V(12, 8, 2), /* 011 */ V(12, 8, 2), /* 100 */ V(4, 14, 3), /* 101 */ V(2, 14, 3), /* 110 */ V(3, 14, 2), /* 111 */ V(3, 14, 2), /* 0100 0100 ... */ /* 00 */ V(6, 13, 2), /* 244 */ /* 01 */ V(13, 6, 2), /* 10 */ V(14, 3, 2), /* 11 */ V(9, 11, 2), /* 0100 0101 ... */ /* 00 */ V(11, 9, 2), /* 248 */ /* 01 */ V(10, 10, 2), /* 10 */ V(14, 2, 2), /* 11 */ V(1, 14, 2), /* 0100 0110 ... */ /* 00 */ V(14, 1, 2), /* 252 */ /* 01 */ V(5, 13, 2), /* 10 */ V(13, 5, 2), /* 11 */ V(7, 12, 2), /* 0100 0111 ... */ /* 00 */ V(12, 7, 2), /* 256 */ /* 01 */ V(4, 13, 2), /* 10 */ V(8, 11, 2), /* 11 */ V(11, 8, 2), /* 0100 1000 ... */ /* 00 */ V(13, 4, 2), /* 260 */ /* 01 */ V(9, 10, 2), /* 10 */ V(10, 9, 2), /* 11 */ V(6, 12, 2), /* 0100 1001 ... */ /* 00 */ V(12, 6, 2), /* 264 */ /* 01 */ V(3, 13, 2), /* 10 */ V(13, 3, 2), /* 11 */ V(2, 13, 2), /* 0100 1010 ... */ /* 00 */ V(13, 2, 2), /* 268 */ /* 01 */ V(1, 13, 2), /* 10 */ V(7, 11, 2), /* 11 */ V(11, 7, 2), /* 0100 1011 ... */ /* 00 */ V(13, 1, 2), /* 272 */ /* 01 */ V(5, 12, 2), /* 10 */ V(12, 5, 2), /* 11 */ V(8, 10, 2), /* 0100 1100 ... */ /* 00 */ V(10, 8, 2), /* 276 */ /* 01 */ V(9, 9, 2), /* 10 */ V(4, 12, 2), /* 11 */ V(12, 4, 2), /* 0100 1101 ... */ /* 000 */ V(6, 11, 2), /* 280 */ /* 001 */ V(6, 11, 2), /* 010 */ V(11, 6, 2), /* 011 */ V(11, 6, 2), /* 100 */ V(13, 0, 3), /* 101 */ V(0, 12, 3), /* 110 */ V(3, 12, 2), /* 111 */ V(3, 12, 2), /* 0100 1110 ... */ /* 00 */ V(12, 3, 2), /* 288 */ /* 01 */ V(7, 10, 2), /* 10 */ V(10, 7, 2), /* 11 */ V(2, 12, 2), /* 0100 1111 ... */ /* 00 */ V(12, 2, 2), /* 292 */ /* 01 */ V(5, 11, 2), /* 10 */ V(11, 5, 2), /* 11 */ V(1, 12, 2), /* 0101 0000 ... */ /* 00 */ V(8, 9, 2), /* 296 */ /* 01 */ V(9, 8, 2), /* 10 */ V(12, 1, 2), /* 11 */ V(4, 11, 2), /* 0101 0001 ... */ /* 000 */ V(12, 0, 3), /* 300 */ /* 001 */ V(0, 11, 3), /* 010 */ V(3, 11, 2), /* 011 */ V(3, 11, 2), /* 100 */ V(11, 0, 3), /* 101 */ V(0, 10, 3), /* 110 */ V(1, 10, 2), /* 111 */ V(1, 10, 2), /* 0101 0010 ... */ /* 00 */ V(11, 4, 1), /* 308 */ /* 01 */ V(11, 4, 1), /* 10 */ V(6, 10, 2), /* 11 */ V(10, 6, 2), /* 0101 0011 ... */ /* 000 */ V(7, 9, 2), /* 312 */ /* 001 */ V(7, 9, 2), /* 010 */ V(9, 7, 2), /* 011 */ V(9, 7, 2), /* 100 */ V(10, 0, 3), /* 101 */ V(0, 9, 3), /* 110 */ V(9, 0, 2), /* 111 */ V(9, 0, 2), /* 0101 0100 ... */ /* 0 */ V(11, 3, 1), /* 320 */ /* 1 */ V(8, 8, 1), /* 0101 0101 ... */ /* 00 */ V(2, 11, 2), /* 322 */ /* 01 */ V(5, 10, 2), /* 10 */ V(11, 2, 1), /* 11 */ V(11, 2, 1), /* 0101 0110 ... */ /* 00 */ V(10, 5, 2), /* 326 */ /* 01 */ V(1, 11, 2), /* 10 */ V(11, 1, 2), /* 11 */ V(6, 9, 2), /* 0101 0111 ... */ /* 0 */ V(9, 6, 1), /* 330 */ /* 1 */ V(10, 4, 1), /* 0101 1000 ... */ /* 00 */ V(4, 10, 2), /* 332 */ /* 01 */ V(7, 8, 2), /* 10 */ V(8, 7, 1), /* 11 */ V(8, 7, 1), /* 0101 1001 ... */ /* 0 */ V(3, 10, 1), /* 336 */ /* 1 */ V(10, 3, 1), /* 0101 1010 ... */ /* 0 */ V(5, 9, 1), /* 338 */ /* 1 */ V(9, 5, 1), /* 0101 1011 ... */ /* 0 */ V(2, 10, 1), /* 340 */ /* 1 */ V(10, 2, 1), /* 0101 1100 ... */ /* 0 */ V(10, 1, 1), /* 342 */ /* 1 */ V(6, 8, 1), /* 0101 1101 ... */ /* 0 */ V(8, 6, 1), /* 344 */ /* 1 */ V(7, 7, 1), /* 0101 1110 ... */ /* 0 */ V(4, 9, 1), /* 346 */ /* 1 */ V(9, 4, 1), /* 0101 1111 ... */ /* 0 */ V(3, 9, 1), /* 348 */ /* 1 */ V(9, 3, 1), /* 0110 0000 ... */ /* 0 */ V(5, 8, 1), /* 350 */ /* 1 */ V(8, 5, 1), /* 0110 0001 ... */ /* 0 */ V(2, 9, 1), /* 352 */ /* 1 */ V(6, 7, 1), /* 0110 0010 ... */ /* 0 */ V(7, 6, 1), /* 354 */ /* 1 */ V(9, 2, 1), /* 0110 0011 ... */ /* 0 */ V(1, 9, 1), /* 356 */ /* 1 */ V(9, 1, 1), /* 0110 0100 ... */ /* 0 */ V(4, 8, 1), /* 358 */ /* 1 */ V(8, 4, 1), /* 0110 0101 ... */ /* 0 */ V(5, 7, 1), /* 360 */ /* 1 */ V(7, 5, 1), /* 0110 0110 ... */ /* 0 */ V(3, 8, 1), /* 362 */ /* 1 */ V(8, 3, 1), /* 0110 0111 ... */ /* 0 */ V(6, 6, 1), /* 364 */ /* 1 */ V(2, 8, 1), /* 0110 1000 ... */ /* 0 */ V(8, 2, 1), /* 366 */ /* 1 */ V(1, 8, 1), /* 0110 1001 ... */ /* 0 */ V(4, 7, 1), /* 368 */ /* 1 */ V(7, 4, 1), /* 0110 1010 ... */ /* 00 */ V(8, 1, 1), /* 370 */ /* 01 */ V(8, 1, 1), /* 10 */ V(0, 8, 2), /* 11 */ V(8, 0, 2), /* 0110 1011 ... */ /* 0 */ V(5, 6, 1), /* 374 */ /* 1 */ V(6, 5, 1), /* 0110 1100 ... */ /* 00 */ V(1, 7, 1), /* 376 */ /* 01 */ V(1, 7, 1), /* 10 */ V(0, 7, 2), /* 11 */ V(7, 0, 2), /* 0110 1110 ... */ /* 0 */ V(3, 7, 1), /* 380 */ /* 1 */ V(2, 7, 1), /* 0111 1100 ... */ /* 0 */ V(0, 6, 1), /* 382 */ /* 1 */ V(6, 0, 1), /* 1000 0011 ... */ /* 0 */ V(0, 5, 1), /* 384 */ /* 1 */ V(5, 0, 1) }; # undef V # undef PTR /* external tables */ union huffquad const *const mad_huff_quad_table[2] = { hufftabA, hufftabB }; struct hufftable const mad_huff_pair_table[32] = { /* 0 */ { hufftab0, 0, 0 }, /* 1 */ { hufftab1, 0, 3 }, /* 2 */ { hufftab2, 0, 3 }, /* 3 */ { hufftab3, 0, 3 }, /* 4 */ { 0 /* not used */ }, /* 5 */ { hufftab5, 0, 3 }, /* 6 */ { hufftab6, 0, 4 }, /* 7 */ { hufftab7, 0, 4 }, /* 8 */ { hufftab8, 0, 4 }, /* 9 */ { hufftab9, 0, 4 }, /* 10 */ { hufftab10, 0, 4 }, /* 11 */ { hufftab11, 0, 4 }, /* 12 */ { hufftab12, 0, 4 }, /* 13 */ { hufftab13, 0, 4 }, /* 14 */ { 0 /* not used */ }, /* 15 */ { hufftab15, 0, 4 }, /* 16 */ { hufftab16, 1, 4 }, /* 17 */ { hufftab16, 2, 4 }, /* 18 */ { hufftab16, 3, 4 }, /* 19 */ { hufftab16, 4, 4 }, /* 20 */ { hufftab16, 6, 4 }, /* 21 */ { hufftab16, 8, 4 }, /* 22 */ { hufftab16, 10, 4 }, /* 23 */ { hufftab16, 13, 4 }, /* 24 */ { hufftab24, 4, 4 }, /* 25 */ { hufftab24, 5, 4 }, /* 26 */ { hufftab24, 6, 4 }, /* 27 */ { hufftab24, 7, 4 }, /* 28 */ { hufftab24, 8, 4 }, /* 29 */ { hufftab24, 9, 4 }, /* 30 */ { hufftab24, 11, 4 }, /* 31 */ { hufftab24, 13, 4 } }; alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/huffman.h000066400000000000000000000034671466261456500252030ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: huffman.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_HUFFMAN_H # define LIBMAD_HUFFMAN_H union huffquad { struct { unsigned short final : 1; unsigned short bits : 3; unsigned short offset : 12; } ptr; struct { unsigned short final : 1; unsigned short hlen : 3; unsigned short v : 1; unsigned short w : 1; unsigned short x : 1; unsigned short y : 1; } value; unsigned short final : 1; }; union huffpair { struct { unsigned short final : 1; unsigned short bits : 3; unsigned short offset : 12; } ptr; struct { unsigned short final : 1; unsigned short hlen : 3; unsigned short x : 4; unsigned short y : 4; } value; unsigned short final : 1; }; struct hufftable { union huffpair const *table; unsigned short linbits; unsigned short startbits; }; extern union huffquad const *const mad_huff_quad_table[2]; extern struct hufftable const mad_huff_pair_table[32]; # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/imdct_s.dat000066400000000000000000000050211466261456500255060ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: imdct_s.dat 1252 2007-07-08 15:46:19Z dominique_libre $ */ /* 0 */ { MAD_F(0x09bd7ca0) /* 0.608761429 */, -MAD_F(0x0ec835e8) /* -0.923879533 */, -MAD_F(0x0216a2a2) /* -0.130526192 */, MAD_F(0x0fdcf549) /* 0.991444861 */, -MAD_F(0x061f78aa) /* -0.382683432 */, -MAD_F(0x0cb19346) /* -0.793353340 */ }, /* 6 */ { -MAD_F(0x0cb19346) /* -0.793353340 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0216a2a2) /* 0.130526192 */, -MAD_F(0x0ec835e8) /* -0.923879533 */, -MAD_F(0x09bd7ca0) /* -0.608761429 */ }, /* 1 */ { MAD_F(0x061f78aa) /* 0.382683432 */, -MAD_F(0x0ec835e8) /* -0.923879533 */, MAD_F(0x0ec835e8) /* 0.923879533 */, -MAD_F(0x061f78aa) /* -0.382683432 */, -MAD_F(0x061f78aa) /* -0.382683432 */, MAD_F(0x0ec835e8) /* 0.923879533 */ }, /* 7 */ { -MAD_F(0x0ec835e8) /* -0.923879533 */, -MAD_F(0x061f78aa) /* -0.382683432 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x061f78aa) /* 0.382683432 */ }, /* 2 */ { MAD_F(0x0216a2a2) /* 0.130526192 */, -MAD_F(0x061f78aa) /* -0.382683432 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, -MAD_F(0x0cb19346) /* -0.793353340 */, MAD_F(0x0ec835e8) /* 0.923879533 */, -MAD_F(0x0fdcf549) /* -0.991444861 */ }, /* 8 */ { -MAD_F(0x0fdcf549) /* -0.991444861 */, -MAD_F(0x0ec835e8) /* -0.923879533 */, -MAD_F(0x0cb19346) /* -0.793353340 */, -MAD_F(0x09bd7ca0) /* -0.608761429 */, -MAD_F(0x061f78aa) /* -0.382683432 */, -MAD_F(0x0216a2a2) /* -0.130526192 */ } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/layer12.c000066400000000000000000000324501466261456500250230ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: layer12.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # ifdef HAVE_LIMITS_H # include # else # define CHAR_BIT 8 # endif # include "fixed.h" # include "bit.h" # include "stream.h" # include "frame.h" # include "layer12.h" /* * scalefactor table * used in both Layer I and Layer II decoding */ static mad_fixed_t const sf_table[64] = { # include "sf_table.dat" }; /* --- Layer I ------------------------------------------------------------- */ /* linear scaling table */ static mad_fixed_t const linear_table[14] = { MAD_F(0x15555555), /* 2^2 / (2^2 - 1) == 1.33333333333333 */ MAD_F(0x12492492), /* 2^3 / (2^3 - 1) == 1.14285714285714 */ MAD_F(0x11111111), /* 2^4 / (2^4 - 1) == 1.06666666666667 */ MAD_F(0x10842108), /* 2^5 / (2^5 - 1) == 1.03225806451613 */ MAD_F(0x10410410), /* 2^6 / (2^6 - 1) == 1.01587301587302 */ MAD_F(0x10204081), /* 2^7 / (2^7 - 1) == 1.00787401574803 */ MAD_F(0x10101010), /* 2^8 / (2^8 - 1) == 1.00392156862745 */ MAD_F(0x10080402), /* 2^9 / (2^9 - 1) == 1.00195694716243 */ MAD_F(0x10040100), /* 2^10 / (2^10 - 1) == 1.00097751710655 */ MAD_F(0x10020040), /* 2^11 / (2^11 - 1) == 1.00048851978505 */ MAD_F(0x10010010), /* 2^12 / (2^12 - 1) == 1.00024420024420 */ MAD_F(0x10008004), /* 2^13 / (2^13 - 1) == 1.00012208521548 */ MAD_F(0x10004001), /* 2^14 / (2^14 - 1) == 1.00006103888177 */ MAD_F(0x10002000) /* 2^15 / (2^15 - 1) == 1.00003051850948 */ }; /* * NAME: I_sample() * DESCRIPTION: decode one requantized Layer I sample from a bitstream */ static mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb) { mad_fixed_t sample; sample = mad_bit_read(ptr, nb); /* invert most significant bit, extend sign, then scale to fixed format */ sample ^= 1 << (nb - 1); sample |= -(sample & (1 << (nb - 1))); sample <<= MAD_F_FRACBITS - (nb - 1); /* requantize the sample */ /* s'' = (2^nb / (2^nb - 1)) * (s''' + 2^(-nb + 1)) */ sample += MAD_F_ONE >> (nb - 1); return mad_f_mul(sample, linear_table[nb - 2]); /* s' = factor * s'' */ /* (to be performed by caller) */ } /* * NAME: layer->I() * DESCRIPTION: decode a single Layer I frame */ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) { struct mad_header *header = &frame->header; unsigned int nch, bound, ch, s, sb, nb; unsigned char allocation[2][32], scalefactor[2][32]; nch = MAD_NCHANNELS(header); bound = 32; if (header->mode == MAD_MODE_JOINT_STEREO) { header->flags |= MAD_FLAG_I_STEREO; bound = 4 + header->mode_extension * 4; } /* check CRC word */ if (header->flags & MAD_FLAG_PROTECTION) { header->crc_check = mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)), header->crc_check); if (header->crc_check != header->crc_target && !(frame->options & MAD_OPTION_IGNORECRC)) { stream->error = MAD_ERROR_BADCRC; return -1; } } /* decode bit allocations */ for (sb = 0; sb < bound; ++sb) { for (ch = 0; ch < nch; ++ch) { nb = mad_bit_read(&stream->ptr, 4); if (nb == 15) { stream->error = MAD_ERROR_BADBITALLOC; return -1; } allocation[ch][sb] = nb ? nb + 1 : 0; } } for (sb = bound; sb < 32; ++sb) { nb = mad_bit_read(&stream->ptr, 4); if (nb == 15) { stream->error = MAD_ERROR_BADBITALLOC; return -1; } allocation[0][sb] = allocation[1][sb] = nb ? nb + 1 : 0; } /* decode scalefactors */ for (sb = 0; sb < 32; ++sb) { for (ch = 0; ch < nch; ++ch) { if (allocation[ch][sb]) { scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); # if defined(OPT_STRICT) /* * Scalefactor index 63 does not appear in Table B.1 of * ISO/IEC 11172-3. Nonetheless, other implementations accept it, * so we only reject it if OPT_STRICT is defined. */ if (scalefactor[ch][sb] == 63) { stream->error = MAD_ERROR_BADSCALEFACTOR; return -1; } # endif } } } /* decode samples */ for (s = 0; s < 12; ++s) { for (sb = 0; sb < bound; ++sb) { for (ch = 0; ch < nch; ++ch) { nb = allocation[ch][sb]; frame->sbsample[ch][s][sb] = nb ? mad_f_mul(I_sample(&stream->ptr, nb), sf_table[scalefactor[ch][sb]]) : 0; } } for (sb = bound; sb < 32; ++sb) { if ((nb = allocation[0][sb])) { mad_fixed_t sample; sample = I_sample(&stream->ptr, nb); for (ch = 0; ch < nch; ++ch) { frame->sbsample[ch][s][sb] = mad_f_mul(sample, sf_table[scalefactor[ch][sb]]); } } else { for (ch = 0; ch < nch; ++ch) frame->sbsample[ch][s][sb] = 0; } } } return 0; } /* --- Layer II ------------------------------------------------------------ */ /* possible quantization per subband table */ static struct { unsigned int sblimit; unsigned char const offsets[30]; } const sbquant_table[5] = { /* ISO/IEC 11172-3 Table B.2a */ { 27, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 0 */ 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 } }, /* ISO/IEC 11172-3 Table B.2b */ { 30, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 1 */ 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 } }, /* ISO/IEC 11172-3 Table B.2c */ { 8, { 5, 5, 2, 2, 2, 2, 2, 2 } }, /* 2 */ /* ISO/IEC 11172-3 Table B.2d */ { 12, { 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } }, /* 3 */ /* ISO/IEC 13818-3 Table B.1 */ { 30, { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, /* 4 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } } }; /* bit allocation table */ static struct { unsigned short nbal; unsigned short offset; } const bitalloc_table[8] = { { 2, 0 }, /* 0 */ { 2, 3 }, /* 1 */ { 3, 3 }, /* 2 */ { 3, 1 }, /* 3 */ { 4, 2 }, /* 4 */ { 4, 3 }, /* 5 */ { 4, 4 }, /* 6 */ { 4, 5 } /* 7 */ }; /* offsets into quantization class table */ static unsigned char const offset_table[6][15] = { { 0, 1, 16 }, /* 0 */ { 0, 1, 2, 3, 4, 5, 16 }, /* 1 */ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, /* 2 */ { 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, /* 3 */ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16 }, /* 4 */ { 0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } /* 5 */ }; /* quantization class table */ static struct quantclass { unsigned short nlevels; unsigned char group; unsigned char bits; mad_fixed_t C; mad_fixed_t D; } const qc_table[17] = { # include "qc_table.dat" }; /* * NAME: II_samples() * DESCRIPTION: decode three requantized Layer II samples from a bitstream */ static void II_samples(struct mad_bitptr *ptr, struct quantclass const *quantclass, mad_fixed_t output[3]) { unsigned int nb, s, sample[3]; if ((nb = quantclass->group)) { unsigned int c, nlevels; /* degrouping */ c = mad_bit_read(ptr, quantclass->bits); nlevels = quantclass->nlevels; for (s = 0; s < 3; ++s) { sample[s] = c % nlevels; c /= nlevels; } } else { nb = quantclass->bits; for (s = 0; s < 3; ++s) sample[s] = mad_bit_read(ptr, nb); } for (s = 0; s < 3; ++s) { mad_fixed_t requantized; /* invert most significant bit, extend sign, then scale to fixed format */ requantized = sample[s] ^ (1 << (nb - 1)); requantized |= -(requantized & (1 << (nb - 1))); requantized <<= MAD_F_FRACBITS - (nb - 1); /* requantize the sample */ /* s'' = C * (s''' + D) */ output[s] = mad_f_mul(requantized + quantclass->D, quantclass->C); /* s' = factor * s'' */ /* (to be performed by caller) */ } } /* * NAME: layer->II() * DESCRIPTION: decode a single Layer II frame */ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) { struct mad_header *header = &frame->header; struct mad_bitptr start; unsigned int index, sblimit, nbal, nch, bound, gr, ch, s, sb; unsigned char const *offsets; unsigned char allocation[2][32], scfsi[2][32], scalefactor[2][32][3]; mad_fixed_t samples[3]; nch = MAD_NCHANNELS(header); if (header->flags & MAD_FLAG_LSF_EXT) index = 4; else if (header->flags & MAD_FLAG_FREEFORMAT) goto freeformat; else { unsigned long bitrate_per_channel; bitrate_per_channel = header->bitrate; if (nch == 2) { bitrate_per_channel /= 2; # if defined(OPT_STRICT) /* * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and * 80 kbps bitrates in Layer II, but some encoders ignore this * restriction. We enforce it if OPT_STRICT is defined. */ if (bitrate_per_channel <= 28000 || bitrate_per_channel == 40000) { stream->error = MAD_ERROR_BADMODE; return -1; } # endif } else { /* nch == 1 */ if (bitrate_per_channel > 192000) { /* * ISO/IEC 11172-3 does not allow single channel mode for 224, 256, * 320, or 384 kbps bitrates in Layer II. */ stream->error = MAD_ERROR_BADMODE; return -1; } } if (bitrate_per_channel <= 48000) index = (header->samplerate == 32000) ? 3 : 2; else if (bitrate_per_channel <= 80000) index = 0; else { freeformat: index = (header->samplerate == 48000) ? 0 : 1; } } sblimit = sbquant_table[index].sblimit; offsets = sbquant_table[index].offsets; bound = 32; if (header->mode == MAD_MODE_JOINT_STEREO) { header->flags |= MAD_FLAG_I_STEREO; bound = 4 + header->mode_extension * 4; } if (bound > sblimit) bound = sblimit; start = stream->ptr; /* decode bit allocations */ for (sb = 0; sb < bound; ++sb) { nbal = bitalloc_table[offsets[sb]].nbal; for (ch = 0; ch < nch; ++ch) allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal); } for (sb = bound; sb < sblimit; ++sb) { nbal = bitalloc_table[offsets[sb]].nbal; allocation[0][sb] = allocation[1][sb] = mad_bit_read(&stream->ptr, nbal); } /* decode scalefactor selection info */ for (sb = 0; sb < sblimit; ++sb) { for (ch = 0; ch < nch; ++ch) { if (allocation[ch][sb]) scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2); } } /* check CRC word */ if (header->flags & MAD_FLAG_PROTECTION) { header->crc_check = mad_bit_crc(start, mad_bit_length(&start, &stream->ptr), header->crc_check); if (header->crc_check != header->crc_target && !(frame->options & MAD_OPTION_IGNORECRC)) { stream->error = MAD_ERROR_BADCRC; return -1; } } /* decode scalefactors */ for (sb = 0; sb < sblimit; ++sb) { for (ch = 0; ch < nch; ++ch) { if (allocation[ch][sb]) { scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6); switch (scfsi[ch][sb]) { case 2: scalefactor[ch][sb][2] = scalefactor[ch][sb][1] = scalefactor[ch][sb][0]; break; case 0: scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6); /* fall through */ case 1: case 3: scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6); } if (scfsi[ch][sb] & 1) scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1]; # if defined(OPT_STRICT) /* * Scalefactor index 63 does not appear in Table B.1 of * ISO/IEC 11172-3. Nonetheless, other implementations accept it, * so we only reject it if OPT_STRICT is defined. */ if (scalefactor[ch][sb][0] == 63 || scalefactor[ch][sb][1] == 63 || scalefactor[ch][sb][2] == 63) { stream->error = MAD_ERROR_BADSCALEFACTOR; return -1; } # endif } } } /* decode samples */ for (gr = 0; gr < 12; ++gr) { for (sb = 0; sb < bound; ++sb) { for (ch = 0; ch < nch; ++ch) { if ((index = allocation[ch][sb])) { index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; II_samples(&stream->ptr, &qc_table[index], samples); for (s = 0; s < 3; ++s) { frame->sbsample[ch][3 * gr + s][sb] = mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); } } else { for (s = 0; s < 3; ++s) frame->sbsample[ch][3 * gr + s][sb] = 0; } } } for (sb = bound; sb < sblimit; ++sb) { if ((index = allocation[0][sb])) { index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; II_samples(&stream->ptr, &qc_table[index], samples); for (ch = 0; ch < nch; ++ch) { for (s = 0; s < 3; ++s) { frame->sbsample[ch][3 * gr + s][sb] = mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); } } } else { for (ch = 0; ch < nch; ++ch) { for (s = 0; s < 3; ++s) frame->sbsample[ch][3 * gr + s][sb] = 0; } } } for (ch = 0; ch < nch; ++ch) { for (s = 0; s < 3; ++s) { for (sb = sblimit; sb < 32; ++sb) frame->sbsample[ch][3 * gr + s][sb] = 0; } } } return 0; } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/layer12.h000066400000000000000000000020721466261456500250250ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: layer12.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_LAYER12_H # define LIBMAD_LAYER12_H # include "stream.h" # include "frame.h" int mad_layer_I(struct mad_stream *, struct mad_frame *); int mad_layer_II(struct mad_stream *, struct mad_frame *); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/layer3.c000066400000000000000000002107641466261456500247510ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: layer3.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # include # ifdef HAVE_ASSERT_H # include # endif # ifdef HAVE_LIMITS_H # include # else # define CHAR_BIT 8 # endif # include "fixed.h" # include "bit.h" # include "stream.h" # include "frame.h" # include "huffman.h" # include "layer3.h" /* --- Layer III ----------------------------------------------------------- */ enum { count1table_select = 0x01, scalefac_scale = 0x02, preflag = 0x04, mixed_block_flag = 0x08 }; enum { I_STEREO = 0x1, MS_STEREO = 0x2 }; struct sideinfo { unsigned int main_data_begin; unsigned int private_bits; unsigned char scfsi[2]; struct granule { struct channel { /* from side info */ unsigned short part2_3_length; unsigned short big_values; unsigned short global_gain; unsigned short scalefac_compress; unsigned char flags; unsigned char block_type; unsigned char table_select[3]; unsigned char subblock_gain[3]; unsigned char region0_count; unsigned char region1_count; /* from main_data */ unsigned char scalefac[39]; /* scalefac_l and/or scalefac_s */ } ch[2]; } gr[2]; }; /* * scalefactor bit lengths * derived from section 2.4.2.7 of ISO/IEC 11172-3 */ static struct { unsigned char slen1; unsigned char slen2; } const sflen_table[16] = { { 0, 0 }, { 0, 1 }, { 0, 2 }, { 0, 3 }, { 3, 0 }, { 1, 1 }, { 1, 2 }, { 1, 3 }, { 2, 1 }, { 2, 2 }, { 2, 3 }, { 3, 1 }, { 3, 2 }, { 3, 3 }, { 4, 2 }, { 4, 3 } }; /* * number of LSF scalefactor band values * derived from section 2.4.3.2 of ISO/IEC 13818-3 */ static unsigned char const nsfb_table[6][3][4] = { { { 6, 5, 5, 5 }, { 9, 9, 9, 9 }, { 6, 9, 9, 9 } }, { { 6, 5, 7, 3 }, { 9, 9, 12, 6 }, { 6, 9, 12, 6 } }, { { 11, 10, 0, 0 }, { 18, 18, 0, 0 }, { 15, 18, 0, 0 } }, { { 7, 7, 7, 0 }, { 12, 12, 12, 0 }, { 6, 15, 12, 0 } }, { { 6, 6, 6, 3 }, { 12, 9, 9, 6 }, { 6, 12, 9, 6 } }, { { 8, 8, 5, 0 }, { 15, 12, 9, 0 }, { 6, 18, 9, 0 } } }; /* * MPEG-1 scalefactor band widths * derived from Table B.8 of ISO/IEC 11172-3 */ static unsigned char const sfb_48000_long[] = { 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 10, 12, 16, 18, 22, 28, 34, 40, 46, 54, 54, 192 }; static unsigned char const sfb_44100_long[] = { 4, 4, 4, 4, 4, 4, 6, 6, 8, 8, 10, 12, 16, 20, 24, 28, 34, 42, 50, 54, 76, 158 }; static unsigned char const sfb_32000_long[] = { 4, 4, 4, 4, 4, 4, 6, 6, 8, 10, 12, 16, 20, 24, 30, 38, 46, 56, 68, 84, 102, 26 }; static unsigned char const sfb_48000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 10, 10, 10, 12, 12, 12, 14, 14, 14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66 }; static unsigned char const sfb_44100_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56 }; static unsigned char const sfb_32000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12 }; static unsigned char const sfb_48000_mixed[] = { /* long */ 4, 4, 4, 4, 4, 4, 6, 6, /* short */ 4, 4, 4, 6, 6, 6, 6, 6, 6, 10, 10, 10, 12, 12, 12, 14, 14, 14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66 }; static unsigned char const sfb_44100_mixed[] = { /* long */ 4, 4, 4, 4, 4, 4, 6, 6, /* short */ 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56 }; static unsigned char const sfb_32000_mixed[] = { /* long */ 4, 4, 4, 4, 4, 4, 6, 6, /* short */ 4, 4, 4, 6, 6, 6, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12 }; /* * MPEG-2 scalefactor band widths * derived from Table B.2 of ISO/IEC 13818-3 */ static unsigned char const sfb_24000_long[] = { 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, 18, 22, 26, 32, 38, 46, 54, 62, 70, 76, 36 }; static unsigned char const sfb_22050_long[] = { 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 38, 46, 52, 60, 68, 58, 54 }; # define sfb_16000_long sfb_22050_long static unsigned char const sfb_24000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12 }; static unsigned char const sfb_22050_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 10, 10, 10, 14, 14, 14, 18, 18, 18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18 }; static unsigned char const sfb_16000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18 }; static unsigned char const sfb_24000_mixed[] = { /* long */ 6, 6, 6, 6, 6, 6, /* short */ 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12 }; static unsigned char const sfb_22050_mixed[] = { /* long */ 6, 6, 6, 6, 6, 6, /* short */ 6, 6, 6, 6, 6, 6, 8, 8, 8, 10, 10, 10, 14, 14, 14, 18, 18, 18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18 }; static unsigned char const sfb_16000_mixed[] = { /* long */ 6, 6, 6, 6, 6, 6, /* short */ 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18 }; /* * MPEG 2.5 scalefactor band widths * derived from public sources */ # define sfb_12000_long sfb_16000_long # define sfb_11025_long sfb_12000_long static unsigned char const sfb_8000_long[] = { 12, 12, 12, 12, 12, 12, 16, 20, 24, 28, 32, 40, 48, 56, 64, 76, 90, 2, 2, 2, 2, 2 }; # define sfb_12000_short sfb_16000_short # define sfb_11025_short sfb_12000_short static unsigned char const sfb_8000_short[] = { 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 26, 26 }; # define sfb_12000_mixed sfb_16000_mixed # define sfb_11025_mixed sfb_12000_mixed /* the 8000 Hz short block scalefactor bands do not break after the first 36 frequency lines, so this is probably wrong */ static unsigned char const sfb_8000_mixed[] = { /* long */ 12, 12, 12, /* short */ 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 26, 26 }; static struct { unsigned char const *l; unsigned char const *s; unsigned char const *m; } const sfbwidth_table[9] = { { sfb_48000_long, sfb_48000_short, sfb_48000_mixed }, { sfb_44100_long, sfb_44100_short, sfb_44100_mixed }, { sfb_32000_long, sfb_32000_short, sfb_32000_mixed }, { sfb_24000_long, sfb_24000_short, sfb_24000_mixed }, { sfb_22050_long, sfb_22050_short, sfb_22050_mixed }, { sfb_16000_long, sfb_16000_short, sfb_16000_mixed }, { sfb_12000_long, sfb_12000_short, sfb_12000_mixed }, { sfb_11025_long, sfb_11025_short, sfb_11025_mixed }, { sfb_8000_long, sfb_8000_short, sfb_8000_mixed } }; /* * scalefactor band preemphasis (used only when preflag is set) * derived from Table B.6 of ISO/IEC 11172-3 */ static unsigned char const pretab[22] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0 }; /* * table for requantization * * rq_table[x].mantissa * 2^(rq_table[x].exponent) = x^(4/3) */ static struct fixedfloat { unsigned long mantissa : 27; unsigned short exponent : 5; } const rq_table[8207] = { # include "rq_table.dat" }; /* * fractional powers of two * used for requantization and joint stereo decoding * * root_table[3 + x] = 2^(x/4) */ static mad_fixed_t const root_table[7] = { MAD_F(0x09837f05) /* 2^(-3/4) == 0.59460355750136 */, MAD_F(0x0b504f33) /* 2^(-2/4) == 0.70710678118655 */, MAD_F(0x0d744fcd) /* 2^(-1/4) == 0.84089641525371 */, MAD_F(0x10000000) /* 2^( 0/4) == 1.00000000000000 */, MAD_F(0x1306fe0a) /* 2^(+1/4) == 1.18920711500272 */, MAD_F(0x16a09e66) /* 2^(+2/4) == 1.41421356237310 */, MAD_F(0x1ae89f99) /* 2^(+3/4) == 1.68179283050743 */ }; /* * coefficients for aliasing reduction * derived from Table B.9 of ISO/IEC 11172-3 * * c[] = { -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 } * cs[i] = 1 / sqrt(1 + c[i]^2) * ca[i] = c[i] / sqrt(1 + c[i]^2) */ static mad_fixed_t const cs[8] = { +MAD_F(0x0db84a81) /* +0.857492926 */, +MAD_F(0x0e1b9d7f) /* +0.881741997 */, +MAD_F(0x0f31adcf) /* +0.949628649 */, +MAD_F(0x0fbba815) /* +0.983314592 */, +MAD_F(0x0feda417) /* +0.995517816 */, +MAD_F(0x0ffc8fc8) /* +0.999160558 */, +MAD_F(0x0fff964c) /* +0.999899195 */, +MAD_F(0x0ffff8d3) /* +0.999993155 */ }; static mad_fixed_t const ca[8] = { -MAD_F(0x083b5fe7) /* -0.514495755 */, -MAD_F(0x078c36d2) /* -0.471731969 */, -MAD_F(0x05039814) /* -0.313377454 */, -MAD_F(0x02e91dd1) /* -0.181913200 */, -MAD_F(0x0183603a) /* -0.094574193 */, -MAD_F(0x00a7cb87) /* -0.040965583 */, -MAD_F(0x003a2847) /* -0.014198569 */, -MAD_F(0x000f27b4) /* -0.003699975 */ }; /* * IMDCT coefficients for short blocks * derived from section 2.4.3.4.10.2 of ISO/IEC 11172-3 * * imdct_s[i/even][k] = cos((PI / 24) * (2 * (i / 2) + 7) * (2 * k + 1)) * imdct_s[i /odd][k] = cos((PI / 24) * (2 * (6 + (i-1)/2) + 7) * (2 * k + 1)) */ static mad_fixed_t const imdct_s[6][6] = { # include "imdct_s.dat" }; # if !defined(ASO_IMDCT) /* * windowing coefficients for long blocks * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3 * * window_l[i] = sin((PI / 36) * (i + 1/2)) */ static mad_fixed_t const window_l[36] = { MAD_F(0x00b2aa3e) /* 0.043619387 */, MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x03768962) /* 0.216439614 */, MAD_F(0x04cfb0e2) /* 0.300705800 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x07635284) /* 0.461748613 */, MAD_F(0x0898c779) /* 0.537299608 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0acf37ad) /* 0.675590208 */, MAD_F(0x0bcbe352) /* 0.737277337 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0d7e8807) /* 0.843391446 */, MAD_F(0x0e313245) /* 0.887010833 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0f426cb5) /* 0.953716951 */, MAD_F(0x0f9ee890) /* 0.976296007 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ffc19fd) /* 0.999048222 */, MAD_F(0x0ffc19fd) /* 0.999048222 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0f9ee890) /* 0.976296007 */, MAD_F(0x0f426cb5) /* 0.953716951 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0e313245) /* 0.887010833 */, MAD_F(0x0d7e8807) /* 0.843391446 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0bcbe352) /* 0.737277337 */, MAD_F(0x0acf37ad) /* 0.675590208 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0898c779) /* 0.537299608 */, MAD_F(0x07635284) /* 0.461748613 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x04cfb0e2) /* 0.300705800 */, MAD_F(0x03768962) /* 0.216439614 */, MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x00b2aa3e) /* 0.043619387 */, }; # endif /* ASO_IMDCT */ /* * windowing coefficients for short blocks * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3 * * window_s[i] = sin((PI / 12) * (i + 1/2)) */ static mad_fixed_t const window_s[12] = { MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x0216a2a2) /* 0.130526192 */, }; /* * coefficients for intensity stereo processing * derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3 * * is_ratio[i] = tan(i * (PI / 12)) * is_table[i] = is_ratio[i] / (1 + is_ratio[i]) */ static mad_fixed_t const is_table[7] = { MAD_F(0x00000000) /* 0.000000000 */, MAD_F(0x0361962f) /* 0.211324865 */, MAD_F(0x05db3d74) /* 0.366025404 */, MAD_F(0x08000000) /* 0.500000000 */, MAD_F(0x0a24c28c) /* 0.633974596 */, MAD_F(0x0c9e69d1) /* 0.788675135 */, MAD_F(0x10000000) /* 1.000000000 */ }; /* * coefficients for LSF intensity stereo processing * derived from section 2.4.3.2 of ISO/IEC 13818-3 * * is_lsf_table[0][i] = (1 / sqrt(sqrt(2)))^(i + 1) * is_lsf_table[1][i] = (1 / sqrt(2)) ^(i + 1) */ static mad_fixed_t const is_lsf_table[2][15] = { { MAD_F(0x0d744fcd) /* 0.840896415 */, MAD_F(0x0b504f33) /* 0.707106781 */, MAD_F(0x09837f05) /* 0.594603558 */, MAD_F(0x08000000) /* 0.500000000 */, MAD_F(0x06ba27e6) /* 0.420448208 */, MAD_F(0x05a8279a) /* 0.353553391 */, MAD_F(0x04c1bf83) /* 0.297301779 */, MAD_F(0x04000000) /* 0.250000000 */, MAD_F(0x035d13f3) /* 0.210224104 */, MAD_F(0x02d413cd) /* 0.176776695 */, MAD_F(0x0260dfc1) /* 0.148650889 */, MAD_F(0x02000000) /* 0.125000000 */, MAD_F(0x01ae89fa) /* 0.105112052 */, MAD_F(0x016a09e6) /* 0.088388348 */, MAD_F(0x01306fe1) /* 0.074325445 */ }, { MAD_F(0x0b504f33) /* 0.707106781 */, MAD_F(0x08000000) /* 0.500000000 */, MAD_F(0x05a8279a) /* 0.353553391 */, MAD_F(0x04000000) /* 0.250000000 */, MAD_F(0x02d413cd) /* 0.176776695 */, MAD_F(0x02000000) /* 0.125000000 */, MAD_F(0x016a09e6) /* 0.088388348 */, MAD_F(0x01000000) /* 0.062500000 */, MAD_F(0x00b504f3) /* 0.044194174 */, MAD_F(0x00800000) /* 0.031250000 */, MAD_F(0x005a827a) /* 0.022097087 */, MAD_F(0x00400000) /* 0.015625000 */, MAD_F(0x002d413d) /* 0.011048543 */, MAD_F(0x00200000) /* 0.007812500 */, MAD_F(0x0016a09e) /* 0.005524272 */ } }; /* * NAME: III_sideinfo() * DESCRIPTION: decode frame side information from a bitstream */ static enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch, int lsf, struct sideinfo *si, unsigned int *data_bitlen, unsigned int *priv_bitlen) { unsigned int ngr, gr, ch, i; enum mad_error result = MAD_ERROR_NONE; *data_bitlen = 0; *priv_bitlen = lsf ? ((nch == 1) ? 1 : 2) : ((nch == 1) ? 5 : 3); si->main_data_begin = mad_bit_read(ptr, lsf ? 8 : 9); si->private_bits = mad_bit_read(ptr, *priv_bitlen); ngr = 1; if (!lsf) { ngr = 2; for (ch = 0; ch < nch; ++ch) si->scfsi[ch] = mad_bit_read(ptr, 4); } for (gr = 0; gr < ngr; ++gr) { struct granule *granule = &si->gr[gr]; for (ch = 0; ch < nch; ++ch) { struct channel *channel = &granule->ch[ch]; channel->part2_3_length = mad_bit_read(ptr, 12); channel->big_values = mad_bit_read(ptr, 9); channel->global_gain = mad_bit_read(ptr, 8); channel->scalefac_compress = mad_bit_read(ptr, lsf ? 9 : 4); *data_bitlen += channel->part2_3_length; if (channel->big_values > 288 && result == 0) result = MAD_ERROR_BADBIGVALUES; channel->flags = 0; /* window_switching_flag */ if (mad_bit_read(ptr, 1)) { channel->block_type = mad_bit_read(ptr, 2); if (channel->block_type == 0 && result == 0) result = MAD_ERROR_BADBLOCKTYPE; if (!lsf && channel->block_type == 2 && si->scfsi[ch] && result == 0) result = MAD_ERROR_BADSCFSI; channel->region0_count = 7; channel->region1_count = 36; if (mad_bit_read(ptr, 1)) channel->flags |= mixed_block_flag; else if (channel->block_type == 2) channel->region0_count = 8; for (i = 0; i < 2; ++i) channel->table_select[i] = mad_bit_read(ptr, 5); # if defined(DEBUG) channel->table_select[2] = 4; /* not used */ # endif for (i = 0; i < 3; ++i) channel->subblock_gain[i] = mad_bit_read(ptr, 3); } else { channel->block_type = 0; for (i = 0; i < 3; ++i) channel->table_select[i] = mad_bit_read(ptr, 5); channel->region0_count = mad_bit_read(ptr, 4); channel->region1_count = mad_bit_read(ptr, 3); } /* [preflag,] scalefac_scale, count1table_select */ channel->flags |= mad_bit_read(ptr, lsf ? 2 : 3); } } return result; } /* * NAME: III_scalefactors_lsf() * DESCRIPTION: decode channel scalefactors for LSF from a bitstream */ static unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, struct channel *channel, struct channel *gr1ch, int mode_extension) { struct mad_bitptr start; unsigned int scalefac_compress, index, slen[4], part, n, i; unsigned char const *nsfb; start = *ptr; scalefac_compress = channel->scalefac_compress; index = (channel->block_type == 2) ? ((channel->flags & mixed_block_flag) ? 2 : 1) : 0; if (!((mode_extension & I_STEREO) && gr1ch)) { if (scalefac_compress < 400) { slen[0] = (scalefac_compress >> 4) / 5; slen[1] = (scalefac_compress >> 4) % 5; slen[2] = (scalefac_compress % 16) >> 2; slen[3] = scalefac_compress % 4; nsfb = nsfb_table[0][index]; } else if (scalefac_compress < 500) { scalefac_compress -= 400; slen[0] = (scalefac_compress >> 2) / 5; slen[1] = (scalefac_compress >> 2) % 5; slen[2] = scalefac_compress % 4; slen[3] = 0; nsfb = nsfb_table[1][index]; } else { scalefac_compress -= 500; slen[0] = scalefac_compress / 3; slen[1] = scalefac_compress % 3; slen[2] = 0; slen[3] = 0; channel->flags |= preflag; nsfb = nsfb_table[2][index]; } n = 0; for (part = 0; part < 4; ++part) { for (i = 0; i < nsfb[part]; ++i) channel->scalefac[n++] = mad_bit_read(ptr, slen[part]); } while (n < 39) channel->scalefac[n++] = 0; } else { /* (mode_extension & I_STEREO) && gr1ch (i.e. ch == 1) */ scalefac_compress >>= 1; if (scalefac_compress < 180) { slen[0] = scalefac_compress / 36; slen[1] = (scalefac_compress % 36) / 6; slen[2] = (scalefac_compress % 36) % 6; slen[3] = 0; nsfb = nsfb_table[3][index]; } else if (scalefac_compress < 244) { scalefac_compress -= 180; slen[0] = (scalefac_compress % 64) >> 4; slen[1] = (scalefac_compress % 16) >> 2; slen[2] = scalefac_compress % 4; slen[3] = 0; nsfb = nsfb_table[4][index]; } else { scalefac_compress -= 244; slen[0] = scalefac_compress / 3; slen[1] = scalefac_compress % 3; slen[2] = 0; slen[3] = 0; nsfb = nsfb_table[5][index]; } n = 0; for (part = 0; part < 4; ++part) { unsigned int max, is_pos; max = (1 << slen[part]) - 1; for (i = 0; i < nsfb[part]; ++i) { is_pos = mad_bit_read(ptr, slen[part]); channel->scalefac[n] = is_pos; gr1ch->scalefac[n++] = (is_pos == max); } } while (n < 39) { channel->scalefac[n] = 0; gr1ch->scalefac[n++] = 0; /* apparently not illegal */ } } return mad_bit_length(&start, ptr); } /* * NAME: III_scalefactors() * DESCRIPTION: decode channel scalefactors of one granule from a bitstream */ static unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, struct channel const *gr0ch, unsigned int scfsi) { struct mad_bitptr start; unsigned int slen1, slen2, sfbi; start = *ptr; slen1 = sflen_table[channel->scalefac_compress].slen1; slen2 = sflen_table[channel->scalefac_compress].slen2; if (channel->block_type == 2) { unsigned int nsfb; sfbi = 0; nsfb = (channel->flags & mixed_block_flag) ? 8 + 3 * 3 : 6 * 3; while (nsfb--) channel->scalefac[sfbi++] = mad_bit_read(ptr, slen1); nsfb = 6 * 3; while (nsfb--) channel->scalefac[sfbi++] = mad_bit_read(ptr, slen2); nsfb = 1 * 3; while (nsfb--) channel->scalefac[sfbi++] = 0; } else { /* channel->block_type != 2 */ if (scfsi & 0x8) { for (sfbi = 0; sfbi < 6; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 0; sfbi < 6; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); } if (scfsi & 0x4) { for (sfbi = 6; sfbi < 11; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 6; sfbi < 11; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); } if (scfsi & 0x2) { for (sfbi = 11; sfbi < 16; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 11; sfbi < 16; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); } if (scfsi & 0x1) { for (sfbi = 16; sfbi < 21; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 16; sfbi < 21; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); } channel->scalefac[21] = 0; } return mad_bit_length(&start, ptr); } /* * The Layer III formula for requantization and scaling is defined by * section 2.4.3.4.7.1 of ISO/IEC 11172-3, as follows: * * long blocks: * xr[i] = sign(is[i]) * abs(is[i])^(4/3) * * 2^((1/4) * (global_gain - 210)) * * 2^-(scalefac_multiplier * * (scalefac_l[sfb] + preflag * pretab[sfb])) * * short blocks: * xr[i] = sign(is[i]) * abs(is[i])^(4/3) * * 2^((1/4) * (global_gain - 210 - 8 * subblock_gain[w])) * * 2^-(scalefac_multiplier * scalefac_s[sfb][w]) * * where: * scalefac_multiplier = (scalefac_scale + 1) / 2 * * The routines III_exponents() and III_requantize() facilitate this * calculation. */ /* * NAME: III_exponents() * DESCRIPTION: calculate scalefactor exponents */ static void III_exponents(struct channel const *channel, unsigned char const *sfbwidth, signed int exponents[39]) { signed int gain; unsigned int scalefac_multiplier, sfbi; gain = (signed int) channel->global_gain - 210; scalefac_multiplier = (channel->flags & scalefac_scale) ? 2 : 1; if (channel->block_type == 2) { unsigned int l; signed int gain0, gain1, gain2; sfbi = l = 0; if (channel->flags & mixed_block_flag) { unsigned int premask; premask = (channel->flags & preflag) ? ~0 : 0; /* long block subbands 0-1 */ while (l < 36) { exponents[sfbi] = gain - (signed int) ((channel->scalefac[sfbi] + (pretab[sfbi] & premask)) << scalefac_multiplier); l += sfbwidth[sfbi++]; } } /* this is probably wrong for 8000 Hz short/mixed blocks */ gain0 = gain - 8 * (signed int) channel->subblock_gain[0]; gain1 = gain - 8 * (signed int) channel->subblock_gain[1]; gain2 = gain - 8 * (signed int) channel->subblock_gain[2]; while (l < 576) { exponents[sfbi + 0] = gain0 - (signed int) (channel->scalefac[sfbi + 0] << scalefac_multiplier); exponents[sfbi + 1] = gain1 - (signed int) (channel->scalefac[sfbi + 1] << scalefac_multiplier); exponents[sfbi + 2] = gain2 - (signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier); l += 3 * sfbwidth[sfbi]; sfbi += 3; } } else { /* channel->block_type != 2 */ if (channel->flags & preflag) { for (sfbi = 0; sfbi < 22; ++sfbi) { exponents[sfbi] = gain - (signed int) ((channel->scalefac[sfbi] + pretab[sfbi]) << scalefac_multiplier); } } else { for (sfbi = 0; sfbi < 22; ++sfbi) { exponents[sfbi] = gain - (signed int) (channel->scalefac[sfbi] << scalefac_multiplier); } } } } /* * NAME: III_requantize() * DESCRIPTION: requantize one (positive) value */ static mad_fixed_t III_requantize(unsigned int value, signed int exp) { mad_fixed_t requantized; signed int frac; struct fixedfloat const *power; frac = exp % 4; /* assumes sign(frac) == sign(exp) */ exp /= 4; power = &rq_table[value]; requantized = power->mantissa; exp += power->exponent; if (exp < 0) { if (-exp >= sizeof(mad_fixed_t) * CHAR_BIT) { /* underflow */ requantized = 0; } else { requantized += 1L << (-exp - 1); requantized >>= -exp; } } else { if (exp >= 5) { /* overflow */ # if defined(DEBUG) fprintf(stderr, "requantize overflow (%f * 2^%d)\n", mad_f_todouble(requantized), exp); # endif requantized = MAD_F_MAX; } else requantized <<= exp; } return frac ? mad_f_mul(requantized, root_table[3 + frac]) : requantized; } /* we must take care that sz >= bits and sz < sizeof(long) lest bits == 0 */ # define MASK(cache, sz, bits) \ (((cache) >> ((sz) - (bits))) & ((1 << (bits)) - 1)) # define MASK1BIT(cache, sz) \ ((cache) & (1 << ((sz) - 1))) /* * NAME: III_huffdecode() * DESCRIPTION: decode Huffman code words of one channel of one granule */ static enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576], struct channel *channel, unsigned char const *sfbwidth, unsigned int part2_length) { signed int exponents[39], exp; signed int const *expptr; struct mad_bitptr peek; signed int bits_left, cachesz; register mad_fixed_t *xrptr; mad_fixed_t const *sfbound; register unsigned long bitcache; bits_left = (signed) channel->part2_3_length - (signed) part2_length; if (bits_left < 0) return MAD_ERROR_BADPART3LEN; III_exponents(channel, sfbwidth, exponents); peek = *ptr; mad_bit_skip(ptr, bits_left); /* align bit reads to byte boundaries */ cachesz = mad_bit_bitsleft(&peek); cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7; bitcache = mad_bit_read(&peek, cachesz); bits_left -= cachesz; xrptr = &xr[0]; /* big_values */ { unsigned int region, rcount; struct hufftable const *entry; union huffpair const *table; unsigned int linbits, startbits, big_values, reqhits; mad_fixed_t reqcache[16]; sfbound = xrptr + *sfbwidth++; rcount = channel->region0_count + 1; entry = &mad_huff_pair_table[channel->table_select[region = 0]]; table = entry->table; linbits = entry->linbits; startbits = entry->startbits; if (table == 0) return MAD_ERROR_BADHUFFTABLE; expptr = &exponents[0]; exp = *expptr++; reqhits = 0; big_values = channel->big_values; while (big_values-- && cachesz + bits_left > 0) { union huffpair const *pair; unsigned int clumpsz, value; register mad_fixed_t requantized; if (xrptr == sfbound) { sfbound += *sfbwidth++; /* change table if region boundary */ if (--rcount == 0) { if (region == 0) rcount = channel->region1_count + 1; else rcount = 0; /* all remaining */ entry = &mad_huff_pair_table[channel->table_select[++region]]; table = entry->table; linbits = entry->linbits; startbits = entry->startbits; if (table == 0) return MAD_ERROR_BADHUFFTABLE; } if (exp != *expptr) { exp = *expptr; reqhits = 0; } ++expptr; } if (cachesz < 21) { unsigned int bits; bits = ((32 - 1 - 21) + (21 - cachesz)) & ~7; bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); cachesz += bits; bits_left -= bits; } /* hcod (0..19) */ clumpsz = startbits; pair = &table[MASK(bitcache, cachesz, clumpsz)]; while (!pair->final) { cachesz -= clumpsz; clumpsz = pair->ptr.bits; pair = &table[pair->ptr.offset + MASK(bitcache, cachesz, clumpsz)]; } cachesz -= pair->value.hlen; if (linbits) { /* x (0..14) */ value = pair->value.x; switch (value) { case 0: xrptr[0] = 0; break; case 15: if (cachesz < linbits + 2) { bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); cachesz += 16; bits_left -= 16; } value += MASK(bitcache, cachesz, linbits); cachesz -= linbits; requantized = III_requantize(value, exp); goto x_final; default: if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } x_final: xrptr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } /* y (0..14) */ value = pair->value.y; switch (value) { case 0: xrptr[1] = 0; break; case 15: if (cachesz < linbits + 1) { bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); cachesz += 16; bits_left -= 16; } value += MASK(bitcache, cachesz, linbits); cachesz -= linbits; requantized = III_requantize(value, exp); goto y_final; default: if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } y_final: xrptr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } } else { /* x (0..1) */ value = pair->value.x; if (value == 0) xrptr[0] = 0; else { if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } xrptr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } /* y (0..1) */ value = pair->value.y; if (value == 0) xrptr[1] = 0; else { if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } xrptr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } } xrptr += 2; } } if (cachesz + bits_left < 0) return MAD_ERROR_BADHUFFDATA; /* big_values overrun */ /* count1 */ { union huffquad const *table; register mad_fixed_t requantized; table = mad_huff_quad_table[channel->flags & count1table_select]; requantized = III_requantize(1, exp); while (cachesz + bits_left > 0 && xrptr <= &xr[572]) { union huffquad const *quad; /* hcod (1..6) */ if (cachesz < 10) { bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); cachesz += 16; bits_left -= 16; } quad = &table[MASK(bitcache, cachesz, 4)]; /* quad tables guaranteed to have at most one extra lookup */ if (!quad->final) { cachesz -= 4; quad = &table[quad->ptr.offset + MASK(bitcache, cachesz, quad->ptr.bits)]; } cachesz -= quad->value.hlen; if (xrptr == sfbound) { sfbound += *sfbwidth++; if (exp != *expptr) { exp = *expptr; requantized = III_requantize(1, exp); } ++expptr; } /* v (0..1) */ xrptr[0] = quad->value.v ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; /* w (0..1) */ xrptr[1] = quad->value.w ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; xrptr += 2; if (xrptr == sfbound) { sfbound += *sfbwidth++; if (exp != *expptr) { exp = *expptr; requantized = III_requantize(1, exp); } ++expptr; } /* x (0..1) */ xrptr[0] = quad->value.x ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; /* y (0..1) */ xrptr[1] = quad->value.y ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; xrptr += 2; } if (cachesz + bits_left < 0) { # if 0 && defined(DEBUG) fprintf(stderr, "huffman count1 overrun (%d bits)\n", -(cachesz + bits_left)); # endif /* technically the bitstream is misformatted, but apparently some encoders are just a bit sloppy with stuffing bits */ xrptr -= 4; } } assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT); # if 0 && defined(DEBUG) if (bits_left < 0) fprintf(stderr, "read %d bits too many\n", -bits_left); else if (cachesz + bits_left > 0) fprintf(stderr, "%d stuffing bits\n", cachesz + bits_left); # endif /* rzero */ while (xrptr < &xr[576]) { xrptr[0] = 0; xrptr[1] = 0; xrptr += 2; } return MAD_ERROR_NONE; } # undef MASK # undef MASK1BIT /* * NAME: III_reorder() * DESCRIPTION: reorder frequency lines of a short block into subband order */ static void III_reorder(mad_fixed_t xr[576], struct channel const *channel, unsigned char const sfbwidth[39]) { mad_fixed_t tmp[32][3][6]; unsigned int sb, l, f, w, sbw[3], sw[3]; /* this is probably wrong for 8000 Hz mixed blocks */ sb = 0; if (channel->flags & mixed_block_flag) { sb = 2; l = 0; while (l < 36) l += *sfbwidth++; } for (w = 0; w < 3; ++w) { sbw[w] = sb; sw[w] = 0; } f = *sfbwidth++; w = 0; for (l = 18 * sb; l < 576; ++l) { if (f-- == 0) { f = *sfbwidth++ - 1; w = (w + 1) % 3; } tmp[sbw[w]][w][sw[w]++] = xr[l]; if (sw[w] == 6) { sw[w] = 0; ++sbw[w]; } } memcpy(&xr[18 * sb], &tmp[sb], (576 - 18 * sb) * sizeof(mad_fixed_t)); } /* * NAME: III_stereo() * DESCRIPTION: perform joint stereo processing on a granule */ static enum mad_error III_stereo(mad_fixed_t xr[2][576], struct granule const *granule, struct mad_header *header, unsigned char const *sfbwidth) { short modes[39]; unsigned int sfbi, l, n, i; if (granule->ch[0].block_type != granule->ch[1].block_type || (granule->ch[0].flags & mixed_block_flag) != (granule->ch[1].flags & mixed_block_flag)) return MAD_ERROR_BADSTEREO; for (i = 0; i < 39; ++i) modes[i] = header->mode_extension; /* intensity stereo */ if (header->mode_extension & I_STEREO) { struct channel const *right_ch = &granule->ch[1]; mad_fixed_t const *right_xr = xr[1]; unsigned int is_pos; header->flags |= MAD_FLAG_I_STEREO; /* first determine which scalefactor bands are to be processed */ if (right_ch->block_type == 2) { unsigned int lower, start, max, bound[3], w; lower = start = max = bound[0] = bound[1] = bound[2] = 0; sfbi = l = 0; if (right_ch->flags & mixed_block_flag) { while (l < 36) { n = sfbwidth[sfbi++]; for (i = 0; i < n; ++i) { if (right_xr[i]) { lower = sfbi; break; } } right_xr += n; l += n; } start = sfbi; } w = 0; while (l < 576) { n = sfbwidth[sfbi++]; for (i = 0; i < n; ++i) { if (right_xr[i]) { max = bound[w] = sfbi; break; } } right_xr += n; l += n; w = (w + 1) % 3; } if (max) lower = start; /* long blocks */ for (i = 0; i < lower; ++i) modes[i] = header->mode_extension & ~I_STEREO; /* short blocks */ w = 0; for (i = start; i < max; ++i) { if (i < bound[w]) modes[i] = header->mode_extension & ~I_STEREO; w = (w + 1) % 3; } } else { /* right_ch->block_type != 2 */ unsigned int bound; bound = 0; for (sfbi = l = 0; l < 576; l += n) { n = sfbwidth[sfbi++]; for (i = 0; i < n; ++i) { if (right_xr[i]) { bound = sfbi; break; } } right_xr += n; } for (i = 0; i < bound; ++i) modes[i] = header->mode_extension & ~I_STEREO; } /* now do the actual processing */ if (header->flags & MAD_FLAG_LSF_EXT) { unsigned char const *illegal_pos = granule[1].ch[1].scalefac; mad_fixed_t const *lsf_scale; /* intensity_scale */ lsf_scale = is_lsf_table[right_ch->scalefac_compress & 0x1]; for (sfbi = l = 0; l < 576; ++sfbi, l += n) { n = sfbwidth[sfbi]; if (!(modes[sfbi] & I_STEREO)) continue; if (illegal_pos[sfbi]) { modes[sfbi] &= ~I_STEREO; continue; } is_pos = right_ch->scalefac[sfbi]; for (i = 0; i < n; ++i) { register mad_fixed_t left; left = xr[0][l + i]; if (is_pos == 0) xr[1][l + i] = left; else { register mad_fixed_t opposite; opposite = mad_f_mul(left, lsf_scale[(is_pos - 1) / 2]); if (is_pos & 1) { xr[0][l + i] = opposite; xr[1][l + i] = left; } else xr[1][l + i] = opposite; } } } } else { /* !(header->flags & MAD_FLAG_LSF_EXT) */ for (sfbi = l = 0; l < 576; ++sfbi, l += n) { n = sfbwidth[sfbi]; if (!(modes[sfbi] & I_STEREO)) continue; is_pos = right_ch->scalefac[sfbi]; if (is_pos >= 7) { /* illegal intensity position */ modes[sfbi] &= ~I_STEREO; continue; } for (i = 0; i < n; ++i) { register mad_fixed_t left; left = xr[0][l + i]; xr[0][l + i] = mad_f_mul(left, is_table[ is_pos]); xr[1][l + i] = mad_f_mul(left, is_table[6 - is_pos]); } } } } /* middle/side stereo */ if (header->mode_extension & MS_STEREO) { register mad_fixed_t invsqrt2; header->flags |= MAD_FLAG_MS_STEREO; invsqrt2 = root_table[3 + -2]; for (sfbi = l = 0; l < 576; ++sfbi, l += n) { n = sfbwidth[sfbi]; if (modes[sfbi] != MS_STEREO) continue; for (i = 0; i < n; ++i) { register mad_fixed_t m, s; m = xr[0][l + i]; s = xr[1][l + i]; xr[0][l + i] = mad_f_mul(m + s, invsqrt2); /* l = (m + s) / sqrt(2) */ xr[1][l + i] = mad_f_mul(m - s, invsqrt2); /* r = (m - s) / sqrt(2) */ } } } return MAD_ERROR_NONE; } /* * NAME: III_aliasreduce() * DESCRIPTION: perform frequency line alias reduction */ static void III_aliasreduce(mad_fixed_t xr[576], int lines) { mad_fixed_t const *bound; int i; bound = &xr[lines]; for (xr += 18; xr < bound; xr += 18) { for (i = 0; i < 8; ++i) { register mad_fixed_t a, b; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; a = xr[-1 - i]; b = xr[ i]; # if defined(ASO_ZEROCHECK) if (a | b) { # endif MAD_F_ML0(hi, lo, a, cs[i]); MAD_F_MLA(hi, lo, -b, ca[i]); xr[-1 - i] = MAD_F_MLZ(hi, lo); MAD_F_ML0(hi, lo, b, cs[i]); MAD_F_MLA(hi, lo, a, ca[i]); xr[ i] = MAD_F_MLZ(hi, lo); # if defined(ASO_ZEROCHECK) } # endif } } } # if defined(ASO_IMDCT) void III_imdct_l(mad_fixed_t const [18], mad_fixed_t [36], unsigned int); # else # if 1 static void fastsdct(mad_fixed_t const x[9], mad_fixed_t y[18]) { mad_fixed_t a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12; mad_fixed_t a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25; mad_fixed_t m0, m1, m2, m3, m4, m5, m6, m7; enum { c0 = MAD_F(0x1f838b8d), /* 2 * cos( 1 * PI / 18) */ c1 = MAD_F(0x1bb67ae8), /* 2 * cos( 3 * PI / 18) */ c2 = MAD_F(0x18836fa3), /* 2 * cos( 4 * PI / 18) */ c3 = MAD_F(0x1491b752), /* 2 * cos( 5 * PI / 18) */ c4 = MAD_F(0x0af1d43a), /* 2 * cos( 7 * PI / 18) */ c5 = MAD_F(0x058e86a0), /* 2 * cos( 8 * PI / 18) */ c6 = -MAD_F(0x1e11f642) /* 2 * cos(16 * PI / 18) */ }; a0 = x[3] + x[5]; a1 = x[3] - x[5]; a2 = x[6] + x[2]; a3 = x[6] - x[2]; a4 = x[1] + x[7]; a5 = x[1] - x[7]; a6 = x[8] + x[0]; a7 = x[8] - x[0]; a8 = a0 + a2; a9 = a0 - a2; a10 = a0 - a6; a11 = a2 - a6; a12 = a8 + a6; a13 = a1 - a3; a14 = a13 + a7; a15 = a3 + a7; a16 = a1 - a7; a17 = a1 + a3; m0 = mad_f_mul(a17, -c3); m1 = mad_f_mul(a16, -c0); m2 = mad_f_mul(a15, -c4); m3 = mad_f_mul(a14, -c1); m4 = mad_f_mul(a5, -c1); m5 = mad_f_mul(a11, -c6); m6 = mad_f_mul(a10, -c5); m7 = mad_f_mul(a9, -c2); a18 = x[4] + a4; a19 = 2 * x[4] - a4; a20 = a19 + m5; a21 = a19 - m5; a22 = a19 + m6; a23 = m4 + m2; a24 = m4 - m2; a25 = m4 + m1; /* output to every other slot for convenience */ y[ 0] = a18 + a12; y[ 2] = m0 - a25; y[ 4] = m7 - a20; y[ 6] = m3; y[ 8] = a21 - m6; y[10] = a24 - m1; y[12] = a12 - 2 * a18; y[14] = a23 + m0; y[16] = a22 + m7; } static inline void sdctII(mad_fixed_t const x[18], mad_fixed_t X[18]) { mad_fixed_t tmp[9]; int i; /* scale[i] = 2 * cos(PI * (2 * i + 1) / (2 * 18)) */ static mad_fixed_t const scale[9] = { MAD_F(0x1fe0d3b4), MAD_F(0x1ee8dd47), MAD_F(0x1d007930), MAD_F(0x1a367e59), MAD_F(0x16a09e66), MAD_F(0x125abcf8), MAD_F(0x0d8616bc), MAD_F(0x08483ee1), MAD_F(0x02c9fad7) }; /* divide the 18-point SDCT-II into two 9-point SDCT-IIs */ /* even input butterfly */ for (i = 0; i < 9; i += 3) { tmp[i + 0] = x[i + 0] + x[18 - (i + 0) - 1]; tmp[i + 1] = x[i + 1] + x[18 - (i + 1) - 1]; tmp[i + 2] = x[i + 2] + x[18 - (i + 2) - 1]; } fastsdct(tmp, &X[0]); /* odd input butterfly and scaling */ for (i = 0; i < 9; i += 3) { tmp[i + 0] = mad_f_mul(x[i + 0] - x[18 - (i + 0) - 1], scale[i + 0]); tmp[i + 1] = mad_f_mul(x[i + 1] - x[18 - (i + 1) - 1], scale[i + 1]); tmp[i + 2] = mad_f_mul(x[i + 2] - x[18 - (i + 2) - 1], scale[i + 2]); } fastsdct(tmp, &X[1]); /* output accumulation */ for (i = 3; i < 18; i += 8) { X[i + 0] -= X[(i + 0) - 2]; X[i + 2] -= X[(i + 2) - 2]; X[i + 4] -= X[(i + 4) - 2]; X[i + 6] -= X[(i + 6) - 2]; } } static inline void dctIV(mad_fixed_t const y[18], mad_fixed_t X[18]) { mad_fixed_t tmp[18]; int i; /* scale[i] = 2 * cos(PI * (2 * i + 1) / (4 * 18)) */ static mad_fixed_t const scale[18] = { MAD_F(0x1ff833fa), MAD_F(0x1fb9ea93), MAD_F(0x1f3dd120), MAD_F(0x1e84d969), MAD_F(0x1d906bcf), MAD_F(0x1c62648b), MAD_F(0x1afd100f), MAD_F(0x1963268b), MAD_F(0x1797c6a4), MAD_F(0x159e6f5b), MAD_F(0x137af940), MAD_F(0x11318ef3), MAD_F(0x0ec6a507), MAD_F(0x0c3ef153), MAD_F(0x099f61c5), MAD_F(0x06ed12c5), MAD_F(0x042d4544), MAD_F(0x0165547c) }; /* scaling */ for (i = 0; i < 18; i += 3) { tmp[i + 0] = mad_f_mul(y[i + 0], scale[i + 0]); tmp[i + 1] = mad_f_mul(y[i + 1], scale[i + 1]); tmp[i + 2] = mad_f_mul(y[i + 2], scale[i + 2]); } /* SDCT-II */ sdctII(tmp, X); /* scale reduction and output accumulation */ X[0] /= 2; for (i = 1; i < 17; i += 4) { X[i + 0] = X[i + 0] / 2 - X[(i + 0) - 1]; X[i + 1] = X[i + 1] / 2 - X[(i + 1) - 1]; X[i + 2] = X[i + 2] / 2 - X[(i + 2) - 1]; X[i + 3] = X[i + 3] / 2 - X[(i + 3) - 1]; } X[17] = X[17] / 2 - X[16]; } /* * NAME: imdct36 * DESCRIPTION: perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm */ static inline void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36]) { mad_fixed_t tmp[18]; int i; /* DCT-IV */ dctIV(x, tmp); /* convert 18-point DCT-IV to 36-point IMDCT */ for (i = 0; i < 9; i += 3) { y[i + 0] = tmp[9 + (i + 0)]; y[i + 1] = tmp[9 + (i + 1)]; y[i + 2] = tmp[9 + (i + 2)]; } for (i = 9; i < 27; i += 3) { y[i + 0] = -tmp[36 - (9 + (i + 0)) - 1]; y[i + 1] = -tmp[36 - (9 + (i + 1)) - 1]; y[i + 2] = -tmp[36 - (9 + (i + 2)) - 1]; } for (i = 27; i < 36; i += 3) { y[i + 0] = -tmp[(i + 0) - 27]; y[i + 1] = -tmp[(i + 1) - 27]; y[i + 2] = -tmp[(i + 2) - 27]; } } # else /* * NAME: imdct36 * DESCRIPTION: perform X[18]->x[36] IMDCT */ static inline void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36]) { mad_fixed_t t0, t1, t2, t3, t4, t5, t6, t7; mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; MAD_F_ML0(hi, lo, X[4], MAD_F(0x0ec835e8)); MAD_F_MLA(hi, lo, X[13], MAD_F(0x061f78aa)); t6 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, (t14 = X[1] - X[10]), -MAD_F(0x061f78aa)); MAD_F_MLA(hi, lo, (t15 = X[7] + X[16]), -MAD_F(0x0ec835e8)); t0 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, (t8 = X[0] - X[11] - X[12]), MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, (t9 = X[2] - X[9] - X[14]), MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, (t10 = X[3] - X[8] - X[15]), -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, (t11 = X[5] - X[6] - X[17]), -MAD_F(0x0fdcf549)); x[7] = MAD_F_MLZ(hi, lo); x[10] = -x[7]; MAD_F_ML0(hi, lo, t8, -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, t9, MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, t10, MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, t11, -MAD_F(0x09bd7ca0)); x[19] = x[34] = MAD_F_MLZ(hi, lo) - t0; t12 = X[0] - X[3] + X[8] - X[11] - X[12] + X[15]; t13 = X[2] + X[5] - X[6] - X[9] - X[14] - X[17]; MAD_F_ML0(hi, lo, t12, -MAD_F(0x0ec835e8)); MAD_F_MLA(hi, lo, t13, MAD_F(0x061f78aa)); x[22] = x[31] = MAD_F_MLZ(hi, lo) + t0; MAD_F_ML0(hi, lo, X[1], -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, X[7], MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, X[10], -MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, X[16], MAD_F(0x0cb19346)); t1 = MAD_F_MLZ(hi, lo) + t6; MAD_F_ML0(hi, lo, X[0], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0f9ee890)); x[6] = MAD_F_MLZ(hi, lo) + t1; x[11] = -x[6]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x04cfb0e2)); x[23] = x[30] = MAD_F_MLZ(hi, lo) + t1; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0acf37ad)); x[18] = x[35] = MAD_F_MLZ(hi, lo) - t1; MAD_F_ML0(hi, lo, X[4], MAD_F(0x061f78aa)); MAD_F_MLA(hi, lo, X[13], -MAD_F(0x0ec835e8)); t7 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, X[1], -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, X[7], MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, X[10], MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, X[16], -MAD_F(0x09bd7ca0)); t2 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, X[0], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x0f426cb5)); x[5] = MAD_F_MLZ(hi, lo); x[12] = -x[5]; MAD_F_ML0(hi, lo, X[0], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0bcbe352)); x[0] = MAD_F_MLZ(hi, lo) + t2; x[17] = -x[0]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x03768962)); x[24] = x[29] = MAD_F_MLZ(hi, lo) + t2; MAD_F_ML0(hi, lo, X[1], -MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, X[7], -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, X[10], MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, X[16], MAD_F(0x0fdcf549)); t3 = MAD_F_MLZ(hi, lo) + t7; MAD_F_ML0(hi, lo, X[0], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0ffc19fd)); x[8] = MAD_F_MLZ(hi, lo) + t3; x[9] = -x[8]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x07635284)); x[21] = x[32] = MAD_F_MLZ(hi, lo) + t3; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0898c779)); x[20] = x[33] = MAD_F_MLZ(hi, lo) - t3; MAD_F_ML0(hi, lo, t14, -MAD_F(0x0ec835e8)); MAD_F_MLA(hi, lo, t15, MAD_F(0x061f78aa)); t4 = MAD_F_MLZ(hi, lo) - t7; MAD_F_ML0(hi, lo, t12, MAD_F(0x061f78aa)); MAD_F_MLA(hi, lo, t13, MAD_F(0x0ec835e8)); x[4] = MAD_F_MLZ(hi, lo) + t4; x[13] = -x[4]; MAD_F_ML0(hi, lo, t8, MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, t9, -MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, t10, MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, t11, -MAD_F(0x0cb19346)); x[1] = MAD_F_MLZ(hi, lo) + t4; x[16] = -x[1]; MAD_F_ML0(hi, lo, t8, -MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, t9, -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, t10, -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, t11, -MAD_F(0x0216a2a2)); x[25] = x[28] = MAD_F_MLZ(hi, lo) + t4; MAD_F_ML0(hi, lo, X[1], -MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, X[7], -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, X[10], -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, X[16], -MAD_F(0x0216a2a2)); t5 = MAD_F_MLZ(hi, lo) - t6; MAD_F_ML0(hi, lo, X[0], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0d7e8807)); x[2] = MAD_F_MLZ(hi, lo) + t5; x[15] = -x[2]; MAD_F_ML0(hi, lo, X[0], MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x0e313245)); x[3] = MAD_F_MLZ(hi, lo) + t5; x[14] = -x[3]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x00b2aa3e)); x[26] = x[27] = MAD_F_MLZ(hi, lo) + t5; } # endif /* * NAME: III_imdct_l() * DESCRIPTION: perform IMDCT and windowing for long blocks */ static void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], unsigned int block_type) { unsigned int i; /* IMDCT */ imdct36(X, z); /* windowing */ switch (block_type) { case 0: /* normal window */ # if defined(ASO_INTERLEAVE1) { register mad_fixed_t tmp1, tmp2; tmp1 = window_l[0]; tmp2 = window_l[1]; for (i = 0; i < 34; i += 2) { z[i + 0] = mad_f_mul(z[i + 0], tmp1); tmp1 = window_l[i + 2]; z[i + 1] = mad_f_mul(z[i + 1], tmp2); tmp2 = window_l[i + 3]; } z[34] = mad_f_mul(z[34], tmp1); z[35] = mad_f_mul(z[35], tmp2); } # elif defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = z[0]; tmp2 = window_l[0]; for (i = 0; i < 35; ++i) { z[i] = mad_f_mul(tmp1, tmp2); tmp1 = z[i + 1]; tmp2 = window_l[i + 1]; } z[35] = mad_f_mul(tmp1, tmp2); } # elif 1 for (i = 0; i < 36; i += 4) { z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]); z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]); z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]); z[i + 3] = mad_f_mul(z[i + 3], window_l[i + 3]); } # else for (i = 0; i < 36; ++i) z[i] = mad_f_mul(z[i], window_l[i]); # endif break; case 1: /* start block */ for (i = 0; i < 18; i += 3) { z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]); z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]); z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]); } /* (i = 18; i < 24; ++i) z[i] unchanged */ for (i = 24; i < 30; ++i) z[i] = mad_f_mul(z[i], window_s[i - 18]); for (i = 30; i < 36; ++i) z[i] = 0; break; case 3: /* stop block */ for (i = 0; i < 6; ++i) z[i] = 0; for (i = 6; i < 12; ++i) z[i] = mad_f_mul(z[i], window_s[i - 6]); /* (i = 12; i < 18; ++i) z[i] unchanged */ for (i = 18; i < 36; i += 3) { z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]); z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]); z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]); } break; } } # endif /* ASO_IMDCT */ /* * NAME: III_imdct_s() * DESCRIPTION: perform IMDCT and windowing for short blocks */ static void III_imdct_s(mad_fixed_t const X[18], mad_fixed_t z[36]) { mad_fixed_t y[36], *yptr; mad_fixed_t const *wptr; int w, i; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; /* IMDCT */ yptr = &y[0]; for (w = 0; w < 3; ++w) { register mad_fixed_t const (*s)[6]; s = imdct_s; for (i = 0; i < 3; ++i) { MAD_F_ML0(hi, lo, X[0], (*s)[0]); MAD_F_MLA(hi, lo, X[1], (*s)[1]); MAD_F_MLA(hi, lo, X[2], (*s)[2]); MAD_F_MLA(hi, lo, X[3], (*s)[3]); MAD_F_MLA(hi, lo, X[4], (*s)[4]); MAD_F_MLA(hi, lo, X[5], (*s)[5]); yptr[i + 0] = MAD_F_MLZ(hi, lo); yptr[5 - i] = -yptr[i + 0]; ++s; MAD_F_ML0(hi, lo, X[0], (*s)[0]); MAD_F_MLA(hi, lo, X[1], (*s)[1]); MAD_F_MLA(hi, lo, X[2], (*s)[2]); MAD_F_MLA(hi, lo, X[3], (*s)[3]); MAD_F_MLA(hi, lo, X[4], (*s)[4]); MAD_F_MLA(hi, lo, X[5], (*s)[5]); yptr[ i + 6] = MAD_F_MLZ(hi, lo); yptr[11 - i] = yptr[i + 6]; ++s; } yptr += 12; X += 6; } /* windowing, overlapping and concatenation */ yptr = &y[0]; wptr = &window_s[0]; for (i = 0; i < 6; ++i) { z[i + 0] = 0; z[i + 6] = mad_f_mul(yptr[ 0 + 0], wptr[0]); MAD_F_ML0(hi, lo, yptr[ 0 + 6], wptr[6]); MAD_F_MLA(hi, lo, yptr[12 + 0], wptr[0]); z[i + 12] = MAD_F_MLZ(hi, lo); MAD_F_ML0(hi, lo, yptr[12 + 6], wptr[6]); MAD_F_MLA(hi, lo, yptr[24 + 0], wptr[0]); z[i + 18] = MAD_F_MLZ(hi, lo); z[i + 24] = mad_f_mul(yptr[24 + 6], wptr[6]); z[i + 30] = 0; ++yptr; ++wptr; } } /* * NAME: III_overlap() * DESCRIPTION: perform overlap-add of windowed IMDCT outputs */ static void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18], mad_fixed_t sample[18][32], unsigned int sb) { unsigned int i; # if defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = overlap[0]; tmp2 = overlap[1]; for (i = 0; i < 16; i += 2) { sample[i + 0][sb] = output[i + 0 + 0] + tmp1; overlap[i + 0] = output[i + 0 + 18]; tmp1 = overlap[i + 2]; sample[i + 1][sb] = output[i + 1 + 0] + tmp2; overlap[i + 1] = output[i + 1 + 18]; tmp2 = overlap[i + 3]; } sample[16][sb] = output[16 + 0] + tmp1; overlap[16] = output[16 + 18]; sample[17][sb] = output[17 + 0] + tmp2; overlap[17] = output[17 + 18]; } # elif 0 for (i = 0; i < 18; i += 2) { sample[i + 0][sb] = output[i + 0 + 0] + overlap[i + 0]; overlap[i + 0] = output[i + 0 + 18]; sample[i + 1][sb] = output[i + 1 + 0] + overlap[i + 1]; overlap[i + 1] = output[i + 1 + 18]; } # else for (i = 0; i < 18; ++i) { sample[i][sb] = output[i + 0] + overlap[i]; overlap[i] = output[i + 18]; } # endif } /* * NAME: III_overlap_z() * DESCRIPTION: perform "overlap-add" of zero IMDCT outputs */ static inline void III_overlap_z(mad_fixed_t overlap[18], mad_fixed_t sample[18][32], unsigned int sb) { unsigned int i; # if defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = overlap[0]; tmp2 = overlap[1]; for (i = 0; i < 16; i += 2) { sample[i + 0][sb] = tmp1; overlap[i + 0] = 0; tmp1 = overlap[i + 2]; sample[i + 1][sb] = tmp2; overlap[i + 1] = 0; tmp2 = overlap[i + 3]; } sample[16][sb] = tmp1; overlap[16] = 0; sample[17][sb] = tmp2; overlap[17] = 0; } # else for (i = 0; i < 18; ++i) { sample[i][sb] = overlap[i]; overlap[i] = 0; } # endif } /* * NAME: III_freqinver() * DESCRIPTION: perform subband frequency inversion for odd sample lines */ static void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb) { unsigned int i; # if 1 || defined(ASO_INTERLEAVE1) || defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = sample[1][sb]; tmp2 = sample[3][sb]; for (i = 1; i < 13; i += 4) { sample[i + 0][sb] = -tmp1; tmp1 = sample[i + 4][sb]; sample[i + 2][sb] = -tmp2; tmp2 = sample[i + 6][sb]; } sample[13][sb] = -tmp1; tmp1 = sample[17][sb]; sample[15][sb] = -tmp2; sample[17][sb] = -tmp1; } # else for (i = 1; i < 18; i += 2) sample[i][sb] = -sample[i][sb]; # endif } /* * NAME: III_decode() * DESCRIPTION: decode frame main_data */ static enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, struct sideinfo *si, unsigned int nch) { struct mad_header *header = &frame->header; unsigned int sfreqi, ngr, gr; { unsigned int sfreq; sfreq = header->samplerate; if (header->flags & MAD_FLAG_MPEG_2_5_EXT) sfreq *= 2; /* 48000 => 0, 44100 => 1, 32000 => 2, 24000 => 3, 22050 => 4, 16000 => 5 */ sfreqi = ((sfreq >> 7) & 0x000f) + ((sfreq >> 15) & 0x0001) - 8; if (header->flags & MAD_FLAG_MPEG_2_5_EXT) sfreqi += 3; } /* scalefactors, Huffman decoding, requantization */ ngr = (header->flags & MAD_FLAG_LSF_EXT) ? 1 : 2; for (gr = 0; gr < ngr; ++gr) { struct granule *granule = &si->gr[gr]; unsigned char const *sfbwidth[2]; mad_fixed_t xr[2][576]; unsigned int ch; enum mad_error error; for (ch = 0; ch < nch; ++ch) { struct channel *channel = &granule->ch[ch]; unsigned int part2_length; sfbwidth[ch] = sfbwidth_table[sfreqi].l; if (channel->block_type == 2) { sfbwidth[ch] = (channel->flags & mixed_block_flag) ? sfbwidth_table[sfreqi].m : sfbwidth_table[sfreqi].s; } if (header->flags & MAD_FLAG_LSF_EXT) { part2_length = III_scalefactors_lsf(ptr, channel, ch == 0 ? 0 : &si->gr[1].ch[1], header->mode_extension); } else { part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], gr == 0 ? 0 : si->scfsi[ch]); } error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length); if (error) return error; } /* joint stereo processing */ if (header->mode == MAD_MODE_JOINT_STEREO && header->mode_extension) { error = III_stereo(xr, granule, header, sfbwidth[0]); if (error) return error; } /* reordering, alias reduction, IMDCT, overlap-add, frequency inversion */ for (ch = 0; ch < nch; ++ch) { struct channel const *channel = &granule->ch[ch]; mad_fixed_t (*sample)[32] = &frame->sbsample[ch][18 * gr]; unsigned int sb, l, i, sblimit; mad_fixed_t output[36]; if (channel->block_type == 2) { III_reorder(xr[ch], channel, sfbwidth[ch]); # if !defined(OPT_STRICT) /* * According to ISO/IEC 11172-3, "Alias reduction is not applied for * granules with block_type == 2 (short block)." However, other * sources suggest alias reduction should indeed be performed on the * lower two subbands of mixed blocks. Most other implementations do * this, so by default we will too. */ if (channel->flags & mixed_block_flag) III_aliasreduce(xr[ch], 36); # endif } else III_aliasreduce(xr[ch], 576); l = 0; /* subbands 0-1 */ if (channel->block_type != 2 || (channel->flags & mixed_block_flag)) { unsigned int block_type; block_type = channel->block_type; if (channel->flags & mixed_block_flag) block_type = 0; /* long blocks */ for (sb = 0; sb < 2; ++sb, l += 18) { III_imdct_l(&xr[ch][l], output, block_type); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); } } else { /* short blocks */ for (sb = 0; sb < 2; ++sb, l += 18) { III_imdct_s(&xr[ch][l], output); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); } } III_freqinver(sample, 1); /* (nonzero) subbands 2-31 */ i = 576; while (i > 36 && xr[ch][i - 1] == 0) --i; sblimit = 32 - (576 - i) / 18; if (channel->block_type != 2) { /* long blocks */ for (sb = 2; sb < sblimit; ++sb, l += 18) { III_imdct_l(&xr[ch][l], output, channel->block_type); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); if (sb & 1) III_freqinver(sample, sb); } } else { /* short blocks */ for (sb = 2; sb < sblimit; ++sb, l += 18) { III_imdct_s(&xr[ch][l], output); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); if (sb & 1) III_freqinver(sample, sb); } } /* remaining (zero) subbands */ for (sb = sblimit; sb < 32; ++sb) { III_overlap_z((*frame->overlap)[ch][sb], sample, sb); if (sb & 1) III_freqinver(sample, sb); } } } return MAD_ERROR_NONE; } /* * NAME: layer->III() * DESCRIPTION: decode a single Layer III frame */ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) { struct mad_header *header = &frame->header; unsigned int nch, priv_bitlen, next_md_begin = 0; unsigned int si_len, data_bitlen, md_len; unsigned int frame_space, frame_used, frame_free; struct mad_bitptr ptr; struct sideinfo si; enum mad_error error; int result = 0; /* allocate Layer III dynamic structures */ if (stream->main_data == 0) { stream->main_data = malloc(MAD_BUFFER_MDLEN); if (stream->main_data == 0) { stream->error = MAD_ERROR_NOMEM; return -1; } } if (frame->overlap == 0) { frame->overlap = calloc(2 * 32 * 18, sizeof(mad_fixed_t)); if (frame->overlap == 0) { stream->error = MAD_ERROR_NOMEM; return -1; } } nch = MAD_NCHANNELS(header); si_len = (header->flags & MAD_FLAG_LSF_EXT) ? (nch == 1 ? 9 : 17) : (nch == 1 ? 17 : 32); /* check frame sanity */ if (stream->next_frame - mad_bit_nextbyte(&stream->ptr) < (signed int) si_len) { stream->error = MAD_ERROR_BADFRAMELEN; stream->md_len = 0; return -1; } /* check CRC word */ if (header->flags & MAD_FLAG_PROTECTION) { header->crc_check = mad_bit_crc(stream->ptr, si_len * CHAR_BIT, header->crc_check); if (header->crc_check != header->crc_target && !(frame->options & MAD_OPTION_IGNORECRC)) { stream->error = MAD_ERROR_BADCRC; result = -1; } } /* decode frame side information */ error = III_sideinfo(&stream->ptr, nch, header->flags & MAD_FLAG_LSF_EXT, &si, &data_bitlen, &priv_bitlen); if (error && result == 0) { stream->error = error; result = -1; } header->flags |= priv_bitlen; header->private_bits |= si.private_bits; /* find main_data of next frame */ { struct mad_bitptr peek; unsigned long header; mad_bit_init(&peek, stream->next_frame); header = mad_bit_read(&peek, 32); if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { if (!(header & 0x00010000L)) /* protection_bit */ mad_bit_skip(&peek, 16); /* crc_check */ next_md_begin = mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); } mad_bit_finish(&peek); } /* find main_data of this frame */ frame_space = stream->next_frame - mad_bit_nextbyte(&stream->ptr); if (next_md_begin > si.main_data_begin + frame_space) next_md_begin = 0; md_len = si.main_data_begin + frame_space - next_md_begin; frame_used = 0; if (si.main_data_begin == 0) { ptr = stream->ptr; stream->md_len = 0; frame_used = md_len; } else { if (si.main_data_begin > stream->md_len) { if (result == 0) { stream->error = MAD_ERROR_BADDATAPTR; result = -1; } } else { mad_bit_init(&ptr, *stream->main_data + stream->md_len - si.main_data_begin); if (md_len > si.main_data_begin) { assert(stream->md_len + md_len - si.main_data_begin <= MAD_BUFFER_MDLEN); memcpy(*stream->main_data + stream->md_len, mad_bit_nextbyte(&stream->ptr), frame_used = md_len - si.main_data_begin); stream->md_len += frame_used; } } } frame_free = frame_space - frame_used; /* decode main_data */ if (result == 0) { error = III_decode(&ptr, frame, &si, nch); if (error) { stream->error = error; result = -1; } /* designate ancillary bits */ stream->anc_ptr = ptr; stream->anc_bitlen = md_len * CHAR_BIT - data_bitlen; } # if 0 && defined(DEBUG) fprintf(stderr, "main_data_begin:%u, md_len:%u, frame_free:%u, " "data_bitlen:%u, anc_bitlen: %u\n", si.main_data_begin, md_len, frame_free, data_bitlen, stream->anc_bitlen); # endif /* preload main_data buffer with up to 511 bytes for next frame(s) */ if (frame_free >= next_md_begin) { memcpy(*stream->main_data, stream->next_frame - next_md_begin, next_md_begin); stream->md_len = next_md_begin; } else { if (md_len < si.main_data_begin) { unsigned int extra; extra = si.main_data_begin - md_len; if (extra + frame_free > next_md_begin) extra = next_md_begin - frame_free; if (extra < stream->md_len) { memmove(*stream->main_data, *stream->main_data + stream->md_len - extra, extra); stream->md_len = extra; } } else stream->md_len = 0; memcpy(*stream->main_data + stream->md_len, stream->next_frame - frame_free, frame_free); stream->md_len += frame_free; } return result; } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/layer3.h000066400000000000000000000017761466261456500247570ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: layer3.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_LAYER3_H # define LIBMAD_LAYER3_H # include "stream.h" # include "frame.h" int mad_layer_III(struct mad_stream *, struct mad_frame *); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/mad.h000066400000000000000000000647371466261456500243270ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * If you would like to negotiate alternate licensing terms, you may do * so by contacting: Underbit Technologies, Inc. */ # ifdef __cplusplus extern "C" { # endif # define FPM_INTEL # define SIZEOF_INT 4 # define SIZEOF_LONG 4 # define SIZEOF_LONG_LONG 8 /* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */ # ifndef LIBMAD_VERSION_H # define LIBMAD_VERSION_H # define MAD_VERSION_MAJOR 0 # define MAD_VERSION_MINOR 15 # define MAD_VERSION_PATCH 1 # define MAD_VERSION_EXTRA " (beta)" # define MAD_VERSION_STRINGIZE(str) #str # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ MAD_VERSION_STRING(MAD_VERSION_PATCH) \ MAD_VERSION_EXTRA # define MAD_PUBLISHYEAR "2000-2004" # define MAD_AUTHOR "Underbit Technologies, Inc." # define MAD_EMAIL "info@underbit.com" extern char const mad_version[]; extern char const mad_copyright[]; extern char const mad_author[]; extern char const mad_build[]; # endif /* Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp */ # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H # if SIZEOF_INT >= 4 typedef signed int mad_fixed_t; typedef signed int mad_fixed64hi_t; typedef unsigned int mad_fixed64lo_t; # else typedef signed long mad_fixed_t; typedef signed long mad_fixed64hi_t; typedef unsigned long mad_fixed64lo_t; # endif # if defined(_MSC_VER) # define mad_fixed64_t signed __int64 # elif 1 || defined(__GNUC__) # define mad_fixed64_t signed long long # endif # if defined(FPM_FLOAT) typedef double mad_sample_t; # else typedef mad_fixed_t mad_sample_t; # endif /* * Fixed-point format: 0xABBBBBBB * A == whole part (sign + 3 bits) * B == fractional part (28 bits) * * Values are signed two's complement, so the effective range is: * 0x80000000 to 0x7fffffff * -8.0 to +7.9999999962747097015380859375 * * The smallest representable value is: * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9) * * 28 bits of fractional accuracy represent about * 8.6 digits of decimal accuracy. * * Fixed-point numbers can be added or subtracted as normal * integers, but multiplication requires shifting the 64-bit result * from 56 fractional bits back to 28 (and rounding.) * * Changing the definition of MAD_F_FRACBITS is only partially * supported, and must be done with care. */ # define MAD_F_FRACBITS 28 # if MAD_F_FRACBITS == 28 # define MAD_F(x) ((mad_fixed_t) (x##L)) # else # if MAD_F_FRACBITS < 28 # warning "MAD_F_FRACBITS < 28" # define MAD_F(x) ((mad_fixed_t) \ (((x##L) + \ (1L << (28 - MAD_F_FRACBITS - 1))) >> \ (28 - MAD_F_FRACBITS))) # elif MAD_F_FRACBITS > 28 # error "MAD_F_FRACBITS > 28 not currently supported" # define MAD_F(x) ((mad_fixed_t) \ ((x##L) << (MAD_F_FRACBITS - 28))) # endif # endif # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) # define MAD_F_ONE MAD_F(0x10000000) # define mad_f_tofixed(x) ((mad_fixed_t) \ ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) # define mad_f_todouble(x) ((double) \ ((x) / (double) (1L << MAD_F_FRACBITS))) # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) /* (x should be positive) */ # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) # define mad_f_add(x, y) ((x) + (y)) # define mad_f_sub(x, y) ((x) - (y)) # if defined(FPM_FLOAT) # error "FPM_FLOAT not yet supported" # undef MAD_F # define MAD_F(x) mad_f_todouble(x) # define mad_f_mul(x, y) ((x) * (y)) # define mad_f_scale64 # undef ASO_ZEROCHECK # elif defined(FPM_64BIT) /* * This version should be the most accurate if 64-bit types are supported by * the compiler, although it may not be the most efficient. */ # if defined(OPT_ACCURACY) # define mad_f_mul(x, y) \ ((mad_fixed_t) \ ((((mad_fixed64_t) (x) * (y)) + \ (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS)) # else # define mad_f_mul(x, y) \ ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS)) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Intel --------------------------------------------------------------- */ # elif defined(FPM_INTEL) # if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable: 4035) /* no return value */ static __forceinline mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) { enum { fracbits = MAD_F_FRACBITS }; __asm { mov eax, x imul y shrd eax, edx, fracbits } /* implicit return of eax */ } # pragma warning(pop) # define mad_f_mul mad_f_mul_inline # define mad_f_scale64 # else /* * This Intel version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("imull %3" \ : "=a" (lo), "=d" (hi) \ : "%a" (x), "rm" (y) \ : "cc") # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addl %2,%0\n\t" \ "adcl %3,%1" \ : "=rm" (lo), "=rm" (hi) \ : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ : "cc"); \ }) # endif /* OPT_ACCURACY */ # if defined(OPT_ACCURACY) /* * Surprisingly, this is faster than SHRD followed by ADC. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed64hi_t __hi_; \ mad_fixed64lo_t __lo_; \ mad_fixed_t __result; \ asm ("addl %4,%2\n\t" \ "adcl %5,%3" \ : "=rm" (__lo_), "=rm" (__hi_) \ : "0" (lo), "1" (hi), \ "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ : "cc"); \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # elif defined(OPT_INTEL) /* * Alternate Intel scaling that may or may not perform better. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrl %3,%1\n\t" \ "shll %4,%2\n\t" \ "orl %2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), \ "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif /* OPT_ACCURACY */ # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- ARM ----------------------------------------------------------------- */ # elif defined(FPM_ARM) /* * This ARM V4 version is as accurate as FPM_64BIT but much faster. The * least significant bit is properly rounded at no CPU cycle cost! */ # if 1 /* * This is faster than the default implementation via MAD_F_MLX() and * mad_f_scale64(). */ # define mad_f_mul(x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ mad_fixed_t __result; \ asm ("smull %0, %1, %3, %4\n\t" \ "movs %0, %0, lsr %5\n\t" \ "adc %2, %0, %1, lsl %6" \ : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ : "%r" (x), "r" (y), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif # define MAD_F_MLX(hi, lo, x, y) \ asm ("smull %0, %1, %2, %3" \ : "=&r" (lo), "=&r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("smlal %0, %1, %2, %3" \ : "+r" (lo), "+r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLN(hi, lo) \ asm ("rsbs %0, %2, #0\n\t" \ "rsc %1, %3, #0" \ : "=r" (lo), "=r" (hi) \ : "0" (lo), "1" (hi) \ : "cc") # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("movs %0, %1, lsr %3\n\t" \ "adc %0, %0, %2, lsl %4" \ : "=&r" (__result) \ : "r" (lo), "r" (hi), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- MIPS ---------------------------------------------------------------- */ # elif defined(FPM_MIPS) /* * This MIPS version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" (x), "r" (y)) # if defined(HAVE_MADD_ASM) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" (x), "r" (y)) # elif defined(HAVE_MADD16_ASM) /* * This loses significant accuracy due to the 16-bit integer limit in the * multiply/accumulate instruction. */ # define MAD_F_ML0(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd16 %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) # endif # if defined(OPT_SPEED) # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS))) # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- SPARC --------------------------------------------------------------- */ # elif defined(FPM_SPARC) /* * This SPARC V8 version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("smul %2, %3, %0\n\t" \ "rd %%y, %1" \ : "=r" (lo), "=r" (hi) \ : "%r" (x), "rI" (y)) /* --- PowerPC ------------------------------------------------------------- */ # elif defined(FPM_PPC) /* * This PowerPC version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ do { \ asm ("mullw %0,%1,%2" \ : "=r" (lo) \ : "%r" (x), "r" (y)); \ asm ("mulhw %0,%1,%2" \ : "=r" (hi) \ : "%r" (x), "r" (y)); \ } \ while (0) # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addc %0,%2,%3\n\t" \ "adde %1,%4,%5" \ : "=r" (lo), "=r" (hi) \ : "%r" (lo), "r" (__lo), \ "%r" (hi), "r" (__hi) \ : "xer"); \ }) # endif # if defined(OPT_ACCURACY) /* * This is slower than the truncating version below it. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result, __round; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("extrwi %0,%1,1,0" \ : "=r" (__round) \ : "r" (__result)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ asm ("add %0,%1,%2" \ : "=r" (__result) \ : "%r" (__result), "r" (__round)); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ __result; \ }) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Default ------------------------------------------------------------- */ # elif defined(FPM_DEFAULT) /* * This version is the most portable but it loses significant accuracy. * Furthermore, accuracy is biased against the second argument, so care * should be taken when ordering operands. * * The scale factors are constant as this is not used with SSO. * * Pre-rounding is required to stay within the limits of compliance. */ # if defined(OPT_SPEED) # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) # else # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ (((y) + (1L << 15)) >> 16)) # endif /* ------------------------------------------------------------------------- */ # else # error "no FPM selected" # endif /* default implementations */ # if !defined(mad_f_mul) # define mad_f_mul(x, y) \ ({ register mad_fixed64hi_t __hi; \ register mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ mad_f_scale64(__hi, __lo); \ }) # endif # if !defined(MAD_F_MLA) # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) # endif # if !defined(MAD_F_ML0) # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) # endif # if !defined(MAD_F_MLN) # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) # endif # if !defined(MAD_F_MLZ) # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) # endif # if !defined(mad_f_scale64) # if defined(OPT_ACCURACY) # define mad_f_scale64(hi, lo) \ ((((mad_fixed_t) \ (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) # else # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) \ (((hi) << (32 - MAD_F_SCALEBITS)) | \ ((lo) >> MAD_F_SCALEBITS))) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* C routines */ mad_fixed_t mad_f_abs(mad_fixed_t); mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t); # endif /* Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp */ # ifndef LIBMAD_BIT_H # define LIBMAD_BIT_H struct mad_bitptr { unsigned char const *byte; unsigned short cache; unsigned short left; }; void mad_bit_init(struct mad_bitptr *, unsigned char const *); # define mad_bit_finish(bitptr) /* nothing */ unsigned int mad_bit_length(struct mad_bitptr const *, struct mad_bitptr const *); # define mad_bit_bitsleft(bitptr) ((bitptr)->left) unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); void mad_bit_skip(struct mad_bitptr *, unsigned int); unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); # endif /* Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp */ # ifndef LIBMAD_TIMER_H # define LIBMAD_TIMER_H typedef struct { signed long seconds; /* whole seconds */ unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ } mad_timer_t; extern mad_timer_t const mad_timer_zero; # define MAD_TIMER_RESOLUTION 352800000UL enum mad_units { MAD_UNITS_HOURS = -2, MAD_UNITS_MINUTES = -1, MAD_UNITS_SECONDS = 0, /* metric units */ MAD_UNITS_DECISECONDS = 10, MAD_UNITS_CENTISECONDS = 100, MAD_UNITS_MILLISECONDS = 1000, /* audio sample units */ MAD_UNITS_8000_HZ = 8000, MAD_UNITS_11025_HZ = 11025, MAD_UNITS_12000_HZ = 12000, MAD_UNITS_16000_HZ = 16000, MAD_UNITS_22050_HZ = 22050, MAD_UNITS_24000_HZ = 24000, MAD_UNITS_32000_HZ = 32000, MAD_UNITS_44100_HZ = 44100, MAD_UNITS_48000_HZ = 48000, /* video frame/field units */ MAD_UNITS_24_FPS = 24, MAD_UNITS_25_FPS = 25, MAD_UNITS_30_FPS = 30, MAD_UNITS_48_FPS = 48, MAD_UNITS_50_FPS = 50, MAD_UNITS_60_FPS = 60, /* CD audio frames */ MAD_UNITS_75_FPS = 75, /* video drop-frame units */ MAD_UNITS_23_976_FPS = -24, MAD_UNITS_24_975_FPS = -25, MAD_UNITS_29_97_FPS = -30, MAD_UNITS_47_952_FPS = -48, MAD_UNITS_49_95_FPS = -50, MAD_UNITS_59_94_FPS = -60 }; # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) int mad_timer_compare(mad_timer_t, mad_timer_t); # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) void mad_timer_negate(mad_timer_t *); mad_timer_t mad_timer_abs(mad_timer_t); void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long); void mad_timer_add(mad_timer_t *, mad_timer_t); void mad_timer_multiply(mad_timer_t *, signed long); signed long mad_timer_count(mad_timer_t, enum mad_units); unsigned long mad_timer_fraction(mad_timer_t, unsigned long); void mad_timer_string(mad_timer_t, char *, char const *, enum mad_units, enum mad_units, unsigned long); # endif /* Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp */ # ifndef LIBMAD_STREAM_H # define LIBMAD_STREAM_H # define MAD_BUFFER_GUARD 8 # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) enum mad_error { MAD_ERROR_NONE = 0x0000, /* no error */ MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ }; # define MAD_RECOVERABLE(error) ((error) & 0xff00) struct mad_stream { unsigned char const *buffer; /* input bitstream buffer */ unsigned char const *bufend; /* end of buffer */ unsigned long skiplen; /* bytes to skip before next frame */ int sync; /* stream sync found */ unsigned long freerate; /* free bitrate (fixed) */ unsigned char const *this_frame; /* start of current frame */ unsigned char const *next_frame; /* start of next frame */ struct mad_bitptr ptr; /* current processing bit pointer */ struct mad_bitptr anc_ptr; /* ancillary bits pointer */ unsigned int anc_bitlen; /* number of ancillary bits */ unsigned char (*main_data)[MAD_BUFFER_MDLEN]; /* Layer III main_data() */ unsigned int md_len; /* bytes in main_data */ int options; /* decoding options (see below) */ enum mad_error error; /* error code (see above) */ }; enum { MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ # if 0 /* not yet implemented */ MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ # endif }; void mad_stream_init(struct mad_stream *); void mad_stream_finish(struct mad_stream *); # define mad_stream_options(stream, opts) \ ((void) ((stream)->options = (opts))) void mad_stream_buffer(struct mad_stream *, unsigned char const *, unsigned long); void mad_stream_skip(struct mad_stream *, unsigned long); int mad_stream_sync(struct mad_stream *); char const *mad_stream_errorstr(struct mad_stream const *); # endif /* Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp */ # ifndef LIBMAD_FRAME_H # define LIBMAD_FRAME_H enum mad_layer { MAD_LAYER_I = 1, /* Layer I */ MAD_LAYER_II = 2, /* Layer II */ MAD_LAYER_III = 3 /* Layer III */ }; enum mad_mode { MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ MAD_MODE_STEREO = 3 /* normal LR stereo */ }; enum mad_emphasis { MAD_EMPHASIS_NONE = 0, /* no emphasis */ MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ }; struct mad_header { enum mad_layer layer; /* audio layer (1, 2, or 3) */ enum mad_mode mode; /* channel mode (see above) */ int mode_extension; /* additional mode info */ enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ unsigned long bitrate; /* stream bitrate (bps) */ unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short crc_check; /* frame CRC accumulator */ unsigned short crc_target; /* final target CRC checksum */ int flags; /* flags (see below) */ int private_bits; /* private bits (see below) */ mad_timer_t duration; /* audio playing time of frame */ }; struct mad_frame { struct mad_header header; /* MPEG audio header */ int options; /* decoding options (from stream) */ mad_fixed_t sbsample[2][36][32]; /* synthesis subband filter samples */ mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ }; # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) # define MAD_NSBSAMPLES(header) \ ((header)->layer == MAD_LAYER_I ? 12 : \ (((header)->layer == MAD_LAYER_III && \ ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) enum { MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ }; enum { MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ }; void mad_header_init(struct mad_header *); # define mad_header_finish(header) /* nothing */ int mad_header_decode(struct mad_header *, struct mad_stream *); void mad_frame_init(struct mad_frame *); void mad_frame_finish(struct mad_frame *); int mad_frame_decode(struct mad_frame *, struct mad_stream *); void mad_frame_mute(struct mad_frame *); # endif /* Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp */ # ifndef LIBMAD_SYNTH_H # define LIBMAD_SYNTH_H struct mad_pcm { unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short channels; /* number of channels */ unsigned short length; /* number of samples per channel */ mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ }; struct mad_synth { mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ /* [ch][eo][peo][s][v] */ unsigned int phase; /* current processing phase */ struct mad_pcm pcm; /* PCM output */ }; /* single channel PCM selector */ enum { MAD_PCM_CHANNEL_SINGLE = 0 }; /* dual channel PCM selector */ enum { MAD_PCM_CHANNEL_DUAL_1 = 0, MAD_PCM_CHANNEL_DUAL_2 = 1 }; /* stereo PCM selector */ enum { MAD_PCM_CHANNEL_STEREO_LEFT = 0, MAD_PCM_CHANNEL_STEREO_RIGHT = 1 }; void mad_synth_init(struct mad_synth *); # define mad_synth_finish(synth) /* nothing */ void mad_synth_mute(struct mad_synth *); void mad_synth_frame(struct mad_synth *, struct mad_frame const *); # endif /* Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp */ # ifndef LIBMAD_DECODER_H # define LIBMAD_DECODER_H enum mad_decoder_mode { MAD_DECODER_MODE_SYNC = 0, MAD_DECODER_MODE_ASYNC }; enum mad_flow { MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ }; struct mad_decoder { enum mad_decoder_mode mode; int options; struct { long pid; int in; int out; } async; struct { struct mad_stream stream; struct mad_frame frame; struct mad_synth synth; } *sync; void *cb_data; enum mad_flow (*input_func)(void *, struct mad_stream *); enum mad_flow (*header_func)(void *, struct mad_header const *); enum mad_flow (*filter_func)(void *, struct mad_stream const *, struct mad_frame *); enum mad_flow (*output_func)(void *, struct mad_header const *, struct mad_pcm *); enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); enum mad_flow (*message_func)(void *, void *, unsigned int *); }; void mad_decoder_init(struct mad_decoder *, void *, enum mad_flow (*)(void *, struct mad_stream *), enum mad_flow (*)(void *, struct mad_header const *), enum mad_flow (*)(void *, struct mad_stream const *, struct mad_frame *), enum mad_flow (*)(void *, struct mad_header const *, struct mad_pcm *), enum mad_flow (*)(void *, struct mad_stream *, struct mad_frame *), enum mad_flow (*)(void *, void *, unsigned int *)); int mad_decoder_finish(struct mad_decoder *); # define mad_decoder_options(decoder, opts) \ ((void) ((decoder)->options = (opts))) int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode); int mad_decoder_message(struct mad_decoder *, void *, unsigned int *); # endif # ifdef __cplusplus } # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/mad_engine.c000066400000000000000000000763611466261456500256430ustar00rootroot00000000000000/* * AlsaPlayer MAD plugin. * * Copyright (C) 2001-2003 Andy Lo A Foe * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: mad_engine.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_GTK2 #include #endif #include #include #include #include #include #include #include #include #include #include "input_plugin.h" #include "alsaplayer_error.h" #include "reader.h" #include "prefs.h" #define MAD_BUFSIZE (32 * 1024) #ifdef __cplusplus extern "C" { /* Make sure MAD symbols are not mangled * since we compile them with regular gcc */ #endif #ifndef HAVE_LIBMAD /* Needed if we use our own (outdated) copy */ #include "frame.h" #include "synth.h" #endif #include "mad.h" #ifdef __cplusplus } #endif #include "xing.h" #define BLOCK_SIZE 4096 #define MAX_NUM_SAMPLES 8192 #define STREAM_BUFFER_SIZE (32 * 1024) #define FRAME_RESERVE 2000 # if !defined(O_BINARY) # define O_BINARY 0 # endif struct mad_local_data { void *mad_fd; uint8_t mad_map[MAD_BUFSIZE]; long map_offset; int bytes_avail; struct stat stat; ssize_t *frames; int highest_frame; int current_frame; char path[FILENAME_MAX+1]; char filename[FILENAME_MAX+1]; struct mad_synth synth; struct mad_stream stream; struct mad_frame frame; struct xing xing; stream_info sinfo; int mad_init; ssize_t offset; ssize_t filesize; unsigned int samplerate; int bitrate; int seekable; int seeking; int eof; int parse_id3; int parsed_id3; char str[17]; }; /* * NAME: error_str() * DESCRIPTION: return a string describing a MAD error */ static char const *error_str(enum mad_error error, char *str) { switch (error) { case MAD_ERROR_BUFLEN: case MAD_ERROR_BUFPTR: /* these errors are handled specially and/or should not occur */ break; case MAD_ERROR_NOMEM: return ("not enough memory"); case MAD_ERROR_LOSTSYNC: return ("lost synchronization"); case MAD_ERROR_BADLAYER: return ("reserved header layer value"); case MAD_ERROR_BADBITRATE: return ("forbidden bitrate value"); case MAD_ERROR_BADSAMPLERATE: return ("reserved sample frequency value"); case MAD_ERROR_BADEMPHASIS: return ("reserved emphasis value"); case MAD_ERROR_BADCRC: return ("CRC check failed"); case MAD_ERROR_BADBITALLOC: return ("forbidden bit allocation value"); case MAD_ERROR_BADSCALEFACTOR: return ("bad scalefactor index"); case MAD_ERROR_BADFRAMELEN: return ("bad frame length"); case MAD_ERROR_BADBIGVALUES: return ("bad big_values count"); case MAD_ERROR_BADBLOCKTYPE: return ("reserved block_type"); case MAD_ERROR_BADSCFSI: return ("bad scalefactor selection info"); case MAD_ERROR_BADDATAPTR: return ("bad main_data_begin pointer"); case MAD_ERROR_BADPART3LEN: return ("bad audio data length"); case MAD_ERROR_BADHUFFTABLE: return ("bad Huffman table select"); case MAD_ERROR_BADHUFFDATA: return ("Huffman data overrun"); case MAD_ERROR_BADSTEREO: return ("incompatible block_type for JS"); default:; } sprintf(str, "error 0x%04x", error); return str; } /* utility to scale and round samples to 16 bits */ static inline signed int my_scale(mad_fixed_t sample) { /* round */ sample += (1L << (MAD_F_FRACBITS - 16)); /* clip */ if (sample >= MAD_F_ONE) sample = MAD_F_ONE - 1; else if (sample < -MAD_F_ONE) sample = -MAD_F_ONE; /* quantize */ return sample >> (MAD_F_FRACBITS + 1 - 16); } static void fill_buffer(struct mad_local_data *data, long offset) { size_t bytes_read; if (data->seekable && offset >= 0) { reader_seek(data->mad_fd, data->offset + offset, SEEK_SET); bytes_read = reader_read(data->mad_map, MAD_BUFSIZE, data->mad_fd); data->bytes_avail = bytes_read; data->map_offset = offset; } else { memmove(data->mad_map, data->mad_map + MAD_BUFSIZE - data->bytes_avail, data->bytes_avail); bytes_read = reader_read(data->mad_map + data->bytes_avail, MAD_BUFSIZE - data->bytes_avail, data->mad_fd); data->map_offset += (MAD_BUFSIZE - data->bytes_avail); data->bytes_avail += bytes_read; } } static void mad_init_decoder(struct mad_local_data *data) { if (!data) return; mad_synth_init (&data->synth); mad_stream_init (&data->stream); mad_frame_init (&data->frame); } static int mad_frame_seek(input_object *obj, int frame) { struct mad_local_data *data; struct mad_header header; int skip; ssize_t byte_offset; if (!obj) return 0; data = (struct mad_local_data *)obj->local_data; if (!data || !data->seekable) return 0; //alsaplayer_error("frame_seek(..., %d)", frame); mad_header_init(&header); data->bytes_avail = 0; if (frame <= data->highest_frame) { skip = 0; if (frame > 4) { skip = 3; } byte_offset = data->frames[frame-skip]; /* Prepare the buffer for a read */ fill_buffer(data, byte_offset); mad_stream_buffer(&data->stream, data->mad_map, data->bytes_avail); skip++; while (skip != 0) { skip--; mad_frame_decode(&data->frame, &data->stream); if (skip == 0) mad_synth_frame (&data->synth, &data->frame); } data->bytes_avail = data->stream.bufend - data->stream.next_frame; data->current_frame = frame; data->seeking = 0; return data->current_frame; } data->seeking = 1; fill_buffer(data, data->frames[data->highest_frame]); mad_stream_buffer(&data->stream, data->mad_map, data->bytes_avail); while (data->highest_frame < frame) { if (data->bytes_avail < 3072) { fill_buffer(data, data->map_offset + MAD_BUFSIZE - data->bytes_avail); mad_stream_buffer(&data->stream, data->mad_map, data->bytes_avail); } if (mad_header_decode(&header, &data->stream) == -1) { if (!MAD_RECOVERABLE(data->stream.error)) { fill_buffer(data, 0); mad_stream_buffer(&data->stream, data->mad_map, data->bytes_avail); data->seeking = 0; return 0; } } data->frames[++data->highest_frame] = data->map_offset + data->stream.this_frame - data->mad_map; data->bytes_avail = data->stream.bufend - data->stream.next_frame; } data->current_frame = data->highest_frame; if (data->current_frame > 4) { skip = 3; fill_buffer(data, data->frames[data->current_frame-skip]); mad_stream_buffer(&data->stream, data->mad_map, data->bytes_avail); skip++; while (skip != 0) { skip--; mad_frame_decode(&data->frame, &data->stream); if (skip == 0) mad_synth_frame (&data->synth, &data->frame); data->bytes_avail = data->stream.bufend - data->stream.next_frame; } } data->seeking = 0; return data->current_frame; return 0; } static int mad_frame_size(input_object *obj) { if (!obj || !obj->frame_size) { puts("No frame size!"); return 0; } return obj->frame_size; } /* #define MAD_DEBUG */ static int mad_play_frame(input_object *obj, char *buf) { struct mad_local_data *data; struct mad_pcm *pcm; mad_fixed_t const *left_ch; mad_fixed_t const *right_ch; int16_t *output; int nsamples; int nchannels; if (!obj) return 0; data = (struct mad_local_data *)obj->local_data; if (!data) return 0; if (data->bytes_avail < 3072) { /* alsaplayer_error("Filling buffer = %d,%d", data->bytes_avail, data->map_offset + MAD_BUFSIZE - data->bytes_avail); */ fill_buffer(data, -1); /* data->map_offset + MAD_BUFSIZE - data->bytes_avail); */ mad_stream_buffer(&data->stream, data->mad_map, data->bytes_avail); } else { /* alsaplayer_error("bytes_avail = %d", data->bytes_avail); */ } if (mad_frame_decode(&data->frame, &data->stream) == -1) { if (!MAD_RECOVERABLE(data->stream.error)) { /* alsaplayer_error("MAD error: %s (%d). fatal", error_str(data->stream.error, data->str), data->bytes_avail); */ mad_frame_mute(&data->frame); return 0; } else { if (reader_eof(data->mad_fd)) { return 0; } //alsaplayer_error("MAD error: %s (not fatal)", error_str(data->stream.error, data->str)); memset(buf, 0, obj->frame_size); return 1; } } data->current_frame++; if (data->seekable && data->current_frame < (obj->nr_frames + FRAME_RESERVE)) { data->frames[data->current_frame] = data->map_offset + data->stream.this_frame - data->mad_map; if (data->current_frame > 3 && (data->frames[data->current_frame] - data->frames[data->current_frame-3]) < 6) { return 0; } if (data->highest_frame < data->current_frame) data->highest_frame = data->current_frame; } mad_synth_frame (&data->synth, &data->frame); { pcm = &data->synth.pcm; output = (int16_t *)buf; nsamples = pcm->length; nchannels = pcm->channels; if (nchannels != obj->nr_channels) { alsaplayer_error("ERROR: bad data stream! (channels: %d != %d, frame %d)", nchannels, obj->nr_channels, data->current_frame); mad_frame_mute(&data->frame); memset(buf, 0, obj->frame_size); return 1; } obj->nr_channels = nchannels; if (data->samplerate != data->frame.header.samplerate) { alsaplayer_error("ERROR: bad data stream! (samplerate: %d != %d, frame %d)", data->samplerate, data->frame.header.samplerate, data->current_frame); mad_frame_mute(&data->frame); memset(buf, 0, obj->frame_size); return 1; } data->samplerate = data->frame.header.samplerate; left_ch = pcm->samples[0]; right_ch = pcm->samples[1]; while (nsamples--) { *output++ = my_scale(*(left_ch++)); if (nchannels == 1) { *output++ = my_scale(*(left_ch-1)); } else { /* nchannels == 2 */ *output++ = my_scale(*(right_ch++)); } } } data->bytes_avail = data->stream.bufend - data->stream.next_frame; return 1; } static long mad_frame_to_sec(input_object *obj, int frame) { struct mad_local_data *data; unsigned long sec = 0; if (!obj) return 0; data = (struct mad_local_data *)obj->local_data; if (data) { sec = data->samplerate ? frame * (obj->frame_size >> 2) / (data->samplerate / 100) : 0; } return sec; } static int mad_nr_frames(input_object *obj) { if (!obj) return 0; return obj->nr_frames; } /* TODO: Move all id3 code into the separated file. */ /* Strip spaces from right to left */ static void rstrip (char *s) { int len = strlen (s); while (len && s[len-1] == ' ') { len --; s[len] = '\0'; } } /* Convert from synchsafe integer */ static unsigned int from_synchsafe4 (unsigned char *buf) { return (buf [3]) + (buf [2] << 7) + (buf [1] << 14) + (buf [0] << 21); } static unsigned int from_synchsafe3 (unsigned char *buf) { return (buf [3]) + (buf [2] << 7) + (buf [1] << 14); } /* Fill filed */ static void fill_from_id3v2 (char *dst, char *src, int max, int size) { // it can be iso8851-1==0 utf16==1 utf16be==2 and utf8==3 if (( *src < 0) || (*src > 3)) return; char *conv = NULL; int min = size-1 > max ? max : size-1; #ifdef HAVE_GTK2 if (*src == 0) conv = g_convert((const gchar *)src+1, (gssize) size, "UTF-8", "ISO-8859-1", NULL, NULL, NULL); else if (*src == 1) conv = g_convert((const gchar *)src+1, (gssize) size, "UTF-8", "UTF-16", NULL, NULL, NULL); else if (*src == 2) conv = g_convert((const gchar *)src+1, (gssize) size, "UTF-8", "UTF-16BE", NULL, NULL, NULL); else conv = g_strndup(src+1, size); #else // alsaplayer_error ("Warning: Without glib2 you get different encodings."); conv = strndup(src+1, size); #endif if (!conv) // convert error return; strncpy (dst, conv, min); if (conv) free(conv); } static char *genres[] = { "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing", "Fast-Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantegarde", "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall", "Goa", "Drum & Bass", "Club House", "Hardcore", "Terror", "Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat", "Christian Gangsta", "Heavy Metal", "Black Metal", "Crossover", "Contemporary C", "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop", "SynthPop"}; /* Trying to fill info from id3 tagged file */ static void parse_id3 (const char *path, stream_info *info) { void *fd; unsigned char buf [2024]; unsigned char g; /* Open stream */ fd = reader_open (path, NULL, NULL); if (!fd) return; /* --------------------------------------------------- */ /* Trying to load id3v2 tags */ if (reader_read (buf, 10, fd) != 10) { reader_close (fd); return; } if (memcmp(buf, "ID3", 3) == 0) { /* Parse id3v2 tags */ /* Header */ unsigned char major_version = buf [3]; int f_unsynchronization = buf [5] & (1<<7); int f_extended_header = buf [5] & (1<<6); int f_experimental = buf [5] & (1<<5); int header_size = from_synchsafe4 (buf + 6); int name_size = buf [3] == 2 ? 3 : 4; int ext_size = 0; if (f_extended_header) { // alsaplayer_error ("FIXME: Extended header found in mp3." // "Please contact alsaplayer team.\n" // "Filename: %s", path); // reader_close (fd); // return; ext_size = 1; //stupid but should do } if (f_unsynchronization) { alsaplayer_error ("FIXME: f_unsynchronization is set." "Please contact alsaplayer team.\n" "Filename: %s", path); reader_close (fd); return; } if (f_experimental) { alsaplayer_error ("FIXME: f_experimental is set." "Please contact alsaplayer team.\n" "Filename: %s", path); reader_close (fd); return; } if (ext_size) { char b[4]; if (reader_read (b, 4, fd) != 4) { reader_close(fd); return; } if (major_version == 2) ext_size = from_synchsafe3 (b); else ext_size = from_synchsafe4 (b); if (reader_seek (fd, ext_size - 4, SEEK_CUR) < 0) { reader_close (fd); return; } } /* -- -- read frames -- -- */ while (reader_tell (fd) <= header_size + 10) { unsigned int size; /* Get name of this frame */ if (reader_read (buf, name_size, fd) != (unsigned)name_size) { reader_close (fd); return; } if (buf [0] == '\0') break; if (buf [0] < 'A') break; if (buf [0] > 'Z') break; /* Get size */ if (major_version == 2) { char sb [3]; if (reader_read (sb, 3, fd) != 3) { reader_close (fd); return; } size = from_synchsafe3 (sb); } else { char sb [4]; if (reader_read (sb, 4, fd) != 4) { reader_close (fd); return; } size = from_synchsafe4 (sb); } /* skip frame flags */ // if (reader_seek (fd, 1, SEEK_CUR) == -1) { // reader_close (fd); // return; // } int start = 0; // read them char b[2]; if (reader_read (b, 2, fd) != 2) { reader_close (fd); return; } else { if (b[1] & (1 << 6)) { // printf ("Grouping added\n"); start++; } if (b[1] & (1 << 3)) { // printf ("Compression added\n"); } if (b[1] & (1 << 2)) { // printf ("Encryption added\n"); } if (b[1] & (1 << 1)) { // printf ("Unsynch added\n"); } if (b[1] & (1 << 0)) { // printf ("Length added\n"); start+=4; } } if (size>=1024) { /* I will not support such long tags... * Only if someone ask for it... * not now... */ if (reader_seek (fd, size, SEEK_CUR) == -1) { reader_close (fd); return; } continue; } /* read info */ if (reader_read (buf + name_size, size, fd) != size) { reader_close (fd); return; } /* !!! Ok. There we have frame name and data. */ /* Lets use it. */ if (name_size == 4) { if (memcmp (buf, "TIT2", 4)==0) fill_from_id3v2 (info->title, buf + name_size + start, sizeof (info->title), size - start); else if (memcmp (buf, "TPE1", 4)==0) fill_from_id3v2 (info->artist, buf + name_size + start, sizeof (info->artist), size - start); else if (memcmp (buf, "TALB", 4)==0) fill_from_id3v2 (info->album, buf + name_size + start, sizeof (info->album), size - start); else if (memcmp (buf, "TYER", 4)==0) fill_from_id3v2 (info->year, buf + name_size + start, sizeof (info->year), size - start); else if (memcmp (buf, "COMM", 4)==0) fill_from_id3v2 (info->comment, buf + name_size + start, sizeof (info->comment), size - start); else if (memcmp (buf, "TRCK", 4)==0) fill_from_id3v2 (info->track, buf + name_size + start, sizeof (info->track), size - start); else if (memcmp (buf, "TCON", 4)==0) { /* Genre */ /* TODO: Optimize duplicated code */ unsigned int gindex; if (sscanf (buf + name_size + start +1, "(%u)", &gindex)==1) { if (gindex==255) *info->genre = '\0'; else if (sizeof (genres)/sizeof(char*) <= gindex) snprintf (info->genre, sizeof (info->genre), "(%u)", gindex); else snprintf (info->genre, sizeof (info->genre), "%s", genres[gindex]); } else fill_from_id3v2 (info->genre, buf + name_size + start, sizeof (info->genre), size - start); } } /* end of 'if name_size == 4' */ } /* end of frames read */ /* end parsing */ reader_close (fd); return; } /* end of id3v2 parsing */ /* --------------------------------------------------- */ /* Trying to load id3v1 tags */ if (reader_seek (fd, -128, SEEK_END) == -1) { reader_close (fd); return; } if (reader_read (buf, 128, fd) != 128) { reader_close (fd); return; } if (memcmp(buf, "TAG", 3) == 0) { /* ID3v1 frame found */ /* title */ strncpy (info->title, buf + 3, 30); rstrip (info->title); /* artist */ strncpy (info->artist, buf + 33, 30); rstrip (info->artist); /* album */ strncpy (info->album, buf + 63, 30); rstrip (info->album); /* year */ strncpy (info->year, buf + 93, 4); rstrip (info->year); /* comment */ strncpy (info->comment, buf + 97, 28); rstrip (info->comment); /* track number */ if (buf [125] == '\0') snprintf (info->track, sizeof (info->track), "%u", buf [126]); /* genre */ g = buf [127]; if (g==255) *info->genre = '\0'; else if (sizeof (genres)/sizeof(char*) <= g) snprintf (info->genre, sizeof (info->genre), "(%u)", g); else snprintf (info->genre, sizeof (info->genre), "%s", genres[g]); } /* end of id3v1 parsing */ reader_close (fd); } static int mad_stream_info(input_object *obj, stream_info *info) { struct mad_local_data *data; unsigned len; char metadata[256]; char *s, *p; if (!obj || !info) return 0; data = (struct mad_local_data *)obj->local_data; if (data) { if (!data->parse_id3) { sprintf(data->sinfo.title, "%s", data->filename); } else if (!data->parsed_id3) { if (reader_seekable(data->mad_fd)) { parse_id3 (data->path, &data->sinfo); if ((len = strlen(data->sinfo.title))) { s = data->sinfo.title + (len - 1); while (s != data->sinfo.title && *s == ' ') *(s--) = '\0'; } if ((len = strlen(data->sinfo.artist))) { s = data->sinfo.artist + (len - 1); while (s != data->sinfo.artist && *s == ' ') *(s--) = '\0'; } } strncpy (data->sinfo.path, data->path, sizeof(data->sinfo.path)); data->parsed_id3 = 1; } memset(metadata, 0, sizeof(metadata)); if ((len = reader_metadata(data->mad_fd, sizeof(metadata), metadata))) { //alsaplayer_error("Metadata: %s", metadata); if ((s = strstr(metadata, "StreamTitle='"))) { s += 13; if ((p = strstr(s, "'"))) { *p = '\0'; snprintf(data->sinfo.title, 128, "%s", s); } else { alsaplayer_error("Malformed metadata: \"%s\"", metadata); } } } /* Restore permanently filled info */ memcpy (info, &data->sinfo, sizeof (data->sinfo)); /* Compose path, stream_type and status fields */ sprintf(info->stream_type, "MP3 %dKHz %s %-3ldkbit", data->frame.header.samplerate / 1000, obj->nr_channels == 2 ? "stereo" : "mono", data->frame.header.bitrate / 1000); if (data->seeking) sprintf(info->status, "Seeking..."); } return 1; } static int mad_sample_rate(input_object *obj) { struct mad_local_data *data; if (!obj) return 44100; data = (struct mad_local_data *)obj->local_data; if (data) return data->samplerate; return 44100; } static int mad_init(void) { return 1; } static int mad_channels(input_object *obj) { struct mad_local_data *data; if (!obj) return 2; /* Default to 2, this is flaky at best! */ data = (struct mad_local_data *)obj->local_data; return obj->nr_channels; } static float mad_can_handle(const char *path) { char *ext; ext = strrchr(path, '.'); if (strncmp(path, "http://", 7) == 0) return 0.5; if (!ext) return 0.0; ext++; if (!strcasecmp(ext, "mp3") || !strcasecmp(ext, "mp2")) { return 0.9; } else { return 0.0; } } static ssize_t find_initial_frame(uint8_t *buf, int size) { uint8_t *data = buf; int ext_header = 0; int pos = 0; ssize_t header_size = 0; while (pos < (size - 10)) { if (pos == 0 && data[pos] == 0x0d && data[pos+1] == 0x0a) pos += 2; if (data[pos] == 0xff && (data[pos+1] == 0xfb || data[pos+1] == 0xfa || data[pos+1] == 0xf3 || data[pos+1] == 0xf2 || data[pos+1] == 0xe2 || data[pos+1] == 0xe3)) { return pos; } if (pos == 0 && data[pos] == 0x0d && data[pos+1] == 0x0a) { return -1; /* Let MAD figure this out */ } if (pos == 0 && (data[pos] == 'I' && data[pos+1] == 'D' && data[pos+2] == '3')) { header_size = (data[pos + 6] << 21) + (data[pos + 7] << 14) + (data[pos + 8] << 7) + data[pos + 9]; /* syncsafe integer */ if (data[pos + 5] & 0x10) { ext_header = 1; header_size += 10; /* 10 byte extended header */ } /* printf("ID3v2.%c detected with header size %d (at pos %d)\n", 0x30 + data[pos + 3], header_size, pos); */ if (ext_header) { /* printf("Extended header detected\n"); */ } header_size += 10; if (header_size > STREAM_BUFFER_SIZE) { //alsaplayer_error("Header larger than 32K (%d)", header_size); return header_size; } return header_size; } else if (data[pos] == 'R' && data[pos+1] == 'I' && data[pos+2] == 'F' && data[pos+3] == 'F') { pos+=4; /* alsaplayer_error("Found a RIFF header"); */ while (pos < size) { if (data[pos] == 'd' && data[pos+1] == 'a' && data[pos+2] == 't' && data[pos+3] == 'a') { pos += 8; /* skip 'data' and ignore size */ return pos; } else pos++; } puts("MAD debug: invalid header"); return -1; } else if (pos == 0 && data[pos] == 'T' && data[pos+1] == 'A' && data[pos+2] == 'G') { return 128; /* TAG is fixed 128 bytes, we assume! */ } else { pos++; } } alsaplayer_error( "MAD debug: potential problem file or unhandled info block\n" "next 4 bytes = %x %x %x %x (index = %d, size = %d)\n", data[header_size], data[header_size+1], data[header_size+2], data[header_size+3], (int)header_size, size); return -1; } static void reader_status(void *ptr, const char *str) { input_object *obj = (input_object *)ptr; struct mad_local_data *data; if (!obj) return; data = (struct mad_local_data *)obj->local_data; if (data) { //fprintf(stdout, "%s \r", str); //fflush(stdout); strcpy(data->sinfo.status, str); } } static int mad_open(input_object *obj, const char *path) { struct mad_local_data *data; char *p; int mode; if (!obj) return 0; obj->local_data = malloc(sizeof(struct mad_local_data)); if (!obj->local_data) { puts("failed to allocate local data"); return 0; } data = (struct mad_local_data *)obj->local_data; memset(data, 0, sizeof(struct mad_local_data)); if ((data->mad_fd = reader_open(path, &reader_status, obj)) == NULL) { fprintf(stderr, "mad_open(obj, %s) failed\n", path); free(obj->local_data); obj->local_data = NULL; return 0; } obj->flags = 0; if (strncasecmp(path, "http://", 7) == 0) { obj->flags |= P_STREAMBASED; strcpy(data->sinfo.status, "Prebuffering"); } else { obj->flags |= P_FILEBASED; } if (!reader_seekable(data->mad_fd)) { data->seekable = 0; } else { obj->flags |= P_SEEK; obj->flags |= P_PERFECTSEEK; data->seekable = 1; } obj->flags |= P_REENTRANT; mad_init_decoder(data); memset(&data->xing, 0, sizeof(struct xing)); xing_init (&data->xing); data->mad_init = 1; fill_buffer(data, -1); //alsaplayer_error("initial bytes_avail = %d", data->bytes_avail); if (obj->flags & P_PERFECTSEEK) { data->offset = find_initial_frame(data->mad_map, data->bytes_avail < STREAM_BUFFER_SIZE ? data->bytes_avail : STREAM_BUFFER_SIZE); } else { data->offset = 0; } data->highest_frame = 0; if (data->offset < 0) { //fprintf(stderr, "mad_open() couldn't find valid MPEG header\n"); data->offset = 0; } //alsaplayer_error("data->offset = %d", data->offset); if (data->offset > data->bytes_avail) { data->seekable = 1; //alsaplayer_error("Need to refill buffer (data->offset = %d)", data->offset); fill_buffer(data, 0); mad_stream_buffer(&data->stream, data->mad_map, data->bytes_avail); } else { mad_stream_buffer(&data->stream, data->mad_map + data->offset, data->bytes_avail - data->offset); data->bytes_avail -= data->offset; } first_frame: if ((mad_header_decode(&data->frame.header, &data->stream) == -1)) { switch (data->stream.error) { case MAD_ERROR_BUFLEN: return 0; case MAD_ERROR_LOSTSYNC: case MAD_ERROR_BADEMPHASIS: case MAD_ERROR_BADBITRATE: case MAD_ERROR_BADLAYER: case MAD_ERROR_BADSAMPLERATE: //alsaplayer_error("Error %x (frame %d)", data->stream.error, data->current_frame); data->bytes_avail-=(data->stream.next_frame - data->stream.this_frame); goto first_frame; break; case MAD_ERROR_BADBITALLOC: return 0; case MAD_ERROR_BADCRC: alsaplayer_error("MAD_ERROR_BADCRC: %s", error_str(data->stream.error, data->str)); case MAD_ERROR_BADBIGVALUES: case MAD_ERROR_BADDATAPTR: break; default: alsaplayer_error("ERROR: %s", error_str(data->stream.error, data->str)); alsaplayer_error("No valid frame found at start (pos: %d, error: 0x%x --> %x %x %x %x) (%s)", data->offset, data->stream.error, data->stream.this_frame[0], data->stream.this_frame[1], data->stream.this_frame[2], data->stream.this_frame[3],path); return 0; } } mad_frame_decode(&data->frame, &data->stream); /* alsaplayer_error("xing parsing...%x %x %x %x (%x %d)", data->stream.this_frame[0], data->stream.this_frame[1], data->stream.this_frame[2], data->stream.this_frame[3], data->stream.anc_ptr, data->stream.anc_bitlen); */ if (xing_parse(&data->xing, data->stream.anc_ptr, data->stream.anc_bitlen) == 0) { // We use the xing data later on } mode = (data->frame.header.mode == MAD_MODE_SINGLE_CHANNEL) ? 1 : 2; data->samplerate = data->frame.header.samplerate; data->bitrate = data->frame.header.bitrate; mad_synth_frame (&data->synth, &data->frame); { struct mad_pcm *pcm = &data->synth.pcm; obj->nr_channels = pcm->channels; //alsaplayer_error("nr_channels = %d", obj->nr_channels); } //alsaplayer_error("Initial: %d, %d, %d", data->samplerate, data->bitrate, obj->nr_channels); /* Calculate some values */ data->bytes_avail = data->stream.bufend - data->stream.next_frame; { int64_t time; int64_t samples; int64_t frames; long oldpos = reader_tell(data->mad_fd); reader_seek(data->mad_fd, 0, SEEK_END); data->filesize = reader_tell(data->mad_fd); data->filesize -= data->offset; reader_seek(data->mad_fd, oldpos, SEEK_SET); if (data->bitrate) time = (data->filesize * 8) / (data->bitrate); else time = 0; samples = 32 * MAD_NSBSAMPLES(&data->frame.header); obj->frame_size = (int) samples << 2; /* Assume 16-bit stereo */ frames = data->samplerate * (time+1) / samples; if (data->xing.flags & XING_FRAMES) { obj->nr_frames = data->xing.frames; } else { obj->nr_frames = (int) frames; } obj->nr_tracks = 1; } /* Determine if nr_frames makes sense */ if (!(obj->flags & P_SEEK) && (obj->flags & P_STREAMBASED)) { obj->nr_frames = -1; } /* Allocate frame index */ if (!data->seekable || obj->nr_frames > 1000000 || (data->frames = (ssize_t *)malloc((obj->nr_frames + FRAME_RESERVE) * sizeof(ssize_t))) == NULL) { data->seekable = 0; // Given really } else { data->seekable = 1; data->frames[0] = 0; } data->mad_init = 1; p = strrchr(path, '/'); if (p) { strcpy(data->filename, ++p); } else { strcpy(data->filename, path); } strcpy(data->path, path); data->parse_id3 = prefs_get_bool(ap_prefs, "mad", "parse_id3", 1); return 1; } static void mad_close(input_object *obj) { struct mad_local_data *data; if (!obj) return; data = (struct mad_local_data *)obj->local_data; if (data) { if (data->mad_fd) reader_close(data->mad_fd); if (data->mad_init) { mad_synth_finish (&data->synth); mad_frame_finish (&data->frame); mad_stream_finish(&data->stream); data->mad_init = 0; } if (data->frames) { free(data->frames); } free(obj->local_data); obj->local_data = NULL; } } static void mad_shutdown(void) { return; } static input_plugin mad_plugin; #ifdef __cplusplus extern "C" { #endif input_plugin *input_plugin_info (void) { memset(&mad_plugin, 0, sizeof(input_plugin)); mad_plugin.version = INPUT_PLUGIN_VERSION; mad_plugin.name = "MAD MPEG audio plugin v1.01"; mad_plugin.author = "Andy Lo A Foe"; mad_plugin.init = mad_init; mad_plugin.shutdown = mad_shutdown; mad_plugin.can_handle = mad_can_handle; mad_plugin.open = mad_open; mad_plugin.close = mad_close; mad_plugin.play_frame = mad_play_frame; mad_plugin.frame_seek = mad_frame_seek; mad_plugin.frame_size = mad_frame_size; mad_plugin.nr_frames = mad_nr_frames; mad_plugin.frame_to_sec = mad_frame_to_sec; mad_plugin.sample_rate = mad_sample_rate; mad_plugin.channels = mad_channels; mad_plugin.stream_info = mad_stream_info; return &mad_plugin; } #ifdef __cplusplus } #endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/qc_table.dat000066400000000000000000000076051466261456500256500ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: qc_table.dat 1252 2007-07-08 15:46:19Z dominique_libre $ */ /* * These are the Layer II classes of quantization. * The table is derived from Table B.4 of ISO/IEC 11172-3. */ { 3, 2, 5, MAD_F(0x15555555) /* 1.33333333333 => 1.33333333209, e 0.00000000124 */, MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e 0.00000000000 */ }, { 5, 3, 7, MAD_F(0x1999999a) /* 1.60000000000 => 1.60000000149, e -0.00000000149 */, MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e 0.00000000000 */ }, { 7, 0, 3, MAD_F(0x12492492) /* 1.14285714286 => 1.14285714179, e 0.00000000107 */, MAD_F(0x04000000) /* 0.25000000000 => 0.25000000000, e 0.00000000000 */ }, { 9, 4, 10, MAD_F(0x1c71c71c) /* 1.77777777777 => 1.77777777612, e 0.00000000165 */, MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e 0.00000000000 */ }, { 15, 0, 4, MAD_F(0x11111111) /* 1.06666666666 => 1.06666666642, e 0.00000000024 */, MAD_F(0x02000000) /* 0.12500000000 => 0.12500000000, e 0.00000000000 */ }, { 31, 0, 5, MAD_F(0x10842108) /* 1.03225806452 => 1.03225806355, e 0.00000000097 */, MAD_F(0x01000000) /* 0.06250000000 => 0.06250000000, e 0.00000000000 */ }, { 63, 0, 6, MAD_F(0x10410410) /* 1.01587301587 => 1.01587301493, e 0.00000000094 */, MAD_F(0x00800000) /* 0.03125000000 => 0.03125000000, e 0.00000000000 */ }, { 127, 0, 7, MAD_F(0x10204081) /* 1.00787401575 => 1.00787401572, e 0.00000000003 */, MAD_F(0x00400000) /* 0.01562500000 => 0.01562500000, e 0.00000000000 */ }, { 255, 0, 8, MAD_F(0x10101010) /* 1.00392156863 => 1.00392156839, e 0.00000000024 */, MAD_F(0x00200000) /* 0.00781250000 => 0.00781250000, e 0.00000000000 */ }, { 511, 0, 9, MAD_F(0x10080402) /* 1.00195694716 => 1.00195694715, e 0.00000000001 */, MAD_F(0x00100000) /* 0.00390625000 => 0.00390625000, e 0.00000000000 */ }, { 1023, 0, 10, MAD_F(0x10040100) /* 1.00097751711 => 1.00097751617, e 0.00000000094 */, MAD_F(0x00080000) /* 0.00195312500 => 0.00195312500, e 0.00000000000 */ }, { 2047, 0, 11, MAD_F(0x10020040) /* 1.00048851979 => 1.00048851967, e 0.00000000012 */, MAD_F(0x00040000) /* 0.00097656250 => 0.00097656250, e 0.00000000000 */ }, { 4095, 0, 12, MAD_F(0x10010010) /* 1.00024420024 => 1.00024420023, e 0.00000000001 */, MAD_F(0x00020000) /* 0.00048828125 => 0.00048828125, e 0.00000000000 */ }, { 8191, 0, 13, MAD_F(0x10008004) /* 1.00012208522 => 1.00012208521, e 0.00000000001 */, MAD_F(0x00010000) /* 0.00024414063 => 0.00024414062, e 0.00000000000 */ }, { 16383, 0, 14, MAD_F(0x10004001) /* 1.00006103888 => 1.00006103888, e -0.00000000000 */, MAD_F(0x00008000) /* 0.00012207031 => 0.00012207031, e -0.00000000000 */ }, { 32767, 0, 15, MAD_F(0x10002000) /* 1.00003051851 => 1.00003051758, e 0.00000000093 */, MAD_F(0x00004000) /* 0.00006103516 => 0.00006103516, e 0.00000000000 */ }, { 65535, 0, 16, MAD_F(0x10001000) /* 1.00001525902 => 1.00001525879, e 0.00000000023 */, MAD_F(0x00002000) /* 0.00003051758 => 0.00003051758, e 0.00000000000 */ } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/rq_table.dat000066400000000000000000016647511466261456500257030ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: rq_table.dat 1252 2007-07-08 15:46:19Z dominique_libre $ */ /* * This is the lookup table used to compute x^(4/3) for Layer III * requantization. To maintain the best possible accuracy, the value is * stored as a normalized mantissa with exponent. The requantization * algorithm recombines these parts with appropriate scaling. */ /* 0 */ { MAD_F(0x00000000) /* 0.000000000 */, 0 }, /* 1 */ { MAD_F(0x04000000) /* 0.250000000 */, 2 }, /* 2 */ { MAD_F(0x050a28be) /* 0.314980262 */, 3 }, /* 3 */ { MAD_F(0x0453a5cd) /* 0.270421794 */, 4 }, /* 4 */ { MAD_F(0x06597fa9) /* 0.396850263 */, 4 }, /* 5 */ { MAD_F(0x04466275) /* 0.267183742 */, 5 }, /* 6 */ { MAD_F(0x05738c72) /* 0.340710111 */, 5 }, /* 7 */ { MAD_F(0x06b1fc81) /* 0.418453696 */, 5 }, /* 8 */ { MAD_F(0x04000000) /* 0.250000000 */, 6 }, /* 9 */ { MAD_F(0x04ae20d7) /* 0.292511788 */, 6 }, /* 10 */ { MAD_F(0x0562d694) /* 0.336630420 */, 6 }, /* 11 */ { MAD_F(0x061dae96) /* 0.382246578 */, 6 }, /* 12 */ { MAD_F(0x06de47f4) /* 0.429267841 */, 6 }, /* 13 */ { MAD_F(0x07a44f7a) /* 0.477614858 */, 6 }, /* 14 */ { MAD_F(0x0437be65) /* 0.263609310 */, 7 }, /* 15 */ { MAD_F(0x049fc824) /* 0.289009227 */, 7 }, /* 16 */ { MAD_F(0x050a28be) /* 0.314980262 */, 7 }, /* 17 */ { MAD_F(0x0576c6f5) /* 0.341498336 */, 7 }, /* 18 */ { MAD_F(0x05e58c0b) /* 0.368541759 */, 7 }, /* 19 */ { MAD_F(0x06566361) /* 0.396090870 */, 7 }, /* 20 */ { MAD_F(0x06c93a2e) /* 0.424127753 */, 7 }, /* 21 */ { MAD_F(0x073dff3e) /* 0.452635998 */, 7 }, /* 22 */ { MAD_F(0x07b4a2bc) /* 0.481600510 */, 7 }, /* 23 */ { MAD_F(0x04168b05) /* 0.255503674 */, 8 }, /* 24 */ { MAD_F(0x0453a5cd) /* 0.270421794 */, 8 }, /* 25 */ { MAD_F(0x04919b6a) /* 0.285548607 */, 8 }, /* 26 */ { MAD_F(0x04d065fb) /* 0.300878507 */, 8 }, /* 27 */ { MAD_F(0x05100000) /* 0.316406250 */, 8 }, /* 28 */ { MAD_F(0x05506451) /* 0.332126919 */, 8 }, /* 29 */ { MAD_F(0x05918e15) /* 0.348035890 */, 8 }, /* 30 */ { MAD_F(0x05d378bb) /* 0.364128809 */, 8 }, /* 31 */ { MAD_F(0x06161ff3) /* 0.380401563 */, 8 }, /* 32 */ { MAD_F(0x06597fa9) /* 0.396850263 */, 8 }, /* 33 */ { MAD_F(0x069d9400) /* 0.413471222 */, 8 }, /* 34 */ { MAD_F(0x06e2594c) /* 0.430260942 */, 8 }, /* 35 */ { MAD_F(0x0727cc11) /* 0.447216097 */, 8 }, /* 36 */ { MAD_F(0x076de8fc) /* 0.464333519 */, 8 }, /* 37 */ { MAD_F(0x07b4ace3) /* 0.481610189 */, 8 }, /* 38 */ { MAD_F(0x07fc14bf) /* 0.499043224 */, 8 }, /* 39 */ { MAD_F(0x04220ed7) /* 0.258314934 */, 9 }, /* 40 */ { MAD_F(0x04466275) /* 0.267183742 */, 9 }, /* 41 */ { MAD_F(0x046b03e7) /* 0.276126771 */, 9 }, /* 42 */ { MAD_F(0x048ff1e8) /* 0.285142811 */, 9 }, /* 43 */ { MAD_F(0x04b52b3f) /* 0.294230696 */, 9 }, /* 44 */ { MAD_F(0x04daaec0) /* 0.303389310 */, 9 }, /* 45 */ { MAD_F(0x05007b49) /* 0.312617576 */, 9 }, /* 46 */ { MAD_F(0x05268fc6) /* 0.321914457 */, 9 }, /* 47 */ { MAD_F(0x054ceb2a) /* 0.331278957 */, 9 }, /* 48 */ { MAD_F(0x05738c72) /* 0.340710111 */, 9 }, /* 49 */ { MAD_F(0x059a72a5) /* 0.350206992 */, 9 }, /* 50 */ { MAD_F(0x05c19cd3) /* 0.359768701 */, 9 }, /* 51 */ { MAD_F(0x05e90a12) /* 0.369394372 */, 9 }, /* 52 */ { MAD_F(0x0610b982) /* 0.379083164 */, 9 }, /* 53 */ { MAD_F(0x0638aa48) /* 0.388834268 */, 9 }, /* 54 */ { MAD_F(0x0660db91) /* 0.398646895 */, 9 }, /* 55 */ { MAD_F(0x06894c90) /* 0.408520284 */, 9 }, /* 56 */ { MAD_F(0x06b1fc81) /* 0.418453696 */, 9 }, /* 57 */ { MAD_F(0x06daeaa1) /* 0.428446415 */, 9 }, /* 58 */ { MAD_F(0x07041636) /* 0.438497744 */, 9 }, /* 59 */ { MAD_F(0x072d7e8b) /* 0.448607009 */, 9 }, /* 60 */ { MAD_F(0x075722ef) /* 0.458773552 */, 9 }, /* 61 */ { MAD_F(0x078102b8) /* 0.468996735 */, 9 }, /* 62 */ { MAD_F(0x07ab1d3e) /* 0.479275937 */, 9 }, /* 63 */ { MAD_F(0x07d571e0) /* 0.489610555 */, 9 }, /* 64 */ { MAD_F(0x04000000) /* 0.250000000 */, 10 }, /* 65 */ { MAD_F(0x04156381) /* 0.255221850 */, 10 }, /* 66 */ { MAD_F(0x042ae32a) /* 0.260470548 */, 10 }, /* 67 */ { MAD_F(0x04407eb1) /* 0.265745823 */, 10 }, /* 68 */ { MAD_F(0x045635cf) /* 0.271047409 */, 10 }, /* 69 */ { MAD_F(0x046c083e) /* 0.276375048 */, 10 }, /* 70 */ { MAD_F(0x0481f5bb) /* 0.281728487 */, 10 }, /* 71 */ { MAD_F(0x0497fe03) /* 0.287107481 */, 10 }, /* 72 */ { MAD_F(0x04ae20d7) /* 0.292511788 */, 10 }, /* 73 */ { MAD_F(0x04c45df6) /* 0.297941173 */, 10 }, /* 74 */ { MAD_F(0x04dab524) /* 0.303395408 */, 10 }, /* 75 */ { MAD_F(0x04f12624) /* 0.308874267 */, 10 }, /* 76 */ { MAD_F(0x0507b0bc) /* 0.314377532 */, 10 }, /* 77 */ { MAD_F(0x051e54b1) /* 0.319904987 */, 10 }, /* 78 */ { MAD_F(0x053511cb) /* 0.325456423 */, 10 }, /* 79 */ { MAD_F(0x054be7d4) /* 0.331031635 */, 10 }, /* 80 */ { MAD_F(0x0562d694) /* 0.336630420 */, 10 }, /* 81 */ { MAD_F(0x0579ddd8) /* 0.342252584 */, 10 }, /* 82 */ { MAD_F(0x0590fd6c) /* 0.347897931 */, 10 }, /* 83 */ { MAD_F(0x05a8351c) /* 0.353566275 */, 10 }, /* 84 */ { MAD_F(0x05bf84b8) /* 0.359257429 */, 10 }, /* 85 */ { MAD_F(0x05d6ec0e) /* 0.364971213 */, 10 }, /* 86 */ { MAD_F(0x05ee6aef) /* 0.370707448 */, 10 }, /* 87 */ { MAD_F(0x0606012b) /* 0.376465960 */, 10 }, /* 88 */ { MAD_F(0x061dae96) /* 0.382246578 */, 10 }, /* 89 */ { MAD_F(0x06357302) /* 0.388049134 */, 10 }, /* 90 */ { MAD_F(0x064d4e43) /* 0.393873464 */, 10 }, /* 91 */ { MAD_F(0x0665402d) /* 0.399719406 */, 10 }, /* 92 */ { MAD_F(0x067d4896) /* 0.405586801 */, 10 }, /* 93 */ { MAD_F(0x06956753) /* 0.411475493 */, 10 }, /* 94 */ { MAD_F(0x06ad9c3d) /* 0.417385331 */, 10 }, /* 95 */ { MAD_F(0x06c5e72b) /* 0.423316162 */, 10 }, /* 96 */ { MAD_F(0x06de47f4) /* 0.429267841 */, 10 }, /* 97 */ { MAD_F(0x06f6be73) /* 0.435240221 */, 10 }, /* 98 */ { MAD_F(0x070f4a80) /* 0.441233161 */, 10 }, /* 99 */ { MAD_F(0x0727ebf7) /* 0.447246519 */, 10 }, /* 100 */ { MAD_F(0x0740a2b2) /* 0.453280160 */, 10 }, /* 101 */ { MAD_F(0x07596e8d) /* 0.459333946 */, 10 }, /* 102 */ { MAD_F(0x07724f64) /* 0.465407744 */, 10 }, /* 103 */ { MAD_F(0x078b4514) /* 0.471501425 */, 10 }, /* 104 */ { MAD_F(0x07a44f7a) /* 0.477614858 */, 10 }, /* 105 */ { MAD_F(0x07bd6e75) /* 0.483747918 */, 10 }, /* 106 */ { MAD_F(0x07d6a1e2) /* 0.489900479 */, 10 }, /* 107 */ { MAD_F(0x07efe9a1) /* 0.496072418 */, 10 }, /* 108 */ { MAD_F(0x0404a2c9) /* 0.251131807 */, 11 }, /* 109 */ { MAD_F(0x04115aca) /* 0.254236974 */, 11 }, /* 110 */ { MAD_F(0x041e1cc4) /* 0.257351652 */, 11 }, /* 111 */ { MAD_F(0x042ae8a7) /* 0.260475783 */, 11 }, /* 112 */ { MAD_F(0x0437be65) /* 0.263609310 */, 11 }, /* 113 */ { MAD_F(0x04449dee) /* 0.266752177 */, 11 }, /* 114 */ { MAD_F(0x04518733) /* 0.269904329 */, 11 }, /* 115 */ { MAD_F(0x045e7a26) /* 0.273065710 */, 11 }, /* 116 */ { MAD_F(0x046b76b9) /* 0.276236269 */, 11 }, /* 117 */ { MAD_F(0x04787cdc) /* 0.279415952 */, 11 }, /* 118 */ { MAD_F(0x04858c83) /* 0.282604707 */, 11 }, /* 119 */ { MAD_F(0x0492a59f) /* 0.285802482 */, 11 }, /* 120 */ { MAD_F(0x049fc824) /* 0.289009227 */, 11 }, /* 121 */ { MAD_F(0x04acf402) /* 0.292224893 */, 11 }, /* 122 */ { MAD_F(0x04ba292e) /* 0.295449429 */, 11 }, /* 123 */ { MAD_F(0x04c7679a) /* 0.298682788 */, 11 }, /* 124 */ { MAD_F(0x04d4af3a) /* 0.301924921 */, 11 }, /* 125 */ { MAD_F(0x04e20000) /* 0.305175781 */, 11 }, /* 126 */ { MAD_F(0x04ef59e0) /* 0.308435322 */, 11 }, /* 127 */ { MAD_F(0x04fcbcce) /* 0.311703498 */, 11 }, /* 128 */ { MAD_F(0x050a28be) /* 0.314980262 */, 11 }, /* 129 */ { MAD_F(0x05179da4) /* 0.318265572 */, 11 }, /* 130 */ { MAD_F(0x05251b73) /* 0.321559381 */, 11 }, /* 131 */ { MAD_F(0x0532a220) /* 0.324861647 */, 11 }, /* 132 */ { MAD_F(0x054031a0) /* 0.328172327 */, 11 }, /* 133 */ { MAD_F(0x054dc9e7) /* 0.331491377 */, 11 }, /* 134 */ { MAD_F(0x055b6ae9) /* 0.334818756 */, 11 }, /* 135 */ { MAD_F(0x0569149c) /* 0.338154423 */, 11 }, /* 136 */ { MAD_F(0x0576c6f5) /* 0.341498336 */, 11 }, /* 137 */ { MAD_F(0x058481e9) /* 0.344850455 */, 11 }, /* 138 */ { MAD_F(0x0592456d) /* 0.348210741 */, 11 }, /* 139 */ { MAD_F(0x05a01176) /* 0.351579152 */, 11 }, /* 140 */ { MAD_F(0x05ade5fa) /* 0.354955651 */, 11 }, /* 141 */ { MAD_F(0x05bbc2ef) /* 0.358340200 */, 11 }, /* 142 */ { MAD_F(0x05c9a84a) /* 0.361732758 */, 11 }, /* 143 */ { MAD_F(0x05d79601) /* 0.365133291 */, 11 }, /* 144 */ { MAD_F(0x05e58c0b) /* 0.368541759 */, 11 }, /* 145 */ { MAD_F(0x05f38a5d) /* 0.371958126 */, 11 }, /* 146 */ { MAD_F(0x060190ee) /* 0.375382356 */, 11 }, /* 147 */ { MAD_F(0x060f9fb3) /* 0.378814413 */, 11 }, /* 148 */ { MAD_F(0x061db6a5) /* 0.382254261 */, 11 }, /* 149 */ { MAD_F(0x062bd5b8) /* 0.385701865 */, 11 }, /* 150 */ { MAD_F(0x0639fce4) /* 0.389157191 */, 11 }, /* 151 */ { MAD_F(0x06482c1f) /* 0.392620204 */, 11 }, /* 152 */ { MAD_F(0x06566361) /* 0.396090870 */, 11 }, /* 153 */ { MAD_F(0x0664a2a0) /* 0.399569155 */, 11 }, /* 154 */ { MAD_F(0x0672e9d4) /* 0.403055027 */, 11 }, /* 155 */ { MAD_F(0x068138f3) /* 0.406548452 */, 11 }, /* 156 */ { MAD_F(0x068f8ff5) /* 0.410049398 */, 11 }, /* 157 */ { MAD_F(0x069deed1) /* 0.413557833 */, 11 }, /* 158 */ { MAD_F(0x06ac557f) /* 0.417073724 */, 11 }, /* 159 */ { MAD_F(0x06bac3f6) /* 0.420597041 */, 11 }, /* 160 */ { MAD_F(0x06c93a2e) /* 0.424127753 */, 11 }, /* 161 */ { MAD_F(0x06d7b81f) /* 0.427665827 */, 11 }, /* 162 */ { MAD_F(0x06e63dc0) /* 0.431211234 */, 11 }, /* 163 */ { MAD_F(0x06f4cb09) /* 0.434763944 */, 11 }, /* 164 */ { MAD_F(0x07035ff3) /* 0.438323927 */, 11 }, /* 165 */ { MAD_F(0x0711fc75) /* 0.441891153 */, 11 }, /* 166 */ { MAD_F(0x0720a087) /* 0.445465593 */, 11 }, /* 167 */ { MAD_F(0x072f4c22) /* 0.449047217 */, 11 }, /* 168 */ { MAD_F(0x073dff3e) /* 0.452635998 */, 11 }, /* 169 */ { MAD_F(0x074cb9d3) /* 0.456231906 */, 11 }, /* 170 */ { MAD_F(0x075b7bdb) /* 0.459834914 */, 11 }, /* 171 */ { MAD_F(0x076a454c) /* 0.463444993 */, 11 }, /* 172 */ { MAD_F(0x07791620) /* 0.467062117 */, 11 }, /* 173 */ { MAD_F(0x0787ee50) /* 0.470686258 */, 11 }, /* 174 */ { MAD_F(0x0796cdd4) /* 0.474317388 */, 11 }, /* 175 */ { MAD_F(0x07a5b4a5) /* 0.477955481 */, 11 }, /* 176 */ { MAD_F(0x07b4a2bc) /* 0.481600510 */, 11 }, /* 177 */ { MAD_F(0x07c39812) /* 0.485252449 */, 11 }, /* 178 */ { MAD_F(0x07d294a0) /* 0.488911273 */, 11 }, /* 179 */ { MAD_F(0x07e1985f) /* 0.492576954 */, 11 }, /* 180 */ { MAD_F(0x07f0a348) /* 0.496249468 */, 11 }, /* 181 */ { MAD_F(0x07ffb554) /* 0.499928790 */, 11 }, /* 182 */ { MAD_F(0x0407673f) /* 0.251807447 */, 12 }, /* 183 */ { MAD_F(0x040ef75e) /* 0.253653877 */, 12 }, /* 184 */ { MAD_F(0x04168b05) /* 0.255503674 */, 12 }, /* 185 */ { MAD_F(0x041e2230) /* 0.257356825 */, 12 }, /* 186 */ { MAD_F(0x0425bcdd) /* 0.259213318 */, 12 }, /* 187 */ { MAD_F(0x042d5b07) /* 0.261073141 */, 12 }, /* 188 */ { MAD_F(0x0434fcad) /* 0.262936282 */, 12 }, /* 189 */ { MAD_F(0x043ca1c9) /* 0.264802730 */, 12 }, /* 190 */ { MAD_F(0x04444a5a) /* 0.266672472 */, 12 }, /* 191 */ { MAD_F(0x044bf65d) /* 0.268545497 */, 12 }, /* 192 */ { MAD_F(0x0453a5cd) /* 0.270421794 */, 12 }, /* 193 */ { MAD_F(0x045b58a9) /* 0.272301352 */, 12 }, /* 194 */ { MAD_F(0x04630eed) /* 0.274184158 */, 12 }, /* 195 */ { MAD_F(0x046ac896) /* 0.276070203 */, 12 }, /* 196 */ { MAD_F(0x047285a2) /* 0.277959474 */, 12 }, /* 197 */ { MAD_F(0x047a460c) /* 0.279851960 */, 12 }, /* 198 */ { MAD_F(0x048209d3) /* 0.281747652 */, 12 }, /* 199 */ { MAD_F(0x0489d0f4) /* 0.283646538 */, 12 }, /* 200 */ { MAD_F(0x04919b6a) /* 0.285548607 */, 12 }, /* 201 */ { MAD_F(0x04996935) /* 0.287453849 */, 12 }, /* 202 */ { MAD_F(0x04a13a50) /* 0.289362253 */, 12 }, /* 203 */ { MAD_F(0x04a90eba) /* 0.291273810 */, 12 }, /* 204 */ { MAD_F(0x04b0e66e) /* 0.293188507 */, 12 }, /* 205 */ { MAD_F(0x04b8c16c) /* 0.295106336 */, 12 }, /* 206 */ { MAD_F(0x04c09faf) /* 0.297027285 */, 12 }, /* 207 */ { MAD_F(0x04c88135) /* 0.298951346 */, 12 }, /* 208 */ { MAD_F(0x04d065fb) /* 0.300878507 */, 12 }, /* 209 */ { MAD_F(0x04d84dff) /* 0.302808759 */, 12 }, /* 210 */ { MAD_F(0x04e0393e) /* 0.304742092 */, 12 }, /* 211 */ { MAD_F(0x04e827b6) /* 0.306678497 */, 12 }, /* 212 */ { MAD_F(0x04f01963) /* 0.308617963 */, 12 }, /* 213 */ { MAD_F(0x04f80e44) /* 0.310560480 */, 12 }, /* 214 */ { MAD_F(0x05000655) /* 0.312506041 */, 12 }, /* 215 */ { MAD_F(0x05080195) /* 0.314454634 */, 12 }, /* 216 */ { MAD_F(0x05100000) /* 0.316406250 */, 12 }, /* 217 */ { MAD_F(0x05180194) /* 0.318360880 */, 12 }, /* 218 */ { MAD_F(0x0520064f) /* 0.320318516 */, 12 }, /* 219 */ { MAD_F(0x05280e2d) /* 0.322279147 */, 12 }, /* 220 */ { MAD_F(0x0530192e) /* 0.324242764 */, 12 }, /* 221 */ { MAD_F(0x0538274e) /* 0.326209359 */, 12 }, /* 222 */ { MAD_F(0x0540388a) /* 0.328178922 */, 12 }, /* 223 */ { MAD_F(0x05484ce2) /* 0.330151445 */, 12 }, /* 224 */ { MAD_F(0x05506451) /* 0.332126919 */, 12 }, /* 225 */ { MAD_F(0x05587ed5) /* 0.334105334 */, 12 }, /* 226 */ { MAD_F(0x05609c6e) /* 0.336086683 */, 12 }, /* 227 */ { MAD_F(0x0568bd17) /* 0.338070956 */, 12 }, /* 228 */ { MAD_F(0x0570e0cf) /* 0.340058145 */, 12 }, /* 229 */ { MAD_F(0x05790793) /* 0.342048241 */, 12 }, /* 230 */ { MAD_F(0x05813162) /* 0.344041237 */, 12 }, /* 231 */ { MAD_F(0x05895e39) /* 0.346037122 */, 12 }, /* 232 */ { MAD_F(0x05918e15) /* 0.348035890 */, 12 }, /* 233 */ { MAD_F(0x0599c0f4) /* 0.350037532 */, 12 }, /* 234 */ { MAD_F(0x05a1f6d5) /* 0.352042040 */, 12 }, /* 235 */ { MAD_F(0x05aa2fb5) /* 0.354049405 */, 12 }, /* 236 */ { MAD_F(0x05b26b92) /* 0.356059619 */, 12 }, /* 237 */ { MAD_F(0x05baaa69) /* 0.358072674 */, 12 }, /* 238 */ { MAD_F(0x05c2ec39) /* 0.360088563 */, 12 }, /* 239 */ { MAD_F(0x05cb3100) /* 0.362107278 */, 12 }, /* 240 */ { MAD_F(0x05d378bb) /* 0.364128809 */, 12 }, /* 241 */ { MAD_F(0x05dbc368) /* 0.366153151 */, 12 }, /* 242 */ { MAD_F(0x05e41105) /* 0.368180294 */, 12 }, /* 243 */ { MAD_F(0x05ec6190) /* 0.370210231 */, 12 }, /* 244 */ { MAD_F(0x05f4b507) /* 0.372242955 */, 12 }, /* 245 */ { MAD_F(0x05fd0b68) /* 0.374278458 */, 12 }, /* 246 */ { MAD_F(0x060564b1) /* 0.376316732 */, 12 }, /* 247 */ { MAD_F(0x060dc0e0) /* 0.378357769 */, 12 }, /* 248 */ { MAD_F(0x06161ff3) /* 0.380401563 */, 12 }, /* 249 */ { MAD_F(0x061e81e8) /* 0.382448106 */, 12 }, /* 250 */ { MAD_F(0x0626e6bc) /* 0.384497391 */, 12 }, /* 251 */ { MAD_F(0x062f4e6f) /* 0.386549409 */, 12 }, /* 252 */ { MAD_F(0x0637b8fd) /* 0.388604155 */, 12 }, /* 253 */ { MAD_F(0x06402666) /* 0.390661620 */, 12 }, /* 254 */ { MAD_F(0x064896a7) /* 0.392721798 */, 12 }, /* 255 */ { MAD_F(0x065109be) /* 0.394784681 */, 12 }, /* 256 */ { MAD_F(0x06597fa9) /* 0.396850263 */, 12 }, /* 257 */ { MAD_F(0x0661f867) /* 0.398918536 */, 12 }, /* 258 */ { MAD_F(0x066a73f5) /* 0.400989493 */, 12 }, /* 259 */ { MAD_F(0x0672f252) /* 0.403063128 */, 12 }, /* 260 */ { MAD_F(0x067b737c) /* 0.405139433 */, 12 }, /* 261 */ { MAD_F(0x0683f771) /* 0.407218402 */, 12 }, /* 262 */ { MAD_F(0x068c7e2f) /* 0.409300027 */, 12 }, /* 263 */ { MAD_F(0x069507b5) /* 0.411384303 */, 12 }, /* 264 */ { MAD_F(0x069d9400) /* 0.413471222 */, 12 }, /* 265 */ { MAD_F(0x06a6230f) /* 0.415560778 */, 12 }, /* 266 */ { MAD_F(0x06aeb4e0) /* 0.417652964 */, 12 }, /* 267 */ { MAD_F(0x06b74971) /* 0.419747773 */, 12 }, /* 268 */ { MAD_F(0x06bfe0c0) /* 0.421845199 */, 12 }, /* 269 */ { MAD_F(0x06c87acc) /* 0.423945235 */, 12 }, /* 270 */ { MAD_F(0x06d11794) /* 0.426047876 */, 12 }, /* 271 */ { MAD_F(0x06d9b714) /* 0.428153114 */, 12 }, /* 272 */ { MAD_F(0x06e2594c) /* 0.430260942 */, 12 }, /* 273 */ { MAD_F(0x06eafe3a) /* 0.432371356 */, 12 }, /* 274 */ { MAD_F(0x06f3a5dc) /* 0.434484348 */, 12 }, /* 275 */ { MAD_F(0x06fc5030) /* 0.436599912 */, 12 }, /* 276 */ { MAD_F(0x0704fd35) /* 0.438718042 */, 12 }, /* 277 */ { MAD_F(0x070dacea) /* 0.440838732 */, 12 }, /* 278 */ { MAD_F(0x07165f4b) /* 0.442961975 */, 12 }, /* 279 */ { MAD_F(0x071f1459) /* 0.445087765 */, 12 }, /* 280 */ { MAD_F(0x0727cc11) /* 0.447216097 */, 12 }, /* 281 */ { MAD_F(0x07308671) /* 0.449346964 */, 12 }, /* 282 */ { MAD_F(0x07394378) /* 0.451480360 */, 12 }, /* 283 */ { MAD_F(0x07420325) /* 0.453616280 */, 12 }, /* 284 */ { MAD_F(0x074ac575) /* 0.455754717 */, 12 }, /* 285 */ { MAD_F(0x07538a67) /* 0.457895665 */, 12 }, /* 286 */ { MAD_F(0x075c51fa) /* 0.460039119 */, 12 }, /* 287 */ { MAD_F(0x07651c2c) /* 0.462185072 */, 12 }, /* 288 */ { MAD_F(0x076de8fc) /* 0.464333519 */, 12 }, /* 289 */ { MAD_F(0x0776b867) /* 0.466484455 */, 12 }, /* 290 */ { MAD_F(0x077f8a6d) /* 0.468637872 */, 12 }, /* 291 */ { MAD_F(0x07885f0b) /* 0.470793767 */, 12 }, /* 292 */ { MAD_F(0x07913641) /* 0.472952132 */, 12 }, /* 293 */ { MAD_F(0x079a100c) /* 0.475112962 */, 12 }, /* 294 */ { MAD_F(0x07a2ec6c) /* 0.477276252 */, 12 }, /* 295 */ { MAD_F(0x07abcb5f) /* 0.479441997 */, 12 }, /* 296 */ { MAD_F(0x07b4ace3) /* 0.481610189 */, 12 }, /* 297 */ { MAD_F(0x07bd90f6) /* 0.483780825 */, 12 }, /* 298 */ { MAD_F(0x07c67798) /* 0.485953899 */, 12 }, /* 299 */ { MAD_F(0x07cf60c7) /* 0.488129404 */, 12 }, /* 300 */ { MAD_F(0x07d84c81) /* 0.490307336 */, 12 }, /* 301 */ { MAD_F(0x07e13ac5) /* 0.492487690 */, 12 }, /* 302 */ { MAD_F(0x07ea2b92) /* 0.494670459 */, 12 }, /* 303 */ { MAD_F(0x07f31ee6) /* 0.496855639 */, 12 }, /* 304 */ { MAD_F(0x07fc14bf) /* 0.499043224 */, 12 }, /* 305 */ { MAD_F(0x0402868e) /* 0.250616605 */, 13 }, /* 306 */ { MAD_F(0x040703ff) /* 0.251712795 */, 13 }, /* 307 */ { MAD_F(0x040b82b0) /* 0.252810180 */, 13 }, /* 308 */ { MAD_F(0x041002a1) /* 0.253908756 */, 13 }, /* 309 */ { MAD_F(0x041483d1) /* 0.255008523 */, 13 }, /* 310 */ { MAD_F(0x04190640) /* 0.256109476 */, 13 }, /* 311 */ { MAD_F(0x041d89ed) /* 0.257211614 */, 13 }, /* 312 */ { MAD_F(0x04220ed7) /* 0.258314934 */, 13 }, /* 313 */ { MAD_F(0x042694fe) /* 0.259419433 */, 13 }, /* 314 */ { MAD_F(0x042b1c60) /* 0.260525110 */, 13 }, /* 315 */ { MAD_F(0x042fa4fe) /* 0.261631960 */, 13 }, /* 316 */ { MAD_F(0x04342ed7) /* 0.262739982 */, 13 }, /* 317 */ { MAD_F(0x0438b9e9) /* 0.263849174 */, 13 }, /* 318 */ { MAD_F(0x043d4635) /* 0.264959533 */, 13 }, /* 319 */ { MAD_F(0x0441d3b9) /* 0.266071056 */, 13 }, /* 320 */ { MAD_F(0x04466275) /* 0.267183742 */, 13 }, /* 321 */ { MAD_F(0x044af269) /* 0.268297587 */, 13 }, /* 322 */ { MAD_F(0x044f8393) /* 0.269412589 */, 13 }, /* 323 */ { MAD_F(0x045415f3) /* 0.270528746 */, 13 }, /* 324 */ { MAD_F(0x0458a989) /* 0.271646056 */, 13 }, /* 325 */ { MAD_F(0x045d3e53) /* 0.272764515 */, 13 }, /* 326 */ { MAD_F(0x0461d451) /* 0.273884123 */, 13 }, /* 327 */ { MAD_F(0x04666b83) /* 0.275004875 */, 13 }, /* 328 */ { MAD_F(0x046b03e7) /* 0.276126771 */, 13 }, /* 329 */ { MAD_F(0x046f9d7e) /* 0.277249808 */, 13 }, /* 330 */ { MAD_F(0x04743847) /* 0.278373983 */, 13 }, /* 331 */ { MAD_F(0x0478d440) /* 0.279499294 */, 13 }, /* 332 */ { MAD_F(0x047d716a) /* 0.280625739 */, 13 }, /* 333 */ { MAD_F(0x04820fc3) /* 0.281753315 */, 13 }, /* 334 */ { MAD_F(0x0486af4c) /* 0.282882021 */, 13 }, /* 335 */ { MAD_F(0x048b5003) /* 0.284011853 */, 13 }, /* 336 */ { MAD_F(0x048ff1e8) /* 0.285142811 */, 13 }, /* 337 */ { MAD_F(0x049494fb) /* 0.286274891 */, 13 }, /* 338 */ { MAD_F(0x0499393a) /* 0.287408091 */, 13 }, /* 339 */ { MAD_F(0x049ddea5) /* 0.288542409 */, 13 }, /* 340 */ { MAD_F(0x04a2853c) /* 0.289677844 */, 13 }, /* 341 */ { MAD_F(0x04a72cfe) /* 0.290814392 */, 13 }, /* 342 */ { MAD_F(0x04abd5ea) /* 0.291952051 */, 13 }, /* 343 */ { MAD_F(0x04b08000) /* 0.293090820 */, 13 }, /* 344 */ { MAD_F(0x04b52b3f) /* 0.294230696 */, 13 }, /* 345 */ { MAD_F(0x04b9d7a7) /* 0.295371678 */, 13 }, /* 346 */ { MAD_F(0x04be8537) /* 0.296513762 */, 13 }, /* 347 */ { MAD_F(0x04c333ee) /* 0.297656947 */, 13 }, /* 348 */ { MAD_F(0x04c7e3cc) /* 0.298801231 */, 13 }, /* 349 */ { MAD_F(0x04cc94d1) /* 0.299946611 */, 13 }, /* 350 */ { MAD_F(0x04d146fb) /* 0.301093085 */, 13 }, /* 351 */ { MAD_F(0x04d5fa4b) /* 0.302240653 */, 13 }, /* 352 */ { MAD_F(0x04daaec0) /* 0.303389310 */, 13 }, /* 353 */ { MAD_F(0x04df6458) /* 0.304539056 */, 13 }, /* 354 */ { MAD_F(0x04e41b14) /* 0.305689888 */, 13 }, /* 355 */ { MAD_F(0x04e8d2f3) /* 0.306841804 */, 13 }, /* 356 */ { MAD_F(0x04ed8bf5) /* 0.307994802 */, 13 }, /* 357 */ { MAD_F(0x04f24618) /* 0.309148880 */, 13 }, /* 358 */ { MAD_F(0x04f7015d) /* 0.310304037 */, 13 }, /* 359 */ { MAD_F(0x04fbbdc3) /* 0.311460269 */, 13 }, /* 360 */ { MAD_F(0x05007b49) /* 0.312617576 */, 13 }, /* 361 */ { MAD_F(0x050539ef) /* 0.313775954 */, 13 }, /* 362 */ { MAD_F(0x0509f9b4) /* 0.314935403 */, 13 }, /* 363 */ { MAD_F(0x050eba98) /* 0.316095920 */, 13 }, /* 364 */ { MAD_F(0x05137c9a) /* 0.317257503 */, 13 }, /* 365 */ { MAD_F(0x05183fba) /* 0.318420150 */, 13 }, /* 366 */ { MAD_F(0x051d03f7) /* 0.319583859 */, 13 }, /* 367 */ { MAD_F(0x0521c950) /* 0.320748629 */, 13 }, /* 368 */ { MAD_F(0x05268fc6) /* 0.321914457 */, 13 }, /* 369 */ { MAD_F(0x052b5757) /* 0.323081342 */, 13 }, /* 370 */ { MAD_F(0x05302003) /* 0.324249281 */, 13 }, /* 371 */ { MAD_F(0x0534e9ca) /* 0.325418273 */, 13 }, /* 372 */ { MAD_F(0x0539b4ab) /* 0.326588316 */, 13 }, /* 373 */ { MAD_F(0x053e80a6) /* 0.327759407 */, 13 }, /* 374 */ { MAD_F(0x05434db9) /* 0.328931546 */, 13 }, /* 375 */ { MAD_F(0x05481be5) /* 0.330104730 */, 13 }, /* 376 */ { MAD_F(0x054ceb2a) /* 0.331278957 */, 13 }, /* 377 */ { MAD_F(0x0551bb85) /* 0.332454225 */, 13 }, /* 378 */ { MAD_F(0x05568cf8) /* 0.333630533 */, 13 }, /* 379 */ { MAD_F(0x055b5f81) /* 0.334807879 */, 13 }, /* 380 */ { MAD_F(0x05603321) /* 0.335986261 */, 13 }, /* 381 */ { MAD_F(0x056507d6) /* 0.337165677 */, 13 }, /* 382 */ { MAD_F(0x0569dda0) /* 0.338346125 */, 13 }, /* 383 */ { MAD_F(0x056eb47f) /* 0.339527604 */, 13 }, /* 384 */ { MAD_F(0x05738c72) /* 0.340710111 */, 13 }, /* 385 */ { MAD_F(0x05786578) /* 0.341893646 */, 13 }, /* 386 */ { MAD_F(0x057d3f92) /* 0.343078205 */, 13 }, /* 387 */ { MAD_F(0x05821abf) /* 0.344263788 */, 13 }, /* 388 */ { MAD_F(0x0586f6fd) /* 0.345450393 */, 13 }, /* 389 */ { MAD_F(0x058bd44e) /* 0.346638017 */, 13 }, /* 390 */ { MAD_F(0x0590b2b0) /* 0.347826659 */, 13 }, /* 391 */ { MAD_F(0x05959222) /* 0.349016318 */, 13 }, /* 392 */ { MAD_F(0x059a72a5) /* 0.350206992 */, 13 }, /* 393 */ { MAD_F(0x059f5438) /* 0.351398678 */, 13 }, /* 394 */ { MAD_F(0x05a436da) /* 0.352591376 */, 13 }, /* 395 */ { MAD_F(0x05a91a8c) /* 0.353785083 */, 13 }, /* 396 */ { MAD_F(0x05adff4c) /* 0.354979798 */, 13 }, /* 397 */ { MAD_F(0x05b2e51a) /* 0.356175519 */, 13 }, /* 398 */ { MAD_F(0x05b7cbf5) /* 0.357372244 */, 13 }, /* 399 */ { MAD_F(0x05bcb3de) /* 0.358569972 */, 13 }, /* 400 */ { MAD_F(0x05c19cd3) /* 0.359768701 */, 13 }, /* 401 */ { MAD_F(0x05c686d5) /* 0.360968429 */, 13 }, /* 402 */ { MAD_F(0x05cb71e2) /* 0.362169156 */, 13 }, /* 403 */ { MAD_F(0x05d05dfb) /* 0.363370878 */, 13 }, /* 404 */ { MAD_F(0x05d54b1f) /* 0.364573594 */, 13 }, /* 405 */ { MAD_F(0x05da394d) /* 0.365777304 */, 13 }, /* 406 */ { MAD_F(0x05df2885) /* 0.366982004 */, 13 }, /* 407 */ { MAD_F(0x05e418c7) /* 0.368187694 */, 13 }, /* 408 */ { MAD_F(0x05e90a12) /* 0.369394372 */, 13 }, /* 409 */ { MAD_F(0x05edfc66) /* 0.370602036 */, 13 }, /* 410 */ { MAD_F(0x05f2efc2) /* 0.371810684 */, 13 }, /* 411 */ { MAD_F(0x05f7e426) /* 0.373020316 */, 13 }, /* 412 */ { MAD_F(0x05fcd992) /* 0.374230929 */, 13 }, /* 413 */ { MAD_F(0x0601d004) /* 0.375442522 */, 13 }, /* 414 */ { MAD_F(0x0606c77d) /* 0.376655093 */, 13 }, /* 415 */ { MAD_F(0x060bbffd) /* 0.377868641 */, 13 }, /* 416 */ { MAD_F(0x0610b982) /* 0.379083164 */, 13 }, /* 417 */ { MAD_F(0x0615b40c) /* 0.380298661 */, 13 }, /* 418 */ { MAD_F(0x061aaf9c) /* 0.381515130 */, 13 }, /* 419 */ { MAD_F(0x061fac2f) /* 0.382732569 */, 13 }, /* 420 */ { MAD_F(0x0624a9c7) /* 0.383950977 */, 13 }, /* 421 */ { MAD_F(0x0629a863) /* 0.385170352 */, 13 }, /* 422 */ { MAD_F(0x062ea802) /* 0.386390694 */, 13 }, /* 423 */ { MAD_F(0x0633a8a3) /* 0.387611999 */, 13 }, /* 424 */ { MAD_F(0x0638aa48) /* 0.388834268 */, 13 }, /* 425 */ { MAD_F(0x063dacee) /* 0.390057497 */, 13 }, /* 426 */ { MAD_F(0x0642b096) /* 0.391281687 */, 13 }, /* 427 */ { MAD_F(0x0647b53f) /* 0.392506834 */, 13 }, /* 428 */ { MAD_F(0x064cbae9) /* 0.393732939 */, 13 }, /* 429 */ { MAD_F(0x0651c193) /* 0.394959999 */, 13 }, /* 430 */ { MAD_F(0x0656c93d) /* 0.396188012 */, 13 }, /* 431 */ { MAD_F(0x065bd1e7) /* 0.397416978 */, 13 }, /* 432 */ { MAD_F(0x0660db91) /* 0.398646895 */, 13 }, /* 433 */ { MAD_F(0x0665e639) /* 0.399877761 */, 13 }, /* 434 */ { MAD_F(0x066af1df) /* 0.401109575 */, 13 }, /* 435 */ { MAD_F(0x066ffe84) /* 0.402342335 */, 13 }, /* 436 */ { MAD_F(0x06750c26) /* 0.403576041 */, 13 }, /* 437 */ { MAD_F(0x067a1ac6) /* 0.404810690 */, 13 }, /* 438 */ { MAD_F(0x067f2a62) /* 0.406046281 */, 13 }, /* 439 */ { MAD_F(0x06843afb) /* 0.407282813 */, 13 }, /* 440 */ { MAD_F(0x06894c90) /* 0.408520284 */, 13 }, /* 441 */ { MAD_F(0x068e5f21) /* 0.409758693 */, 13 }, /* 442 */ { MAD_F(0x069372ae) /* 0.410998038 */, 13 }, /* 443 */ { MAD_F(0x06988735) /* 0.412238319 */, 13 }, /* 444 */ { MAD_F(0x069d9cb7) /* 0.413479532 */, 13 }, /* 445 */ { MAD_F(0x06a2b333) /* 0.414721679 */, 13 }, /* 446 */ { MAD_F(0x06a7caa9) /* 0.415964756 */, 13 }, /* 447 */ { MAD_F(0x06ace318) /* 0.417208762 */, 13 }, /* 448 */ { MAD_F(0x06b1fc81) /* 0.418453696 */, 13 }, /* 449 */ { MAD_F(0x06b716e2) /* 0.419699557 */, 13 }, /* 450 */ { MAD_F(0x06bc323b) /* 0.420946343 */, 13 }, /* 451 */ { MAD_F(0x06c14e8d) /* 0.422194054 */, 13 }, /* 452 */ { MAD_F(0x06c66bd6) /* 0.423442686 */, 13 }, /* 453 */ { MAD_F(0x06cb8a17) /* 0.424692240 */, 13 }, /* 454 */ { MAD_F(0x06d0a94e) /* 0.425942714 */, 13 }, /* 455 */ { MAD_F(0x06d5c97c) /* 0.427194106 */, 13 }, /* 456 */ { MAD_F(0x06daeaa1) /* 0.428446415 */, 13 }, /* 457 */ { MAD_F(0x06e00cbb) /* 0.429699640 */, 13 }, /* 458 */ { MAD_F(0x06e52fca) /* 0.430953779 */, 13 }, /* 459 */ { MAD_F(0x06ea53cf) /* 0.432208832 */, 13 }, /* 460 */ { MAD_F(0x06ef78c8) /* 0.433464796 */, 13 }, /* 461 */ { MAD_F(0x06f49eb6) /* 0.434721671 */, 13 }, /* 462 */ { MAD_F(0x06f9c597) /* 0.435979455 */, 13 }, /* 463 */ { MAD_F(0x06feed6d) /* 0.437238146 */, 13 }, /* 464 */ { MAD_F(0x07041636) /* 0.438497744 */, 13 }, /* 465 */ { MAD_F(0x07093ff2) /* 0.439758248 */, 13 }, /* 466 */ { MAD_F(0x070e6aa0) /* 0.441019655 */, 13 }, /* 467 */ { MAD_F(0x07139641) /* 0.442281965 */, 13 }, /* 468 */ { MAD_F(0x0718c2d3) /* 0.443545176 */, 13 }, /* 469 */ { MAD_F(0x071df058) /* 0.444809288 */, 13 }, /* 470 */ { MAD_F(0x07231ecd) /* 0.446074298 */, 13 }, /* 471 */ { MAD_F(0x07284e34) /* 0.447340205 */, 13 }, /* 472 */ { MAD_F(0x072d7e8b) /* 0.448607009 */, 13 }, /* 473 */ { MAD_F(0x0732afd2) /* 0.449874708 */, 13 }, /* 474 */ { MAD_F(0x0737e209) /* 0.451143300 */, 13 }, /* 475 */ { MAD_F(0x073d1530) /* 0.452412785 */, 13 }, /* 476 */ { MAD_F(0x07424946) /* 0.453683161 */, 13 }, /* 477 */ { MAD_F(0x07477e4b) /* 0.454954427 */, 13 }, /* 478 */ { MAD_F(0x074cb43e) /* 0.456226581 */, 13 }, /* 479 */ { MAD_F(0x0751eb20) /* 0.457499623 */, 13 }, /* 480 */ { MAD_F(0x075722ef) /* 0.458773552 */, 13 }, /* 481 */ { MAD_F(0x075c5bac) /* 0.460048365 */, 13 }, /* 482 */ { MAD_F(0x07619557) /* 0.461324062 */, 13 }, /* 483 */ { MAD_F(0x0766cfee) /* 0.462600642 */, 13 }, /* 484 */ { MAD_F(0x076c0b72) /* 0.463878102 */, 13 }, /* 485 */ { MAD_F(0x077147e2) /* 0.465156443 */, 13 }, /* 486 */ { MAD_F(0x0776853e) /* 0.466435663 */, 13 }, /* 487 */ { MAD_F(0x077bc385) /* 0.467715761 */, 13 }, /* 488 */ { MAD_F(0x078102b8) /* 0.468996735 */, 13 }, /* 489 */ { MAD_F(0x078642d6) /* 0.470278584 */, 13 }, /* 490 */ { MAD_F(0x078b83de) /* 0.471561307 */, 13 }, /* 491 */ { MAD_F(0x0790c5d1) /* 0.472844904 */, 13 }, /* 492 */ { MAD_F(0x079608ae) /* 0.474129372 */, 13 }, /* 493 */ { MAD_F(0x079b4c74) /* 0.475414710 */, 13 }, /* 494 */ { MAD_F(0x07a09124) /* 0.476700918 */, 13 }, /* 495 */ { MAD_F(0x07a5d6bd) /* 0.477987994 */, 13 }, /* 496 */ { MAD_F(0x07ab1d3e) /* 0.479275937 */, 13 }, /* 497 */ { MAD_F(0x07b064a8) /* 0.480564746 */, 13 }, /* 498 */ { MAD_F(0x07b5acfb) /* 0.481854420 */, 13 }, /* 499 */ { MAD_F(0x07baf635) /* 0.483144957 */, 13 }, /* 500 */ { MAD_F(0x07c04056) /* 0.484436356 */, 13 }, /* 501 */ { MAD_F(0x07c58b5f) /* 0.485728617 */, 13 }, /* 502 */ { MAD_F(0x07cad74e) /* 0.487021738 */, 13 }, /* 503 */ { MAD_F(0x07d02424) /* 0.488315717 */, 13 }, /* 504 */ { MAD_F(0x07d571e0) /* 0.489610555 */, 13 }, /* 505 */ { MAD_F(0x07dac083) /* 0.490906249 */, 13 }, /* 506 */ { MAD_F(0x07e0100a) /* 0.492202799 */, 13 }, /* 507 */ { MAD_F(0x07e56078) /* 0.493500203 */, 13 }, /* 508 */ { MAD_F(0x07eab1ca) /* 0.494798460 */, 13 }, /* 509 */ { MAD_F(0x07f00401) /* 0.496097570 */, 13 }, /* 510 */ { MAD_F(0x07f5571d) /* 0.497397530 */, 13 }, /* 511 */ { MAD_F(0x07faab1c) /* 0.498698341 */, 13 }, /* 512 */ { MAD_F(0x04000000) /* 0.250000000 */, 14 }, /* 513 */ { MAD_F(0x0402aae3) /* 0.250651254 */, 14 }, /* 514 */ { MAD_F(0x04055638) /* 0.251302930 */, 14 }, /* 515 */ { MAD_F(0x040801ff) /* 0.251955030 */, 14 }, /* 516 */ { MAD_F(0x040aae37) /* 0.252607552 */, 14 }, /* 517 */ { MAD_F(0x040d5ae0) /* 0.253260495 */, 14 }, /* 518 */ { MAD_F(0x041007fa) /* 0.253913860 */, 14 }, /* 519 */ { MAD_F(0x0412b586) /* 0.254567645 */, 14 }, /* 520 */ { MAD_F(0x04156381) /* 0.255221850 */, 14 }, /* 521 */ { MAD_F(0x041811ee) /* 0.255876475 */, 14 }, /* 522 */ { MAD_F(0x041ac0cb) /* 0.256531518 */, 14 }, /* 523 */ { MAD_F(0x041d7018) /* 0.257186980 */, 14 }, /* 524 */ { MAD_F(0x04201fd5) /* 0.257842860 */, 14 }, /* 525 */ { MAD_F(0x0422d003) /* 0.258499157 */, 14 }, /* 526 */ { MAD_F(0x042580a0) /* 0.259155872 */, 14 }, /* 527 */ { MAD_F(0x042831ad) /* 0.259813002 */, 14 }, /* 528 */ { MAD_F(0x042ae32a) /* 0.260470548 */, 14 }, /* 529 */ { MAD_F(0x042d9516) /* 0.261128510 */, 14 }, /* 530 */ { MAD_F(0x04304772) /* 0.261786886 */, 14 }, /* 531 */ { MAD_F(0x0432fa3d) /* 0.262445676 */, 14 }, /* 532 */ { MAD_F(0x0435ad76) /* 0.263104880 */, 14 }, /* 533 */ { MAD_F(0x0438611f) /* 0.263764497 */, 14 }, /* 534 */ { MAD_F(0x043b1536) /* 0.264424527 */, 14 }, /* 535 */ { MAD_F(0x043dc9bc) /* 0.265084969 */, 14 }, /* 536 */ { MAD_F(0x04407eb1) /* 0.265745823 */, 14 }, /* 537 */ { MAD_F(0x04433414) /* 0.266407088 */, 14 }, /* 538 */ { MAD_F(0x0445e9e5) /* 0.267068763 */, 14 }, /* 539 */ { MAD_F(0x0448a024) /* 0.267730848 */, 14 }, /* 540 */ { MAD_F(0x044b56d1) /* 0.268393343 */, 14 }, /* 541 */ { MAD_F(0x044e0dec) /* 0.269056248 */, 14 }, /* 542 */ { MAD_F(0x0450c575) /* 0.269719560 */, 14 }, /* 543 */ { MAD_F(0x04537d6b) /* 0.270383281 */, 14 }, /* 544 */ { MAD_F(0x045635cf) /* 0.271047409 */, 14 }, /* 545 */ { MAD_F(0x0458ee9f) /* 0.271711944 */, 14 }, /* 546 */ { MAD_F(0x045ba7dd) /* 0.272376886 */, 14 }, /* 547 */ { MAD_F(0x045e6188) /* 0.273042234 */, 14 }, /* 548 */ { MAD_F(0x04611ba0) /* 0.273707988 */, 14 }, /* 549 */ { MAD_F(0x0463d625) /* 0.274374147 */, 14 }, /* 550 */ { MAD_F(0x04669116) /* 0.275040710 */, 14 }, /* 551 */ { MAD_F(0x04694c74) /* 0.275707677 */, 14 }, /* 552 */ { MAD_F(0x046c083e) /* 0.276375048 */, 14 }, /* 553 */ { MAD_F(0x046ec474) /* 0.277042822 */, 14 }, /* 554 */ { MAD_F(0x04718116) /* 0.277710999 */, 14 }, /* 555 */ { MAD_F(0x04743e25) /* 0.278379578 */, 14 }, /* 556 */ { MAD_F(0x0476fb9f) /* 0.279048558 */, 14 }, /* 557 */ { MAD_F(0x0479b984) /* 0.279717940 */, 14 }, /* 558 */ { MAD_F(0x047c77d6) /* 0.280387722 */, 14 }, /* 559 */ { MAD_F(0x047f3693) /* 0.281057905 */, 14 }, /* 560 */ { MAD_F(0x0481f5bb) /* 0.281728487 */, 14 }, /* 561 */ { MAD_F(0x0484b54e) /* 0.282399469 */, 14 }, /* 562 */ { MAD_F(0x0487754c) /* 0.283070849 */, 14 }, /* 563 */ { MAD_F(0x048a35b6) /* 0.283742628 */, 14 }, /* 564 */ { MAD_F(0x048cf68a) /* 0.284414805 */, 14 }, /* 565 */ { MAD_F(0x048fb7c8) /* 0.285087379 */, 14 }, /* 566 */ { MAD_F(0x04927972) /* 0.285760350 */, 14 }, /* 567 */ { MAD_F(0x04953b85) /* 0.286433717 */, 14 }, /* 568 */ { MAD_F(0x0497fe03) /* 0.287107481 */, 14 }, /* 569 */ { MAD_F(0x049ac0eb) /* 0.287781640 */, 14 }, /* 570 */ { MAD_F(0x049d843e) /* 0.288456194 */, 14 }, /* 571 */ { MAD_F(0x04a047fa) /* 0.289131142 */, 14 }, /* 572 */ { MAD_F(0x04a30c20) /* 0.289806485 */, 14 }, /* 573 */ { MAD_F(0x04a5d0af) /* 0.290482221 */, 14 }, /* 574 */ { MAD_F(0x04a895a8) /* 0.291158351 */, 14 }, /* 575 */ { MAD_F(0x04ab5b0b) /* 0.291834873 */, 14 }, /* 576 */ { MAD_F(0x04ae20d7) /* 0.292511788 */, 14 }, /* 577 */ { MAD_F(0x04b0e70c) /* 0.293189094 */, 14 }, /* 578 */ { MAD_F(0x04b3adaa) /* 0.293866792 */, 14 }, /* 579 */ { MAD_F(0x04b674b1) /* 0.294544881 */, 14 }, /* 580 */ { MAD_F(0x04b93c21) /* 0.295223360 */, 14 }, /* 581 */ { MAD_F(0x04bc03fa) /* 0.295902229 */, 14 }, /* 582 */ { MAD_F(0x04becc3b) /* 0.296581488 */, 14 }, /* 583 */ { MAD_F(0x04c194e4) /* 0.297261136 */, 14 }, /* 584 */ { MAD_F(0x04c45df6) /* 0.297941173 */, 14 }, /* 585 */ { MAD_F(0x04c72771) /* 0.298621598 */, 14 }, /* 586 */ { MAD_F(0x04c9f153) /* 0.299302411 */, 14 }, /* 587 */ { MAD_F(0x04ccbb9d) /* 0.299983611 */, 14 }, /* 588 */ { MAD_F(0x04cf864f) /* 0.300665198 */, 14 }, /* 589 */ { MAD_F(0x04d25169) /* 0.301347172 */, 14 }, /* 590 */ { MAD_F(0x04d51ceb) /* 0.302029532 */, 14 }, /* 591 */ { MAD_F(0x04d7e8d4) /* 0.302712277 */, 14 }, /* 592 */ { MAD_F(0x04dab524) /* 0.303395408 */, 14 }, /* 593 */ { MAD_F(0x04dd81dc) /* 0.304078923 */, 14 }, /* 594 */ { MAD_F(0x04e04efb) /* 0.304762823 */, 14 }, /* 595 */ { MAD_F(0x04e31c81) /* 0.305447106 */, 14 }, /* 596 */ { MAD_F(0x04e5ea6e) /* 0.306131773 */, 14 }, /* 597 */ { MAD_F(0x04e8b8c2) /* 0.306816823 */, 14 }, /* 598 */ { MAD_F(0x04eb877c) /* 0.307502256 */, 14 }, /* 599 */ { MAD_F(0x04ee569d) /* 0.308188071 */, 14 }, /* 600 */ { MAD_F(0x04f12624) /* 0.308874267 */, 14 }, /* 601 */ { MAD_F(0x04f3f612) /* 0.309560845 */, 14 }, /* 602 */ { MAD_F(0x04f6c666) /* 0.310247804 */, 14 }, /* 603 */ { MAD_F(0x04f99721) /* 0.310935143 */, 14 }, /* 604 */ { MAD_F(0x04fc6841) /* 0.311622862 */, 14 }, /* 605 */ { MAD_F(0x04ff39c7) /* 0.312310961 */, 14 }, /* 606 */ { MAD_F(0x05020bb3) /* 0.312999439 */, 14 }, /* 607 */ { MAD_F(0x0504de05) /* 0.313688296 */, 14 }, /* 608 */ { MAD_F(0x0507b0bc) /* 0.314377532 */, 14 }, /* 609 */ { MAD_F(0x050a83d8) /* 0.315067145 */, 14 }, /* 610 */ { MAD_F(0x050d575b) /* 0.315757136 */, 14 }, /* 611 */ { MAD_F(0x05102b42) /* 0.316447504 */, 14 }, /* 612 */ { MAD_F(0x0512ff8e) /* 0.317138249 */, 14 }, /* 613 */ { MAD_F(0x0515d440) /* 0.317829370 */, 14 }, /* 614 */ { MAD_F(0x0518a956) /* 0.318520867 */, 14 }, /* 615 */ { MAD_F(0x051b7ed1) /* 0.319212739 */, 14 }, /* 616 */ { MAD_F(0x051e54b1) /* 0.319904987 */, 14 }, /* 617 */ { MAD_F(0x05212af5) /* 0.320597609 */, 14 }, /* 618 */ { MAD_F(0x0524019e) /* 0.321290606 */, 14 }, /* 619 */ { MAD_F(0x0526d8ab) /* 0.321983976 */, 14 }, /* 620 */ { MAD_F(0x0529b01d) /* 0.322677720 */, 14 }, /* 621 */ { MAD_F(0x052c87f2) /* 0.323371837 */, 14 }, /* 622 */ { MAD_F(0x052f602c) /* 0.324066327 */, 14 }, /* 623 */ { MAD_F(0x053238ca) /* 0.324761189 */, 14 }, /* 624 */ { MAD_F(0x053511cb) /* 0.325456423 */, 14 }, /* 625 */ { MAD_F(0x0537eb30) /* 0.326152028 */, 14 }, /* 626 */ { MAD_F(0x053ac4f9) /* 0.326848005 */, 14 }, /* 627 */ { MAD_F(0x053d9f25) /* 0.327544352 */, 14 }, /* 628 */ { MAD_F(0x054079b5) /* 0.328241070 */, 14 }, /* 629 */ { MAD_F(0x054354a8) /* 0.328938157 */, 14 }, /* 630 */ { MAD_F(0x05462ffe) /* 0.329635614 */, 14 }, /* 631 */ { MAD_F(0x05490bb7) /* 0.330333440 */, 14 }, /* 632 */ { MAD_F(0x054be7d4) /* 0.331031635 */, 14 }, /* 633 */ { MAD_F(0x054ec453) /* 0.331730198 */, 14 }, /* 634 */ { MAD_F(0x0551a134) /* 0.332429129 */, 14 }, /* 635 */ { MAD_F(0x05547e79) /* 0.333128427 */, 14 }, /* 636 */ { MAD_F(0x05575c20) /* 0.333828093 */, 14 }, /* 637 */ { MAD_F(0x055a3a2a) /* 0.334528126 */, 14 }, /* 638 */ { MAD_F(0x055d1896) /* 0.335228525 */, 14 }, /* 639 */ { MAD_F(0x055ff764) /* 0.335929290 */, 14 }, /* 640 */ { MAD_F(0x0562d694) /* 0.336630420 */, 14 }, /* 641 */ { MAD_F(0x0565b627) /* 0.337331916 */, 14 }, /* 642 */ { MAD_F(0x0568961b) /* 0.338033777 */, 14 }, /* 643 */ { MAD_F(0x056b7671) /* 0.338736002 */, 14 }, /* 644 */ { MAD_F(0x056e5729) /* 0.339438592 */, 14 }, /* 645 */ { MAD_F(0x05713843) /* 0.340141545 */, 14 }, /* 646 */ { MAD_F(0x057419be) /* 0.340844862 */, 14 }, /* 647 */ { MAD_F(0x0576fb9a) /* 0.341548541 */, 14 }, /* 648 */ { MAD_F(0x0579ddd8) /* 0.342252584 */, 14 }, /* 649 */ { MAD_F(0x057cc077) /* 0.342956988 */, 14 }, /* 650 */ { MAD_F(0x057fa378) /* 0.343661754 */, 14 }, /* 651 */ { MAD_F(0x058286d9) /* 0.344366882 */, 14 }, /* 652 */ { MAD_F(0x05856a9b) /* 0.345072371 */, 14 }, /* 653 */ { MAD_F(0x05884ebe) /* 0.345778221 */, 14 }, /* 654 */ { MAD_F(0x058b3342) /* 0.346484431 */, 14 }, /* 655 */ { MAD_F(0x058e1827) /* 0.347191002 */, 14 }, /* 656 */ { MAD_F(0x0590fd6c) /* 0.347897931 */, 14 }, /* 657 */ { MAD_F(0x0593e311) /* 0.348605221 */, 14 }, /* 658 */ { MAD_F(0x0596c917) /* 0.349312869 */, 14 }, /* 659 */ { MAD_F(0x0599af7d) /* 0.350020876 */, 14 }, /* 660 */ { MAD_F(0x059c9643) /* 0.350729240 */, 14 }, /* 661 */ { MAD_F(0x059f7d6a) /* 0.351437963 */, 14 }, /* 662 */ { MAD_F(0x05a264f0) /* 0.352147044 */, 14 }, /* 663 */ { MAD_F(0x05a54cd6) /* 0.352856481 */, 14 }, /* 664 */ { MAD_F(0x05a8351c) /* 0.353566275 */, 14 }, /* 665 */ { MAD_F(0x05ab1dc2) /* 0.354276426 */, 14 }, /* 666 */ { MAD_F(0x05ae06c7) /* 0.354986932 */, 14 }, /* 667 */ { MAD_F(0x05b0f02b) /* 0.355697795 */, 14 }, /* 668 */ { MAD_F(0x05b3d9f0) /* 0.356409012 */, 14 }, /* 669 */ { MAD_F(0x05b6c413) /* 0.357120585 */, 14 }, /* 670 */ { MAD_F(0x05b9ae95) /* 0.357832512 */, 14 }, /* 671 */ { MAD_F(0x05bc9977) /* 0.358544794 */, 14 }, /* 672 */ { MAD_F(0x05bf84b8) /* 0.359257429 */, 14 }, /* 673 */ { MAD_F(0x05c27057) /* 0.359970419 */, 14 }, /* 674 */ { MAD_F(0x05c55c56) /* 0.360683761 */, 14 }, /* 675 */ { MAD_F(0x05c848b3) /* 0.361397456 */, 14 }, /* 676 */ { MAD_F(0x05cb356e) /* 0.362111504 */, 14 }, /* 677 */ { MAD_F(0x05ce2289) /* 0.362825904 */, 14 }, /* 678 */ { MAD_F(0x05d11001) /* 0.363540655 */, 14 }, /* 679 */ { MAD_F(0x05d3fdd8) /* 0.364255759 */, 14 }, /* 680 */ { MAD_F(0x05d6ec0e) /* 0.364971213 */, 14 }, /* 681 */ { MAD_F(0x05d9daa1) /* 0.365687018 */, 14 }, /* 682 */ { MAD_F(0x05dcc993) /* 0.366403174 */, 14 }, /* 683 */ { MAD_F(0x05dfb8e2) /* 0.367119680 */, 14 }, /* 684 */ { MAD_F(0x05e2a890) /* 0.367836535 */, 14 }, /* 685 */ { MAD_F(0x05e5989b) /* 0.368553740 */, 14 }, /* 686 */ { MAD_F(0x05e88904) /* 0.369271294 */, 14 }, /* 687 */ { MAD_F(0x05eb79cb) /* 0.369989197 */, 14 }, /* 688 */ { MAD_F(0x05ee6aef) /* 0.370707448 */, 14 }, /* 689 */ { MAD_F(0x05f15c70) /* 0.371426047 */, 14 }, /* 690 */ { MAD_F(0x05f44e4f) /* 0.372144994 */, 14 }, /* 691 */ { MAD_F(0x05f7408b) /* 0.372864289 */, 14 }, /* 692 */ { MAD_F(0x05fa3324) /* 0.373583930 */, 14 }, /* 693 */ { MAD_F(0x05fd261b) /* 0.374303918 */, 14 }, /* 694 */ { MAD_F(0x0600196e) /* 0.375024253 */, 14 }, /* 695 */ { MAD_F(0x06030d1e) /* 0.375744934 */, 14 }, /* 696 */ { MAD_F(0x0606012b) /* 0.376465960 */, 14 }, /* 697 */ { MAD_F(0x0608f595) /* 0.377187332 */, 14 }, /* 698 */ { MAD_F(0x060bea5c) /* 0.377909049 */, 14 }, /* 699 */ { MAD_F(0x060edf7f) /* 0.378631110 */, 14 }, /* 700 */ { MAD_F(0x0611d4fe) /* 0.379353516 */, 14 }, /* 701 */ { MAD_F(0x0614cada) /* 0.380076266 */, 14 }, /* 702 */ { MAD_F(0x0617c112) /* 0.380799360 */, 14 }, /* 703 */ { MAD_F(0x061ab7a6) /* 0.381522798 */, 14 }, /* 704 */ { MAD_F(0x061dae96) /* 0.382246578 */, 14 }, /* 705 */ { MAD_F(0x0620a5e3) /* 0.382970701 */, 14 }, /* 706 */ { MAD_F(0x06239d8b) /* 0.383695167 */, 14 }, /* 707 */ { MAD_F(0x0626958f) /* 0.384419975 */, 14 }, /* 708 */ { MAD_F(0x06298def) /* 0.385145124 */, 14 }, /* 709 */ { MAD_F(0x062c86aa) /* 0.385870615 */, 14 }, /* 710 */ { MAD_F(0x062f7fc1) /* 0.386596448 */, 14 }, /* 711 */ { MAD_F(0x06327934) /* 0.387322621 */, 14 }, /* 712 */ { MAD_F(0x06357302) /* 0.388049134 */, 14 }, /* 713 */ { MAD_F(0x06386d2b) /* 0.388775988 */, 14 }, /* 714 */ { MAD_F(0x063b67b0) /* 0.389503182 */, 14 }, /* 715 */ { MAD_F(0x063e6290) /* 0.390230715 */, 14 }, /* 716 */ { MAD_F(0x06415dcb) /* 0.390958588 */, 14 }, /* 717 */ { MAD_F(0x06445960) /* 0.391686799 */, 14 }, /* 718 */ { MAD_F(0x06475551) /* 0.392415349 */, 14 }, /* 719 */ { MAD_F(0x064a519c) /* 0.393144238 */, 14 }, /* 720 */ { MAD_F(0x064d4e43) /* 0.393873464 */, 14 }, /* 721 */ { MAD_F(0x06504b44) /* 0.394603028 */, 14 }, /* 722 */ { MAD_F(0x0653489f) /* 0.395332930 */, 14 }, /* 723 */ { MAD_F(0x06564655) /* 0.396063168 */, 14 }, /* 724 */ { MAD_F(0x06594465) /* 0.396793743 */, 14 }, /* 725 */ { MAD_F(0x065c42d0) /* 0.397524655 */, 14 }, /* 726 */ { MAD_F(0x065f4195) /* 0.398255903 */, 14 }, /* 727 */ { MAD_F(0x066240b4) /* 0.398987487 */, 14 }, /* 728 */ { MAD_F(0x0665402d) /* 0.399719406 */, 14 }, /* 729 */ { MAD_F(0x06684000) /* 0.400451660 */, 14 }, /* 730 */ { MAD_F(0x066b402d) /* 0.401184249 */, 14 }, /* 731 */ { MAD_F(0x066e40b3) /* 0.401917173 */, 14 }, /* 732 */ { MAD_F(0x06714194) /* 0.402650431 */, 14 }, /* 733 */ { MAD_F(0x067442ce) /* 0.403384024 */, 14 }, /* 734 */ { MAD_F(0x06774462) /* 0.404117949 */, 14 }, /* 735 */ { MAD_F(0x067a464f) /* 0.404852209 */, 14 }, /* 736 */ { MAD_F(0x067d4896) /* 0.405586801 */, 14 }, /* 737 */ { MAD_F(0x06804b36) /* 0.406321726 */, 14 }, /* 738 */ { MAD_F(0x06834e2f) /* 0.407056983 */, 14 }, /* 739 */ { MAD_F(0x06865181) /* 0.407792573 */, 14 }, /* 740 */ { MAD_F(0x0689552c) /* 0.408528495 */, 14 }, /* 741 */ { MAD_F(0x068c5931) /* 0.409264748 */, 14 }, /* 742 */ { MAD_F(0x068f5d8e) /* 0.410001332 */, 14 }, /* 743 */ { MAD_F(0x06926245) /* 0.410738247 */, 14 }, /* 744 */ { MAD_F(0x06956753) /* 0.411475493 */, 14 }, /* 745 */ { MAD_F(0x06986cbb) /* 0.412213070 */, 14 }, /* 746 */ { MAD_F(0x069b727b) /* 0.412950976 */, 14 }, /* 747 */ { MAD_F(0x069e7894) /* 0.413689213 */, 14 }, /* 748 */ { MAD_F(0x06a17f05) /* 0.414427779 */, 14 }, /* 749 */ { MAD_F(0x06a485cf) /* 0.415166674 */, 14 }, /* 750 */ { MAD_F(0x06a78cf1) /* 0.415905897 */, 14 }, /* 751 */ { MAD_F(0x06aa946b) /* 0.416645450 */, 14 }, /* 752 */ { MAD_F(0x06ad9c3d) /* 0.417385331 */, 14 }, /* 753 */ { MAD_F(0x06b0a468) /* 0.418125540 */, 14 }, /* 754 */ { MAD_F(0x06b3acea) /* 0.418866076 */, 14 }, /* 755 */ { MAD_F(0x06b6b5c4) /* 0.419606940 */, 14 }, /* 756 */ { MAD_F(0x06b9bef6) /* 0.420348132 */, 14 }, /* 757 */ { MAD_F(0x06bcc880) /* 0.421089650 */, 14 }, /* 758 */ { MAD_F(0x06bfd261) /* 0.421831494 */, 14 }, /* 759 */ { MAD_F(0x06c2dc9a) /* 0.422573665 */, 14 }, /* 760 */ { MAD_F(0x06c5e72b) /* 0.423316162 */, 14 }, /* 761 */ { MAD_F(0x06c8f213) /* 0.424058985 */, 14 }, /* 762 */ { MAD_F(0x06cbfd52) /* 0.424802133 */, 14 }, /* 763 */ { MAD_F(0x06cf08e9) /* 0.425545607 */, 14 }, /* 764 */ { MAD_F(0x06d214d7) /* 0.426289405 */, 14 }, /* 765 */ { MAD_F(0x06d5211c) /* 0.427033528 */, 14 }, /* 766 */ { MAD_F(0x06d82db8) /* 0.427777975 */, 14 }, /* 767 */ { MAD_F(0x06db3aaa) /* 0.428522746 */, 14 }, /* 768 */ { MAD_F(0x06de47f4) /* 0.429267841 */, 14 }, /* 769 */ { MAD_F(0x06e15595) /* 0.430013259 */, 14 }, /* 770 */ { MAD_F(0x06e4638d) /* 0.430759001 */, 14 }, /* 771 */ { MAD_F(0x06e771db) /* 0.431505065 */, 14 }, /* 772 */ { MAD_F(0x06ea807f) /* 0.432251452 */, 14 }, /* 773 */ { MAD_F(0x06ed8f7b) /* 0.432998162 */, 14 }, /* 774 */ { MAD_F(0x06f09ecc) /* 0.433745193 */, 14 }, /* 775 */ { MAD_F(0x06f3ae75) /* 0.434492546 */, 14 }, /* 776 */ { MAD_F(0x06f6be73) /* 0.435240221 */, 14 }, /* 777 */ { MAD_F(0x06f9cec8) /* 0.435988217 */, 14 }, /* 778 */ { MAD_F(0x06fcdf72) /* 0.436736534 */, 14 }, /* 779 */ { MAD_F(0x06fff073) /* 0.437485172 */, 14 }, /* 780 */ { MAD_F(0x070301ca) /* 0.438234130 */, 14 }, /* 781 */ { MAD_F(0x07061377) /* 0.438983408 */, 14 }, /* 782 */ { MAD_F(0x0709257a) /* 0.439733006 */, 14 }, /* 783 */ { MAD_F(0x070c37d2) /* 0.440482924 */, 14 }, /* 784 */ { MAD_F(0x070f4a80) /* 0.441233161 */, 14 }, /* 785 */ { MAD_F(0x07125d84) /* 0.441983717 */, 14 }, /* 786 */ { MAD_F(0x071570de) /* 0.442734592 */, 14 }, /* 787 */ { MAD_F(0x0718848d) /* 0.443485785 */, 14 }, /* 788 */ { MAD_F(0x071b9891) /* 0.444237296 */, 14 }, /* 789 */ { MAD_F(0x071eaceb) /* 0.444989126 */, 14 }, /* 790 */ { MAD_F(0x0721c19a) /* 0.445741273 */, 14 }, /* 791 */ { MAD_F(0x0724d69e) /* 0.446493738 */, 14 }, /* 792 */ { MAD_F(0x0727ebf7) /* 0.447246519 */, 14 }, /* 793 */ { MAD_F(0x072b01a6) /* 0.447999618 */, 14 }, /* 794 */ { MAD_F(0x072e17a9) /* 0.448753033 */, 14 }, /* 795 */ { MAD_F(0x07312e01) /* 0.449506765 */, 14 }, /* 796 */ { MAD_F(0x073444ae) /* 0.450260813 */, 14 }, /* 797 */ { MAD_F(0x07375bb0) /* 0.451015176 */, 14 }, /* 798 */ { MAD_F(0x073a7307) /* 0.451769856 */, 14 }, /* 799 */ { MAD_F(0x073d8ab2) /* 0.452524850 */, 14 }, /* 800 */ { MAD_F(0x0740a2b2) /* 0.453280160 */, 14 }, /* 801 */ { MAD_F(0x0743bb06) /* 0.454035784 */, 14 }, /* 802 */ { MAD_F(0x0746d3af) /* 0.454791723 */, 14 }, /* 803 */ { MAD_F(0x0749ecac) /* 0.455547976 */, 14 }, /* 804 */ { MAD_F(0x074d05fe) /* 0.456304543 */, 14 }, /* 805 */ { MAD_F(0x07501fa3) /* 0.457061423 */, 14 }, /* 806 */ { MAD_F(0x0753399d) /* 0.457818618 */, 14 }, /* 807 */ { MAD_F(0x075653eb) /* 0.458576125 */, 14 }, /* 808 */ { MAD_F(0x07596e8d) /* 0.459333946 */, 14 }, /* 809 */ { MAD_F(0x075c8983) /* 0.460092079 */, 14 }, /* 810 */ { MAD_F(0x075fa4cc) /* 0.460850524 */, 14 }, /* 811 */ { MAD_F(0x0762c06a) /* 0.461609282 */, 14 }, /* 812 */ { MAD_F(0x0765dc5b) /* 0.462368352 */, 14 }, /* 813 */ { MAD_F(0x0768f8a0) /* 0.463127733 */, 14 }, /* 814 */ { MAD_F(0x076c1538) /* 0.463887426 */, 14 }, /* 815 */ { MAD_F(0x076f3224) /* 0.464647430 */, 14 }, /* 816 */ { MAD_F(0x07724f64) /* 0.465407744 */, 14 }, /* 817 */ { MAD_F(0x07756cf7) /* 0.466168370 */, 14 }, /* 818 */ { MAD_F(0x07788add) /* 0.466929306 */, 14 }, /* 819 */ { MAD_F(0x077ba916) /* 0.467690552 */, 14 }, /* 820 */ { MAD_F(0x077ec7a3) /* 0.468452108 */, 14 }, /* 821 */ { MAD_F(0x0781e683) /* 0.469213973 */, 14 }, /* 822 */ { MAD_F(0x078505b5) /* 0.469976148 */, 14 }, /* 823 */ { MAD_F(0x0788253b) /* 0.470738632 */, 14 }, /* 824 */ { MAD_F(0x078b4514) /* 0.471501425 */, 14 }, /* 825 */ { MAD_F(0x078e653f) /* 0.472264527 */, 14 }, /* 826 */ { MAD_F(0x079185be) /* 0.473027937 */, 14 }, /* 827 */ { MAD_F(0x0794a68f) /* 0.473791655 */, 14 }, /* 828 */ { MAD_F(0x0797c7b2) /* 0.474555681 */, 14 }, /* 829 */ { MAD_F(0x079ae929) /* 0.475320014 */, 14 }, /* 830 */ { MAD_F(0x079e0af1) /* 0.476084655 */, 14 }, /* 831 */ { MAD_F(0x07a12d0c) /* 0.476849603 */, 14 }, /* 832 */ { MAD_F(0x07a44f7a) /* 0.477614858 */, 14 }, /* 833 */ { MAD_F(0x07a7723a) /* 0.478380420 */, 14 }, /* 834 */ { MAD_F(0x07aa954c) /* 0.479146288 */, 14 }, /* 835 */ { MAD_F(0x07adb8b0) /* 0.479912463 */, 14 }, /* 836 */ { MAD_F(0x07b0dc67) /* 0.480678943 */, 14 }, /* 837 */ { MAD_F(0x07b4006f) /* 0.481445729 */, 14 }, /* 838 */ { MAD_F(0x07b724ca) /* 0.482212820 */, 14 }, /* 839 */ { MAD_F(0x07ba4976) /* 0.482980216 */, 14 }, /* 840 */ { MAD_F(0x07bd6e75) /* 0.483747918 */, 14 }, /* 841 */ { MAD_F(0x07c093c5) /* 0.484515924 */, 14 }, /* 842 */ { MAD_F(0x07c3b967) /* 0.485284235 */, 14 }, /* 843 */ { MAD_F(0x07c6df5a) /* 0.486052849 */, 14 }, /* 844 */ { MAD_F(0x07ca059f) /* 0.486821768 */, 14 }, /* 845 */ { MAD_F(0x07cd2c36) /* 0.487590991 */, 14 }, /* 846 */ { MAD_F(0x07d0531e) /* 0.488360517 */, 14 }, /* 847 */ { MAD_F(0x07d37a57) /* 0.489130346 */, 14 }, /* 848 */ { MAD_F(0x07d6a1e2) /* 0.489900479 */, 14 }, /* 849 */ { MAD_F(0x07d9c9be) /* 0.490670914 */, 14 }, /* 850 */ { MAD_F(0x07dcf1ec) /* 0.491441651 */, 14 }, /* 851 */ { MAD_F(0x07e01a6a) /* 0.492212691 */, 14 }, /* 852 */ { MAD_F(0x07e3433a) /* 0.492984033 */, 14 }, /* 853 */ { MAD_F(0x07e66c5a) /* 0.493755677 */, 14 }, /* 854 */ { MAD_F(0x07e995cc) /* 0.494527623 */, 14 }, /* 855 */ { MAD_F(0x07ecbf8e) /* 0.495299870 */, 14 }, /* 856 */ { MAD_F(0x07efe9a1) /* 0.496072418 */, 14 }, /* 857 */ { MAD_F(0x07f31405) /* 0.496845266 */, 14 }, /* 858 */ { MAD_F(0x07f63eba) /* 0.497618416 */, 14 }, /* 859 */ { MAD_F(0x07f969c0) /* 0.498391866 */, 14 }, /* 860 */ { MAD_F(0x07fc9516) /* 0.499165616 */, 14 }, /* 861 */ { MAD_F(0x07ffc0bc) /* 0.499939666 */, 14 }, /* 862 */ { MAD_F(0x04017659) /* 0.250357008 */, 15 }, /* 863 */ { MAD_F(0x04030c7d) /* 0.250744333 */, 15 }, /* 864 */ { MAD_F(0x0404a2c9) /* 0.251131807 */, 15 }, /* 865 */ { MAD_F(0x0406393d) /* 0.251519431 */, 15 }, /* 866 */ { MAD_F(0x0407cfd9) /* 0.251907204 */, 15 }, /* 867 */ { MAD_F(0x0409669d) /* 0.252295127 */, 15 }, /* 868 */ { MAD_F(0x040afd89) /* 0.252683198 */, 15 }, /* 869 */ { MAD_F(0x040c949e) /* 0.253071419 */, 15 }, /* 870 */ { MAD_F(0x040e2bda) /* 0.253459789 */, 15 }, /* 871 */ { MAD_F(0x040fc33e) /* 0.253848307 */, 15 }, /* 872 */ { MAD_F(0x04115aca) /* 0.254236974 */, 15 }, /* 873 */ { MAD_F(0x0412f27e) /* 0.254625790 */, 15 }, /* 874 */ { MAD_F(0x04148a5a) /* 0.255014755 */, 15 }, /* 875 */ { MAD_F(0x0416225d) /* 0.255403867 */, 15 }, /* 876 */ { MAD_F(0x0417ba89) /* 0.255793128 */, 15 }, /* 877 */ { MAD_F(0x041952dc) /* 0.256182537 */, 15 }, /* 878 */ { MAD_F(0x041aeb57) /* 0.256572095 */, 15 }, /* 879 */ { MAD_F(0x041c83fa) /* 0.256961800 */, 15 }, /* 880 */ { MAD_F(0x041e1cc4) /* 0.257351652 */, 15 }, /* 881 */ { MAD_F(0x041fb5b6) /* 0.257741653 */, 15 }, /* 882 */ { MAD_F(0x04214ed0) /* 0.258131801 */, 15 }, /* 883 */ { MAD_F(0x0422e811) /* 0.258522097 */, 15 }, /* 884 */ { MAD_F(0x04248179) /* 0.258912540 */, 15 }, /* 885 */ { MAD_F(0x04261b0a) /* 0.259303130 */, 15 }, /* 886 */ { MAD_F(0x0427b4c2) /* 0.259693868 */, 15 }, /* 887 */ { MAD_F(0x04294ea1) /* 0.260084752 */, 15 }, /* 888 */ { MAD_F(0x042ae8a7) /* 0.260475783 */, 15 }, /* 889 */ { MAD_F(0x042c82d6) /* 0.260866961 */, 15 }, /* 890 */ { MAD_F(0x042e1d2b) /* 0.261258286 */, 15 }, /* 891 */ { MAD_F(0x042fb7a8) /* 0.261649758 */, 15 }, /* 892 */ { MAD_F(0x0431524c) /* 0.262041376 */, 15 }, /* 893 */ { MAD_F(0x0432ed17) /* 0.262433140 */, 15 }, /* 894 */ { MAD_F(0x0434880a) /* 0.262825051 */, 15 }, /* 895 */ { MAD_F(0x04362324) /* 0.263217107 */, 15 }, /* 896 */ { MAD_F(0x0437be65) /* 0.263609310 */, 15 }, /* 897 */ { MAD_F(0x043959cd) /* 0.264001659 */, 15 }, /* 898 */ { MAD_F(0x043af55d) /* 0.264394153 */, 15 }, /* 899 */ { MAD_F(0x043c9113) /* 0.264786794 */, 15 }, /* 900 */ { MAD_F(0x043e2cf1) /* 0.265179580 */, 15 }, /* 901 */ { MAD_F(0x043fc8f6) /* 0.265572511 */, 15 }, /* 902 */ { MAD_F(0x04416522) /* 0.265965588 */, 15 }, /* 903 */ { MAD_F(0x04430174) /* 0.266358810 */, 15 }, /* 904 */ { MAD_F(0x04449dee) /* 0.266752177 */, 15 }, /* 905 */ { MAD_F(0x04463a8f) /* 0.267145689 */, 15 }, /* 906 */ { MAD_F(0x0447d756) /* 0.267539347 */, 15 }, /* 907 */ { MAD_F(0x04497445) /* 0.267933149 */, 15 }, /* 908 */ { MAD_F(0x044b115a) /* 0.268327096 */, 15 }, /* 909 */ { MAD_F(0x044cae96) /* 0.268721187 */, 15 }, /* 910 */ { MAD_F(0x044e4bf9) /* 0.269115423 */, 15 }, /* 911 */ { MAD_F(0x044fe983) /* 0.269509804 */, 15 }, /* 912 */ { MAD_F(0x04518733) /* 0.269904329 */, 15 }, /* 913 */ { MAD_F(0x0453250a) /* 0.270298998 */, 15 }, /* 914 */ { MAD_F(0x0454c308) /* 0.270693811 */, 15 }, /* 915 */ { MAD_F(0x0456612d) /* 0.271088768 */, 15 }, /* 916 */ { MAD_F(0x0457ff78) /* 0.271483869 */, 15 }, /* 917 */ { MAD_F(0x04599dea) /* 0.271879114 */, 15 }, /* 918 */ { MAD_F(0x045b3c82) /* 0.272274503 */, 15 }, /* 919 */ { MAD_F(0x045cdb41) /* 0.272670035 */, 15 }, /* 920 */ { MAD_F(0x045e7a26) /* 0.273065710 */, 15 }, /* 921 */ { MAD_F(0x04601932) /* 0.273461530 */, 15 }, /* 922 */ { MAD_F(0x0461b864) /* 0.273857492 */, 15 }, /* 923 */ { MAD_F(0x046357bd) /* 0.274253597 */, 15 }, /* 924 */ { MAD_F(0x0464f73c) /* 0.274649846 */, 15 }, /* 925 */ { MAD_F(0x046696e2) /* 0.275046238 */, 15 }, /* 926 */ { MAD_F(0x046836ae) /* 0.275442772 */, 15 }, /* 927 */ { MAD_F(0x0469d6a0) /* 0.275839449 */, 15 }, /* 928 */ { MAD_F(0x046b76b9) /* 0.276236269 */, 15 }, /* 929 */ { MAD_F(0x046d16f7) /* 0.276633232 */, 15 }, /* 930 */ { MAD_F(0x046eb75c) /* 0.277030337 */, 15 }, /* 931 */ { MAD_F(0x047057e8) /* 0.277427584 */, 15 }, /* 932 */ { MAD_F(0x0471f899) /* 0.277824973 */, 15 }, /* 933 */ { MAD_F(0x04739971) /* 0.278222505 */, 15 }, /* 934 */ { MAD_F(0x04753a6f) /* 0.278620179 */, 15 }, /* 935 */ { MAD_F(0x0476db92) /* 0.279017995 */, 15 }, /* 936 */ { MAD_F(0x04787cdc) /* 0.279415952 */, 15 }, /* 937 */ { MAD_F(0x047a1e4c) /* 0.279814051 */, 15 }, /* 938 */ { MAD_F(0x047bbfe2) /* 0.280212292 */, 15 }, /* 939 */ { MAD_F(0x047d619e) /* 0.280610675 */, 15 }, /* 940 */ { MAD_F(0x047f0380) /* 0.281009199 */, 15 }, /* 941 */ { MAD_F(0x0480a588) /* 0.281407864 */, 15 }, /* 942 */ { MAD_F(0x048247b6) /* 0.281806670 */, 15 }, /* 943 */ { MAD_F(0x0483ea0a) /* 0.282205618 */, 15 }, /* 944 */ { MAD_F(0x04858c83) /* 0.282604707 */, 15 }, /* 945 */ { MAD_F(0x04872f22) /* 0.283003936 */, 15 }, /* 946 */ { MAD_F(0x0488d1e8) /* 0.283403307 */, 15 }, /* 947 */ { MAD_F(0x048a74d3) /* 0.283802818 */, 15 }, /* 948 */ { MAD_F(0x048c17e3) /* 0.284202470 */, 15 }, /* 949 */ { MAD_F(0x048dbb1a) /* 0.284602263 */, 15 }, /* 950 */ { MAD_F(0x048f5e76) /* 0.285002195 */, 15 }, /* 951 */ { MAD_F(0x049101f8) /* 0.285402269 */, 15 }, /* 952 */ { MAD_F(0x0492a59f) /* 0.285802482 */, 15 }, /* 953 */ { MAD_F(0x0494496c) /* 0.286202836 */, 15 }, /* 954 */ { MAD_F(0x0495ed5f) /* 0.286603329 */, 15 }, /* 955 */ { MAD_F(0x04979177) /* 0.287003963 */, 15 }, /* 956 */ { MAD_F(0x049935b5) /* 0.287404737 */, 15 }, /* 957 */ { MAD_F(0x049ada19) /* 0.287805650 */, 15 }, /* 958 */ { MAD_F(0x049c7ea1) /* 0.288206703 */, 15 }, /* 959 */ { MAD_F(0x049e2350) /* 0.288607895 */, 15 }, /* 960 */ { MAD_F(0x049fc824) /* 0.289009227 */, 15 }, /* 961 */ { MAD_F(0x04a16d1d) /* 0.289410699 */, 15 }, /* 962 */ { MAD_F(0x04a3123b) /* 0.289812309 */, 15 }, /* 963 */ { MAD_F(0x04a4b77f) /* 0.290214059 */, 15 }, /* 964 */ { MAD_F(0x04a65ce8) /* 0.290615948 */, 15 }, /* 965 */ { MAD_F(0x04a80277) /* 0.291017976 */, 15 }, /* 966 */ { MAD_F(0x04a9a82b) /* 0.291420143 */, 15 }, /* 967 */ { MAD_F(0x04ab4e04) /* 0.291822449 */, 15 }, /* 968 */ { MAD_F(0x04acf402) /* 0.292224893 */, 15 }, /* 969 */ { MAD_F(0x04ae9a26) /* 0.292627476 */, 15 }, /* 970 */ { MAD_F(0x04b0406e) /* 0.293030197 */, 15 }, /* 971 */ { MAD_F(0x04b1e6dc) /* 0.293433057 */, 15 }, /* 972 */ { MAD_F(0x04b38d6f) /* 0.293836055 */, 15 }, /* 973 */ { MAD_F(0x04b53427) /* 0.294239192 */, 15 }, /* 974 */ { MAD_F(0x04b6db05) /* 0.294642466 */, 15 }, /* 975 */ { MAD_F(0x04b88207) /* 0.295045879 */, 15 }, /* 976 */ { MAD_F(0x04ba292e) /* 0.295449429 */, 15 }, /* 977 */ { MAD_F(0x04bbd07a) /* 0.295853118 */, 15 }, /* 978 */ { MAD_F(0x04bd77ec) /* 0.296256944 */, 15 }, /* 979 */ { MAD_F(0x04bf1f82) /* 0.296660907 */, 15 }, /* 980 */ { MAD_F(0x04c0c73d) /* 0.297065009 */, 15 }, /* 981 */ { MAD_F(0x04c26f1d) /* 0.297469248 */, 15 }, /* 982 */ { MAD_F(0x04c41722) /* 0.297873624 */, 15 }, /* 983 */ { MAD_F(0x04c5bf4c) /* 0.298278137 */, 15 }, /* 984 */ { MAD_F(0x04c7679a) /* 0.298682788 */, 15 }, /* 985 */ { MAD_F(0x04c9100d) /* 0.299087576 */, 15 }, /* 986 */ { MAD_F(0x04cab8a6) /* 0.299492500 */, 15 }, /* 987 */ { MAD_F(0x04cc6163) /* 0.299897562 */, 15 }, /* 988 */ { MAD_F(0x04ce0a44) /* 0.300302761 */, 15 }, /* 989 */ { MAD_F(0x04cfb34b) /* 0.300708096 */, 15 }, /* 990 */ { MAD_F(0x04d15c76) /* 0.301113568 */, 15 }, /* 991 */ { MAD_F(0x04d305c5) /* 0.301519176 */, 15 }, /* 992 */ { MAD_F(0x04d4af3a) /* 0.301924921 */, 15 }, /* 993 */ { MAD_F(0x04d658d2) /* 0.302330802 */, 15 }, /* 994 */ { MAD_F(0x04d80290) /* 0.302736820 */, 15 }, /* 995 */ { MAD_F(0x04d9ac72) /* 0.303142973 */, 15 }, /* 996 */ { MAD_F(0x04db5679) /* 0.303549263 */, 15 }, /* 997 */ { MAD_F(0x04dd00a4) /* 0.303955689 */, 15 }, /* 998 */ { MAD_F(0x04deaaf3) /* 0.304362251 */, 15 }, /* 999 */ { MAD_F(0x04e05567) /* 0.304768948 */, 15 }, /* 1000 */ { MAD_F(0x04e20000) /* 0.305175781 */, 15 }, /* 1001 */ { MAD_F(0x04e3aabd) /* 0.305582750 */, 15 }, /* 1002 */ { MAD_F(0x04e5559e) /* 0.305989854 */, 15 }, /* 1003 */ { MAD_F(0x04e700a3) /* 0.306397094 */, 15 }, /* 1004 */ { MAD_F(0x04e8abcd) /* 0.306804470 */, 15 }, /* 1005 */ { MAD_F(0x04ea571c) /* 0.307211980 */, 15 }, /* 1006 */ { MAD_F(0x04ec028e) /* 0.307619626 */, 15 }, /* 1007 */ { MAD_F(0x04edae25) /* 0.308027406 */, 15 }, /* 1008 */ { MAD_F(0x04ef59e0) /* 0.308435322 */, 15 }, /* 1009 */ { MAD_F(0x04f105bf) /* 0.308843373 */, 15 }, /* 1010 */ { MAD_F(0x04f2b1c3) /* 0.309251558 */, 15 }, /* 1011 */ { MAD_F(0x04f45dea) /* 0.309659879 */, 15 }, /* 1012 */ { MAD_F(0x04f60a36) /* 0.310068333 */, 15 }, /* 1013 */ { MAD_F(0x04f7b6a6) /* 0.310476923 */, 15 }, /* 1014 */ { MAD_F(0x04f9633a) /* 0.310885647 */, 15 }, /* 1015 */ { MAD_F(0x04fb0ff2) /* 0.311294505 */, 15 }, /* 1016 */ { MAD_F(0x04fcbcce) /* 0.311703498 */, 15 }, /* 1017 */ { MAD_F(0x04fe69ce) /* 0.312112625 */, 15 }, /* 1018 */ { MAD_F(0x050016f3) /* 0.312521885 */, 15 }, /* 1019 */ { MAD_F(0x0501c43b) /* 0.312931280 */, 15 }, /* 1020 */ { MAD_F(0x050371a7) /* 0.313340809 */, 15 }, /* 1021 */ { MAD_F(0x05051f37) /* 0.313750472 */, 15 }, /* 1022 */ { MAD_F(0x0506cceb) /* 0.314160269 */, 15 }, /* 1023 */ { MAD_F(0x05087ac2) /* 0.314570199 */, 15 }, /* 1024 */ { MAD_F(0x050a28be) /* 0.314980262 */, 15 }, /* 1025 */ { MAD_F(0x050bd6de) /* 0.315390460 */, 15 }, /* 1026 */ { MAD_F(0x050d8521) /* 0.315800790 */, 15 }, /* 1027 */ { MAD_F(0x050f3388) /* 0.316211255 */, 15 }, /* 1028 */ { MAD_F(0x0510e213) /* 0.316621852 */, 15 }, /* 1029 */ { MAD_F(0x051290c2) /* 0.317032582 */, 15 }, /* 1030 */ { MAD_F(0x05143f94) /* 0.317443446 */, 15 }, /* 1031 */ { MAD_F(0x0515ee8a) /* 0.317854442 */, 15 }, /* 1032 */ { MAD_F(0x05179da4) /* 0.318265572 */, 15 }, /* 1033 */ { MAD_F(0x05194ce1) /* 0.318676834 */, 15 }, /* 1034 */ { MAD_F(0x051afc42) /* 0.319088229 */, 15 }, /* 1035 */ { MAD_F(0x051cabc7) /* 0.319499756 */, 15 }, /* 1036 */ { MAD_F(0x051e5b6f) /* 0.319911417 */, 15 }, /* 1037 */ { MAD_F(0x05200b3a) /* 0.320323209 */, 15 }, /* 1038 */ { MAD_F(0x0521bb2a) /* 0.320735134 */, 15 }, /* 1039 */ { MAD_F(0x05236b3d) /* 0.321147192 */, 15 }, /* 1040 */ { MAD_F(0x05251b73) /* 0.321559381 */, 15 }, /* 1041 */ { MAD_F(0x0526cbcd) /* 0.321971703 */, 15 }, /* 1042 */ { MAD_F(0x05287c4a) /* 0.322384156 */, 15 }, /* 1043 */ { MAD_F(0x052a2cea) /* 0.322796742 */, 15 }, /* 1044 */ { MAD_F(0x052bddae) /* 0.323209460 */, 15 }, /* 1045 */ { MAD_F(0x052d8e96) /* 0.323622309 */, 15 }, /* 1046 */ { MAD_F(0x052f3fa1) /* 0.324035290 */, 15 }, /* 1047 */ { MAD_F(0x0530f0cf) /* 0.324448403 */, 15 }, /* 1048 */ { MAD_F(0x0532a220) /* 0.324861647 */, 15 }, /* 1049 */ { MAD_F(0x05345395) /* 0.325275023 */, 15 }, /* 1050 */ { MAD_F(0x0536052d) /* 0.325688530 */, 15 }, /* 1051 */ { MAD_F(0x0537b6e8) /* 0.326102168 */, 15 }, /* 1052 */ { MAD_F(0x053968c6) /* 0.326515938 */, 15 }, /* 1053 */ { MAD_F(0x053b1ac8) /* 0.326929839 */, 15 }, /* 1054 */ { MAD_F(0x053ccced) /* 0.327343870 */, 15 }, /* 1055 */ { MAD_F(0x053e7f35) /* 0.327758033 */, 15 }, /* 1056 */ { MAD_F(0x054031a0) /* 0.328172327 */, 15 }, /* 1057 */ { MAD_F(0x0541e42e) /* 0.328586751 */, 15 }, /* 1058 */ { MAD_F(0x054396df) /* 0.329001306 */, 15 }, /* 1059 */ { MAD_F(0x054549b4) /* 0.329415992 */, 15 }, /* 1060 */ { MAD_F(0x0546fcab) /* 0.329830808 */, 15 }, /* 1061 */ { MAD_F(0x0548afc6) /* 0.330245755 */, 15 }, /* 1062 */ { MAD_F(0x054a6303) /* 0.330660832 */, 15 }, /* 1063 */ { MAD_F(0x054c1663) /* 0.331076039 */, 15 }, /* 1064 */ { MAD_F(0x054dc9e7) /* 0.331491377 */, 15 }, /* 1065 */ { MAD_F(0x054f7d8d) /* 0.331906845 */, 15 }, /* 1066 */ { MAD_F(0x05513156) /* 0.332322443 */, 15 }, /* 1067 */ { MAD_F(0x0552e542) /* 0.332738170 */, 15 }, /* 1068 */ { MAD_F(0x05549951) /* 0.333154028 */, 15 }, /* 1069 */ { MAD_F(0x05564d83) /* 0.333570016 */, 15 }, /* 1070 */ { MAD_F(0x055801d8) /* 0.333986133 */, 15 }, /* 1071 */ { MAD_F(0x0559b64f) /* 0.334402380 */, 15 }, /* 1072 */ { MAD_F(0x055b6ae9) /* 0.334818756 */, 15 }, /* 1073 */ { MAD_F(0x055d1fa6) /* 0.335235262 */, 15 }, /* 1074 */ { MAD_F(0x055ed486) /* 0.335651898 */, 15 }, /* 1075 */ { MAD_F(0x05608988) /* 0.336068662 */, 15 }, /* 1076 */ { MAD_F(0x05623ead) /* 0.336485556 */, 15 }, /* 1077 */ { MAD_F(0x0563f3f5) /* 0.336902579 */, 15 }, /* 1078 */ { MAD_F(0x0565a960) /* 0.337319732 */, 15 }, /* 1079 */ { MAD_F(0x05675eed) /* 0.337737013 */, 15 }, /* 1080 */ { MAD_F(0x0569149c) /* 0.338154423 */, 15 }, /* 1081 */ { MAD_F(0x056aca6f) /* 0.338571962 */, 15 }, /* 1082 */ { MAD_F(0x056c8064) /* 0.338989630 */, 15 }, /* 1083 */ { MAD_F(0x056e367b) /* 0.339407426 */, 15 }, /* 1084 */ { MAD_F(0x056fecb5) /* 0.339825351 */, 15 }, /* 1085 */ { MAD_F(0x0571a311) /* 0.340243405 */, 15 }, /* 1086 */ { MAD_F(0x05735990) /* 0.340661587 */, 15 }, /* 1087 */ { MAD_F(0x05751032) /* 0.341079898 */, 15 }, /* 1088 */ { MAD_F(0x0576c6f5) /* 0.341498336 */, 15 }, /* 1089 */ { MAD_F(0x05787ddc) /* 0.341916903 */, 15 }, /* 1090 */ { MAD_F(0x057a34e4) /* 0.342335598 */, 15 }, /* 1091 */ { MAD_F(0x057bec0f) /* 0.342754421 */, 15 }, /* 1092 */ { MAD_F(0x057da35d) /* 0.343173373 */, 15 }, /* 1093 */ { MAD_F(0x057f5acc) /* 0.343592452 */, 15 }, /* 1094 */ { MAD_F(0x0581125e) /* 0.344011659 */, 15 }, /* 1095 */ { MAD_F(0x0582ca12) /* 0.344430993 */, 15 }, /* 1096 */ { MAD_F(0x058481e9) /* 0.344850455 */, 15 }, /* 1097 */ { MAD_F(0x058639e2) /* 0.345270045 */, 15 }, /* 1098 */ { MAD_F(0x0587f1fd) /* 0.345689763 */, 15 }, /* 1099 */ { MAD_F(0x0589aa3a) /* 0.346109608 */, 15 }, /* 1100 */ { MAD_F(0x058b629a) /* 0.346529580 */, 15 }, /* 1101 */ { MAD_F(0x058d1b1b) /* 0.346949679 */, 15 }, /* 1102 */ { MAD_F(0x058ed3bf) /* 0.347369906 */, 15 }, /* 1103 */ { MAD_F(0x05908c85) /* 0.347790260 */, 15 }, /* 1104 */ { MAD_F(0x0592456d) /* 0.348210741 */, 15 }, /* 1105 */ { MAD_F(0x0593fe77) /* 0.348631348 */, 15 }, /* 1106 */ { MAD_F(0x0595b7a3) /* 0.349052083 */, 15 }, /* 1107 */ { MAD_F(0x059770f1) /* 0.349472945 */, 15 }, /* 1108 */ { MAD_F(0x05992a61) /* 0.349893933 */, 15 }, /* 1109 */ { MAD_F(0x059ae3f3) /* 0.350315048 */, 15 }, /* 1110 */ { MAD_F(0x059c9da8) /* 0.350736290 */, 15 }, /* 1111 */ { MAD_F(0x059e577e) /* 0.351157658 */, 15 }, /* 1112 */ { MAD_F(0x05a01176) /* 0.351579152 */, 15 }, /* 1113 */ { MAD_F(0x05a1cb90) /* 0.352000773 */, 15 }, /* 1114 */ { MAD_F(0x05a385cc) /* 0.352422520 */, 15 }, /* 1115 */ { MAD_F(0x05a5402a) /* 0.352844394 */, 15 }, /* 1116 */ { MAD_F(0x05a6faa9) /* 0.353266393 */, 15 }, /* 1117 */ { MAD_F(0x05a8b54b) /* 0.353688519 */, 15 }, /* 1118 */ { MAD_F(0x05aa700e) /* 0.354110771 */, 15 }, /* 1119 */ { MAD_F(0x05ac2af3) /* 0.354533148 */, 15 }, /* 1120 */ { MAD_F(0x05ade5fa) /* 0.354955651 */, 15 }, /* 1121 */ { MAD_F(0x05afa123) /* 0.355378281 */, 15 }, /* 1122 */ { MAD_F(0x05b15c6d) /* 0.355801035 */, 15 }, /* 1123 */ { MAD_F(0x05b317d9) /* 0.356223916 */, 15 }, /* 1124 */ { MAD_F(0x05b4d367) /* 0.356646922 */, 15 }, /* 1125 */ { MAD_F(0x05b68f16) /* 0.357070053 */, 15 }, /* 1126 */ { MAD_F(0x05b84ae7) /* 0.357493310 */, 15 }, /* 1127 */ { MAD_F(0x05ba06da) /* 0.357916692 */, 15 }, /* 1128 */ { MAD_F(0x05bbc2ef) /* 0.358340200 */, 15 }, /* 1129 */ { MAD_F(0x05bd7f25) /* 0.358763832 */, 15 }, /* 1130 */ { MAD_F(0x05bf3b7c) /* 0.359187590 */, 15 }, /* 1131 */ { MAD_F(0x05c0f7f5) /* 0.359611472 */, 15 }, /* 1132 */ { MAD_F(0x05c2b490) /* 0.360035480 */, 15 }, /* 1133 */ { MAD_F(0x05c4714c) /* 0.360459613 */, 15 }, /* 1134 */ { MAD_F(0x05c62e2a) /* 0.360883870 */, 15 }, /* 1135 */ { MAD_F(0x05c7eb29) /* 0.361308252 */, 15 }, /* 1136 */ { MAD_F(0x05c9a84a) /* 0.361732758 */, 15 }, /* 1137 */ { MAD_F(0x05cb658c) /* 0.362157390 */, 15 }, /* 1138 */ { MAD_F(0x05cd22ef) /* 0.362582145 */, 15 }, /* 1139 */ { MAD_F(0x05cee074) /* 0.363007026 */, 15 }, /* 1140 */ { MAD_F(0x05d09e1b) /* 0.363432030 */, 15 }, /* 1141 */ { MAD_F(0x05d25be2) /* 0.363857159 */, 15 }, /* 1142 */ { MAD_F(0x05d419cb) /* 0.364282412 */, 15 }, /* 1143 */ { MAD_F(0x05d5d7d5) /* 0.364707789 */, 15 }, /* 1144 */ { MAD_F(0x05d79601) /* 0.365133291 */, 15 }, /* 1145 */ { MAD_F(0x05d9544e) /* 0.365558916 */, 15 }, /* 1146 */ { MAD_F(0x05db12bc) /* 0.365984665 */, 15 }, /* 1147 */ { MAD_F(0x05dcd14c) /* 0.366410538 */, 15 }, /* 1148 */ { MAD_F(0x05de8ffc) /* 0.366836535 */, 15 }, /* 1149 */ { MAD_F(0x05e04ece) /* 0.367262655 */, 15 }, /* 1150 */ { MAD_F(0x05e20dc1) /* 0.367688900 */, 15 }, /* 1151 */ { MAD_F(0x05e3ccd5) /* 0.368115267 */, 15 }, /* 1152 */ { MAD_F(0x05e58c0b) /* 0.368541759 */, 15 }, /* 1153 */ { MAD_F(0x05e74b61) /* 0.368968373 */, 15 }, /* 1154 */ { MAD_F(0x05e90ad9) /* 0.369395111 */, 15 }, /* 1155 */ { MAD_F(0x05eaca72) /* 0.369821973 */, 15 }, /* 1156 */ { MAD_F(0x05ec8a2b) /* 0.370248957 */, 15 }, /* 1157 */ { MAD_F(0x05ee4a06) /* 0.370676065 */, 15 }, /* 1158 */ { MAD_F(0x05f00a02) /* 0.371103295 */, 15 }, /* 1159 */ { MAD_F(0x05f1ca1f) /* 0.371530649 */, 15 }, /* 1160 */ { MAD_F(0x05f38a5d) /* 0.371958126 */, 15 }, /* 1161 */ { MAD_F(0x05f54abc) /* 0.372385725 */, 15 }, /* 1162 */ { MAD_F(0x05f70b3c) /* 0.372813448 */, 15 }, /* 1163 */ { MAD_F(0x05f8cbdc) /* 0.373241292 */, 15 }, /* 1164 */ { MAD_F(0x05fa8c9e) /* 0.373669260 */, 15 }, /* 1165 */ { MAD_F(0x05fc4d81) /* 0.374097350 */, 15 }, /* 1166 */ { MAD_F(0x05fe0e84) /* 0.374525563 */, 15 }, /* 1167 */ { MAD_F(0x05ffcfa8) /* 0.374953898 */, 15 }, /* 1168 */ { MAD_F(0x060190ee) /* 0.375382356 */, 15 }, /* 1169 */ { MAD_F(0x06035254) /* 0.375810936 */, 15 }, /* 1170 */ { MAD_F(0x060513da) /* 0.376239638 */, 15 }, /* 1171 */ { MAD_F(0x0606d582) /* 0.376668462 */, 15 }, /* 1172 */ { MAD_F(0x0608974a) /* 0.377097408 */, 15 }, /* 1173 */ { MAD_F(0x060a5934) /* 0.377526476 */, 15 }, /* 1174 */ { MAD_F(0x060c1b3d) /* 0.377955667 */, 15 }, /* 1175 */ { MAD_F(0x060ddd68) /* 0.378384979 */, 15 }, /* 1176 */ { MAD_F(0x060f9fb3) /* 0.378814413 */, 15 }, /* 1177 */ { MAD_F(0x0611621f) /* 0.379243968 */, 15 }, /* 1178 */ { MAD_F(0x061324ac) /* 0.379673646 */, 15 }, /* 1179 */ { MAD_F(0x0614e759) /* 0.380103444 */, 15 }, /* 1180 */ { MAD_F(0x0616aa27) /* 0.380533365 */, 15 }, /* 1181 */ { MAD_F(0x06186d16) /* 0.380963407 */, 15 }, /* 1182 */ { MAD_F(0x061a3025) /* 0.381393570 */, 15 }, /* 1183 */ { MAD_F(0x061bf354) /* 0.381823855 */, 15 }, /* 1184 */ { MAD_F(0x061db6a5) /* 0.382254261 */, 15 }, /* 1185 */ { MAD_F(0x061f7a15) /* 0.382684788 */, 15 }, /* 1186 */ { MAD_F(0x06213da7) /* 0.383115436 */, 15 }, /* 1187 */ { MAD_F(0x06230158) /* 0.383546205 */, 15 }, /* 1188 */ { MAD_F(0x0624c52a) /* 0.383977096 */, 15 }, /* 1189 */ { MAD_F(0x0626891d) /* 0.384408107 */, 15 }, /* 1190 */ { MAD_F(0x06284d30) /* 0.384839239 */, 15 }, /* 1191 */ { MAD_F(0x062a1164) /* 0.385270492 */, 15 }, /* 1192 */ { MAD_F(0x062bd5b8) /* 0.385701865 */, 15 }, /* 1193 */ { MAD_F(0x062d9a2c) /* 0.386133359 */, 15 }, /* 1194 */ { MAD_F(0x062f5ec1) /* 0.386564974 */, 15 }, /* 1195 */ { MAD_F(0x06312376) /* 0.386996709 */, 15 }, /* 1196 */ { MAD_F(0x0632e84b) /* 0.387428565 */, 15 }, /* 1197 */ { MAD_F(0x0634ad41) /* 0.387860541 */, 15 }, /* 1198 */ { MAD_F(0x06367257) /* 0.388292637 */, 15 }, /* 1199 */ { MAD_F(0x0638378d) /* 0.388724854 */, 15 }, /* 1200 */ { MAD_F(0x0639fce4) /* 0.389157191 */, 15 }, /* 1201 */ { MAD_F(0x063bc25b) /* 0.389589648 */, 15 }, /* 1202 */ { MAD_F(0x063d87f2) /* 0.390022225 */, 15 }, /* 1203 */ { MAD_F(0x063f4da9) /* 0.390454922 */, 15 }, /* 1204 */ { MAD_F(0x06411380) /* 0.390887739 */, 15 }, /* 1205 */ { MAD_F(0x0642d978) /* 0.391320675 */, 15 }, /* 1206 */ { MAD_F(0x06449f8f) /* 0.391753732 */, 15 }, /* 1207 */ { MAD_F(0x064665c7) /* 0.392186908 */, 15 }, /* 1208 */ { MAD_F(0x06482c1f) /* 0.392620204 */, 15 }, /* 1209 */ { MAD_F(0x0649f297) /* 0.393053619 */, 15 }, /* 1210 */ { MAD_F(0x064bb92f) /* 0.393487154 */, 15 }, /* 1211 */ { MAD_F(0x064d7fe8) /* 0.393920808 */, 15 }, /* 1212 */ { MAD_F(0x064f46c0) /* 0.394354582 */, 15 }, /* 1213 */ { MAD_F(0x06510db8) /* 0.394788475 */, 15 }, /* 1214 */ { MAD_F(0x0652d4d0) /* 0.395222488 */, 15 }, /* 1215 */ { MAD_F(0x06549c09) /* 0.395656619 */, 15 }, /* 1216 */ { MAD_F(0x06566361) /* 0.396090870 */, 15 }, /* 1217 */ { MAD_F(0x06582ad9) /* 0.396525239 */, 15 }, /* 1218 */ { MAD_F(0x0659f271) /* 0.396959728 */, 15 }, /* 1219 */ { MAD_F(0x065bba29) /* 0.397394336 */, 15 }, /* 1220 */ { MAD_F(0x065d8201) /* 0.397829062 */, 15 }, /* 1221 */ { MAD_F(0x065f49f9) /* 0.398263907 */, 15 }, /* 1222 */ { MAD_F(0x06611211) /* 0.398698871 */, 15 }, /* 1223 */ { MAD_F(0x0662da49) /* 0.399133954 */, 15 }, /* 1224 */ { MAD_F(0x0664a2a0) /* 0.399569155 */, 15 }, /* 1225 */ { MAD_F(0x06666b17) /* 0.400004475 */, 15 }, /* 1226 */ { MAD_F(0x066833ae) /* 0.400439913 */, 15 }, /* 1227 */ { MAD_F(0x0669fc65) /* 0.400875470 */, 15 }, /* 1228 */ { MAD_F(0x066bc53c) /* 0.401311145 */, 15 }, /* 1229 */ { MAD_F(0x066d8e32) /* 0.401746938 */, 15 }, /* 1230 */ { MAD_F(0x066f5748) /* 0.402182850 */, 15 }, /* 1231 */ { MAD_F(0x0671207e) /* 0.402618879 */, 15 }, /* 1232 */ { MAD_F(0x0672e9d4) /* 0.403055027 */, 15 }, /* 1233 */ { MAD_F(0x0674b349) /* 0.403491293 */, 15 }, /* 1234 */ { MAD_F(0x06767cde) /* 0.403927676 */, 15 }, /* 1235 */ { MAD_F(0x06784692) /* 0.404364178 */, 15 }, /* 1236 */ { MAD_F(0x067a1066) /* 0.404800797 */, 15 }, /* 1237 */ { MAD_F(0x067bda5a) /* 0.405237535 */, 15 }, /* 1238 */ { MAD_F(0x067da46d) /* 0.405674390 */, 15 }, /* 1239 */ { MAD_F(0x067f6ea0) /* 0.406111362 */, 15 }, /* 1240 */ { MAD_F(0x068138f3) /* 0.406548452 */, 15 }, /* 1241 */ { MAD_F(0x06830365) /* 0.406985660 */, 15 }, /* 1242 */ { MAD_F(0x0684cdf6) /* 0.407422985 */, 15 }, /* 1243 */ { MAD_F(0x068698a8) /* 0.407860427 */, 15 }, /* 1244 */ { MAD_F(0x06886378) /* 0.408297987 */, 15 }, /* 1245 */ { MAD_F(0x068a2e68) /* 0.408735664 */, 15 }, /* 1246 */ { MAD_F(0x068bf978) /* 0.409173458 */, 15 }, /* 1247 */ { MAD_F(0x068dc4a7) /* 0.409611370 */, 15 }, /* 1248 */ { MAD_F(0x068f8ff5) /* 0.410049398 */, 15 }, /* 1249 */ { MAD_F(0x06915b63) /* 0.410487544 */, 15 }, /* 1250 */ { MAD_F(0x069326f0) /* 0.410925806 */, 15 }, /* 1251 */ { MAD_F(0x0694f29c) /* 0.411364185 */, 15 }, /* 1252 */ { MAD_F(0x0696be68) /* 0.411802681 */, 15 }, /* 1253 */ { MAD_F(0x06988a54) /* 0.412241294 */, 15 }, /* 1254 */ { MAD_F(0x069a565e) /* 0.412680024 */, 15 }, /* 1255 */ { MAD_F(0x069c2288) /* 0.413118870 */, 15 }, /* 1256 */ { MAD_F(0x069deed1) /* 0.413557833 */, 15 }, /* 1257 */ { MAD_F(0x069fbb3a) /* 0.413996912 */, 15 }, /* 1258 */ { MAD_F(0x06a187c1) /* 0.414436108 */, 15 }, /* 1259 */ { MAD_F(0x06a35468) /* 0.414875420 */, 15 }, /* 1260 */ { MAD_F(0x06a5212f) /* 0.415314849 */, 15 }, /* 1261 */ { MAD_F(0x06a6ee14) /* 0.415754393 */, 15 }, /* 1262 */ { MAD_F(0x06a8bb18) /* 0.416194054 */, 15 }, /* 1263 */ { MAD_F(0x06aa883c) /* 0.416633831 */, 15 }, /* 1264 */ { MAD_F(0x06ac557f) /* 0.417073724 */, 15 }, /* 1265 */ { MAD_F(0x06ae22e1) /* 0.417513734 */, 15 }, /* 1266 */ { MAD_F(0x06aff062) /* 0.417953859 */, 15 }, /* 1267 */ { MAD_F(0x06b1be03) /* 0.418394100 */, 15 }, /* 1268 */ { MAD_F(0x06b38bc2) /* 0.418834457 */, 15 }, /* 1269 */ { MAD_F(0x06b559a1) /* 0.419274929 */, 15 }, /* 1270 */ { MAD_F(0x06b7279e) /* 0.419715518 */, 15 }, /* 1271 */ { MAD_F(0x06b8f5bb) /* 0.420156222 */, 15 }, /* 1272 */ { MAD_F(0x06bac3f6) /* 0.420597041 */, 15 }, /* 1273 */ { MAD_F(0x06bc9251) /* 0.421037977 */, 15 }, /* 1274 */ { MAD_F(0x06be60cb) /* 0.421479027 */, 15 }, /* 1275 */ { MAD_F(0x06c02f63) /* 0.421920193 */, 15 }, /* 1276 */ { MAD_F(0x06c1fe1b) /* 0.422361475 */, 15 }, /* 1277 */ { MAD_F(0x06c3ccf1) /* 0.422802871 */, 15 }, /* 1278 */ { MAD_F(0x06c59be7) /* 0.423244383 */, 15 }, /* 1279 */ { MAD_F(0x06c76afb) /* 0.423686010 */, 15 }, /* 1280 */ { MAD_F(0x06c93a2e) /* 0.424127753 */, 15 }, /* 1281 */ { MAD_F(0x06cb0981) /* 0.424569610 */, 15 }, /* 1282 */ { MAD_F(0x06ccd8f2) /* 0.425011582 */, 15 }, /* 1283 */ { MAD_F(0x06cea881) /* 0.425453669 */, 15 }, /* 1284 */ { MAD_F(0x06d07830) /* 0.425895871 */, 15 }, /* 1285 */ { MAD_F(0x06d247fe) /* 0.426338188 */, 15 }, /* 1286 */ { MAD_F(0x06d417ea) /* 0.426780620 */, 15 }, /* 1287 */ { MAD_F(0x06d5e7f5) /* 0.427223166 */, 15 }, /* 1288 */ { MAD_F(0x06d7b81f) /* 0.427665827 */, 15 }, /* 1289 */ { MAD_F(0x06d98868) /* 0.428108603 */, 15 }, /* 1290 */ { MAD_F(0x06db58cf) /* 0.428551493 */, 15 }, /* 1291 */ { MAD_F(0x06dd2955) /* 0.428994497 */, 15 }, /* 1292 */ { MAD_F(0x06def9fa) /* 0.429437616 */, 15 }, /* 1293 */ { MAD_F(0x06e0cabe) /* 0.429880849 */, 15 }, /* 1294 */ { MAD_F(0x06e29ba0) /* 0.430324197 */, 15 }, /* 1295 */ { MAD_F(0x06e46ca1) /* 0.430767659 */, 15 }, /* 1296 */ { MAD_F(0x06e63dc0) /* 0.431211234 */, 15 }, /* 1297 */ { MAD_F(0x06e80efe) /* 0.431654924 */, 15 }, /* 1298 */ { MAD_F(0x06e9e05b) /* 0.432098728 */, 15 }, /* 1299 */ { MAD_F(0x06ebb1d6) /* 0.432542647 */, 15 }, /* 1300 */ { MAD_F(0x06ed8370) /* 0.432986678 */, 15 }, /* 1301 */ { MAD_F(0x06ef5529) /* 0.433430824 */, 15 }, /* 1302 */ { MAD_F(0x06f12700) /* 0.433875084 */, 15 }, /* 1303 */ { MAD_F(0x06f2f8f5) /* 0.434319457 */, 15 }, /* 1304 */ { MAD_F(0x06f4cb09) /* 0.434763944 */, 15 }, /* 1305 */ { MAD_F(0x06f69d3c) /* 0.435208545 */, 15 }, /* 1306 */ { MAD_F(0x06f86f8d) /* 0.435653259 */, 15 }, /* 1307 */ { MAD_F(0x06fa41fd) /* 0.436098087 */, 15 }, /* 1308 */ { MAD_F(0x06fc148b) /* 0.436543029 */, 15 }, /* 1309 */ { MAD_F(0x06fde737) /* 0.436988083 */, 15 }, /* 1310 */ { MAD_F(0x06ffba02) /* 0.437433251 */, 15 }, /* 1311 */ { MAD_F(0x07018ceb) /* 0.437878533 */, 15 }, /* 1312 */ { MAD_F(0x07035ff3) /* 0.438323927 */, 15 }, /* 1313 */ { MAD_F(0x07053319) /* 0.438769435 */, 15 }, /* 1314 */ { MAD_F(0x0707065d) /* 0.439215056 */, 15 }, /* 1315 */ { MAD_F(0x0708d9c0) /* 0.439660790 */, 15 }, /* 1316 */ { MAD_F(0x070aad41) /* 0.440106636 */, 15 }, /* 1317 */ { MAD_F(0x070c80e1) /* 0.440552596 */, 15 }, /* 1318 */ { MAD_F(0x070e549f) /* 0.440998669 */, 15 }, /* 1319 */ { MAD_F(0x0710287b) /* 0.441444855 */, 15 }, /* 1320 */ { MAD_F(0x0711fc75) /* 0.441891153 */, 15 }, /* 1321 */ { MAD_F(0x0713d08d) /* 0.442337564 */, 15 }, /* 1322 */ { MAD_F(0x0715a4c4) /* 0.442784088 */, 15 }, /* 1323 */ { MAD_F(0x07177919) /* 0.443230724 */, 15 }, /* 1324 */ { MAD_F(0x07194d8c) /* 0.443677473 */, 15 }, /* 1325 */ { MAD_F(0x071b221e) /* 0.444124334 */, 15 }, /* 1326 */ { MAD_F(0x071cf6ce) /* 0.444571308 */, 15 }, /* 1327 */ { MAD_F(0x071ecb9b) /* 0.445018394 */, 15 }, /* 1328 */ { MAD_F(0x0720a087) /* 0.445465593 */, 15 }, /* 1329 */ { MAD_F(0x07227591) /* 0.445912903 */, 15 }, /* 1330 */ { MAD_F(0x07244ab9) /* 0.446360326 */, 15 }, /* 1331 */ { MAD_F(0x07262000) /* 0.446807861 */, 15 }, /* 1332 */ { MAD_F(0x0727f564) /* 0.447255509 */, 15 }, /* 1333 */ { MAD_F(0x0729cae7) /* 0.447703268 */, 15 }, /* 1334 */ { MAD_F(0x072ba087) /* 0.448151139 */, 15 }, /* 1335 */ { MAD_F(0x072d7646) /* 0.448599122 */, 15 }, /* 1336 */ { MAD_F(0x072f4c22) /* 0.449047217 */, 15 }, /* 1337 */ { MAD_F(0x0731221d) /* 0.449495424 */, 15 }, /* 1338 */ { MAD_F(0x0732f835) /* 0.449943742 */, 15 }, /* 1339 */ { MAD_F(0x0734ce6c) /* 0.450392173 */, 15 }, /* 1340 */ { MAD_F(0x0736a4c1) /* 0.450840715 */, 15 }, /* 1341 */ { MAD_F(0x07387b33) /* 0.451289368 */, 15 }, /* 1342 */ { MAD_F(0x073a51c4) /* 0.451738133 */, 15 }, /* 1343 */ { MAD_F(0x073c2872) /* 0.452187010 */, 15 }, /* 1344 */ { MAD_F(0x073dff3e) /* 0.452635998 */, 15 }, /* 1345 */ { MAD_F(0x073fd628) /* 0.453085097 */, 15 }, /* 1346 */ { MAD_F(0x0741ad30) /* 0.453534308 */, 15 }, /* 1347 */ { MAD_F(0x07438456) /* 0.453983630 */, 15 }, /* 1348 */ { MAD_F(0x07455b9a) /* 0.454433063 */, 15 }, /* 1349 */ { MAD_F(0x074732fc) /* 0.454882607 */, 15 }, /* 1350 */ { MAD_F(0x07490a7b) /* 0.455332262 */, 15 }, /* 1351 */ { MAD_F(0x074ae218) /* 0.455782029 */, 15 }, /* 1352 */ { MAD_F(0x074cb9d3) /* 0.456231906 */, 15 }, /* 1353 */ { MAD_F(0x074e91ac) /* 0.456681894 */, 15 }, /* 1354 */ { MAD_F(0x075069a3) /* 0.457131993 */, 15 }, /* 1355 */ { MAD_F(0x075241b7) /* 0.457582203 */, 15 }, /* 1356 */ { MAD_F(0x075419e9) /* 0.458032524 */, 15 }, /* 1357 */ { MAD_F(0x0755f239) /* 0.458482956 */, 15 }, /* 1358 */ { MAD_F(0x0757caa7) /* 0.458933498 */, 15 }, /* 1359 */ { MAD_F(0x0759a332) /* 0.459384151 */, 15 }, /* 1360 */ { MAD_F(0x075b7bdb) /* 0.459834914 */, 15 }, /* 1361 */ { MAD_F(0x075d54a1) /* 0.460285788 */, 15 }, /* 1362 */ { MAD_F(0x075f2d85) /* 0.460736772 */, 15 }, /* 1363 */ { MAD_F(0x07610687) /* 0.461187867 */, 15 }, /* 1364 */ { MAD_F(0x0762dfa6) /* 0.461639071 */, 15 }, /* 1365 */ { MAD_F(0x0764b8e3) /* 0.462090387 */, 15 }, /* 1366 */ { MAD_F(0x0766923e) /* 0.462541812 */, 15 }, /* 1367 */ { MAD_F(0x07686bb6) /* 0.462993348 */, 15 }, /* 1368 */ { MAD_F(0x076a454c) /* 0.463444993 */, 15 }, /* 1369 */ { MAD_F(0x076c1eff) /* 0.463896749 */, 15 }, /* 1370 */ { MAD_F(0x076df8d0) /* 0.464348615 */, 15 }, /* 1371 */ { MAD_F(0x076fd2be) /* 0.464800591 */, 15 }, /* 1372 */ { MAD_F(0x0771acca) /* 0.465252676 */, 15 }, /* 1373 */ { MAD_F(0x077386f3) /* 0.465704872 */, 15 }, /* 1374 */ { MAD_F(0x0775613a) /* 0.466157177 */, 15 }, /* 1375 */ { MAD_F(0x07773b9e) /* 0.466609592 */, 15 }, /* 1376 */ { MAD_F(0x07791620) /* 0.467062117 */, 15 }, /* 1377 */ { MAD_F(0x077af0bf) /* 0.467514751 */, 15 }, /* 1378 */ { MAD_F(0x077ccb7c) /* 0.467967495 */, 15 }, /* 1379 */ { MAD_F(0x077ea656) /* 0.468420349 */, 15 }, /* 1380 */ { MAD_F(0x0780814d) /* 0.468873312 */, 15 }, /* 1381 */ { MAD_F(0x07825c62) /* 0.469326384 */, 15 }, /* 1382 */ { MAD_F(0x07843794) /* 0.469779566 */, 15 }, /* 1383 */ { MAD_F(0x078612e3) /* 0.470232857 */, 15 }, /* 1384 */ { MAD_F(0x0787ee50) /* 0.470686258 */, 15 }, /* 1385 */ { MAD_F(0x0789c9da) /* 0.471139767 */, 15 }, /* 1386 */ { MAD_F(0x078ba581) /* 0.471593386 */, 15 }, /* 1387 */ { MAD_F(0x078d8146) /* 0.472047114 */, 15 }, /* 1388 */ { MAD_F(0x078f5d28) /* 0.472500951 */, 15 }, /* 1389 */ { MAD_F(0x07913927) /* 0.472954896 */, 15 }, /* 1390 */ { MAD_F(0x07931543) /* 0.473408951 */, 15 }, /* 1391 */ { MAD_F(0x0794f17d) /* 0.473863115 */, 15 }, /* 1392 */ { MAD_F(0x0796cdd4) /* 0.474317388 */, 15 }, /* 1393 */ { MAD_F(0x0798aa48) /* 0.474771769 */, 15 }, /* 1394 */ { MAD_F(0x079a86d9) /* 0.475226259 */, 15 }, /* 1395 */ { MAD_F(0x079c6388) /* 0.475680858 */, 15 }, /* 1396 */ { MAD_F(0x079e4053) /* 0.476135565 */, 15 }, /* 1397 */ { MAD_F(0x07a01d3c) /* 0.476590381 */, 15 }, /* 1398 */ { MAD_F(0x07a1fa42) /* 0.477045306 */, 15 }, /* 1399 */ { MAD_F(0x07a3d765) /* 0.477500339 */, 15 }, /* 1400 */ { MAD_F(0x07a5b4a5) /* 0.477955481 */, 15 }, /* 1401 */ { MAD_F(0x07a79202) /* 0.478410731 */, 15 }, /* 1402 */ { MAD_F(0x07a96f7d) /* 0.478866089 */, 15 }, /* 1403 */ { MAD_F(0x07ab4d14) /* 0.479321555 */, 15 }, /* 1404 */ { MAD_F(0x07ad2ac8) /* 0.479777130 */, 15 }, /* 1405 */ { MAD_F(0x07af089a) /* 0.480232813 */, 15 }, /* 1406 */ { MAD_F(0x07b0e688) /* 0.480688604 */, 15 }, /* 1407 */ { MAD_F(0x07b2c494) /* 0.481144503 */, 15 }, /* 1408 */ { MAD_F(0x07b4a2bc) /* 0.481600510 */, 15 }, /* 1409 */ { MAD_F(0x07b68102) /* 0.482056625 */, 15 }, /* 1410 */ { MAD_F(0x07b85f64) /* 0.482512848 */, 15 }, /* 1411 */ { MAD_F(0x07ba3de4) /* 0.482969179 */, 15 }, /* 1412 */ { MAD_F(0x07bc1c80) /* 0.483425618 */, 15 }, /* 1413 */ { MAD_F(0x07bdfb39) /* 0.483882164 */, 15 }, /* 1414 */ { MAD_F(0x07bfda0f) /* 0.484338818 */, 15 }, /* 1415 */ { MAD_F(0x07c1b902) /* 0.484795580 */, 15 }, /* 1416 */ { MAD_F(0x07c39812) /* 0.485252449 */, 15 }, /* 1417 */ { MAD_F(0x07c5773f) /* 0.485709426 */, 15 }, /* 1418 */ { MAD_F(0x07c75689) /* 0.486166511 */, 15 }, /* 1419 */ { MAD_F(0x07c935ef) /* 0.486623703 */, 15 }, /* 1420 */ { MAD_F(0x07cb1573) /* 0.487081002 */, 15 }, /* 1421 */ { MAD_F(0x07ccf513) /* 0.487538409 */, 15 }, /* 1422 */ { MAD_F(0x07ced4d0) /* 0.487995923 */, 15 }, /* 1423 */ { MAD_F(0x07d0b4aa) /* 0.488453544 */, 15 }, /* 1424 */ { MAD_F(0x07d294a0) /* 0.488911273 */, 15 }, /* 1425 */ { MAD_F(0x07d474b3) /* 0.489369108 */, 15 }, /* 1426 */ { MAD_F(0x07d654e4) /* 0.489827051 */, 15 }, /* 1427 */ { MAD_F(0x07d83530) /* 0.490285101 */, 15 }, /* 1428 */ { MAD_F(0x07da159a) /* 0.490743258 */, 15 }, /* 1429 */ { MAD_F(0x07dbf620) /* 0.491201522 */, 15 }, /* 1430 */ { MAD_F(0x07ddd6c3) /* 0.491659892 */, 15 }, /* 1431 */ { MAD_F(0x07dfb783) /* 0.492118370 */, 15 }, /* 1432 */ { MAD_F(0x07e1985f) /* 0.492576954 */, 15 }, /* 1433 */ { MAD_F(0x07e37958) /* 0.493035645 */, 15 }, /* 1434 */ { MAD_F(0x07e55a6e) /* 0.493494443 */, 15 }, /* 1435 */ { MAD_F(0x07e73ba0) /* 0.493953348 */, 15 }, /* 1436 */ { MAD_F(0x07e91cef) /* 0.494412359 */, 15 }, /* 1437 */ { MAD_F(0x07eafe5a) /* 0.494871476 */, 15 }, /* 1438 */ { MAD_F(0x07ecdfe2) /* 0.495330701 */, 15 }, /* 1439 */ { MAD_F(0x07eec187) /* 0.495790031 */, 15 }, /* 1440 */ { MAD_F(0x07f0a348) /* 0.496249468 */, 15 }, /* 1441 */ { MAD_F(0x07f28526) /* 0.496709012 */, 15 }, /* 1442 */ { MAD_F(0x07f46720) /* 0.497168662 */, 15 }, /* 1443 */ { MAD_F(0x07f64937) /* 0.497628418 */, 15 }, /* 1444 */ { MAD_F(0x07f82b6a) /* 0.498088280 */, 15 }, /* 1445 */ { MAD_F(0x07fa0dba) /* 0.498548248 */, 15 }, /* 1446 */ { MAD_F(0x07fbf026) /* 0.499008323 */, 15 }, /* 1447 */ { MAD_F(0x07fdd2af) /* 0.499468503 */, 15 }, /* 1448 */ { MAD_F(0x07ffb554) /* 0.499928790 */, 15 }, /* 1449 */ { MAD_F(0x0400cc0b) /* 0.250194591 */, 16 }, /* 1450 */ { MAD_F(0x0401bd7a) /* 0.250424840 */, 16 }, /* 1451 */ { MAD_F(0x0402aef7) /* 0.250655143 */, 16 }, /* 1452 */ { MAD_F(0x0403a083) /* 0.250885498 */, 16 }, /* 1453 */ { MAD_F(0x0404921c) /* 0.251115906 */, 16 }, /* 1454 */ { MAD_F(0x040583c4) /* 0.251346367 */, 16 }, /* 1455 */ { MAD_F(0x0406757a) /* 0.251576880 */, 16 }, /* 1456 */ { MAD_F(0x0407673f) /* 0.251807447 */, 16 }, /* 1457 */ { MAD_F(0x04085911) /* 0.252038066 */, 16 }, /* 1458 */ { MAD_F(0x04094af1) /* 0.252268738 */, 16 }, /* 1459 */ { MAD_F(0x040a3ce0) /* 0.252499463 */, 16 }, /* 1460 */ { MAD_F(0x040b2edd) /* 0.252730240 */, 16 }, /* 1461 */ { MAD_F(0x040c20e8) /* 0.252961071 */, 16 }, /* 1462 */ { MAD_F(0x040d1301) /* 0.253191953 */, 16 }, /* 1463 */ { MAD_F(0x040e0529) /* 0.253422889 */, 16 }, /* 1464 */ { MAD_F(0x040ef75e) /* 0.253653877 */, 16 }, /* 1465 */ { MAD_F(0x040fe9a1) /* 0.253884918 */, 16 }, /* 1466 */ { MAD_F(0x0410dbf3) /* 0.254116011 */, 16 }, /* 1467 */ { MAD_F(0x0411ce53) /* 0.254347157 */, 16 }, /* 1468 */ { MAD_F(0x0412c0c1) /* 0.254578356 */, 16 }, /* 1469 */ { MAD_F(0x0413b33d) /* 0.254809606 */, 16 }, /* 1470 */ { MAD_F(0x0414a5c7) /* 0.255040910 */, 16 }, /* 1471 */ { MAD_F(0x0415985f) /* 0.255272266 */, 16 }, /* 1472 */ { MAD_F(0x04168b05) /* 0.255503674 */, 16 }, /* 1473 */ { MAD_F(0x04177db9) /* 0.255735135 */, 16 }, /* 1474 */ { MAD_F(0x0418707c) /* 0.255966648 */, 16 }, /* 1475 */ { MAD_F(0x0419634c) /* 0.256198213 */, 16 }, /* 1476 */ { MAD_F(0x041a562a) /* 0.256429831 */, 16 }, /* 1477 */ { MAD_F(0x041b4917) /* 0.256661501 */, 16 }, /* 1478 */ { MAD_F(0x041c3c11) /* 0.256893223 */, 16 }, /* 1479 */ { MAD_F(0x041d2f1a) /* 0.257124998 */, 16 }, /* 1480 */ { MAD_F(0x041e2230) /* 0.257356825 */, 16 }, /* 1481 */ { MAD_F(0x041f1555) /* 0.257588704 */, 16 }, /* 1482 */ { MAD_F(0x04200888) /* 0.257820635 */, 16 }, /* 1483 */ { MAD_F(0x0420fbc8) /* 0.258052619 */, 16 }, /* 1484 */ { MAD_F(0x0421ef17) /* 0.258284654 */, 16 }, /* 1485 */ { MAD_F(0x0422e273) /* 0.258516742 */, 16 }, /* 1486 */ { MAD_F(0x0423d5de) /* 0.258748882 */, 16 }, /* 1487 */ { MAD_F(0x0424c956) /* 0.258981074 */, 16 }, /* 1488 */ { MAD_F(0x0425bcdd) /* 0.259213318 */, 16 }, /* 1489 */ { MAD_F(0x0426b071) /* 0.259445614 */, 16 }, /* 1490 */ { MAD_F(0x0427a414) /* 0.259677962 */, 16 }, /* 1491 */ { MAD_F(0x042897c4) /* 0.259910362 */, 16 }, /* 1492 */ { MAD_F(0x04298b83) /* 0.260142814 */, 16 }, /* 1493 */ { MAD_F(0x042a7f4f) /* 0.260375318 */, 16 }, /* 1494 */ { MAD_F(0x042b7329) /* 0.260607874 */, 16 }, /* 1495 */ { MAD_F(0x042c6711) /* 0.260840481 */, 16 }, /* 1496 */ { MAD_F(0x042d5b07) /* 0.261073141 */, 16 }, /* 1497 */ { MAD_F(0x042e4f0b) /* 0.261305852 */, 16 }, /* 1498 */ { MAD_F(0x042f431d) /* 0.261538616 */, 16 }, /* 1499 */ { MAD_F(0x0430373d) /* 0.261771431 */, 16 }, /* 1500 */ { MAD_F(0x04312b6b) /* 0.262004297 */, 16 }, /* 1501 */ { MAD_F(0x04321fa6) /* 0.262237216 */, 16 }, /* 1502 */ { MAD_F(0x043313f0) /* 0.262470186 */, 16 }, /* 1503 */ { MAD_F(0x04340847) /* 0.262703208 */, 16 }, /* 1504 */ { MAD_F(0x0434fcad) /* 0.262936282 */, 16 }, /* 1505 */ { MAD_F(0x0435f120) /* 0.263169407 */, 16 }, /* 1506 */ { MAD_F(0x0436e5a1) /* 0.263402584 */, 16 }, /* 1507 */ { MAD_F(0x0437da2f) /* 0.263635813 */, 16 }, /* 1508 */ { MAD_F(0x0438cecc) /* 0.263869093 */, 16 }, /* 1509 */ { MAD_F(0x0439c377) /* 0.264102425 */, 16 }, /* 1510 */ { MAD_F(0x043ab82f) /* 0.264335808 */, 16 }, /* 1511 */ { MAD_F(0x043bacf5) /* 0.264569243 */, 16 }, /* 1512 */ { MAD_F(0x043ca1c9) /* 0.264802730 */, 16 }, /* 1513 */ { MAD_F(0x043d96ab) /* 0.265036267 */, 16 }, /* 1514 */ { MAD_F(0x043e8b9b) /* 0.265269857 */, 16 }, /* 1515 */ { MAD_F(0x043f8098) /* 0.265503498 */, 16 }, /* 1516 */ { MAD_F(0x044075a3) /* 0.265737190 */, 16 }, /* 1517 */ { MAD_F(0x04416abc) /* 0.265970933 */, 16 }, /* 1518 */ { MAD_F(0x04425fe3) /* 0.266204728 */, 16 }, /* 1519 */ { MAD_F(0x04435518) /* 0.266438574 */, 16 }, /* 1520 */ { MAD_F(0x04444a5a) /* 0.266672472 */, 16 }, /* 1521 */ { MAD_F(0x04453fab) /* 0.266906421 */, 16 }, /* 1522 */ { MAD_F(0x04463508) /* 0.267140421 */, 16 }, /* 1523 */ { MAD_F(0x04472a74) /* 0.267374472 */, 16 }, /* 1524 */ { MAD_F(0x04481fee) /* 0.267608575 */, 16 }, /* 1525 */ { MAD_F(0x04491575) /* 0.267842729 */, 16 }, /* 1526 */ { MAD_F(0x044a0b0a) /* 0.268076934 */, 16 }, /* 1527 */ { MAD_F(0x044b00ac) /* 0.268311190 */, 16 }, /* 1528 */ { MAD_F(0x044bf65d) /* 0.268545497 */, 16 }, /* 1529 */ { MAD_F(0x044cec1b) /* 0.268779856 */, 16 }, /* 1530 */ { MAD_F(0x044de1e7) /* 0.269014265 */, 16 }, /* 1531 */ { MAD_F(0x044ed7c0) /* 0.269248726 */, 16 }, /* 1532 */ { MAD_F(0x044fcda8) /* 0.269483238 */, 16 }, /* 1533 */ { MAD_F(0x0450c39c) /* 0.269717800 */, 16 }, /* 1534 */ { MAD_F(0x0451b99f) /* 0.269952414 */, 16 }, /* 1535 */ { MAD_F(0x0452afaf) /* 0.270187079 */, 16 }, /* 1536 */ { MAD_F(0x0453a5cd) /* 0.270421794 */, 16 }, /* 1537 */ { MAD_F(0x04549bf9) /* 0.270656561 */, 16 }, /* 1538 */ { MAD_F(0x04559232) /* 0.270891379 */, 16 }, /* 1539 */ { MAD_F(0x04568879) /* 0.271126247 */, 16 }, /* 1540 */ { MAD_F(0x04577ece) /* 0.271361166 */, 16 }, /* 1541 */ { MAD_F(0x04587530) /* 0.271596136 */, 16 }, /* 1542 */ { MAD_F(0x04596ba0) /* 0.271831157 */, 16 }, /* 1543 */ { MAD_F(0x045a621e) /* 0.272066229 */, 16 }, /* 1544 */ { MAD_F(0x045b58a9) /* 0.272301352 */, 16 }, /* 1545 */ { MAD_F(0x045c4f42) /* 0.272536525 */, 16 }, /* 1546 */ { MAD_F(0x045d45e9) /* 0.272771749 */, 16 }, /* 1547 */ { MAD_F(0x045e3c9d) /* 0.273007024 */, 16 }, /* 1548 */ { MAD_F(0x045f335e) /* 0.273242350 */, 16 }, /* 1549 */ { MAD_F(0x04602a2e) /* 0.273477726 */, 16 }, /* 1550 */ { MAD_F(0x0461210b) /* 0.273713153 */, 16 }, /* 1551 */ { MAD_F(0x046217f5) /* 0.273948630 */, 16 }, /* 1552 */ { MAD_F(0x04630eed) /* 0.274184158 */, 16 }, /* 1553 */ { MAD_F(0x046405f3) /* 0.274419737 */, 16 }, /* 1554 */ { MAD_F(0x0464fd06) /* 0.274655366 */, 16 }, /* 1555 */ { MAD_F(0x0465f427) /* 0.274891046 */, 16 }, /* 1556 */ { MAD_F(0x0466eb55) /* 0.275126776 */, 16 }, /* 1557 */ { MAD_F(0x0467e291) /* 0.275362557 */, 16 }, /* 1558 */ { MAD_F(0x0468d9db) /* 0.275598389 */, 16 }, /* 1559 */ { MAD_F(0x0469d132) /* 0.275834270 */, 16 }, /* 1560 */ { MAD_F(0x046ac896) /* 0.276070203 */, 16 }, /* 1561 */ { MAD_F(0x046bc009) /* 0.276306185 */, 16 }, /* 1562 */ { MAD_F(0x046cb788) /* 0.276542218 */, 16 }, /* 1563 */ { MAD_F(0x046daf15) /* 0.276778302 */, 16 }, /* 1564 */ { MAD_F(0x046ea6b0) /* 0.277014435 */, 16 }, /* 1565 */ { MAD_F(0x046f9e58) /* 0.277250619 */, 16 }, /* 1566 */ { MAD_F(0x0470960e) /* 0.277486854 */, 16 }, /* 1567 */ { MAD_F(0x04718dd1) /* 0.277723139 */, 16 }, /* 1568 */ { MAD_F(0x047285a2) /* 0.277959474 */, 16 }, /* 1569 */ { MAD_F(0x04737d80) /* 0.278195859 */, 16 }, /* 1570 */ { MAD_F(0x0474756c) /* 0.278432294 */, 16 }, /* 1571 */ { MAD_F(0x04756d65) /* 0.278668780 */, 16 }, /* 1572 */ { MAD_F(0x0476656b) /* 0.278905316 */, 16 }, /* 1573 */ { MAD_F(0x04775d7f) /* 0.279141902 */, 16 }, /* 1574 */ { MAD_F(0x047855a1) /* 0.279378538 */, 16 }, /* 1575 */ { MAD_F(0x04794dd0) /* 0.279615224 */, 16 }, /* 1576 */ { MAD_F(0x047a460c) /* 0.279851960 */, 16 }, /* 1577 */ { MAD_F(0x047b3e56) /* 0.280088747 */, 16 }, /* 1578 */ { MAD_F(0x047c36ae) /* 0.280325583 */, 16 }, /* 1579 */ { MAD_F(0x047d2f12) /* 0.280562470 */, 16 }, /* 1580 */ { MAD_F(0x047e2784) /* 0.280799406 */, 16 }, /* 1581 */ { MAD_F(0x047f2004) /* 0.281036393 */, 16 }, /* 1582 */ { MAD_F(0x04801891) /* 0.281273429 */, 16 }, /* 1583 */ { MAD_F(0x0481112b) /* 0.281510516 */, 16 }, /* 1584 */ { MAD_F(0x048209d3) /* 0.281747652 */, 16 }, /* 1585 */ { MAD_F(0x04830288) /* 0.281984838 */, 16 }, /* 1586 */ { MAD_F(0x0483fb4b) /* 0.282222075 */, 16 }, /* 1587 */ { MAD_F(0x0484f41b) /* 0.282459361 */, 16 }, /* 1588 */ { MAD_F(0x0485ecf8) /* 0.282696697 */, 16 }, /* 1589 */ { MAD_F(0x0486e5e3) /* 0.282934082 */, 16 }, /* 1590 */ { MAD_F(0x0487dedb) /* 0.283171518 */, 16 }, /* 1591 */ { MAD_F(0x0488d7e1) /* 0.283409003 */, 16 }, /* 1592 */ { MAD_F(0x0489d0f4) /* 0.283646538 */, 16 }, /* 1593 */ { MAD_F(0x048aca14) /* 0.283884123 */, 16 }, /* 1594 */ { MAD_F(0x048bc341) /* 0.284121757 */, 16 }, /* 1595 */ { MAD_F(0x048cbc7c) /* 0.284359441 */, 16 }, /* 1596 */ { MAD_F(0x048db5c4) /* 0.284597175 */, 16 }, /* 1597 */ { MAD_F(0x048eaf1a) /* 0.284834959 */, 16 }, /* 1598 */ { MAD_F(0x048fa87d) /* 0.285072792 */, 16 }, /* 1599 */ { MAD_F(0x0490a1ed) /* 0.285310675 */, 16 }, /* 1600 */ { MAD_F(0x04919b6a) /* 0.285548607 */, 16 }, /* 1601 */ { MAD_F(0x049294f5) /* 0.285786589 */, 16 }, /* 1602 */ { MAD_F(0x04938e8d) /* 0.286024621 */, 16 }, /* 1603 */ { MAD_F(0x04948833) /* 0.286262702 */, 16 }, /* 1604 */ { MAD_F(0x049581e5) /* 0.286500832 */, 16 }, /* 1605 */ { MAD_F(0x04967ba5) /* 0.286739012 */, 16 }, /* 1606 */ { MAD_F(0x04977573) /* 0.286977242 */, 16 }, /* 1607 */ { MAD_F(0x04986f4d) /* 0.287215521 */, 16 }, /* 1608 */ { MAD_F(0x04996935) /* 0.287453849 */, 16 }, /* 1609 */ { MAD_F(0x049a632a) /* 0.287692227 */, 16 }, /* 1610 */ { MAD_F(0x049b5d2c) /* 0.287930654 */, 16 }, /* 1611 */ { MAD_F(0x049c573c) /* 0.288169131 */, 16 }, /* 1612 */ { MAD_F(0x049d5159) /* 0.288407657 */, 16 }, /* 1613 */ { MAD_F(0x049e4b83) /* 0.288646232 */, 16 }, /* 1614 */ { MAD_F(0x049f45ba) /* 0.288884857 */, 16 }, /* 1615 */ { MAD_F(0x04a03ffe) /* 0.289123530 */, 16 }, /* 1616 */ { MAD_F(0x04a13a50) /* 0.289362253 */, 16 }, /* 1617 */ { MAD_F(0x04a234af) /* 0.289601026 */, 16 }, /* 1618 */ { MAD_F(0x04a32f1b) /* 0.289839847 */, 16 }, /* 1619 */ { MAD_F(0x04a42995) /* 0.290078718 */, 16 }, /* 1620 */ { MAD_F(0x04a5241b) /* 0.290317638 */, 16 }, /* 1621 */ { MAD_F(0x04a61eaf) /* 0.290556607 */, 16 }, /* 1622 */ { MAD_F(0x04a71950) /* 0.290795626 */, 16 }, /* 1623 */ { MAD_F(0x04a813fe) /* 0.291034693 */, 16 }, /* 1624 */ { MAD_F(0x04a90eba) /* 0.291273810 */, 16 }, /* 1625 */ { MAD_F(0x04aa0982) /* 0.291512975 */, 16 }, /* 1626 */ { MAD_F(0x04ab0458) /* 0.291752190 */, 16 }, /* 1627 */ { MAD_F(0x04abff3b) /* 0.291991453 */, 16 }, /* 1628 */ { MAD_F(0x04acfa2b) /* 0.292230766 */, 16 }, /* 1629 */ { MAD_F(0x04adf528) /* 0.292470128 */, 16 }, /* 1630 */ { MAD_F(0x04aef032) /* 0.292709539 */, 16 }, /* 1631 */ { MAD_F(0x04afeb4a) /* 0.292948998 */, 16 }, /* 1632 */ { MAD_F(0x04b0e66e) /* 0.293188507 */, 16 }, /* 1633 */ { MAD_F(0x04b1e1a0) /* 0.293428065 */, 16 }, /* 1634 */ { MAD_F(0x04b2dcdf) /* 0.293667671 */, 16 }, /* 1635 */ { MAD_F(0x04b3d82b) /* 0.293907326 */, 16 }, /* 1636 */ { MAD_F(0x04b4d384) /* 0.294147031 */, 16 }, /* 1637 */ { MAD_F(0x04b5ceea) /* 0.294386784 */, 16 }, /* 1638 */ { MAD_F(0x04b6ca5e) /* 0.294626585 */, 16 }, /* 1639 */ { MAD_F(0x04b7c5de) /* 0.294866436 */, 16 }, /* 1640 */ { MAD_F(0x04b8c16c) /* 0.295106336 */, 16 }, /* 1641 */ { MAD_F(0x04b9bd06) /* 0.295346284 */, 16 }, /* 1642 */ { MAD_F(0x04bab8ae) /* 0.295586281 */, 16 }, /* 1643 */ { MAD_F(0x04bbb463) /* 0.295826327 */, 16 }, /* 1644 */ { MAD_F(0x04bcb024) /* 0.296066421 */, 16 }, /* 1645 */ { MAD_F(0x04bdabf3) /* 0.296306564 */, 16 }, /* 1646 */ { MAD_F(0x04bea7cf) /* 0.296546756 */, 16 }, /* 1647 */ { MAD_F(0x04bfa3b8) /* 0.296786996 */, 16 }, /* 1648 */ { MAD_F(0x04c09faf) /* 0.297027285 */, 16 }, /* 1649 */ { MAD_F(0x04c19bb2) /* 0.297267623 */, 16 }, /* 1650 */ { MAD_F(0x04c297c2) /* 0.297508009 */, 16 }, /* 1651 */ { MAD_F(0x04c393df) /* 0.297748444 */, 16 }, /* 1652 */ { MAD_F(0x04c49009) /* 0.297988927 */, 16 }, /* 1653 */ { MAD_F(0x04c58c41) /* 0.298229459 */, 16 }, /* 1654 */ { MAD_F(0x04c68885) /* 0.298470039 */, 16 }, /* 1655 */ { MAD_F(0x04c784d6) /* 0.298710668 */, 16 }, /* 1656 */ { MAD_F(0x04c88135) /* 0.298951346 */, 16 }, /* 1657 */ { MAD_F(0x04c97da0) /* 0.299192071 */, 16 }, /* 1658 */ { MAD_F(0x04ca7a18) /* 0.299432846 */, 16 }, /* 1659 */ { MAD_F(0x04cb769e) /* 0.299673668 */, 16 }, /* 1660 */ { MAD_F(0x04cc7330) /* 0.299914539 */, 16 }, /* 1661 */ { MAD_F(0x04cd6fcf) /* 0.300155459 */, 16 }, /* 1662 */ { MAD_F(0x04ce6c7b) /* 0.300396426 */, 16 }, /* 1663 */ { MAD_F(0x04cf6935) /* 0.300637443 */, 16 }, /* 1664 */ { MAD_F(0x04d065fb) /* 0.300878507 */, 16 }, /* 1665 */ { MAD_F(0x04d162ce) /* 0.301119620 */, 16 }, /* 1666 */ { MAD_F(0x04d25fae) /* 0.301360781 */, 16 }, /* 1667 */ { MAD_F(0x04d35c9b) /* 0.301601990 */, 16 }, /* 1668 */ { MAD_F(0x04d45995) /* 0.301843247 */, 16 }, /* 1669 */ { MAD_F(0x04d5569c) /* 0.302084553 */, 16 }, /* 1670 */ { MAD_F(0x04d653b0) /* 0.302325907 */, 16 }, /* 1671 */ { MAD_F(0x04d750d1) /* 0.302567309 */, 16 }, /* 1672 */ { MAD_F(0x04d84dff) /* 0.302808759 */, 16 }, /* 1673 */ { MAD_F(0x04d94b3a) /* 0.303050257 */, 16 }, /* 1674 */ { MAD_F(0x04da4881) /* 0.303291804 */, 16 }, /* 1675 */ { MAD_F(0x04db45d6) /* 0.303533399 */, 16 }, /* 1676 */ { MAD_F(0x04dc4337) /* 0.303775041 */, 16 }, /* 1677 */ { MAD_F(0x04dd40a6) /* 0.304016732 */, 16 }, /* 1678 */ { MAD_F(0x04de3e21) /* 0.304258471 */, 16 }, /* 1679 */ { MAD_F(0x04df3ba9) /* 0.304500257 */, 16 }, /* 1680 */ { MAD_F(0x04e0393e) /* 0.304742092 */, 16 }, /* 1681 */ { MAD_F(0x04e136e0) /* 0.304983975 */, 16 }, /* 1682 */ { MAD_F(0x04e2348f) /* 0.305225906 */, 16 }, /* 1683 */ { MAD_F(0x04e3324b) /* 0.305467885 */, 16 }, /* 1684 */ { MAD_F(0x04e43013) /* 0.305709911 */, 16 }, /* 1685 */ { MAD_F(0x04e52de9) /* 0.305951986 */, 16 }, /* 1686 */ { MAD_F(0x04e62bcb) /* 0.306194108 */, 16 }, /* 1687 */ { MAD_F(0x04e729ba) /* 0.306436279 */, 16 }, /* 1688 */ { MAD_F(0x04e827b6) /* 0.306678497 */, 16 }, /* 1689 */ { MAD_F(0x04e925bf) /* 0.306920763 */, 16 }, /* 1690 */ { MAD_F(0x04ea23d4) /* 0.307163077 */, 16 }, /* 1691 */ { MAD_F(0x04eb21f7) /* 0.307405438 */, 16 }, /* 1692 */ { MAD_F(0x04ec2026) /* 0.307647848 */, 16 }, /* 1693 */ { MAD_F(0x04ed1e62) /* 0.307890305 */, 16 }, /* 1694 */ { MAD_F(0x04ee1cab) /* 0.308132810 */, 16 }, /* 1695 */ { MAD_F(0x04ef1b01) /* 0.308375362 */, 16 }, /* 1696 */ { MAD_F(0x04f01963) /* 0.308617963 */, 16 }, /* 1697 */ { MAD_F(0x04f117d3) /* 0.308860611 */, 16 }, /* 1698 */ { MAD_F(0x04f2164f) /* 0.309103306 */, 16 }, /* 1699 */ { MAD_F(0x04f314d8) /* 0.309346050 */, 16 }, /* 1700 */ { MAD_F(0x04f4136d) /* 0.309588841 */, 16 }, /* 1701 */ { MAD_F(0x04f51210) /* 0.309831679 */, 16 }, /* 1702 */ { MAD_F(0x04f610bf) /* 0.310074565 */, 16 }, /* 1703 */ { MAD_F(0x04f70f7b) /* 0.310317499 */, 16 }, /* 1704 */ { MAD_F(0x04f80e44) /* 0.310560480 */, 16 }, /* 1705 */ { MAD_F(0x04f90d19) /* 0.310803509 */, 16 }, /* 1706 */ { MAD_F(0x04fa0bfc) /* 0.311046586 */, 16 }, /* 1707 */ { MAD_F(0x04fb0aeb) /* 0.311289710 */, 16 }, /* 1708 */ { MAD_F(0x04fc09e7) /* 0.311532881 */, 16 }, /* 1709 */ { MAD_F(0x04fd08ef) /* 0.311776100 */, 16 }, /* 1710 */ { MAD_F(0x04fe0805) /* 0.312019366 */, 16 }, /* 1711 */ { MAD_F(0x04ff0727) /* 0.312262680 */, 16 }, /* 1712 */ { MAD_F(0x05000655) /* 0.312506041 */, 16 }, /* 1713 */ { MAD_F(0x05010591) /* 0.312749449 */, 16 }, /* 1714 */ { MAD_F(0x050204d9) /* 0.312992905 */, 16 }, /* 1715 */ { MAD_F(0x0503042e) /* 0.313236408 */, 16 }, /* 1716 */ { MAD_F(0x0504038f) /* 0.313479959 */, 16 }, /* 1717 */ { MAD_F(0x050502fe) /* 0.313723556 */, 16 }, /* 1718 */ { MAD_F(0x05060279) /* 0.313967202 */, 16 }, /* 1719 */ { MAD_F(0x05070200) /* 0.314210894 */, 16 }, /* 1720 */ { MAD_F(0x05080195) /* 0.314454634 */, 16 }, /* 1721 */ { MAD_F(0x05090136) /* 0.314698420 */, 16 }, /* 1722 */ { MAD_F(0x050a00e3) /* 0.314942255 */, 16 }, /* 1723 */ { MAD_F(0x050b009e) /* 0.315186136 */, 16 }, /* 1724 */ { MAD_F(0x050c0065) /* 0.315430064 */, 16 }, /* 1725 */ { MAD_F(0x050d0039) /* 0.315674040 */, 16 }, /* 1726 */ { MAD_F(0x050e0019) /* 0.315918063 */, 16 }, /* 1727 */ { MAD_F(0x050f0006) /* 0.316162133 */, 16 }, /* 1728 */ { MAD_F(0x05100000) /* 0.316406250 */, 16 }, /* 1729 */ { MAD_F(0x05110006) /* 0.316650414 */, 16 }, /* 1730 */ { MAD_F(0x05120019) /* 0.316894625 */, 16 }, /* 1731 */ { MAD_F(0x05130039) /* 0.317138884 */, 16 }, /* 1732 */ { MAD_F(0x05140065) /* 0.317383189 */, 16 }, /* 1733 */ { MAD_F(0x0515009e) /* 0.317627541 */, 16 }, /* 1734 */ { MAD_F(0x051600e3) /* 0.317871941 */, 16 }, /* 1735 */ { MAD_F(0x05170135) /* 0.318116387 */, 16 }, /* 1736 */ { MAD_F(0x05180194) /* 0.318360880 */, 16 }, /* 1737 */ { MAD_F(0x051901ff) /* 0.318605421 */, 16 }, /* 1738 */ { MAD_F(0x051a0277) /* 0.318850008 */, 16 }, /* 1739 */ { MAD_F(0x051b02fc) /* 0.319094642 */, 16 }, /* 1740 */ { MAD_F(0x051c038d) /* 0.319339323 */, 16 }, /* 1741 */ { MAD_F(0x051d042a) /* 0.319584051 */, 16 }, /* 1742 */ { MAD_F(0x051e04d4) /* 0.319828826 */, 16 }, /* 1743 */ { MAD_F(0x051f058b) /* 0.320073647 */, 16 }, /* 1744 */ { MAD_F(0x0520064f) /* 0.320318516 */, 16 }, /* 1745 */ { MAD_F(0x0521071f) /* 0.320563431 */, 16 }, /* 1746 */ { MAD_F(0x052207fb) /* 0.320808393 */, 16 }, /* 1747 */ { MAD_F(0x052308e4) /* 0.321053402 */, 16 }, /* 1748 */ { MAD_F(0x052409da) /* 0.321298457 */, 16 }, /* 1749 */ { MAD_F(0x05250adc) /* 0.321543560 */, 16 }, /* 1750 */ { MAD_F(0x05260bea) /* 0.321788709 */, 16 }, /* 1751 */ { MAD_F(0x05270d06) /* 0.322033904 */, 16 }, /* 1752 */ { MAD_F(0x05280e2d) /* 0.322279147 */, 16 }, /* 1753 */ { MAD_F(0x05290f62) /* 0.322524436 */, 16 }, /* 1754 */ { MAD_F(0x052a10a3) /* 0.322769771 */, 16 }, /* 1755 */ { MAD_F(0x052b11f0) /* 0.323015154 */, 16 }, /* 1756 */ { MAD_F(0x052c134a) /* 0.323260583 */, 16 }, /* 1757 */ { MAD_F(0x052d14b0) /* 0.323506058 */, 16 }, /* 1758 */ { MAD_F(0x052e1623) /* 0.323751580 */, 16 }, /* 1759 */ { MAD_F(0x052f17a2) /* 0.323997149 */, 16 }, /* 1760 */ { MAD_F(0x0530192e) /* 0.324242764 */, 16 }, /* 1761 */ { MAD_F(0x05311ac6) /* 0.324488426 */, 16 }, /* 1762 */ { MAD_F(0x05321c6b) /* 0.324734134 */, 16 }, /* 1763 */ { MAD_F(0x05331e1c) /* 0.324979889 */, 16 }, /* 1764 */ { MAD_F(0x05341fda) /* 0.325225690 */, 16 }, /* 1765 */ { MAD_F(0x053521a4) /* 0.325471538 */, 16 }, /* 1766 */ { MAD_F(0x0536237b) /* 0.325717432 */, 16 }, /* 1767 */ { MAD_F(0x0537255e) /* 0.325963372 */, 16 }, /* 1768 */ { MAD_F(0x0538274e) /* 0.326209359 */, 16 }, /* 1769 */ { MAD_F(0x0539294a) /* 0.326455392 */, 16 }, /* 1770 */ { MAD_F(0x053a2b52) /* 0.326701472 */, 16 }, /* 1771 */ { MAD_F(0x053b2d67) /* 0.326947598 */, 16 }, /* 1772 */ { MAD_F(0x053c2f89) /* 0.327193770 */, 16 }, /* 1773 */ { MAD_F(0x053d31b6) /* 0.327439989 */, 16 }, /* 1774 */ { MAD_F(0x053e33f1) /* 0.327686254 */, 16 }, /* 1775 */ { MAD_F(0x053f3637) /* 0.327932565 */, 16 }, /* 1776 */ { MAD_F(0x0540388a) /* 0.328178922 */, 16 }, /* 1777 */ { MAD_F(0x05413aea) /* 0.328425326 */, 16 }, /* 1778 */ { MAD_F(0x05423d56) /* 0.328671776 */, 16 }, /* 1779 */ { MAD_F(0x05433fce) /* 0.328918272 */, 16 }, /* 1780 */ { MAD_F(0x05444253) /* 0.329164814 */, 16 }, /* 1781 */ { MAD_F(0x054544e4) /* 0.329411403 */, 16 }, /* 1782 */ { MAD_F(0x05464781) /* 0.329658038 */, 16 }, /* 1783 */ { MAD_F(0x05474a2b) /* 0.329904718 */, 16 }, /* 1784 */ { MAD_F(0x05484ce2) /* 0.330151445 */, 16 }, /* 1785 */ { MAD_F(0x05494fa4) /* 0.330398218 */, 16 }, /* 1786 */ { MAD_F(0x054a5273) /* 0.330645037 */, 16 }, /* 1787 */ { MAD_F(0x054b554e) /* 0.330891903 */, 16 }, /* 1788 */ { MAD_F(0x054c5836) /* 0.331138814 */, 16 }, /* 1789 */ { MAD_F(0x054d5b2a) /* 0.331385771 */, 16 }, /* 1790 */ { MAD_F(0x054e5e2b) /* 0.331632774 */, 16 }, /* 1791 */ { MAD_F(0x054f6138) /* 0.331879824 */, 16 }, /* 1792 */ { MAD_F(0x05506451) /* 0.332126919 */, 16 }, /* 1793 */ { MAD_F(0x05516776) /* 0.332374060 */, 16 }, /* 1794 */ { MAD_F(0x05526aa8) /* 0.332621247 */, 16 }, /* 1795 */ { MAD_F(0x05536de6) /* 0.332868480 */, 16 }, /* 1796 */ { MAD_F(0x05547131) /* 0.333115759 */, 16 }, /* 1797 */ { MAD_F(0x05557487) /* 0.333363084 */, 16 }, /* 1798 */ { MAD_F(0x055677ea) /* 0.333610455 */, 16 }, /* 1799 */ { MAD_F(0x05577b5a) /* 0.333857872 */, 16 }, /* 1800 */ { MAD_F(0x05587ed5) /* 0.334105334 */, 16 }, /* 1801 */ { MAD_F(0x0559825e) /* 0.334352843 */, 16 }, /* 1802 */ { MAD_F(0x055a85f2) /* 0.334600397 */, 16 }, /* 1803 */ { MAD_F(0x055b8992) /* 0.334847997 */, 16 }, /* 1804 */ { MAD_F(0x055c8d3f) /* 0.335095642 */, 16 }, /* 1805 */ { MAD_F(0x055d90f9) /* 0.335343334 */, 16 }, /* 1806 */ { MAD_F(0x055e94be) /* 0.335591071 */, 16 }, /* 1807 */ { MAD_F(0x055f9890) /* 0.335838854 */, 16 }, /* 1808 */ { MAD_F(0x05609c6e) /* 0.336086683 */, 16 }, /* 1809 */ { MAD_F(0x0561a058) /* 0.336334557 */, 16 }, /* 1810 */ { MAD_F(0x0562a44f) /* 0.336582477 */, 16 }, /* 1811 */ { MAD_F(0x0563a851) /* 0.336830443 */, 16 }, /* 1812 */ { MAD_F(0x0564ac60) /* 0.337078454 */, 16 }, /* 1813 */ { MAD_F(0x0565b07c) /* 0.337326511 */, 16 }, /* 1814 */ { MAD_F(0x0566b4a3) /* 0.337574614 */, 16 }, /* 1815 */ { MAD_F(0x0567b8d7) /* 0.337822762 */, 16 }, /* 1816 */ { MAD_F(0x0568bd17) /* 0.338070956 */, 16 }, /* 1817 */ { MAD_F(0x0569c163) /* 0.338319195 */, 16 }, /* 1818 */ { MAD_F(0x056ac5bc) /* 0.338567480 */, 16 }, /* 1819 */ { MAD_F(0x056bca20) /* 0.338815811 */, 16 }, /* 1820 */ { MAD_F(0x056cce91) /* 0.339064186 */, 16 }, /* 1821 */ { MAD_F(0x056dd30e) /* 0.339312608 */, 16 }, /* 1822 */ { MAD_F(0x056ed798) /* 0.339561075 */, 16 }, /* 1823 */ { MAD_F(0x056fdc2d) /* 0.339809587 */, 16 }, /* 1824 */ { MAD_F(0x0570e0cf) /* 0.340058145 */, 16 }, /* 1825 */ { MAD_F(0x0571e57d) /* 0.340306748 */, 16 }, /* 1826 */ { MAD_F(0x0572ea37) /* 0.340555397 */, 16 }, /* 1827 */ { MAD_F(0x0573eefd) /* 0.340804091 */, 16 }, /* 1828 */ { MAD_F(0x0574f3d0) /* 0.341052830 */, 16 }, /* 1829 */ { MAD_F(0x0575f8ae) /* 0.341301615 */, 16 }, /* 1830 */ { MAD_F(0x0576fd99) /* 0.341550445 */, 16 }, /* 1831 */ { MAD_F(0x05780290) /* 0.341799321 */, 16 }, /* 1832 */ { MAD_F(0x05790793) /* 0.342048241 */, 16 }, /* 1833 */ { MAD_F(0x057a0ca3) /* 0.342297207 */, 16 }, /* 1834 */ { MAD_F(0x057b11be) /* 0.342546219 */, 16 }, /* 1835 */ { MAD_F(0x057c16e6) /* 0.342795275 */, 16 }, /* 1836 */ { MAD_F(0x057d1c1a) /* 0.343044377 */, 16 }, /* 1837 */ { MAD_F(0x057e2159) /* 0.343293524 */, 16 }, /* 1838 */ { MAD_F(0x057f26a6) /* 0.343542717 */, 16 }, /* 1839 */ { MAD_F(0x05802bfe) /* 0.343791954 */, 16 }, /* 1840 */ { MAD_F(0x05813162) /* 0.344041237 */, 16 }, /* 1841 */ { MAD_F(0x058236d2) /* 0.344290564 */, 16 }, /* 1842 */ { MAD_F(0x05833c4f) /* 0.344539937 */, 16 }, /* 1843 */ { MAD_F(0x058441d8) /* 0.344789356 */, 16 }, /* 1844 */ { MAD_F(0x0585476c) /* 0.345038819 */, 16 }, /* 1845 */ { MAD_F(0x05864d0d) /* 0.345288327 */, 16 }, /* 1846 */ { MAD_F(0x058752ba) /* 0.345537880 */, 16 }, /* 1847 */ { MAD_F(0x05885873) /* 0.345787479 */, 16 }, /* 1848 */ { MAD_F(0x05895e39) /* 0.346037122 */, 16 }, /* 1849 */ { MAD_F(0x058a640a) /* 0.346286811 */, 16 }, /* 1850 */ { MAD_F(0x058b69e7) /* 0.346536545 */, 16 }, /* 1851 */ { MAD_F(0x058c6fd1) /* 0.346786323 */, 16 }, /* 1852 */ { MAD_F(0x058d75c6) /* 0.347036147 */, 16 }, /* 1853 */ { MAD_F(0x058e7bc8) /* 0.347286015 */, 16 }, /* 1854 */ { MAD_F(0x058f81d5) /* 0.347535929 */, 16 }, /* 1855 */ { MAD_F(0x059087ef) /* 0.347785887 */, 16 }, /* 1856 */ { MAD_F(0x05918e15) /* 0.348035890 */, 16 }, /* 1857 */ { MAD_F(0x05929447) /* 0.348285939 */, 16 }, /* 1858 */ { MAD_F(0x05939a84) /* 0.348536032 */, 16 }, /* 1859 */ { MAD_F(0x0594a0ce) /* 0.348786170 */, 16 }, /* 1860 */ { MAD_F(0x0595a724) /* 0.349036353 */, 16 }, /* 1861 */ { MAD_F(0x0596ad86) /* 0.349286580 */, 16 }, /* 1862 */ { MAD_F(0x0597b3f4) /* 0.349536853 */, 16 }, /* 1863 */ { MAD_F(0x0598ba6e) /* 0.349787170 */, 16 }, /* 1864 */ { MAD_F(0x0599c0f4) /* 0.350037532 */, 16 }, /* 1865 */ { MAD_F(0x059ac786) /* 0.350287939 */, 16 }, /* 1866 */ { MAD_F(0x059bce25) /* 0.350538391 */, 16 }, /* 1867 */ { MAD_F(0x059cd4cf) /* 0.350788887 */, 16 }, /* 1868 */ { MAD_F(0x059ddb85) /* 0.351039428 */, 16 }, /* 1869 */ { MAD_F(0x059ee247) /* 0.351290014 */, 16 }, /* 1870 */ { MAD_F(0x059fe915) /* 0.351540645 */, 16 }, /* 1871 */ { MAD_F(0x05a0efef) /* 0.351791320 */, 16 }, /* 1872 */ { MAD_F(0x05a1f6d5) /* 0.352042040 */, 16 }, /* 1873 */ { MAD_F(0x05a2fdc7) /* 0.352292804 */, 16 }, /* 1874 */ { MAD_F(0x05a404c5) /* 0.352543613 */, 16 }, /* 1875 */ { MAD_F(0x05a50bcf) /* 0.352794467 */, 16 }, /* 1876 */ { MAD_F(0x05a612e5) /* 0.353045365 */, 16 }, /* 1877 */ { MAD_F(0x05a71a07) /* 0.353296308 */, 16 }, /* 1878 */ { MAD_F(0x05a82135) /* 0.353547296 */, 16 }, /* 1879 */ { MAD_F(0x05a9286f) /* 0.353798328 */, 16 }, /* 1880 */ { MAD_F(0x05aa2fb5) /* 0.354049405 */, 16 }, /* 1881 */ { MAD_F(0x05ab3707) /* 0.354300526 */, 16 }, /* 1882 */ { MAD_F(0x05ac3e65) /* 0.354551691 */, 16 }, /* 1883 */ { MAD_F(0x05ad45ce) /* 0.354802901 */, 16 }, /* 1884 */ { MAD_F(0x05ae4d44) /* 0.355054156 */, 16 }, /* 1885 */ { MAD_F(0x05af54c6) /* 0.355305455 */, 16 }, /* 1886 */ { MAD_F(0x05b05c53) /* 0.355556799 */, 16 }, /* 1887 */ { MAD_F(0x05b163ed) /* 0.355808187 */, 16 }, /* 1888 */ { MAD_F(0x05b26b92) /* 0.356059619 */, 16 }, /* 1889 */ { MAD_F(0x05b37343) /* 0.356311096 */, 16 }, /* 1890 */ { MAD_F(0x05b47b00) /* 0.356562617 */, 16 }, /* 1891 */ { MAD_F(0x05b582c9) /* 0.356814182 */, 16 }, /* 1892 */ { MAD_F(0x05b68a9e) /* 0.357065792 */, 16 }, /* 1893 */ { MAD_F(0x05b7927f) /* 0.357317446 */, 16 }, /* 1894 */ { MAD_F(0x05b89a6c) /* 0.357569145 */, 16 }, /* 1895 */ { MAD_F(0x05b9a265) /* 0.357820887 */, 16 }, /* 1896 */ { MAD_F(0x05baaa69) /* 0.358072674 */, 16 }, /* 1897 */ { MAD_F(0x05bbb27a) /* 0.358324506 */, 16 }, /* 1898 */ { MAD_F(0x05bcba96) /* 0.358576381 */, 16 }, /* 1899 */ { MAD_F(0x05bdc2be) /* 0.358828301 */, 16 }, /* 1900 */ { MAD_F(0x05becaf2) /* 0.359080265 */, 16 }, /* 1901 */ { MAD_F(0x05bfd332) /* 0.359332273 */, 16 }, /* 1902 */ { MAD_F(0x05c0db7e) /* 0.359584326 */, 16 }, /* 1903 */ { MAD_F(0x05c1e3d6) /* 0.359836423 */, 16 }, /* 1904 */ { MAD_F(0x05c2ec39) /* 0.360088563 */, 16 }, /* 1905 */ { MAD_F(0x05c3f4a9) /* 0.360340748 */, 16 }, /* 1906 */ { MAD_F(0x05c4fd24) /* 0.360592977 */, 16 }, /* 1907 */ { MAD_F(0x05c605ab) /* 0.360845251 */, 16 }, /* 1908 */ { MAD_F(0x05c70e3e) /* 0.361097568 */, 16 }, /* 1909 */ { MAD_F(0x05c816dd) /* 0.361349929 */, 16 }, /* 1910 */ { MAD_F(0x05c91f87) /* 0.361602335 */, 16 }, /* 1911 */ { MAD_F(0x05ca283e) /* 0.361854784 */, 16 }, /* 1912 */ { MAD_F(0x05cb3100) /* 0.362107278 */, 16 }, /* 1913 */ { MAD_F(0x05cc39ce) /* 0.362359815 */, 16 }, /* 1914 */ { MAD_F(0x05cd42a8) /* 0.362612397 */, 16 }, /* 1915 */ { MAD_F(0x05ce4b8d) /* 0.362865022 */, 16 }, /* 1916 */ { MAD_F(0x05cf547f) /* 0.363117692 */, 16 }, /* 1917 */ { MAD_F(0x05d05d7c) /* 0.363370405 */, 16 }, /* 1918 */ { MAD_F(0x05d16685) /* 0.363623163 */, 16 }, /* 1919 */ { MAD_F(0x05d26f9a) /* 0.363875964 */, 16 }, /* 1920 */ { MAD_F(0x05d378bb) /* 0.364128809 */, 16 }, /* 1921 */ { MAD_F(0x05d481e7) /* 0.364381698 */, 16 }, /* 1922 */ { MAD_F(0x05d58b1f) /* 0.364634632 */, 16 }, /* 1923 */ { MAD_F(0x05d69463) /* 0.364887608 */, 16 }, /* 1924 */ { MAD_F(0x05d79db3) /* 0.365140629 */, 16 }, /* 1925 */ { MAD_F(0x05d8a70f) /* 0.365393694 */, 16 }, /* 1926 */ { MAD_F(0x05d9b076) /* 0.365646802 */, 16 }, /* 1927 */ { MAD_F(0x05dab9e9) /* 0.365899955 */, 16 }, /* 1928 */ { MAD_F(0x05dbc368) /* 0.366153151 */, 16 }, /* 1929 */ { MAD_F(0x05dcccf2) /* 0.366406390 */, 16 }, /* 1930 */ { MAD_F(0x05ddd689) /* 0.366659674 */, 16 }, /* 1931 */ { MAD_F(0x05dee02b) /* 0.366913001 */, 16 }, /* 1932 */ { MAD_F(0x05dfe9d8) /* 0.367166372 */, 16 }, /* 1933 */ { MAD_F(0x05e0f392) /* 0.367419787 */, 16 }, /* 1934 */ { MAD_F(0x05e1fd57) /* 0.367673246 */, 16 }, /* 1935 */ { MAD_F(0x05e30728) /* 0.367926748 */, 16 }, /* 1936 */ { MAD_F(0x05e41105) /* 0.368180294 */, 16 }, /* 1937 */ { MAD_F(0x05e51aed) /* 0.368433883 */, 16 }, /* 1938 */ { MAD_F(0x05e624e1) /* 0.368687517 */, 16 }, /* 1939 */ { MAD_F(0x05e72ee1) /* 0.368941193 */, 16 }, /* 1940 */ { MAD_F(0x05e838ed) /* 0.369194914 */, 16 }, /* 1941 */ { MAD_F(0x05e94304) /* 0.369448678 */, 16 }, /* 1942 */ { MAD_F(0x05ea4d27) /* 0.369702485 */, 16 }, /* 1943 */ { MAD_F(0x05eb5756) /* 0.369956336 */, 16 }, /* 1944 */ { MAD_F(0x05ec6190) /* 0.370210231 */, 16 }, /* 1945 */ { MAD_F(0x05ed6bd6) /* 0.370464169 */, 16 }, /* 1946 */ { MAD_F(0x05ee7628) /* 0.370718151 */, 16 }, /* 1947 */ { MAD_F(0x05ef8085) /* 0.370972177 */, 16 }, /* 1948 */ { MAD_F(0x05f08aee) /* 0.371226245 */, 16 }, /* 1949 */ { MAD_F(0x05f19563) /* 0.371480358 */, 16 }, /* 1950 */ { MAD_F(0x05f29fe3) /* 0.371734513 */, 16 }, /* 1951 */ { MAD_F(0x05f3aa6f) /* 0.371988712 */, 16 }, /* 1952 */ { MAD_F(0x05f4b507) /* 0.372242955 */, 16 }, /* 1953 */ { MAD_F(0x05f5bfab) /* 0.372497241 */, 16 }, /* 1954 */ { MAD_F(0x05f6ca5a) /* 0.372751570 */, 16 }, /* 1955 */ { MAD_F(0x05f7d514) /* 0.373005943 */, 16 }, /* 1956 */ { MAD_F(0x05f8dfdb) /* 0.373260359 */, 16 }, /* 1957 */ { MAD_F(0x05f9eaad) /* 0.373514819 */, 16 }, /* 1958 */ { MAD_F(0x05faf58a) /* 0.373769322 */, 16 }, /* 1959 */ { MAD_F(0x05fc0073) /* 0.374023868 */, 16 }, /* 1960 */ { MAD_F(0x05fd0b68) /* 0.374278458 */, 16 }, /* 1961 */ { MAD_F(0x05fe1669) /* 0.374533091 */, 16 }, /* 1962 */ { MAD_F(0x05ff2175) /* 0.374787767 */, 16 }, /* 1963 */ { MAD_F(0x06002c8d) /* 0.375042486 */, 16 }, /* 1964 */ { MAD_F(0x060137b0) /* 0.375297249 */, 16 }, /* 1965 */ { MAD_F(0x060242df) /* 0.375552055 */, 16 }, /* 1966 */ { MAD_F(0x06034e19) /* 0.375806904 */, 16 }, /* 1967 */ { MAD_F(0x0604595f) /* 0.376061796 */, 16 }, /* 1968 */ { MAD_F(0x060564b1) /* 0.376316732 */, 16 }, /* 1969 */ { MAD_F(0x0606700f) /* 0.376571710 */, 16 }, /* 1970 */ { MAD_F(0x06077b77) /* 0.376826732 */, 16 }, /* 1971 */ { MAD_F(0x060886ec) /* 0.377081797 */, 16 }, /* 1972 */ { MAD_F(0x0609926c) /* 0.377336905 */, 16 }, /* 1973 */ { MAD_F(0x060a9df8) /* 0.377592057 */, 16 }, /* 1974 */ { MAD_F(0x060ba98f) /* 0.377847251 */, 16 }, /* 1975 */ { MAD_F(0x060cb532) /* 0.378102489 */, 16 }, /* 1976 */ { MAD_F(0x060dc0e0) /* 0.378357769 */, 16 }, /* 1977 */ { MAD_F(0x060ecc9a) /* 0.378613093 */, 16 }, /* 1978 */ { MAD_F(0x060fd860) /* 0.378868460 */, 16 }, /* 1979 */ { MAD_F(0x0610e431) /* 0.379123870 */, 16 }, /* 1980 */ { MAD_F(0x0611f00d) /* 0.379379322 */, 16 }, /* 1981 */ { MAD_F(0x0612fbf5) /* 0.379634818 */, 16 }, /* 1982 */ { MAD_F(0x061407e9) /* 0.379890357 */, 16 }, /* 1983 */ { MAD_F(0x061513e8) /* 0.380145939 */, 16 }, /* 1984 */ { MAD_F(0x06161ff3) /* 0.380401563 */, 16 }, /* 1985 */ { MAD_F(0x06172c09) /* 0.380657231 */, 16 }, /* 1986 */ { MAD_F(0x0618382b) /* 0.380912942 */, 16 }, /* 1987 */ { MAD_F(0x06194458) /* 0.381168695 */, 16 }, /* 1988 */ { MAD_F(0x061a5091) /* 0.381424492 */, 16 }, /* 1989 */ { MAD_F(0x061b5cd5) /* 0.381680331 */, 16 }, /* 1990 */ { MAD_F(0x061c6925) /* 0.381936213 */, 16 }, /* 1991 */ { MAD_F(0x061d7581) /* 0.382192138 */, 16 }, /* 1992 */ { MAD_F(0x061e81e8) /* 0.382448106 */, 16 }, /* 1993 */ { MAD_F(0x061f8e5a) /* 0.382704117 */, 16 }, /* 1994 */ { MAD_F(0x06209ad8) /* 0.382960171 */, 16 }, /* 1995 */ { MAD_F(0x0621a761) /* 0.383216267 */, 16 }, /* 1996 */ { MAD_F(0x0622b3f6) /* 0.383472406 */, 16 }, /* 1997 */ { MAD_F(0x0623c096) /* 0.383728588 */, 16 }, /* 1998 */ { MAD_F(0x0624cd42) /* 0.383984813 */, 16 }, /* 1999 */ { MAD_F(0x0625d9f9) /* 0.384241080 */, 16 }, /* 2000 */ { MAD_F(0x0626e6bc) /* 0.384497391 */, 16 }, /* 2001 */ { MAD_F(0x0627f38a) /* 0.384753744 */, 16 }, /* 2002 */ { MAD_F(0x06290064) /* 0.385010139 */, 16 }, /* 2003 */ { MAD_F(0x062a0d49) /* 0.385266578 */, 16 }, /* 2004 */ { MAD_F(0x062b1a3a) /* 0.385523059 */, 16 }, /* 2005 */ { MAD_F(0x062c2736) /* 0.385779582 */, 16 }, /* 2006 */ { MAD_F(0x062d343d) /* 0.386036149 */, 16 }, /* 2007 */ { MAD_F(0x062e4150) /* 0.386292758 */, 16 }, /* 2008 */ { MAD_F(0x062f4e6f) /* 0.386549409 */, 16 }, /* 2009 */ { MAD_F(0x06305b99) /* 0.386806104 */, 16 }, /* 2010 */ { MAD_F(0x063168ce) /* 0.387062840 */, 16 }, /* 2011 */ { MAD_F(0x0632760f) /* 0.387319620 */, 16 }, /* 2012 */ { MAD_F(0x0633835b) /* 0.387576442 */, 16 }, /* 2013 */ { MAD_F(0x063490b2) /* 0.387833306 */, 16 }, /* 2014 */ { MAD_F(0x06359e15) /* 0.388090213 */, 16 }, /* 2015 */ { MAD_F(0x0636ab83) /* 0.388347163 */, 16 }, /* 2016 */ { MAD_F(0x0637b8fd) /* 0.388604155 */, 16 }, /* 2017 */ { MAD_F(0x0638c682) /* 0.388861190 */, 16 }, /* 2018 */ { MAD_F(0x0639d413) /* 0.389118267 */, 16 }, /* 2019 */ { MAD_F(0x063ae1af) /* 0.389375386 */, 16 }, /* 2020 */ { MAD_F(0x063bef56) /* 0.389632548 */, 16 }, /* 2021 */ { MAD_F(0x063cfd09) /* 0.389889752 */, 16 }, /* 2022 */ { MAD_F(0x063e0ac7) /* 0.390146999 */, 16 }, /* 2023 */ { MAD_F(0x063f1891) /* 0.390404289 */, 16 }, /* 2024 */ { MAD_F(0x06402666) /* 0.390661620 */, 16 }, /* 2025 */ { MAD_F(0x06413446) /* 0.390918994 */, 16 }, /* 2026 */ { MAD_F(0x06424232) /* 0.391176411 */, 16 }, /* 2027 */ { MAD_F(0x06435029) /* 0.391433869 */, 16 }, /* 2028 */ { MAD_F(0x06445e2b) /* 0.391691371 */, 16 }, /* 2029 */ { MAD_F(0x06456c39) /* 0.391948914 */, 16 }, /* 2030 */ { MAD_F(0x06467a52) /* 0.392206500 */, 16 }, /* 2031 */ { MAD_F(0x06478877) /* 0.392464128 */, 16 }, /* 2032 */ { MAD_F(0x064896a7) /* 0.392721798 */, 16 }, /* 2033 */ { MAD_F(0x0649a4e2) /* 0.392979511 */, 16 }, /* 2034 */ { MAD_F(0x064ab328) /* 0.393237266 */, 16 }, /* 2035 */ { MAD_F(0x064bc17a) /* 0.393495063 */, 16 }, /* 2036 */ { MAD_F(0x064ccfd8) /* 0.393752902 */, 16 }, /* 2037 */ { MAD_F(0x064dde40) /* 0.394010784 */, 16 }, /* 2038 */ { MAD_F(0x064eecb4) /* 0.394268707 */, 16 }, /* 2039 */ { MAD_F(0x064ffb33) /* 0.394526673 */, 16 }, /* 2040 */ { MAD_F(0x065109be) /* 0.394784681 */, 16 }, /* 2041 */ { MAD_F(0x06521854) /* 0.395042732 */, 16 }, /* 2042 */ { MAD_F(0x065326f5) /* 0.395300824 */, 16 }, /* 2043 */ { MAD_F(0x065435a1) /* 0.395558959 */, 16 }, /* 2044 */ { MAD_F(0x06554459) /* 0.395817135 */, 16 }, /* 2045 */ { MAD_F(0x0656531c) /* 0.396075354 */, 16 }, /* 2046 */ { MAD_F(0x065761ea) /* 0.396333615 */, 16 }, /* 2047 */ { MAD_F(0x065870c4) /* 0.396591918 */, 16 }, /* 2048 */ { MAD_F(0x06597fa9) /* 0.396850263 */, 16 }, /* 2049 */ { MAD_F(0x065a8e99) /* 0.397108650 */, 16 }, /* 2050 */ { MAD_F(0x065b9d95) /* 0.397367079 */, 16 }, /* 2051 */ { MAD_F(0x065cac9c) /* 0.397625550 */, 16 }, /* 2052 */ { MAD_F(0x065dbbae) /* 0.397884063 */, 16 }, /* 2053 */ { MAD_F(0x065ecacb) /* 0.398142619 */, 16 }, /* 2054 */ { MAD_F(0x065fd9f4) /* 0.398401216 */, 16 }, /* 2055 */ { MAD_F(0x0660e928) /* 0.398659855 */, 16 }, /* 2056 */ { MAD_F(0x0661f867) /* 0.398918536 */, 16 }, /* 2057 */ { MAD_F(0x066307b1) /* 0.399177259 */, 16 }, /* 2058 */ { MAD_F(0x06641707) /* 0.399436024 */, 16 }, /* 2059 */ { MAD_F(0x06652668) /* 0.399694831 */, 16 }, /* 2060 */ { MAD_F(0x066635d4) /* 0.399953679 */, 16 }, /* 2061 */ { MAD_F(0x0667454c) /* 0.400212570 */, 16 }, /* 2062 */ { MAD_F(0x066854ce) /* 0.400471503 */, 16 }, /* 2063 */ { MAD_F(0x0669645c) /* 0.400730477 */, 16 }, /* 2064 */ { MAD_F(0x066a73f5) /* 0.400989493 */, 16 }, /* 2065 */ { MAD_F(0x066b839a) /* 0.401248551 */, 16 }, /* 2066 */ { MAD_F(0x066c9349) /* 0.401507651 */, 16 }, /* 2067 */ { MAD_F(0x066da304) /* 0.401766793 */, 16 }, /* 2068 */ { MAD_F(0x066eb2ca) /* 0.402025976 */, 16 }, /* 2069 */ { MAD_F(0x066fc29b) /* 0.402285202 */, 16 }, /* 2070 */ { MAD_F(0x0670d278) /* 0.402544469 */, 16 }, /* 2071 */ { MAD_F(0x0671e25f) /* 0.402803777 */, 16 }, /* 2072 */ { MAD_F(0x0672f252) /* 0.403063128 */, 16 }, /* 2073 */ { MAD_F(0x06740250) /* 0.403322520 */, 16 }, /* 2074 */ { MAD_F(0x0675125a) /* 0.403581954 */, 16 }, /* 2075 */ { MAD_F(0x0676226e) /* 0.403841430 */, 16 }, /* 2076 */ { MAD_F(0x0677328e) /* 0.404100947 */, 16 }, /* 2077 */ { MAD_F(0x067842b9) /* 0.404360506 */, 16 }, /* 2078 */ { MAD_F(0x067952ef) /* 0.404620107 */, 16 }, /* 2079 */ { MAD_F(0x067a6330) /* 0.404879749 */, 16 }, /* 2080 */ { MAD_F(0x067b737c) /* 0.405139433 */, 16 }, /* 2081 */ { MAD_F(0x067c83d4) /* 0.405399159 */, 16 }, /* 2082 */ { MAD_F(0x067d9436) /* 0.405658926 */, 16 }, /* 2083 */ { MAD_F(0x067ea4a4) /* 0.405918735 */, 16 }, /* 2084 */ { MAD_F(0x067fb51d) /* 0.406178585 */, 16 }, /* 2085 */ { MAD_F(0x0680c5a2) /* 0.406438477 */, 16 }, /* 2086 */ { MAD_F(0x0681d631) /* 0.406698410 */, 16 }, /* 2087 */ { MAD_F(0x0682e6cb) /* 0.406958385 */, 16 }, /* 2088 */ { MAD_F(0x0683f771) /* 0.407218402 */, 16 }, /* 2089 */ { MAD_F(0x06850822) /* 0.407478460 */, 16 }, /* 2090 */ { MAD_F(0x068618de) /* 0.407738559 */, 16 }, /* 2091 */ { MAD_F(0x068729a5) /* 0.407998700 */, 16 }, /* 2092 */ { MAD_F(0x06883a77) /* 0.408258883 */, 16 }, /* 2093 */ { MAD_F(0x06894b55) /* 0.408519107 */, 16 }, /* 2094 */ { MAD_F(0x068a5c3d) /* 0.408779372 */, 16 }, /* 2095 */ { MAD_F(0x068b6d31) /* 0.409039679 */, 16 }, /* 2096 */ { MAD_F(0x068c7e2f) /* 0.409300027 */, 16 }, /* 2097 */ { MAD_F(0x068d8f39) /* 0.409560417 */, 16 }, /* 2098 */ { MAD_F(0x068ea04e) /* 0.409820848 */, 16 }, /* 2099 */ { MAD_F(0x068fb16e) /* 0.410081321 */, 16 }, /* 2100 */ { MAD_F(0x0690c299) /* 0.410341834 */, 16 }, /* 2101 */ { MAD_F(0x0691d3cf) /* 0.410602390 */, 16 }, /* 2102 */ { MAD_F(0x0692e511) /* 0.410862986 */, 16 }, /* 2103 */ { MAD_F(0x0693f65d) /* 0.411123624 */, 16 }, /* 2104 */ { MAD_F(0x069507b5) /* 0.411384303 */, 16 }, /* 2105 */ { MAD_F(0x06961917) /* 0.411645024 */, 16 }, /* 2106 */ { MAD_F(0x06972a85) /* 0.411905785 */, 16 }, /* 2107 */ { MAD_F(0x06983bfe) /* 0.412166588 */, 16 }, /* 2108 */ { MAD_F(0x06994d82) /* 0.412427433 */, 16 }, /* 2109 */ { MAD_F(0x069a5f11) /* 0.412688318 */, 16 }, /* 2110 */ { MAD_F(0x069b70ab) /* 0.412949245 */, 16 }, /* 2111 */ { MAD_F(0x069c8250) /* 0.413210213 */, 16 }, /* 2112 */ { MAD_F(0x069d9400) /* 0.413471222 */, 16 }, /* 2113 */ { MAD_F(0x069ea5bb) /* 0.413732273 */, 16 }, /* 2114 */ { MAD_F(0x069fb781) /* 0.413993364 */, 16 }, /* 2115 */ { MAD_F(0x06a0c953) /* 0.414254497 */, 16 }, /* 2116 */ { MAD_F(0x06a1db2f) /* 0.414515671 */, 16 }, /* 2117 */ { MAD_F(0x06a2ed16) /* 0.414776886 */, 16 }, /* 2118 */ { MAD_F(0x06a3ff09) /* 0.415038142 */, 16 }, /* 2119 */ { MAD_F(0x06a51106) /* 0.415299440 */, 16 }, /* 2120 */ { MAD_F(0x06a6230f) /* 0.415560778 */, 16 }, /* 2121 */ { MAD_F(0x06a73522) /* 0.415822157 */, 16 }, /* 2122 */ { MAD_F(0x06a84741) /* 0.416083578 */, 16 }, /* 2123 */ { MAD_F(0x06a9596a) /* 0.416345040 */, 16 }, /* 2124 */ { MAD_F(0x06aa6b9f) /* 0.416606542 */, 16 }, /* 2125 */ { MAD_F(0x06ab7ddf) /* 0.416868086 */, 16 }, /* 2126 */ { MAD_F(0x06ac9029) /* 0.417129671 */, 16 }, /* 2127 */ { MAD_F(0x06ada27f) /* 0.417391297 */, 16 }, /* 2128 */ { MAD_F(0x06aeb4e0) /* 0.417652964 */, 16 }, /* 2129 */ { MAD_F(0x06afc74b) /* 0.417914672 */, 16 }, /* 2130 */ { MAD_F(0x06b0d9c2) /* 0.418176420 */, 16 }, /* 2131 */ { MAD_F(0x06b1ec43) /* 0.418438210 */, 16 }, /* 2132 */ { MAD_F(0x06b2fed0) /* 0.418700041 */, 16 }, /* 2133 */ { MAD_F(0x06b41168) /* 0.418961912 */, 16 }, /* 2134 */ { MAD_F(0x06b5240a) /* 0.419223825 */, 16 }, /* 2135 */ { MAD_F(0x06b636b8) /* 0.419485778 */, 16 }, /* 2136 */ { MAD_F(0x06b74971) /* 0.419747773 */, 16 }, /* 2137 */ { MAD_F(0x06b85c34) /* 0.420009808 */, 16 }, /* 2138 */ { MAD_F(0x06b96f03) /* 0.420271884 */, 16 }, /* 2139 */ { MAD_F(0x06ba81dc) /* 0.420534001 */, 16 }, /* 2140 */ { MAD_F(0x06bb94c1) /* 0.420796159 */, 16 }, /* 2141 */ { MAD_F(0x06bca7b0) /* 0.421058358 */, 16 }, /* 2142 */ { MAD_F(0x06bdbaaa) /* 0.421320597 */, 16 }, /* 2143 */ { MAD_F(0x06becdb0) /* 0.421582878 */, 16 }, /* 2144 */ { MAD_F(0x06bfe0c0) /* 0.421845199 */, 16 }, /* 2145 */ { MAD_F(0x06c0f3db) /* 0.422107561 */, 16 }, /* 2146 */ { MAD_F(0x06c20702) /* 0.422369964 */, 16 }, /* 2147 */ { MAD_F(0x06c31a33) /* 0.422632407 */, 16 }, /* 2148 */ { MAD_F(0x06c42d6f) /* 0.422894891 */, 16 }, /* 2149 */ { MAD_F(0x06c540b6) /* 0.423157416 */, 16 }, /* 2150 */ { MAD_F(0x06c65408) /* 0.423419982 */, 16 }, /* 2151 */ { MAD_F(0x06c76765) /* 0.423682588 */, 16 }, /* 2152 */ { MAD_F(0x06c87acc) /* 0.423945235 */, 16 }, /* 2153 */ { MAD_F(0x06c98e3f) /* 0.424207923 */, 16 }, /* 2154 */ { MAD_F(0x06caa1bd) /* 0.424470652 */, 16 }, /* 2155 */ { MAD_F(0x06cbb545) /* 0.424733421 */, 16 }, /* 2156 */ { MAD_F(0x06ccc8d9) /* 0.424996230 */, 16 }, /* 2157 */ { MAD_F(0x06cddc77) /* 0.425259081 */, 16 }, /* 2158 */ { MAD_F(0x06cef020) /* 0.425521972 */, 16 }, /* 2159 */ { MAD_F(0x06d003d4) /* 0.425784903 */, 16 }, /* 2160 */ { MAD_F(0x06d11794) /* 0.426047876 */, 16 }, /* 2161 */ { MAD_F(0x06d22b5e) /* 0.426310889 */, 16 }, /* 2162 */ { MAD_F(0x06d33f32) /* 0.426573942 */, 16 }, /* 2163 */ { MAD_F(0x06d45312) /* 0.426837036 */, 16 }, /* 2164 */ { MAD_F(0x06d566fd) /* 0.427100170 */, 16 }, /* 2165 */ { MAD_F(0x06d67af2) /* 0.427363345 */, 16 }, /* 2166 */ { MAD_F(0x06d78ef3) /* 0.427626561 */, 16 }, /* 2167 */ { MAD_F(0x06d8a2fe) /* 0.427889817 */, 16 }, /* 2168 */ { MAD_F(0x06d9b714) /* 0.428153114 */, 16 }, /* 2169 */ { MAD_F(0x06dacb35) /* 0.428416451 */, 16 }, /* 2170 */ { MAD_F(0x06dbdf61) /* 0.428679828 */, 16 }, /* 2171 */ { MAD_F(0x06dcf398) /* 0.428943246 */, 16 }, /* 2172 */ { MAD_F(0x06de07d9) /* 0.429206704 */, 16 }, /* 2173 */ { MAD_F(0x06df1c26) /* 0.429470203 */, 16 }, /* 2174 */ { MAD_F(0x06e0307d) /* 0.429733743 */, 16 }, /* 2175 */ { MAD_F(0x06e144df) /* 0.429997322 */, 16 }, /* 2176 */ { MAD_F(0x06e2594c) /* 0.430260942 */, 16 }, /* 2177 */ { MAD_F(0x06e36dc4) /* 0.430524603 */, 16 }, /* 2178 */ { MAD_F(0x06e48246) /* 0.430788304 */, 16 }, /* 2179 */ { MAD_F(0x06e596d4) /* 0.431052045 */, 16 }, /* 2180 */ { MAD_F(0x06e6ab6c) /* 0.431315826 */, 16 }, /* 2181 */ { MAD_F(0x06e7c00f) /* 0.431579648 */, 16 }, /* 2182 */ { MAD_F(0x06e8d4bd) /* 0.431843511 */, 16 }, /* 2183 */ { MAD_F(0x06e9e976) /* 0.432107413 */, 16 }, /* 2184 */ { MAD_F(0x06eafe3a) /* 0.432371356 */, 16 }, /* 2185 */ { MAD_F(0x06ec1308) /* 0.432635339 */, 16 }, /* 2186 */ { MAD_F(0x06ed27e2) /* 0.432899362 */, 16 }, /* 2187 */ { MAD_F(0x06ee3cc6) /* 0.433163426 */, 16 }, /* 2188 */ { MAD_F(0x06ef51b4) /* 0.433427530 */, 16 }, /* 2189 */ { MAD_F(0x06f066ae) /* 0.433691674 */, 16 }, /* 2190 */ { MAD_F(0x06f17bb3) /* 0.433955859 */, 16 }, /* 2191 */ { MAD_F(0x06f290c2) /* 0.434220083 */, 16 }, /* 2192 */ { MAD_F(0x06f3a5dc) /* 0.434484348 */, 16 }, /* 2193 */ { MAD_F(0x06f4bb01) /* 0.434748653 */, 16 }, /* 2194 */ { MAD_F(0x06f5d030) /* 0.435012998 */, 16 }, /* 2195 */ { MAD_F(0x06f6e56b) /* 0.435277383 */, 16 }, /* 2196 */ { MAD_F(0x06f7fab0) /* 0.435541809 */, 16 }, /* 2197 */ { MAD_F(0x06f91000) /* 0.435806274 */, 16 }, /* 2198 */ { MAD_F(0x06fa255a) /* 0.436070780 */, 16 }, /* 2199 */ { MAD_F(0x06fb3ac0) /* 0.436335326 */, 16 }, /* 2200 */ { MAD_F(0x06fc5030) /* 0.436599912 */, 16 }, /* 2201 */ { MAD_F(0x06fd65ab) /* 0.436864538 */, 16 }, /* 2202 */ { MAD_F(0x06fe7b31) /* 0.437129204 */, 16 }, /* 2203 */ { MAD_F(0x06ff90c2) /* 0.437393910 */, 16 }, /* 2204 */ { MAD_F(0x0700a65d) /* 0.437658657 */, 16 }, /* 2205 */ { MAD_F(0x0701bc03) /* 0.437923443 */, 16 }, /* 2206 */ { MAD_F(0x0702d1b4) /* 0.438188269 */, 16 }, /* 2207 */ { MAD_F(0x0703e76f) /* 0.438453136 */, 16 }, /* 2208 */ { MAD_F(0x0704fd35) /* 0.438718042 */, 16 }, /* 2209 */ { MAD_F(0x07061306) /* 0.438982988 */, 16 }, /* 2210 */ { MAD_F(0x070728e2) /* 0.439247975 */, 16 }, /* 2211 */ { MAD_F(0x07083ec9) /* 0.439513001 */, 16 }, /* 2212 */ { MAD_F(0x070954ba) /* 0.439778067 */, 16 }, /* 2213 */ { MAD_F(0x070a6ab6) /* 0.440043173 */, 16 }, /* 2214 */ { MAD_F(0x070b80bc) /* 0.440308320 */, 16 }, /* 2215 */ { MAD_F(0x070c96ce) /* 0.440573506 */, 16 }, /* 2216 */ { MAD_F(0x070dacea) /* 0.440838732 */, 16 }, /* 2217 */ { MAD_F(0x070ec310) /* 0.441103997 */, 16 }, /* 2218 */ { MAD_F(0x070fd942) /* 0.441369303 */, 16 }, /* 2219 */ { MAD_F(0x0710ef7e) /* 0.441634649 */, 16 }, /* 2220 */ { MAD_F(0x071205c5) /* 0.441900034 */, 16 }, /* 2221 */ { MAD_F(0x07131c17) /* 0.442165460 */, 16 }, /* 2222 */ { MAD_F(0x07143273) /* 0.442430925 */, 16 }, /* 2223 */ { MAD_F(0x071548da) /* 0.442696430 */, 16 }, /* 2224 */ { MAD_F(0x07165f4b) /* 0.442961975 */, 16 }, /* 2225 */ { MAD_F(0x071775c8) /* 0.443227559 */, 16 }, /* 2226 */ { MAD_F(0x07188c4f) /* 0.443493184 */, 16 }, /* 2227 */ { MAD_F(0x0719a2e0) /* 0.443758848 */, 16 }, /* 2228 */ { MAD_F(0x071ab97d) /* 0.444024552 */, 16 }, /* 2229 */ { MAD_F(0x071bd024) /* 0.444290296 */, 16 }, /* 2230 */ { MAD_F(0x071ce6d6) /* 0.444556079 */, 16 }, /* 2231 */ { MAD_F(0x071dfd92) /* 0.444821902 */, 16 }, /* 2232 */ { MAD_F(0x071f1459) /* 0.445087765 */, 16 }, /* 2233 */ { MAD_F(0x07202b2b) /* 0.445353668 */, 16 }, /* 2234 */ { MAD_F(0x07214207) /* 0.445619610 */, 16 }, /* 2235 */ { MAD_F(0x072258ee) /* 0.445885592 */, 16 }, /* 2236 */ { MAD_F(0x07236fe0) /* 0.446151614 */, 16 }, /* 2237 */ { MAD_F(0x072486dc) /* 0.446417675 */, 16 }, /* 2238 */ { MAD_F(0x07259de3) /* 0.446683776 */, 16 }, /* 2239 */ { MAD_F(0x0726b4f4) /* 0.446949917 */, 16 }, /* 2240 */ { MAD_F(0x0727cc11) /* 0.447216097 */, 16 }, /* 2241 */ { MAD_F(0x0728e338) /* 0.447482317 */, 16 }, /* 2242 */ { MAD_F(0x0729fa69) /* 0.447748576 */, 16 }, /* 2243 */ { MAD_F(0x072b11a5) /* 0.448014875 */, 16 }, /* 2244 */ { MAD_F(0x072c28ec) /* 0.448281214 */, 16 }, /* 2245 */ { MAD_F(0x072d403d) /* 0.448547592 */, 16 }, /* 2246 */ { MAD_F(0x072e5799) /* 0.448814010 */, 16 }, /* 2247 */ { MAD_F(0x072f6f00) /* 0.449080467 */, 16 }, /* 2248 */ { MAD_F(0x07308671) /* 0.449346964 */, 16 }, /* 2249 */ { MAD_F(0x07319ded) /* 0.449613501 */, 16 }, /* 2250 */ { MAD_F(0x0732b573) /* 0.449880076 */, 16 }, /* 2251 */ { MAD_F(0x0733cd04) /* 0.450146692 */, 16 }, /* 2252 */ { MAD_F(0x0734e4a0) /* 0.450413347 */, 16 }, /* 2253 */ { MAD_F(0x0735fc46) /* 0.450680041 */, 16 }, /* 2254 */ { MAD_F(0x073713f7) /* 0.450946775 */, 16 }, /* 2255 */ { MAD_F(0x07382bb2) /* 0.451213548 */, 16 }, /* 2256 */ { MAD_F(0x07394378) /* 0.451480360 */, 16 }, /* 2257 */ { MAD_F(0x073a5b49) /* 0.451747213 */, 16 }, /* 2258 */ { MAD_F(0x073b7324) /* 0.452014104 */, 16 }, /* 2259 */ { MAD_F(0x073c8b0a) /* 0.452281035 */, 16 }, /* 2260 */ { MAD_F(0x073da2fa) /* 0.452548005 */, 16 }, /* 2261 */ { MAD_F(0x073ebaf5) /* 0.452815015 */, 16 }, /* 2262 */ { MAD_F(0x073fd2fa) /* 0.453082064 */, 16 }, /* 2263 */ { MAD_F(0x0740eb0a) /* 0.453349152 */, 16 }, /* 2264 */ { MAD_F(0x07420325) /* 0.453616280 */, 16 }, /* 2265 */ { MAD_F(0x07431b4a) /* 0.453883447 */, 16 }, /* 2266 */ { MAD_F(0x0744337a) /* 0.454150653 */, 16 }, /* 2267 */ { MAD_F(0x07454bb4) /* 0.454417899 */, 16 }, /* 2268 */ { MAD_F(0x074663f8) /* 0.454685184 */, 16 }, /* 2269 */ { MAD_F(0x07477c48) /* 0.454952508 */, 16 }, /* 2270 */ { MAD_F(0x074894a2) /* 0.455219872 */, 16 }, /* 2271 */ { MAD_F(0x0749ad06) /* 0.455487275 */, 16 }, /* 2272 */ { MAD_F(0x074ac575) /* 0.455754717 */, 16 }, /* 2273 */ { MAD_F(0x074bddee) /* 0.456022198 */, 16 }, /* 2274 */ { MAD_F(0x074cf672) /* 0.456289719 */, 16 }, /* 2275 */ { MAD_F(0x074e0f01) /* 0.456557278 */, 16 }, /* 2276 */ { MAD_F(0x074f279a) /* 0.456824877 */, 16 }, /* 2277 */ { MAD_F(0x0750403e) /* 0.457092516 */, 16 }, /* 2278 */ { MAD_F(0x075158ec) /* 0.457360193 */, 16 }, /* 2279 */ { MAD_F(0x075271a4) /* 0.457627909 */, 16 }, /* 2280 */ { MAD_F(0x07538a67) /* 0.457895665 */, 16 }, /* 2281 */ { MAD_F(0x0754a335) /* 0.458163460 */, 16 }, /* 2282 */ { MAD_F(0x0755bc0d) /* 0.458431294 */, 16 }, /* 2283 */ { MAD_F(0x0756d4f0) /* 0.458699167 */, 16 }, /* 2284 */ { MAD_F(0x0757eddd) /* 0.458967079 */, 16 }, /* 2285 */ { MAD_F(0x075906d5) /* 0.459235030 */, 16 }, /* 2286 */ { MAD_F(0x075a1fd7) /* 0.459503021 */, 16 }, /* 2287 */ { MAD_F(0x075b38e3) /* 0.459771050 */, 16 }, /* 2288 */ { MAD_F(0x075c51fa) /* 0.460039119 */, 16 }, /* 2289 */ { MAD_F(0x075d6b1c) /* 0.460307226 */, 16 }, /* 2290 */ { MAD_F(0x075e8448) /* 0.460575373 */, 16 }, /* 2291 */ { MAD_F(0x075f9d7f) /* 0.460843559 */, 16 }, /* 2292 */ { MAD_F(0x0760b6c0) /* 0.461111783 */, 16 }, /* 2293 */ { MAD_F(0x0761d00b) /* 0.461380047 */, 16 }, /* 2294 */ { MAD_F(0x0762e961) /* 0.461648350 */, 16 }, /* 2295 */ { MAD_F(0x076402c1) /* 0.461916691 */, 16 }, /* 2296 */ { MAD_F(0x07651c2c) /* 0.462185072 */, 16 }, /* 2297 */ { MAD_F(0x076635a2) /* 0.462453492 */, 16 }, /* 2298 */ { MAD_F(0x07674f22) /* 0.462721950 */, 16 }, /* 2299 */ { MAD_F(0x076868ac) /* 0.462990448 */, 16 }, /* 2300 */ { MAD_F(0x07698240) /* 0.463258984 */, 16 }, /* 2301 */ { MAD_F(0x076a9be0) /* 0.463527560 */, 16 }, /* 2302 */ { MAD_F(0x076bb589) /* 0.463796174 */, 16 }, /* 2303 */ { MAD_F(0x076ccf3d) /* 0.464064827 */, 16 }, /* 2304 */ { MAD_F(0x076de8fc) /* 0.464333519 */, 16 }, /* 2305 */ { MAD_F(0x076f02c5) /* 0.464602250 */, 16 }, /* 2306 */ { MAD_F(0x07701c98) /* 0.464871020 */, 16 }, /* 2307 */ { MAD_F(0x07713676) /* 0.465139829 */, 16 }, /* 2308 */ { MAD_F(0x0772505e) /* 0.465408676 */, 16 }, /* 2309 */ { MAD_F(0x07736a51) /* 0.465677563 */, 16 }, /* 2310 */ { MAD_F(0x0774844e) /* 0.465946488 */, 16 }, /* 2311 */ { MAD_F(0x07759e55) /* 0.466215452 */, 16 }, /* 2312 */ { MAD_F(0x0776b867) /* 0.466484455 */, 16 }, /* 2313 */ { MAD_F(0x0777d283) /* 0.466753496 */, 16 }, /* 2314 */ { MAD_F(0x0778ecaa) /* 0.467022577 */, 16 }, /* 2315 */ { MAD_F(0x077a06db) /* 0.467291696 */, 16 }, /* 2316 */ { MAD_F(0x077b2117) /* 0.467560854 */, 16 }, /* 2317 */ { MAD_F(0x077c3b5d) /* 0.467830050 */, 16 }, /* 2318 */ { MAD_F(0x077d55ad) /* 0.468099285 */, 16 }, /* 2319 */ { MAD_F(0x077e7008) /* 0.468368560 */, 16 }, /* 2320 */ { MAD_F(0x077f8a6d) /* 0.468637872 */, 16 }, /* 2321 */ { MAD_F(0x0780a4dc) /* 0.468907224 */, 16 }, /* 2322 */ { MAD_F(0x0781bf56) /* 0.469176614 */, 16 }, /* 2323 */ { MAD_F(0x0782d9da) /* 0.469446043 */, 16 }, /* 2324 */ { MAD_F(0x0783f469) /* 0.469715510 */, 16 }, /* 2325 */ { MAD_F(0x07850f02) /* 0.469985016 */, 16 }, /* 2326 */ { MAD_F(0x078629a5) /* 0.470254561 */, 16 }, /* 2327 */ { MAD_F(0x07874453) /* 0.470524145 */, 16 }, /* 2328 */ { MAD_F(0x07885f0b) /* 0.470793767 */, 16 }, /* 2329 */ { MAD_F(0x078979ce) /* 0.471063427 */, 16 }, /* 2330 */ { MAD_F(0x078a949a) /* 0.471333126 */, 16 }, /* 2331 */ { MAD_F(0x078baf72) /* 0.471602864 */, 16 }, /* 2332 */ { MAD_F(0x078cca53) /* 0.471872641 */, 16 }, /* 2333 */ { MAD_F(0x078de53f) /* 0.472142456 */, 16 }, /* 2334 */ { MAD_F(0x078f0035) /* 0.472412309 */, 16 }, /* 2335 */ { MAD_F(0x07901b36) /* 0.472682201 */, 16 }, /* 2336 */ { MAD_F(0x07913641) /* 0.472952132 */, 16 }, /* 2337 */ { MAD_F(0x07925156) /* 0.473222101 */, 16 }, /* 2338 */ { MAD_F(0x07936c76) /* 0.473492108 */, 16 }, /* 2339 */ { MAD_F(0x079487a0) /* 0.473762155 */, 16 }, /* 2340 */ { MAD_F(0x0795a2d4) /* 0.474032239 */, 16 }, /* 2341 */ { MAD_F(0x0796be13) /* 0.474302362 */, 16 }, /* 2342 */ { MAD_F(0x0797d95c) /* 0.474572524 */, 16 }, /* 2343 */ { MAD_F(0x0798f4af) /* 0.474842724 */, 16 }, /* 2344 */ { MAD_F(0x079a100c) /* 0.475112962 */, 16 }, /* 2345 */ { MAD_F(0x079b2b74) /* 0.475383239 */, 16 }, /* 2346 */ { MAD_F(0x079c46e7) /* 0.475653554 */, 16 }, /* 2347 */ { MAD_F(0x079d6263) /* 0.475923908 */, 16 }, /* 2348 */ { MAD_F(0x079e7dea) /* 0.476194300 */, 16 }, /* 2349 */ { MAD_F(0x079f997b) /* 0.476464731 */, 16 }, /* 2350 */ { MAD_F(0x07a0b516) /* 0.476735200 */, 16 }, /* 2351 */ { MAD_F(0x07a1d0bc) /* 0.477005707 */, 16 }, /* 2352 */ { MAD_F(0x07a2ec6c) /* 0.477276252 */, 16 }, /* 2353 */ { MAD_F(0x07a40827) /* 0.477546836 */, 16 }, /* 2354 */ { MAD_F(0x07a523eb) /* 0.477817459 */, 16 }, /* 2355 */ { MAD_F(0x07a63fba) /* 0.478088119 */, 16 }, /* 2356 */ { MAD_F(0x07a75b93) /* 0.478358818 */, 16 }, /* 2357 */ { MAD_F(0x07a87777) /* 0.478629555 */, 16 }, /* 2358 */ { MAD_F(0x07a99364) /* 0.478900331 */, 16 }, /* 2359 */ { MAD_F(0x07aaaf5c) /* 0.479171145 */, 16 }, /* 2360 */ { MAD_F(0x07abcb5f) /* 0.479441997 */, 16 }, /* 2361 */ { MAD_F(0x07ace76b) /* 0.479712887 */, 16 }, /* 2362 */ { MAD_F(0x07ae0382) /* 0.479983816 */, 16 }, /* 2363 */ { MAD_F(0x07af1fa3) /* 0.480254782 */, 16 }, /* 2364 */ { MAD_F(0x07b03bcf) /* 0.480525787 */, 16 }, /* 2365 */ { MAD_F(0x07b15804) /* 0.480796831 */, 16 }, /* 2366 */ { MAD_F(0x07b27444) /* 0.481067912 */, 16 }, /* 2367 */ { MAD_F(0x07b3908e) /* 0.481339032 */, 16 }, /* 2368 */ { MAD_F(0x07b4ace3) /* 0.481610189 */, 16 }, /* 2369 */ { MAD_F(0x07b5c941) /* 0.481881385 */, 16 }, /* 2370 */ { MAD_F(0x07b6e5aa) /* 0.482152620 */, 16 }, /* 2371 */ { MAD_F(0x07b8021d) /* 0.482423892 */, 16 }, /* 2372 */ { MAD_F(0x07b91e9b) /* 0.482695202 */, 16 }, /* 2373 */ { MAD_F(0x07ba3b22) /* 0.482966551 */, 16 }, /* 2374 */ { MAD_F(0x07bb57b4) /* 0.483237938 */, 16 }, /* 2375 */ { MAD_F(0x07bc7450) /* 0.483509362 */, 16 }, /* 2376 */ { MAD_F(0x07bd90f6) /* 0.483780825 */, 16 }, /* 2377 */ { MAD_F(0x07beada7) /* 0.484052326 */, 16 }, /* 2378 */ { MAD_F(0x07bfca61) /* 0.484323865 */, 16 }, /* 2379 */ { MAD_F(0x07c0e726) /* 0.484595443 */, 16 }, /* 2380 */ { MAD_F(0x07c203f5) /* 0.484867058 */, 16 }, /* 2381 */ { MAD_F(0x07c320cf) /* 0.485138711 */, 16 }, /* 2382 */ { MAD_F(0x07c43db2) /* 0.485410402 */, 16 }, /* 2383 */ { MAD_F(0x07c55aa0) /* 0.485682131 */, 16 }, /* 2384 */ { MAD_F(0x07c67798) /* 0.485953899 */, 16 }, /* 2385 */ { MAD_F(0x07c7949a) /* 0.486225704 */, 16 }, /* 2386 */ { MAD_F(0x07c8b1a7) /* 0.486497547 */, 16 }, /* 2387 */ { MAD_F(0x07c9cebd) /* 0.486769429 */, 16 }, /* 2388 */ { MAD_F(0x07caebde) /* 0.487041348 */, 16 }, /* 2389 */ { MAD_F(0x07cc0909) /* 0.487313305 */, 16 }, /* 2390 */ { MAD_F(0x07cd263e) /* 0.487585300 */, 16 }, /* 2391 */ { MAD_F(0x07ce437d) /* 0.487857333 */, 16 }, /* 2392 */ { MAD_F(0x07cf60c7) /* 0.488129404 */, 16 }, /* 2393 */ { MAD_F(0x07d07e1b) /* 0.488401513 */, 16 }, /* 2394 */ { MAD_F(0x07d19b79) /* 0.488673660 */, 16 }, /* 2395 */ { MAD_F(0x07d2b8e1) /* 0.488945845 */, 16 }, /* 2396 */ { MAD_F(0x07d3d653) /* 0.489218067 */, 16 }, /* 2397 */ { MAD_F(0x07d4f3cf) /* 0.489490328 */, 16 }, /* 2398 */ { MAD_F(0x07d61156) /* 0.489762626 */, 16 }, /* 2399 */ { MAD_F(0x07d72ee6) /* 0.490034962 */, 16 }, /* 2400 */ { MAD_F(0x07d84c81) /* 0.490307336 */, 16 }, /* 2401 */ { MAD_F(0x07d96a26) /* 0.490579748 */, 16 }, /* 2402 */ { MAD_F(0x07da87d5) /* 0.490852198 */, 16 }, /* 2403 */ { MAD_F(0x07dba58f) /* 0.491124686 */, 16 }, /* 2404 */ { MAD_F(0x07dcc352) /* 0.491397211 */, 16 }, /* 2405 */ { MAD_F(0x07dde120) /* 0.491669774 */, 16 }, /* 2406 */ { MAD_F(0x07defef7) /* 0.491942375 */, 16 }, /* 2407 */ { MAD_F(0x07e01cd9) /* 0.492215014 */, 16 }, /* 2408 */ { MAD_F(0x07e13ac5) /* 0.492487690 */, 16 }, /* 2409 */ { MAD_F(0x07e258bc) /* 0.492760404 */, 16 }, /* 2410 */ { MAD_F(0x07e376bc) /* 0.493033156 */, 16 }, /* 2411 */ { MAD_F(0x07e494c6) /* 0.493305946 */, 16 }, /* 2412 */ { MAD_F(0x07e5b2db) /* 0.493578773 */, 16 }, /* 2413 */ { MAD_F(0x07e6d0f9) /* 0.493851638 */, 16 }, /* 2414 */ { MAD_F(0x07e7ef22) /* 0.494124541 */, 16 }, /* 2415 */ { MAD_F(0x07e90d55) /* 0.494397481 */, 16 }, /* 2416 */ { MAD_F(0x07ea2b92) /* 0.494670459 */, 16 }, /* 2417 */ { MAD_F(0x07eb49d9) /* 0.494943475 */, 16 }, /* 2418 */ { MAD_F(0x07ec682a) /* 0.495216529 */, 16 }, /* 2419 */ { MAD_F(0x07ed8686) /* 0.495489620 */, 16 }, /* 2420 */ { MAD_F(0x07eea4eb) /* 0.495762748 */, 16 }, /* 2421 */ { MAD_F(0x07efc35b) /* 0.496035915 */, 16 }, /* 2422 */ { MAD_F(0x07f0e1d4) /* 0.496309119 */, 16 }, /* 2423 */ { MAD_F(0x07f20058) /* 0.496582360 */, 16 }, /* 2424 */ { MAD_F(0x07f31ee6) /* 0.496855639 */, 16 }, /* 2425 */ { MAD_F(0x07f43d7e) /* 0.497128956 */, 16 }, /* 2426 */ { MAD_F(0x07f55c20) /* 0.497402310 */, 16 }, /* 2427 */ { MAD_F(0x07f67acc) /* 0.497675702 */, 16 }, /* 2428 */ { MAD_F(0x07f79982) /* 0.497949132 */, 16 }, /* 2429 */ { MAD_F(0x07f8b842) /* 0.498222598 */, 16 }, /* 2430 */ { MAD_F(0x07f9d70c) /* 0.498496103 */, 16 }, /* 2431 */ { MAD_F(0x07faf5e1) /* 0.498769645 */, 16 }, /* 2432 */ { MAD_F(0x07fc14bf) /* 0.499043224 */, 16 }, /* 2433 */ { MAD_F(0x07fd33a8) /* 0.499316841 */, 16 }, /* 2434 */ { MAD_F(0x07fe529a) /* 0.499590496 */, 16 }, /* 2435 */ { MAD_F(0x07ff7197) /* 0.499864188 */, 16 }, /* 2436 */ { MAD_F(0x0400484f) /* 0.250068959 */, 17 }, /* 2437 */ { MAD_F(0x0400d7d7) /* 0.250205842 */, 17 }, /* 2438 */ { MAD_F(0x04016764) /* 0.250342744 */, 17 }, /* 2439 */ { MAD_F(0x0401f6f7) /* 0.250479665 */, 17 }, /* 2440 */ { MAD_F(0x0402868e) /* 0.250616605 */, 17 }, /* 2441 */ { MAD_F(0x0403162b) /* 0.250753563 */, 17 }, /* 2442 */ { MAD_F(0x0403a5cc) /* 0.250890540 */, 17 }, /* 2443 */ { MAD_F(0x04043573) /* 0.251027536 */, 17 }, /* 2444 */ { MAD_F(0x0404c51e) /* 0.251164550 */, 17 }, /* 2445 */ { MAD_F(0x040554cf) /* 0.251301583 */, 17 }, /* 2446 */ { MAD_F(0x0405e484) /* 0.251438635 */, 17 }, /* 2447 */ { MAD_F(0x0406743f) /* 0.251575706 */, 17 }, /* 2448 */ { MAD_F(0x040703ff) /* 0.251712795 */, 17 }, /* 2449 */ { MAD_F(0x040793c3) /* 0.251849903 */, 17 }, /* 2450 */ { MAD_F(0x0408238d) /* 0.251987029 */, 17 }, /* 2451 */ { MAD_F(0x0408b35b) /* 0.252124174 */, 17 }, /* 2452 */ { MAD_F(0x0409432f) /* 0.252261338 */, 17 }, /* 2453 */ { MAD_F(0x0409d308) /* 0.252398520 */, 17 }, /* 2454 */ { MAD_F(0x040a62e5) /* 0.252535721 */, 17 }, /* 2455 */ { MAD_F(0x040af2c8) /* 0.252672941 */, 17 }, /* 2456 */ { MAD_F(0x040b82b0) /* 0.252810180 */, 17 }, /* 2457 */ { MAD_F(0x040c129c) /* 0.252947436 */, 17 }, /* 2458 */ { MAD_F(0x040ca28e) /* 0.253084712 */, 17 }, /* 2459 */ { MAD_F(0x040d3284) /* 0.253222006 */, 17 }, /* 2460 */ { MAD_F(0x040dc280) /* 0.253359319 */, 17 }, /* 2461 */ { MAD_F(0x040e5281) /* 0.253496651 */, 17 }, /* 2462 */ { MAD_F(0x040ee286) /* 0.253634001 */, 17 }, /* 2463 */ { MAD_F(0x040f7291) /* 0.253771369 */, 17 }, /* 2464 */ { MAD_F(0x041002a1) /* 0.253908756 */, 17 }, /* 2465 */ { MAD_F(0x041092b5) /* 0.254046162 */, 17 }, /* 2466 */ { MAD_F(0x041122cf) /* 0.254183587 */, 17 }, /* 2467 */ { MAD_F(0x0411b2ed) /* 0.254321030 */, 17 }, /* 2468 */ { MAD_F(0x04124311) /* 0.254458491 */, 17 }, /* 2469 */ { MAD_F(0x0412d339) /* 0.254595971 */, 17 }, /* 2470 */ { MAD_F(0x04136367) /* 0.254733470 */, 17 }, /* 2471 */ { MAD_F(0x0413f399) /* 0.254870987 */, 17 }, /* 2472 */ { MAD_F(0x041483d1) /* 0.255008523 */, 17 }, /* 2473 */ { MAD_F(0x0415140d) /* 0.255146077 */, 17 }, /* 2474 */ { MAD_F(0x0415a44f) /* 0.255283650 */, 17 }, /* 2475 */ { MAD_F(0x04163495) /* 0.255421241 */, 17 }, /* 2476 */ { MAD_F(0x0416c4e1) /* 0.255558851 */, 17 }, /* 2477 */ { MAD_F(0x04175531) /* 0.255696480 */, 17 }, /* 2478 */ { MAD_F(0x0417e586) /* 0.255834127 */, 17 }, /* 2479 */ { MAD_F(0x041875e1) /* 0.255971792 */, 17 }, /* 2480 */ { MAD_F(0x04190640) /* 0.256109476 */, 17 }, /* 2481 */ { MAD_F(0x041996a4) /* 0.256247179 */, 17 }, /* 2482 */ { MAD_F(0x041a270d) /* 0.256384900 */, 17 }, /* 2483 */ { MAD_F(0x041ab77b) /* 0.256522639 */, 17 }, /* 2484 */ { MAD_F(0x041b47ef) /* 0.256660397 */, 17 }, /* 2485 */ { MAD_F(0x041bd867) /* 0.256798174 */, 17 }, /* 2486 */ { MAD_F(0x041c68e4) /* 0.256935969 */, 17 }, /* 2487 */ { MAD_F(0x041cf966) /* 0.257073782 */, 17 }, /* 2488 */ { MAD_F(0x041d89ed) /* 0.257211614 */, 17 }, /* 2489 */ { MAD_F(0x041e1a79) /* 0.257349465 */, 17 }, /* 2490 */ { MAD_F(0x041eab0a) /* 0.257487334 */, 17 }, /* 2491 */ { MAD_F(0x041f3b9f) /* 0.257625221 */, 17 }, /* 2492 */ { MAD_F(0x041fcc3a) /* 0.257763127 */, 17 }, /* 2493 */ { MAD_F(0x04205cda) /* 0.257901051 */, 17 }, /* 2494 */ { MAD_F(0x0420ed7f) /* 0.258038994 */, 17 }, /* 2495 */ { MAD_F(0x04217e28) /* 0.258176955 */, 17 }, /* 2496 */ { MAD_F(0x04220ed7) /* 0.258314934 */, 17 }, /* 2497 */ { MAD_F(0x04229f8a) /* 0.258452932 */, 17 }, /* 2498 */ { MAD_F(0x04233043) /* 0.258590948 */, 17 }, /* 2499 */ { MAD_F(0x0423c100) /* 0.258728983 */, 17 }, /* 2500 */ { MAD_F(0x042451c3) /* 0.258867036 */, 17 }, /* 2501 */ { MAD_F(0x0424e28a) /* 0.259005108 */, 17 }, /* 2502 */ { MAD_F(0x04257356) /* 0.259143198 */, 17 }, /* 2503 */ { MAD_F(0x04260428) /* 0.259281307 */, 17 }, /* 2504 */ { MAD_F(0x042694fe) /* 0.259419433 */, 17 }, /* 2505 */ { MAD_F(0x042725d9) /* 0.259557579 */, 17 }, /* 2506 */ { MAD_F(0x0427b6b9) /* 0.259695742 */, 17 }, /* 2507 */ { MAD_F(0x0428479e) /* 0.259833924 */, 17 }, /* 2508 */ { MAD_F(0x0428d888) /* 0.259972124 */, 17 }, /* 2509 */ { MAD_F(0x04296976) /* 0.260110343 */, 17 }, /* 2510 */ { MAD_F(0x0429fa6a) /* 0.260248580 */, 17 }, /* 2511 */ { MAD_F(0x042a8b63) /* 0.260386836 */, 17 }, /* 2512 */ { MAD_F(0x042b1c60) /* 0.260525110 */, 17 }, /* 2513 */ { MAD_F(0x042bad63) /* 0.260663402 */, 17 }, /* 2514 */ { MAD_F(0x042c3e6a) /* 0.260801712 */, 17 }, /* 2515 */ { MAD_F(0x042ccf77) /* 0.260940041 */, 17 }, /* 2516 */ { MAD_F(0x042d6088) /* 0.261078388 */, 17 }, /* 2517 */ { MAD_F(0x042df19e) /* 0.261216754 */, 17 }, /* 2518 */ { MAD_F(0x042e82b9) /* 0.261355137 */, 17 }, /* 2519 */ { MAD_F(0x042f13d9) /* 0.261493540 */, 17 }, /* 2520 */ { MAD_F(0x042fa4fe) /* 0.261631960 */, 17 }, /* 2521 */ { MAD_F(0x04303628) /* 0.261770399 */, 17 }, /* 2522 */ { MAD_F(0x0430c757) /* 0.261908856 */, 17 }, /* 2523 */ { MAD_F(0x0431588b) /* 0.262047331 */, 17 }, /* 2524 */ { MAD_F(0x0431e9c3) /* 0.262185825 */, 17 }, /* 2525 */ { MAD_F(0x04327b01) /* 0.262324337 */, 17 }, /* 2526 */ { MAD_F(0x04330c43) /* 0.262462867 */, 17 }, /* 2527 */ { MAD_F(0x04339d8a) /* 0.262601416 */, 17 }, /* 2528 */ { MAD_F(0x04342ed7) /* 0.262739982 */, 17 }, /* 2529 */ { MAD_F(0x0434c028) /* 0.262878568 */, 17 }, /* 2530 */ { MAD_F(0x0435517e) /* 0.263017171 */, 17 }, /* 2531 */ { MAD_F(0x0435e2d9) /* 0.263155792 */, 17 }, /* 2532 */ { MAD_F(0x04367439) /* 0.263294432 */, 17 }, /* 2533 */ { MAD_F(0x0437059e) /* 0.263433090 */, 17 }, /* 2534 */ { MAD_F(0x04379707) /* 0.263571767 */, 17 }, /* 2535 */ { MAD_F(0x04382876) /* 0.263710461 */, 17 }, /* 2536 */ { MAD_F(0x0438b9e9) /* 0.263849174 */, 17 }, /* 2537 */ { MAD_F(0x04394b61) /* 0.263987905 */, 17 }, /* 2538 */ { MAD_F(0x0439dcdf) /* 0.264126655 */, 17 }, /* 2539 */ { MAD_F(0x043a6e61) /* 0.264265422 */, 17 }, /* 2540 */ { MAD_F(0x043affe8) /* 0.264404208 */, 17 }, /* 2541 */ { MAD_F(0x043b9174) /* 0.264543012 */, 17 }, /* 2542 */ { MAD_F(0x043c2305) /* 0.264681834 */, 17 }, /* 2543 */ { MAD_F(0x043cb49a) /* 0.264820674 */, 17 }, /* 2544 */ { MAD_F(0x043d4635) /* 0.264959533 */, 17 }, /* 2545 */ { MAD_F(0x043dd7d4) /* 0.265098410 */, 17 }, /* 2546 */ { MAD_F(0x043e6979) /* 0.265237305 */, 17 }, /* 2547 */ { MAD_F(0x043efb22) /* 0.265376218 */, 17 }, /* 2548 */ { MAD_F(0x043f8cd0) /* 0.265515149 */, 17 }, /* 2549 */ { MAD_F(0x04401e83) /* 0.265654099 */, 17 }, /* 2550 */ { MAD_F(0x0440b03b) /* 0.265793066 */, 17 }, /* 2551 */ { MAD_F(0x044141f7) /* 0.265932052 */, 17 }, /* 2552 */ { MAD_F(0x0441d3b9) /* 0.266071056 */, 17 }, /* 2553 */ { MAD_F(0x04426580) /* 0.266210078 */, 17 }, /* 2554 */ { MAD_F(0x0442f74b) /* 0.266349119 */, 17 }, /* 2555 */ { MAD_F(0x0443891b) /* 0.266488177 */, 17 }, /* 2556 */ { MAD_F(0x04441af0) /* 0.266627254 */, 17 }, /* 2557 */ { MAD_F(0x0444acca) /* 0.266766349 */, 17 }, /* 2558 */ { MAD_F(0x04453ea9) /* 0.266905462 */, 17 }, /* 2559 */ { MAD_F(0x0445d08d) /* 0.267044593 */, 17 }, /* 2560 */ { MAD_F(0x04466275) /* 0.267183742 */, 17 }, /* 2561 */ { MAD_F(0x0446f463) /* 0.267322909 */, 17 }, /* 2562 */ { MAD_F(0x04478655) /* 0.267462094 */, 17 }, /* 2563 */ { MAD_F(0x0448184c) /* 0.267601298 */, 17 }, /* 2564 */ { MAD_F(0x0448aa48) /* 0.267740519 */, 17 }, /* 2565 */ { MAD_F(0x04493c49) /* 0.267879759 */, 17 }, /* 2566 */ { MAD_F(0x0449ce4f) /* 0.268019017 */, 17 }, /* 2567 */ { MAD_F(0x044a6059) /* 0.268158293 */, 17 }, /* 2568 */ { MAD_F(0x044af269) /* 0.268297587 */, 17 }, /* 2569 */ { MAD_F(0x044b847d) /* 0.268436899 */, 17 }, /* 2570 */ { MAD_F(0x044c1696) /* 0.268576229 */, 17 }, /* 2571 */ { MAD_F(0x044ca8b4) /* 0.268715577 */, 17 }, /* 2572 */ { MAD_F(0x044d3ad7) /* 0.268854943 */, 17 }, /* 2573 */ { MAD_F(0x044dccff) /* 0.268994328 */, 17 }, /* 2574 */ { MAD_F(0x044e5f2b) /* 0.269133730 */, 17 }, /* 2575 */ { MAD_F(0x044ef15d) /* 0.269273150 */, 17 }, /* 2576 */ { MAD_F(0x044f8393) /* 0.269412589 */, 17 }, /* 2577 */ { MAD_F(0x045015ce) /* 0.269552045 */, 17 }, /* 2578 */ { MAD_F(0x0450a80e) /* 0.269691520 */, 17 }, /* 2579 */ { MAD_F(0x04513a53) /* 0.269831013 */, 17 }, /* 2580 */ { MAD_F(0x0451cc9c) /* 0.269970523 */, 17 }, /* 2581 */ { MAD_F(0x04525eeb) /* 0.270110052 */, 17 }, /* 2582 */ { MAD_F(0x0452f13e) /* 0.270249599 */, 17 }, /* 2583 */ { MAD_F(0x04538396) /* 0.270389163 */, 17 }, /* 2584 */ { MAD_F(0x045415f3) /* 0.270528746 */, 17 }, /* 2585 */ { MAD_F(0x0454a855) /* 0.270668347 */, 17 }, /* 2586 */ { MAD_F(0x04553abb) /* 0.270807965 */, 17 }, /* 2587 */ { MAD_F(0x0455cd27) /* 0.270947602 */, 17 }, /* 2588 */ { MAD_F(0x04565f97) /* 0.271087257 */, 17 }, /* 2589 */ { MAD_F(0x0456f20c) /* 0.271226930 */, 17 }, /* 2590 */ { MAD_F(0x04578486) /* 0.271366620 */, 17 }, /* 2591 */ { MAD_F(0x04581705) /* 0.271506329 */, 17 }, /* 2592 */ { MAD_F(0x0458a989) /* 0.271646056 */, 17 }, /* 2593 */ { MAD_F(0x04593c11) /* 0.271785800 */, 17 }, /* 2594 */ { MAD_F(0x0459ce9e) /* 0.271925563 */, 17 }, /* 2595 */ { MAD_F(0x045a6130) /* 0.272065343 */, 17 }, /* 2596 */ { MAD_F(0x045af3c7) /* 0.272205142 */, 17 }, /* 2597 */ { MAD_F(0x045b8663) /* 0.272344958 */, 17 }, /* 2598 */ { MAD_F(0x045c1903) /* 0.272484793 */, 17 }, /* 2599 */ { MAD_F(0x045caba9) /* 0.272624645 */, 17 }, /* 2600 */ { MAD_F(0x045d3e53) /* 0.272764515 */, 17 }, /* 2601 */ { MAD_F(0x045dd102) /* 0.272904403 */, 17 }, /* 2602 */ { MAD_F(0x045e63b6) /* 0.273044310 */, 17 }, /* 2603 */ { MAD_F(0x045ef66e) /* 0.273184234 */, 17 }, /* 2604 */ { MAD_F(0x045f892b) /* 0.273324176 */, 17 }, /* 2605 */ { MAD_F(0x04601bee) /* 0.273464136 */, 17 }, /* 2606 */ { MAD_F(0x0460aeb5) /* 0.273604113 */, 17 }, /* 2607 */ { MAD_F(0x04614180) /* 0.273744109 */, 17 }, /* 2608 */ { MAD_F(0x0461d451) /* 0.273884123 */, 17 }, /* 2609 */ { MAD_F(0x04626727) /* 0.274024154 */, 17 }, /* 2610 */ { MAD_F(0x0462fa01) /* 0.274164204 */, 17 }, /* 2611 */ { MAD_F(0x04638ce0) /* 0.274304271 */, 17 }, /* 2612 */ { MAD_F(0x04641fc4) /* 0.274444356 */, 17 }, /* 2613 */ { MAD_F(0x0464b2ac) /* 0.274584459 */, 17 }, /* 2614 */ { MAD_F(0x0465459a) /* 0.274724580 */, 17 }, /* 2615 */ { MAD_F(0x0465d88c) /* 0.274864719 */, 17 }, /* 2616 */ { MAD_F(0x04666b83) /* 0.275004875 */, 17 }, /* 2617 */ { MAD_F(0x0466fe7f) /* 0.275145050 */, 17 }, /* 2618 */ { MAD_F(0x0467917f) /* 0.275285242 */, 17 }, /* 2619 */ { MAD_F(0x04682485) /* 0.275425452 */, 17 }, /* 2620 */ { MAD_F(0x0468b78f) /* 0.275565681 */, 17 }, /* 2621 */ { MAD_F(0x04694a9e) /* 0.275705926 */, 17 }, /* 2622 */ { MAD_F(0x0469ddb2) /* 0.275846190 */, 17 }, /* 2623 */ { MAD_F(0x046a70ca) /* 0.275986472 */, 17 }, /* 2624 */ { MAD_F(0x046b03e7) /* 0.276126771 */, 17 }, /* 2625 */ { MAD_F(0x046b970a) /* 0.276267088 */, 17 }, /* 2626 */ { MAD_F(0x046c2a31) /* 0.276407423 */, 17 }, /* 2627 */ { MAD_F(0x046cbd5c) /* 0.276547776 */, 17 }, /* 2628 */ { MAD_F(0x046d508d) /* 0.276688147 */, 17 }, /* 2629 */ { MAD_F(0x046de3c2) /* 0.276828535 */, 17 }, /* 2630 */ { MAD_F(0x046e76fc) /* 0.276968942 */, 17 }, /* 2631 */ { MAD_F(0x046f0a3b) /* 0.277109366 */, 17 }, /* 2632 */ { MAD_F(0x046f9d7e) /* 0.277249808 */, 17 }, /* 2633 */ { MAD_F(0x047030c7) /* 0.277390267 */, 17 }, /* 2634 */ { MAD_F(0x0470c414) /* 0.277530745 */, 17 }, /* 2635 */ { MAD_F(0x04715766) /* 0.277671240 */, 17 }, /* 2636 */ { MAD_F(0x0471eabc) /* 0.277811753 */, 17 }, /* 2637 */ { MAD_F(0x04727e18) /* 0.277952284 */, 17 }, /* 2638 */ { MAD_F(0x04731178) /* 0.278092832 */, 17 }, /* 2639 */ { MAD_F(0x0473a4dd) /* 0.278233399 */, 17 }, /* 2640 */ { MAD_F(0x04743847) /* 0.278373983 */, 17 }, /* 2641 */ { MAD_F(0x0474cbb5) /* 0.278514584 */, 17 }, /* 2642 */ { MAD_F(0x04755f29) /* 0.278655204 */, 17 }, /* 2643 */ { MAD_F(0x0475f2a1) /* 0.278795841 */, 17 }, /* 2644 */ { MAD_F(0x0476861d) /* 0.278936496 */, 17 }, /* 2645 */ { MAD_F(0x0477199f) /* 0.279077169 */, 17 }, /* 2646 */ { MAD_F(0x0477ad25) /* 0.279217860 */, 17 }, /* 2647 */ { MAD_F(0x047840b0) /* 0.279358568 */, 17 }, /* 2648 */ { MAD_F(0x0478d440) /* 0.279499294 */, 17 }, /* 2649 */ { MAD_F(0x047967d5) /* 0.279640037 */, 17 }, /* 2650 */ { MAD_F(0x0479fb6e) /* 0.279780799 */, 17 }, /* 2651 */ { MAD_F(0x047a8f0c) /* 0.279921578 */, 17 }, /* 2652 */ { MAD_F(0x047b22af) /* 0.280062375 */, 17 }, /* 2653 */ { MAD_F(0x047bb657) /* 0.280203189 */, 17 }, /* 2654 */ { MAD_F(0x047c4a03) /* 0.280344021 */, 17 }, /* 2655 */ { MAD_F(0x047cddb4) /* 0.280484871 */, 17 }, /* 2656 */ { MAD_F(0x047d716a) /* 0.280625739 */, 17 }, /* 2657 */ { MAD_F(0x047e0524) /* 0.280766624 */, 17 }, /* 2658 */ { MAD_F(0x047e98e4) /* 0.280907527 */, 17 }, /* 2659 */ { MAD_F(0x047f2ca8) /* 0.281048447 */, 17 }, /* 2660 */ { MAD_F(0x047fc071) /* 0.281189385 */, 17 }, /* 2661 */ { MAD_F(0x0480543e) /* 0.281330341 */, 17 }, /* 2662 */ { MAD_F(0x0480e811) /* 0.281471315 */, 17 }, /* 2663 */ { MAD_F(0x04817be8) /* 0.281612306 */, 17 }, /* 2664 */ { MAD_F(0x04820fc3) /* 0.281753315 */, 17 }, /* 2665 */ { MAD_F(0x0482a3a4) /* 0.281894341 */, 17 }, /* 2666 */ { MAD_F(0x04833789) /* 0.282035386 */, 17 }, /* 2667 */ { MAD_F(0x0483cb73) /* 0.282176447 */, 17 }, /* 2668 */ { MAD_F(0x04845f62) /* 0.282317527 */, 17 }, /* 2669 */ { MAD_F(0x0484f355) /* 0.282458624 */, 17 }, /* 2670 */ { MAD_F(0x0485874d) /* 0.282599738 */, 17 }, /* 2671 */ { MAD_F(0x04861b4a) /* 0.282740871 */, 17 }, /* 2672 */ { MAD_F(0x0486af4c) /* 0.282882021 */, 17 }, /* 2673 */ { MAD_F(0x04874352) /* 0.283023188 */, 17 }, /* 2674 */ { MAD_F(0x0487d75d) /* 0.283164373 */, 17 }, /* 2675 */ { MAD_F(0x04886b6d) /* 0.283305576 */, 17 }, /* 2676 */ { MAD_F(0x0488ff82) /* 0.283446796 */, 17 }, /* 2677 */ { MAD_F(0x0489939b) /* 0.283588034 */, 17 }, /* 2678 */ { MAD_F(0x048a27b9) /* 0.283729290 */, 17 }, /* 2679 */ { MAD_F(0x048abbdc) /* 0.283870563 */, 17 }, /* 2680 */ { MAD_F(0x048b5003) /* 0.284011853 */, 17 }, /* 2681 */ { MAD_F(0x048be42f) /* 0.284153161 */, 17 }, /* 2682 */ { MAD_F(0x048c7860) /* 0.284294487 */, 17 }, /* 2683 */ { MAD_F(0x048d0c96) /* 0.284435831 */, 17 }, /* 2684 */ { MAD_F(0x048da0d0) /* 0.284577192 */, 17 }, /* 2685 */ { MAD_F(0x048e350f) /* 0.284718570 */, 17 }, /* 2686 */ { MAD_F(0x048ec953) /* 0.284859966 */, 17 }, /* 2687 */ { MAD_F(0x048f5d9b) /* 0.285001380 */, 17 }, /* 2688 */ { MAD_F(0x048ff1e8) /* 0.285142811 */, 17 }, /* 2689 */ { MAD_F(0x0490863a) /* 0.285284259 */, 17 }, /* 2690 */ { MAD_F(0x04911a91) /* 0.285425726 */, 17 }, /* 2691 */ { MAD_F(0x0491aeec) /* 0.285567209 */, 17 }, /* 2692 */ { MAD_F(0x0492434c) /* 0.285708711 */, 17 }, /* 2693 */ { MAD_F(0x0492d7b0) /* 0.285850229 */, 17 }, /* 2694 */ { MAD_F(0x04936c1a) /* 0.285991766 */, 17 }, /* 2695 */ { MAD_F(0x04940088) /* 0.286133319 */, 17 }, /* 2696 */ { MAD_F(0x049494fb) /* 0.286274891 */, 17 }, /* 2697 */ { MAD_F(0x04952972) /* 0.286416480 */, 17 }, /* 2698 */ { MAD_F(0x0495bdee) /* 0.286558086 */, 17 }, /* 2699 */ { MAD_F(0x0496526f) /* 0.286699710 */, 17 }, /* 2700 */ { MAD_F(0x0496e6f5) /* 0.286841351 */, 17 }, /* 2701 */ { MAD_F(0x04977b7f) /* 0.286983010 */, 17 }, /* 2702 */ { MAD_F(0x0498100e) /* 0.287124686 */, 17 }, /* 2703 */ { MAD_F(0x0498a4a1) /* 0.287266380 */, 17 }, /* 2704 */ { MAD_F(0x0499393a) /* 0.287408091 */, 17 }, /* 2705 */ { MAD_F(0x0499cdd7) /* 0.287549820 */, 17 }, /* 2706 */ { MAD_F(0x049a6278) /* 0.287691566 */, 17 }, /* 2707 */ { MAD_F(0x049af71f) /* 0.287833330 */, 17 }, /* 2708 */ { MAD_F(0x049b8bca) /* 0.287975111 */, 17 }, /* 2709 */ { MAD_F(0x049c207a) /* 0.288116909 */, 17 }, /* 2710 */ { MAD_F(0x049cb52e) /* 0.288258725 */, 17 }, /* 2711 */ { MAD_F(0x049d49e7) /* 0.288400559 */, 17 }, /* 2712 */ { MAD_F(0x049ddea5) /* 0.288542409 */, 17 }, /* 2713 */ { MAD_F(0x049e7367) /* 0.288684278 */, 17 }, /* 2714 */ { MAD_F(0x049f082f) /* 0.288826163 */, 17 }, /* 2715 */ { MAD_F(0x049f9cfa) /* 0.288968067 */, 17 }, /* 2716 */ { MAD_F(0x04a031cb) /* 0.289109987 */, 17 }, /* 2717 */ { MAD_F(0x04a0c6a0) /* 0.289251925 */, 17 }, /* 2718 */ { MAD_F(0x04a15b7a) /* 0.289393881 */, 17 }, /* 2719 */ { MAD_F(0x04a1f059) /* 0.289535854 */, 17 }, /* 2720 */ { MAD_F(0x04a2853c) /* 0.289677844 */, 17 }, /* 2721 */ { MAD_F(0x04a31a24) /* 0.289819851 */, 17 }, /* 2722 */ { MAD_F(0x04a3af10) /* 0.289961876 */, 17 }, /* 2723 */ { MAD_F(0x04a44401) /* 0.290103919 */, 17 }, /* 2724 */ { MAD_F(0x04a4d8f7) /* 0.290245979 */, 17 }, /* 2725 */ { MAD_F(0x04a56df2) /* 0.290388056 */, 17 }, /* 2726 */ { MAD_F(0x04a602f1) /* 0.290530150 */, 17 }, /* 2727 */ { MAD_F(0x04a697f5) /* 0.290672262 */, 17 }, /* 2728 */ { MAD_F(0x04a72cfe) /* 0.290814392 */, 17 }, /* 2729 */ { MAD_F(0x04a7c20b) /* 0.290956538 */, 17 }, /* 2730 */ { MAD_F(0x04a8571d) /* 0.291098703 */, 17 }, /* 2731 */ { MAD_F(0x04a8ec33) /* 0.291240884 */, 17 }, /* 2732 */ { MAD_F(0x04a9814e) /* 0.291383083 */, 17 }, /* 2733 */ { MAD_F(0x04aa166e) /* 0.291525299 */, 17 }, /* 2734 */ { MAD_F(0x04aaab93) /* 0.291667532 */, 17 }, /* 2735 */ { MAD_F(0x04ab40bc) /* 0.291809783 */, 17 }, /* 2736 */ { MAD_F(0x04abd5ea) /* 0.291952051 */, 17 }, /* 2737 */ { MAD_F(0x04ac6b1c) /* 0.292094337 */, 17 }, /* 2738 */ { MAD_F(0x04ad0053) /* 0.292236640 */, 17 }, /* 2739 */ { MAD_F(0x04ad958f) /* 0.292378960 */, 17 }, /* 2740 */ { MAD_F(0x04ae2ad0) /* 0.292521297 */, 17 }, /* 2741 */ { MAD_F(0x04aec015) /* 0.292663652 */, 17 }, /* 2742 */ { MAD_F(0x04af555e) /* 0.292806024 */, 17 }, /* 2743 */ { MAD_F(0x04afeaad) /* 0.292948414 */, 17 }, /* 2744 */ { MAD_F(0x04b08000) /* 0.293090820 */, 17 }, /* 2745 */ { MAD_F(0x04b11557) /* 0.293233244 */, 17 }, /* 2746 */ { MAD_F(0x04b1aab4) /* 0.293375686 */, 17 }, /* 2747 */ { MAD_F(0x04b24015) /* 0.293518144 */, 17 }, /* 2748 */ { MAD_F(0x04b2d57a) /* 0.293660620 */, 17 }, /* 2749 */ { MAD_F(0x04b36ae4) /* 0.293803113 */, 17 }, /* 2750 */ { MAD_F(0x04b40053) /* 0.293945624 */, 17 }, /* 2751 */ { MAD_F(0x04b495c7) /* 0.294088151 */, 17 }, /* 2752 */ { MAD_F(0x04b52b3f) /* 0.294230696 */, 17 }, /* 2753 */ { MAD_F(0x04b5c0bc) /* 0.294373259 */, 17 }, /* 2754 */ { MAD_F(0x04b6563d) /* 0.294515838 */, 17 }, /* 2755 */ { MAD_F(0x04b6ebc3) /* 0.294658435 */, 17 }, /* 2756 */ { MAD_F(0x04b7814e) /* 0.294801049 */, 17 }, /* 2757 */ { MAD_F(0x04b816dd) /* 0.294943680 */, 17 }, /* 2758 */ { MAD_F(0x04b8ac71) /* 0.295086329 */, 17 }, /* 2759 */ { MAD_F(0x04b9420a) /* 0.295228995 */, 17 }, /* 2760 */ { MAD_F(0x04b9d7a7) /* 0.295371678 */, 17 }, /* 2761 */ { MAD_F(0x04ba6d49) /* 0.295514378 */, 17 }, /* 2762 */ { MAD_F(0x04bb02ef) /* 0.295657095 */, 17 }, /* 2763 */ { MAD_F(0x04bb989a) /* 0.295799830 */, 17 }, /* 2764 */ { MAD_F(0x04bc2e4a) /* 0.295942582 */, 17 }, /* 2765 */ { MAD_F(0x04bcc3fe) /* 0.296085351 */, 17 }, /* 2766 */ { MAD_F(0x04bd59b7) /* 0.296228138 */, 17 }, /* 2767 */ { MAD_F(0x04bdef74) /* 0.296370941 */, 17 }, /* 2768 */ { MAD_F(0x04be8537) /* 0.296513762 */, 17 }, /* 2769 */ { MAD_F(0x04bf1afd) /* 0.296656600 */, 17 }, /* 2770 */ { MAD_F(0x04bfb0c9) /* 0.296799455 */, 17 }, /* 2771 */ { MAD_F(0x04c04699) /* 0.296942327 */, 17 }, /* 2772 */ { MAD_F(0x04c0dc6d) /* 0.297085217 */, 17 }, /* 2773 */ { MAD_F(0x04c17247) /* 0.297228124 */, 17 }, /* 2774 */ { MAD_F(0x04c20824) /* 0.297371048 */, 17 }, /* 2775 */ { MAD_F(0x04c29e07) /* 0.297513989 */, 17 }, /* 2776 */ { MAD_F(0x04c333ee) /* 0.297656947 */, 17 }, /* 2777 */ { MAD_F(0x04c3c9da) /* 0.297799922 */, 17 }, /* 2778 */ { MAD_F(0x04c45fca) /* 0.297942915 */, 17 }, /* 2779 */ { MAD_F(0x04c4f5bf) /* 0.298085925 */, 17 }, /* 2780 */ { MAD_F(0x04c58bb8) /* 0.298228951 */, 17 }, /* 2781 */ { MAD_F(0x04c621b6) /* 0.298371996 */, 17 }, /* 2782 */ { MAD_F(0x04c6b7b9) /* 0.298515057 */, 17 }, /* 2783 */ { MAD_F(0x04c74dc0) /* 0.298658135 */, 17 }, /* 2784 */ { MAD_F(0x04c7e3cc) /* 0.298801231 */, 17 }, /* 2785 */ { MAD_F(0x04c879dd) /* 0.298944343 */, 17 }, /* 2786 */ { MAD_F(0x04c90ff2) /* 0.299087473 */, 17 }, /* 2787 */ { MAD_F(0x04c9a60c) /* 0.299230620 */, 17 }, /* 2788 */ { MAD_F(0x04ca3c2a) /* 0.299373784 */, 17 }, /* 2789 */ { MAD_F(0x04cad24d) /* 0.299516965 */, 17 }, /* 2790 */ { MAD_F(0x04cb6874) /* 0.299660163 */, 17 }, /* 2791 */ { MAD_F(0x04cbfea0) /* 0.299803378 */, 17 }, /* 2792 */ { MAD_F(0x04cc94d1) /* 0.299946611 */, 17 }, /* 2793 */ { MAD_F(0x04cd2b06) /* 0.300089860 */, 17 }, /* 2794 */ { MAD_F(0x04cdc140) /* 0.300233127 */, 17 }, /* 2795 */ { MAD_F(0x04ce577f) /* 0.300376411 */, 17 }, /* 2796 */ { MAD_F(0x04ceedc2) /* 0.300519711 */, 17 }, /* 2797 */ { MAD_F(0x04cf8409) /* 0.300663029 */, 17 }, /* 2798 */ { MAD_F(0x04d01a55) /* 0.300806364 */, 17 }, /* 2799 */ { MAD_F(0x04d0b0a6) /* 0.300949716 */, 17 }, /* 2800 */ { MAD_F(0x04d146fb) /* 0.301093085 */, 17 }, /* 2801 */ { MAD_F(0x04d1dd55) /* 0.301236472 */, 17 }, /* 2802 */ { MAD_F(0x04d273b4) /* 0.301379875 */, 17 }, /* 2803 */ { MAD_F(0x04d30a17) /* 0.301523295 */, 17 }, /* 2804 */ { MAD_F(0x04d3a07f) /* 0.301666733 */, 17 }, /* 2805 */ { MAD_F(0x04d436eb) /* 0.301810187 */, 17 }, /* 2806 */ { MAD_F(0x04d4cd5c) /* 0.301953659 */, 17 }, /* 2807 */ { MAD_F(0x04d563d1) /* 0.302097147 */, 17 }, /* 2808 */ { MAD_F(0x04d5fa4b) /* 0.302240653 */, 17 }, /* 2809 */ { MAD_F(0x04d690ca) /* 0.302384175 */, 17 }, /* 2810 */ { MAD_F(0x04d7274d) /* 0.302527715 */, 17 }, /* 2811 */ { MAD_F(0x04d7bdd5) /* 0.302671271 */, 17 }, /* 2812 */ { MAD_F(0x04d85461) /* 0.302814845 */, 17 }, /* 2813 */ { MAD_F(0x04d8eaf2) /* 0.302958436 */, 17 }, /* 2814 */ { MAD_F(0x04d98187) /* 0.303102044 */, 17 }, /* 2815 */ { MAD_F(0x04da1821) /* 0.303245668 */, 17 }, /* 2816 */ { MAD_F(0x04daaec0) /* 0.303389310 */, 17 }, /* 2817 */ { MAD_F(0x04db4563) /* 0.303532969 */, 17 }, /* 2818 */ { MAD_F(0x04dbdc0a) /* 0.303676645 */, 17 }, /* 2819 */ { MAD_F(0x04dc72b7) /* 0.303820337 */, 17 }, /* 2820 */ { MAD_F(0x04dd0967) /* 0.303964047 */, 17 }, /* 2821 */ { MAD_F(0x04dda01d) /* 0.304107774 */, 17 }, /* 2822 */ { MAD_F(0x04de36d7) /* 0.304251517 */, 17 }, /* 2823 */ { MAD_F(0x04decd95) /* 0.304395278 */, 17 }, /* 2824 */ { MAD_F(0x04df6458) /* 0.304539056 */, 17 }, /* 2825 */ { MAD_F(0x04dffb20) /* 0.304682850 */, 17 }, /* 2826 */ { MAD_F(0x04e091ec) /* 0.304826662 */, 17 }, /* 2827 */ { MAD_F(0x04e128bc) /* 0.304970491 */, 17 }, /* 2828 */ { MAD_F(0x04e1bf92) /* 0.305114336 */, 17 }, /* 2829 */ { MAD_F(0x04e2566b) /* 0.305258199 */, 17 }, /* 2830 */ { MAD_F(0x04e2ed4a) /* 0.305402078 */, 17 }, /* 2831 */ { MAD_F(0x04e3842d) /* 0.305545974 */, 17 }, /* 2832 */ { MAD_F(0x04e41b14) /* 0.305689888 */, 17 }, /* 2833 */ { MAD_F(0x04e4b200) /* 0.305833818 */, 17 }, /* 2834 */ { MAD_F(0x04e548f1) /* 0.305977765 */, 17 }, /* 2835 */ { MAD_F(0x04e5dfe6) /* 0.306121729 */, 17 }, /* 2836 */ { MAD_F(0x04e676df) /* 0.306265710 */, 17 }, /* 2837 */ { MAD_F(0x04e70dde) /* 0.306409708 */, 17 }, /* 2838 */ { MAD_F(0x04e7a4e0) /* 0.306553723 */, 17 }, /* 2839 */ { MAD_F(0x04e83be7) /* 0.306697755 */, 17 }, /* 2840 */ { MAD_F(0x04e8d2f3) /* 0.306841804 */, 17 }, /* 2841 */ { MAD_F(0x04e96a04) /* 0.306985869 */, 17 }, /* 2842 */ { MAD_F(0x04ea0118) /* 0.307129952 */, 17 }, /* 2843 */ { MAD_F(0x04ea9832) /* 0.307274051 */, 17 }, /* 2844 */ { MAD_F(0x04eb2f50) /* 0.307418168 */, 17 }, /* 2845 */ { MAD_F(0x04ebc672) /* 0.307562301 */, 17 }, /* 2846 */ { MAD_F(0x04ec5d99) /* 0.307706451 */, 17 }, /* 2847 */ { MAD_F(0x04ecf4c5) /* 0.307850618 */, 17 }, /* 2848 */ { MAD_F(0x04ed8bf5) /* 0.307994802 */, 17 }, /* 2849 */ { MAD_F(0x04ee2329) /* 0.308139003 */, 17 }, /* 2850 */ { MAD_F(0x04eeba63) /* 0.308283220 */, 17 }, /* 2851 */ { MAD_F(0x04ef51a0) /* 0.308427455 */, 17 }, /* 2852 */ { MAD_F(0x04efe8e2) /* 0.308571706 */, 17 }, /* 2853 */ { MAD_F(0x04f08029) /* 0.308715974 */, 17 }, /* 2854 */ { MAD_F(0x04f11774) /* 0.308860260 */, 17 }, /* 2855 */ { MAD_F(0x04f1aec4) /* 0.309004561 */, 17 }, /* 2856 */ { MAD_F(0x04f24618) /* 0.309148880 */, 17 }, /* 2857 */ { MAD_F(0x04f2dd71) /* 0.309293216 */, 17 }, /* 2858 */ { MAD_F(0x04f374cf) /* 0.309437568 */, 17 }, /* 2859 */ { MAD_F(0x04f40c30) /* 0.309581938 */, 17 }, /* 2860 */ { MAD_F(0x04f4a397) /* 0.309726324 */, 17 }, /* 2861 */ { MAD_F(0x04f53b02) /* 0.309870727 */, 17 }, /* 2862 */ { MAD_F(0x04f5d271) /* 0.310015147 */, 17 }, /* 2863 */ { MAD_F(0x04f669e5) /* 0.310159583 */, 17 }, /* 2864 */ { MAD_F(0x04f7015d) /* 0.310304037 */, 17 }, /* 2865 */ { MAD_F(0x04f798da) /* 0.310448507 */, 17 }, /* 2866 */ { MAD_F(0x04f8305c) /* 0.310592994 */, 17 }, /* 2867 */ { MAD_F(0x04f8c7e2) /* 0.310737498 */, 17 }, /* 2868 */ { MAD_F(0x04f95f6c) /* 0.310882018 */, 17 }, /* 2869 */ { MAD_F(0x04f9f6fb) /* 0.311026556 */, 17 }, /* 2870 */ { MAD_F(0x04fa8e8f) /* 0.311171110 */, 17 }, /* 2871 */ { MAD_F(0x04fb2627) /* 0.311315681 */, 17 }, /* 2872 */ { MAD_F(0x04fbbdc3) /* 0.311460269 */, 17 }, /* 2873 */ { MAD_F(0x04fc5564) /* 0.311604874 */, 17 }, /* 2874 */ { MAD_F(0x04fced0a) /* 0.311749495 */, 17 }, /* 2875 */ { MAD_F(0x04fd84b4) /* 0.311894133 */, 17 }, /* 2876 */ { MAD_F(0x04fe1c62) /* 0.312038788 */, 17 }, /* 2877 */ { MAD_F(0x04feb415) /* 0.312183460 */, 17 }, /* 2878 */ { MAD_F(0x04ff4bcd) /* 0.312328148 */, 17 }, /* 2879 */ { MAD_F(0x04ffe389) /* 0.312472854 */, 17 }, /* 2880 */ { MAD_F(0x05007b49) /* 0.312617576 */, 17 }, /* 2881 */ { MAD_F(0x0501130e) /* 0.312762314 */, 17 }, /* 2882 */ { MAD_F(0x0501aad8) /* 0.312907070 */, 17 }, /* 2883 */ { MAD_F(0x050242a6) /* 0.313051842 */, 17 }, /* 2884 */ { MAD_F(0x0502da78) /* 0.313196631 */, 17 }, /* 2885 */ { MAD_F(0x0503724f) /* 0.313341437 */, 17 }, /* 2886 */ { MAD_F(0x05040a2b) /* 0.313486259 */, 17 }, /* 2887 */ { MAD_F(0x0504a20b) /* 0.313631098 */, 17 }, /* 2888 */ { MAD_F(0x050539ef) /* 0.313775954 */, 17 }, /* 2889 */ { MAD_F(0x0505d1d8) /* 0.313920827 */, 17 }, /* 2890 */ { MAD_F(0x050669c5) /* 0.314065716 */, 17 }, /* 2891 */ { MAD_F(0x050701b7) /* 0.314210622 */, 17 }, /* 2892 */ { MAD_F(0x050799ae) /* 0.314355545 */, 17 }, /* 2893 */ { MAD_F(0x050831a9) /* 0.314500484 */, 17 }, /* 2894 */ { MAD_F(0x0508c9a8) /* 0.314645440 */, 17 }, /* 2895 */ { MAD_F(0x050961ac) /* 0.314790413 */, 17 }, /* 2896 */ { MAD_F(0x0509f9b4) /* 0.314935403 */, 17 }, /* 2897 */ { MAD_F(0x050a91c1) /* 0.315080409 */, 17 }, /* 2898 */ { MAD_F(0x050b29d2) /* 0.315225432 */, 17 }, /* 2899 */ { MAD_F(0x050bc1e8) /* 0.315370472 */, 17 }, /* 2900 */ { MAD_F(0x050c5a02) /* 0.315515528 */, 17 }, /* 2901 */ { MAD_F(0x050cf221) /* 0.315660601 */, 17 }, /* 2902 */ { MAD_F(0x050d8a44) /* 0.315805690 */, 17 }, /* 2903 */ { MAD_F(0x050e226c) /* 0.315950797 */, 17 }, /* 2904 */ { MAD_F(0x050eba98) /* 0.316095920 */, 17 }, /* 2905 */ { MAD_F(0x050f52c9) /* 0.316241059 */, 17 }, /* 2906 */ { MAD_F(0x050feafe) /* 0.316386216 */, 17 }, /* 2907 */ { MAD_F(0x05108337) /* 0.316531388 */, 17 }, /* 2908 */ { MAD_F(0x05111b75) /* 0.316676578 */, 17 }, /* 2909 */ { MAD_F(0x0511b3b8) /* 0.316821784 */, 17 }, /* 2910 */ { MAD_F(0x05124bff) /* 0.316967007 */, 17 }, /* 2911 */ { MAD_F(0x0512e44a) /* 0.317112247 */, 17 }, /* 2912 */ { MAD_F(0x05137c9a) /* 0.317257503 */, 17 }, /* 2913 */ { MAD_F(0x051414ee) /* 0.317402775 */, 17 }, /* 2914 */ { MAD_F(0x0514ad47) /* 0.317548065 */, 17 }, /* 2915 */ { MAD_F(0x051545a5) /* 0.317693371 */, 17 }, /* 2916 */ { MAD_F(0x0515de06) /* 0.317838693 */, 17 }, /* 2917 */ { MAD_F(0x0516766d) /* 0.317984033 */, 17 }, /* 2918 */ { MAD_F(0x05170ed7) /* 0.318129388 */, 17 }, /* 2919 */ { MAD_F(0x0517a746) /* 0.318274761 */, 17 }, /* 2920 */ { MAD_F(0x05183fba) /* 0.318420150 */, 17 }, /* 2921 */ { MAD_F(0x0518d832) /* 0.318565555 */, 17 }, /* 2922 */ { MAD_F(0x051970ae) /* 0.318710978 */, 17 }, /* 2923 */ { MAD_F(0x051a092f) /* 0.318856416 */, 17 }, /* 2924 */ { MAD_F(0x051aa1b5) /* 0.319001872 */, 17 }, /* 2925 */ { MAD_F(0x051b3a3f) /* 0.319147344 */, 17 }, /* 2926 */ { MAD_F(0x051bd2cd) /* 0.319292832 */, 17 }, /* 2927 */ { MAD_F(0x051c6b60) /* 0.319438338 */, 17 }, /* 2928 */ { MAD_F(0x051d03f7) /* 0.319583859 */, 17 }, /* 2929 */ { MAD_F(0x051d9c92) /* 0.319729398 */, 17 }, /* 2930 */ { MAD_F(0x051e3532) /* 0.319874952 */, 17 }, /* 2931 */ { MAD_F(0x051ecdd7) /* 0.320020524 */, 17 }, /* 2932 */ { MAD_F(0x051f6680) /* 0.320166112 */, 17 }, /* 2933 */ { MAD_F(0x051fff2d) /* 0.320311716 */, 17 }, /* 2934 */ { MAD_F(0x052097df) /* 0.320457337 */, 17 }, /* 2935 */ { MAD_F(0x05213095) /* 0.320602975 */, 17 }, /* 2936 */ { MAD_F(0x0521c950) /* 0.320748629 */, 17 }, /* 2937 */ { MAD_F(0x0522620f) /* 0.320894300 */, 17 }, /* 2938 */ { MAD_F(0x0522fad3) /* 0.321039987 */, 17 }, /* 2939 */ { MAD_F(0x0523939b) /* 0.321185691 */, 17 }, /* 2940 */ { MAD_F(0x05242c68) /* 0.321331411 */, 17 }, /* 2941 */ { MAD_F(0x0524c538) /* 0.321477148 */, 17 }, /* 2942 */ { MAD_F(0x05255e0e) /* 0.321622901 */, 17 }, /* 2943 */ { MAD_F(0x0525f6e8) /* 0.321768671 */, 17 }, /* 2944 */ { MAD_F(0x05268fc6) /* 0.321914457 */, 17 }, /* 2945 */ { MAD_F(0x052728a9) /* 0.322060260 */, 17 }, /* 2946 */ { MAD_F(0x0527c190) /* 0.322206079 */, 17 }, /* 2947 */ { MAD_F(0x05285a7b) /* 0.322351915 */, 17 }, /* 2948 */ { MAD_F(0x0528f36b) /* 0.322497768 */, 17 }, /* 2949 */ { MAD_F(0x05298c5f) /* 0.322643636 */, 17 }, /* 2950 */ { MAD_F(0x052a2558) /* 0.322789522 */, 17 }, /* 2951 */ { MAD_F(0x052abe55) /* 0.322935424 */, 17 }, /* 2952 */ { MAD_F(0x052b5757) /* 0.323081342 */, 17 }, /* 2953 */ { MAD_F(0x052bf05d) /* 0.323227277 */, 17 }, /* 2954 */ { MAD_F(0x052c8968) /* 0.323373228 */, 17 }, /* 2955 */ { MAD_F(0x052d2277) /* 0.323519196 */, 17 }, /* 2956 */ { MAD_F(0x052dbb8a) /* 0.323665180 */, 17 }, /* 2957 */ { MAD_F(0x052e54a2) /* 0.323811180 */, 17 }, /* 2958 */ { MAD_F(0x052eedbe) /* 0.323957197 */, 17 }, /* 2959 */ { MAD_F(0x052f86de) /* 0.324103231 */, 17 }, /* 2960 */ { MAD_F(0x05302003) /* 0.324249281 */, 17 }, /* 2961 */ { MAD_F(0x0530b92d) /* 0.324395347 */, 17 }, /* 2962 */ { MAD_F(0x0531525b) /* 0.324541430 */, 17 }, /* 2963 */ { MAD_F(0x0531eb8d) /* 0.324687530 */, 17 }, /* 2964 */ { MAD_F(0x053284c4) /* 0.324833646 */, 17 }, /* 2965 */ { MAD_F(0x05331dff) /* 0.324979778 */, 17 }, /* 2966 */ { MAD_F(0x0533b73e) /* 0.325125926 */, 17 }, /* 2967 */ { MAD_F(0x05345082) /* 0.325272091 */, 17 }, /* 2968 */ { MAD_F(0x0534e9ca) /* 0.325418273 */, 17 }, /* 2969 */ { MAD_F(0x05358317) /* 0.325564471 */, 17 }, /* 2970 */ { MAD_F(0x05361c68) /* 0.325710685 */, 17 }, /* 2971 */ { MAD_F(0x0536b5be) /* 0.325856916 */, 17 }, /* 2972 */ { MAD_F(0x05374f17) /* 0.326003163 */, 17 }, /* 2973 */ { MAD_F(0x0537e876) /* 0.326149427 */, 17 }, /* 2974 */ { MAD_F(0x053881d9) /* 0.326295707 */, 17 }, /* 2975 */ { MAD_F(0x05391b40) /* 0.326442003 */, 17 }, /* 2976 */ { MAD_F(0x0539b4ab) /* 0.326588316 */, 17 }, /* 2977 */ { MAD_F(0x053a4e1b) /* 0.326734645 */, 17 }, /* 2978 */ { MAD_F(0x053ae78f) /* 0.326880990 */, 17 }, /* 2979 */ { MAD_F(0x053b8108) /* 0.327027352 */, 17 }, /* 2980 */ { MAD_F(0x053c1a85) /* 0.327173730 */, 17 }, /* 2981 */ { MAD_F(0x053cb407) /* 0.327320125 */, 17 }, /* 2982 */ { MAD_F(0x053d4d8d) /* 0.327466536 */, 17 }, /* 2983 */ { MAD_F(0x053de717) /* 0.327612963 */, 17 }, /* 2984 */ { MAD_F(0x053e80a6) /* 0.327759407 */, 17 }, /* 2985 */ { MAD_F(0x053f1a39) /* 0.327905867 */, 17 }, /* 2986 */ { MAD_F(0x053fb3d0) /* 0.328052344 */, 17 }, /* 2987 */ { MAD_F(0x05404d6c) /* 0.328198837 */, 17 }, /* 2988 */ { MAD_F(0x0540e70c) /* 0.328345346 */, 17 }, /* 2989 */ { MAD_F(0x054180b1) /* 0.328491871 */, 17 }, /* 2990 */ { MAD_F(0x05421a5a) /* 0.328638413 */, 17 }, /* 2991 */ { MAD_F(0x0542b407) /* 0.328784971 */, 17 }, /* 2992 */ { MAD_F(0x05434db9) /* 0.328931546 */, 17 }, /* 2993 */ { MAD_F(0x0543e76f) /* 0.329078137 */, 17 }, /* 2994 */ { MAD_F(0x0544812a) /* 0.329224744 */, 17 }, /* 2995 */ { MAD_F(0x05451ae9) /* 0.329371367 */, 17 }, /* 2996 */ { MAD_F(0x0545b4ac) /* 0.329518007 */, 17 }, /* 2997 */ { MAD_F(0x05464e74) /* 0.329664663 */, 17 }, /* 2998 */ { MAD_F(0x0546e840) /* 0.329811336 */, 17 }, /* 2999 */ { MAD_F(0x05478211) /* 0.329958024 */, 17 }, /* 3000 */ { MAD_F(0x05481be5) /* 0.330104730 */, 17 }, /* 3001 */ { MAD_F(0x0548b5bf) /* 0.330251451 */, 17 }, /* 3002 */ { MAD_F(0x05494f9c) /* 0.330398189 */, 17 }, /* 3003 */ { MAD_F(0x0549e97e) /* 0.330544943 */, 17 }, /* 3004 */ { MAD_F(0x054a8364) /* 0.330691713 */, 17 }, /* 3005 */ { MAD_F(0x054b1d4f) /* 0.330838499 */, 17 }, /* 3006 */ { MAD_F(0x054bb73e) /* 0.330985302 */, 17 }, /* 3007 */ { MAD_F(0x054c5132) /* 0.331132121 */, 17 }, /* 3008 */ { MAD_F(0x054ceb2a) /* 0.331278957 */, 17 }, /* 3009 */ { MAD_F(0x054d8526) /* 0.331425808 */, 17 }, /* 3010 */ { MAD_F(0x054e1f26) /* 0.331572676 */, 17 }, /* 3011 */ { MAD_F(0x054eb92b) /* 0.331719560 */, 17 }, /* 3012 */ { MAD_F(0x054f5334) /* 0.331866461 */, 17 }, /* 3013 */ { MAD_F(0x054fed42) /* 0.332013377 */, 17 }, /* 3014 */ { MAD_F(0x05508754) /* 0.332160310 */, 17 }, /* 3015 */ { MAD_F(0x0551216b) /* 0.332307260 */, 17 }, /* 3016 */ { MAD_F(0x0551bb85) /* 0.332454225 */, 17 }, /* 3017 */ { MAD_F(0x055255a4) /* 0.332601207 */, 17 }, /* 3018 */ { MAD_F(0x0552efc8) /* 0.332748205 */, 17 }, /* 3019 */ { MAD_F(0x055389f0) /* 0.332895219 */, 17 }, /* 3020 */ { MAD_F(0x0554241c) /* 0.333042249 */, 17 }, /* 3021 */ { MAD_F(0x0554be4c) /* 0.333189296 */, 17 }, /* 3022 */ { MAD_F(0x05555881) /* 0.333336359 */, 17 }, /* 3023 */ { MAD_F(0x0555f2ba) /* 0.333483438 */, 17 }, /* 3024 */ { MAD_F(0x05568cf8) /* 0.333630533 */, 17 }, /* 3025 */ { MAD_F(0x0557273a) /* 0.333777645 */, 17 }, /* 3026 */ { MAD_F(0x0557c180) /* 0.333924772 */, 17 }, /* 3027 */ { MAD_F(0x05585bcb) /* 0.334071916 */, 17 }, /* 3028 */ { MAD_F(0x0558f61a) /* 0.334219076 */, 17 }, /* 3029 */ { MAD_F(0x0559906d) /* 0.334366253 */, 17 }, /* 3030 */ { MAD_F(0x055a2ac5) /* 0.334513445 */, 17 }, /* 3031 */ { MAD_F(0x055ac521) /* 0.334660654 */, 17 }, /* 3032 */ { MAD_F(0x055b5f81) /* 0.334807879 */, 17 }, /* 3033 */ { MAD_F(0x055bf9e6) /* 0.334955120 */, 17 }, /* 3034 */ { MAD_F(0x055c944f) /* 0.335102377 */, 17 }, /* 3035 */ { MAD_F(0x055d2ebd) /* 0.335249651 */, 17 }, /* 3036 */ { MAD_F(0x055dc92e) /* 0.335396941 */, 17 }, /* 3037 */ { MAD_F(0x055e63a5) /* 0.335544246 */, 17 }, /* 3038 */ { MAD_F(0x055efe1f) /* 0.335691568 */, 17 }, /* 3039 */ { MAD_F(0x055f989e) /* 0.335838906 */, 17 }, /* 3040 */ { MAD_F(0x05603321) /* 0.335986261 */, 17 }, /* 3041 */ { MAD_F(0x0560cda8) /* 0.336133631 */, 17 }, /* 3042 */ { MAD_F(0x05616834) /* 0.336281018 */, 17 }, /* 3043 */ { MAD_F(0x056202c4) /* 0.336428421 */, 17 }, /* 3044 */ { MAD_F(0x05629d59) /* 0.336575840 */, 17 }, /* 3045 */ { MAD_F(0x056337f2) /* 0.336723275 */, 17 }, /* 3046 */ { MAD_F(0x0563d28f) /* 0.336870726 */, 17 }, /* 3047 */ { MAD_F(0x05646d30) /* 0.337018193 */, 17 }, /* 3048 */ { MAD_F(0x056507d6) /* 0.337165677 */, 17 }, /* 3049 */ { MAD_F(0x0565a280) /* 0.337313176 */, 17 }, /* 3050 */ { MAD_F(0x05663d2f) /* 0.337460692 */, 17 }, /* 3051 */ { MAD_F(0x0566d7e1) /* 0.337608224 */, 17 }, /* 3052 */ { MAD_F(0x05677298) /* 0.337755772 */, 17 }, /* 3053 */ { MAD_F(0x05680d54) /* 0.337903336 */, 17 }, /* 3054 */ { MAD_F(0x0568a814) /* 0.338050916 */, 17 }, /* 3055 */ { MAD_F(0x056942d8) /* 0.338198513 */, 17 }, /* 3056 */ { MAD_F(0x0569dda0) /* 0.338346125 */, 17 }, /* 3057 */ { MAD_F(0x056a786d) /* 0.338493753 */, 17 }, /* 3058 */ { MAD_F(0x056b133e) /* 0.338641398 */, 17 }, /* 3059 */ { MAD_F(0x056bae13) /* 0.338789059 */, 17 }, /* 3060 */ { MAD_F(0x056c48ed) /* 0.338936736 */, 17 }, /* 3061 */ { MAD_F(0x056ce3cb) /* 0.339084429 */, 17 }, /* 3062 */ { MAD_F(0x056d7ead) /* 0.339232138 */, 17 }, /* 3063 */ { MAD_F(0x056e1994) /* 0.339379863 */, 17 }, /* 3064 */ { MAD_F(0x056eb47f) /* 0.339527604 */, 17 }, /* 3065 */ { MAD_F(0x056f4f6e) /* 0.339675361 */, 17 }, /* 3066 */ { MAD_F(0x056fea62) /* 0.339823134 */, 17 }, /* 3067 */ { MAD_F(0x0570855a) /* 0.339970924 */, 17 }, /* 3068 */ { MAD_F(0x05712056) /* 0.340118729 */, 17 }, /* 3069 */ { MAD_F(0x0571bb56) /* 0.340266550 */, 17 }, /* 3070 */ { MAD_F(0x0572565b) /* 0.340414388 */, 17 }, /* 3071 */ { MAD_F(0x0572f164) /* 0.340562242 */, 17 }, /* 3072 */ { MAD_F(0x05738c72) /* 0.340710111 */, 17 }, /* 3073 */ { MAD_F(0x05742784) /* 0.340857997 */, 17 }, /* 3074 */ { MAD_F(0x0574c29a) /* 0.341005899 */, 17 }, /* 3075 */ { MAD_F(0x05755db4) /* 0.341153816 */, 17 }, /* 3076 */ { MAD_F(0x0575f8d3) /* 0.341301750 */, 17 }, /* 3077 */ { MAD_F(0x057693f6) /* 0.341449700 */, 17 }, /* 3078 */ { MAD_F(0x05772f1d) /* 0.341597666 */, 17 }, /* 3079 */ { MAD_F(0x0577ca49) /* 0.341745648 */, 17 }, /* 3080 */ { MAD_F(0x05786578) /* 0.341893646 */, 17 }, /* 3081 */ { MAD_F(0x057900ad) /* 0.342041659 */, 17 }, /* 3082 */ { MAD_F(0x05799be5) /* 0.342189689 */, 17 }, /* 3083 */ { MAD_F(0x057a3722) /* 0.342337735 */, 17 }, /* 3084 */ { MAD_F(0x057ad263) /* 0.342485797 */, 17 }, /* 3085 */ { MAD_F(0x057b6da8) /* 0.342633875 */, 17 }, /* 3086 */ { MAD_F(0x057c08f2) /* 0.342781969 */, 17 }, /* 3087 */ { MAD_F(0x057ca440) /* 0.342930079 */, 17 }, /* 3088 */ { MAD_F(0x057d3f92) /* 0.343078205 */, 17 }, /* 3089 */ { MAD_F(0x057ddae9) /* 0.343226347 */, 17 }, /* 3090 */ { MAD_F(0x057e7644) /* 0.343374505 */, 17 }, /* 3091 */ { MAD_F(0x057f11a3) /* 0.343522679 */, 17 }, /* 3092 */ { MAD_F(0x057fad06) /* 0.343670869 */, 17 }, /* 3093 */ { MAD_F(0x0580486e) /* 0.343819075 */, 17 }, /* 3094 */ { MAD_F(0x0580e3da) /* 0.343967296 */, 17 }, /* 3095 */ { MAD_F(0x05817f4a) /* 0.344115534 */, 17 }, /* 3096 */ { MAD_F(0x05821abf) /* 0.344263788 */, 17 }, /* 3097 */ { MAD_F(0x0582b638) /* 0.344412058 */, 17 }, /* 3098 */ { MAD_F(0x058351b5) /* 0.344560343 */, 17 }, /* 3099 */ { MAD_F(0x0583ed36) /* 0.344708645 */, 17 }, /* 3100 */ { MAD_F(0x058488bc) /* 0.344856963 */, 17 }, /* 3101 */ { MAD_F(0x05852446) /* 0.345005296 */, 17 }, /* 3102 */ { MAD_F(0x0585bfd4) /* 0.345153646 */, 17 }, /* 3103 */ { MAD_F(0x05865b67) /* 0.345302011 */, 17 }, /* 3104 */ { MAD_F(0x0586f6fd) /* 0.345450393 */, 17 }, /* 3105 */ { MAD_F(0x05879298) /* 0.345598790 */, 17 }, /* 3106 */ { MAD_F(0x05882e38) /* 0.345747203 */, 17 }, /* 3107 */ { MAD_F(0x0588c9dc) /* 0.345895632 */, 17 }, /* 3108 */ { MAD_F(0x05896583) /* 0.346044077 */, 17 }, /* 3109 */ { MAD_F(0x058a0130) /* 0.346192538 */, 17 }, /* 3110 */ { MAD_F(0x058a9ce0) /* 0.346341015 */, 17 }, /* 3111 */ { MAD_F(0x058b3895) /* 0.346489508 */, 17 }, /* 3112 */ { MAD_F(0x058bd44e) /* 0.346638017 */, 17 }, /* 3113 */ { MAD_F(0x058c700b) /* 0.346786542 */, 17 }, /* 3114 */ { MAD_F(0x058d0bcd) /* 0.346935082 */, 17 }, /* 3115 */ { MAD_F(0x058da793) /* 0.347083639 */, 17 }, /* 3116 */ { MAD_F(0x058e435d) /* 0.347232211 */, 17 }, /* 3117 */ { MAD_F(0x058edf2b) /* 0.347380799 */, 17 }, /* 3118 */ { MAD_F(0x058f7afe) /* 0.347529403 */, 17 }, /* 3119 */ { MAD_F(0x059016d5) /* 0.347678023 */, 17 }, /* 3120 */ { MAD_F(0x0590b2b0) /* 0.347826659 */, 17 }, /* 3121 */ { MAD_F(0x05914e8f) /* 0.347975311 */, 17 }, /* 3122 */ { MAD_F(0x0591ea73) /* 0.348123979 */, 17 }, /* 3123 */ { MAD_F(0x0592865b) /* 0.348272662 */, 17 }, /* 3124 */ { MAD_F(0x05932247) /* 0.348421362 */, 17 }, /* 3125 */ { MAD_F(0x0593be37) /* 0.348570077 */, 17 }, /* 3126 */ { MAD_F(0x05945a2c) /* 0.348718808 */, 17 }, /* 3127 */ { MAD_F(0x0594f625) /* 0.348867555 */, 17 }, /* 3128 */ { MAD_F(0x05959222) /* 0.349016318 */, 17 }, /* 3129 */ { MAD_F(0x05962e24) /* 0.349165097 */, 17 }, /* 3130 */ { MAD_F(0x0596ca2a) /* 0.349313892 */, 17 }, /* 3131 */ { MAD_F(0x05976634) /* 0.349462702 */, 17 }, /* 3132 */ { MAD_F(0x05980242) /* 0.349611528 */, 17 }, /* 3133 */ { MAD_F(0x05989e54) /* 0.349760370 */, 17 }, /* 3134 */ { MAD_F(0x05993a6b) /* 0.349909228 */, 17 }, /* 3135 */ { MAD_F(0x0599d686) /* 0.350058102 */, 17 }, /* 3136 */ { MAD_F(0x059a72a5) /* 0.350206992 */, 17 }, /* 3137 */ { MAD_F(0x059b0ec9) /* 0.350355897 */, 17 }, /* 3138 */ { MAD_F(0x059baaf1) /* 0.350504818 */, 17 }, /* 3139 */ { MAD_F(0x059c471d) /* 0.350653756 */, 17 }, /* 3140 */ { MAD_F(0x059ce34d) /* 0.350802708 */, 17 }, /* 3141 */ { MAD_F(0x059d7f81) /* 0.350951677 */, 17 }, /* 3142 */ { MAD_F(0x059e1bba) /* 0.351100662 */, 17 }, /* 3143 */ { MAD_F(0x059eb7f7) /* 0.351249662 */, 17 }, /* 3144 */ { MAD_F(0x059f5438) /* 0.351398678 */, 17 }, /* 3145 */ { MAD_F(0x059ff07e) /* 0.351547710 */, 17 }, /* 3146 */ { MAD_F(0x05a08cc7) /* 0.351696758 */, 17 }, /* 3147 */ { MAD_F(0x05a12915) /* 0.351845821 */, 17 }, /* 3148 */ { MAD_F(0x05a1c567) /* 0.351994901 */, 17 }, /* 3149 */ { MAD_F(0x05a261be) /* 0.352143996 */, 17 }, /* 3150 */ { MAD_F(0x05a2fe18) /* 0.352293107 */, 17 }, /* 3151 */ { MAD_F(0x05a39a77) /* 0.352442233 */, 17 }, /* 3152 */ { MAD_F(0x05a436da) /* 0.352591376 */, 17 }, /* 3153 */ { MAD_F(0x05a4d342) /* 0.352740534 */, 17 }, /* 3154 */ { MAD_F(0x05a56fad) /* 0.352889708 */, 17 }, /* 3155 */ { MAD_F(0x05a60c1d) /* 0.353038898 */, 17 }, /* 3156 */ { MAD_F(0x05a6a891) /* 0.353188103 */, 17 }, /* 3157 */ { MAD_F(0x05a7450a) /* 0.353337325 */, 17 }, /* 3158 */ { MAD_F(0x05a7e186) /* 0.353486562 */, 17 }, /* 3159 */ { MAD_F(0x05a87e07) /* 0.353635814 */, 17 }, /* 3160 */ { MAD_F(0x05a91a8c) /* 0.353785083 */, 17 }, /* 3161 */ { MAD_F(0x05a9b715) /* 0.353934367 */, 17 }, /* 3162 */ { MAD_F(0x05aa53a2) /* 0.354083667 */, 17 }, /* 3163 */ { MAD_F(0x05aaf034) /* 0.354232983 */, 17 }, /* 3164 */ { MAD_F(0x05ab8cca) /* 0.354382314 */, 17 }, /* 3165 */ { MAD_F(0x05ac2964) /* 0.354531662 */, 17 }, /* 3166 */ { MAD_F(0x05acc602) /* 0.354681025 */, 17 }, /* 3167 */ { MAD_F(0x05ad62a5) /* 0.354830403 */, 17 }, /* 3168 */ { MAD_F(0x05adff4c) /* 0.354979798 */, 17 }, /* 3169 */ { MAD_F(0x05ae9bf7) /* 0.355129208 */, 17 }, /* 3170 */ { MAD_F(0x05af38a6) /* 0.355278634 */, 17 }, /* 3171 */ { MAD_F(0x05afd559) /* 0.355428075 */, 17 }, /* 3172 */ { MAD_F(0x05b07211) /* 0.355577533 */, 17 }, /* 3173 */ { MAD_F(0x05b10ecd) /* 0.355727006 */, 17 }, /* 3174 */ { MAD_F(0x05b1ab8d) /* 0.355876494 */, 17 }, /* 3175 */ { MAD_F(0x05b24851) /* 0.356025999 */, 17 }, /* 3176 */ { MAD_F(0x05b2e51a) /* 0.356175519 */, 17 }, /* 3177 */ { MAD_F(0x05b381e6) /* 0.356325054 */, 17 }, /* 3178 */ { MAD_F(0x05b41eb7) /* 0.356474606 */, 17 }, /* 3179 */ { MAD_F(0x05b4bb8c) /* 0.356624173 */, 17 }, /* 3180 */ { MAD_F(0x05b55866) /* 0.356773756 */, 17 }, /* 3181 */ { MAD_F(0x05b5f543) /* 0.356923354 */, 17 }, /* 3182 */ { MAD_F(0x05b69225) /* 0.357072969 */, 17 }, /* 3183 */ { MAD_F(0x05b72f0b) /* 0.357222598 */, 17 }, /* 3184 */ { MAD_F(0x05b7cbf5) /* 0.357372244 */, 17 }, /* 3185 */ { MAD_F(0x05b868e3) /* 0.357521905 */, 17 }, /* 3186 */ { MAD_F(0x05b905d6) /* 0.357671582 */, 17 }, /* 3187 */ { MAD_F(0x05b9a2cd) /* 0.357821275 */, 17 }, /* 3188 */ { MAD_F(0x05ba3fc8) /* 0.357970983 */, 17 }, /* 3189 */ { MAD_F(0x05badcc7) /* 0.358120707 */, 17 }, /* 3190 */ { MAD_F(0x05bb79ca) /* 0.358270446 */, 17 }, /* 3191 */ { MAD_F(0x05bc16d2) /* 0.358420201 */, 17 }, /* 3192 */ { MAD_F(0x05bcb3de) /* 0.358569972 */, 17 }, /* 3193 */ { MAD_F(0x05bd50ee) /* 0.358719758 */, 17 }, /* 3194 */ { MAD_F(0x05bdee02) /* 0.358869560 */, 17 }, /* 3195 */ { MAD_F(0x05be8b1a) /* 0.359019378 */, 17 }, /* 3196 */ { MAD_F(0x05bf2837) /* 0.359169211 */, 17 }, /* 3197 */ { MAD_F(0x05bfc558) /* 0.359319060 */, 17 }, /* 3198 */ { MAD_F(0x05c0627d) /* 0.359468925 */, 17 }, /* 3199 */ { MAD_F(0x05c0ffa6) /* 0.359618805 */, 17 }, /* 3200 */ { MAD_F(0x05c19cd3) /* 0.359768701 */, 17 }, /* 3201 */ { MAD_F(0x05c23a05) /* 0.359918612 */, 17 }, /* 3202 */ { MAD_F(0x05c2d73a) /* 0.360068540 */, 17 }, /* 3203 */ { MAD_F(0x05c37474) /* 0.360218482 */, 17 }, /* 3204 */ { MAD_F(0x05c411b2) /* 0.360368440 */, 17 }, /* 3205 */ { MAD_F(0x05c4aef5) /* 0.360518414 */, 17 }, /* 3206 */ { MAD_F(0x05c54c3b) /* 0.360668404 */, 17 }, /* 3207 */ { MAD_F(0x05c5e986) /* 0.360818409 */, 17 }, /* 3208 */ { MAD_F(0x05c686d5) /* 0.360968429 */, 17 }, /* 3209 */ { MAD_F(0x05c72428) /* 0.361118466 */, 17 }, /* 3210 */ { MAD_F(0x05c7c17f) /* 0.361268517 */, 17 }, /* 3211 */ { MAD_F(0x05c85eda) /* 0.361418585 */, 17 }, /* 3212 */ { MAD_F(0x05c8fc3a) /* 0.361568668 */, 17 }, /* 3213 */ { MAD_F(0x05c9999e) /* 0.361718766 */, 17 }, /* 3214 */ { MAD_F(0x05ca3706) /* 0.361868881 */, 17 }, /* 3215 */ { MAD_F(0x05cad472) /* 0.362019010 */, 17 }, /* 3216 */ { MAD_F(0x05cb71e2) /* 0.362169156 */, 17 }, /* 3217 */ { MAD_F(0x05cc0f57) /* 0.362319316 */, 17 }, /* 3218 */ { MAD_F(0x05ccaccf) /* 0.362469493 */, 17 }, /* 3219 */ { MAD_F(0x05cd4a4c) /* 0.362619685 */, 17 }, /* 3220 */ { MAD_F(0x05cde7cd) /* 0.362769892 */, 17 }, /* 3221 */ { MAD_F(0x05ce8552) /* 0.362920115 */, 17 }, /* 3222 */ { MAD_F(0x05cf22dc) /* 0.363070354 */, 17 }, /* 3223 */ { MAD_F(0x05cfc069) /* 0.363220608 */, 17 }, /* 3224 */ { MAD_F(0x05d05dfb) /* 0.363370878 */, 17 }, /* 3225 */ { MAD_F(0x05d0fb91) /* 0.363521163 */, 17 }, /* 3226 */ { MAD_F(0x05d1992b) /* 0.363671464 */, 17 }, /* 3227 */ { MAD_F(0x05d236c9) /* 0.363821780 */, 17 }, /* 3228 */ { MAD_F(0x05d2d46c) /* 0.363972112 */, 17 }, /* 3229 */ { MAD_F(0x05d37212) /* 0.364122459 */, 17 }, /* 3230 */ { MAD_F(0x05d40fbd) /* 0.364272822 */, 17 }, /* 3231 */ { MAD_F(0x05d4ad6c) /* 0.364423200 */, 17 }, /* 3232 */ { MAD_F(0x05d54b1f) /* 0.364573594 */, 17 }, /* 3233 */ { MAD_F(0x05d5e8d6) /* 0.364724004 */, 17 }, /* 3234 */ { MAD_F(0x05d68691) /* 0.364874429 */, 17 }, /* 3235 */ { MAD_F(0x05d72451) /* 0.365024869 */, 17 }, /* 3236 */ { MAD_F(0x05d7c215) /* 0.365175325 */, 17 }, /* 3237 */ { MAD_F(0x05d85fdc) /* 0.365325796 */, 17 }, /* 3238 */ { MAD_F(0x05d8fda8) /* 0.365476283 */, 17 }, /* 3239 */ { MAD_F(0x05d99b79) /* 0.365626786 */, 17 }, /* 3240 */ { MAD_F(0x05da394d) /* 0.365777304 */, 17 }, /* 3241 */ { MAD_F(0x05dad726) /* 0.365927837 */, 17 }, /* 3242 */ { MAD_F(0x05db7502) /* 0.366078386 */, 17 }, /* 3243 */ { MAD_F(0x05dc12e3) /* 0.366228950 */, 17 }, /* 3244 */ { MAD_F(0x05dcb0c8) /* 0.366379530 */, 17 }, /* 3245 */ { MAD_F(0x05dd4eb1) /* 0.366530125 */, 17 }, /* 3246 */ { MAD_F(0x05ddec9e) /* 0.366680736 */, 17 }, /* 3247 */ { MAD_F(0x05de8a90) /* 0.366831362 */, 17 }, /* 3248 */ { MAD_F(0x05df2885) /* 0.366982004 */, 17 }, /* 3249 */ { MAD_F(0x05dfc67f) /* 0.367132661 */, 17 }, /* 3250 */ { MAD_F(0x05e0647d) /* 0.367283334 */, 17 }, /* 3251 */ { MAD_F(0x05e1027f) /* 0.367434022 */, 17 }, /* 3252 */ { MAD_F(0x05e1a085) /* 0.367584725 */, 17 }, /* 3253 */ { MAD_F(0x05e23e8f) /* 0.367735444 */, 17 }, /* 3254 */ { MAD_F(0x05e2dc9e) /* 0.367886179 */, 17 }, /* 3255 */ { MAD_F(0x05e37ab0) /* 0.368036929 */, 17 }, /* 3256 */ { MAD_F(0x05e418c7) /* 0.368187694 */, 17 }, /* 3257 */ { MAD_F(0x05e4b6e2) /* 0.368338475 */, 17 }, /* 3258 */ { MAD_F(0x05e55501) /* 0.368489271 */, 17 }, /* 3259 */ { MAD_F(0x05e5f324) /* 0.368640082 */, 17 }, /* 3260 */ { MAD_F(0x05e6914c) /* 0.368790909 */, 17 }, /* 3261 */ { MAD_F(0x05e72f77) /* 0.368941752 */, 17 }, /* 3262 */ { MAD_F(0x05e7cda7) /* 0.369092610 */, 17 }, /* 3263 */ { MAD_F(0x05e86bda) /* 0.369243483 */, 17 }, /* 3264 */ { MAD_F(0x05e90a12) /* 0.369394372 */, 17 }, /* 3265 */ { MAD_F(0x05e9a84e) /* 0.369545276 */, 17 }, /* 3266 */ { MAD_F(0x05ea468e) /* 0.369696195 */, 17 }, /* 3267 */ { MAD_F(0x05eae4d3) /* 0.369847130 */, 17 }, /* 3268 */ { MAD_F(0x05eb831b) /* 0.369998080 */, 17 }, /* 3269 */ { MAD_F(0x05ec2168) /* 0.370149046 */, 17 }, /* 3270 */ { MAD_F(0x05ecbfb8) /* 0.370300027 */, 17 }, /* 3271 */ { MAD_F(0x05ed5e0d) /* 0.370451024 */, 17 }, /* 3272 */ { MAD_F(0x05edfc66) /* 0.370602036 */, 17 }, /* 3273 */ { MAD_F(0x05ee9ac3) /* 0.370753063 */, 17 }, /* 3274 */ { MAD_F(0x05ef3924) /* 0.370904105 */, 17 }, /* 3275 */ { MAD_F(0x05efd78a) /* 0.371055163 */, 17 }, /* 3276 */ { MAD_F(0x05f075f3) /* 0.371206237 */, 17 }, /* 3277 */ { MAD_F(0x05f11461) /* 0.371357326 */, 17 }, /* 3278 */ { MAD_F(0x05f1b2d3) /* 0.371508430 */, 17 }, /* 3279 */ { MAD_F(0x05f25148) /* 0.371659549 */, 17 }, /* 3280 */ { MAD_F(0x05f2efc2) /* 0.371810684 */, 17 }, /* 3281 */ { MAD_F(0x05f38e40) /* 0.371961834 */, 17 }, /* 3282 */ { MAD_F(0x05f42cc3) /* 0.372113000 */, 17 }, /* 3283 */ { MAD_F(0x05f4cb49) /* 0.372264181 */, 17 }, /* 3284 */ { MAD_F(0x05f569d3) /* 0.372415377 */, 17 }, /* 3285 */ { MAD_F(0x05f60862) /* 0.372566589 */, 17 }, /* 3286 */ { MAD_F(0x05f6a6f5) /* 0.372717816 */, 17 }, /* 3287 */ { MAD_F(0x05f7458b) /* 0.372869058 */, 17 }, /* 3288 */ { MAD_F(0x05f7e426) /* 0.373020316 */, 17 }, /* 3289 */ { MAD_F(0x05f882c5) /* 0.373171589 */, 17 }, /* 3290 */ { MAD_F(0x05f92169) /* 0.373322877 */, 17 }, /* 3291 */ { MAD_F(0x05f9c010) /* 0.373474181 */, 17 }, /* 3292 */ { MAD_F(0x05fa5ebb) /* 0.373625500 */, 17 }, /* 3293 */ { MAD_F(0x05fafd6b) /* 0.373776834 */, 17 }, /* 3294 */ { MAD_F(0x05fb9c1e) /* 0.373928184 */, 17 }, /* 3295 */ { MAD_F(0x05fc3ad6) /* 0.374079549 */, 17 }, /* 3296 */ { MAD_F(0x05fcd992) /* 0.374230929 */, 17 }, /* 3297 */ { MAD_F(0x05fd7852) /* 0.374382325 */, 17 }, /* 3298 */ { MAD_F(0x05fe1716) /* 0.374533735 */, 17 }, /* 3299 */ { MAD_F(0x05feb5de) /* 0.374685162 */, 17 }, /* 3300 */ { MAD_F(0x05ff54aa) /* 0.374836603 */, 17 }, /* 3301 */ { MAD_F(0x05fff37b) /* 0.374988060 */, 17 }, /* 3302 */ { MAD_F(0x0600924f) /* 0.375139532 */, 17 }, /* 3303 */ { MAD_F(0x06013128) /* 0.375291019 */, 17 }, /* 3304 */ { MAD_F(0x0601d004) /* 0.375442522 */, 17 }, /* 3305 */ { MAD_F(0x06026ee5) /* 0.375594040 */, 17 }, /* 3306 */ { MAD_F(0x06030dca) /* 0.375745573 */, 17 }, /* 3307 */ { MAD_F(0x0603acb3) /* 0.375897122 */, 17 }, /* 3308 */ { MAD_F(0x06044ba0) /* 0.376048685 */, 17 }, /* 3309 */ { MAD_F(0x0604ea91) /* 0.376200265 */, 17 }, /* 3310 */ { MAD_F(0x06058987) /* 0.376351859 */, 17 }, /* 3311 */ { MAD_F(0x06062880) /* 0.376503468 */, 17 }, /* 3312 */ { MAD_F(0x0606c77d) /* 0.376655093 */, 17 }, /* 3313 */ { MAD_F(0x0607667f) /* 0.376806733 */, 17 }, /* 3314 */ { MAD_F(0x06080585) /* 0.376958389 */, 17 }, /* 3315 */ { MAD_F(0x0608a48f) /* 0.377110059 */, 17 }, /* 3316 */ { MAD_F(0x0609439c) /* 0.377261745 */, 17 }, /* 3317 */ { MAD_F(0x0609e2ae) /* 0.377413446 */, 17 }, /* 3318 */ { MAD_F(0x060a81c4) /* 0.377565163 */, 17 }, /* 3319 */ { MAD_F(0x060b20df) /* 0.377716894 */, 17 }, /* 3320 */ { MAD_F(0x060bbffd) /* 0.377868641 */, 17 }, /* 3321 */ { MAD_F(0x060c5f1f) /* 0.378020403 */, 17 }, /* 3322 */ { MAD_F(0x060cfe46) /* 0.378172181 */, 17 }, /* 3323 */ { MAD_F(0x060d9d70) /* 0.378323973 */, 17 }, /* 3324 */ { MAD_F(0x060e3c9f) /* 0.378475781 */, 17 }, /* 3325 */ { MAD_F(0x060edbd1) /* 0.378627604 */, 17 }, /* 3326 */ { MAD_F(0x060f7b08) /* 0.378779442 */, 17 }, /* 3327 */ { MAD_F(0x06101a43) /* 0.378931296 */, 17 }, /* 3328 */ { MAD_F(0x0610b982) /* 0.379083164 */, 17 }, /* 3329 */ { MAD_F(0x061158c5) /* 0.379235048 */, 17 }, /* 3330 */ { MAD_F(0x0611f80c) /* 0.379386947 */, 17 }, /* 3331 */ { MAD_F(0x06129757) /* 0.379538862 */, 17 }, /* 3332 */ { MAD_F(0x061336a6) /* 0.379690791 */, 17 }, /* 3333 */ { MAD_F(0x0613d5fa) /* 0.379842736 */, 17 }, /* 3334 */ { MAD_F(0x06147551) /* 0.379994696 */, 17 }, /* 3335 */ { MAD_F(0x061514ad) /* 0.380146671 */, 17 }, /* 3336 */ { MAD_F(0x0615b40c) /* 0.380298661 */, 17 }, /* 3337 */ { MAD_F(0x06165370) /* 0.380450666 */, 17 }, /* 3338 */ { MAD_F(0x0616f2d8) /* 0.380602687 */, 17 }, /* 3339 */ { MAD_F(0x06179243) /* 0.380754723 */, 17 }, /* 3340 */ { MAD_F(0x061831b3) /* 0.380906774 */, 17 }, /* 3341 */ { MAD_F(0x0618d127) /* 0.381058840 */, 17 }, /* 3342 */ { MAD_F(0x0619709f) /* 0.381210921 */, 17 }, /* 3343 */ { MAD_F(0x061a101b) /* 0.381363018 */, 17 }, /* 3344 */ { MAD_F(0x061aaf9c) /* 0.381515130 */, 17 }, /* 3345 */ { MAD_F(0x061b4f20) /* 0.381667257 */, 17 }, /* 3346 */ { MAD_F(0x061beea8) /* 0.381819399 */, 17 }, /* 3347 */ { MAD_F(0x061c8e34) /* 0.381971556 */, 17 }, /* 3348 */ { MAD_F(0x061d2dc5) /* 0.382123728 */, 17 }, /* 3349 */ { MAD_F(0x061dcd59) /* 0.382275916 */, 17 }, /* 3350 */ { MAD_F(0x061e6cf2) /* 0.382428118 */, 17 }, /* 3351 */ { MAD_F(0x061f0c8f) /* 0.382580336 */, 17 }, /* 3352 */ { MAD_F(0x061fac2f) /* 0.382732569 */, 17 }, /* 3353 */ { MAD_F(0x06204bd4) /* 0.382884817 */, 17 }, /* 3354 */ { MAD_F(0x0620eb7d) /* 0.383037080 */, 17 }, /* 3355 */ { MAD_F(0x06218b2a) /* 0.383189358 */, 17 }, /* 3356 */ { MAD_F(0x06222adb) /* 0.383341652 */, 17 }, /* 3357 */ { MAD_F(0x0622ca90) /* 0.383493960 */, 17 }, /* 3358 */ { MAD_F(0x06236a49) /* 0.383646284 */, 17 }, /* 3359 */ { MAD_F(0x06240a06) /* 0.383798623 */, 17 }, /* 3360 */ { MAD_F(0x0624a9c7) /* 0.383950977 */, 17 }, /* 3361 */ { MAD_F(0x0625498d) /* 0.384103346 */, 17 }, /* 3362 */ { MAD_F(0x0625e956) /* 0.384255730 */, 17 }, /* 3363 */ { MAD_F(0x06268923) /* 0.384408129 */, 17 }, /* 3364 */ { MAD_F(0x062728f5) /* 0.384560544 */, 17 }, /* 3365 */ { MAD_F(0x0627c8ca) /* 0.384712973 */, 17 }, /* 3366 */ { MAD_F(0x062868a4) /* 0.384865418 */, 17 }, /* 3367 */ { MAD_F(0x06290881) /* 0.385017878 */, 17 }, /* 3368 */ { MAD_F(0x0629a863) /* 0.385170352 */, 17 }, /* 3369 */ { MAD_F(0x062a4849) /* 0.385322842 */, 17 }, /* 3370 */ { MAD_F(0x062ae832) /* 0.385475347 */, 17 }, /* 3371 */ { MAD_F(0x062b8820) /* 0.385627867 */, 17 }, /* 3372 */ { MAD_F(0x062c2812) /* 0.385780402 */, 17 }, /* 3373 */ { MAD_F(0x062cc808) /* 0.385932953 */, 17 }, /* 3374 */ { MAD_F(0x062d6802) /* 0.386085518 */, 17 }, /* 3375 */ { MAD_F(0x062e0800) /* 0.386238098 */, 17 }, /* 3376 */ { MAD_F(0x062ea802) /* 0.386390694 */, 17 }, /* 3377 */ { MAD_F(0x062f4808) /* 0.386543304 */, 17 }, /* 3378 */ { MAD_F(0x062fe812) /* 0.386695930 */, 17 }, /* 3379 */ { MAD_F(0x06308820) /* 0.386848570 */, 17 }, /* 3380 */ { MAD_F(0x06312832) /* 0.387001226 */, 17 }, /* 3381 */ { MAD_F(0x0631c849) /* 0.387153897 */, 17 }, /* 3382 */ { MAD_F(0x06326863) /* 0.387306582 */, 17 }, /* 3383 */ { MAD_F(0x06330881) /* 0.387459283 */, 17 }, /* 3384 */ { MAD_F(0x0633a8a3) /* 0.387611999 */, 17 }, /* 3385 */ { MAD_F(0x063448ca) /* 0.387764730 */, 17 }, /* 3386 */ { MAD_F(0x0634e8f4) /* 0.387917476 */, 17 }, /* 3387 */ { MAD_F(0x06358923) /* 0.388070237 */, 17 }, /* 3388 */ { MAD_F(0x06362955) /* 0.388223013 */, 17 }, /* 3389 */ { MAD_F(0x0636c98c) /* 0.388375804 */, 17 }, /* 3390 */ { MAD_F(0x063769c6) /* 0.388528610 */, 17 }, /* 3391 */ { MAD_F(0x06380a05) /* 0.388681431 */, 17 }, /* 3392 */ { MAD_F(0x0638aa48) /* 0.388834268 */, 17 }, /* 3393 */ { MAD_F(0x06394a8e) /* 0.388987119 */, 17 }, /* 3394 */ { MAD_F(0x0639ead9) /* 0.389139985 */, 17 }, /* 3395 */ { MAD_F(0x063a8b28) /* 0.389292866 */, 17 }, /* 3396 */ { MAD_F(0x063b2b7b) /* 0.389445762 */, 17 }, /* 3397 */ { MAD_F(0x063bcbd1) /* 0.389598674 */, 17 }, /* 3398 */ { MAD_F(0x063c6c2c) /* 0.389751600 */, 17 }, /* 3399 */ { MAD_F(0x063d0c8b) /* 0.389904541 */, 17 }, /* 3400 */ { MAD_F(0x063dacee) /* 0.390057497 */, 17 }, /* 3401 */ { MAD_F(0x063e4d55) /* 0.390210468 */, 17 }, /* 3402 */ { MAD_F(0x063eedc0) /* 0.390363455 */, 17 }, /* 3403 */ { MAD_F(0x063f8e2f) /* 0.390516456 */, 17 }, /* 3404 */ { MAD_F(0x06402ea2) /* 0.390669472 */, 17 }, /* 3405 */ { MAD_F(0x0640cf19) /* 0.390822503 */, 17 }, /* 3406 */ { MAD_F(0x06416f94) /* 0.390975549 */, 17 }, /* 3407 */ { MAD_F(0x06421013) /* 0.391128611 */, 17 }, /* 3408 */ { MAD_F(0x0642b096) /* 0.391281687 */, 17 }, /* 3409 */ { MAD_F(0x0643511d) /* 0.391434778 */, 17 }, /* 3410 */ { MAD_F(0x0643f1a8) /* 0.391587884 */, 17 }, /* 3411 */ { MAD_F(0x06449237) /* 0.391741005 */, 17 }, /* 3412 */ { MAD_F(0x064532ca) /* 0.391894141 */, 17 }, /* 3413 */ { MAD_F(0x0645d361) /* 0.392047292 */, 17 }, /* 3414 */ { MAD_F(0x064673fc) /* 0.392200458 */, 17 }, /* 3415 */ { MAD_F(0x0647149c) /* 0.392353638 */, 17 }, /* 3416 */ { MAD_F(0x0647b53f) /* 0.392506834 */, 17 }, /* 3417 */ { MAD_F(0x064855e6) /* 0.392660045 */, 17 }, /* 3418 */ { MAD_F(0x0648f691) /* 0.392813271 */, 17 }, /* 3419 */ { MAD_F(0x06499740) /* 0.392966511 */, 17 }, /* 3420 */ { MAD_F(0x064a37f4) /* 0.393119767 */, 17 }, /* 3421 */ { MAD_F(0x064ad8ab) /* 0.393273038 */, 17 }, /* 3422 */ { MAD_F(0x064b7966) /* 0.393426323 */, 17 }, /* 3423 */ { MAD_F(0x064c1a25) /* 0.393579623 */, 17 }, /* 3424 */ { MAD_F(0x064cbae9) /* 0.393732939 */, 17 }, /* 3425 */ { MAD_F(0x064d5bb0) /* 0.393886269 */, 17 }, /* 3426 */ { MAD_F(0x064dfc7b) /* 0.394039614 */, 17 }, /* 3427 */ { MAD_F(0x064e9d4b) /* 0.394192974 */, 17 }, /* 3428 */ { MAD_F(0x064f3e1e) /* 0.394346349 */, 17 }, /* 3429 */ { MAD_F(0x064fdef5) /* 0.394499739 */, 17 }, /* 3430 */ { MAD_F(0x06507fd0) /* 0.394653144 */, 17 }, /* 3431 */ { MAD_F(0x065120b0) /* 0.394806564 */, 17 }, /* 3432 */ { MAD_F(0x0651c193) /* 0.394959999 */, 17 }, /* 3433 */ { MAD_F(0x0652627a) /* 0.395113448 */, 17 }, /* 3434 */ { MAD_F(0x06530366) /* 0.395266913 */, 17 }, /* 3435 */ { MAD_F(0x0653a455) /* 0.395420392 */, 17 }, /* 3436 */ { MAD_F(0x06544548) /* 0.395573886 */, 17 }, /* 3437 */ { MAD_F(0x0654e640) /* 0.395727395 */, 17 }, /* 3438 */ { MAD_F(0x0655873b) /* 0.395880919 */, 17 }, /* 3439 */ { MAD_F(0x0656283a) /* 0.396034458 */, 17 }, /* 3440 */ { MAD_F(0x0656c93d) /* 0.396188012 */, 17 }, /* 3441 */ { MAD_F(0x06576a45) /* 0.396341581 */, 17 }, /* 3442 */ { MAD_F(0x06580b50) /* 0.396495164 */, 17 }, /* 3443 */ { MAD_F(0x0658ac5f) /* 0.396648763 */, 17 }, /* 3444 */ { MAD_F(0x06594d73) /* 0.396802376 */, 17 }, /* 3445 */ { MAD_F(0x0659ee8a) /* 0.396956004 */, 17 }, /* 3446 */ { MAD_F(0x065a8fa5) /* 0.397109647 */, 17 }, /* 3447 */ { MAD_F(0x065b30c4) /* 0.397263305 */, 17 }, /* 3448 */ { MAD_F(0x065bd1e7) /* 0.397416978 */, 17 }, /* 3449 */ { MAD_F(0x065c730f) /* 0.397570666 */, 17 }, /* 3450 */ { MAD_F(0x065d143a) /* 0.397724368 */, 17 }, /* 3451 */ { MAD_F(0x065db569) /* 0.397878085 */, 17 }, /* 3452 */ { MAD_F(0x065e569c) /* 0.398031818 */, 17 }, /* 3453 */ { MAD_F(0x065ef7d3) /* 0.398185565 */, 17 }, /* 3454 */ { MAD_F(0x065f990e) /* 0.398339326 */, 17 }, /* 3455 */ { MAD_F(0x06603a4e) /* 0.398493103 */, 17 }, /* 3456 */ { MAD_F(0x0660db91) /* 0.398646895 */, 17 }, /* 3457 */ { MAD_F(0x06617cd8) /* 0.398800701 */, 17 }, /* 3458 */ { MAD_F(0x06621e23) /* 0.398954522 */, 17 }, /* 3459 */ { MAD_F(0x0662bf72) /* 0.399108358 */, 17 }, /* 3460 */ { MAD_F(0x066360c5) /* 0.399262209 */, 17 }, /* 3461 */ { MAD_F(0x0664021c) /* 0.399416075 */, 17 }, /* 3462 */ { MAD_F(0x0664a377) /* 0.399569955 */, 17 }, /* 3463 */ { MAD_F(0x066544d6) /* 0.399723851 */, 17 }, /* 3464 */ { MAD_F(0x0665e639) /* 0.399877761 */, 17 }, /* 3465 */ { MAD_F(0x066687a0) /* 0.400031686 */, 17 }, /* 3466 */ { MAD_F(0x0667290b) /* 0.400185625 */, 17 }, /* 3467 */ { MAD_F(0x0667ca79) /* 0.400339580 */, 17 }, /* 3468 */ { MAD_F(0x06686bec) /* 0.400493549 */, 17 }, /* 3469 */ { MAD_F(0x06690d63) /* 0.400647534 */, 17 }, /* 3470 */ { MAD_F(0x0669aede) /* 0.400801533 */, 17 }, /* 3471 */ { MAD_F(0x066a505d) /* 0.400955546 */, 17 }, /* 3472 */ { MAD_F(0x066af1df) /* 0.401109575 */, 17 }, /* 3473 */ { MAD_F(0x066b9366) /* 0.401263618 */, 17 }, /* 3474 */ { MAD_F(0x066c34f1) /* 0.401417676 */, 17 }, /* 3475 */ { MAD_F(0x066cd67f) /* 0.401571749 */, 17 }, /* 3476 */ { MAD_F(0x066d7812) /* 0.401725837 */, 17 }, /* 3477 */ { MAD_F(0x066e19a9) /* 0.401879939 */, 17 }, /* 3478 */ { MAD_F(0x066ebb43) /* 0.402034056 */, 17 }, /* 3479 */ { MAD_F(0x066f5ce2) /* 0.402188188 */, 17 }, /* 3480 */ { MAD_F(0x066ffe84) /* 0.402342335 */, 17 }, /* 3481 */ { MAD_F(0x0670a02a) /* 0.402496497 */, 17 }, /* 3482 */ { MAD_F(0x067141d5) /* 0.402650673 */, 17 }, /* 3483 */ { MAD_F(0x0671e383) /* 0.402804864 */, 17 }, /* 3484 */ { MAD_F(0x06728535) /* 0.402959070 */, 17 }, /* 3485 */ { MAD_F(0x067326ec) /* 0.403113291 */, 17 }, /* 3486 */ { MAD_F(0x0673c8a6) /* 0.403267526 */, 17 }, /* 3487 */ { MAD_F(0x06746a64) /* 0.403421776 */, 17 }, /* 3488 */ { MAD_F(0x06750c26) /* 0.403576041 */, 17 }, /* 3489 */ { MAD_F(0x0675adec) /* 0.403730320 */, 17 }, /* 3490 */ { MAD_F(0x06764fb6) /* 0.403884615 */, 17 }, /* 3491 */ { MAD_F(0x0676f184) /* 0.404038924 */, 17 }, /* 3492 */ { MAD_F(0x06779356) /* 0.404193247 */, 17 }, /* 3493 */ { MAD_F(0x0678352c) /* 0.404347586 */, 17 }, /* 3494 */ { MAD_F(0x0678d706) /* 0.404501939 */, 17 }, /* 3495 */ { MAD_F(0x067978e4) /* 0.404656307 */, 17 }, /* 3496 */ { MAD_F(0x067a1ac6) /* 0.404810690 */, 17 }, /* 3497 */ { MAD_F(0x067abcac) /* 0.404965087 */, 17 }, /* 3498 */ { MAD_F(0x067b5e95) /* 0.405119499 */, 17 }, /* 3499 */ { MAD_F(0x067c0083) /* 0.405273926 */, 17 }, /* 3500 */ { MAD_F(0x067ca275) /* 0.405428368 */, 17 }, /* 3501 */ { MAD_F(0x067d446a) /* 0.405582824 */, 17 }, /* 3502 */ { MAD_F(0x067de664) /* 0.405737295 */, 17 }, /* 3503 */ { MAD_F(0x067e8861) /* 0.405891781 */, 17 }, /* 3504 */ { MAD_F(0x067f2a62) /* 0.406046281 */, 17 }, /* 3505 */ { MAD_F(0x067fcc68) /* 0.406200796 */, 17 }, /* 3506 */ { MAD_F(0x06806e71) /* 0.406355326 */, 17 }, /* 3507 */ { MAD_F(0x0681107e) /* 0.406509870 */, 17 }, /* 3508 */ { MAD_F(0x0681b28f) /* 0.406664429 */, 17 }, /* 3509 */ { MAD_F(0x068254a4) /* 0.406819003 */, 17 }, /* 3510 */ { MAD_F(0x0682f6bd) /* 0.406973592 */, 17 }, /* 3511 */ { MAD_F(0x068398da) /* 0.407128195 */, 17 }, /* 3512 */ { MAD_F(0x06843afb) /* 0.407282813 */, 17 }, /* 3513 */ { MAD_F(0x0684dd20) /* 0.407437445 */, 17 }, /* 3514 */ { MAD_F(0x06857f49) /* 0.407592093 */, 17 }, /* 3515 */ { MAD_F(0x06862176) /* 0.407746754 */, 17 }, /* 3516 */ { MAD_F(0x0686c3a6) /* 0.407901431 */, 17 }, /* 3517 */ { MAD_F(0x068765db) /* 0.408056122 */, 17 }, /* 3518 */ { MAD_F(0x06880814) /* 0.408210828 */, 17 }, /* 3519 */ { MAD_F(0x0688aa50) /* 0.408365549 */, 17 }, /* 3520 */ { MAD_F(0x06894c90) /* 0.408520284 */, 17 }, /* 3521 */ { MAD_F(0x0689eed5) /* 0.408675034 */, 17 }, /* 3522 */ { MAD_F(0x068a911d) /* 0.408829798 */, 17 }, /* 3523 */ { MAD_F(0x068b3369) /* 0.408984577 */, 17 }, /* 3524 */ { MAD_F(0x068bd5b9) /* 0.409139371 */, 17 }, /* 3525 */ { MAD_F(0x068c780e) /* 0.409294180 */, 17 }, /* 3526 */ { MAD_F(0x068d1a66) /* 0.409449003 */, 17 }, /* 3527 */ { MAD_F(0x068dbcc1) /* 0.409603840 */, 17 }, /* 3528 */ { MAD_F(0x068e5f21) /* 0.409758693 */, 17 }, /* 3529 */ { MAD_F(0x068f0185) /* 0.409913560 */, 17 }, /* 3530 */ { MAD_F(0x068fa3ed) /* 0.410068441 */, 17 }, /* 3531 */ { MAD_F(0x06904658) /* 0.410223338 */, 17 }, /* 3532 */ { MAD_F(0x0690e8c8) /* 0.410378249 */, 17 }, /* 3533 */ { MAD_F(0x06918b3c) /* 0.410533174 */, 17 }, /* 3534 */ { MAD_F(0x06922db3) /* 0.410688114 */, 17 }, /* 3535 */ { MAD_F(0x0692d02e) /* 0.410843069 */, 17 }, /* 3536 */ { MAD_F(0x069372ae) /* 0.410998038 */, 17 }, /* 3537 */ { MAD_F(0x06941531) /* 0.411153022 */, 17 }, /* 3538 */ { MAD_F(0x0694b7b8) /* 0.411308021 */, 17 }, /* 3539 */ { MAD_F(0x06955a43) /* 0.411463034 */, 17 }, /* 3540 */ { MAD_F(0x0695fcd2) /* 0.411618062 */, 17 }, /* 3541 */ { MAD_F(0x06969f65) /* 0.411773104 */, 17 }, /* 3542 */ { MAD_F(0x069741fb) /* 0.411928161 */, 17 }, /* 3543 */ { MAD_F(0x0697e496) /* 0.412083232 */, 17 }, /* 3544 */ { MAD_F(0x06988735) /* 0.412238319 */, 17 }, /* 3545 */ { MAD_F(0x069929d7) /* 0.412393419 */, 17 }, /* 3546 */ { MAD_F(0x0699cc7e) /* 0.412548535 */, 17 }, /* 3547 */ { MAD_F(0x069a6f28) /* 0.412703664 */, 17 }, /* 3548 */ { MAD_F(0x069b11d6) /* 0.412858809 */, 17 }, /* 3549 */ { MAD_F(0x069bb489) /* 0.413013968 */, 17 }, /* 3550 */ { MAD_F(0x069c573f) /* 0.413169142 */, 17 }, /* 3551 */ { MAD_F(0x069cf9f9) /* 0.413324330 */, 17 }, /* 3552 */ { MAD_F(0x069d9cb7) /* 0.413479532 */, 17 }, /* 3553 */ { MAD_F(0x069e3f78) /* 0.413634750 */, 17 }, /* 3554 */ { MAD_F(0x069ee23e) /* 0.413789982 */, 17 }, /* 3555 */ { MAD_F(0x069f8508) /* 0.413945228 */, 17 }, /* 3556 */ { MAD_F(0x06a027d5) /* 0.414100489 */, 17 }, /* 3557 */ { MAD_F(0x06a0caa7) /* 0.414255765 */, 17 }, /* 3558 */ { MAD_F(0x06a16d7c) /* 0.414411055 */, 17 }, /* 3559 */ { MAD_F(0x06a21055) /* 0.414566359 */, 17 }, /* 3560 */ { MAD_F(0x06a2b333) /* 0.414721679 */, 17 }, /* 3561 */ { MAD_F(0x06a35614) /* 0.414877012 */, 17 }, /* 3562 */ { MAD_F(0x06a3f8f9) /* 0.415032361 */, 17 }, /* 3563 */ { MAD_F(0x06a49be2) /* 0.415187723 */, 17 }, /* 3564 */ { MAD_F(0x06a53ece) /* 0.415343101 */, 17 }, /* 3565 */ { MAD_F(0x06a5e1bf) /* 0.415498493 */, 17 }, /* 3566 */ { MAD_F(0x06a684b4) /* 0.415653899 */, 17 }, /* 3567 */ { MAD_F(0x06a727ac) /* 0.415809320 */, 17 }, /* 3568 */ { MAD_F(0x06a7caa9) /* 0.415964756 */, 17 }, /* 3569 */ { MAD_F(0x06a86da9) /* 0.416120206 */, 17 }, /* 3570 */ { MAD_F(0x06a910ad) /* 0.416275670 */, 17 }, /* 3571 */ { MAD_F(0x06a9b3b5) /* 0.416431149 */, 17 }, /* 3572 */ { MAD_F(0x06aa56c1) /* 0.416586643 */, 17 }, /* 3573 */ { MAD_F(0x06aaf9d1) /* 0.416742151 */, 17 }, /* 3574 */ { MAD_F(0x06ab9ce5) /* 0.416897673 */, 17 }, /* 3575 */ { MAD_F(0x06ac3ffc) /* 0.417053210 */, 17 }, /* 3576 */ { MAD_F(0x06ace318) /* 0.417208762 */, 17 }, /* 3577 */ { MAD_F(0x06ad8637) /* 0.417364328 */, 17 }, /* 3578 */ { MAD_F(0x06ae295b) /* 0.417519909 */, 17 }, /* 3579 */ { MAD_F(0x06aecc82) /* 0.417675504 */, 17 }, /* 3580 */ { MAD_F(0x06af6fad) /* 0.417831113 */, 17 }, /* 3581 */ { MAD_F(0x06b012dc) /* 0.417986737 */, 17 }, /* 3582 */ { MAD_F(0x06b0b60f) /* 0.418142376 */, 17 }, /* 3583 */ { MAD_F(0x06b15946) /* 0.418298029 */, 17 }, /* 3584 */ { MAD_F(0x06b1fc81) /* 0.418453696 */, 17 }, /* 3585 */ { MAD_F(0x06b29fbf) /* 0.418609378 */, 17 }, /* 3586 */ { MAD_F(0x06b34302) /* 0.418765075 */, 17 }, /* 3587 */ { MAD_F(0x06b3e648) /* 0.418920786 */, 17 }, /* 3588 */ { MAD_F(0x06b48992) /* 0.419076511 */, 17 }, /* 3589 */ { MAD_F(0x06b52ce0) /* 0.419232251 */, 17 }, /* 3590 */ { MAD_F(0x06b5d032) /* 0.419388005 */, 17 }, /* 3591 */ { MAD_F(0x06b67388) /* 0.419543774 */, 17 }, /* 3592 */ { MAD_F(0x06b716e2) /* 0.419699557 */, 17 }, /* 3593 */ { MAD_F(0x06b7ba3f) /* 0.419855355 */, 17 }, /* 3594 */ { MAD_F(0x06b85da1) /* 0.420011167 */, 17 }, /* 3595 */ { MAD_F(0x06b90106) /* 0.420166994 */, 17 }, /* 3596 */ { MAD_F(0x06b9a470) /* 0.420322835 */, 17 }, /* 3597 */ { MAD_F(0x06ba47dd) /* 0.420478690 */, 17 }, /* 3598 */ { MAD_F(0x06baeb4e) /* 0.420634560 */, 17 }, /* 3599 */ { MAD_F(0x06bb8ec3) /* 0.420790445 */, 17 }, /* 3600 */ { MAD_F(0x06bc323b) /* 0.420946343 */, 17 }, /* 3601 */ { MAD_F(0x06bcd5b8) /* 0.421102257 */, 17 }, /* 3602 */ { MAD_F(0x06bd7939) /* 0.421258184 */, 17 }, /* 3603 */ { MAD_F(0x06be1cbd) /* 0.421414127 */, 17 }, /* 3604 */ { MAD_F(0x06bec045) /* 0.421570083 */, 17 }, /* 3605 */ { MAD_F(0x06bf63d1) /* 0.421726054 */, 17 }, /* 3606 */ { MAD_F(0x06c00761) /* 0.421882040 */, 17 }, /* 3607 */ { MAD_F(0x06c0aaf5) /* 0.422038039 */, 17 }, /* 3608 */ { MAD_F(0x06c14e8d) /* 0.422194054 */, 17 }, /* 3609 */ { MAD_F(0x06c1f229) /* 0.422350082 */, 17 }, /* 3610 */ { MAD_F(0x06c295c8) /* 0.422506125 */, 17 }, /* 3611 */ { MAD_F(0x06c3396c) /* 0.422662183 */, 17 }, /* 3612 */ { MAD_F(0x06c3dd13) /* 0.422818255 */, 17 }, /* 3613 */ { MAD_F(0x06c480be) /* 0.422974341 */, 17 }, /* 3614 */ { MAD_F(0x06c5246d) /* 0.423130442 */, 17 }, /* 3615 */ { MAD_F(0x06c5c820) /* 0.423286557 */, 17 }, /* 3616 */ { MAD_F(0x06c66bd6) /* 0.423442686 */, 17 }, /* 3617 */ { MAD_F(0x06c70f91) /* 0.423598830 */, 17 }, /* 3618 */ { MAD_F(0x06c7b34f) /* 0.423754988 */, 17 }, /* 3619 */ { MAD_F(0x06c85712) /* 0.423911161 */, 17 }, /* 3620 */ { MAD_F(0x06c8fad8) /* 0.424067348 */, 17 }, /* 3621 */ { MAD_F(0x06c99ea2) /* 0.424223550 */, 17 }, /* 3622 */ { MAD_F(0x06ca4270) /* 0.424379765 */, 17 }, /* 3623 */ { MAD_F(0x06cae641) /* 0.424535996 */, 17 }, /* 3624 */ { MAD_F(0x06cb8a17) /* 0.424692240 */, 17 }, /* 3625 */ { MAD_F(0x06cc2df0) /* 0.424848499 */, 17 }, /* 3626 */ { MAD_F(0x06ccd1ce) /* 0.425004772 */, 17 }, /* 3627 */ { MAD_F(0x06cd75af) /* 0.425161060 */, 17 }, /* 3628 */ { MAD_F(0x06ce1994) /* 0.425317362 */, 17 }, /* 3629 */ { MAD_F(0x06cebd7d) /* 0.425473678 */, 17 }, /* 3630 */ { MAD_F(0x06cf6169) /* 0.425630009 */, 17 }, /* 3631 */ { MAD_F(0x06d0055a) /* 0.425786354 */, 17 }, /* 3632 */ { MAD_F(0x06d0a94e) /* 0.425942714 */, 17 }, /* 3633 */ { MAD_F(0x06d14d47) /* 0.426099088 */, 17 }, /* 3634 */ { MAD_F(0x06d1f143) /* 0.426255476 */, 17 }, /* 3635 */ { MAD_F(0x06d29543) /* 0.426411878 */, 17 }, /* 3636 */ { MAD_F(0x06d33947) /* 0.426568295 */, 17 }, /* 3637 */ { MAD_F(0x06d3dd4e) /* 0.426724726 */, 17 }, /* 3638 */ { MAD_F(0x06d4815a) /* 0.426881172 */, 17 }, /* 3639 */ { MAD_F(0x06d52569) /* 0.427037632 */, 17 }, /* 3640 */ { MAD_F(0x06d5c97c) /* 0.427194106 */, 17 }, /* 3641 */ { MAD_F(0x06d66d93) /* 0.427350594 */, 17 }, /* 3642 */ { MAD_F(0x06d711ae) /* 0.427507097 */, 17 }, /* 3643 */ { MAD_F(0x06d7b5cd) /* 0.427663614 */, 17 }, /* 3644 */ { MAD_F(0x06d859f0) /* 0.427820146 */, 17 }, /* 3645 */ { MAD_F(0x06d8fe16) /* 0.427976692 */, 17 }, /* 3646 */ { MAD_F(0x06d9a240) /* 0.428133252 */, 17 }, /* 3647 */ { MAD_F(0x06da466f) /* 0.428289826 */, 17 }, /* 3648 */ { MAD_F(0x06daeaa1) /* 0.428446415 */, 17 }, /* 3649 */ { MAD_F(0x06db8ed6) /* 0.428603018 */, 17 }, /* 3650 */ { MAD_F(0x06dc3310) /* 0.428759635 */, 17 }, /* 3651 */ { MAD_F(0x06dcd74d) /* 0.428916267 */, 17 }, /* 3652 */ { MAD_F(0x06dd7b8f) /* 0.429072913 */, 17 }, /* 3653 */ { MAD_F(0x06de1fd4) /* 0.429229573 */, 17 }, /* 3654 */ { MAD_F(0x06dec41d) /* 0.429386248 */, 17 }, /* 3655 */ { MAD_F(0x06df686a) /* 0.429542937 */, 17 }, /* 3656 */ { MAD_F(0x06e00cbb) /* 0.429699640 */, 17 }, /* 3657 */ { MAD_F(0x06e0b10f) /* 0.429856357 */, 17 }, /* 3658 */ { MAD_F(0x06e15567) /* 0.430013089 */, 17 }, /* 3659 */ { MAD_F(0x06e1f9c4) /* 0.430169835 */, 17 }, /* 3660 */ { MAD_F(0x06e29e24) /* 0.430326595 */, 17 }, /* 3661 */ { MAD_F(0x06e34287) /* 0.430483370 */, 17 }, /* 3662 */ { MAD_F(0x06e3e6ef) /* 0.430640159 */, 17 }, /* 3663 */ { MAD_F(0x06e48b5b) /* 0.430796962 */, 17 }, /* 3664 */ { MAD_F(0x06e52fca) /* 0.430953779 */, 17 }, /* 3665 */ { MAD_F(0x06e5d43d) /* 0.431110611 */, 17 }, /* 3666 */ { MAD_F(0x06e678b4) /* 0.431267457 */, 17 }, /* 3667 */ { MAD_F(0x06e71d2f) /* 0.431424317 */, 17 }, /* 3668 */ { MAD_F(0x06e7c1ae) /* 0.431581192 */, 17 }, /* 3669 */ { MAD_F(0x06e86630) /* 0.431738080 */, 17 }, /* 3670 */ { MAD_F(0x06e90ab7) /* 0.431894983 */, 17 }, /* 3671 */ { MAD_F(0x06e9af41) /* 0.432051900 */, 17 }, /* 3672 */ { MAD_F(0x06ea53cf) /* 0.432208832 */, 17 }, /* 3673 */ { MAD_F(0x06eaf860) /* 0.432365778 */, 17 }, /* 3674 */ { MAD_F(0x06eb9cf6) /* 0.432522737 */, 17 }, /* 3675 */ { MAD_F(0x06ec418f) /* 0.432679712 */, 17 }, /* 3676 */ { MAD_F(0x06ece62d) /* 0.432836700 */, 17 }, /* 3677 */ { MAD_F(0x06ed8ace) /* 0.432993703 */, 17 }, /* 3678 */ { MAD_F(0x06ee2f73) /* 0.433150720 */, 17 }, /* 3679 */ { MAD_F(0x06eed41b) /* 0.433307751 */, 17 }, /* 3680 */ { MAD_F(0x06ef78c8) /* 0.433464796 */, 17 }, /* 3681 */ { MAD_F(0x06f01d78) /* 0.433621856 */, 17 }, /* 3682 */ { MAD_F(0x06f0c22c) /* 0.433778929 */, 17 }, /* 3683 */ { MAD_F(0x06f166e4) /* 0.433936017 */, 17 }, /* 3684 */ { MAD_F(0x06f20ba0) /* 0.434093120 */, 17 }, /* 3685 */ { MAD_F(0x06f2b060) /* 0.434250236 */, 17 }, /* 3686 */ { MAD_F(0x06f35523) /* 0.434407367 */, 17 }, /* 3687 */ { MAD_F(0x06f3f9eb) /* 0.434564512 */, 17 }, /* 3688 */ { MAD_F(0x06f49eb6) /* 0.434721671 */, 17 }, /* 3689 */ { MAD_F(0x06f54385) /* 0.434878844 */, 17 }, /* 3690 */ { MAD_F(0x06f5e857) /* 0.435036032 */, 17 }, /* 3691 */ { MAD_F(0x06f68d2e) /* 0.435193233 */, 17 }, /* 3692 */ { MAD_F(0x06f73208) /* 0.435350449 */, 17 }, /* 3693 */ { MAD_F(0x06f7d6e6) /* 0.435507679 */, 17 }, /* 3694 */ { MAD_F(0x06f87bc8) /* 0.435664924 */, 17 }, /* 3695 */ { MAD_F(0x06f920ae) /* 0.435822182 */, 17 }, /* 3696 */ { MAD_F(0x06f9c597) /* 0.435979455 */, 17 }, /* 3697 */ { MAD_F(0x06fa6a85) /* 0.436136741 */, 17 }, /* 3698 */ { MAD_F(0x06fb0f76) /* 0.436294042 */, 17 }, /* 3699 */ { MAD_F(0x06fbb46b) /* 0.436451358 */, 17 }, /* 3700 */ { MAD_F(0x06fc5964) /* 0.436608687 */, 17 }, /* 3701 */ { MAD_F(0x06fcfe60) /* 0.436766031 */, 17 }, /* 3702 */ { MAD_F(0x06fda361) /* 0.436923388 */, 17 }, /* 3703 */ { MAD_F(0x06fe4865) /* 0.437080760 */, 17 }, /* 3704 */ { MAD_F(0x06feed6d) /* 0.437238146 */, 17 }, /* 3705 */ { MAD_F(0x06ff9279) /* 0.437395547 */, 17 }, /* 3706 */ { MAD_F(0x07003788) /* 0.437552961 */, 17 }, /* 3707 */ { MAD_F(0x0700dc9c) /* 0.437710389 */, 17 }, /* 3708 */ { MAD_F(0x070181b3) /* 0.437867832 */, 17 }, /* 3709 */ { MAD_F(0x070226ce) /* 0.438025289 */, 17 }, /* 3710 */ { MAD_F(0x0702cbed) /* 0.438182760 */, 17 }, /* 3711 */ { MAD_F(0x0703710f) /* 0.438340245 */, 17 }, /* 3712 */ { MAD_F(0x07041636) /* 0.438497744 */, 17 }, /* 3713 */ { MAD_F(0x0704bb60) /* 0.438655258 */, 17 }, /* 3714 */ { MAD_F(0x0705608e) /* 0.438812785 */, 17 }, /* 3715 */ { MAD_F(0x070605c0) /* 0.438970327 */, 17 }, /* 3716 */ { MAD_F(0x0706aaf5) /* 0.439127883 */, 17 }, /* 3717 */ { MAD_F(0x0707502f) /* 0.439285453 */, 17 }, /* 3718 */ { MAD_F(0x0707f56c) /* 0.439443037 */, 17 }, /* 3719 */ { MAD_F(0x07089aad) /* 0.439600635 */, 17 }, /* 3720 */ { MAD_F(0x07093ff2) /* 0.439758248 */, 17 }, /* 3721 */ { MAD_F(0x0709e53a) /* 0.439915874 */, 17 }, /* 3722 */ { MAD_F(0x070a8a86) /* 0.440073515 */, 17 }, /* 3723 */ { MAD_F(0x070b2fd7) /* 0.440231170 */, 17 }, /* 3724 */ { MAD_F(0x070bd52a) /* 0.440388839 */, 17 }, /* 3725 */ { MAD_F(0x070c7a82) /* 0.440546522 */, 17 }, /* 3726 */ { MAD_F(0x070d1fde) /* 0.440704219 */, 17 }, /* 3727 */ { MAD_F(0x070dc53d) /* 0.440861930 */, 17 }, /* 3728 */ { MAD_F(0x070e6aa0) /* 0.441019655 */, 17 }, /* 3729 */ { MAD_F(0x070f1007) /* 0.441177395 */, 17 }, /* 3730 */ { MAD_F(0x070fb571) /* 0.441335148 */, 17 }, /* 3731 */ { MAD_F(0x07105ae0) /* 0.441492916 */, 17 }, /* 3732 */ { MAD_F(0x07110052) /* 0.441650697 */, 17 }, /* 3733 */ { MAD_F(0x0711a5c8) /* 0.441808493 */, 17 }, /* 3734 */ { MAD_F(0x07124b42) /* 0.441966303 */, 17 }, /* 3735 */ { MAD_F(0x0712f0bf) /* 0.442124127 */, 17 }, /* 3736 */ { MAD_F(0x07139641) /* 0.442281965 */, 17 }, /* 3737 */ { MAD_F(0x07143bc6) /* 0.442439817 */, 17 }, /* 3738 */ { MAD_F(0x0714e14f) /* 0.442597683 */, 17 }, /* 3739 */ { MAD_F(0x071586db) /* 0.442755564 */, 17 }, /* 3740 */ { MAD_F(0x07162c6c) /* 0.442913458 */, 17 }, /* 3741 */ { MAD_F(0x0716d200) /* 0.443071366 */, 17 }, /* 3742 */ { MAD_F(0x07177798) /* 0.443229289 */, 17 }, /* 3743 */ { MAD_F(0x07181d34) /* 0.443387226 */, 17 }, /* 3744 */ { MAD_F(0x0718c2d3) /* 0.443545176 */, 17 }, /* 3745 */ { MAD_F(0x07196877) /* 0.443703141 */, 17 }, /* 3746 */ { MAD_F(0x071a0e1e) /* 0.443861120 */, 17 }, /* 3747 */ { MAD_F(0x071ab3c9) /* 0.444019113 */, 17 }, /* 3748 */ { MAD_F(0x071b5977) /* 0.444177119 */, 17 }, /* 3749 */ { MAD_F(0x071bff2a) /* 0.444335140 */, 17 }, /* 3750 */ { MAD_F(0x071ca4e0) /* 0.444493175 */, 17 }, /* 3751 */ { MAD_F(0x071d4a9a) /* 0.444651224 */, 17 }, /* 3752 */ { MAD_F(0x071df058) /* 0.444809288 */, 17 }, /* 3753 */ { MAD_F(0x071e9619) /* 0.444967365 */, 17 }, /* 3754 */ { MAD_F(0x071f3bde) /* 0.445125456 */, 17 }, /* 3755 */ { MAD_F(0x071fe1a8) /* 0.445283561 */, 17 }, /* 3756 */ { MAD_F(0x07208774) /* 0.445441680 */, 17 }, /* 3757 */ { MAD_F(0x07212d45) /* 0.445599814 */, 17 }, /* 3758 */ { MAD_F(0x0721d319) /* 0.445757961 */, 17 }, /* 3759 */ { MAD_F(0x072278f1) /* 0.445916122 */, 17 }, /* 3760 */ { MAD_F(0x07231ecd) /* 0.446074298 */, 17 }, /* 3761 */ { MAD_F(0x0723c4ad) /* 0.446232487 */, 17 }, /* 3762 */ { MAD_F(0x07246a90) /* 0.446390690 */, 17 }, /* 3763 */ { MAD_F(0x07251077) /* 0.446548908 */, 17 }, /* 3764 */ { MAD_F(0x0725b662) /* 0.446707139 */, 17 }, /* 3765 */ { MAD_F(0x07265c51) /* 0.446865385 */, 17 }, /* 3766 */ { MAD_F(0x07270244) /* 0.447023644 */, 17 }, /* 3767 */ { MAD_F(0x0727a83a) /* 0.447181918 */, 17 }, /* 3768 */ { MAD_F(0x07284e34) /* 0.447340205 */, 17 }, /* 3769 */ { MAD_F(0x0728f431) /* 0.447498507 */, 17 }, /* 3770 */ { MAD_F(0x07299a33) /* 0.447656822 */, 17 }, /* 3771 */ { MAD_F(0x072a4038) /* 0.447815152 */, 17 }, /* 3772 */ { MAD_F(0x072ae641) /* 0.447973495 */, 17 }, /* 3773 */ { MAD_F(0x072b8c4e) /* 0.448131853 */, 17 }, /* 3774 */ { MAD_F(0x072c325e) /* 0.448290224 */, 17 }, /* 3775 */ { MAD_F(0x072cd873) /* 0.448448609 */, 17 }, /* 3776 */ { MAD_F(0x072d7e8b) /* 0.448607009 */, 17 }, /* 3777 */ { MAD_F(0x072e24a7) /* 0.448765422 */, 17 }, /* 3778 */ { MAD_F(0x072ecac6) /* 0.448923850 */, 17 }, /* 3779 */ { MAD_F(0x072f70e9) /* 0.449082291 */, 17 }, /* 3780 */ { MAD_F(0x07301710) /* 0.449240746 */, 17 }, /* 3781 */ { MAD_F(0x0730bd3b) /* 0.449399216 */, 17 }, /* 3782 */ { MAD_F(0x0731636a) /* 0.449557699 */, 17 }, /* 3783 */ { MAD_F(0x0732099c) /* 0.449716196 */, 17 }, /* 3784 */ { MAD_F(0x0732afd2) /* 0.449874708 */, 17 }, /* 3785 */ { MAD_F(0x0733560c) /* 0.450033233 */, 17 }, /* 3786 */ { MAD_F(0x0733fc49) /* 0.450191772 */, 17 }, /* 3787 */ { MAD_F(0x0734a28b) /* 0.450350325 */, 17 }, /* 3788 */ { MAD_F(0x073548d0) /* 0.450508892 */, 17 }, /* 3789 */ { MAD_F(0x0735ef18) /* 0.450667473 */, 17 }, /* 3790 */ { MAD_F(0x07369565) /* 0.450826068 */, 17 }, /* 3791 */ { MAD_F(0x07373bb5) /* 0.450984677 */, 17 }, /* 3792 */ { MAD_F(0x0737e209) /* 0.451143300 */, 17 }, /* 3793 */ { MAD_F(0x07388861) /* 0.451301937 */, 17 }, /* 3794 */ { MAD_F(0x07392ebc) /* 0.451460588 */, 17 }, /* 3795 */ { MAD_F(0x0739d51c) /* 0.451619252 */, 17 }, /* 3796 */ { MAD_F(0x073a7b7f) /* 0.451777931 */, 17 }, /* 3797 */ { MAD_F(0x073b21e5) /* 0.451936623 */, 17 }, /* 3798 */ { MAD_F(0x073bc850) /* 0.452095330 */, 17 }, /* 3799 */ { MAD_F(0x073c6ebe) /* 0.452254050 */, 17 }, /* 3800 */ { MAD_F(0x073d1530) /* 0.452412785 */, 17 }, /* 3801 */ { MAD_F(0x073dbba6) /* 0.452571533 */, 17 }, /* 3802 */ { MAD_F(0x073e621f) /* 0.452730295 */, 17 }, /* 3803 */ { MAD_F(0x073f089c) /* 0.452889071 */, 17 }, /* 3804 */ { MAD_F(0x073faf1d) /* 0.453047861 */, 17 }, /* 3805 */ { MAD_F(0x074055a2) /* 0.453206665 */, 17 }, /* 3806 */ { MAD_F(0x0740fc2a) /* 0.453365483 */, 17 }, /* 3807 */ { MAD_F(0x0741a2b6) /* 0.453524315 */, 17 }, /* 3808 */ { MAD_F(0x07424946) /* 0.453683161 */, 17 }, /* 3809 */ { MAD_F(0x0742efd9) /* 0.453842020 */, 17 }, /* 3810 */ { MAD_F(0x07439671) /* 0.454000894 */, 17 }, /* 3811 */ { MAD_F(0x07443d0c) /* 0.454159781 */, 17 }, /* 3812 */ { MAD_F(0x0744e3aa) /* 0.454318683 */, 17 }, /* 3813 */ { MAD_F(0x07458a4d) /* 0.454477598 */, 17 }, /* 3814 */ { MAD_F(0x074630f3) /* 0.454636527 */, 17 }, /* 3815 */ { MAD_F(0x0746d79d) /* 0.454795470 */, 17 }, /* 3816 */ { MAD_F(0x07477e4b) /* 0.454954427 */, 17 }, /* 3817 */ { MAD_F(0x074824fc) /* 0.455113397 */, 17 }, /* 3818 */ { MAD_F(0x0748cbb1) /* 0.455272382 */, 17 }, /* 3819 */ { MAD_F(0x0749726a) /* 0.455431381 */, 17 }, /* 3820 */ { MAD_F(0x074a1927) /* 0.455590393 */, 17 }, /* 3821 */ { MAD_F(0x074abfe7) /* 0.455749419 */, 17 }, /* 3822 */ { MAD_F(0x074b66ab) /* 0.455908459 */, 17 }, /* 3823 */ { MAD_F(0x074c0d73) /* 0.456067513 */, 17 }, /* 3824 */ { MAD_F(0x074cb43e) /* 0.456226581 */, 17 }, /* 3825 */ { MAD_F(0x074d5b0d) /* 0.456385663 */, 17 }, /* 3826 */ { MAD_F(0x074e01e0) /* 0.456544759 */, 17 }, /* 3827 */ { MAD_F(0x074ea8b7) /* 0.456703868 */, 17 }, /* 3828 */ { MAD_F(0x074f4f91) /* 0.456862992 */, 17 }, /* 3829 */ { MAD_F(0x074ff66f) /* 0.457022129 */, 17 }, /* 3830 */ { MAD_F(0x07509d51) /* 0.457181280 */, 17 }, /* 3831 */ { MAD_F(0x07514437) /* 0.457340445 */, 17 }, /* 3832 */ { MAD_F(0x0751eb20) /* 0.457499623 */, 17 }, /* 3833 */ { MAD_F(0x0752920d) /* 0.457658816 */, 17 }, /* 3834 */ { MAD_F(0x075338fd) /* 0.457818022 */, 17 }, /* 3835 */ { MAD_F(0x0753dff2) /* 0.457977243 */, 17 }, /* 3836 */ { MAD_F(0x075486ea) /* 0.458136477 */, 17 }, /* 3837 */ { MAD_F(0x07552de6) /* 0.458295725 */, 17 }, /* 3838 */ { MAD_F(0x0755d4e5) /* 0.458454987 */, 17 }, /* 3839 */ { MAD_F(0x07567be8) /* 0.458614262 */, 17 }, /* 3840 */ { MAD_F(0x075722ef) /* 0.458773552 */, 17 }, /* 3841 */ { MAD_F(0x0757c9fa) /* 0.458932855 */, 17 }, /* 3842 */ { MAD_F(0x07587108) /* 0.459092172 */, 17 }, /* 3843 */ { MAD_F(0x0759181a) /* 0.459251503 */, 17 }, /* 3844 */ { MAD_F(0x0759bf30) /* 0.459410848 */, 17 }, /* 3845 */ { MAD_F(0x075a664a) /* 0.459570206 */, 17 }, /* 3846 */ { MAD_F(0x075b0d67) /* 0.459729579 */, 17 }, /* 3847 */ { MAD_F(0x075bb488) /* 0.459888965 */, 17 }, /* 3848 */ { MAD_F(0x075c5bac) /* 0.460048365 */, 17 }, /* 3849 */ { MAD_F(0x075d02d5) /* 0.460207779 */, 17 }, /* 3850 */ { MAD_F(0x075daa01) /* 0.460367206 */, 17 }, /* 3851 */ { MAD_F(0x075e5130) /* 0.460526648 */, 17 }, /* 3852 */ { MAD_F(0x075ef864) /* 0.460686103 */, 17 }, /* 3853 */ { MAD_F(0x075f9f9b) /* 0.460845572 */, 17 }, /* 3854 */ { MAD_F(0x076046d6) /* 0.461005055 */, 17 }, /* 3855 */ { MAD_F(0x0760ee14) /* 0.461164552 */, 17 }, /* 3856 */ { MAD_F(0x07619557) /* 0.461324062 */, 17 }, /* 3857 */ { MAD_F(0x07623c9d) /* 0.461483586 */, 17 }, /* 3858 */ { MAD_F(0x0762e3e6) /* 0.461643124 */, 17 }, /* 3859 */ { MAD_F(0x07638b34) /* 0.461802676 */, 17 }, /* 3860 */ { MAD_F(0x07643285) /* 0.461962242 */, 17 }, /* 3861 */ { MAD_F(0x0764d9d9) /* 0.462121821 */, 17 }, /* 3862 */ { MAD_F(0x07658132) /* 0.462281414 */, 17 }, /* 3863 */ { MAD_F(0x0766288e) /* 0.462441021 */, 17 }, /* 3864 */ { MAD_F(0x0766cfee) /* 0.462600642 */, 17 }, /* 3865 */ { MAD_F(0x07677751) /* 0.462760276 */, 17 }, /* 3866 */ { MAD_F(0x07681eb9) /* 0.462919924 */, 17 }, /* 3867 */ { MAD_F(0x0768c624) /* 0.463079586 */, 17 }, /* 3868 */ { MAD_F(0x07696d92) /* 0.463239262 */, 17 }, /* 3869 */ { MAD_F(0x076a1505) /* 0.463398951 */, 17 }, /* 3870 */ { MAD_F(0x076abc7b) /* 0.463558655 */, 17 }, /* 3871 */ { MAD_F(0x076b63f4) /* 0.463718372 */, 17 }, /* 3872 */ { MAD_F(0x076c0b72) /* 0.463878102 */, 17 }, /* 3873 */ { MAD_F(0x076cb2f3) /* 0.464037847 */, 17 }, /* 3874 */ { MAD_F(0x076d5a78) /* 0.464197605 */, 17 }, /* 3875 */ { MAD_F(0x076e0200) /* 0.464357377 */, 17 }, /* 3876 */ { MAD_F(0x076ea98c) /* 0.464517163 */, 17 }, /* 3877 */ { MAD_F(0x076f511c) /* 0.464676962 */, 17 }, /* 3878 */ { MAD_F(0x076ff8b0) /* 0.464836776 */, 17 }, /* 3879 */ { MAD_F(0x0770a047) /* 0.464996603 */, 17 }, /* 3880 */ { MAD_F(0x077147e2) /* 0.465156443 */, 17 }, /* 3881 */ { MAD_F(0x0771ef80) /* 0.465316298 */, 17 }, /* 3882 */ { MAD_F(0x07729723) /* 0.465476166 */, 17 }, /* 3883 */ { MAD_F(0x07733ec9) /* 0.465636048 */, 17 }, /* 3884 */ { MAD_F(0x0773e672) /* 0.465795943 */, 17 }, /* 3885 */ { MAD_F(0x07748e20) /* 0.465955853 */, 17 }, /* 3886 */ { MAD_F(0x077535d1) /* 0.466115776 */, 17 }, /* 3887 */ { MAD_F(0x0775dd85) /* 0.466275713 */, 17 }, /* 3888 */ { MAD_F(0x0776853e) /* 0.466435663 */, 17 }, /* 3889 */ { MAD_F(0x07772cfa) /* 0.466595627 */, 17 }, /* 3890 */ { MAD_F(0x0777d4ba) /* 0.466755605 */, 17 }, /* 3891 */ { MAD_F(0x07787c7d) /* 0.466915597 */, 17 }, /* 3892 */ { MAD_F(0x07792444) /* 0.467075602 */, 17 }, /* 3893 */ { MAD_F(0x0779cc0f) /* 0.467235621 */, 17 }, /* 3894 */ { MAD_F(0x077a73dd) /* 0.467395654 */, 17 }, /* 3895 */ { MAD_F(0x077b1baf) /* 0.467555701 */, 17 }, /* 3896 */ { MAD_F(0x077bc385) /* 0.467715761 */, 17 }, /* 3897 */ { MAD_F(0x077c6b5f) /* 0.467875835 */, 17 }, /* 3898 */ { MAD_F(0x077d133c) /* 0.468035922 */, 17 }, /* 3899 */ { MAD_F(0x077dbb1d) /* 0.468196023 */, 17 }, /* 3900 */ { MAD_F(0x077e6301) /* 0.468356138 */, 17 }, /* 3901 */ { MAD_F(0x077f0ae9) /* 0.468516267 */, 17 }, /* 3902 */ { MAD_F(0x077fb2d5) /* 0.468676409 */, 17 }, /* 3903 */ { MAD_F(0x07805ac5) /* 0.468836565 */, 17 }, /* 3904 */ { MAD_F(0x078102b8) /* 0.468996735 */, 17 }, /* 3905 */ { MAD_F(0x0781aaaf) /* 0.469156918 */, 17 }, /* 3906 */ { MAD_F(0x078252aa) /* 0.469317115 */, 17 }, /* 3907 */ { MAD_F(0x0782faa8) /* 0.469477326 */, 17 }, /* 3908 */ { MAD_F(0x0783a2aa) /* 0.469637550 */, 17 }, /* 3909 */ { MAD_F(0x07844aaf) /* 0.469797788 */, 17 }, /* 3910 */ { MAD_F(0x0784f2b8) /* 0.469958040 */, 17 }, /* 3911 */ { MAD_F(0x07859ac5) /* 0.470118305 */, 17 }, /* 3912 */ { MAD_F(0x078642d6) /* 0.470278584 */, 17 }, /* 3913 */ { MAD_F(0x0786eaea) /* 0.470438877 */, 17 }, /* 3914 */ { MAD_F(0x07879302) /* 0.470599183 */, 17 }, /* 3915 */ { MAD_F(0x07883b1e) /* 0.470759503 */, 17 }, /* 3916 */ { MAD_F(0x0788e33d) /* 0.470919836 */, 17 }, /* 3917 */ { MAD_F(0x07898b60) /* 0.471080184 */, 17 }, /* 3918 */ { MAD_F(0x078a3386) /* 0.471240545 */, 17 }, /* 3919 */ { MAD_F(0x078adbb0) /* 0.471400919 */, 17 }, /* 3920 */ { MAD_F(0x078b83de) /* 0.471561307 */, 17 }, /* 3921 */ { MAD_F(0x078c2c10) /* 0.471721709 */, 17 }, /* 3922 */ { MAD_F(0x078cd445) /* 0.471882125 */, 17 }, /* 3923 */ { MAD_F(0x078d7c7e) /* 0.472042554 */, 17 }, /* 3924 */ { MAD_F(0x078e24ba) /* 0.472202996 */, 17 }, /* 3925 */ { MAD_F(0x078eccfb) /* 0.472363453 */, 17 }, /* 3926 */ { MAD_F(0x078f753e) /* 0.472523923 */, 17 }, /* 3927 */ { MAD_F(0x07901d86) /* 0.472684406 */, 17 }, /* 3928 */ { MAD_F(0x0790c5d1) /* 0.472844904 */, 17 }, /* 3929 */ { MAD_F(0x07916e20) /* 0.473005414 */, 17 }, /* 3930 */ { MAD_F(0x07921672) /* 0.473165939 */, 17 }, /* 3931 */ { MAD_F(0x0792bec8) /* 0.473326477 */, 17 }, /* 3932 */ { MAD_F(0x07936722) /* 0.473487029 */, 17 }, /* 3933 */ { MAD_F(0x07940f80) /* 0.473647594 */, 17 }, /* 3934 */ { MAD_F(0x0794b7e1) /* 0.473808173 */, 17 }, /* 3935 */ { MAD_F(0x07956045) /* 0.473968765 */, 17 }, /* 3936 */ { MAD_F(0x079608ae) /* 0.474129372 */, 17 }, /* 3937 */ { MAD_F(0x0796b11a) /* 0.474289991 */, 17 }, /* 3938 */ { MAD_F(0x0797598a) /* 0.474450625 */, 17 }, /* 3939 */ { MAD_F(0x079801fd) /* 0.474611272 */, 17 }, /* 3940 */ { MAD_F(0x0798aa74) /* 0.474771932 */, 17 }, /* 3941 */ { MAD_F(0x079952ee) /* 0.474932606 */, 17 }, /* 3942 */ { MAD_F(0x0799fb6d) /* 0.475093294 */, 17 }, /* 3943 */ { MAD_F(0x079aa3ef) /* 0.475253995 */, 17 }, /* 3944 */ { MAD_F(0x079b4c74) /* 0.475414710 */, 17 }, /* 3945 */ { MAD_F(0x079bf4fd) /* 0.475575439 */, 17 }, /* 3946 */ { MAD_F(0x079c9d8a) /* 0.475736181 */, 17 }, /* 3947 */ { MAD_F(0x079d461b) /* 0.475896936 */, 17 }, /* 3948 */ { MAD_F(0x079deeaf) /* 0.476057705 */, 17 }, /* 3949 */ { MAD_F(0x079e9747) /* 0.476218488 */, 17 }, /* 3950 */ { MAD_F(0x079f3fe2) /* 0.476379285 */, 17 }, /* 3951 */ { MAD_F(0x079fe881) /* 0.476540095 */, 17 }, /* 3952 */ { MAD_F(0x07a09124) /* 0.476700918 */, 17 }, /* 3953 */ { MAD_F(0x07a139ca) /* 0.476861755 */, 17 }, /* 3954 */ { MAD_F(0x07a1e274) /* 0.477022606 */, 17 }, /* 3955 */ { MAD_F(0x07a28b22) /* 0.477183470 */, 17 }, /* 3956 */ { MAD_F(0x07a333d3) /* 0.477344348 */, 17 }, /* 3957 */ { MAD_F(0x07a3dc88) /* 0.477505239 */, 17 }, /* 3958 */ { MAD_F(0x07a48541) /* 0.477666144 */, 17 }, /* 3959 */ { MAD_F(0x07a52dfd) /* 0.477827062 */, 17 }, /* 3960 */ { MAD_F(0x07a5d6bd) /* 0.477987994 */, 17 }, /* 3961 */ { MAD_F(0x07a67f80) /* 0.478148940 */, 17 }, /* 3962 */ { MAD_F(0x07a72847) /* 0.478309899 */, 17 }, /* 3963 */ { MAD_F(0x07a7d112) /* 0.478470871 */, 17 }, /* 3964 */ { MAD_F(0x07a879e1) /* 0.478631857 */, 17 }, /* 3965 */ { MAD_F(0x07a922b3) /* 0.478792857 */, 17 }, /* 3966 */ { MAD_F(0x07a9cb88) /* 0.478953870 */, 17 }, /* 3967 */ { MAD_F(0x07aa7462) /* 0.479114897 */, 17 }, /* 3968 */ { MAD_F(0x07ab1d3e) /* 0.479275937 */, 17 }, /* 3969 */ { MAD_F(0x07abc61f) /* 0.479436991 */, 17 }, /* 3970 */ { MAD_F(0x07ac6f03) /* 0.479598058 */, 17 }, /* 3971 */ { MAD_F(0x07ad17eb) /* 0.479759139 */, 17 }, /* 3972 */ { MAD_F(0x07adc0d6) /* 0.479920233 */, 17 }, /* 3973 */ { MAD_F(0x07ae69c6) /* 0.480081341 */, 17 }, /* 3974 */ { MAD_F(0x07af12b8) /* 0.480242463 */, 17 }, /* 3975 */ { MAD_F(0x07afbbaf) /* 0.480403598 */, 17 }, /* 3976 */ { MAD_F(0x07b064a8) /* 0.480564746 */, 17 }, /* 3977 */ { MAD_F(0x07b10da6) /* 0.480725908 */, 17 }, /* 3978 */ { MAD_F(0x07b1b6a7) /* 0.480887083 */, 17 }, /* 3979 */ { MAD_F(0x07b25fac) /* 0.481048272 */, 17 }, /* 3980 */ { MAD_F(0x07b308b5) /* 0.481209475 */, 17 }, /* 3981 */ { MAD_F(0x07b3b1c1) /* 0.481370691 */, 17 }, /* 3982 */ { MAD_F(0x07b45ad0) /* 0.481531920 */, 17 }, /* 3983 */ { MAD_F(0x07b503e4) /* 0.481693163 */, 17 }, /* 3984 */ { MAD_F(0x07b5acfb) /* 0.481854420 */, 17 }, /* 3985 */ { MAD_F(0x07b65615) /* 0.482015690 */, 17 }, /* 3986 */ { MAD_F(0x07b6ff33) /* 0.482176973 */, 17 }, /* 3987 */ { MAD_F(0x07b7a855) /* 0.482338270 */, 17 }, /* 3988 */ { MAD_F(0x07b8517b) /* 0.482499580 */, 17 }, /* 3989 */ { MAD_F(0x07b8faa4) /* 0.482660904 */, 17 }, /* 3990 */ { MAD_F(0x07b9a3d0) /* 0.482822242 */, 17 }, /* 3991 */ { MAD_F(0x07ba4d01) /* 0.482983592 */, 17 }, /* 3992 */ { MAD_F(0x07baf635) /* 0.483144957 */, 17 }, /* 3993 */ { MAD_F(0x07bb9f6c) /* 0.483306335 */, 17 }, /* 3994 */ { MAD_F(0x07bc48a7) /* 0.483467726 */, 17 }, /* 3995 */ { MAD_F(0x07bcf1e6) /* 0.483629131 */, 17 }, /* 3996 */ { MAD_F(0x07bd9b28) /* 0.483790549 */, 17 }, /* 3997 */ { MAD_F(0x07be446e) /* 0.483951980 */, 17 }, /* 3998 */ { MAD_F(0x07beedb8) /* 0.484113426 */, 17 }, /* 3999 */ { MAD_F(0x07bf9705) /* 0.484274884 */, 17 }, /* 4000 */ { MAD_F(0x07c04056) /* 0.484436356 */, 17 }, /* 4001 */ { MAD_F(0x07c0e9aa) /* 0.484597842 */, 17 }, /* 4002 */ { MAD_F(0x07c19302) /* 0.484759341 */, 17 }, /* 4003 */ { MAD_F(0x07c23c5e) /* 0.484920853 */, 17 }, /* 4004 */ { MAD_F(0x07c2e5bd) /* 0.485082379 */, 17 }, /* 4005 */ { MAD_F(0x07c38f20) /* 0.485243918 */, 17 }, /* 4006 */ { MAD_F(0x07c43887) /* 0.485405471 */, 17 }, /* 4007 */ { MAD_F(0x07c4e1f1) /* 0.485567037 */, 17 }, /* 4008 */ { MAD_F(0x07c58b5f) /* 0.485728617 */, 17 }, /* 4009 */ { MAD_F(0x07c634d0) /* 0.485890210 */, 17 }, /* 4010 */ { MAD_F(0x07c6de45) /* 0.486051817 */, 17 }, /* 4011 */ { MAD_F(0x07c787bd) /* 0.486213436 */, 17 }, /* 4012 */ { MAD_F(0x07c83139) /* 0.486375070 */, 17 }, /* 4013 */ { MAD_F(0x07c8dab9) /* 0.486536717 */, 17 }, /* 4014 */ { MAD_F(0x07c9843c) /* 0.486698377 */, 17 }, /* 4015 */ { MAD_F(0x07ca2dc3) /* 0.486860051 */, 17 }, /* 4016 */ { MAD_F(0x07cad74e) /* 0.487021738 */, 17 }, /* 4017 */ { MAD_F(0x07cb80dc) /* 0.487183438 */, 17 }, /* 4018 */ { MAD_F(0x07cc2a6e) /* 0.487345152 */, 17 }, /* 4019 */ { MAD_F(0x07ccd403) /* 0.487506879 */, 17 }, /* 4020 */ { MAD_F(0x07cd7d9c) /* 0.487668620 */, 17 }, /* 4021 */ { MAD_F(0x07ce2739) /* 0.487830374 */, 17 }, /* 4022 */ { MAD_F(0x07ced0d9) /* 0.487992142 */, 17 }, /* 4023 */ { MAD_F(0x07cf7a7d) /* 0.488153923 */, 17 }, /* 4024 */ { MAD_F(0x07d02424) /* 0.488315717 */, 17 }, /* 4025 */ { MAD_F(0x07d0cdcf) /* 0.488477525 */, 17 }, /* 4026 */ { MAD_F(0x07d1777e) /* 0.488639346 */, 17 }, /* 4027 */ { MAD_F(0x07d22130) /* 0.488801181 */, 17 }, /* 4028 */ { MAD_F(0x07d2cae5) /* 0.488963029 */, 17 }, /* 4029 */ { MAD_F(0x07d3749f) /* 0.489124890 */, 17 }, /* 4030 */ { MAD_F(0x07d41e5c) /* 0.489286765 */, 17 }, /* 4031 */ { MAD_F(0x07d4c81c) /* 0.489448653 */, 17 }, /* 4032 */ { MAD_F(0x07d571e0) /* 0.489610555 */, 17 }, /* 4033 */ { MAD_F(0x07d61ba8) /* 0.489772470 */, 17 }, /* 4034 */ { MAD_F(0x07d6c573) /* 0.489934398 */, 17 }, /* 4035 */ { MAD_F(0x07d76f42) /* 0.490096340 */, 17 }, /* 4036 */ { MAD_F(0x07d81915) /* 0.490258295 */, 17 }, /* 4037 */ { MAD_F(0x07d8c2eb) /* 0.490420263 */, 17 }, /* 4038 */ { MAD_F(0x07d96cc4) /* 0.490582245 */, 17 }, /* 4039 */ { MAD_F(0x07da16a2) /* 0.490744240 */, 17 }, /* 4040 */ { MAD_F(0x07dac083) /* 0.490906249 */, 17 }, /* 4041 */ { MAD_F(0x07db6a67) /* 0.491068271 */, 17 }, /* 4042 */ { MAD_F(0x07dc144f) /* 0.491230306 */, 17 }, /* 4043 */ { MAD_F(0x07dcbe3b) /* 0.491392355 */, 17 }, /* 4044 */ { MAD_F(0x07dd682a) /* 0.491554417 */, 17 }, /* 4045 */ { MAD_F(0x07de121d) /* 0.491716492 */, 17 }, /* 4046 */ { MAD_F(0x07debc13) /* 0.491878581 */, 17 }, /* 4047 */ { MAD_F(0x07df660d) /* 0.492040683 */, 17 }, /* 4048 */ { MAD_F(0x07e0100a) /* 0.492202799 */, 17 }, /* 4049 */ { MAD_F(0x07e0ba0c) /* 0.492364928 */, 17 }, /* 4050 */ { MAD_F(0x07e16410) /* 0.492527070 */, 17 }, /* 4051 */ { MAD_F(0x07e20e19) /* 0.492689225 */, 17 }, /* 4052 */ { MAD_F(0x07e2b824) /* 0.492851394 */, 17 }, /* 4053 */ { MAD_F(0x07e36234) /* 0.493013576 */, 17 }, /* 4054 */ { MAD_F(0x07e40c47) /* 0.493175772 */, 17 }, /* 4055 */ { MAD_F(0x07e4b65e) /* 0.493337981 */, 17 }, /* 4056 */ { MAD_F(0x07e56078) /* 0.493500203 */, 17 }, /* 4057 */ { MAD_F(0x07e60a95) /* 0.493662438 */, 17 }, /* 4058 */ { MAD_F(0x07e6b4b7) /* 0.493824687 */, 17 }, /* 4059 */ { MAD_F(0x07e75edc) /* 0.493986949 */, 17 }, /* 4060 */ { MAD_F(0x07e80904) /* 0.494149225 */, 17 }, /* 4061 */ { MAD_F(0x07e8b330) /* 0.494311514 */, 17 }, /* 4062 */ { MAD_F(0x07e95d60) /* 0.494473816 */, 17 }, /* 4063 */ { MAD_F(0x07ea0793) /* 0.494636131 */, 17 }, /* 4064 */ { MAD_F(0x07eab1ca) /* 0.494798460 */, 17 }, /* 4065 */ { MAD_F(0x07eb5c04) /* 0.494960802 */, 17 }, /* 4066 */ { MAD_F(0x07ec0642) /* 0.495123158 */, 17 }, /* 4067 */ { MAD_F(0x07ecb084) /* 0.495285526 */, 17 }, /* 4068 */ { MAD_F(0x07ed5ac9) /* 0.495447908 */, 17 }, /* 4069 */ { MAD_F(0x07ee0512) /* 0.495610304 */, 17 }, /* 4070 */ { MAD_F(0x07eeaf5e) /* 0.495772712 */, 17 }, /* 4071 */ { MAD_F(0x07ef59ae) /* 0.495935134 */, 17 }, /* 4072 */ { MAD_F(0x07f00401) /* 0.496097570 */, 17 }, /* 4073 */ { MAD_F(0x07f0ae58) /* 0.496260018 */, 17 }, /* 4074 */ { MAD_F(0x07f158b3) /* 0.496422480 */, 17 }, /* 4075 */ { MAD_F(0x07f20311) /* 0.496584955 */, 17 }, /* 4076 */ { MAD_F(0x07f2ad72) /* 0.496747444 */, 17 }, /* 4077 */ { MAD_F(0x07f357d8) /* 0.496909945 */, 17 }, /* 4078 */ { MAD_F(0x07f40240) /* 0.497072460 */, 17 }, /* 4079 */ { MAD_F(0x07f4acad) /* 0.497234989 */, 17 }, /* 4080 */ { MAD_F(0x07f5571d) /* 0.497397530 */, 17 }, /* 4081 */ { MAD_F(0x07f60190) /* 0.497560085 */, 17 }, /* 4082 */ { MAD_F(0x07f6ac07) /* 0.497722653 */, 17 }, /* 4083 */ { MAD_F(0x07f75682) /* 0.497885235 */, 17 }, /* 4084 */ { MAD_F(0x07f80100) /* 0.498047829 */, 17 }, /* 4085 */ { MAD_F(0x07f8ab82) /* 0.498210437 */, 17 }, /* 4086 */ { MAD_F(0x07f95607) /* 0.498373058 */, 17 }, /* 4087 */ { MAD_F(0x07fa0090) /* 0.498535693 */, 17 }, /* 4088 */ { MAD_F(0x07faab1c) /* 0.498698341 */, 17 }, /* 4089 */ { MAD_F(0x07fb55ac) /* 0.498861002 */, 17 }, /* 4090 */ { MAD_F(0x07fc0040) /* 0.499023676 */, 17 }, /* 4091 */ { MAD_F(0x07fcaad7) /* 0.499186364 */, 17 }, /* 4092 */ { MAD_F(0x07fd5572) /* 0.499349064 */, 17 }, /* 4093 */ { MAD_F(0x07fe0010) /* 0.499511778 */, 17 }, /* 4094 */ { MAD_F(0x07feaab2) /* 0.499674506 */, 17 }, /* 4095 */ { MAD_F(0x07ff5557) /* 0.499837246 */, 17 }, /* 4096 */ { MAD_F(0x04000000) /* 0.250000000 */, 18 }, /* 4097 */ { MAD_F(0x04005556) /* 0.250081384 */, 18 }, /* 4098 */ { MAD_F(0x0400aaae) /* 0.250162774 */, 18 }, /* 4099 */ { MAD_F(0x04010008) /* 0.250244170 */, 18 }, /* 4100 */ { MAD_F(0x04015563) /* 0.250325574 */, 18 }, /* 4101 */ { MAD_F(0x0401aac1) /* 0.250406984 */, 18 }, /* 4102 */ { MAD_F(0x04020020) /* 0.250488400 */, 18 }, /* 4103 */ { MAD_F(0x04025581) /* 0.250569824 */, 18 }, /* 4104 */ { MAD_F(0x0402aae3) /* 0.250651254 */, 18 }, /* 4105 */ { MAD_F(0x04030048) /* 0.250732690 */, 18 }, /* 4106 */ { MAD_F(0x040355ae) /* 0.250814133 */, 18 }, /* 4107 */ { MAD_F(0x0403ab16) /* 0.250895583 */, 18 }, /* 4108 */ { MAD_F(0x04040080) /* 0.250977039 */, 18 }, /* 4109 */ { MAD_F(0x040455eb) /* 0.251058502 */, 18 }, /* 4110 */ { MAD_F(0x0404ab59) /* 0.251139971 */, 18 }, /* 4111 */ { MAD_F(0x040500c8) /* 0.251221448 */, 18 }, /* 4112 */ { MAD_F(0x04055638) /* 0.251302930 */, 18 }, /* 4113 */ { MAD_F(0x0405abab) /* 0.251384420 */, 18 }, /* 4114 */ { MAD_F(0x0406011f) /* 0.251465916 */, 18 }, /* 4115 */ { MAD_F(0x04065696) /* 0.251547418 */, 18 }, /* 4116 */ { MAD_F(0x0406ac0e) /* 0.251628927 */, 18 }, /* 4117 */ { MAD_F(0x04070187) /* 0.251710443 */, 18 }, /* 4118 */ { MAD_F(0x04075703) /* 0.251791965 */, 18 }, /* 4119 */ { MAD_F(0x0407ac80) /* 0.251873494 */, 18 }, /* 4120 */ { MAD_F(0x040801ff) /* 0.251955030 */, 18 }, /* 4121 */ { MAD_F(0x04085780) /* 0.252036572 */, 18 }, /* 4122 */ { MAD_F(0x0408ad02) /* 0.252118121 */, 18 }, /* 4123 */ { MAD_F(0x04090287) /* 0.252199676 */, 18 }, /* 4124 */ { MAD_F(0x0409580d) /* 0.252281238 */, 18 }, /* 4125 */ { MAD_F(0x0409ad95) /* 0.252362807 */, 18 }, /* 4126 */ { MAD_F(0x040a031e) /* 0.252444382 */, 18 }, /* 4127 */ { MAD_F(0x040a58aa) /* 0.252525963 */, 18 }, /* 4128 */ { MAD_F(0x040aae37) /* 0.252607552 */, 18 }, /* 4129 */ { MAD_F(0x040b03c6) /* 0.252689147 */, 18 }, /* 4130 */ { MAD_F(0x040b5957) /* 0.252770748 */, 18 }, /* 4131 */ { MAD_F(0x040baee9) /* 0.252852356 */, 18 }, /* 4132 */ { MAD_F(0x040c047e) /* 0.252933971 */, 18 }, /* 4133 */ { MAD_F(0x040c5a14) /* 0.253015592 */, 18 }, /* 4134 */ { MAD_F(0x040cafab) /* 0.253097220 */, 18 }, /* 4135 */ { MAD_F(0x040d0545) /* 0.253178854 */, 18 }, /* 4136 */ { MAD_F(0x040d5ae0) /* 0.253260495 */, 18 }, /* 4137 */ { MAD_F(0x040db07d) /* 0.253342143 */, 18 }, /* 4138 */ { MAD_F(0x040e061c) /* 0.253423797 */, 18 }, /* 4139 */ { MAD_F(0x040e5bbd) /* 0.253505457 */, 18 }, /* 4140 */ { MAD_F(0x040eb15f) /* 0.253587125 */, 18 }, /* 4141 */ { MAD_F(0x040f0703) /* 0.253668799 */, 18 }, /* 4142 */ { MAD_F(0x040f5ca9) /* 0.253750479 */, 18 }, /* 4143 */ { MAD_F(0x040fb251) /* 0.253832166 */, 18 }, /* 4144 */ { MAD_F(0x041007fa) /* 0.253913860 */, 18 }, /* 4145 */ { MAD_F(0x04105da6) /* 0.253995560 */, 18 }, /* 4146 */ { MAD_F(0x0410b353) /* 0.254077266 */, 18 }, /* 4147 */ { MAD_F(0x04110901) /* 0.254158980 */, 18 }, /* 4148 */ { MAD_F(0x04115eb2) /* 0.254240700 */, 18 }, /* 4149 */ { MAD_F(0x0411b464) /* 0.254322426 */, 18 }, /* 4150 */ { MAD_F(0x04120a18) /* 0.254404159 */, 18 }, /* 4151 */ { MAD_F(0x04125fce) /* 0.254485899 */, 18 }, /* 4152 */ { MAD_F(0x0412b586) /* 0.254567645 */, 18 }, /* 4153 */ { MAD_F(0x04130b3f) /* 0.254649397 */, 18 }, /* 4154 */ { MAD_F(0x041360fa) /* 0.254731157 */, 18 }, /* 4155 */ { MAD_F(0x0413b6b7) /* 0.254812922 */, 18 }, /* 4156 */ { MAD_F(0x04140c75) /* 0.254894695 */, 18 }, /* 4157 */ { MAD_F(0x04146236) /* 0.254976474 */, 18 }, /* 4158 */ { MAD_F(0x0414b7f8) /* 0.255058259 */, 18 }, /* 4159 */ { MAD_F(0x04150dbc) /* 0.255140051 */, 18 }, /* 4160 */ { MAD_F(0x04156381) /* 0.255221850 */, 18 }, /* 4161 */ { MAD_F(0x0415b949) /* 0.255303655 */, 18 }, /* 4162 */ { MAD_F(0x04160f12) /* 0.255385467 */, 18 }, /* 4163 */ { MAD_F(0x041664dd) /* 0.255467285 */, 18 }, /* 4164 */ { MAD_F(0x0416baaa) /* 0.255549110 */, 18 }, /* 4165 */ { MAD_F(0x04171078) /* 0.255630941 */, 18 }, /* 4166 */ { MAD_F(0x04176648) /* 0.255712779 */, 18 }, /* 4167 */ { MAD_F(0x0417bc1a) /* 0.255794624 */, 18 }, /* 4168 */ { MAD_F(0x041811ee) /* 0.255876475 */, 18 }, /* 4169 */ { MAD_F(0x041867c3) /* 0.255958332 */, 18 }, /* 4170 */ { MAD_F(0x0418bd9b) /* 0.256040196 */, 18 }, /* 4171 */ { MAD_F(0x04191374) /* 0.256122067 */, 18 }, /* 4172 */ { MAD_F(0x0419694e) /* 0.256203944 */, 18 }, /* 4173 */ { MAD_F(0x0419bf2b) /* 0.256285828 */, 18 }, /* 4174 */ { MAD_F(0x041a1509) /* 0.256367718 */, 18 }, /* 4175 */ { MAD_F(0x041a6ae9) /* 0.256449615 */, 18 }, /* 4176 */ { MAD_F(0x041ac0cb) /* 0.256531518 */, 18 }, /* 4177 */ { MAD_F(0x041b16ae) /* 0.256613428 */, 18 }, /* 4178 */ { MAD_F(0x041b6c94) /* 0.256695344 */, 18 }, /* 4179 */ { MAD_F(0x041bc27b) /* 0.256777267 */, 18 }, /* 4180 */ { MAD_F(0x041c1863) /* 0.256859197 */, 18 }, /* 4181 */ { MAD_F(0x041c6e4e) /* 0.256941133 */, 18 }, /* 4182 */ { MAD_F(0x041cc43a) /* 0.257023076 */, 18 }, /* 4183 */ { MAD_F(0x041d1a28) /* 0.257105025 */, 18 }, /* 4184 */ { MAD_F(0x041d7018) /* 0.257186980 */, 18 }, /* 4185 */ { MAD_F(0x041dc60a) /* 0.257268942 */, 18 }, /* 4186 */ { MAD_F(0x041e1bfd) /* 0.257350911 */, 18 }, /* 4187 */ { MAD_F(0x041e71f2) /* 0.257432886 */, 18 }, /* 4188 */ { MAD_F(0x041ec7e9) /* 0.257514868 */, 18 }, /* 4189 */ { MAD_F(0x041f1de1) /* 0.257596856 */, 18 }, /* 4190 */ { MAD_F(0x041f73dc) /* 0.257678851 */, 18 }, /* 4191 */ { MAD_F(0x041fc9d8) /* 0.257760852 */, 18 }, /* 4192 */ { MAD_F(0x04201fd5) /* 0.257842860 */, 18 }, /* 4193 */ { MAD_F(0x042075d5) /* 0.257924875 */, 18 }, /* 4194 */ { MAD_F(0x0420cbd6) /* 0.258006895 */, 18 }, /* 4195 */ { MAD_F(0x042121d9) /* 0.258088923 */, 18 }, /* 4196 */ { MAD_F(0x042177de) /* 0.258170957 */, 18 }, /* 4197 */ { MAD_F(0x0421cde5) /* 0.258252997 */, 18 }, /* 4198 */ { MAD_F(0x042223ed) /* 0.258335044 */, 18 }, /* 4199 */ { MAD_F(0x042279f7) /* 0.258417097 */, 18 }, /* 4200 */ { MAD_F(0x0422d003) /* 0.258499157 */, 18 }, /* 4201 */ { MAD_F(0x04232611) /* 0.258581224 */, 18 }, /* 4202 */ { MAD_F(0x04237c20) /* 0.258663297 */, 18 }, /* 4203 */ { MAD_F(0x0423d231) /* 0.258745376 */, 18 }, /* 4204 */ { MAD_F(0x04242844) /* 0.258827462 */, 18 }, /* 4205 */ { MAD_F(0x04247e58) /* 0.258909555 */, 18 }, /* 4206 */ { MAD_F(0x0424d46e) /* 0.258991654 */, 18 }, /* 4207 */ { MAD_F(0x04252a87) /* 0.259073760 */, 18 }, /* 4208 */ { MAD_F(0x042580a0) /* 0.259155872 */, 18 }, /* 4209 */ { MAD_F(0x0425d6bc) /* 0.259237990 */, 18 }, /* 4210 */ { MAD_F(0x04262cd9) /* 0.259320115 */, 18 }, /* 4211 */ { MAD_F(0x042682f8) /* 0.259402247 */, 18 }, /* 4212 */ { MAD_F(0x0426d919) /* 0.259484385 */, 18 }, /* 4213 */ { MAD_F(0x04272f3b) /* 0.259566529 */, 18 }, /* 4214 */ { MAD_F(0x04278560) /* 0.259648680 */, 18 }, /* 4215 */ { MAD_F(0x0427db86) /* 0.259730838 */, 18 }, /* 4216 */ { MAD_F(0x042831ad) /* 0.259813002 */, 18 }, /* 4217 */ { MAD_F(0x042887d7) /* 0.259895173 */, 18 }, /* 4218 */ { MAD_F(0x0428de02) /* 0.259977350 */, 18 }, /* 4219 */ { MAD_F(0x0429342f) /* 0.260059533 */, 18 }, /* 4220 */ { MAD_F(0x04298a5e) /* 0.260141723 */, 18 }, /* 4221 */ { MAD_F(0x0429e08e) /* 0.260223920 */, 18 }, /* 4222 */ { MAD_F(0x042a36c0) /* 0.260306123 */, 18 }, /* 4223 */ { MAD_F(0x042a8cf4) /* 0.260388332 */, 18 }, /* 4224 */ { MAD_F(0x042ae32a) /* 0.260470548 */, 18 }, /* 4225 */ { MAD_F(0x042b3962) /* 0.260552771 */, 18 }, /* 4226 */ { MAD_F(0x042b8f9b) /* 0.260635000 */, 18 }, /* 4227 */ { MAD_F(0x042be5d6) /* 0.260717235 */, 18 }, /* 4228 */ { MAD_F(0x042c3c12) /* 0.260799477 */, 18 }, /* 4229 */ { MAD_F(0x042c9251) /* 0.260881725 */, 18 }, /* 4230 */ { MAD_F(0x042ce891) /* 0.260963980 */, 18 }, /* 4231 */ { MAD_F(0x042d3ed3) /* 0.261046242 */, 18 }, /* 4232 */ { MAD_F(0x042d9516) /* 0.261128510 */, 18 }, /* 4233 */ { MAD_F(0x042deb5c) /* 0.261210784 */, 18 }, /* 4234 */ { MAD_F(0x042e41a3) /* 0.261293065 */, 18 }, /* 4235 */ { MAD_F(0x042e97ec) /* 0.261375352 */, 18 }, /* 4236 */ { MAD_F(0x042eee36) /* 0.261457646 */, 18 }, /* 4237 */ { MAD_F(0x042f4482) /* 0.261539946 */, 18 }, /* 4238 */ { MAD_F(0x042f9ad1) /* 0.261622253 */, 18 }, /* 4239 */ { MAD_F(0x042ff120) /* 0.261704566 */, 18 }, /* 4240 */ { MAD_F(0x04304772) /* 0.261786886 */, 18 }, /* 4241 */ { MAD_F(0x04309dc5) /* 0.261869212 */, 18 }, /* 4242 */ { MAD_F(0x0430f41a) /* 0.261951545 */, 18 }, /* 4243 */ { MAD_F(0x04314a71) /* 0.262033884 */, 18 }, /* 4244 */ { MAD_F(0x0431a0c9) /* 0.262116229 */, 18 }, /* 4245 */ { MAD_F(0x0431f723) /* 0.262198581 */, 18 }, /* 4246 */ { MAD_F(0x04324d7f) /* 0.262280940 */, 18 }, /* 4247 */ { MAD_F(0x0432a3dd) /* 0.262363305 */, 18 }, /* 4248 */ { MAD_F(0x0432fa3d) /* 0.262445676 */, 18 }, /* 4249 */ { MAD_F(0x0433509e) /* 0.262528054 */, 18 }, /* 4250 */ { MAD_F(0x0433a701) /* 0.262610438 */, 18 }, /* 4251 */ { MAD_F(0x0433fd65) /* 0.262692829 */, 18 }, /* 4252 */ { MAD_F(0x043453cc) /* 0.262775227 */, 18 }, /* 4253 */ { MAD_F(0x0434aa34) /* 0.262857630 */, 18 }, /* 4254 */ { MAD_F(0x0435009d) /* 0.262940040 */, 18 }, /* 4255 */ { MAD_F(0x04355709) /* 0.263022457 */, 18 }, /* 4256 */ { MAD_F(0x0435ad76) /* 0.263104880 */, 18 }, /* 4257 */ { MAD_F(0x043603e5) /* 0.263187310 */, 18 }, /* 4258 */ { MAD_F(0x04365a56) /* 0.263269746 */, 18 }, /* 4259 */ { MAD_F(0x0436b0c9) /* 0.263352188 */, 18 }, /* 4260 */ { MAD_F(0x0437073d) /* 0.263434637 */, 18 }, /* 4261 */ { MAD_F(0x04375db3) /* 0.263517093 */, 18 }, /* 4262 */ { MAD_F(0x0437b42a) /* 0.263599554 */, 18 }, /* 4263 */ { MAD_F(0x04380aa4) /* 0.263682023 */, 18 }, /* 4264 */ { MAD_F(0x0438611f) /* 0.263764497 */, 18 }, /* 4265 */ { MAD_F(0x0438b79c) /* 0.263846979 */, 18 }, /* 4266 */ { MAD_F(0x04390e1a) /* 0.263929466 */, 18 }, /* 4267 */ { MAD_F(0x0439649b) /* 0.264011960 */, 18 }, /* 4268 */ { MAD_F(0x0439bb1d) /* 0.264094461 */, 18 }, /* 4269 */ { MAD_F(0x043a11a1) /* 0.264176968 */, 18 }, /* 4270 */ { MAD_F(0x043a6826) /* 0.264259481 */, 18 }, /* 4271 */ { MAD_F(0x043abead) /* 0.264342001 */, 18 }, /* 4272 */ { MAD_F(0x043b1536) /* 0.264424527 */, 18 }, /* 4273 */ { MAD_F(0x043b6bc1) /* 0.264507060 */, 18 }, /* 4274 */ { MAD_F(0x043bc24d) /* 0.264589599 */, 18 }, /* 4275 */ { MAD_F(0x043c18dc) /* 0.264672145 */, 18 }, /* 4276 */ { MAD_F(0x043c6f6c) /* 0.264754697 */, 18 }, /* 4277 */ { MAD_F(0x043cc5fd) /* 0.264837255 */, 18 }, /* 4278 */ { MAD_F(0x043d1c91) /* 0.264919820 */, 18 }, /* 4279 */ { MAD_F(0x043d7326) /* 0.265002392 */, 18 }, /* 4280 */ { MAD_F(0x043dc9bc) /* 0.265084969 */, 18 }, /* 4281 */ { MAD_F(0x043e2055) /* 0.265167554 */, 18 }, /* 4282 */ { MAD_F(0x043e76ef) /* 0.265250144 */, 18 }, /* 4283 */ { MAD_F(0x043ecd8b) /* 0.265332741 */, 18 }, /* 4284 */ { MAD_F(0x043f2429) /* 0.265415345 */, 18 }, /* 4285 */ { MAD_F(0x043f7ac8) /* 0.265497955 */, 18 }, /* 4286 */ { MAD_F(0x043fd169) /* 0.265580571 */, 18 }, /* 4287 */ { MAD_F(0x0440280c) /* 0.265663194 */, 18 }, /* 4288 */ { MAD_F(0x04407eb1) /* 0.265745823 */, 18 }, /* 4289 */ { MAD_F(0x0440d557) /* 0.265828459 */, 18 }, /* 4290 */ { MAD_F(0x04412bff) /* 0.265911101 */, 18 }, /* 4291 */ { MAD_F(0x044182a9) /* 0.265993749 */, 18 }, /* 4292 */ { MAD_F(0x0441d955) /* 0.266076404 */, 18 }, /* 4293 */ { MAD_F(0x04423002) /* 0.266159065 */, 18 }, /* 4294 */ { MAD_F(0x044286b1) /* 0.266241733 */, 18 }, /* 4295 */ { MAD_F(0x0442dd61) /* 0.266324407 */, 18 }, /* 4296 */ { MAD_F(0x04433414) /* 0.266407088 */, 18 }, /* 4297 */ { MAD_F(0x04438ac8) /* 0.266489775 */, 18 }, /* 4298 */ { MAD_F(0x0443e17e) /* 0.266572468 */, 18 }, /* 4299 */ { MAD_F(0x04443835) /* 0.266655168 */, 18 }, /* 4300 */ { MAD_F(0x04448eef) /* 0.266737874 */, 18 }, /* 4301 */ { MAD_F(0x0444e5aa) /* 0.266820587 */, 18 }, /* 4302 */ { MAD_F(0x04453c66) /* 0.266903306 */, 18 }, /* 4303 */ { MAD_F(0x04459325) /* 0.266986031 */, 18 }, /* 4304 */ { MAD_F(0x0445e9e5) /* 0.267068763 */, 18 }, /* 4305 */ { MAD_F(0x044640a7) /* 0.267151501 */, 18 }, /* 4306 */ { MAD_F(0x0446976a) /* 0.267234246 */, 18 }, /* 4307 */ { MAD_F(0x0446ee30) /* 0.267316997 */, 18 }, /* 4308 */ { MAD_F(0x044744f7) /* 0.267399755 */, 18 }, /* 4309 */ { MAD_F(0x04479bc0) /* 0.267482518 */, 18 }, /* 4310 */ { MAD_F(0x0447f28a) /* 0.267565289 */, 18 }, /* 4311 */ { MAD_F(0x04484956) /* 0.267648065 */, 18 }, /* 4312 */ { MAD_F(0x0448a024) /* 0.267730848 */, 18 }, /* 4313 */ { MAD_F(0x0448f6f4) /* 0.267813638 */, 18 }, /* 4314 */ { MAD_F(0x04494dc5) /* 0.267896434 */, 18 }, /* 4315 */ { MAD_F(0x0449a498) /* 0.267979236 */, 18 }, /* 4316 */ { MAD_F(0x0449fb6d) /* 0.268062045 */, 18 }, /* 4317 */ { MAD_F(0x044a5243) /* 0.268144860 */, 18 }, /* 4318 */ { MAD_F(0x044aa91c) /* 0.268227681 */, 18 }, /* 4319 */ { MAD_F(0x044afff6) /* 0.268310509 */, 18 }, /* 4320 */ { MAD_F(0x044b56d1) /* 0.268393343 */, 18 }, /* 4321 */ { MAD_F(0x044badaf) /* 0.268476184 */, 18 }, /* 4322 */ { MAD_F(0x044c048e) /* 0.268559031 */, 18 }, /* 4323 */ { MAD_F(0x044c5b6f) /* 0.268641885 */, 18 }, /* 4324 */ { MAD_F(0x044cb251) /* 0.268724744 */, 18 }, /* 4325 */ { MAD_F(0x044d0935) /* 0.268807611 */, 18 }, /* 4326 */ { MAD_F(0x044d601b) /* 0.268890483 */, 18 }, /* 4327 */ { MAD_F(0x044db703) /* 0.268973362 */, 18 }, /* 4328 */ { MAD_F(0x044e0dec) /* 0.269056248 */, 18 }, /* 4329 */ { MAD_F(0x044e64d7) /* 0.269139139 */, 18 }, /* 4330 */ { MAD_F(0x044ebbc4) /* 0.269222037 */, 18 }, /* 4331 */ { MAD_F(0x044f12b3) /* 0.269304942 */, 18 }, /* 4332 */ { MAD_F(0x044f69a3) /* 0.269387853 */, 18 }, /* 4333 */ { MAD_F(0x044fc095) /* 0.269470770 */, 18 }, /* 4334 */ { MAD_F(0x04501788) /* 0.269553694 */, 18 }, /* 4335 */ { MAD_F(0x04506e7e) /* 0.269636624 */, 18 }, /* 4336 */ { MAD_F(0x0450c575) /* 0.269719560 */, 18 }, /* 4337 */ { MAD_F(0x04511c6e) /* 0.269802503 */, 18 }, /* 4338 */ { MAD_F(0x04517368) /* 0.269885452 */, 18 }, /* 4339 */ { MAD_F(0x0451ca64) /* 0.269968408 */, 18 }, /* 4340 */ { MAD_F(0x04522162) /* 0.270051370 */, 18 }, /* 4341 */ { MAD_F(0x04527862) /* 0.270134338 */, 18 }, /* 4342 */ { MAD_F(0x0452cf63) /* 0.270217312 */, 18 }, /* 4343 */ { MAD_F(0x04532666) /* 0.270300293 */, 18 }, /* 4344 */ { MAD_F(0x04537d6b) /* 0.270383281 */, 18 }, /* 4345 */ { MAD_F(0x0453d472) /* 0.270466275 */, 18 }, /* 4346 */ { MAD_F(0x04542b7a) /* 0.270549275 */, 18 }, /* 4347 */ { MAD_F(0x04548284) /* 0.270632281 */, 18 }, /* 4348 */ { MAD_F(0x0454d98f) /* 0.270715294 */, 18 }, /* 4349 */ { MAD_F(0x0455309c) /* 0.270798313 */, 18 }, /* 4350 */ { MAD_F(0x045587ab) /* 0.270881339 */, 18 }, /* 4351 */ { MAD_F(0x0455debc) /* 0.270964371 */, 18 }, /* 4352 */ { MAD_F(0x045635cf) /* 0.271047409 */, 18 }, /* 4353 */ { MAD_F(0x04568ce3) /* 0.271130454 */, 18 }, /* 4354 */ { MAD_F(0x0456e3f9) /* 0.271213505 */, 18 }, /* 4355 */ { MAD_F(0x04573b10) /* 0.271296562 */, 18 }, /* 4356 */ { MAD_F(0x04579229) /* 0.271379626 */, 18 }, /* 4357 */ { MAD_F(0x0457e944) /* 0.271462696 */, 18 }, /* 4358 */ { MAD_F(0x04584061) /* 0.271545772 */, 18 }, /* 4359 */ { MAD_F(0x0458977f) /* 0.271628855 */, 18 }, /* 4360 */ { MAD_F(0x0458ee9f) /* 0.271711944 */, 18 }, /* 4361 */ { MAD_F(0x045945c1) /* 0.271795040 */, 18 }, /* 4362 */ { MAD_F(0x04599ce5) /* 0.271878142 */, 18 }, /* 4363 */ { MAD_F(0x0459f40a) /* 0.271961250 */, 18 }, /* 4364 */ { MAD_F(0x045a4b31) /* 0.272044365 */, 18 }, /* 4365 */ { MAD_F(0x045aa259) /* 0.272127486 */, 18 }, /* 4366 */ { MAD_F(0x045af984) /* 0.272210613 */, 18 }, /* 4367 */ { MAD_F(0x045b50b0) /* 0.272293746 */, 18 }, /* 4368 */ { MAD_F(0x045ba7dd) /* 0.272376886 */, 18 }, /* 4369 */ { MAD_F(0x045bff0d) /* 0.272460033 */, 18 }, /* 4370 */ { MAD_F(0x045c563e) /* 0.272543185 */, 18 }, /* 4371 */ { MAD_F(0x045cad71) /* 0.272626344 */, 18 }, /* 4372 */ { MAD_F(0x045d04a5) /* 0.272709510 */, 18 }, /* 4373 */ { MAD_F(0x045d5bdc) /* 0.272792681 */, 18 }, /* 4374 */ { MAD_F(0x045db313) /* 0.272875859 */, 18 }, /* 4375 */ { MAD_F(0x045e0a4d) /* 0.272959044 */, 18 }, /* 4376 */ { MAD_F(0x045e6188) /* 0.273042234 */, 18 }, /* 4377 */ { MAD_F(0x045eb8c5) /* 0.273125431 */, 18 }, /* 4378 */ { MAD_F(0x045f1004) /* 0.273208635 */, 18 }, /* 4379 */ { MAD_F(0x045f6745) /* 0.273291844 */, 18 }, /* 4380 */ { MAD_F(0x045fbe87) /* 0.273375060 */, 18 }, /* 4381 */ { MAD_F(0x046015cb) /* 0.273458283 */, 18 }, /* 4382 */ { MAD_F(0x04606d10) /* 0.273541511 */, 18 }, /* 4383 */ { MAD_F(0x0460c457) /* 0.273624747 */, 18 }, /* 4384 */ { MAD_F(0x04611ba0) /* 0.273707988 */, 18 }, /* 4385 */ { MAD_F(0x046172eb) /* 0.273791236 */, 18 }, /* 4386 */ { MAD_F(0x0461ca37) /* 0.273874490 */, 18 }, /* 4387 */ { MAD_F(0x04622185) /* 0.273957750 */, 18 }, /* 4388 */ { MAD_F(0x046278d5) /* 0.274041017 */, 18 }, /* 4389 */ { MAD_F(0x0462d026) /* 0.274124290 */, 18 }, /* 4390 */ { MAD_F(0x0463277a) /* 0.274207569 */, 18 }, /* 4391 */ { MAD_F(0x04637ece) /* 0.274290855 */, 18 }, /* 4392 */ { MAD_F(0x0463d625) /* 0.274374147 */, 18 }, /* 4393 */ { MAD_F(0x04642d7d) /* 0.274457445 */, 18 }, /* 4394 */ { MAD_F(0x046484d7) /* 0.274540749 */, 18 }, /* 4395 */ { MAD_F(0x0464dc33) /* 0.274624060 */, 18 }, /* 4396 */ { MAD_F(0x04653390) /* 0.274707378 */, 18 }, /* 4397 */ { MAD_F(0x04658aef) /* 0.274790701 */, 18 }, /* 4398 */ { MAD_F(0x0465e250) /* 0.274874031 */, 18 }, /* 4399 */ { MAD_F(0x046639b2) /* 0.274957367 */, 18 }, /* 4400 */ { MAD_F(0x04669116) /* 0.275040710 */, 18 }, /* 4401 */ { MAD_F(0x0466e87c) /* 0.275124059 */, 18 }, /* 4402 */ { MAD_F(0x04673fe3) /* 0.275207414 */, 18 }, /* 4403 */ { MAD_F(0x0467974d) /* 0.275290775 */, 18 }, /* 4404 */ { MAD_F(0x0467eeb7) /* 0.275374143 */, 18 }, /* 4405 */ { MAD_F(0x04684624) /* 0.275457517 */, 18 }, /* 4406 */ { MAD_F(0x04689d92) /* 0.275540897 */, 18 }, /* 4407 */ { MAD_F(0x0468f502) /* 0.275624284 */, 18 }, /* 4408 */ { MAD_F(0x04694c74) /* 0.275707677 */, 18 }, /* 4409 */ { MAD_F(0x0469a3e7) /* 0.275791076 */, 18 }, /* 4410 */ { MAD_F(0x0469fb5c) /* 0.275874482 */, 18 }, /* 4411 */ { MAD_F(0x046a52d3) /* 0.275957894 */, 18 }, /* 4412 */ { MAD_F(0x046aaa4b) /* 0.276041312 */, 18 }, /* 4413 */ { MAD_F(0x046b01c5) /* 0.276124737 */, 18 }, /* 4414 */ { MAD_F(0x046b5941) /* 0.276208167 */, 18 }, /* 4415 */ { MAD_F(0x046bb0bf) /* 0.276291605 */, 18 }, /* 4416 */ { MAD_F(0x046c083e) /* 0.276375048 */, 18 }, /* 4417 */ { MAD_F(0x046c5fbf) /* 0.276458498 */, 18 }, /* 4418 */ { MAD_F(0x046cb741) /* 0.276541954 */, 18 }, /* 4419 */ { MAD_F(0x046d0ec5) /* 0.276625416 */, 18 }, /* 4420 */ { MAD_F(0x046d664b) /* 0.276708885 */, 18 }, /* 4421 */ { MAD_F(0x046dbdd3) /* 0.276792360 */, 18 }, /* 4422 */ { MAD_F(0x046e155c) /* 0.276875841 */, 18 }, /* 4423 */ { MAD_F(0x046e6ce7) /* 0.276959328 */, 18 }, /* 4424 */ { MAD_F(0x046ec474) /* 0.277042822 */, 18 }, /* 4425 */ { MAD_F(0x046f1c02) /* 0.277126322 */, 18 }, /* 4426 */ { MAD_F(0x046f7392) /* 0.277209829 */, 18 }, /* 4427 */ { MAD_F(0x046fcb24) /* 0.277293341 */, 18 }, /* 4428 */ { MAD_F(0x047022b8) /* 0.277376860 */, 18 }, /* 4429 */ { MAD_F(0x04707a4d) /* 0.277460385 */, 18 }, /* 4430 */ { MAD_F(0x0470d1e4) /* 0.277543917 */, 18 }, /* 4431 */ { MAD_F(0x0471297c) /* 0.277627455 */, 18 }, /* 4432 */ { MAD_F(0x04718116) /* 0.277710999 */, 18 }, /* 4433 */ { MAD_F(0x0471d8b2) /* 0.277794549 */, 18 }, /* 4434 */ { MAD_F(0x04723050) /* 0.277878106 */, 18 }, /* 4435 */ { MAD_F(0x047287ef) /* 0.277961669 */, 18 }, /* 4436 */ { MAD_F(0x0472df90) /* 0.278045238 */, 18 }, /* 4437 */ { MAD_F(0x04733733) /* 0.278128813 */, 18 }, /* 4438 */ { MAD_F(0x04738ed7) /* 0.278212395 */, 18 }, /* 4439 */ { MAD_F(0x0473e67d) /* 0.278295983 */, 18 }, /* 4440 */ { MAD_F(0x04743e25) /* 0.278379578 */, 18 }, /* 4441 */ { MAD_F(0x047495ce) /* 0.278463178 */, 18 }, /* 4442 */ { MAD_F(0x0474ed79) /* 0.278546785 */, 18 }, /* 4443 */ { MAD_F(0x04754526) /* 0.278630398 */, 18 }, /* 4444 */ { MAD_F(0x04759cd4) /* 0.278714018 */, 18 }, /* 4445 */ { MAD_F(0x0475f484) /* 0.278797643 */, 18 }, /* 4446 */ { MAD_F(0x04764c36) /* 0.278881275 */, 18 }, /* 4447 */ { MAD_F(0x0476a3ea) /* 0.278964914 */, 18 }, /* 4448 */ { MAD_F(0x0476fb9f) /* 0.279048558 */, 18 }, /* 4449 */ { MAD_F(0x04775356) /* 0.279132209 */, 18 }, /* 4450 */ { MAD_F(0x0477ab0e) /* 0.279215866 */, 18 }, /* 4451 */ { MAD_F(0x047802c8) /* 0.279299529 */, 18 }, /* 4452 */ { MAD_F(0x04785a84) /* 0.279383199 */, 18 }, /* 4453 */ { MAD_F(0x0478b242) /* 0.279466875 */, 18 }, /* 4454 */ { MAD_F(0x04790a01) /* 0.279550557 */, 18 }, /* 4455 */ { MAD_F(0x047961c2) /* 0.279634245 */, 18 }, /* 4456 */ { MAD_F(0x0479b984) /* 0.279717940 */, 18 }, /* 4457 */ { MAD_F(0x047a1149) /* 0.279801641 */, 18 }, /* 4458 */ { MAD_F(0x047a690f) /* 0.279885348 */, 18 }, /* 4459 */ { MAD_F(0x047ac0d6) /* 0.279969061 */, 18 }, /* 4460 */ { MAD_F(0x047b18a0) /* 0.280052781 */, 18 }, /* 4461 */ { MAD_F(0x047b706b) /* 0.280136507 */, 18 }, /* 4462 */ { MAD_F(0x047bc837) /* 0.280220239 */, 18 }, /* 4463 */ { MAD_F(0x047c2006) /* 0.280303978 */, 18 }, /* 4464 */ { MAD_F(0x047c77d6) /* 0.280387722 */, 18 }, /* 4465 */ { MAD_F(0x047ccfa8) /* 0.280471473 */, 18 }, /* 4466 */ { MAD_F(0x047d277b) /* 0.280555230 */, 18 }, /* 4467 */ { MAD_F(0x047d7f50) /* 0.280638994 */, 18 }, /* 4468 */ { MAD_F(0x047dd727) /* 0.280722764 */, 18 }, /* 4469 */ { MAD_F(0x047e2eff) /* 0.280806540 */, 18 }, /* 4470 */ { MAD_F(0x047e86d9) /* 0.280890322 */, 18 }, /* 4471 */ { MAD_F(0x047edeb5) /* 0.280974110 */, 18 }, /* 4472 */ { MAD_F(0x047f3693) /* 0.281057905 */, 18 }, /* 4473 */ { MAD_F(0x047f8e72) /* 0.281141706 */, 18 }, /* 4474 */ { MAD_F(0x047fe653) /* 0.281225513 */, 18 }, /* 4475 */ { MAD_F(0x04803e35) /* 0.281309326 */, 18 }, /* 4476 */ { MAD_F(0x04809619) /* 0.281393146 */, 18 }, /* 4477 */ { MAD_F(0x0480edff) /* 0.281476972 */, 18 }, /* 4478 */ { MAD_F(0x048145e7) /* 0.281560804 */, 18 }, /* 4479 */ { MAD_F(0x04819dd0) /* 0.281644643 */, 18 }, /* 4480 */ { MAD_F(0x0481f5bb) /* 0.281728487 */, 18 }, /* 4481 */ { MAD_F(0x04824da7) /* 0.281812338 */, 18 }, /* 4482 */ { MAD_F(0x0482a595) /* 0.281896195 */, 18 }, /* 4483 */ { MAD_F(0x0482fd85) /* 0.281980059 */, 18 }, /* 4484 */ { MAD_F(0x04835577) /* 0.282063928 */, 18 }, /* 4485 */ { MAD_F(0x0483ad6a) /* 0.282147804 */, 18 }, /* 4486 */ { MAD_F(0x0484055f) /* 0.282231686 */, 18 }, /* 4487 */ { MAD_F(0x04845d56) /* 0.282315574 */, 18 }, /* 4488 */ { MAD_F(0x0484b54e) /* 0.282399469 */, 18 }, /* 4489 */ { MAD_F(0x04850d48) /* 0.282483370 */, 18 }, /* 4490 */ { MAD_F(0x04856544) /* 0.282567277 */, 18 }, /* 4491 */ { MAD_F(0x0485bd41) /* 0.282651190 */, 18 }, /* 4492 */ { MAD_F(0x04861540) /* 0.282735109 */, 18 }, /* 4493 */ { MAD_F(0x04866d40) /* 0.282819035 */, 18 }, /* 4494 */ { MAD_F(0x0486c543) /* 0.282902967 */, 18 }, /* 4495 */ { MAD_F(0x04871d47) /* 0.282986905 */, 18 }, /* 4496 */ { MAD_F(0x0487754c) /* 0.283070849 */, 18 }, /* 4497 */ { MAD_F(0x0487cd54) /* 0.283154800 */, 18 }, /* 4498 */ { MAD_F(0x0488255d) /* 0.283238757 */, 18 }, /* 4499 */ { MAD_F(0x04887d67) /* 0.283322720 */, 18 }, /* 4500 */ { MAD_F(0x0488d574) /* 0.283406689 */, 18 }, /* 4501 */ { MAD_F(0x04892d82) /* 0.283490665 */, 18 }, /* 4502 */ { MAD_F(0x04898591) /* 0.283574646 */, 18 }, /* 4503 */ { MAD_F(0x0489dda3) /* 0.283658634 */, 18 }, /* 4504 */ { MAD_F(0x048a35b6) /* 0.283742628 */, 18 }, /* 4505 */ { MAD_F(0x048a8dca) /* 0.283826629 */, 18 }, /* 4506 */ { MAD_F(0x048ae5e1) /* 0.283910635 */, 18 }, /* 4507 */ { MAD_F(0x048b3df9) /* 0.283994648 */, 18 }, /* 4508 */ { MAD_F(0x048b9612) /* 0.284078667 */, 18 }, /* 4509 */ { MAD_F(0x048bee2e) /* 0.284162692 */, 18 }, /* 4510 */ { MAD_F(0x048c464b) /* 0.284246723 */, 18 }, /* 4511 */ { MAD_F(0x048c9e69) /* 0.284330761 */, 18 }, /* 4512 */ { MAD_F(0x048cf68a) /* 0.284414805 */, 18 }, /* 4513 */ { MAD_F(0x048d4eac) /* 0.284498855 */, 18 }, /* 4514 */ { MAD_F(0x048da6cf) /* 0.284582911 */, 18 }, /* 4515 */ { MAD_F(0x048dfef5) /* 0.284666974 */, 18 }, /* 4516 */ { MAD_F(0x048e571c) /* 0.284751042 */, 18 }, /* 4517 */ { MAD_F(0x048eaf44) /* 0.284835117 */, 18 }, /* 4518 */ { MAD_F(0x048f076f) /* 0.284919198 */, 18 }, /* 4519 */ { MAD_F(0x048f5f9b) /* 0.285003285 */, 18 }, /* 4520 */ { MAD_F(0x048fb7c8) /* 0.285087379 */, 18 }, /* 4521 */ { MAD_F(0x04900ff8) /* 0.285171479 */, 18 }, /* 4522 */ { MAD_F(0x04906829) /* 0.285255584 */, 18 }, /* 4523 */ { MAD_F(0x0490c05b) /* 0.285339697 */, 18 }, /* 4524 */ { MAD_F(0x04911890) /* 0.285423815 */, 18 }, /* 4525 */ { MAD_F(0x049170c6) /* 0.285507939 */, 18 }, /* 4526 */ { MAD_F(0x0491c8fd) /* 0.285592070 */, 18 }, /* 4527 */ { MAD_F(0x04922137) /* 0.285676207 */, 18 }, /* 4528 */ { MAD_F(0x04927972) /* 0.285760350 */, 18 }, /* 4529 */ { MAD_F(0x0492d1ae) /* 0.285844499 */, 18 }, /* 4530 */ { MAD_F(0x049329ed) /* 0.285928655 */, 18 }, /* 4531 */ { MAD_F(0x0493822c) /* 0.286012816 */, 18 }, /* 4532 */ { MAD_F(0x0493da6e) /* 0.286096984 */, 18 }, /* 4533 */ { MAD_F(0x049432b1) /* 0.286181158 */, 18 }, /* 4534 */ { MAD_F(0x04948af6) /* 0.286265338 */, 18 }, /* 4535 */ { MAD_F(0x0494e33d) /* 0.286349525 */, 18 }, /* 4536 */ { MAD_F(0x04953b85) /* 0.286433717 */, 18 }, /* 4537 */ { MAD_F(0x049593cf) /* 0.286517916 */, 18 }, /* 4538 */ { MAD_F(0x0495ec1b) /* 0.286602121 */, 18 }, /* 4539 */ { MAD_F(0x04964468) /* 0.286686332 */, 18 }, /* 4540 */ { MAD_F(0x04969cb7) /* 0.286770550 */, 18 }, /* 4541 */ { MAD_F(0x0496f508) /* 0.286854773 */, 18 }, /* 4542 */ { MAD_F(0x04974d5a) /* 0.286939003 */, 18 }, /* 4543 */ { MAD_F(0x0497a5ae) /* 0.287023239 */, 18 }, /* 4544 */ { MAD_F(0x0497fe03) /* 0.287107481 */, 18 }, /* 4545 */ { MAD_F(0x0498565a) /* 0.287191729 */, 18 }, /* 4546 */ { MAD_F(0x0498aeb3) /* 0.287275983 */, 18 }, /* 4547 */ { MAD_F(0x0499070e) /* 0.287360244 */, 18 }, /* 4548 */ { MAD_F(0x04995f6a) /* 0.287444511 */, 18 }, /* 4549 */ { MAD_F(0x0499b7c8) /* 0.287528784 */, 18 }, /* 4550 */ { MAD_F(0x049a1027) /* 0.287613063 */, 18 }, /* 4551 */ { MAD_F(0x049a6889) /* 0.287697348 */, 18 }, /* 4552 */ { MAD_F(0x049ac0eb) /* 0.287781640 */, 18 }, /* 4553 */ { MAD_F(0x049b1950) /* 0.287865937 */, 18 }, /* 4554 */ { MAD_F(0x049b71b6) /* 0.287950241 */, 18 }, /* 4555 */ { MAD_F(0x049bca1e) /* 0.288034551 */, 18 }, /* 4556 */ { MAD_F(0x049c2287) /* 0.288118867 */, 18 }, /* 4557 */ { MAD_F(0x049c7af2) /* 0.288203190 */, 18 }, /* 4558 */ { MAD_F(0x049cd35f) /* 0.288287518 */, 18 }, /* 4559 */ { MAD_F(0x049d2bce) /* 0.288371853 */, 18 }, /* 4560 */ { MAD_F(0x049d843e) /* 0.288456194 */, 18 }, /* 4561 */ { MAD_F(0x049ddcaf) /* 0.288540541 */, 18 }, /* 4562 */ { MAD_F(0x049e3523) /* 0.288624894 */, 18 }, /* 4563 */ { MAD_F(0x049e8d98) /* 0.288709253 */, 18 }, /* 4564 */ { MAD_F(0x049ee60e) /* 0.288793619 */, 18 }, /* 4565 */ { MAD_F(0x049f3e87) /* 0.288877990 */, 18 }, /* 4566 */ { MAD_F(0x049f9701) /* 0.288962368 */, 18 }, /* 4567 */ { MAD_F(0x049fef7c) /* 0.289046752 */, 18 }, /* 4568 */ { MAD_F(0x04a047fa) /* 0.289131142 */, 18 }, /* 4569 */ { MAD_F(0x04a0a079) /* 0.289215538 */, 18 }, /* 4570 */ { MAD_F(0x04a0f8f9) /* 0.289299941 */, 18 }, /* 4571 */ { MAD_F(0x04a1517c) /* 0.289384349 */, 18 }, /* 4572 */ { MAD_F(0x04a1a9ff) /* 0.289468764 */, 18 }, /* 4573 */ { MAD_F(0x04a20285) /* 0.289553185 */, 18 }, /* 4574 */ { MAD_F(0x04a25b0c) /* 0.289637612 */, 18 }, /* 4575 */ { MAD_F(0x04a2b395) /* 0.289722045 */, 18 }, /* 4576 */ { MAD_F(0x04a30c20) /* 0.289806485 */, 18 }, /* 4577 */ { MAD_F(0x04a364ac) /* 0.289890930 */, 18 }, /* 4578 */ { MAD_F(0x04a3bd3a) /* 0.289975382 */, 18 }, /* 4579 */ { MAD_F(0x04a415c9) /* 0.290059840 */, 18 }, /* 4580 */ { MAD_F(0x04a46e5a) /* 0.290144304 */, 18 }, /* 4581 */ { MAD_F(0x04a4c6ed) /* 0.290228774 */, 18 }, /* 4582 */ { MAD_F(0x04a51f81) /* 0.290313250 */, 18 }, /* 4583 */ { MAD_F(0x04a57818) /* 0.290397733 */, 18 }, /* 4584 */ { MAD_F(0x04a5d0af) /* 0.290482221 */, 18 }, /* 4585 */ { MAD_F(0x04a62949) /* 0.290566716 */, 18 }, /* 4586 */ { MAD_F(0x04a681e4) /* 0.290651217 */, 18 }, /* 4587 */ { MAD_F(0x04a6da80) /* 0.290735724 */, 18 }, /* 4588 */ { MAD_F(0x04a7331f) /* 0.290820237 */, 18 }, /* 4589 */ { MAD_F(0x04a78bbf) /* 0.290904756 */, 18 }, /* 4590 */ { MAD_F(0x04a7e460) /* 0.290989281 */, 18 }, /* 4591 */ { MAD_F(0x04a83d03) /* 0.291073813 */, 18 }, /* 4592 */ { MAD_F(0x04a895a8) /* 0.291158351 */, 18 }, /* 4593 */ { MAD_F(0x04a8ee4f) /* 0.291242894 */, 18 }, /* 4594 */ { MAD_F(0x04a946f7) /* 0.291327444 */, 18 }, /* 4595 */ { MAD_F(0x04a99fa1) /* 0.291412001 */, 18 }, /* 4596 */ { MAD_F(0x04a9f84c) /* 0.291496563 */, 18 }, /* 4597 */ { MAD_F(0x04aa50fa) /* 0.291581131 */, 18 }, /* 4598 */ { MAD_F(0x04aaa9a8) /* 0.291665706 */, 18 }, /* 4599 */ { MAD_F(0x04ab0259) /* 0.291750286 */, 18 }, /* 4600 */ { MAD_F(0x04ab5b0b) /* 0.291834873 */, 18 }, /* 4601 */ { MAD_F(0x04abb3bf) /* 0.291919466 */, 18 }, /* 4602 */ { MAD_F(0x04ac0c74) /* 0.292004065 */, 18 }, /* 4603 */ { MAD_F(0x04ac652b) /* 0.292088670 */, 18 }, /* 4604 */ { MAD_F(0x04acbde4) /* 0.292173281 */, 18 }, /* 4605 */ { MAD_F(0x04ad169e) /* 0.292257899 */, 18 }, /* 4606 */ { MAD_F(0x04ad6f5a) /* 0.292342522 */, 18 }, /* 4607 */ { MAD_F(0x04adc818) /* 0.292427152 */, 18 }, /* 4608 */ { MAD_F(0x04ae20d7) /* 0.292511788 */, 18 }, /* 4609 */ { MAD_F(0x04ae7998) /* 0.292596430 */, 18 }, /* 4610 */ { MAD_F(0x04aed25a) /* 0.292681078 */, 18 }, /* 4611 */ { MAD_F(0x04af2b1e) /* 0.292765732 */, 18 }, /* 4612 */ { MAD_F(0x04af83e4) /* 0.292850392 */, 18 }, /* 4613 */ { MAD_F(0x04afdcac) /* 0.292935058 */, 18 }, /* 4614 */ { MAD_F(0x04b03575) /* 0.293019731 */, 18 }, /* 4615 */ { MAD_F(0x04b08e40) /* 0.293104409 */, 18 }, /* 4616 */ { MAD_F(0x04b0e70c) /* 0.293189094 */, 18 }, /* 4617 */ { MAD_F(0x04b13fda) /* 0.293273785 */, 18 }, /* 4618 */ { MAD_F(0x04b198aa) /* 0.293358482 */, 18 }, /* 4619 */ { MAD_F(0x04b1f17b) /* 0.293443185 */, 18 }, /* 4620 */ { MAD_F(0x04b24a4e) /* 0.293527894 */, 18 }, /* 4621 */ { MAD_F(0x04b2a322) /* 0.293612609 */, 18 }, /* 4622 */ { MAD_F(0x04b2fbf9) /* 0.293697331 */, 18 }, /* 4623 */ { MAD_F(0x04b354d1) /* 0.293782058 */, 18 }, /* 4624 */ { MAD_F(0x04b3adaa) /* 0.293866792 */, 18 }, /* 4625 */ { MAD_F(0x04b40685) /* 0.293951532 */, 18 }, /* 4626 */ { MAD_F(0x04b45f62) /* 0.294036278 */, 18 }, /* 4627 */ { MAD_F(0x04b4b840) /* 0.294121029 */, 18 }, /* 4628 */ { MAD_F(0x04b51120) /* 0.294205788 */, 18 }, /* 4629 */ { MAD_F(0x04b56a02) /* 0.294290552 */, 18 }, /* 4630 */ { MAD_F(0x04b5c2e6) /* 0.294375322 */, 18 }, /* 4631 */ { MAD_F(0x04b61bcb) /* 0.294460098 */, 18 }, /* 4632 */ { MAD_F(0x04b674b1) /* 0.294544881 */, 18 }, /* 4633 */ { MAD_F(0x04b6cd99) /* 0.294629669 */, 18 }, /* 4634 */ { MAD_F(0x04b72683) /* 0.294714464 */, 18 }, /* 4635 */ { MAD_F(0x04b77f6f) /* 0.294799265 */, 18 }, /* 4636 */ { MAD_F(0x04b7d85c) /* 0.294884072 */, 18 }, /* 4637 */ { MAD_F(0x04b8314b) /* 0.294968885 */, 18 }, /* 4638 */ { MAD_F(0x04b88a3b) /* 0.295053704 */, 18 }, /* 4639 */ { MAD_F(0x04b8e32d) /* 0.295138529 */, 18 }, /* 4640 */ { MAD_F(0x04b93c21) /* 0.295223360 */, 18 }, /* 4641 */ { MAD_F(0x04b99516) /* 0.295308197 */, 18 }, /* 4642 */ { MAD_F(0x04b9ee0d) /* 0.295393041 */, 18 }, /* 4643 */ { MAD_F(0x04ba4706) /* 0.295477890 */, 18 }, /* 4644 */ { MAD_F(0x04baa000) /* 0.295562746 */, 18 }, /* 4645 */ { MAD_F(0x04baf8fc) /* 0.295647608 */, 18 }, /* 4646 */ { MAD_F(0x04bb51fa) /* 0.295732476 */, 18 }, /* 4647 */ { MAD_F(0x04bbaaf9) /* 0.295817349 */, 18 }, /* 4648 */ { MAD_F(0x04bc03fa) /* 0.295902229 */, 18 }, /* 4649 */ { MAD_F(0x04bc5cfc) /* 0.295987115 */, 18 }, /* 4650 */ { MAD_F(0x04bcb600) /* 0.296072008 */, 18 }, /* 4651 */ { MAD_F(0x04bd0f06) /* 0.296156906 */, 18 }, /* 4652 */ { MAD_F(0x04bd680d) /* 0.296241810 */, 18 }, /* 4653 */ { MAD_F(0x04bdc116) /* 0.296326721 */, 18 }, /* 4654 */ { MAD_F(0x04be1a21) /* 0.296411637 */, 18 }, /* 4655 */ { MAD_F(0x04be732d) /* 0.296496560 */, 18 }, /* 4656 */ { MAD_F(0x04becc3b) /* 0.296581488 */, 18 }, /* 4657 */ { MAD_F(0x04bf254a) /* 0.296666423 */, 18 }, /* 4658 */ { MAD_F(0x04bf7e5b) /* 0.296751364 */, 18 }, /* 4659 */ { MAD_F(0x04bfd76e) /* 0.296836311 */, 18 }, /* 4660 */ { MAD_F(0x04c03083) /* 0.296921264 */, 18 }, /* 4661 */ { MAD_F(0x04c08999) /* 0.297006223 */, 18 }, /* 4662 */ { MAD_F(0x04c0e2b0) /* 0.297091188 */, 18 }, /* 4663 */ { MAD_F(0x04c13bca) /* 0.297176159 */, 18 }, /* 4664 */ { MAD_F(0x04c194e4) /* 0.297261136 */, 18 }, /* 4665 */ { MAD_F(0x04c1ee01) /* 0.297346120 */, 18 }, /* 4666 */ { MAD_F(0x04c2471f) /* 0.297431109 */, 18 }, /* 4667 */ { MAD_F(0x04c2a03f) /* 0.297516105 */, 18 }, /* 4668 */ { MAD_F(0x04c2f960) /* 0.297601106 */, 18 }, /* 4669 */ { MAD_F(0x04c35283) /* 0.297686114 */, 18 }, /* 4670 */ { MAD_F(0x04c3aba8) /* 0.297771128 */, 18 }, /* 4671 */ { MAD_F(0x04c404ce) /* 0.297856147 */, 18 }, /* 4672 */ { MAD_F(0x04c45df6) /* 0.297941173 */, 18 }, /* 4673 */ { MAD_F(0x04c4b720) /* 0.298026205 */, 18 }, /* 4674 */ { MAD_F(0x04c5104b) /* 0.298111243 */, 18 }, /* 4675 */ { MAD_F(0x04c56978) /* 0.298196287 */, 18 }, /* 4676 */ { MAD_F(0x04c5c2a7) /* 0.298281337 */, 18 }, /* 4677 */ { MAD_F(0x04c61bd7) /* 0.298366393 */, 18 }, /* 4678 */ { MAD_F(0x04c67508) /* 0.298451456 */, 18 }, /* 4679 */ { MAD_F(0x04c6ce3c) /* 0.298536524 */, 18 }, /* 4680 */ { MAD_F(0x04c72771) /* 0.298621598 */, 18 }, /* 4681 */ { MAD_F(0x04c780a7) /* 0.298706679 */, 18 }, /* 4682 */ { MAD_F(0x04c7d9df) /* 0.298791765 */, 18 }, /* 4683 */ { MAD_F(0x04c83319) /* 0.298876858 */, 18 }, /* 4684 */ { MAD_F(0x04c88c55) /* 0.298961956 */, 18 }, /* 4685 */ { MAD_F(0x04c8e592) /* 0.299047061 */, 18 }, /* 4686 */ { MAD_F(0x04c93ed1) /* 0.299132172 */, 18 }, /* 4687 */ { MAD_F(0x04c99811) /* 0.299217288 */, 18 }, /* 4688 */ { MAD_F(0x04c9f153) /* 0.299302411 */, 18 }, /* 4689 */ { MAD_F(0x04ca4a97) /* 0.299387540 */, 18 }, /* 4690 */ { MAD_F(0x04caa3dc) /* 0.299472675 */, 18 }, /* 4691 */ { MAD_F(0x04cafd23) /* 0.299557816 */, 18 }, /* 4692 */ { MAD_F(0x04cb566b) /* 0.299642963 */, 18 }, /* 4693 */ { MAD_F(0x04cbafb5) /* 0.299728116 */, 18 }, /* 4694 */ { MAD_F(0x04cc0901) /* 0.299813275 */, 18 }, /* 4695 */ { MAD_F(0x04cc624e) /* 0.299898440 */, 18 }, /* 4696 */ { MAD_F(0x04ccbb9d) /* 0.299983611 */, 18 }, /* 4697 */ { MAD_F(0x04cd14ee) /* 0.300068789 */, 18 }, /* 4698 */ { MAD_F(0x04cd6e40) /* 0.300153972 */, 18 }, /* 4699 */ { MAD_F(0x04cdc794) /* 0.300239161 */, 18 }, /* 4700 */ { MAD_F(0x04ce20e9) /* 0.300324357 */, 18 }, /* 4701 */ { MAD_F(0x04ce7a40) /* 0.300409558 */, 18 }, /* 4702 */ { MAD_F(0x04ced399) /* 0.300494765 */, 18 }, /* 4703 */ { MAD_F(0x04cf2cf3) /* 0.300579979 */, 18 }, /* 4704 */ { MAD_F(0x04cf864f) /* 0.300665198 */, 18 }, /* 4705 */ { MAD_F(0x04cfdfad) /* 0.300750424 */, 18 }, /* 4706 */ { MAD_F(0x04d0390c) /* 0.300835656 */, 18 }, /* 4707 */ { MAD_F(0x04d0926d) /* 0.300920893 */, 18 }, /* 4708 */ { MAD_F(0x04d0ebcf) /* 0.301006137 */, 18 }, /* 4709 */ { MAD_F(0x04d14533) /* 0.301091387 */, 18 }, /* 4710 */ { MAD_F(0x04d19e99) /* 0.301176643 */, 18 }, /* 4711 */ { MAD_F(0x04d1f800) /* 0.301261904 */, 18 }, /* 4712 */ { MAD_F(0x04d25169) /* 0.301347172 */, 18 }, /* 4713 */ { MAD_F(0x04d2aad4) /* 0.301432446 */, 18 }, /* 4714 */ { MAD_F(0x04d30440) /* 0.301517726 */, 18 }, /* 4715 */ { MAD_F(0x04d35dae) /* 0.301603012 */, 18 }, /* 4716 */ { MAD_F(0x04d3b71d) /* 0.301688304 */, 18 }, /* 4717 */ { MAD_F(0x04d4108e) /* 0.301773602 */, 18 }, /* 4718 */ { MAD_F(0x04d46a01) /* 0.301858906 */, 18 }, /* 4719 */ { MAD_F(0x04d4c375) /* 0.301944216 */, 18 }, /* 4720 */ { MAD_F(0x04d51ceb) /* 0.302029532 */, 18 }, /* 4721 */ { MAD_F(0x04d57662) /* 0.302114854 */, 18 }, /* 4722 */ { MAD_F(0x04d5cfdb) /* 0.302200182 */, 18 }, /* 4723 */ { MAD_F(0x04d62956) /* 0.302285516 */, 18 }, /* 4724 */ { MAD_F(0x04d682d2) /* 0.302370856 */, 18 }, /* 4725 */ { MAD_F(0x04d6dc50) /* 0.302456203 */, 18 }, /* 4726 */ { MAD_F(0x04d735d0) /* 0.302541555 */, 18 }, /* 4727 */ { MAD_F(0x04d78f51) /* 0.302626913 */, 18 }, /* 4728 */ { MAD_F(0x04d7e8d4) /* 0.302712277 */, 18 }, /* 4729 */ { MAD_F(0x04d84258) /* 0.302797648 */, 18 }, /* 4730 */ { MAD_F(0x04d89bde) /* 0.302883024 */, 18 }, /* 4731 */ { MAD_F(0x04d8f566) /* 0.302968406 */, 18 }, /* 4732 */ { MAD_F(0x04d94eef) /* 0.303053794 */, 18 }, /* 4733 */ { MAD_F(0x04d9a87a) /* 0.303139189 */, 18 }, /* 4734 */ { MAD_F(0x04da0207) /* 0.303224589 */, 18 }, /* 4735 */ { MAD_F(0x04da5b95) /* 0.303309995 */, 18 }, /* 4736 */ { MAD_F(0x04dab524) /* 0.303395408 */, 18 }, /* 4737 */ { MAD_F(0x04db0eb6) /* 0.303480826 */, 18 }, /* 4738 */ { MAD_F(0x04db6849) /* 0.303566251 */, 18 }, /* 4739 */ { MAD_F(0x04dbc1dd) /* 0.303651681 */, 18 }, /* 4740 */ { MAD_F(0x04dc1b73) /* 0.303737117 */, 18 }, /* 4741 */ { MAD_F(0x04dc750b) /* 0.303822560 */, 18 }, /* 4742 */ { MAD_F(0x04dccea5) /* 0.303908008 */, 18 }, /* 4743 */ { MAD_F(0x04dd2840) /* 0.303993463 */, 18 }, /* 4744 */ { MAD_F(0x04dd81dc) /* 0.304078923 */, 18 }, /* 4745 */ { MAD_F(0x04dddb7a) /* 0.304164390 */, 18 }, /* 4746 */ { MAD_F(0x04de351a) /* 0.304249862 */, 18 }, /* 4747 */ { MAD_F(0x04de8ebc) /* 0.304335340 */, 18 }, /* 4748 */ { MAD_F(0x04dee85f) /* 0.304420825 */, 18 }, /* 4749 */ { MAD_F(0x04df4203) /* 0.304506315 */, 18 }, /* 4750 */ { MAD_F(0x04df9baa) /* 0.304591812 */, 18 }, /* 4751 */ { MAD_F(0x04dff552) /* 0.304677314 */, 18 }, /* 4752 */ { MAD_F(0x04e04efb) /* 0.304762823 */, 18 }, /* 4753 */ { MAD_F(0x04e0a8a6) /* 0.304848337 */, 18 }, /* 4754 */ { MAD_F(0x04e10253) /* 0.304933858 */, 18 }, /* 4755 */ { MAD_F(0x04e15c01) /* 0.305019384 */, 18 }, /* 4756 */ { MAD_F(0x04e1b5b1) /* 0.305104917 */, 18 }, /* 4757 */ { MAD_F(0x04e20f63) /* 0.305190455 */, 18 }, /* 4758 */ { MAD_F(0x04e26916) /* 0.305275999 */, 18 }, /* 4759 */ { MAD_F(0x04e2c2cb) /* 0.305361550 */, 18 }, /* 4760 */ { MAD_F(0x04e31c81) /* 0.305447106 */, 18 }, /* 4761 */ { MAD_F(0x04e37639) /* 0.305532669 */, 18 }, /* 4762 */ { MAD_F(0x04e3cff3) /* 0.305618237 */, 18 }, /* 4763 */ { MAD_F(0x04e429ae) /* 0.305703811 */, 18 }, /* 4764 */ { MAD_F(0x04e4836b) /* 0.305789392 */, 18 }, /* 4765 */ { MAD_F(0x04e4dd29) /* 0.305874978 */, 18 }, /* 4766 */ { MAD_F(0x04e536e9) /* 0.305960571 */, 18 }, /* 4767 */ { MAD_F(0x04e590ab) /* 0.306046169 */, 18 }, /* 4768 */ { MAD_F(0x04e5ea6e) /* 0.306131773 */, 18 }, /* 4769 */ { MAD_F(0x04e64433) /* 0.306217383 */, 18 }, /* 4770 */ { MAD_F(0x04e69df9) /* 0.306303000 */, 18 }, /* 4771 */ { MAD_F(0x04e6f7c1) /* 0.306388622 */, 18 }, /* 4772 */ { MAD_F(0x04e7518b) /* 0.306474250 */, 18 }, /* 4773 */ { MAD_F(0x04e7ab56) /* 0.306559885 */, 18 }, /* 4774 */ { MAD_F(0x04e80523) /* 0.306645525 */, 18 }, /* 4775 */ { MAD_F(0x04e85ef2) /* 0.306731171 */, 18 }, /* 4776 */ { MAD_F(0x04e8b8c2) /* 0.306816823 */, 18 }, /* 4777 */ { MAD_F(0x04e91293) /* 0.306902481 */, 18 }, /* 4778 */ { MAD_F(0x04e96c67) /* 0.306988145 */, 18 }, /* 4779 */ { MAD_F(0x04e9c63b) /* 0.307073816 */, 18 }, /* 4780 */ { MAD_F(0x04ea2012) /* 0.307159492 */, 18 }, /* 4781 */ { MAD_F(0x04ea79ea) /* 0.307245174 */, 18 }, /* 4782 */ { MAD_F(0x04ead3c4) /* 0.307330862 */, 18 }, /* 4783 */ { MAD_F(0x04eb2d9f) /* 0.307416556 */, 18 }, /* 4784 */ { MAD_F(0x04eb877c) /* 0.307502256 */, 18 }, /* 4785 */ { MAD_F(0x04ebe15b) /* 0.307587962 */, 18 }, /* 4786 */ { MAD_F(0x04ec3b3b) /* 0.307673674 */, 18 }, /* 4787 */ { MAD_F(0x04ec951c) /* 0.307759392 */, 18 }, /* 4788 */ { MAD_F(0x04ecef00) /* 0.307845115 */, 18 }, /* 4789 */ { MAD_F(0x04ed48e5) /* 0.307930845 */, 18 }, /* 4790 */ { MAD_F(0x04eda2cb) /* 0.308016581 */, 18 }, /* 4791 */ { MAD_F(0x04edfcb3) /* 0.308102323 */, 18 }, /* 4792 */ { MAD_F(0x04ee569d) /* 0.308188071 */, 18 }, /* 4793 */ { MAD_F(0x04eeb088) /* 0.308273824 */, 18 }, /* 4794 */ { MAD_F(0x04ef0a75) /* 0.308359584 */, 18 }, /* 4795 */ { MAD_F(0x04ef6464) /* 0.308445350 */, 18 }, /* 4796 */ { MAD_F(0x04efbe54) /* 0.308531121 */, 18 }, /* 4797 */ { MAD_F(0x04f01846) /* 0.308616899 */, 18 }, /* 4798 */ { MAD_F(0x04f07239) /* 0.308702682 */, 18 }, /* 4799 */ { MAD_F(0x04f0cc2e) /* 0.308788472 */, 18 }, /* 4800 */ { MAD_F(0x04f12624) /* 0.308874267 */, 18 }, /* 4801 */ { MAD_F(0x04f1801d) /* 0.308960068 */, 18 }, /* 4802 */ { MAD_F(0x04f1da16) /* 0.309045876 */, 18 }, /* 4803 */ { MAD_F(0x04f23412) /* 0.309131689 */, 18 }, /* 4804 */ { MAD_F(0x04f28e0f) /* 0.309217508 */, 18 }, /* 4805 */ { MAD_F(0x04f2e80d) /* 0.309303334 */, 18 }, /* 4806 */ { MAD_F(0x04f3420d) /* 0.309389165 */, 18 }, /* 4807 */ { MAD_F(0x04f39c0f) /* 0.309475002 */, 18 }, /* 4808 */ { MAD_F(0x04f3f612) /* 0.309560845 */, 18 }, /* 4809 */ { MAD_F(0x04f45017) /* 0.309646694 */, 18 }, /* 4810 */ { MAD_F(0x04f4aa1e) /* 0.309732549 */, 18 }, /* 4811 */ { MAD_F(0x04f50426) /* 0.309818410 */, 18 }, /* 4812 */ { MAD_F(0x04f55e30) /* 0.309904277 */, 18 }, /* 4813 */ { MAD_F(0x04f5b83b) /* 0.309990150 */, 18 }, /* 4814 */ { MAD_F(0x04f61248) /* 0.310076028 */, 18 }, /* 4815 */ { MAD_F(0x04f66c56) /* 0.310161913 */, 18 }, /* 4816 */ { MAD_F(0x04f6c666) /* 0.310247804 */, 18 }, /* 4817 */ { MAD_F(0x04f72078) /* 0.310333700 */, 18 }, /* 4818 */ { MAD_F(0x04f77a8b) /* 0.310419603 */, 18 }, /* 4819 */ { MAD_F(0x04f7d4a0) /* 0.310505511 */, 18 }, /* 4820 */ { MAD_F(0x04f82eb7) /* 0.310591426 */, 18 }, /* 4821 */ { MAD_F(0x04f888cf) /* 0.310677346 */, 18 }, /* 4822 */ { MAD_F(0x04f8e2e9) /* 0.310763272 */, 18 }, /* 4823 */ { MAD_F(0x04f93d04) /* 0.310849205 */, 18 }, /* 4824 */ { MAD_F(0x04f99721) /* 0.310935143 */, 18 }, /* 4825 */ { MAD_F(0x04f9f13f) /* 0.311021087 */, 18 }, /* 4826 */ { MAD_F(0x04fa4b5f) /* 0.311107037 */, 18 }, /* 4827 */ { MAD_F(0x04faa581) /* 0.311192993 */, 18 }, /* 4828 */ { MAD_F(0x04faffa4) /* 0.311278955 */, 18 }, /* 4829 */ { MAD_F(0x04fb59c9) /* 0.311364923 */, 18 }, /* 4830 */ { MAD_F(0x04fbb3ef) /* 0.311450897 */, 18 }, /* 4831 */ { MAD_F(0x04fc0e17) /* 0.311536877 */, 18 }, /* 4832 */ { MAD_F(0x04fc6841) /* 0.311622862 */, 18 }, /* 4833 */ { MAD_F(0x04fcc26c) /* 0.311708854 */, 18 }, /* 4834 */ { MAD_F(0x04fd1c99) /* 0.311794851 */, 18 }, /* 4835 */ { MAD_F(0x04fd76c7) /* 0.311880855 */, 18 }, /* 4836 */ { MAD_F(0x04fdd0f7) /* 0.311966864 */, 18 }, /* 4837 */ { MAD_F(0x04fe2b29) /* 0.312052880 */, 18 }, /* 4838 */ { MAD_F(0x04fe855c) /* 0.312138901 */, 18 }, /* 4839 */ { MAD_F(0x04fedf91) /* 0.312224928 */, 18 }, /* 4840 */ { MAD_F(0x04ff39c7) /* 0.312310961 */, 18 }, /* 4841 */ { MAD_F(0x04ff93ff) /* 0.312397000 */, 18 }, /* 4842 */ { MAD_F(0x04ffee38) /* 0.312483045 */, 18 }, /* 4843 */ { MAD_F(0x05004874) /* 0.312569096 */, 18 }, /* 4844 */ { MAD_F(0x0500a2b0) /* 0.312655153 */, 18 }, /* 4845 */ { MAD_F(0x0500fcef) /* 0.312741216 */, 18 }, /* 4846 */ { MAD_F(0x0501572e) /* 0.312827284 */, 18 }, /* 4847 */ { MAD_F(0x0501b170) /* 0.312913359 */, 18 }, /* 4848 */ { MAD_F(0x05020bb3) /* 0.312999439 */, 18 }, /* 4849 */ { MAD_F(0x050265f8) /* 0.313085526 */, 18 }, /* 4850 */ { MAD_F(0x0502c03e) /* 0.313171618 */, 18 }, /* 4851 */ { MAD_F(0x05031a86) /* 0.313257716 */, 18 }, /* 4852 */ { MAD_F(0x050374cf) /* 0.313343820 */, 18 }, /* 4853 */ { MAD_F(0x0503cf1a) /* 0.313429931 */, 18 }, /* 4854 */ { MAD_F(0x05042967) /* 0.313516047 */, 18 }, /* 4855 */ { MAD_F(0x050483b5) /* 0.313602168 */, 18 }, /* 4856 */ { MAD_F(0x0504de05) /* 0.313688296 */, 18 }, /* 4857 */ { MAD_F(0x05053856) /* 0.313774430 */, 18 }, /* 4858 */ { MAD_F(0x050592a9) /* 0.313860570 */, 18 }, /* 4859 */ { MAD_F(0x0505ecfd) /* 0.313946715 */, 18 }, /* 4860 */ { MAD_F(0x05064754) /* 0.314032867 */, 18 }, /* 4861 */ { MAD_F(0x0506a1ab) /* 0.314119024 */, 18 }, /* 4862 */ { MAD_F(0x0506fc04) /* 0.314205187 */, 18 }, /* 4863 */ { MAD_F(0x0507565f) /* 0.314291357 */, 18 }, /* 4864 */ { MAD_F(0x0507b0bc) /* 0.314377532 */, 18 }, /* 4865 */ { MAD_F(0x05080b1a) /* 0.314463713 */, 18 }, /* 4866 */ { MAD_F(0x05086579) /* 0.314549900 */, 18 }, /* 4867 */ { MAD_F(0x0508bfdb) /* 0.314636092 */, 18 }, /* 4868 */ { MAD_F(0x05091a3d) /* 0.314722291 */, 18 }, /* 4869 */ { MAD_F(0x050974a2) /* 0.314808496 */, 18 }, /* 4870 */ { MAD_F(0x0509cf08) /* 0.314894706 */, 18 }, /* 4871 */ { MAD_F(0x050a296f) /* 0.314980923 */, 18 }, /* 4872 */ { MAD_F(0x050a83d8) /* 0.315067145 */, 18 }, /* 4873 */ { MAD_F(0x050ade43) /* 0.315153373 */, 18 }, /* 4874 */ { MAD_F(0x050b38af) /* 0.315239607 */, 18 }, /* 4875 */ { MAD_F(0x050b931d) /* 0.315325847 */, 18 }, /* 4876 */ { MAD_F(0x050bed8d) /* 0.315412093 */, 18 }, /* 4877 */ { MAD_F(0x050c47fe) /* 0.315498345 */, 18 }, /* 4878 */ { MAD_F(0x050ca271) /* 0.315584603 */, 18 }, /* 4879 */ { MAD_F(0x050cfce5) /* 0.315670866 */, 18 }, /* 4880 */ { MAD_F(0x050d575b) /* 0.315757136 */, 18 }, /* 4881 */ { MAD_F(0x050db1d2) /* 0.315843411 */, 18 }, /* 4882 */ { MAD_F(0x050e0c4b) /* 0.315929693 */, 18 }, /* 4883 */ { MAD_F(0x050e66c5) /* 0.316015980 */, 18 }, /* 4884 */ { MAD_F(0x050ec141) /* 0.316102273 */, 18 }, /* 4885 */ { MAD_F(0x050f1bbf) /* 0.316188572 */, 18 }, /* 4886 */ { MAD_F(0x050f763e) /* 0.316274877 */, 18 }, /* 4887 */ { MAD_F(0x050fd0bf) /* 0.316361187 */, 18 }, /* 4888 */ { MAD_F(0x05102b42) /* 0.316447504 */, 18 }, /* 4889 */ { MAD_F(0x051085c6) /* 0.316533826 */, 18 }, /* 4890 */ { MAD_F(0x0510e04b) /* 0.316620155 */, 18 }, /* 4891 */ { MAD_F(0x05113ad3) /* 0.316706489 */, 18 }, /* 4892 */ { MAD_F(0x0511955b) /* 0.316792829 */, 18 }, /* 4893 */ { MAD_F(0x0511efe6) /* 0.316879175 */, 18 }, /* 4894 */ { MAD_F(0x05124a72) /* 0.316965527 */, 18 }, /* 4895 */ { MAD_F(0x0512a4ff) /* 0.317051885 */, 18 }, /* 4896 */ { MAD_F(0x0512ff8e) /* 0.317138249 */, 18 }, /* 4897 */ { MAD_F(0x05135a1f) /* 0.317224618 */, 18 }, /* 4898 */ { MAD_F(0x0513b4b1) /* 0.317310994 */, 18 }, /* 4899 */ { MAD_F(0x05140f45) /* 0.317397375 */, 18 }, /* 4900 */ { MAD_F(0x051469da) /* 0.317483762 */, 18 }, /* 4901 */ { MAD_F(0x0514c471) /* 0.317570155 */, 18 }, /* 4902 */ { MAD_F(0x05151f0a) /* 0.317656554 */, 18 }, /* 4903 */ { MAD_F(0x051579a4) /* 0.317742959 */, 18 }, /* 4904 */ { MAD_F(0x0515d440) /* 0.317829370 */, 18 }, /* 4905 */ { MAD_F(0x05162edd) /* 0.317915786 */, 18 }, /* 4906 */ { MAD_F(0x0516897c) /* 0.318002209 */, 18 }, /* 4907 */ { MAD_F(0x0516e41c) /* 0.318088637 */, 18 }, /* 4908 */ { MAD_F(0x05173ebe) /* 0.318175071 */, 18 }, /* 4909 */ { MAD_F(0x05179962) /* 0.318261511 */, 18 }, /* 4910 */ { MAD_F(0x0517f407) /* 0.318347957 */, 18 }, /* 4911 */ { MAD_F(0x05184eae) /* 0.318434409 */, 18 }, /* 4912 */ { MAD_F(0x0518a956) /* 0.318520867 */, 18 }, /* 4913 */ { MAD_F(0x05190400) /* 0.318607330 */, 18 }, /* 4914 */ { MAD_F(0x05195eab) /* 0.318693800 */, 18 }, /* 4915 */ { MAD_F(0x0519b958) /* 0.318780275 */, 18 }, /* 4916 */ { MAD_F(0x051a1407) /* 0.318866756 */, 18 }, /* 4917 */ { MAD_F(0x051a6eb7) /* 0.318953243 */, 18 }, /* 4918 */ { MAD_F(0x051ac969) /* 0.319039736 */, 18 }, /* 4919 */ { MAD_F(0x051b241c) /* 0.319126235 */, 18 }, /* 4920 */ { MAD_F(0x051b7ed1) /* 0.319212739 */, 18 }, /* 4921 */ { MAD_F(0x051bd987) /* 0.319299250 */, 18 }, /* 4922 */ { MAD_F(0x051c3440) /* 0.319385766 */, 18 }, /* 4923 */ { MAD_F(0x051c8ef9) /* 0.319472288 */, 18 }, /* 4924 */ { MAD_F(0x051ce9b4) /* 0.319558816 */, 18 }, /* 4925 */ { MAD_F(0x051d4471) /* 0.319645350 */, 18 }, /* 4926 */ { MAD_F(0x051d9f2f) /* 0.319731890 */, 18 }, /* 4927 */ { MAD_F(0x051df9ef) /* 0.319818435 */, 18 }, /* 4928 */ { MAD_F(0x051e54b1) /* 0.319904987 */, 18 }, /* 4929 */ { MAD_F(0x051eaf74) /* 0.319991544 */, 18 }, /* 4930 */ { MAD_F(0x051f0a38) /* 0.320078107 */, 18 }, /* 4931 */ { MAD_F(0x051f64ff) /* 0.320164676 */, 18 }, /* 4932 */ { MAD_F(0x051fbfc6) /* 0.320251251 */, 18 }, /* 4933 */ { MAD_F(0x05201a90) /* 0.320337832 */, 18 }, /* 4934 */ { MAD_F(0x0520755b) /* 0.320424419 */, 18 }, /* 4935 */ { MAD_F(0x0520d027) /* 0.320511011 */, 18 }, /* 4936 */ { MAD_F(0x05212af5) /* 0.320597609 */, 18 }, /* 4937 */ { MAD_F(0x052185c5) /* 0.320684213 */, 18 }, /* 4938 */ { MAD_F(0x0521e096) /* 0.320770823 */, 18 }, /* 4939 */ { MAD_F(0x05223b69) /* 0.320857439 */, 18 }, /* 4940 */ { MAD_F(0x0522963d) /* 0.320944061 */, 18 }, /* 4941 */ { MAD_F(0x0522f113) /* 0.321030688 */, 18 }, /* 4942 */ { MAD_F(0x05234bea) /* 0.321117322 */, 18 }, /* 4943 */ { MAD_F(0x0523a6c3) /* 0.321203961 */, 18 }, /* 4944 */ { MAD_F(0x0524019e) /* 0.321290606 */, 18 }, /* 4945 */ { MAD_F(0x05245c7a) /* 0.321377257 */, 18 }, /* 4946 */ { MAD_F(0x0524b758) /* 0.321463913 */, 18 }, /* 4947 */ { MAD_F(0x05251237) /* 0.321550576 */, 18 }, /* 4948 */ { MAD_F(0x05256d18) /* 0.321637244 */, 18 }, /* 4949 */ { MAD_F(0x0525c7fb) /* 0.321723919 */, 18 }, /* 4950 */ { MAD_F(0x052622df) /* 0.321810599 */, 18 }, /* 4951 */ { MAD_F(0x05267dc4) /* 0.321897285 */, 18 }, /* 4952 */ { MAD_F(0x0526d8ab) /* 0.321983976 */, 18 }, /* 4953 */ { MAD_F(0x05273394) /* 0.322070674 */, 18 }, /* 4954 */ { MAD_F(0x05278e7e) /* 0.322157377 */, 18 }, /* 4955 */ { MAD_F(0x0527e96a) /* 0.322244087 */, 18 }, /* 4956 */ { MAD_F(0x05284457) /* 0.322330802 */, 18 }, /* 4957 */ { MAD_F(0x05289f46) /* 0.322417523 */, 18 }, /* 4958 */ { MAD_F(0x0528fa37) /* 0.322504249 */, 18 }, /* 4959 */ { MAD_F(0x05295529) /* 0.322590982 */, 18 }, /* 4960 */ { MAD_F(0x0529b01d) /* 0.322677720 */, 18 }, /* 4961 */ { MAD_F(0x052a0b12) /* 0.322764465 */, 18 }, /* 4962 */ { MAD_F(0x052a6609) /* 0.322851215 */, 18 }, /* 4963 */ { MAD_F(0x052ac101) /* 0.322937971 */, 18 }, /* 4964 */ { MAD_F(0x052b1bfb) /* 0.323024732 */, 18 }, /* 4965 */ { MAD_F(0x052b76f7) /* 0.323111500 */, 18 }, /* 4966 */ { MAD_F(0x052bd1f4) /* 0.323198273 */, 18 }, /* 4967 */ { MAD_F(0x052c2cf2) /* 0.323285052 */, 18 }, /* 4968 */ { MAD_F(0x052c87f2) /* 0.323371837 */, 18 }, /* 4969 */ { MAD_F(0x052ce2f4) /* 0.323458628 */, 18 }, /* 4970 */ { MAD_F(0x052d3df7) /* 0.323545425 */, 18 }, /* 4971 */ { MAD_F(0x052d98fc) /* 0.323632227 */, 18 }, /* 4972 */ { MAD_F(0x052df403) /* 0.323719036 */, 18 }, /* 4973 */ { MAD_F(0x052e4f0b) /* 0.323805850 */, 18 }, /* 4974 */ { MAD_F(0x052eaa14) /* 0.323892670 */, 18 }, /* 4975 */ { MAD_F(0x052f051f) /* 0.323979496 */, 18 }, /* 4976 */ { MAD_F(0x052f602c) /* 0.324066327 */, 18 }, /* 4977 */ { MAD_F(0x052fbb3a) /* 0.324153165 */, 18 }, /* 4978 */ { MAD_F(0x0530164a) /* 0.324240008 */, 18 }, /* 4979 */ { MAD_F(0x0530715b) /* 0.324326857 */, 18 }, /* 4980 */ { MAD_F(0x0530cc6e) /* 0.324413712 */, 18 }, /* 4981 */ { MAD_F(0x05312783) /* 0.324500572 */, 18 }, /* 4982 */ { MAD_F(0x05318299) /* 0.324587439 */, 18 }, /* 4983 */ { MAD_F(0x0531ddb0) /* 0.324674311 */, 18 }, /* 4984 */ { MAD_F(0x053238ca) /* 0.324761189 */, 18 }, /* 4985 */ { MAD_F(0x053293e4) /* 0.324848073 */, 18 }, /* 4986 */ { MAD_F(0x0532ef01) /* 0.324934963 */, 18 }, /* 4987 */ { MAD_F(0x05334a1e) /* 0.325021858 */, 18 }, /* 4988 */ { MAD_F(0x0533a53e) /* 0.325108760 */, 18 }, /* 4989 */ { MAD_F(0x0534005f) /* 0.325195667 */, 18 }, /* 4990 */ { MAD_F(0x05345b81) /* 0.325282580 */, 18 }, /* 4991 */ { MAD_F(0x0534b6a5) /* 0.325369498 */, 18 }, /* 4992 */ { MAD_F(0x053511cb) /* 0.325456423 */, 18 }, /* 4993 */ { MAD_F(0x05356cf2) /* 0.325543353 */, 18 }, /* 4994 */ { MAD_F(0x0535c81b) /* 0.325630290 */, 18 }, /* 4995 */ { MAD_F(0x05362345) /* 0.325717232 */, 18 }, /* 4996 */ { MAD_F(0x05367e71) /* 0.325804179 */, 18 }, /* 4997 */ { MAD_F(0x0536d99f) /* 0.325891133 */, 18 }, /* 4998 */ { MAD_F(0x053734ce) /* 0.325978092 */, 18 }, /* 4999 */ { MAD_F(0x05378ffe) /* 0.326065057 */, 18 }, /* 5000 */ { MAD_F(0x0537eb30) /* 0.326152028 */, 18 }, /* 5001 */ { MAD_F(0x05384664) /* 0.326239005 */, 18 }, /* 5002 */ { MAD_F(0x0538a199) /* 0.326325988 */, 18 }, /* 5003 */ { MAD_F(0x0538fcd0) /* 0.326412976 */, 18 }, /* 5004 */ { MAD_F(0x05395808) /* 0.326499970 */, 18 }, /* 5005 */ { MAD_F(0x0539b342) /* 0.326586970 */, 18 }, /* 5006 */ { MAD_F(0x053a0e7d) /* 0.326673976 */, 18 }, /* 5007 */ { MAD_F(0x053a69ba) /* 0.326760988 */, 18 }, /* 5008 */ { MAD_F(0x053ac4f9) /* 0.326848005 */, 18 }, /* 5009 */ { MAD_F(0x053b2039) /* 0.326935028 */, 18 }, /* 5010 */ { MAD_F(0x053b7b7b) /* 0.327022057 */, 18 }, /* 5011 */ { MAD_F(0x053bd6be) /* 0.327109092 */, 18 }, /* 5012 */ { MAD_F(0x053c3203) /* 0.327196132 */, 18 }, /* 5013 */ { MAD_F(0x053c8d49) /* 0.327283178 */, 18 }, /* 5014 */ { MAD_F(0x053ce891) /* 0.327370231 */, 18 }, /* 5015 */ { MAD_F(0x053d43da) /* 0.327457288 */, 18 }, /* 5016 */ { MAD_F(0x053d9f25) /* 0.327544352 */, 18 }, /* 5017 */ { MAD_F(0x053dfa72) /* 0.327631421 */, 18 }, /* 5018 */ { MAD_F(0x053e55c0) /* 0.327718497 */, 18 }, /* 5019 */ { MAD_F(0x053eb10f) /* 0.327805578 */, 18 }, /* 5020 */ { MAD_F(0x053f0c61) /* 0.327892665 */, 18 }, /* 5021 */ { MAD_F(0x053f67b3) /* 0.327979757 */, 18 }, /* 5022 */ { MAD_F(0x053fc308) /* 0.328066855 */, 18 }, /* 5023 */ { MAD_F(0x05401e5e) /* 0.328153960 */, 18 }, /* 5024 */ { MAD_F(0x054079b5) /* 0.328241070 */, 18 }, /* 5025 */ { MAD_F(0x0540d50e) /* 0.328328185 */, 18 }, /* 5026 */ { MAD_F(0x05413068) /* 0.328415307 */, 18 }, /* 5027 */ { MAD_F(0x05418bc4) /* 0.328502434 */, 18 }, /* 5028 */ { MAD_F(0x0541e722) /* 0.328589567 */, 18 }, /* 5029 */ { MAD_F(0x05424281) /* 0.328676706 */, 18 }, /* 5030 */ { MAD_F(0x05429de2) /* 0.328763850 */, 18 }, /* 5031 */ { MAD_F(0x0542f944) /* 0.328851001 */, 18 }, /* 5032 */ { MAD_F(0x054354a8) /* 0.328938157 */, 18 }, /* 5033 */ { MAD_F(0x0543b00d) /* 0.329025319 */, 18 }, /* 5034 */ { MAD_F(0x05440b74) /* 0.329112486 */, 18 }, /* 5035 */ { MAD_F(0x054466dd) /* 0.329199660 */, 18 }, /* 5036 */ { MAD_F(0x0544c247) /* 0.329286839 */, 18 }, /* 5037 */ { MAD_F(0x05451db2) /* 0.329374024 */, 18 }, /* 5038 */ { MAD_F(0x0545791f) /* 0.329461215 */, 18 }, /* 5039 */ { MAD_F(0x0545d48e) /* 0.329548411 */, 18 }, /* 5040 */ { MAD_F(0x05462ffe) /* 0.329635614 */, 18 }, /* 5041 */ { MAD_F(0x05468b70) /* 0.329722822 */, 18 }, /* 5042 */ { MAD_F(0x0546e6e3) /* 0.329810036 */, 18 }, /* 5043 */ { MAD_F(0x05474258) /* 0.329897255 */, 18 }, /* 5044 */ { MAD_F(0x05479dce) /* 0.329984481 */, 18 }, /* 5045 */ { MAD_F(0x0547f946) /* 0.330071712 */, 18 }, /* 5046 */ { MAD_F(0x054854c0) /* 0.330158949 */, 18 }, /* 5047 */ { MAD_F(0x0548b03b) /* 0.330246191 */, 18 }, /* 5048 */ { MAD_F(0x05490bb7) /* 0.330333440 */, 18 }, /* 5049 */ { MAD_F(0x05496735) /* 0.330420694 */, 18 }, /* 5050 */ { MAD_F(0x0549c2b5) /* 0.330507954 */, 18 }, /* 5051 */ { MAD_F(0x054a1e36) /* 0.330595220 */, 18 }, /* 5052 */ { MAD_F(0x054a79b9) /* 0.330682491 */, 18 }, /* 5053 */ { MAD_F(0x054ad53d) /* 0.330769768 */, 18 }, /* 5054 */ { MAD_F(0x054b30c3) /* 0.330857051 */, 18 }, /* 5055 */ { MAD_F(0x054b8c4b) /* 0.330944340 */, 18 }, /* 5056 */ { MAD_F(0x054be7d4) /* 0.331031635 */, 18 }, /* 5057 */ { MAD_F(0x054c435e) /* 0.331118935 */, 18 }, /* 5058 */ { MAD_F(0x054c9eea) /* 0.331206241 */, 18 }, /* 5059 */ { MAD_F(0x054cfa78) /* 0.331293553 */, 18 }, /* 5060 */ { MAD_F(0x054d5607) /* 0.331380870 */, 18 }, /* 5061 */ { MAD_F(0x054db197) /* 0.331468193 */, 18 }, /* 5062 */ { MAD_F(0x054e0d2a) /* 0.331555522 */, 18 }, /* 5063 */ { MAD_F(0x054e68bd) /* 0.331642857 */, 18 }, /* 5064 */ { MAD_F(0x054ec453) /* 0.331730198 */, 18 }, /* 5065 */ { MAD_F(0x054f1fe9) /* 0.331817544 */, 18 }, /* 5066 */ { MAD_F(0x054f7b82) /* 0.331904896 */, 18 }, /* 5067 */ { MAD_F(0x054fd71c) /* 0.331992254 */, 18 }, /* 5068 */ { MAD_F(0x055032b7) /* 0.332079617 */, 18 }, /* 5069 */ { MAD_F(0x05508e54) /* 0.332166986 */, 18 }, /* 5070 */ { MAD_F(0x0550e9f3) /* 0.332254361 */, 18 }, /* 5071 */ { MAD_F(0x05514593) /* 0.332341742 */, 18 }, /* 5072 */ { MAD_F(0x0551a134) /* 0.332429129 */, 18 }, /* 5073 */ { MAD_F(0x0551fcd8) /* 0.332516521 */, 18 }, /* 5074 */ { MAD_F(0x0552587c) /* 0.332603919 */, 18 }, /* 5075 */ { MAD_F(0x0552b423) /* 0.332691323 */, 18 }, /* 5076 */ { MAD_F(0x05530fca) /* 0.332778732 */, 18 }, /* 5077 */ { MAD_F(0x05536b74) /* 0.332866147 */, 18 }, /* 5078 */ { MAD_F(0x0553c71f) /* 0.332953568 */, 18 }, /* 5079 */ { MAD_F(0x055422cb) /* 0.333040995 */, 18 }, /* 5080 */ { MAD_F(0x05547e79) /* 0.333128427 */, 18 }, /* 5081 */ { MAD_F(0x0554da29) /* 0.333215865 */, 18 }, /* 5082 */ { MAD_F(0x055535da) /* 0.333303309 */, 18 }, /* 5083 */ { MAD_F(0x0555918c) /* 0.333390759 */, 18 }, /* 5084 */ { MAD_F(0x0555ed40) /* 0.333478214 */, 18 }, /* 5085 */ { MAD_F(0x055648f6) /* 0.333565675 */, 18 }, /* 5086 */ { MAD_F(0x0556a4ad) /* 0.333653142 */, 18 }, /* 5087 */ { MAD_F(0x05570066) /* 0.333740615 */, 18 }, /* 5088 */ { MAD_F(0x05575c20) /* 0.333828093 */, 18 }, /* 5089 */ { MAD_F(0x0557b7dc) /* 0.333915577 */, 18 }, /* 5090 */ { MAD_F(0x05581399) /* 0.334003067 */, 18 }, /* 5091 */ { MAD_F(0x05586f58) /* 0.334090562 */, 18 }, /* 5092 */ { MAD_F(0x0558cb19) /* 0.334178063 */, 18 }, /* 5093 */ { MAD_F(0x055926db) /* 0.334265570 */, 18 }, /* 5094 */ { MAD_F(0x0559829e) /* 0.334353083 */, 18 }, /* 5095 */ { MAD_F(0x0559de63) /* 0.334440601 */, 18 }, /* 5096 */ { MAD_F(0x055a3a2a) /* 0.334528126 */, 18 }, /* 5097 */ { MAD_F(0x055a95f2) /* 0.334615655 */, 18 }, /* 5098 */ { MAD_F(0x055af1bb) /* 0.334703191 */, 18 }, /* 5099 */ { MAD_F(0x055b4d87) /* 0.334790732 */, 18 }, /* 5100 */ { MAD_F(0x055ba953) /* 0.334878279 */, 18 }, /* 5101 */ { MAD_F(0x055c0522) /* 0.334965832 */, 18 }, /* 5102 */ { MAD_F(0x055c60f1) /* 0.335053391 */, 18 }, /* 5103 */ { MAD_F(0x055cbcc3) /* 0.335140955 */, 18 }, /* 5104 */ { MAD_F(0x055d1896) /* 0.335228525 */, 18 }, /* 5105 */ { MAD_F(0x055d746a) /* 0.335316100 */, 18 }, /* 5106 */ { MAD_F(0x055dd040) /* 0.335403682 */, 18 }, /* 5107 */ { MAD_F(0x055e2c17) /* 0.335491269 */, 18 }, /* 5108 */ { MAD_F(0x055e87f0) /* 0.335578861 */, 18 }, /* 5109 */ { MAD_F(0x055ee3cb) /* 0.335666460 */, 18 }, /* 5110 */ { MAD_F(0x055f3fa7) /* 0.335754064 */, 18 }, /* 5111 */ { MAD_F(0x055f9b85) /* 0.335841674 */, 18 }, /* 5112 */ { MAD_F(0x055ff764) /* 0.335929290 */, 18 }, /* 5113 */ { MAD_F(0x05605344) /* 0.336016911 */, 18 }, /* 5114 */ { MAD_F(0x0560af27) /* 0.336104538 */, 18 }, /* 5115 */ { MAD_F(0x05610b0a) /* 0.336192171 */, 18 }, /* 5116 */ { MAD_F(0x056166f0) /* 0.336279809 */, 18 }, /* 5117 */ { MAD_F(0x0561c2d7) /* 0.336367453 */, 18 }, /* 5118 */ { MAD_F(0x05621ebf) /* 0.336455103 */, 18 }, /* 5119 */ { MAD_F(0x05627aa9) /* 0.336542759 */, 18 }, /* 5120 */ { MAD_F(0x0562d694) /* 0.336630420 */, 18 }, /* 5121 */ { MAD_F(0x05633281) /* 0.336718087 */, 18 }, /* 5122 */ { MAD_F(0x05638e70) /* 0.336805760 */, 18 }, /* 5123 */ { MAD_F(0x0563ea60) /* 0.336893439 */, 18 }, /* 5124 */ { MAD_F(0x05644651) /* 0.336981123 */, 18 }, /* 5125 */ { MAD_F(0x0564a244) /* 0.337068813 */, 18 }, /* 5126 */ { MAD_F(0x0564fe39) /* 0.337156508 */, 18 }, /* 5127 */ { MAD_F(0x05655a2f) /* 0.337244209 */, 18 }, /* 5128 */ { MAD_F(0x0565b627) /* 0.337331916 */, 18 }, /* 5129 */ { MAD_F(0x05661220) /* 0.337419629 */, 18 }, /* 5130 */ { MAD_F(0x05666e1a) /* 0.337507347 */, 18 }, /* 5131 */ { MAD_F(0x0566ca17) /* 0.337595071 */, 18 }, /* 5132 */ { MAD_F(0x05672614) /* 0.337682801 */, 18 }, /* 5133 */ { MAD_F(0x05678214) /* 0.337770537 */, 18 }, /* 5134 */ { MAD_F(0x0567de15) /* 0.337858278 */, 18 }, /* 5135 */ { MAD_F(0x05683a17) /* 0.337946025 */, 18 }, /* 5136 */ { MAD_F(0x0568961b) /* 0.338033777 */, 18 }, /* 5137 */ { MAD_F(0x0568f220) /* 0.338121535 */, 18 }, /* 5138 */ { MAD_F(0x05694e27) /* 0.338209299 */, 18 }, /* 5139 */ { MAD_F(0x0569aa30) /* 0.338297069 */, 18 }, /* 5140 */ { MAD_F(0x056a063a) /* 0.338384844 */, 18 }, /* 5141 */ { MAD_F(0x056a6245) /* 0.338472625 */, 18 }, /* 5142 */ { MAD_F(0x056abe52) /* 0.338560412 */, 18 }, /* 5143 */ { MAD_F(0x056b1a61) /* 0.338648204 */, 18 }, /* 5144 */ { MAD_F(0x056b7671) /* 0.338736002 */, 18 }, /* 5145 */ { MAD_F(0x056bd283) /* 0.338823806 */, 18 }, /* 5146 */ { MAD_F(0x056c2e96) /* 0.338911616 */, 18 }, /* 5147 */ { MAD_F(0x056c8aab) /* 0.338999431 */, 18 }, /* 5148 */ { MAD_F(0x056ce6c1) /* 0.339087252 */, 18 }, /* 5149 */ { MAD_F(0x056d42d9) /* 0.339175078 */, 18 }, /* 5150 */ { MAD_F(0x056d9ef2) /* 0.339262910 */, 18 }, /* 5151 */ { MAD_F(0x056dfb0d) /* 0.339350748 */, 18 }, /* 5152 */ { MAD_F(0x056e5729) /* 0.339438592 */, 18 }, /* 5153 */ { MAD_F(0x056eb347) /* 0.339526441 */, 18 }, /* 5154 */ { MAD_F(0x056f0f66) /* 0.339614296 */, 18 }, /* 5155 */ { MAD_F(0x056f6b87) /* 0.339702157 */, 18 }, /* 5156 */ { MAD_F(0x056fc7aa) /* 0.339790023 */, 18 }, /* 5157 */ { MAD_F(0x057023cd) /* 0.339877895 */, 18 }, /* 5158 */ { MAD_F(0x05707ff3) /* 0.339965773 */, 18 }, /* 5159 */ { MAD_F(0x0570dc1a) /* 0.340053656 */, 18 }, /* 5160 */ { MAD_F(0x05713843) /* 0.340141545 */, 18 }, /* 5161 */ { MAD_F(0x0571946d) /* 0.340229440 */, 18 }, /* 5162 */ { MAD_F(0x0571f098) /* 0.340317340 */, 18 }, /* 5163 */ { MAD_F(0x05724cc5) /* 0.340405246 */, 18 }, /* 5164 */ { MAD_F(0x0572a8f4) /* 0.340493158 */, 18 }, /* 5165 */ { MAD_F(0x05730524) /* 0.340581075 */, 18 }, /* 5166 */ { MAD_F(0x05736156) /* 0.340668999 */, 18 }, /* 5167 */ { MAD_F(0x0573bd89) /* 0.340756927 */, 18 }, /* 5168 */ { MAD_F(0x057419be) /* 0.340844862 */, 18 }, /* 5169 */ { MAD_F(0x057475f4) /* 0.340932802 */, 18 }, /* 5170 */ { MAD_F(0x0574d22c) /* 0.341020748 */, 18 }, /* 5171 */ { MAD_F(0x05752e65) /* 0.341108699 */, 18 }, /* 5172 */ { MAD_F(0x05758aa0) /* 0.341196656 */, 18 }, /* 5173 */ { MAD_F(0x0575e6dc) /* 0.341284619 */, 18 }, /* 5174 */ { MAD_F(0x0576431a) /* 0.341372587 */, 18 }, /* 5175 */ { MAD_F(0x05769f59) /* 0.341460562 */, 18 }, /* 5176 */ { MAD_F(0x0576fb9a) /* 0.341548541 */, 18 }, /* 5177 */ { MAD_F(0x057757dd) /* 0.341636527 */, 18 }, /* 5178 */ { MAD_F(0x0577b421) /* 0.341724518 */, 18 }, /* 5179 */ { MAD_F(0x05781066) /* 0.341812515 */, 18 }, /* 5180 */ { MAD_F(0x05786cad) /* 0.341900517 */, 18 }, /* 5181 */ { MAD_F(0x0578c8f5) /* 0.341988525 */, 18 }, /* 5182 */ { MAD_F(0x0579253f) /* 0.342076539 */, 18 }, /* 5183 */ { MAD_F(0x0579818b) /* 0.342164558 */, 18 }, /* 5184 */ { MAD_F(0x0579ddd8) /* 0.342252584 */, 18 }, /* 5185 */ { MAD_F(0x057a3a27) /* 0.342340614 */, 18 }, /* 5186 */ { MAD_F(0x057a9677) /* 0.342428651 */, 18 }, /* 5187 */ { MAD_F(0x057af2c8) /* 0.342516693 */, 18 }, /* 5188 */ { MAD_F(0x057b4f1c) /* 0.342604741 */, 18 }, /* 5189 */ { MAD_F(0x057bab70) /* 0.342692794 */, 18 }, /* 5190 */ { MAD_F(0x057c07c6) /* 0.342780853 */, 18 }, /* 5191 */ { MAD_F(0x057c641e) /* 0.342868918 */, 18 }, /* 5192 */ { MAD_F(0x057cc077) /* 0.342956988 */, 18 }, /* 5193 */ { MAD_F(0x057d1cd2) /* 0.343045064 */, 18 }, /* 5194 */ { MAD_F(0x057d792e) /* 0.343133146 */, 18 }, /* 5195 */ { MAD_F(0x057dd58c) /* 0.343221233 */, 18 }, /* 5196 */ { MAD_F(0x057e31eb) /* 0.343309326 */, 18 }, /* 5197 */ { MAD_F(0x057e8e4c) /* 0.343397425 */, 18 }, /* 5198 */ { MAD_F(0x057eeaae) /* 0.343485529 */, 18 }, /* 5199 */ { MAD_F(0x057f4712) /* 0.343573639 */, 18 }, /* 5200 */ { MAD_F(0x057fa378) /* 0.343661754 */, 18 }, /* 5201 */ { MAD_F(0x057fffde) /* 0.343749876 */, 18 }, /* 5202 */ { MAD_F(0x05805c47) /* 0.343838003 */, 18 }, /* 5203 */ { MAD_F(0x0580b8b1) /* 0.343926135 */, 18 }, /* 5204 */ { MAD_F(0x0581151c) /* 0.344014273 */, 18 }, /* 5205 */ { MAD_F(0x05817189) /* 0.344102417 */, 18 }, /* 5206 */ { MAD_F(0x0581cdf7) /* 0.344190566 */, 18 }, /* 5207 */ { MAD_F(0x05822a67) /* 0.344278722 */, 18 }, /* 5208 */ { MAD_F(0x058286d9) /* 0.344366882 */, 18 }, /* 5209 */ { MAD_F(0x0582e34c) /* 0.344455049 */, 18 }, /* 5210 */ { MAD_F(0x05833fc0) /* 0.344543221 */, 18 }, /* 5211 */ { MAD_F(0x05839c36) /* 0.344631398 */, 18 }, /* 5212 */ { MAD_F(0x0583f8ae) /* 0.344719582 */, 18 }, /* 5213 */ { MAD_F(0x05845527) /* 0.344807771 */, 18 }, /* 5214 */ { MAD_F(0x0584b1a1) /* 0.344895965 */, 18 }, /* 5215 */ { MAD_F(0x05850e1e) /* 0.344984165 */, 18 }, /* 5216 */ { MAD_F(0x05856a9b) /* 0.345072371 */, 18 }, /* 5217 */ { MAD_F(0x0585c71a) /* 0.345160583 */, 18 }, /* 5218 */ { MAD_F(0x0586239b) /* 0.345248800 */, 18 }, /* 5219 */ { MAD_F(0x0586801d) /* 0.345337023 */, 18 }, /* 5220 */ { MAD_F(0x0586dca1) /* 0.345425251 */, 18 }, /* 5221 */ { MAD_F(0x05873926) /* 0.345513485 */, 18 }, /* 5222 */ { MAD_F(0x058795ac) /* 0.345601725 */, 18 }, /* 5223 */ { MAD_F(0x0587f235) /* 0.345689970 */, 18 }, /* 5224 */ { MAD_F(0x05884ebe) /* 0.345778221 */, 18 }, /* 5225 */ { MAD_F(0x0588ab49) /* 0.345866478 */, 18 }, /* 5226 */ { MAD_F(0x058907d6) /* 0.345954740 */, 18 }, /* 5227 */ { MAD_F(0x05896464) /* 0.346043008 */, 18 }, /* 5228 */ { MAD_F(0x0589c0f4) /* 0.346131281 */, 18 }, /* 5229 */ { MAD_F(0x058a1d85) /* 0.346219560 */, 18 }, /* 5230 */ { MAD_F(0x058a7a18) /* 0.346307845 */, 18 }, /* 5231 */ { MAD_F(0x058ad6ac) /* 0.346396135 */, 18 }, /* 5232 */ { MAD_F(0x058b3342) /* 0.346484431 */, 18 }, /* 5233 */ { MAD_F(0x058b8fd9) /* 0.346572733 */, 18 }, /* 5234 */ { MAD_F(0x058bec72) /* 0.346661040 */, 18 }, /* 5235 */ { MAD_F(0x058c490c) /* 0.346749353 */, 18 }, /* 5236 */ { MAD_F(0x058ca5a8) /* 0.346837671 */, 18 }, /* 5237 */ { MAD_F(0x058d0246) /* 0.346925996 */, 18 }, /* 5238 */ { MAD_F(0x058d5ee4) /* 0.347014325 */, 18 }, /* 5239 */ { MAD_F(0x058dbb85) /* 0.347102661 */, 18 }, /* 5240 */ { MAD_F(0x058e1827) /* 0.347191002 */, 18 }, /* 5241 */ { MAD_F(0x058e74ca) /* 0.347279348 */, 18 }, /* 5242 */ { MAD_F(0x058ed16f) /* 0.347367700 */, 18 }, /* 5243 */ { MAD_F(0x058f2e15) /* 0.347456058 */, 18 }, /* 5244 */ { MAD_F(0x058f8abd) /* 0.347544422 */, 18 }, /* 5245 */ { MAD_F(0x058fe766) /* 0.347632791 */, 18 }, /* 5246 */ { MAD_F(0x05904411) /* 0.347721165 */, 18 }, /* 5247 */ { MAD_F(0x0590a0be) /* 0.347809546 */, 18 }, /* 5248 */ { MAD_F(0x0590fd6c) /* 0.347897931 */, 18 }, /* 5249 */ { MAD_F(0x05915a1b) /* 0.347986323 */, 18 }, /* 5250 */ { MAD_F(0x0591b6cc) /* 0.348074720 */, 18 }, /* 5251 */ { MAD_F(0x0592137e) /* 0.348163123 */, 18 }, /* 5252 */ { MAD_F(0x05927032) /* 0.348251531 */, 18 }, /* 5253 */ { MAD_F(0x0592cce8) /* 0.348339945 */, 18 }, /* 5254 */ { MAD_F(0x0593299f) /* 0.348428365 */, 18 }, /* 5255 */ { MAD_F(0x05938657) /* 0.348516790 */, 18 }, /* 5256 */ { MAD_F(0x0593e311) /* 0.348605221 */, 18 }, /* 5257 */ { MAD_F(0x05943fcd) /* 0.348693657 */, 18 }, /* 5258 */ { MAD_F(0x05949c8a) /* 0.348782099 */, 18 }, /* 5259 */ { MAD_F(0x0594f948) /* 0.348870547 */, 18 }, /* 5260 */ { MAD_F(0x05955608) /* 0.348959000 */, 18 }, /* 5261 */ { MAD_F(0x0595b2ca) /* 0.349047459 */, 18 }, /* 5262 */ { MAD_F(0x05960f8c) /* 0.349135923 */, 18 }, /* 5263 */ { MAD_F(0x05966c51) /* 0.349224393 */, 18 }, /* 5264 */ { MAD_F(0x0596c917) /* 0.349312869 */, 18 }, /* 5265 */ { MAD_F(0x059725de) /* 0.349401350 */, 18 }, /* 5266 */ { MAD_F(0x059782a7) /* 0.349489837 */, 18 }, /* 5267 */ { MAD_F(0x0597df72) /* 0.349578329 */, 18 }, /* 5268 */ { MAD_F(0x05983c3e) /* 0.349666827 */, 18 }, /* 5269 */ { MAD_F(0x0598990c) /* 0.349755331 */, 18 }, /* 5270 */ { MAD_F(0x0598f5db) /* 0.349843840 */, 18 }, /* 5271 */ { MAD_F(0x059952ab) /* 0.349932355 */, 18 }, /* 5272 */ { MAD_F(0x0599af7d) /* 0.350020876 */, 18 }, /* 5273 */ { MAD_F(0x059a0c51) /* 0.350109402 */, 18 }, /* 5274 */ { MAD_F(0x059a6926) /* 0.350197933 */, 18 }, /* 5275 */ { MAD_F(0x059ac5fc) /* 0.350286470 */, 18 }, /* 5276 */ { MAD_F(0x059b22d4) /* 0.350375013 */, 18 }, /* 5277 */ { MAD_F(0x059b7fae) /* 0.350463562 */, 18 }, /* 5278 */ { MAD_F(0x059bdc89) /* 0.350552116 */, 18 }, /* 5279 */ { MAD_F(0x059c3965) /* 0.350640675 */, 18 }, /* 5280 */ { MAD_F(0x059c9643) /* 0.350729240 */, 18 }, /* 5281 */ { MAD_F(0x059cf323) /* 0.350817811 */, 18 }, /* 5282 */ { MAD_F(0x059d5004) /* 0.350906388 */, 18 }, /* 5283 */ { MAD_F(0x059dace6) /* 0.350994970 */, 18 }, /* 5284 */ { MAD_F(0x059e09cb) /* 0.351083557 */, 18 }, /* 5285 */ { MAD_F(0x059e66b0) /* 0.351172150 */, 18 }, /* 5286 */ { MAD_F(0x059ec397) /* 0.351260749 */, 18 }, /* 5287 */ { MAD_F(0x059f2080) /* 0.351349353 */, 18 }, /* 5288 */ { MAD_F(0x059f7d6a) /* 0.351437963 */, 18 }, /* 5289 */ { MAD_F(0x059fda55) /* 0.351526579 */, 18 }, /* 5290 */ { MAD_F(0x05a03742) /* 0.351615200 */, 18 }, /* 5291 */ { MAD_F(0x05a09431) /* 0.351703827 */, 18 }, /* 5292 */ { MAD_F(0x05a0f121) /* 0.351792459 */, 18 }, /* 5293 */ { MAD_F(0x05a14e12) /* 0.351881097 */, 18 }, /* 5294 */ { MAD_F(0x05a1ab05) /* 0.351969740 */, 18 }, /* 5295 */ { MAD_F(0x05a207fa) /* 0.352058389 */, 18 }, /* 5296 */ { MAD_F(0x05a264f0) /* 0.352147044 */, 18 }, /* 5297 */ { MAD_F(0x05a2c1e7) /* 0.352235704 */, 18 }, /* 5298 */ { MAD_F(0x05a31ee1) /* 0.352324369 */, 18 }, /* 5299 */ { MAD_F(0x05a37bdb) /* 0.352413041 */, 18 }, /* 5300 */ { MAD_F(0x05a3d8d7) /* 0.352501718 */, 18 }, /* 5301 */ { MAD_F(0x05a435d5) /* 0.352590400 */, 18 }, /* 5302 */ { MAD_F(0x05a492d4) /* 0.352679088 */, 18 }, /* 5303 */ { MAD_F(0x05a4efd4) /* 0.352767782 */, 18 }, /* 5304 */ { MAD_F(0x05a54cd6) /* 0.352856481 */, 18 }, /* 5305 */ { MAD_F(0x05a5a9da) /* 0.352945186 */, 18 }, /* 5306 */ { MAD_F(0x05a606df) /* 0.353033896 */, 18 }, /* 5307 */ { MAD_F(0x05a663e5) /* 0.353122612 */, 18 }, /* 5308 */ { MAD_F(0x05a6c0ed) /* 0.353211333 */, 18 }, /* 5309 */ { MAD_F(0x05a71df7) /* 0.353300061 */, 18 }, /* 5310 */ { MAD_F(0x05a77b02) /* 0.353388793 */, 18 }, /* 5311 */ { MAD_F(0x05a7d80e) /* 0.353477531 */, 18 }, /* 5312 */ { MAD_F(0x05a8351c) /* 0.353566275 */, 18 }, /* 5313 */ { MAD_F(0x05a8922c) /* 0.353655024 */, 18 }, /* 5314 */ { MAD_F(0x05a8ef3c) /* 0.353743779 */, 18 }, /* 5315 */ { MAD_F(0x05a94c4f) /* 0.353832540 */, 18 }, /* 5316 */ { MAD_F(0x05a9a963) /* 0.353921306 */, 18 }, /* 5317 */ { MAD_F(0x05aa0678) /* 0.354010077 */, 18 }, /* 5318 */ { MAD_F(0x05aa638f) /* 0.354098855 */, 18 }, /* 5319 */ { MAD_F(0x05aac0a8) /* 0.354187637 */, 18 }, /* 5320 */ { MAD_F(0x05ab1dc2) /* 0.354276426 */, 18 }, /* 5321 */ { MAD_F(0x05ab7add) /* 0.354365220 */, 18 }, /* 5322 */ { MAD_F(0x05abd7fa) /* 0.354454019 */, 18 }, /* 5323 */ { MAD_F(0x05ac3518) /* 0.354542824 */, 18 }, /* 5324 */ { MAD_F(0x05ac9238) /* 0.354631635 */, 18 }, /* 5325 */ { MAD_F(0x05acef5a) /* 0.354720451 */, 18 }, /* 5326 */ { MAD_F(0x05ad4c7d) /* 0.354809272 */, 18 }, /* 5327 */ { MAD_F(0x05ada9a1) /* 0.354898100 */, 18 }, /* 5328 */ { MAD_F(0x05ae06c7) /* 0.354986932 */, 18 }, /* 5329 */ { MAD_F(0x05ae63ee) /* 0.355075771 */, 18 }, /* 5330 */ { MAD_F(0x05aec117) /* 0.355164615 */, 18 }, /* 5331 */ { MAD_F(0x05af1e41) /* 0.355253464 */, 18 }, /* 5332 */ { MAD_F(0x05af7b6d) /* 0.355342319 */, 18 }, /* 5333 */ { MAD_F(0x05afd89b) /* 0.355431180 */, 18 }, /* 5334 */ { MAD_F(0x05b035c9) /* 0.355520046 */, 18 }, /* 5335 */ { MAD_F(0x05b092fa) /* 0.355608917 */, 18 }, /* 5336 */ { MAD_F(0x05b0f02b) /* 0.355697795 */, 18 }, /* 5337 */ { MAD_F(0x05b14d5f) /* 0.355786677 */, 18 }, /* 5338 */ { MAD_F(0x05b1aa94) /* 0.355875566 */, 18 }, /* 5339 */ { MAD_F(0x05b207ca) /* 0.355964460 */, 18 }, /* 5340 */ { MAD_F(0x05b26502) /* 0.356053359 */, 18 }, /* 5341 */ { MAD_F(0x05b2c23b) /* 0.356142264 */, 18 }, /* 5342 */ { MAD_F(0x05b31f76) /* 0.356231175 */, 18 }, /* 5343 */ { MAD_F(0x05b37cb2) /* 0.356320091 */, 18 }, /* 5344 */ { MAD_F(0x05b3d9f0) /* 0.356409012 */, 18 }, /* 5345 */ { MAD_F(0x05b4372f) /* 0.356497940 */, 18 }, /* 5346 */ { MAD_F(0x05b4946f) /* 0.356586872 */, 18 }, /* 5347 */ { MAD_F(0x05b4f1b2) /* 0.356675811 */, 18 }, /* 5348 */ { MAD_F(0x05b54ef5) /* 0.356764754 */, 18 }, /* 5349 */ { MAD_F(0x05b5ac3a) /* 0.356853704 */, 18 }, /* 5350 */ { MAD_F(0x05b60981) /* 0.356942659 */, 18 }, /* 5351 */ { MAD_F(0x05b666c9) /* 0.357031619 */, 18 }, /* 5352 */ { MAD_F(0x05b6c413) /* 0.357120585 */, 18 }, /* 5353 */ { MAD_F(0x05b7215e) /* 0.357209557 */, 18 }, /* 5354 */ { MAD_F(0x05b77eab) /* 0.357298534 */, 18 }, /* 5355 */ { MAD_F(0x05b7dbf9) /* 0.357387516 */, 18 }, /* 5356 */ { MAD_F(0x05b83948) /* 0.357476504 */, 18 }, /* 5357 */ { MAD_F(0x05b89699) /* 0.357565498 */, 18 }, /* 5358 */ { MAD_F(0x05b8f3ec) /* 0.357654497 */, 18 }, /* 5359 */ { MAD_F(0x05b95140) /* 0.357743502 */, 18 }, /* 5360 */ { MAD_F(0x05b9ae95) /* 0.357832512 */, 18 }, /* 5361 */ { MAD_F(0x05ba0bec) /* 0.357921528 */, 18 }, /* 5362 */ { MAD_F(0x05ba6945) /* 0.358010550 */, 18 }, /* 5363 */ { MAD_F(0x05bac69f) /* 0.358099576 */, 18 }, /* 5364 */ { MAD_F(0x05bb23fa) /* 0.358188609 */, 18 }, /* 5365 */ { MAD_F(0x05bb8157) /* 0.358277647 */, 18 }, /* 5366 */ { MAD_F(0x05bbdeb6) /* 0.358366690 */, 18 }, /* 5367 */ { MAD_F(0x05bc3c16) /* 0.358455739 */, 18 }, /* 5368 */ { MAD_F(0x05bc9977) /* 0.358544794 */, 18 }, /* 5369 */ { MAD_F(0x05bcf6da) /* 0.358633854 */, 18 }, /* 5370 */ { MAD_F(0x05bd543e) /* 0.358722920 */, 18 }, /* 5371 */ { MAD_F(0x05bdb1a4) /* 0.358811991 */, 18 }, /* 5372 */ { MAD_F(0x05be0f0b) /* 0.358901067 */, 18 }, /* 5373 */ { MAD_F(0x05be6c74) /* 0.358990150 */, 18 }, /* 5374 */ { MAD_F(0x05bec9df) /* 0.359079237 */, 18 }, /* 5375 */ { MAD_F(0x05bf274a) /* 0.359168331 */, 18 }, /* 5376 */ { MAD_F(0x05bf84b8) /* 0.359257429 */, 18 }, /* 5377 */ { MAD_F(0x05bfe226) /* 0.359346534 */, 18 }, /* 5378 */ { MAD_F(0x05c03f97) /* 0.359435644 */, 18 }, /* 5379 */ { MAD_F(0x05c09d08) /* 0.359524759 */, 18 }, /* 5380 */ { MAD_F(0x05c0fa7c) /* 0.359613880 */, 18 }, /* 5381 */ { MAD_F(0x05c157f0) /* 0.359703006 */, 18 }, /* 5382 */ { MAD_F(0x05c1b566) /* 0.359792138 */, 18 }, /* 5383 */ { MAD_F(0x05c212de) /* 0.359881276 */, 18 }, /* 5384 */ { MAD_F(0x05c27057) /* 0.359970419 */, 18 }, /* 5385 */ { MAD_F(0x05c2cdd2) /* 0.360059567 */, 18 }, /* 5386 */ { MAD_F(0x05c32b4e) /* 0.360148721 */, 18 }, /* 5387 */ { MAD_F(0x05c388cb) /* 0.360237881 */, 18 }, /* 5388 */ { MAD_F(0x05c3e64b) /* 0.360327046 */, 18 }, /* 5389 */ { MAD_F(0x05c443cb) /* 0.360416216 */, 18 }, /* 5390 */ { MAD_F(0x05c4a14d) /* 0.360505392 */, 18 }, /* 5391 */ { MAD_F(0x05c4fed1) /* 0.360594574 */, 18 }, /* 5392 */ { MAD_F(0x05c55c56) /* 0.360683761 */, 18 }, /* 5393 */ { MAD_F(0x05c5b9dc) /* 0.360772953 */, 18 }, /* 5394 */ { MAD_F(0x05c61764) /* 0.360862152 */, 18 }, /* 5395 */ { MAD_F(0x05c674ed) /* 0.360951355 */, 18 }, /* 5396 */ { MAD_F(0x05c6d278) /* 0.361040564 */, 18 }, /* 5397 */ { MAD_F(0x05c73005) /* 0.361129779 */, 18 }, /* 5398 */ { MAD_F(0x05c78d93) /* 0.361218999 */, 18 }, /* 5399 */ { MAD_F(0x05c7eb22) /* 0.361308225 */, 18 }, /* 5400 */ { MAD_F(0x05c848b3) /* 0.361397456 */, 18 }, /* 5401 */ { MAD_F(0x05c8a645) /* 0.361486693 */, 18 }, /* 5402 */ { MAD_F(0x05c903d9) /* 0.361575935 */, 18 }, /* 5403 */ { MAD_F(0x05c9616e) /* 0.361665183 */, 18 }, /* 5404 */ { MAD_F(0x05c9bf05) /* 0.361754436 */, 18 }, /* 5405 */ { MAD_F(0x05ca1c9d) /* 0.361843695 */, 18 }, /* 5406 */ { MAD_F(0x05ca7a37) /* 0.361932959 */, 18 }, /* 5407 */ { MAD_F(0x05cad7d2) /* 0.362022229 */, 18 }, /* 5408 */ { MAD_F(0x05cb356e) /* 0.362111504 */, 18 }, /* 5409 */ { MAD_F(0x05cb930d) /* 0.362200785 */, 18 }, /* 5410 */ { MAD_F(0x05cbf0ac) /* 0.362290071 */, 18 }, /* 5411 */ { MAD_F(0x05cc4e4d) /* 0.362379362 */, 18 }, /* 5412 */ { MAD_F(0x05ccabf0) /* 0.362468660 */, 18 }, /* 5413 */ { MAD_F(0x05cd0994) /* 0.362557962 */, 18 }, /* 5414 */ { MAD_F(0x05cd6739) /* 0.362647271 */, 18 }, /* 5415 */ { MAD_F(0x05cdc4e0) /* 0.362736584 */, 18 }, /* 5416 */ { MAD_F(0x05ce2289) /* 0.362825904 */, 18 }, /* 5417 */ { MAD_F(0x05ce8033) /* 0.362915228 */, 18 }, /* 5418 */ { MAD_F(0x05ceddde) /* 0.363004559 */, 18 }, /* 5419 */ { MAD_F(0x05cf3b8b) /* 0.363093894 */, 18 }, /* 5420 */ { MAD_F(0x05cf9939) /* 0.363183236 */, 18 }, /* 5421 */ { MAD_F(0x05cff6e9) /* 0.363272582 */, 18 }, /* 5422 */ { MAD_F(0x05d0549a) /* 0.363361935 */, 18 }, /* 5423 */ { MAD_F(0x05d0b24d) /* 0.363451292 */, 18 }, /* 5424 */ { MAD_F(0x05d11001) /* 0.363540655 */, 18 }, /* 5425 */ { MAD_F(0x05d16db7) /* 0.363630024 */, 18 }, /* 5426 */ { MAD_F(0x05d1cb6e) /* 0.363719398 */, 18 }, /* 5427 */ { MAD_F(0x05d22927) /* 0.363808778 */, 18 }, /* 5428 */ { MAD_F(0x05d286e1) /* 0.363898163 */, 18 }, /* 5429 */ { MAD_F(0x05d2e49d) /* 0.363987554 */, 18 }, /* 5430 */ { MAD_F(0x05d3425a) /* 0.364076950 */, 18 }, /* 5431 */ { MAD_F(0x05d3a018) /* 0.364166352 */, 18 }, /* 5432 */ { MAD_F(0x05d3fdd8) /* 0.364255759 */, 18 }, /* 5433 */ { MAD_F(0x05d45b9a) /* 0.364345171 */, 18 }, /* 5434 */ { MAD_F(0x05d4b95d) /* 0.364434589 */, 18 }, /* 5435 */ { MAD_F(0x05d51721) /* 0.364524013 */, 18 }, /* 5436 */ { MAD_F(0x05d574e7) /* 0.364613442 */, 18 }, /* 5437 */ { MAD_F(0x05d5d2af) /* 0.364702877 */, 18 }, /* 5438 */ { MAD_F(0x05d63078) /* 0.364792317 */, 18 }, /* 5439 */ { MAD_F(0x05d68e42) /* 0.364881762 */, 18 }, /* 5440 */ { MAD_F(0x05d6ec0e) /* 0.364971213 */, 18 }, /* 5441 */ { MAD_F(0x05d749db) /* 0.365060669 */, 18 }, /* 5442 */ { MAD_F(0x05d7a7aa) /* 0.365150131 */, 18 }, /* 5443 */ { MAD_F(0x05d8057a) /* 0.365239599 */, 18 }, /* 5444 */ { MAD_F(0x05d8634c) /* 0.365329072 */, 18 }, /* 5445 */ { MAD_F(0x05d8c11f) /* 0.365418550 */, 18 }, /* 5446 */ { MAD_F(0x05d91ef4) /* 0.365508034 */, 18 }, /* 5447 */ { MAD_F(0x05d97cca) /* 0.365597523 */, 18 }, /* 5448 */ { MAD_F(0x05d9daa1) /* 0.365687018 */, 18 }, /* 5449 */ { MAD_F(0x05da387a) /* 0.365776518 */, 18 }, /* 5450 */ { MAD_F(0x05da9655) /* 0.365866024 */, 18 }, /* 5451 */ { MAD_F(0x05daf431) /* 0.365955536 */, 18 }, /* 5452 */ { MAD_F(0x05db520e) /* 0.366045052 */, 18 }, /* 5453 */ { MAD_F(0x05dbafed) /* 0.366134574 */, 18 }, /* 5454 */ { MAD_F(0x05dc0dce) /* 0.366224102 */, 18 }, /* 5455 */ { MAD_F(0x05dc6baf) /* 0.366313635 */, 18 }, /* 5456 */ { MAD_F(0x05dcc993) /* 0.366403174 */, 18 }, /* 5457 */ { MAD_F(0x05dd2778) /* 0.366492718 */, 18 }, /* 5458 */ { MAD_F(0x05dd855e) /* 0.366582267 */, 18 }, /* 5459 */ { MAD_F(0x05dde346) /* 0.366671822 */, 18 }, /* 5460 */ { MAD_F(0x05de412f) /* 0.366761383 */, 18 }, /* 5461 */ { MAD_F(0x05de9f1a) /* 0.366850949 */, 18 }, /* 5462 */ { MAD_F(0x05defd06) /* 0.366940520 */, 18 }, /* 5463 */ { MAD_F(0x05df5af3) /* 0.367030097 */, 18 }, /* 5464 */ { MAD_F(0x05dfb8e2) /* 0.367119680 */, 18 }, /* 5465 */ { MAD_F(0x05e016d3) /* 0.367209267 */, 18 }, /* 5466 */ { MAD_F(0x05e074c5) /* 0.367298861 */, 18 }, /* 5467 */ { MAD_F(0x05e0d2b8) /* 0.367388459 */, 18 }, /* 5468 */ { MAD_F(0x05e130ad) /* 0.367478064 */, 18 }, /* 5469 */ { MAD_F(0x05e18ea4) /* 0.367567673 */, 18 }, /* 5470 */ { MAD_F(0x05e1ec9c) /* 0.367657288 */, 18 }, /* 5471 */ { MAD_F(0x05e24a95) /* 0.367746909 */, 18 }, /* 5472 */ { MAD_F(0x05e2a890) /* 0.367836535 */, 18 }, /* 5473 */ { MAD_F(0x05e3068c) /* 0.367926167 */, 18 }, /* 5474 */ { MAD_F(0x05e3648a) /* 0.368015804 */, 18 }, /* 5475 */ { MAD_F(0x05e3c289) /* 0.368105446 */, 18 }, /* 5476 */ { MAD_F(0x05e4208a) /* 0.368195094 */, 18 }, /* 5477 */ { MAD_F(0x05e47e8c) /* 0.368284747 */, 18 }, /* 5478 */ { MAD_F(0x05e4dc8f) /* 0.368374406 */, 18 }, /* 5479 */ { MAD_F(0x05e53a94) /* 0.368464070 */, 18 }, /* 5480 */ { MAD_F(0x05e5989b) /* 0.368553740 */, 18 }, /* 5481 */ { MAD_F(0x05e5f6a3) /* 0.368643415 */, 18 }, /* 5482 */ { MAD_F(0x05e654ac) /* 0.368733096 */, 18 }, /* 5483 */ { MAD_F(0x05e6b2b7) /* 0.368822782 */, 18 }, /* 5484 */ { MAD_F(0x05e710c4) /* 0.368912473 */, 18 }, /* 5485 */ { MAD_F(0x05e76ed2) /* 0.369002170 */, 18 }, /* 5486 */ { MAD_F(0x05e7cce1) /* 0.369091873 */, 18 }, /* 5487 */ { MAD_F(0x05e82af2) /* 0.369181581 */, 18 }, /* 5488 */ { MAD_F(0x05e88904) /* 0.369271294 */, 18 }, /* 5489 */ { MAD_F(0x05e8e718) /* 0.369361013 */, 18 }, /* 5490 */ { MAD_F(0x05e9452d) /* 0.369450737 */, 18 }, /* 5491 */ { MAD_F(0x05e9a343) /* 0.369540467 */, 18 }, /* 5492 */ { MAD_F(0x05ea015c) /* 0.369630202 */, 18 }, /* 5493 */ { MAD_F(0x05ea5f75) /* 0.369719942 */, 18 }, /* 5494 */ { MAD_F(0x05eabd90) /* 0.369809688 */, 18 }, /* 5495 */ { MAD_F(0x05eb1bad) /* 0.369899440 */, 18 }, /* 5496 */ { MAD_F(0x05eb79cb) /* 0.369989197 */, 18 }, /* 5497 */ { MAD_F(0x05ebd7ea) /* 0.370078959 */, 18 }, /* 5498 */ { MAD_F(0x05ec360b) /* 0.370168727 */, 18 }, /* 5499 */ { MAD_F(0x05ec942d) /* 0.370258500 */, 18 }, /* 5500 */ { MAD_F(0x05ecf251) /* 0.370348279 */, 18 }, /* 5501 */ { MAD_F(0x05ed5076) /* 0.370438063 */, 18 }, /* 5502 */ { MAD_F(0x05edae9d) /* 0.370527853 */, 18 }, /* 5503 */ { MAD_F(0x05ee0cc5) /* 0.370617648 */, 18 }, /* 5504 */ { MAD_F(0x05ee6aef) /* 0.370707448 */, 18 }, /* 5505 */ { MAD_F(0x05eec91a) /* 0.370797254 */, 18 }, /* 5506 */ { MAD_F(0x05ef2746) /* 0.370887065 */, 18 }, /* 5507 */ { MAD_F(0x05ef8574) /* 0.370976882 */, 18 }, /* 5508 */ { MAD_F(0x05efe3a4) /* 0.371066704 */, 18 }, /* 5509 */ { MAD_F(0x05f041d5) /* 0.371156532 */, 18 }, /* 5510 */ { MAD_F(0x05f0a007) /* 0.371246365 */, 18 }, /* 5511 */ { MAD_F(0x05f0fe3b) /* 0.371336203 */, 18 }, /* 5512 */ { MAD_F(0x05f15c70) /* 0.371426047 */, 18 }, /* 5513 */ { MAD_F(0x05f1baa7) /* 0.371515897 */, 18 }, /* 5514 */ { MAD_F(0x05f218df) /* 0.371605751 */, 18 }, /* 5515 */ { MAD_F(0x05f27719) /* 0.371695612 */, 18 }, /* 5516 */ { MAD_F(0x05f2d554) /* 0.371785477 */, 18 }, /* 5517 */ { MAD_F(0x05f33390) /* 0.371875348 */, 18 }, /* 5518 */ { MAD_F(0x05f391cf) /* 0.371965225 */, 18 }, /* 5519 */ { MAD_F(0x05f3f00e) /* 0.372055107 */, 18 }, /* 5520 */ { MAD_F(0x05f44e4f) /* 0.372144994 */, 18 }, /* 5521 */ { MAD_F(0x05f4ac91) /* 0.372234887 */, 18 }, /* 5522 */ { MAD_F(0x05f50ad5) /* 0.372324785 */, 18 }, /* 5523 */ { MAD_F(0x05f5691b) /* 0.372414689 */, 18 }, /* 5524 */ { MAD_F(0x05f5c761) /* 0.372504598 */, 18 }, /* 5525 */ { MAD_F(0x05f625aa) /* 0.372594513 */, 18 }, /* 5526 */ { MAD_F(0x05f683f3) /* 0.372684433 */, 18 }, /* 5527 */ { MAD_F(0x05f6e23f) /* 0.372774358 */, 18 }, /* 5528 */ { MAD_F(0x05f7408b) /* 0.372864289 */, 18 }, /* 5529 */ { MAD_F(0x05f79ed9) /* 0.372954225 */, 18 }, /* 5530 */ { MAD_F(0x05f7fd29) /* 0.373044167 */, 18 }, /* 5531 */ { MAD_F(0x05f85b7a) /* 0.373134114 */, 18 }, /* 5532 */ { MAD_F(0x05f8b9cc) /* 0.373224066 */, 18 }, /* 5533 */ { MAD_F(0x05f91820) /* 0.373314024 */, 18 }, /* 5534 */ { MAD_F(0x05f97675) /* 0.373403987 */, 18 }, /* 5535 */ { MAD_F(0x05f9d4cc) /* 0.373493956 */, 18 }, /* 5536 */ { MAD_F(0x05fa3324) /* 0.373583930 */, 18 }, /* 5537 */ { MAD_F(0x05fa917e) /* 0.373673910 */, 18 }, /* 5538 */ { MAD_F(0x05faefd9) /* 0.373763895 */, 18 }, /* 5539 */ { MAD_F(0x05fb4e36) /* 0.373853885 */, 18 }, /* 5540 */ { MAD_F(0x05fbac94) /* 0.373943881 */, 18 }, /* 5541 */ { MAD_F(0x05fc0af3) /* 0.374033882 */, 18 }, /* 5542 */ { MAD_F(0x05fc6954) /* 0.374123889 */, 18 }, /* 5543 */ { MAD_F(0x05fcc7b7) /* 0.374213901 */, 18 }, /* 5544 */ { MAD_F(0x05fd261b) /* 0.374303918 */, 18 }, /* 5545 */ { MAD_F(0x05fd8480) /* 0.374393941 */, 18 }, /* 5546 */ { MAD_F(0x05fde2e7) /* 0.374483970 */, 18 }, /* 5547 */ { MAD_F(0x05fe414f) /* 0.374574003 */, 18 }, /* 5548 */ { MAD_F(0x05fe9fb9) /* 0.374664042 */, 18 }, /* 5549 */ { MAD_F(0x05fefe24) /* 0.374754087 */, 18 }, /* 5550 */ { MAD_F(0x05ff5c91) /* 0.374844137 */, 18 }, /* 5551 */ { MAD_F(0x05ffbaff) /* 0.374934192 */, 18 }, /* 5552 */ { MAD_F(0x0600196e) /* 0.375024253 */, 18 }, /* 5553 */ { MAD_F(0x060077df) /* 0.375114319 */, 18 }, /* 5554 */ { MAD_F(0x0600d651) /* 0.375204391 */, 18 }, /* 5555 */ { MAD_F(0x060134c5) /* 0.375294468 */, 18 }, /* 5556 */ { MAD_F(0x0601933b) /* 0.375384550 */, 18 }, /* 5557 */ { MAD_F(0x0601f1b1) /* 0.375474638 */, 18 }, /* 5558 */ { MAD_F(0x0602502a) /* 0.375564731 */, 18 }, /* 5559 */ { MAD_F(0x0602aea3) /* 0.375654830 */, 18 }, /* 5560 */ { MAD_F(0x06030d1e) /* 0.375744934 */, 18 }, /* 5561 */ { MAD_F(0x06036b9b) /* 0.375835043 */, 18 }, /* 5562 */ { MAD_F(0x0603ca19) /* 0.375925158 */, 18 }, /* 5563 */ { MAD_F(0x06042898) /* 0.376015278 */, 18 }, /* 5564 */ { MAD_F(0x06048719) /* 0.376105404 */, 18 }, /* 5565 */ { MAD_F(0x0604e59c) /* 0.376195535 */, 18 }, /* 5566 */ { MAD_F(0x0605441f) /* 0.376285671 */, 18 }, /* 5567 */ { MAD_F(0x0605a2a5) /* 0.376375813 */, 18 }, /* 5568 */ { MAD_F(0x0606012b) /* 0.376465960 */, 18 }, /* 5569 */ { MAD_F(0x06065fb4) /* 0.376556113 */, 18 }, /* 5570 */ { MAD_F(0x0606be3d) /* 0.376646271 */, 18 }, /* 5571 */ { MAD_F(0x06071cc8) /* 0.376736434 */, 18 }, /* 5572 */ { MAD_F(0x06077b55) /* 0.376826603 */, 18 }, /* 5573 */ { MAD_F(0x0607d9e3) /* 0.376916777 */, 18 }, /* 5574 */ { MAD_F(0x06083872) /* 0.377006957 */, 18 }, /* 5575 */ { MAD_F(0x06089703) /* 0.377097141 */, 18 }, /* 5576 */ { MAD_F(0x0608f595) /* 0.377187332 */, 18 }, /* 5577 */ { MAD_F(0x06095429) /* 0.377277528 */, 18 }, /* 5578 */ { MAD_F(0x0609b2be) /* 0.377367729 */, 18 }, /* 5579 */ { MAD_F(0x060a1155) /* 0.377457935 */, 18 }, /* 5580 */ { MAD_F(0x060a6fed) /* 0.377548147 */, 18 }, /* 5581 */ { MAD_F(0x060ace86) /* 0.377638364 */, 18 }, /* 5582 */ { MAD_F(0x060b2d21) /* 0.377728587 */, 18 }, /* 5583 */ { MAD_F(0x060b8bbe) /* 0.377818815 */, 18 }, /* 5584 */ { MAD_F(0x060bea5c) /* 0.377909049 */, 18 }, /* 5585 */ { MAD_F(0x060c48fb) /* 0.377999288 */, 18 }, /* 5586 */ { MAD_F(0x060ca79c) /* 0.378089532 */, 18 }, /* 5587 */ { MAD_F(0x060d063e) /* 0.378179781 */, 18 }, /* 5588 */ { MAD_F(0x060d64e1) /* 0.378270036 */, 18 }, /* 5589 */ { MAD_F(0x060dc387) /* 0.378360297 */, 18 }, /* 5590 */ { MAD_F(0x060e222d) /* 0.378450563 */, 18 }, /* 5591 */ { MAD_F(0x060e80d5) /* 0.378540834 */, 18 }, /* 5592 */ { MAD_F(0x060edf7f) /* 0.378631110 */, 18 }, /* 5593 */ { MAD_F(0x060f3e29) /* 0.378721392 */, 18 }, /* 5594 */ { MAD_F(0x060f9cd6) /* 0.378811680 */, 18 }, /* 5595 */ { MAD_F(0x060ffb83) /* 0.378901972 */, 18 }, /* 5596 */ { MAD_F(0x06105a33) /* 0.378992270 */, 18 }, /* 5597 */ { MAD_F(0x0610b8e3) /* 0.379082574 */, 18 }, /* 5598 */ { MAD_F(0x06111795) /* 0.379172883 */, 18 }, /* 5599 */ { MAD_F(0x06117649) /* 0.379263197 */, 18 }, /* 5600 */ { MAD_F(0x0611d4fe) /* 0.379353516 */, 18 }, /* 5601 */ { MAD_F(0x061233b4) /* 0.379443841 */, 18 }, /* 5602 */ { MAD_F(0x0612926c) /* 0.379534172 */, 18 }, /* 5603 */ { MAD_F(0x0612f125) /* 0.379624507 */, 18 }, /* 5604 */ { MAD_F(0x06134fe0) /* 0.379714848 */, 18 }, /* 5605 */ { MAD_F(0x0613ae9c) /* 0.379805195 */, 18 }, /* 5606 */ { MAD_F(0x06140d5a) /* 0.379895547 */, 18 }, /* 5607 */ { MAD_F(0x06146c19) /* 0.379985904 */, 18 }, /* 5608 */ { MAD_F(0x0614cada) /* 0.380076266 */, 18 }, /* 5609 */ { MAD_F(0x0615299c) /* 0.380166634 */, 18 }, /* 5610 */ { MAD_F(0x0615885f) /* 0.380257008 */, 18 }, /* 5611 */ { MAD_F(0x0615e724) /* 0.380347386 */, 18 }, /* 5612 */ { MAD_F(0x061645ea) /* 0.380437770 */, 18 }, /* 5613 */ { MAD_F(0x0616a4b2) /* 0.380528160 */, 18 }, /* 5614 */ { MAD_F(0x0617037b) /* 0.380618555 */, 18 }, /* 5615 */ { MAD_F(0x06176246) /* 0.380708955 */, 18 }, /* 5616 */ { MAD_F(0x0617c112) /* 0.380799360 */, 18 }, /* 5617 */ { MAD_F(0x06181fdf) /* 0.380889771 */, 18 }, /* 5618 */ { MAD_F(0x06187eae) /* 0.380980187 */, 18 }, /* 5619 */ { MAD_F(0x0618dd7e) /* 0.381070609 */, 18 }, /* 5620 */ { MAD_F(0x06193c50) /* 0.381161036 */, 18 }, /* 5621 */ { MAD_F(0x06199b24) /* 0.381251468 */, 18 }, /* 5622 */ { MAD_F(0x0619f9f8) /* 0.381341906 */, 18 }, /* 5623 */ { MAD_F(0x061a58ce) /* 0.381432349 */, 18 }, /* 5624 */ { MAD_F(0x061ab7a6) /* 0.381522798 */, 18 }, /* 5625 */ { MAD_F(0x061b167f) /* 0.381613251 */, 18 }, /* 5626 */ { MAD_F(0x061b7559) /* 0.381703711 */, 18 }, /* 5627 */ { MAD_F(0x061bd435) /* 0.381794175 */, 18 }, /* 5628 */ { MAD_F(0x061c3313) /* 0.381884645 */, 18 }, /* 5629 */ { MAD_F(0x061c91f1) /* 0.381975120 */, 18 }, /* 5630 */ { MAD_F(0x061cf0d2) /* 0.382065601 */, 18 }, /* 5631 */ { MAD_F(0x061d4fb3) /* 0.382156087 */, 18 }, /* 5632 */ { MAD_F(0x061dae96) /* 0.382246578 */, 18 }, /* 5633 */ { MAD_F(0x061e0d7b) /* 0.382337075 */, 18 }, /* 5634 */ { MAD_F(0x061e6c61) /* 0.382427577 */, 18 }, /* 5635 */ { MAD_F(0x061ecb48) /* 0.382518084 */, 18 }, /* 5636 */ { MAD_F(0x061f2a31) /* 0.382608597 */, 18 }, /* 5637 */ { MAD_F(0x061f891b) /* 0.382699115 */, 18 }, /* 5638 */ { MAD_F(0x061fe807) /* 0.382789638 */, 18 }, /* 5639 */ { MAD_F(0x062046f4) /* 0.382880167 */, 18 }, /* 5640 */ { MAD_F(0x0620a5e3) /* 0.382970701 */, 18 }, /* 5641 */ { MAD_F(0x062104d3) /* 0.383061241 */, 18 }, /* 5642 */ { MAD_F(0x062163c4) /* 0.383151786 */, 18 }, /* 5643 */ { MAD_F(0x0621c2b7) /* 0.383242336 */, 18 }, /* 5644 */ { MAD_F(0x062221ab) /* 0.383332891 */, 18 }, /* 5645 */ { MAD_F(0x062280a1) /* 0.383423452 */, 18 }, /* 5646 */ { MAD_F(0x0622df98) /* 0.383514018 */, 18 }, /* 5647 */ { MAD_F(0x06233e91) /* 0.383604590 */, 18 }, /* 5648 */ { MAD_F(0x06239d8b) /* 0.383695167 */, 18 }, /* 5649 */ { MAD_F(0x0623fc86) /* 0.383785749 */, 18 }, /* 5650 */ { MAD_F(0x06245b83) /* 0.383876337 */, 18 }, /* 5651 */ { MAD_F(0x0624ba82) /* 0.383966930 */, 18 }, /* 5652 */ { MAD_F(0x06251981) /* 0.384057528 */, 18 }, /* 5653 */ { MAD_F(0x06257883) /* 0.384148132 */, 18 }, /* 5654 */ { MAD_F(0x0625d785) /* 0.384238741 */, 18 }, /* 5655 */ { MAD_F(0x06263689) /* 0.384329355 */, 18 }, /* 5656 */ { MAD_F(0x0626958f) /* 0.384419975 */, 18 }, /* 5657 */ { MAD_F(0x0626f496) /* 0.384510600 */, 18 }, /* 5658 */ { MAD_F(0x0627539e) /* 0.384601230 */, 18 }, /* 5659 */ { MAD_F(0x0627b2a8) /* 0.384691866 */, 18 }, /* 5660 */ { MAD_F(0x062811b3) /* 0.384782507 */, 18 }, /* 5661 */ { MAD_F(0x062870c0) /* 0.384873153 */, 18 }, /* 5662 */ { MAD_F(0x0628cfce) /* 0.384963805 */, 18 }, /* 5663 */ { MAD_F(0x06292ede) /* 0.385054462 */, 18 }, /* 5664 */ { MAD_F(0x06298def) /* 0.385145124 */, 18 }, /* 5665 */ { MAD_F(0x0629ed01) /* 0.385235792 */, 18 }, /* 5666 */ { MAD_F(0x062a4c15) /* 0.385326465 */, 18 }, /* 5667 */ { MAD_F(0x062aab2a) /* 0.385417143 */, 18 }, /* 5668 */ { MAD_F(0x062b0a41) /* 0.385507827 */, 18 }, /* 5669 */ { MAD_F(0x062b6959) /* 0.385598516 */, 18 }, /* 5670 */ { MAD_F(0x062bc873) /* 0.385689211 */, 18 }, /* 5671 */ { MAD_F(0x062c278e) /* 0.385779910 */, 18 }, /* 5672 */ { MAD_F(0x062c86aa) /* 0.385870615 */, 18 }, /* 5673 */ { MAD_F(0x062ce5c8) /* 0.385961326 */, 18 }, /* 5674 */ { MAD_F(0x062d44e8) /* 0.386052041 */, 18 }, /* 5675 */ { MAD_F(0x062da408) /* 0.386142762 */, 18 }, /* 5676 */ { MAD_F(0x062e032a) /* 0.386233489 */, 18 }, /* 5677 */ { MAD_F(0x062e624e) /* 0.386324221 */, 18 }, /* 5678 */ { MAD_F(0x062ec173) /* 0.386414958 */, 18 }, /* 5679 */ { MAD_F(0x062f209a) /* 0.386505700 */, 18 }, /* 5680 */ { MAD_F(0x062f7fc1) /* 0.386596448 */, 18 }, /* 5681 */ { MAD_F(0x062fdeeb) /* 0.386687201 */, 18 }, /* 5682 */ { MAD_F(0x06303e16) /* 0.386777959 */, 18 }, /* 5683 */ { MAD_F(0x06309d42) /* 0.386868723 */, 18 }, /* 5684 */ { MAD_F(0x0630fc6f) /* 0.386959492 */, 18 }, /* 5685 */ { MAD_F(0x06315b9e) /* 0.387050266 */, 18 }, /* 5686 */ { MAD_F(0x0631bacf) /* 0.387141045 */, 18 }, /* 5687 */ { MAD_F(0x06321a01) /* 0.387231830 */, 18 }, /* 5688 */ { MAD_F(0x06327934) /* 0.387322621 */, 18 }, /* 5689 */ { MAD_F(0x0632d869) /* 0.387413416 */, 18 }, /* 5690 */ { MAD_F(0x0633379f) /* 0.387504217 */, 18 }, /* 5691 */ { MAD_F(0x063396d7) /* 0.387595023 */, 18 }, /* 5692 */ { MAD_F(0x0633f610) /* 0.387685835 */, 18 }, /* 5693 */ { MAD_F(0x0634554a) /* 0.387776652 */, 18 }, /* 5694 */ { MAD_F(0x0634b486) /* 0.387867474 */, 18 }, /* 5695 */ { MAD_F(0x063513c3) /* 0.387958301 */, 18 }, /* 5696 */ { MAD_F(0x06357302) /* 0.388049134 */, 18 }, /* 5697 */ { MAD_F(0x0635d242) /* 0.388139972 */, 18 }, /* 5698 */ { MAD_F(0x06363184) /* 0.388230816 */, 18 }, /* 5699 */ { MAD_F(0x063690c7) /* 0.388321665 */, 18 }, /* 5700 */ { MAD_F(0x0636f00b) /* 0.388412519 */, 18 }, /* 5701 */ { MAD_F(0x06374f51) /* 0.388503378 */, 18 }, /* 5702 */ { MAD_F(0x0637ae99) /* 0.388594243 */, 18 }, /* 5703 */ { MAD_F(0x06380de1) /* 0.388685113 */, 18 }, /* 5704 */ { MAD_F(0x06386d2b) /* 0.388775988 */, 18 }, /* 5705 */ { MAD_F(0x0638cc77) /* 0.388866869 */, 18 }, /* 5706 */ { MAD_F(0x06392bc4) /* 0.388957755 */, 18 }, /* 5707 */ { MAD_F(0x06398b12) /* 0.389048646 */, 18 }, /* 5708 */ { MAD_F(0x0639ea62) /* 0.389139542 */, 18 }, /* 5709 */ { MAD_F(0x063a49b4) /* 0.389230444 */, 18 }, /* 5710 */ { MAD_F(0x063aa906) /* 0.389321352 */, 18 }, /* 5711 */ { MAD_F(0x063b085a) /* 0.389412264 */, 18 }, /* 5712 */ { MAD_F(0x063b67b0) /* 0.389503182 */, 18 }, /* 5713 */ { MAD_F(0x063bc707) /* 0.389594105 */, 18 }, /* 5714 */ { MAD_F(0x063c265f) /* 0.389685033 */, 18 }, /* 5715 */ { MAD_F(0x063c85b9) /* 0.389775967 */, 18 }, /* 5716 */ { MAD_F(0x063ce514) /* 0.389866906 */, 18 }, /* 5717 */ { MAD_F(0x063d4471) /* 0.389957850 */, 18 }, /* 5718 */ { MAD_F(0x063da3cf) /* 0.390048800 */, 18 }, /* 5719 */ { MAD_F(0x063e032f) /* 0.390139755 */, 18 }, /* 5720 */ { MAD_F(0x063e6290) /* 0.390230715 */, 18 }, /* 5721 */ { MAD_F(0x063ec1f2) /* 0.390321681 */, 18 }, /* 5722 */ { MAD_F(0x063f2156) /* 0.390412651 */, 18 }, /* 5723 */ { MAD_F(0x063f80bb) /* 0.390503628 */, 18 }, /* 5724 */ { MAD_F(0x063fe022) /* 0.390594609 */, 18 }, /* 5725 */ { MAD_F(0x06403f8a) /* 0.390685596 */, 18 }, /* 5726 */ { MAD_F(0x06409ef3) /* 0.390776588 */, 18 }, /* 5727 */ { MAD_F(0x0640fe5e) /* 0.390867585 */, 18 }, /* 5728 */ { MAD_F(0x06415dcb) /* 0.390958588 */, 18 }, /* 5729 */ { MAD_F(0x0641bd38) /* 0.391049596 */, 18 }, /* 5730 */ { MAD_F(0x06421ca7) /* 0.391140609 */, 18 }, /* 5731 */ { MAD_F(0x06427c18) /* 0.391231627 */, 18 }, /* 5732 */ { MAD_F(0x0642db8a) /* 0.391322651 */, 18 }, /* 5733 */ { MAD_F(0x06433afd) /* 0.391413680 */, 18 }, /* 5734 */ { MAD_F(0x06439a72) /* 0.391504714 */, 18 }, /* 5735 */ { MAD_F(0x0643f9e9) /* 0.391595754 */, 18 }, /* 5736 */ { MAD_F(0x06445960) /* 0.391686799 */, 18 }, /* 5737 */ { MAD_F(0x0644b8d9) /* 0.391777849 */, 18 }, /* 5738 */ { MAD_F(0x06451854) /* 0.391868905 */, 18 }, /* 5739 */ { MAD_F(0x064577d0) /* 0.391959966 */, 18 }, /* 5740 */ { MAD_F(0x0645d74d) /* 0.392051032 */, 18 }, /* 5741 */ { MAD_F(0x064636cc) /* 0.392142103 */, 18 }, /* 5742 */ { MAD_F(0x0646964c) /* 0.392233180 */, 18 }, /* 5743 */ { MAD_F(0x0646f5ce) /* 0.392324262 */, 18 }, /* 5744 */ { MAD_F(0x06475551) /* 0.392415349 */, 18 }, /* 5745 */ { MAD_F(0x0647b4d5) /* 0.392506442 */, 18 }, /* 5746 */ { MAD_F(0x0648145b) /* 0.392597540 */, 18 }, /* 5747 */ { MAD_F(0x064873e3) /* 0.392688643 */, 18 }, /* 5748 */ { MAD_F(0x0648d36b) /* 0.392779751 */, 18 }, /* 5749 */ { MAD_F(0x064932f6) /* 0.392870865 */, 18 }, /* 5750 */ { MAD_F(0x06499281) /* 0.392961984 */, 18 }, /* 5751 */ { MAD_F(0x0649f20e) /* 0.393053108 */, 18 }, /* 5752 */ { MAD_F(0x064a519c) /* 0.393144238 */, 18 }, /* 5753 */ { MAD_F(0x064ab12c) /* 0.393235372 */, 18 }, /* 5754 */ { MAD_F(0x064b10be) /* 0.393326513 */, 18 }, /* 5755 */ { MAD_F(0x064b7050) /* 0.393417658 */, 18 }, /* 5756 */ { MAD_F(0x064bcfe4) /* 0.393508809 */, 18 }, /* 5757 */ { MAD_F(0x064c2f7a) /* 0.393599965 */, 18 }, /* 5758 */ { MAD_F(0x064c8f11) /* 0.393691126 */, 18 }, /* 5759 */ { MAD_F(0x064ceea9) /* 0.393782292 */, 18 }, /* 5760 */ { MAD_F(0x064d4e43) /* 0.393873464 */, 18 }, /* 5761 */ { MAD_F(0x064dadde) /* 0.393964641 */, 18 }, /* 5762 */ { MAD_F(0x064e0d7a) /* 0.394055823 */, 18 }, /* 5763 */ { MAD_F(0x064e6d18) /* 0.394147011 */, 18 }, /* 5764 */ { MAD_F(0x064eccb8) /* 0.394238204 */, 18 }, /* 5765 */ { MAD_F(0x064f2c59) /* 0.394329402 */, 18 }, /* 5766 */ { MAD_F(0x064f8bfb) /* 0.394420605 */, 18 }, /* 5767 */ { MAD_F(0x064feb9e) /* 0.394511814 */, 18 }, /* 5768 */ { MAD_F(0x06504b44) /* 0.394603028 */, 18 }, /* 5769 */ { MAD_F(0x0650aaea) /* 0.394694247 */, 18 }, /* 5770 */ { MAD_F(0x06510a92) /* 0.394785472 */, 18 }, /* 5771 */ { MAD_F(0x06516a3b) /* 0.394876702 */, 18 }, /* 5772 */ { MAD_F(0x0651c9e6) /* 0.394967937 */, 18 }, /* 5773 */ { MAD_F(0x06522992) /* 0.395059177 */, 18 }, /* 5774 */ { MAD_F(0x06528940) /* 0.395150423 */, 18 }, /* 5775 */ { MAD_F(0x0652e8ef) /* 0.395241673 */, 18 }, /* 5776 */ { MAD_F(0x0653489f) /* 0.395332930 */, 18 }, /* 5777 */ { MAD_F(0x0653a851) /* 0.395424191 */, 18 }, /* 5778 */ { MAD_F(0x06540804) /* 0.395515458 */, 18 }, /* 5779 */ { MAD_F(0x065467b9) /* 0.395606730 */, 18 }, /* 5780 */ { MAD_F(0x0654c76f) /* 0.395698007 */, 18 }, /* 5781 */ { MAD_F(0x06552726) /* 0.395789289 */, 18 }, /* 5782 */ { MAD_F(0x065586df) /* 0.395880577 */, 18 }, /* 5783 */ { MAD_F(0x0655e699) /* 0.395971870 */, 18 }, /* 5784 */ { MAD_F(0x06564655) /* 0.396063168 */, 18 }, /* 5785 */ { MAD_F(0x0656a612) /* 0.396154472 */, 18 }, /* 5786 */ { MAD_F(0x065705d0) /* 0.396245780 */, 18 }, /* 5787 */ { MAD_F(0x06576590) /* 0.396337094 */, 18 }, /* 5788 */ { MAD_F(0x0657c552) /* 0.396428414 */, 18 }, /* 5789 */ { MAD_F(0x06582514) /* 0.396519738 */, 18 }, /* 5790 */ { MAD_F(0x065884d9) /* 0.396611068 */, 18 }, /* 5791 */ { MAD_F(0x0658e49e) /* 0.396702403 */, 18 }, /* 5792 */ { MAD_F(0x06594465) /* 0.396793743 */, 18 }, /* 5793 */ { MAD_F(0x0659a42e) /* 0.396885089 */, 18 }, /* 5794 */ { MAD_F(0x065a03f7) /* 0.396976440 */, 18 }, /* 5795 */ { MAD_F(0x065a63c3) /* 0.397067796 */, 18 }, /* 5796 */ { MAD_F(0x065ac38f) /* 0.397159157 */, 18 }, /* 5797 */ { MAD_F(0x065b235d) /* 0.397250524 */, 18 }, /* 5798 */ { MAD_F(0x065b832d) /* 0.397341896 */, 18 }, /* 5799 */ { MAD_F(0x065be2fe) /* 0.397433273 */, 18 }, /* 5800 */ { MAD_F(0x065c42d0) /* 0.397524655 */, 18 }, /* 5801 */ { MAD_F(0x065ca2a3) /* 0.397616043 */, 18 }, /* 5802 */ { MAD_F(0x065d0279) /* 0.397707436 */, 18 }, /* 5803 */ { MAD_F(0x065d624f) /* 0.397798834 */, 18 }, /* 5804 */ { MAD_F(0x065dc227) /* 0.397890237 */, 18 }, /* 5805 */ { MAD_F(0x065e2200) /* 0.397981646 */, 18 }, /* 5806 */ { MAD_F(0x065e81db) /* 0.398073059 */, 18 }, /* 5807 */ { MAD_F(0x065ee1b7) /* 0.398164479 */, 18 }, /* 5808 */ { MAD_F(0x065f4195) /* 0.398255903 */, 18 }, /* 5809 */ { MAD_F(0x065fa174) /* 0.398347333 */, 18 }, /* 5810 */ { MAD_F(0x06600154) /* 0.398438767 */, 18 }, /* 5811 */ { MAD_F(0x06606136) /* 0.398530207 */, 18 }, /* 5812 */ { MAD_F(0x0660c119) /* 0.398621653 */, 18 }, /* 5813 */ { MAD_F(0x066120fd) /* 0.398713103 */, 18 }, /* 5814 */ { MAD_F(0x066180e3) /* 0.398804559 */, 18 }, /* 5815 */ { MAD_F(0x0661e0cb) /* 0.398896020 */, 18 }, /* 5816 */ { MAD_F(0x066240b4) /* 0.398987487 */, 18 }, /* 5817 */ { MAD_F(0x0662a09e) /* 0.399078958 */, 18 }, /* 5818 */ { MAD_F(0x06630089) /* 0.399170435 */, 18 }, /* 5819 */ { MAD_F(0x06636077) /* 0.399261917 */, 18 }, /* 5820 */ { MAD_F(0x0663c065) /* 0.399353404 */, 18 }, /* 5821 */ { MAD_F(0x06642055) /* 0.399444897 */, 18 }, /* 5822 */ { MAD_F(0x06648046) /* 0.399536395 */, 18 }, /* 5823 */ { MAD_F(0x0664e039) /* 0.399627898 */, 18 }, /* 5824 */ { MAD_F(0x0665402d) /* 0.399719406 */, 18 }, /* 5825 */ { MAD_F(0x0665a022) /* 0.399810919 */, 18 }, /* 5826 */ { MAD_F(0x06660019) /* 0.399902438 */, 18 }, /* 5827 */ { MAD_F(0x06666011) /* 0.399993962 */, 18 }, /* 5828 */ { MAD_F(0x0666c00b) /* 0.400085491 */, 18 }, /* 5829 */ { MAD_F(0x06672006) /* 0.400177026 */, 18 }, /* 5830 */ { MAD_F(0x06678003) /* 0.400268565 */, 18 }, /* 5831 */ { MAD_F(0x0667e000) /* 0.400360110 */, 18 }, /* 5832 */ { MAD_F(0x06684000) /* 0.400451660 */, 18 }, /* 5833 */ { MAD_F(0x0668a000) /* 0.400543216 */, 18 }, /* 5834 */ { MAD_F(0x06690003) /* 0.400634776 */, 18 }, /* 5835 */ { MAD_F(0x06696006) /* 0.400726342 */, 18 }, /* 5836 */ { MAD_F(0x0669c00b) /* 0.400817913 */, 18 }, /* 5837 */ { MAD_F(0x066a2011) /* 0.400909489 */, 18 }, /* 5838 */ { MAD_F(0x066a8019) /* 0.401001071 */, 18 }, /* 5839 */ { MAD_F(0x066ae022) /* 0.401092657 */, 18 }, /* 5840 */ { MAD_F(0x066b402d) /* 0.401184249 */, 18 }, /* 5841 */ { MAD_F(0x066ba039) /* 0.401275847 */, 18 }, /* 5842 */ { MAD_F(0x066c0046) /* 0.401367449 */, 18 }, /* 5843 */ { MAD_F(0x066c6055) /* 0.401459057 */, 18 }, /* 5844 */ { MAD_F(0x066cc065) /* 0.401550670 */, 18 }, /* 5845 */ { MAD_F(0x066d2076) /* 0.401642288 */, 18 }, /* 5846 */ { MAD_F(0x066d8089) /* 0.401733911 */, 18 }, /* 5847 */ { MAD_F(0x066de09e) /* 0.401825540 */, 18 }, /* 5848 */ { MAD_F(0x066e40b3) /* 0.401917173 */, 18 }, /* 5849 */ { MAD_F(0x066ea0cb) /* 0.402008812 */, 18 }, /* 5850 */ { MAD_F(0x066f00e3) /* 0.402100457 */, 18 }, /* 5851 */ { MAD_F(0x066f60fd) /* 0.402192106 */, 18 }, /* 5852 */ { MAD_F(0x066fc118) /* 0.402283761 */, 18 }, /* 5853 */ { MAD_F(0x06702135) /* 0.402375420 */, 18 }, /* 5854 */ { MAD_F(0x06708153) /* 0.402467086 */, 18 }, /* 5855 */ { MAD_F(0x0670e173) /* 0.402558756 */, 18 }, /* 5856 */ { MAD_F(0x06714194) /* 0.402650431 */, 18 }, /* 5857 */ { MAD_F(0x0671a1b6) /* 0.402742112 */, 18 }, /* 5858 */ { MAD_F(0x067201da) /* 0.402833798 */, 18 }, /* 5859 */ { MAD_F(0x067261ff) /* 0.402925489 */, 18 }, /* 5860 */ { MAD_F(0x0672c226) /* 0.403017186 */, 18 }, /* 5861 */ { MAD_F(0x0673224e) /* 0.403108887 */, 18 }, /* 5862 */ { MAD_F(0x06738277) /* 0.403200594 */, 18 }, /* 5863 */ { MAD_F(0x0673e2a2) /* 0.403292306 */, 18 }, /* 5864 */ { MAD_F(0x067442ce) /* 0.403384024 */, 18 }, /* 5865 */ { MAD_F(0x0674a2fc) /* 0.403475746 */, 18 }, /* 5866 */ { MAD_F(0x0675032b) /* 0.403567474 */, 18 }, /* 5867 */ { MAD_F(0x0675635b) /* 0.403659207 */, 18 }, /* 5868 */ { MAD_F(0x0675c38d) /* 0.403750945 */, 18 }, /* 5869 */ { MAD_F(0x067623c0) /* 0.403842688 */, 18 }, /* 5870 */ { MAD_F(0x067683f4) /* 0.403934437 */, 18 }, /* 5871 */ { MAD_F(0x0676e42a) /* 0.404026190 */, 18 }, /* 5872 */ { MAD_F(0x06774462) /* 0.404117949 */, 18 }, /* 5873 */ { MAD_F(0x0677a49b) /* 0.404209714 */, 18 }, /* 5874 */ { MAD_F(0x067804d5) /* 0.404301483 */, 18 }, /* 5875 */ { MAD_F(0x06786510) /* 0.404393258 */, 18 }, /* 5876 */ { MAD_F(0x0678c54d) /* 0.404485037 */, 18 }, /* 5877 */ { MAD_F(0x0679258c) /* 0.404576822 */, 18 }, /* 5878 */ { MAD_F(0x067985cb) /* 0.404668613 */, 18 }, /* 5879 */ { MAD_F(0x0679e60c) /* 0.404760408 */, 18 }, /* 5880 */ { MAD_F(0x067a464f) /* 0.404852209 */, 18 }, /* 5881 */ { MAD_F(0x067aa693) /* 0.404944014 */, 18 }, /* 5882 */ { MAD_F(0x067b06d8) /* 0.405035825 */, 18 }, /* 5883 */ { MAD_F(0x067b671f) /* 0.405127642 */, 18 }, /* 5884 */ { MAD_F(0x067bc767) /* 0.405219463 */, 18 }, /* 5885 */ { MAD_F(0x067c27b1) /* 0.405311290 */, 18 }, /* 5886 */ { MAD_F(0x067c87fc) /* 0.405403122 */, 18 }, /* 5887 */ { MAD_F(0x067ce848) /* 0.405494959 */, 18 }, /* 5888 */ { MAD_F(0x067d4896) /* 0.405586801 */, 18 }, /* 5889 */ { MAD_F(0x067da8e5) /* 0.405678648 */, 18 }, /* 5890 */ { MAD_F(0x067e0935) /* 0.405770501 */, 18 }, /* 5891 */ { MAD_F(0x067e6987) /* 0.405862359 */, 18 }, /* 5892 */ { MAD_F(0x067ec9da) /* 0.405954222 */, 18 }, /* 5893 */ { MAD_F(0x067f2a2f) /* 0.406046090 */, 18 }, /* 5894 */ { MAD_F(0x067f8a85) /* 0.406137963 */, 18 }, /* 5895 */ { MAD_F(0x067feadd) /* 0.406229842 */, 18 }, /* 5896 */ { MAD_F(0x06804b36) /* 0.406321726 */, 18 }, /* 5897 */ { MAD_F(0x0680ab90) /* 0.406413615 */, 18 }, /* 5898 */ { MAD_F(0x06810beb) /* 0.406505509 */, 18 }, /* 5899 */ { MAD_F(0x06816c49) /* 0.406597408 */, 18 }, /* 5900 */ { MAD_F(0x0681cca7) /* 0.406689313 */, 18 }, /* 5901 */ { MAD_F(0x06822d07) /* 0.406781223 */, 18 }, /* 5902 */ { MAD_F(0x06828d68) /* 0.406873138 */, 18 }, /* 5903 */ { MAD_F(0x0682edcb) /* 0.406965058 */, 18 }, /* 5904 */ { MAD_F(0x06834e2f) /* 0.407056983 */, 18 }, /* 5905 */ { MAD_F(0x0683ae94) /* 0.407148914 */, 18 }, /* 5906 */ { MAD_F(0x06840efb) /* 0.407240850 */, 18 }, /* 5907 */ { MAD_F(0x06846f63) /* 0.407332791 */, 18 }, /* 5908 */ { MAD_F(0x0684cfcd) /* 0.407424737 */, 18 }, /* 5909 */ { MAD_F(0x06853038) /* 0.407516688 */, 18 }, /* 5910 */ { MAD_F(0x068590a4) /* 0.407608645 */, 18 }, /* 5911 */ { MAD_F(0x0685f112) /* 0.407700606 */, 18 }, /* 5912 */ { MAD_F(0x06865181) /* 0.407792573 */, 18 }, /* 5913 */ { MAD_F(0x0686b1f2) /* 0.407884545 */, 18 }, /* 5914 */ { MAD_F(0x06871264) /* 0.407976522 */, 18 }, /* 5915 */ { MAD_F(0x068772d7) /* 0.408068505 */, 18 }, /* 5916 */ { MAD_F(0x0687d34c) /* 0.408160492 */, 18 }, /* 5917 */ { MAD_F(0x068833c2) /* 0.408252485 */, 18 }, /* 5918 */ { MAD_F(0x06889439) /* 0.408344483 */, 18 }, /* 5919 */ { MAD_F(0x0688f4b2) /* 0.408436486 */, 18 }, /* 5920 */ { MAD_F(0x0689552c) /* 0.408528495 */, 18 }, /* 5921 */ { MAD_F(0x0689b5a8) /* 0.408620508 */, 18 }, /* 5922 */ { MAD_F(0x068a1625) /* 0.408712527 */, 18 }, /* 5923 */ { MAD_F(0x068a76a4) /* 0.408804551 */, 18 }, /* 5924 */ { MAD_F(0x068ad724) /* 0.408896580 */, 18 }, /* 5925 */ { MAD_F(0x068b37a5) /* 0.408988614 */, 18 }, /* 5926 */ { MAD_F(0x068b9827) /* 0.409080653 */, 18 }, /* 5927 */ { MAD_F(0x068bf8ac) /* 0.409172698 */, 18 }, /* 5928 */ { MAD_F(0x068c5931) /* 0.409264748 */, 18 }, /* 5929 */ { MAD_F(0x068cb9b8) /* 0.409356803 */, 18 }, /* 5930 */ { MAD_F(0x068d1a40) /* 0.409448863 */, 18 }, /* 5931 */ { MAD_F(0x068d7aca) /* 0.409540928 */, 18 }, /* 5932 */ { MAD_F(0x068ddb54) /* 0.409632999 */, 18 }, /* 5933 */ { MAD_F(0x068e3be1) /* 0.409725074 */, 18 }, /* 5934 */ { MAD_F(0x068e9c6f) /* 0.409817155 */, 18 }, /* 5935 */ { MAD_F(0x068efcfe) /* 0.409909241 */, 18 }, /* 5936 */ { MAD_F(0x068f5d8e) /* 0.410001332 */, 18 }, /* 5937 */ { MAD_F(0x068fbe20) /* 0.410093428 */, 18 }, /* 5938 */ { MAD_F(0x06901eb4) /* 0.410185530 */, 18 }, /* 5939 */ { MAD_F(0x06907f48) /* 0.410277637 */, 18 }, /* 5940 */ { MAD_F(0x0690dfde) /* 0.410369748 */, 18 }, /* 5941 */ { MAD_F(0x06914076) /* 0.410461865 */, 18 }, /* 5942 */ { MAD_F(0x0691a10f) /* 0.410553988 */, 18 }, /* 5943 */ { MAD_F(0x069201a9) /* 0.410646115 */, 18 }, /* 5944 */ { MAD_F(0x06926245) /* 0.410738247 */, 18 }, /* 5945 */ { MAD_F(0x0692c2e2) /* 0.410830385 */, 18 }, /* 5946 */ { MAD_F(0x06932380) /* 0.410922528 */, 18 }, /* 5947 */ { MAD_F(0x06938420) /* 0.411014676 */, 18 }, /* 5948 */ { MAD_F(0x0693e4c1) /* 0.411106829 */, 18 }, /* 5949 */ { MAD_F(0x06944563) /* 0.411198987 */, 18 }, /* 5950 */ { MAD_F(0x0694a607) /* 0.411291151 */, 18 }, /* 5951 */ { MAD_F(0x069506ad) /* 0.411383320 */, 18 }, /* 5952 */ { MAD_F(0x06956753) /* 0.411475493 */, 18 }, /* 5953 */ { MAD_F(0x0695c7fc) /* 0.411567672 */, 18 }, /* 5954 */ { MAD_F(0x069628a5) /* 0.411659857 */, 18 }, /* 5955 */ { MAD_F(0x06968950) /* 0.411752046 */, 18 }, /* 5956 */ { MAD_F(0x0696e9fc) /* 0.411844240 */, 18 }, /* 5957 */ { MAD_F(0x06974aaa) /* 0.411936440 */, 18 }, /* 5958 */ { MAD_F(0x0697ab59) /* 0.412028645 */, 18 }, /* 5959 */ { MAD_F(0x06980c09) /* 0.412120855 */, 18 }, /* 5960 */ { MAD_F(0x06986cbb) /* 0.412213070 */, 18 }, /* 5961 */ { MAD_F(0x0698cd6e) /* 0.412305290 */, 18 }, /* 5962 */ { MAD_F(0x06992e23) /* 0.412397516 */, 18 }, /* 5963 */ { MAD_F(0x06998ed9) /* 0.412489746 */, 18 }, /* 5964 */ { MAD_F(0x0699ef90) /* 0.412581982 */, 18 }, /* 5965 */ { MAD_F(0x069a5049) /* 0.412674223 */, 18 }, /* 5966 */ { MAD_F(0x069ab103) /* 0.412766469 */, 18 }, /* 5967 */ { MAD_F(0x069b11bf) /* 0.412858720 */, 18 }, /* 5968 */ { MAD_F(0x069b727b) /* 0.412950976 */, 18 }, /* 5969 */ { MAD_F(0x069bd33a) /* 0.413043238 */, 18 }, /* 5970 */ { MAD_F(0x069c33f9) /* 0.413135505 */, 18 }, /* 5971 */ { MAD_F(0x069c94ba) /* 0.413227776 */, 18 }, /* 5972 */ { MAD_F(0x069cf57d) /* 0.413320053 */, 18 }, /* 5973 */ { MAD_F(0x069d5641) /* 0.413412335 */, 18 }, /* 5974 */ { MAD_F(0x069db706) /* 0.413504623 */, 18 }, /* 5975 */ { MAD_F(0x069e17cc) /* 0.413596915 */, 18 }, /* 5976 */ { MAD_F(0x069e7894) /* 0.413689213 */, 18 }, /* 5977 */ { MAD_F(0x069ed95e) /* 0.413781515 */, 18 }, /* 5978 */ { MAD_F(0x069f3a28) /* 0.413873823 */, 18 }, /* 5979 */ { MAD_F(0x069f9af4) /* 0.413966136 */, 18 }, /* 5980 */ { MAD_F(0x069ffbc2) /* 0.414058454 */, 18 }, /* 5981 */ { MAD_F(0x06a05c91) /* 0.414150778 */, 18 }, /* 5982 */ { MAD_F(0x06a0bd61) /* 0.414243106 */, 18 }, /* 5983 */ { MAD_F(0x06a11e32) /* 0.414335440 */, 18 }, /* 5984 */ { MAD_F(0x06a17f05) /* 0.414427779 */, 18 }, /* 5985 */ { MAD_F(0x06a1dfda) /* 0.414520122 */, 18 }, /* 5986 */ { MAD_F(0x06a240b0) /* 0.414612471 */, 18 }, /* 5987 */ { MAD_F(0x06a2a187) /* 0.414704826 */, 18 }, /* 5988 */ { MAD_F(0x06a3025f) /* 0.414797185 */, 18 }, /* 5989 */ { MAD_F(0x06a36339) /* 0.414889549 */, 18 }, /* 5990 */ { MAD_F(0x06a3c414) /* 0.414981919 */, 18 }, /* 5991 */ { MAD_F(0x06a424f1) /* 0.415074294 */, 18 }, /* 5992 */ { MAD_F(0x06a485cf) /* 0.415166674 */, 18 }, /* 5993 */ { MAD_F(0x06a4e6ae) /* 0.415259059 */, 18 }, /* 5994 */ { MAD_F(0x06a5478f) /* 0.415351449 */, 18 }, /* 5995 */ { MAD_F(0x06a5a871) /* 0.415443844 */, 18 }, /* 5996 */ { MAD_F(0x06a60955) /* 0.415536244 */, 18 }, /* 5997 */ { MAD_F(0x06a66a3a) /* 0.415628650 */, 18 }, /* 5998 */ { MAD_F(0x06a6cb20) /* 0.415721061 */, 18 }, /* 5999 */ { MAD_F(0x06a72c08) /* 0.415813476 */, 18 }, /* 6000 */ { MAD_F(0x06a78cf1) /* 0.415905897 */, 18 }, /* 6001 */ { MAD_F(0x06a7eddb) /* 0.415998324 */, 18 }, /* 6002 */ { MAD_F(0x06a84ec7) /* 0.416090755 */, 18 }, /* 6003 */ { MAD_F(0x06a8afb4) /* 0.416183191 */, 18 }, /* 6004 */ { MAD_F(0x06a910a3) /* 0.416275633 */, 18 }, /* 6005 */ { MAD_F(0x06a97193) /* 0.416368079 */, 18 }, /* 6006 */ { MAD_F(0x06a9d284) /* 0.416460531 */, 18 }, /* 6007 */ { MAD_F(0x06aa3377) /* 0.416552988 */, 18 }, /* 6008 */ { MAD_F(0x06aa946b) /* 0.416645450 */, 18 }, /* 6009 */ { MAD_F(0x06aaf561) /* 0.416737917 */, 18 }, /* 6010 */ { MAD_F(0x06ab5657) /* 0.416830389 */, 18 }, /* 6011 */ { MAD_F(0x06abb750) /* 0.416922867 */, 18 }, /* 6012 */ { MAD_F(0x06ac1849) /* 0.417015349 */, 18 }, /* 6013 */ { MAD_F(0x06ac7944) /* 0.417107837 */, 18 }, /* 6014 */ { MAD_F(0x06acda41) /* 0.417200330 */, 18 }, /* 6015 */ { MAD_F(0x06ad3b3e) /* 0.417292828 */, 18 }, /* 6016 */ { MAD_F(0x06ad9c3d) /* 0.417385331 */, 18 }, /* 6017 */ { MAD_F(0x06adfd3e) /* 0.417477839 */, 18 }, /* 6018 */ { MAD_F(0x06ae5e40) /* 0.417570352 */, 18 }, /* 6019 */ { MAD_F(0x06aebf43) /* 0.417662871 */, 18 }, /* 6020 */ { MAD_F(0x06af2047) /* 0.417755394 */, 18 }, /* 6021 */ { MAD_F(0x06af814d) /* 0.417847923 */, 18 }, /* 6022 */ { MAD_F(0x06afe255) /* 0.417940457 */, 18 }, /* 6023 */ { MAD_F(0x06b0435e) /* 0.418032996 */, 18 }, /* 6024 */ { MAD_F(0x06b0a468) /* 0.418125540 */, 18 }, /* 6025 */ { MAD_F(0x06b10573) /* 0.418218089 */, 18 }, /* 6026 */ { MAD_F(0x06b16680) /* 0.418310643 */, 18 }, /* 6027 */ { MAD_F(0x06b1c78e) /* 0.418403203 */, 18 }, /* 6028 */ { MAD_F(0x06b2289e) /* 0.418495767 */, 18 }, /* 6029 */ { MAD_F(0x06b289af) /* 0.418588337 */, 18 }, /* 6030 */ { MAD_F(0x06b2eac1) /* 0.418680911 */, 18 }, /* 6031 */ { MAD_F(0x06b34bd5) /* 0.418773491 */, 18 }, /* 6032 */ { MAD_F(0x06b3acea) /* 0.418866076 */, 18 }, /* 6033 */ { MAD_F(0x06b40e00) /* 0.418958666 */, 18 }, /* 6034 */ { MAD_F(0x06b46f18) /* 0.419051262 */, 18 }, /* 6035 */ { MAD_F(0x06b4d031) /* 0.419143862 */, 18 }, /* 6036 */ { MAD_F(0x06b5314c) /* 0.419236467 */, 18 }, /* 6037 */ { MAD_F(0x06b59268) /* 0.419329078 */, 18 }, /* 6038 */ { MAD_F(0x06b5f385) /* 0.419421694 */, 18 }, /* 6039 */ { MAD_F(0x06b654a4) /* 0.419514314 */, 18 }, /* 6040 */ { MAD_F(0x06b6b5c4) /* 0.419606940 */, 18 }, /* 6041 */ { MAD_F(0x06b716e6) /* 0.419699571 */, 18 }, /* 6042 */ { MAD_F(0x06b77808) /* 0.419792208 */, 18 }, /* 6043 */ { MAD_F(0x06b7d92d) /* 0.419884849 */, 18 }, /* 6044 */ { MAD_F(0x06b83a52) /* 0.419977495 */, 18 }, /* 6045 */ { MAD_F(0x06b89b79) /* 0.420070147 */, 18 }, /* 6046 */ { MAD_F(0x06b8fca1) /* 0.420162803 */, 18 }, /* 6047 */ { MAD_F(0x06b95dcb) /* 0.420255465 */, 18 }, /* 6048 */ { MAD_F(0x06b9bef6) /* 0.420348132 */, 18 }, /* 6049 */ { MAD_F(0x06ba2023) /* 0.420440803 */, 18 }, /* 6050 */ { MAD_F(0x06ba8150) /* 0.420533481 */, 18 }, /* 6051 */ { MAD_F(0x06bae280) /* 0.420626163 */, 18 }, /* 6052 */ { MAD_F(0x06bb43b0) /* 0.420718850 */, 18 }, /* 6053 */ { MAD_F(0x06bba4e2) /* 0.420811542 */, 18 }, /* 6054 */ { MAD_F(0x06bc0615) /* 0.420904240 */, 18 }, /* 6055 */ { MAD_F(0x06bc674a) /* 0.420996942 */, 18 }, /* 6056 */ { MAD_F(0x06bcc880) /* 0.421089650 */, 18 }, /* 6057 */ { MAD_F(0x06bd29b7) /* 0.421182362 */, 18 }, /* 6058 */ { MAD_F(0x06bd8af0) /* 0.421275080 */, 18 }, /* 6059 */ { MAD_F(0x06bdec2a) /* 0.421367803 */, 18 }, /* 6060 */ { MAD_F(0x06be4d66) /* 0.421460531 */, 18 }, /* 6061 */ { MAD_F(0x06beaea3) /* 0.421553264 */, 18 }, /* 6062 */ { MAD_F(0x06bf0fe1) /* 0.421646003 */, 18 }, /* 6063 */ { MAD_F(0x06bf7120) /* 0.421738746 */, 18 }, /* 6064 */ { MAD_F(0x06bfd261) /* 0.421831494 */, 18 }, /* 6065 */ { MAD_F(0x06c033a4) /* 0.421924248 */, 18 }, /* 6066 */ { MAD_F(0x06c094e7) /* 0.422017007 */, 18 }, /* 6067 */ { MAD_F(0x06c0f62c) /* 0.422109770 */, 18 }, /* 6068 */ { MAD_F(0x06c15773) /* 0.422202539 */, 18 }, /* 6069 */ { MAD_F(0x06c1b8bb) /* 0.422295313 */, 18 }, /* 6070 */ { MAD_F(0x06c21a04) /* 0.422388092 */, 18 }, /* 6071 */ { MAD_F(0x06c27b4e) /* 0.422480876 */, 18 }, /* 6072 */ { MAD_F(0x06c2dc9a) /* 0.422573665 */, 18 }, /* 6073 */ { MAD_F(0x06c33de8) /* 0.422666460 */, 18 }, /* 6074 */ { MAD_F(0x06c39f36) /* 0.422759259 */, 18 }, /* 6075 */ { MAD_F(0x06c40086) /* 0.422852064 */, 18 }, /* 6076 */ { MAD_F(0x06c461d8) /* 0.422944873 */, 18 }, /* 6077 */ { MAD_F(0x06c4c32a) /* 0.423037688 */, 18 }, /* 6078 */ { MAD_F(0x06c5247f) /* 0.423130508 */, 18 }, /* 6079 */ { MAD_F(0x06c585d4) /* 0.423223333 */, 18 }, /* 6080 */ { MAD_F(0x06c5e72b) /* 0.423316162 */, 18 }, /* 6081 */ { MAD_F(0x06c64883) /* 0.423408997 */, 18 }, /* 6082 */ { MAD_F(0x06c6a9dd) /* 0.423501838 */, 18 }, /* 6083 */ { MAD_F(0x06c70b38) /* 0.423594683 */, 18 }, /* 6084 */ { MAD_F(0x06c76c94) /* 0.423687533 */, 18 }, /* 6085 */ { MAD_F(0x06c7cdf2) /* 0.423780389 */, 18 }, /* 6086 */ { MAD_F(0x06c82f51) /* 0.423873249 */, 18 }, /* 6087 */ { MAD_F(0x06c890b1) /* 0.423966115 */, 18 }, /* 6088 */ { MAD_F(0x06c8f213) /* 0.424058985 */, 18 }, /* 6089 */ { MAD_F(0x06c95376) /* 0.424151861 */, 18 }, /* 6090 */ { MAD_F(0x06c9b4da) /* 0.424244742 */, 18 }, /* 6091 */ { MAD_F(0x06ca1640) /* 0.424337628 */, 18 }, /* 6092 */ { MAD_F(0x06ca77a8) /* 0.424430519 */, 18 }, /* 6093 */ { MAD_F(0x06cad910) /* 0.424523415 */, 18 }, /* 6094 */ { MAD_F(0x06cb3a7a) /* 0.424616316 */, 18 }, /* 6095 */ { MAD_F(0x06cb9be5) /* 0.424709222 */, 18 }, /* 6096 */ { MAD_F(0x06cbfd52) /* 0.424802133 */, 18 }, /* 6097 */ { MAD_F(0x06cc5ec0) /* 0.424895050 */, 18 }, /* 6098 */ { MAD_F(0x06ccc030) /* 0.424987971 */, 18 }, /* 6099 */ { MAD_F(0x06cd21a0) /* 0.425080898 */, 18 }, /* 6100 */ { MAD_F(0x06cd8313) /* 0.425173829 */, 18 }, /* 6101 */ { MAD_F(0x06cde486) /* 0.425266766 */, 18 }, /* 6102 */ { MAD_F(0x06ce45fb) /* 0.425359708 */, 18 }, /* 6103 */ { MAD_F(0x06cea771) /* 0.425452655 */, 18 }, /* 6104 */ { MAD_F(0x06cf08e9) /* 0.425545607 */, 18 }, /* 6105 */ { MAD_F(0x06cf6a62) /* 0.425638564 */, 18 }, /* 6106 */ { MAD_F(0x06cfcbdc) /* 0.425731526 */, 18 }, /* 6107 */ { MAD_F(0x06d02d58) /* 0.425824493 */, 18 }, /* 6108 */ { MAD_F(0x06d08ed5) /* 0.425917465 */, 18 }, /* 6109 */ { MAD_F(0x06d0f053) /* 0.426010443 */, 18 }, /* 6110 */ { MAD_F(0x06d151d3) /* 0.426103425 */, 18 }, /* 6111 */ { MAD_F(0x06d1b354) /* 0.426196412 */, 18 }, /* 6112 */ { MAD_F(0x06d214d7) /* 0.426289405 */, 18 }, /* 6113 */ { MAD_F(0x06d2765a) /* 0.426382403 */, 18 }, /* 6114 */ { MAD_F(0x06d2d7e0) /* 0.426475405 */, 18 }, /* 6115 */ { MAD_F(0x06d33966) /* 0.426568413 */, 18 }, /* 6116 */ { MAD_F(0x06d39aee) /* 0.426661426 */, 18 }, /* 6117 */ { MAD_F(0x06d3fc77) /* 0.426754444 */, 18 }, /* 6118 */ { MAD_F(0x06d45e02) /* 0.426847467 */, 18 }, /* 6119 */ { MAD_F(0x06d4bf8e) /* 0.426940495 */, 18 }, /* 6120 */ { MAD_F(0x06d5211c) /* 0.427033528 */, 18 }, /* 6121 */ { MAD_F(0x06d582aa) /* 0.427126566 */, 18 }, /* 6122 */ { MAD_F(0x06d5e43a) /* 0.427219609 */, 18 }, /* 6123 */ { MAD_F(0x06d645cc) /* 0.427312657 */, 18 }, /* 6124 */ { MAD_F(0x06d6a75f) /* 0.427405711 */, 18 }, /* 6125 */ { MAD_F(0x06d708f3) /* 0.427498769 */, 18 }, /* 6126 */ { MAD_F(0x06d76a88) /* 0.427591833 */, 18 }, /* 6127 */ { MAD_F(0x06d7cc1f) /* 0.427684901 */, 18 }, /* 6128 */ { MAD_F(0x06d82db8) /* 0.427777975 */, 18 }, /* 6129 */ { MAD_F(0x06d88f51) /* 0.427871054 */, 18 }, /* 6130 */ { MAD_F(0x06d8f0ec) /* 0.427964137 */, 18 }, /* 6131 */ { MAD_F(0x06d95288) /* 0.428057226 */, 18 }, /* 6132 */ { MAD_F(0x06d9b426) /* 0.428150320 */, 18 }, /* 6133 */ { MAD_F(0x06da15c5) /* 0.428243419 */, 18 }, /* 6134 */ { MAD_F(0x06da7766) /* 0.428336523 */, 18 }, /* 6135 */ { MAD_F(0x06dad907) /* 0.428429632 */, 18 }, /* 6136 */ { MAD_F(0x06db3aaa) /* 0.428522746 */, 18 }, /* 6137 */ { MAD_F(0x06db9c4f) /* 0.428615865 */, 18 }, /* 6138 */ { MAD_F(0x06dbfdf5) /* 0.428708989 */, 18 }, /* 6139 */ { MAD_F(0x06dc5f9c) /* 0.428802119 */, 18 }, /* 6140 */ { MAD_F(0x06dcc145) /* 0.428895253 */, 18 }, /* 6141 */ { MAD_F(0x06dd22ee) /* 0.428988392 */, 18 }, /* 6142 */ { MAD_F(0x06dd849a) /* 0.429081537 */, 18 }, /* 6143 */ { MAD_F(0x06dde646) /* 0.429174686 */, 18 }, /* 6144 */ { MAD_F(0x06de47f4) /* 0.429267841 */, 18 }, /* 6145 */ { MAD_F(0x06dea9a4) /* 0.429361001 */, 18 }, /* 6146 */ { MAD_F(0x06df0b54) /* 0.429454165 */, 18 }, /* 6147 */ { MAD_F(0x06df6d06) /* 0.429547335 */, 18 }, /* 6148 */ { MAD_F(0x06dfceba) /* 0.429640510 */, 18 }, /* 6149 */ { MAD_F(0x06e0306f) /* 0.429733690 */, 18 }, /* 6150 */ { MAD_F(0x06e09225) /* 0.429826874 */, 18 }, /* 6151 */ { MAD_F(0x06e0f3dc) /* 0.429920064 */, 18 }, /* 6152 */ { MAD_F(0x06e15595) /* 0.430013259 */, 18 }, /* 6153 */ { MAD_F(0x06e1b74f) /* 0.430106459 */, 18 }, /* 6154 */ { MAD_F(0x06e2190b) /* 0.430199664 */, 18 }, /* 6155 */ { MAD_F(0x06e27ac8) /* 0.430292875 */, 18 }, /* 6156 */ { MAD_F(0x06e2dc86) /* 0.430386090 */, 18 }, /* 6157 */ { MAD_F(0x06e33e46) /* 0.430479310 */, 18 }, /* 6158 */ { MAD_F(0x06e3a007) /* 0.430572535 */, 18 }, /* 6159 */ { MAD_F(0x06e401c9) /* 0.430665765 */, 18 }, /* 6160 */ { MAD_F(0x06e4638d) /* 0.430759001 */, 18 }, /* 6161 */ { MAD_F(0x06e4c552) /* 0.430852241 */, 18 }, /* 6162 */ { MAD_F(0x06e52718) /* 0.430945487 */, 18 }, /* 6163 */ { MAD_F(0x06e588e0) /* 0.431038737 */, 18 }, /* 6164 */ { MAD_F(0x06e5eaa9) /* 0.431131993 */, 18 }, /* 6165 */ { MAD_F(0x06e64c73) /* 0.431225253 */, 18 }, /* 6166 */ { MAD_F(0x06e6ae3f) /* 0.431318519 */, 18 }, /* 6167 */ { MAD_F(0x06e7100c) /* 0.431411790 */, 18 }, /* 6168 */ { MAD_F(0x06e771db) /* 0.431505065 */, 18 }, /* 6169 */ { MAD_F(0x06e7d3ab) /* 0.431598346 */, 18 }, /* 6170 */ { MAD_F(0x06e8357c) /* 0.431691632 */, 18 }, /* 6171 */ { MAD_F(0x06e8974e) /* 0.431784923 */, 18 }, /* 6172 */ { MAD_F(0x06e8f922) /* 0.431878218 */, 18 }, /* 6173 */ { MAD_F(0x06e95af8) /* 0.431971519 */, 18 }, /* 6174 */ { MAD_F(0x06e9bcce) /* 0.432064825 */, 18 }, /* 6175 */ { MAD_F(0x06ea1ea6) /* 0.432158136 */, 18 }, /* 6176 */ { MAD_F(0x06ea807f) /* 0.432251452 */, 18 }, /* 6177 */ { MAD_F(0x06eae25a) /* 0.432344773 */, 18 }, /* 6178 */ { MAD_F(0x06eb4436) /* 0.432438099 */, 18 }, /* 6179 */ { MAD_F(0x06eba614) /* 0.432531431 */, 18 }, /* 6180 */ { MAD_F(0x06ec07f2) /* 0.432624767 */, 18 }, /* 6181 */ { MAD_F(0x06ec69d2) /* 0.432718108 */, 18 }, /* 6182 */ { MAD_F(0x06eccbb4) /* 0.432811454 */, 18 }, /* 6183 */ { MAD_F(0x06ed2d97) /* 0.432904805 */, 18 }, /* 6184 */ { MAD_F(0x06ed8f7b) /* 0.432998162 */, 18 }, /* 6185 */ { MAD_F(0x06edf160) /* 0.433091523 */, 18 }, /* 6186 */ { MAD_F(0x06ee5347) /* 0.433184889 */, 18 }, /* 6187 */ { MAD_F(0x06eeb52f) /* 0.433278261 */, 18 }, /* 6188 */ { MAD_F(0x06ef1719) /* 0.433371637 */, 18 }, /* 6189 */ { MAD_F(0x06ef7904) /* 0.433465019 */, 18 }, /* 6190 */ { MAD_F(0x06efdaf0) /* 0.433558405 */, 18 }, /* 6191 */ { MAD_F(0x06f03cde) /* 0.433651797 */, 18 }, /* 6192 */ { MAD_F(0x06f09ecc) /* 0.433745193 */, 18 }, /* 6193 */ { MAD_F(0x06f100bd) /* 0.433838595 */, 18 }, /* 6194 */ { MAD_F(0x06f162ae) /* 0.433932001 */, 18 }, /* 6195 */ { MAD_F(0x06f1c4a1) /* 0.434025413 */, 18 }, /* 6196 */ { MAD_F(0x06f22696) /* 0.434118830 */, 18 }, /* 6197 */ { MAD_F(0x06f2888b) /* 0.434212251 */, 18 }, /* 6198 */ { MAD_F(0x06f2ea82) /* 0.434305678 */, 18 }, /* 6199 */ { MAD_F(0x06f34c7b) /* 0.434399110 */, 18 }, /* 6200 */ { MAD_F(0x06f3ae75) /* 0.434492546 */, 18 }, /* 6201 */ { MAD_F(0x06f41070) /* 0.434585988 */, 18 }, /* 6202 */ { MAD_F(0x06f4726c) /* 0.434679435 */, 18 }, /* 6203 */ { MAD_F(0x06f4d46a) /* 0.434772887 */, 18 }, /* 6204 */ { MAD_F(0x06f53669) /* 0.434866344 */, 18 }, /* 6205 */ { MAD_F(0x06f59869) /* 0.434959806 */, 18 }, /* 6206 */ { MAD_F(0x06f5fa6b) /* 0.435053272 */, 18 }, /* 6207 */ { MAD_F(0x06f65c6e) /* 0.435146744 */, 18 }, /* 6208 */ { MAD_F(0x06f6be73) /* 0.435240221 */, 18 }, /* 6209 */ { MAD_F(0x06f72079) /* 0.435333703 */, 18 }, /* 6210 */ { MAD_F(0x06f78280) /* 0.435427190 */, 18 }, /* 6211 */ { MAD_F(0x06f7e489) /* 0.435520682 */, 18 }, /* 6212 */ { MAD_F(0x06f84693) /* 0.435614179 */, 18 }, /* 6213 */ { MAD_F(0x06f8a89e) /* 0.435707681 */, 18 }, /* 6214 */ { MAD_F(0x06f90aaa) /* 0.435801188 */, 18 }, /* 6215 */ { MAD_F(0x06f96cb8) /* 0.435894700 */, 18 }, /* 6216 */ { MAD_F(0x06f9cec8) /* 0.435988217 */, 18 }, /* 6217 */ { MAD_F(0x06fa30d8) /* 0.436081739 */, 18 }, /* 6218 */ { MAD_F(0x06fa92ea) /* 0.436175266 */, 18 }, /* 6219 */ { MAD_F(0x06faf4fe) /* 0.436268799 */, 18 }, /* 6220 */ { MAD_F(0x06fb5712) /* 0.436362336 */, 18 }, /* 6221 */ { MAD_F(0x06fbb928) /* 0.436455878 */, 18 }, /* 6222 */ { MAD_F(0x06fc1b40) /* 0.436549425 */, 18 }, /* 6223 */ { MAD_F(0x06fc7d58) /* 0.436642977 */, 18 }, /* 6224 */ { MAD_F(0x06fcdf72) /* 0.436736534 */, 18 }, /* 6225 */ { MAD_F(0x06fd418e) /* 0.436830096 */, 18 }, /* 6226 */ { MAD_F(0x06fda3ab) /* 0.436923664 */, 18 }, /* 6227 */ { MAD_F(0x06fe05c9) /* 0.437017236 */, 18 }, /* 6228 */ { MAD_F(0x06fe67e8) /* 0.437110813 */, 18 }, /* 6229 */ { MAD_F(0x06feca09) /* 0.437204395 */, 18 }, /* 6230 */ { MAD_F(0x06ff2c2b) /* 0.437297982 */, 18 }, /* 6231 */ { MAD_F(0x06ff8e4f) /* 0.437391575 */, 18 }, /* 6232 */ { MAD_F(0x06fff073) /* 0.437485172 */, 18 }, /* 6233 */ { MAD_F(0x0700529a) /* 0.437578774 */, 18 }, /* 6234 */ { MAD_F(0x0700b4c1) /* 0.437672381 */, 18 }, /* 6235 */ { MAD_F(0x070116ea) /* 0.437765994 */, 18 }, /* 6236 */ { MAD_F(0x07017914) /* 0.437859611 */, 18 }, /* 6237 */ { MAD_F(0x0701db40) /* 0.437953233 */, 18 }, /* 6238 */ { MAD_F(0x07023d6c) /* 0.438046860 */, 18 }, /* 6239 */ { MAD_F(0x07029f9b) /* 0.438140493 */, 18 }, /* 6240 */ { MAD_F(0x070301ca) /* 0.438234130 */, 18 }, /* 6241 */ { MAD_F(0x070363fb) /* 0.438327772 */, 18 }, /* 6242 */ { MAD_F(0x0703c62d) /* 0.438421419 */, 18 }, /* 6243 */ { MAD_F(0x07042861) /* 0.438515072 */, 18 }, /* 6244 */ { MAD_F(0x07048a96) /* 0.438608729 */, 18 }, /* 6245 */ { MAD_F(0x0704eccc) /* 0.438702391 */, 18 }, /* 6246 */ { MAD_F(0x07054f04) /* 0.438796059 */, 18 }, /* 6247 */ { MAD_F(0x0705b13d) /* 0.438889731 */, 18 }, /* 6248 */ { MAD_F(0x07061377) /* 0.438983408 */, 18 }, /* 6249 */ { MAD_F(0x070675b3) /* 0.439077090 */, 18 }, /* 6250 */ { MAD_F(0x0706d7f0) /* 0.439170778 */, 18 }, /* 6251 */ { MAD_F(0x07073a2e) /* 0.439264470 */, 18 }, /* 6252 */ { MAD_F(0x07079c6e) /* 0.439358167 */, 18 }, /* 6253 */ { MAD_F(0x0707feaf) /* 0.439451869 */, 18 }, /* 6254 */ { MAD_F(0x070860f1) /* 0.439545577 */, 18 }, /* 6255 */ { MAD_F(0x0708c335) /* 0.439639289 */, 18 }, /* 6256 */ { MAD_F(0x0709257a) /* 0.439733006 */, 18 }, /* 6257 */ { MAD_F(0x070987c0) /* 0.439826728 */, 18 }, /* 6258 */ { MAD_F(0x0709ea08) /* 0.439920456 */, 18 }, /* 6259 */ { MAD_F(0x070a4c51) /* 0.440014188 */, 18 }, /* 6260 */ { MAD_F(0x070aae9b) /* 0.440107925 */, 18 }, /* 6261 */ { MAD_F(0x070b10e7) /* 0.440201667 */, 18 }, /* 6262 */ { MAD_F(0x070b7334) /* 0.440295414 */, 18 }, /* 6263 */ { MAD_F(0x070bd583) /* 0.440389167 */, 18 }, /* 6264 */ { MAD_F(0x070c37d2) /* 0.440482924 */, 18 }, /* 6265 */ { MAD_F(0x070c9a23) /* 0.440576686 */, 18 }, /* 6266 */ { MAD_F(0x070cfc76) /* 0.440670453 */, 18 }, /* 6267 */ { MAD_F(0x070d5eca) /* 0.440764225 */, 18 }, /* 6268 */ { MAD_F(0x070dc11f) /* 0.440858002 */, 18 }, /* 6269 */ { MAD_F(0x070e2375) /* 0.440951784 */, 18 }, /* 6270 */ { MAD_F(0x070e85cd) /* 0.441045572 */, 18 }, /* 6271 */ { MAD_F(0x070ee826) /* 0.441139364 */, 18 }, /* 6272 */ { MAD_F(0x070f4a80) /* 0.441233161 */, 18 }, /* 6273 */ { MAD_F(0x070facdc) /* 0.441326963 */, 18 }, /* 6274 */ { MAD_F(0x07100f39) /* 0.441420770 */, 18 }, /* 6275 */ { MAD_F(0x07107198) /* 0.441514582 */, 18 }, /* 6276 */ { MAD_F(0x0710d3f8) /* 0.441608399 */, 18 }, /* 6277 */ { MAD_F(0x07113659) /* 0.441702221 */, 18 }, /* 6278 */ { MAD_F(0x071198bb) /* 0.441796048 */, 18 }, /* 6279 */ { MAD_F(0x0711fb1f) /* 0.441889880 */, 18 }, /* 6280 */ { MAD_F(0x07125d84) /* 0.441983717 */, 18 }, /* 6281 */ { MAD_F(0x0712bfeb) /* 0.442077559 */, 18 }, /* 6282 */ { MAD_F(0x07132253) /* 0.442171406 */, 18 }, /* 6283 */ { MAD_F(0x071384bc) /* 0.442265257 */, 18 }, /* 6284 */ { MAD_F(0x0713e726) /* 0.442359114 */, 18 }, /* 6285 */ { MAD_F(0x07144992) /* 0.442452976 */, 18 }, /* 6286 */ { MAD_F(0x0714abff) /* 0.442546843 */, 18 }, /* 6287 */ { MAD_F(0x07150e6e) /* 0.442640715 */, 18 }, /* 6288 */ { MAD_F(0x071570de) /* 0.442734592 */, 18 }, /* 6289 */ { MAD_F(0x0715d34f) /* 0.442828473 */, 18 }, /* 6290 */ { MAD_F(0x071635c1) /* 0.442922360 */, 18 }, /* 6291 */ { MAD_F(0x07169835) /* 0.443016252 */, 18 }, /* 6292 */ { MAD_F(0x0716faaa) /* 0.443110148 */, 18 }, /* 6293 */ { MAD_F(0x07175d21) /* 0.443204050 */, 18 }, /* 6294 */ { MAD_F(0x0717bf99) /* 0.443297957 */, 18 }, /* 6295 */ { MAD_F(0x07182212) /* 0.443391868 */, 18 }, /* 6296 */ { MAD_F(0x0718848d) /* 0.443485785 */, 18 }, /* 6297 */ { MAD_F(0x0718e709) /* 0.443579706 */, 18 }, /* 6298 */ { MAD_F(0x07194986) /* 0.443673633 */, 18 }, /* 6299 */ { MAD_F(0x0719ac04) /* 0.443767564 */, 18 }, /* 6300 */ { MAD_F(0x071a0e84) /* 0.443861501 */, 18 }, /* 6301 */ { MAD_F(0x071a7105) /* 0.443955442 */, 18 }, /* 6302 */ { MAD_F(0x071ad388) /* 0.444049389 */, 18 }, /* 6303 */ { MAD_F(0x071b360c) /* 0.444143340 */, 18 }, /* 6304 */ { MAD_F(0x071b9891) /* 0.444237296 */, 18 }, /* 6305 */ { MAD_F(0x071bfb18) /* 0.444331258 */, 18 }, /* 6306 */ { MAD_F(0x071c5d9f) /* 0.444425224 */, 18 }, /* 6307 */ { MAD_F(0x071cc029) /* 0.444519195 */, 18 }, /* 6308 */ { MAD_F(0x071d22b3) /* 0.444613171 */, 18 }, /* 6309 */ { MAD_F(0x071d853f) /* 0.444707153 */, 18 }, /* 6310 */ { MAD_F(0x071de7cc) /* 0.444801139 */, 18 }, /* 6311 */ { MAD_F(0x071e4a5b) /* 0.444895130 */, 18 }, /* 6312 */ { MAD_F(0x071eaceb) /* 0.444989126 */, 18 }, /* 6313 */ { MAD_F(0x071f0f7c) /* 0.445083127 */, 18 }, /* 6314 */ { MAD_F(0x071f720e) /* 0.445177133 */, 18 }, /* 6315 */ { MAD_F(0x071fd4a2) /* 0.445271144 */, 18 }, /* 6316 */ { MAD_F(0x07203737) /* 0.445365160 */, 18 }, /* 6317 */ { MAD_F(0x072099ce) /* 0.445459181 */, 18 }, /* 6318 */ { MAD_F(0x0720fc66) /* 0.445553206 */, 18 }, /* 6319 */ { MAD_F(0x07215eff) /* 0.445647237 */, 18 }, /* 6320 */ { MAD_F(0x0721c19a) /* 0.445741273 */, 18 }, /* 6321 */ { MAD_F(0x07222436) /* 0.445835314 */, 18 }, /* 6322 */ { MAD_F(0x072286d3) /* 0.445929359 */, 18 }, /* 6323 */ { MAD_F(0x0722e971) /* 0.446023410 */, 18 }, /* 6324 */ { MAD_F(0x07234c11) /* 0.446117466 */, 18 }, /* 6325 */ { MAD_F(0x0723aeb2) /* 0.446211526 */, 18 }, /* 6326 */ { MAD_F(0x07241155) /* 0.446305592 */, 18 }, /* 6327 */ { MAD_F(0x072473f9) /* 0.446399662 */, 18 }, /* 6328 */ { MAD_F(0x0724d69e) /* 0.446493738 */, 18 }, /* 6329 */ { MAD_F(0x07253944) /* 0.446587818 */, 18 }, /* 6330 */ { MAD_F(0x07259bec) /* 0.446681903 */, 18 }, /* 6331 */ { MAD_F(0x0725fe95) /* 0.446775994 */, 18 }, /* 6332 */ { MAD_F(0x07266140) /* 0.446870089 */, 18 }, /* 6333 */ { MAD_F(0x0726c3ec) /* 0.446964189 */, 18 }, /* 6334 */ { MAD_F(0x07272699) /* 0.447058294 */, 18 }, /* 6335 */ { MAD_F(0x07278947) /* 0.447152404 */, 18 }, /* 6336 */ { MAD_F(0x0727ebf7) /* 0.447246519 */, 18 }, /* 6337 */ { MAD_F(0x07284ea8) /* 0.447340639 */, 18 }, /* 6338 */ { MAD_F(0x0728b15b) /* 0.447434764 */, 18 }, /* 6339 */ { MAD_F(0x0729140f) /* 0.447528894 */, 18 }, /* 6340 */ { MAD_F(0x072976c4) /* 0.447623029 */, 18 }, /* 6341 */ { MAD_F(0x0729d97a) /* 0.447717169 */, 18 }, /* 6342 */ { MAD_F(0x072a3c32) /* 0.447811314 */, 18 }, /* 6343 */ { MAD_F(0x072a9eeb) /* 0.447905463 */, 18 }, /* 6344 */ { MAD_F(0x072b01a6) /* 0.447999618 */, 18 }, /* 6345 */ { MAD_F(0x072b6461) /* 0.448093778 */, 18 }, /* 6346 */ { MAD_F(0x072bc71e) /* 0.448187942 */, 18 }, /* 6347 */ { MAD_F(0x072c29dd) /* 0.448282112 */, 18 }, /* 6348 */ { MAD_F(0x072c8c9d) /* 0.448376286 */, 18 }, /* 6349 */ { MAD_F(0x072cef5e) /* 0.448470466 */, 18 }, /* 6350 */ { MAD_F(0x072d5220) /* 0.448564650 */, 18 }, /* 6351 */ { MAD_F(0x072db4e4) /* 0.448658839 */, 18 }, /* 6352 */ { MAD_F(0x072e17a9) /* 0.448753033 */, 18 }, /* 6353 */ { MAD_F(0x072e7a6f) /* 0.448847233 */, 18 }, /* 6354 */ { MAD_F(0x072edd37) /* 0.448941437 */, 18 }, /* 6355 */ { MAD_F(0x072f4000) /* 0.449035646 */, 18 }, /* 6356 */ { MAD_F(0x072fa2ca) /* 0.449129860 */, 18 }, /* 6357 */ { MAD_F(0x07300596) /* 0.449224079 */, 18 }, /* 6358 */ { MAD_F(0x07306863) /* 0.449318303 */, 18 }, /* 6359 */ { MAD_F(0x0730cb32) /* 0.449412531 */, 18 }, /* 6360 */ { MAD_F(0x07312e01) /* 0.449506765 */, 18 }, /* 6361 */ { MAD_F(0x073190d2) /* 0.449601004 */, 18 }, /* 6362 */ { MAD_F(0x0731f3a5) /* 0.449695247 */, 18 }, /* 6363 */ { MAD_F(0x07325678) /* 0.449789496 */, 18 }, /* 6364 */ { MAD_F(0x0732b94d) /* 0.449883749 */, 18 }, /* 6365 */ { MAD_F(0x07331c23) /* 0.449978008 */, 18 }, /* 6366 */ { MAD_F(0x07337efb) /* 0.450072271 */, 18 }, /* 6367 */ { MAD_F(0x0733e1d4) /* 0.450166540 */, 18 }, /* 6368 */ { MAD_F(0x073444ae) /* 0.450260813 */, 18 }, /* 6369 */ { MAD_F(0x0734a78a) /* 0.450355091 */, 18 }, /* 6370 */ { MAD_F(0x07350a67) /* 0.450449374 */, 18 }, /* 6371 */ { MAD_F(0x07356d45) /* 0.450543662 */, 18 }, /* 6372 */ { MAD_F(0x0735d025) /* 0.450637955 */, 18 }, /* 6373 */ { MAD_F(0x07363306) /* 0.450732253 */, 18 }, /* 6374 */ { MAD_F(0x073695e8) /* 0.450826556 */, 18 }, /* 6375 */ { MAD_F(0x0736f8cb) /* 0.450920864 */, 18 }, /* 6376 */ { MAD_F(0x07375bb0) /* 0.451015176 */, 18 }, /* 6377 */ { MAD_F(0x0737be96) /* 0.451109494 */, 18 }, /* 6378 */ { MAD_F(0x0738217e) /* 0.451203817 */, 18 }, /* 6379 */ { MAD_F(0x07388467) /* 0.451298144 */, 18 }, /* 6380 */ { MAD_F(0x0738e751) /* 0.451392477 */, 18 }, /* 6381 */ { MAD_F(0x07394a3d) /* 0.451486814 */, 18 }, /* 6382 */ { MAD_F(0x0739ad29) /* 0.451581156 */, 18 }, /* 6383 */ { MAD_F(0x073a1017) /* 0.451675503 */, 18 }, /* 6384 */ { MAD_F(0x073a7307) /* 0.451769856 */, 18 }, /* 6385 */ { MAD_F(0x073ad5f8) /* 0.451864213 */, 18 }, /* 6386 */ { MAD_F(0x073b38ea) /* 0.451958575 */, 18 }, /* 6387 */ { MAD_F(0x073b9bdd) /* 0.452052942 */, 18 }, /* 6388 */ { MAD_F(0x073bfed2) /* 0.452147313 */, 18 }, /* 6389 */ { MAD_F(0x073c61c8) /* 0.452241690 */, 18 }, /* 6390 */ { MAD_F(0x073cc4bf) /* 0.452336072 */, 18 }, /* 6391 */ { MAD_F(0x073d27b8) /* 0.452430458 */, 18 }, /* 6392 */ { MAD_F(0x073d8ab2) /* 0.452524850 */, 18 }, /* 6393 */ { MAD_F(0x073dedae) /* 0.452619246 */, 18 }, /* 6394 */ { MAD_F(0x073e50aa) /* 0.452713648 */, 18 }, /* 6395 */ { MAD_F(0x073eb3a8) /* 0.452808054 */, 18 }, /* 6396 */ { MAD_F(0x073f16a8) /* 0.452902465 */, 18 }, /* 6397 */ { MAD_F(0x073f79a8) /* 0.452996882 */, 18 }, /* 6398 */ { MAD_F(0x073fdcaa) /* 0.453091303 */, 18 }, /* 6399 */ { MAD_F(0x07403fad) /* 0.453185729 */, 18 }, /* 6400 */ { MAD_F(0x0740a2b2) /* 0.453280160 */, 18 }, /* 6401 */ { MAD_F(0x074105b8) /* 0.453374595 */, 18 }, /* 6402 */ { MAD_F(0x074168bf) /* 0.453469036 */, 18 }, /* 6403 */ { MAD_F(0x0741cbc8) /* 0.453563482 */, 18 }, /* 6404 */ { MAD_F(0x07422ed2) /* 0.453657932 */, 18 }, /* 6405 */ { MAD_F(0x074291dd) /* 0.453752388 */, 18 }, /* 6406 */ { MAD_F(0x0742f4e9) /* 0.453846848 */, 18 }, /* 6407 */ { MAD_F(0x074357f7) /* 0.453941314 */, 18 }, /* 6408 */ { MAD_F(0x0743bb06) /* 0.454035784 */, 18 }, /* 6409 */ { MAD_F(0x07441e17) /* 0.454130259 */, 18 }, /* 6410 */ { MAD_F(0x07448129) /* 0.454224739 */, 18 }, /* 6411 */ { MAD_F(0x0744e43c) /* 0.454319224 */, 18 }, /* 6412 */ { MAD_F(0x07454750) /* 0.454413714 */, 18 }, /* 6413 */ { MAD_F(0x0745aa66) /* 0.454508209 */, 18 }, /* 6414 */ { MAD_F(0x07460d7d) /* 0.454602708 */, 18 }, /* 6415 */ { MAD_F(0x07467095) /* 0.454697213 */, 18 }, /* 6416 */ { MAD_F(0x0746d3af) /* 0.454791723 */, 18 }, /* 6417 */ { MAD_F(0x074736ca) /* 0.454886237 */, 18 }, /* 6418 */ { MAD_F(0x074799e7) /* 0.454980756 */, 18 }, /* 6419 */ { MAD_F(0x0747fd04) /* 0.455075281 */, 18 }, /* 6420 */ { MAD_F(0x07486023) /* 0.455169810 */, 18 }, /* 6421 */ { MAD_F(0x0748c344) /* 0.455264344 */, 18 }, /* 6422 */ { MAD_F(0x07492665) /* 0.455358883 */, 18 }, /* 6423 */ { MAD_F(0x07498988) /* 0.455453427 */, 18 }, /* 6424 */ { MAD_F(0x0749ecac) /* 0.455547976 */, 18 }, /* 6425 */ { MAD_F(0x074a4fd2) /* 0.455642529 */, 18 }, /* 6426 */ { MAD_F(0x074ab2f9) /* 0.455737088 */, 18 }, /* 6427 */ { MAD_F(0x074b1621) /* 0.455831652 */, 18 }, /* 6428 */ { MAD_F(0x074b794b) /* 0.455926220 */, 18 }, /* 6429 */ { MAD_F(0x074bdc75) /* 0.456020793 */, 18 }, /* 6430 */ { MAD_F(0x074c3fa1) /* 0.456115372 */, 18 }, /* 6431 */ { MAD_F(0x074ca2cf) /* 0.456209955 */, 18 }, /* 6432 */ { MAD_F(0x074d05fe) /* 0.456304543 */, 18 }, /* 6433 */ { MAD_F(0x074d692e) /* 0.456399136 */, 18 }, /* 6434 */ { MAD_F(0x074dcc5f) /* 0.456493733 */, 18 }, /* 6435 */ { MAD_F(0x074e2f92) /* 0.456588336 */, 18 }, /* 6436 */ { MAD_F(0x074e92c6) /* 0.456682944 */, 18 }, /* 6437 */ { MAD_F(0x074ef5fb) /* 0.456777556 */, 18 }, /* 6438 */ { MAD_F(0x074f5932) /* 0.456872174 */, 18 }, /* 6439 */ { MAD_F(0x074fbc6a) /* 0.456966796 */, 18 }, /* 6440 */ { MAD_F(0x07501fa3) /* 0.457061423 */, 18 }, /* 6441 */ { MAD_F(0x075082de) /* 0.457156056 */, 18 }, /* 6442 */ { MAD_F(0x0750e61a) /* 0.457250693 */, 18 }, /* 6443 */ { MAD_F(0x07514957) /* 0.457345335 */, 18 }, /* 6444 */ { MAD_F(0x0751ac96) /* 0.457439981 */, 18 }, /* 6445 */ { MAD_F(0x07520fd6) /* 0.457534633 */, 18 }, /* 6446 */ { MAD_F(0x07527317) /* 0.457629290 */, 18 }, /* 6447 */ { MAD_F(0x0752d659) /* 0.457723951 */, 18 }, /* 6448 */ { MAD_F(0x0753399d) /* 0.457818618 */, 18 }, /* 6449 */ { MAD_F(0x07539ce2) /* 0.457913289 */, 18 }, /* 6450 */ { MAD_F(0x07540029) /* 0.458007965 */, 18 }, /* 6451 */ { MAD_F(0x07546371) /* 0.458102646 */, 18 }, /* 6452 */ { MAD_F(0x0754c6ba) /* 0.458197332 */, 18 }, /* 6453 */ { MAD_F(0x07552a04) /* 0.458292023 */, 18 }, /* 6454 */ { MAD_F(0x07558d50) /* 0.458386719 */, 18 }, /* 6455 */ { MAD_F(0x0755f09d) /* 0.458481420 */, 18 }, /* 6456 */ { MAD_F(0x075653eb) /* 0.458576125 */, 18 }, /* 6457 */ { MAD_F(0x0756b73b) /* 0.458670836 */, 18 }, /* 6458 */ { MAD_F(0x07571a8c) /* 0.458765551 */, 18 }, /* 6459 */ { MAD_F(0x07577dde) /* 0.458860271 */, 18 }, /* 6460 */ { MAD_F(0x0757e131) /* 0.458954996 */, 18 }, /* 6461 */ { MAD_F(0x07584486) /* 0.459049726 */, 18 }, /* 6462 */ { MAD_F(0x0758a7dd) /* 0.459144461 */, 18 }, /* 6463 */ { MAD_F(0x07590b34) /* 0.459239201 */, 18 }, /* 6464 */ { MAD_F(0x07596e8d) /* 0.459333946 */, 18 }, /* 6465 */ { MAD_F(0x0759d1e7) /* 0.459428695 */, 18 }, /* 6466 */ { MAD_F(0x075a3542) /* 0.459523450 */, 18 }, /* 6467 */ { MAD_F(0x075a989f) /* 0.459618209 */, 18 }, /* 6468 */ { MAD_F(0x075afbfd) /* 0.459712973 */, 18 }, /* 6469 */ { MAD_F(0x075b5f5d) /* 0.459807742 */, 18 }, /* 6470 */ { MAD_F(0x075bc2bd) /* 0.459902516 */, 18 }, /* 6471 */ { MAD_F(0x075c261f) /* 0.459997295 */, 18 }, /* 6472 */ { MAD_F(0x075c8983) /* 0.460092079 */, 18 }, /* 6473 */ { MAD_F(0x075cece7) /* 0.460186867 */, 18 }, /* 6474 */ { MAD_F(0x075d504d) /* 0.460281661 */, 18 }, /* 6475 */ { MAD_F(0x075db3b5) /* 0.460376459 */, 18 }, /* 6476 */ { MAD_F(0x075e171d) /* 0.460471262 */, 18 }, /* 6477 */ { MAD_F(0x075e7a87) /* 0.460566071 */, 18 }, /* 6478 */ { MAD_F(0x075eddf2) /* 0.460660884 */, 18 }, /* 6479 */ { MAD_F(0x075f415f) /* 0.460755701 */, 18 }, /* 6480 */ { MAD_F(0x075fa4cc) /* 0.460850524 */, 18 }, /* 6481 */ { MAD_F(0x0760083b) /* 0.460945352 */, 18 }, /* 6482 */ { MAD_F(0x07606bac) /* 0.461040184 */, 18 }, /* 6483 */ { MAD_F(0x0760cf1e) /* 0.461135022 */, 18 }, /* 6484 */ { MAD_F(0x07613291) /* 0.461229864 */, 18 }, /* 6485 */ { MAD_F(0x07619605) /* 0.461324711 */, 18 }, /* 6486 */ { MAD_F(0x0761f97b) /* 0.461419563 */, 18 }, /* 6487 */ { MAD_F(0x07625cf2) /* 0.461514420 */, 18 }, /* 6488 */ { MAD_F(0x0762c06a) /* 0.461609282 */, 18 }, /* 6489 */ { MAD_F(0x076323e3) /* 0.461704149 */, 18 }, /* 6490 */ { MAD_F(0x0763875e) /* 0.461799020 */, 18 }, /* 6491 */ { MAD_F(0x0763eadb) /* 0.461893897 */, 18 }, /* 6492 */ { MAD_F(0x07644e58) /* 0.461988778 */, 18 }, /* 6493 */ { MAD_F(0x0764b1d7) /* 0.462083664 */, 18 }, /* 6494 */ { MAD_F(0x07651557) /* 0.462178555 */, 18 }, /* 6495 */ { MAD_F(0x076578d8) /* 0.462273451 */, 18 }, /* 6496 */ { MAD_F(0x0765dc5b) /* 0.462368352 */, 18 }, /* 6497 */ { MAD_F(0x07663fdf) /* 0.462463257 */, 18 }, /* 6498 */ { MAD_F(0x0766a364) /* 0.462558168 */, 18 }, /* 6499 */ { MAD_F(0x076706eb) /* 0.462653083 */, 18 }, /* 6500 */ { MAD_F(0x07676a73) /* 0.462748003 */, 18 }, /* 6501 */ { MAD_F(0x0767cdfc) /* 0.462842928 */, 18 }, /* 6502 */ { MAD_F(0x07683187) /* 0.462937858 */, 18 }, /* 6503 */ { MAD_F(0x07689513) /* 0.463032793 */, 18 }, /* 6504 */ { MAD_F(0x0768f8a0) /* 0.463127733 */, 18 }, /* 6505 */ { MAD_F(0x07695c2e) /* 0.463222678 */, 18 }, /* 6506 */ { MAD_F(0x0769bfbe) /* 0.463317627 */, 18 }, /* 6507 */ { MAD_F(0x076a234f) /* 0.463412581 */, 18 }, /* 6508 */ { MAD_F(0x076a86e2) /* 0.463507540 */, 18 }, /* 6509 */ { MAD_F(0x076aea75) /* 0.463602504 */, 18 }, /* 6510 */ { MAD_F(0x076b4e0a) /* 0.463697473 */, 18 }, /* 6511 */ { MAD_F(0x076bb1a1) /* 0.463792447 */, 18 }, /* 6512 */ { MAD_F(0x076c1538) /* 0.463887426 */, 18 }, /* 6513 */ { MAD_F(0x076c78d1) /* 0.463982409 */, 18 }, /* 6514 */ { MAD_F(0x076cdc6c) /* 0.464077398 */, 18 }, /* 6515 */ { MAD_F(0x076d4007) /* 0.464172391 */, 18 }, /* 6516 */ { MAD_F(0x076da3a4) /* 0.464267389 */, 18 }, /* 6517 */ { MAD_F(0x076e0742) /* 0.464362392 */, 18 }, /* 6518 */ { MAD_F(0x076e6ae2) /* 0.464457399 */, 18 }, /* 6519 */ { MAD_F(0x076ece82) /* 0.464552412 */, 18 }, /* 6520 */ { MAD_F(0x076f3224) /* 0.464647430 */, 18 }, /* 6521 */ { MAD_F(0x076f95c8) /* 0.464742452 */, 18 }, /* 6522 */ { MAD_F(0x076ff96c) /* 0.464837479 */, 18 }, /* 6523 */ { MAD_F(0x07705d12) /* 0.464932511 */, 18 }, /* 6524 */ { MAD_F(0x0770c0ba) /* 0.465027548 */, 18 }, /* 6525 */ { MAD_F(0x07712462) /* 0.465122590 */, 18 }, /* 6526 */ { MAD_F(0x0771880c) /* 0.465217637 */, 18 }, /* 6527 */ { MAD_F(0x0771ebb7) /* 0.465312688 */, 18 }, /* 6528 */ { MAD_F(0x07724f64) /* 0.465407744 */, 18 }, /* 6529 */ { MAD_F(0x0772b312) /* 0.465502806 */, 18 }, /* 6530 */ { MAD_F(0x077316c1) /* 0.465597872 */, 18 }, /* 6531 */ { MAD_F(0x07737a71) /* 0.465692943 */, 18 }, /* 6532 */ { MAD_F(0x0773de23) /* 0.465788018 */, 18 }, /* 6533 */ { MAD_F(0x077441d6) /* 0.465883099 */, 18 }, /* 6534 */ { MAD_F(0x0774a58a) /* 0.465978184 */, 18 }, /* 6535 */ { MAD_F(0x07750940) /* 0.466073275 */, 18 }, /* 6536 */ { MAD_F(0x07756cf7) /* 0.466168370 */, 18 }, /* 6537 */ { MAD_F(0x0775d0af) /* 0.466263470 */, 18 }, /* 6538 */ { MAD_F(0x07763468) /* 0.466358575 */, 18 }, /* 6539 */ { MAD_F(0x07769823) /* 0.466453684 */, 18 }, /* 6540 */ { MAD_F(0x0776fbdf) /* 0.466548799 */, 18 }, /* 6541 */ { MAD_F(0x07775f9d) /* 0.466643918 */, 18 }, /* 6542 */ { MAD_F(0x0777c35c) /* 0.466739043 */, 18 }, /* 6543 */ { MAD_F(0x0778271c) /* 0.466834172 */, 18 }, /* 6544 */ { MAD_F(0x07788add) /* 0.466929306 */, 18 }, /* 6545 */ { MAD_F(0x0778ee9f) /* 0.467024445 */, 18 }, /* 6546 */ { MAD_F(0x07795263) /* 0.467119588 */, 18 }, /* 6547 */ { MAD_F(0x0779b629) /* 0.467214737 */, 18 }, /* 6548 */ { MAD_F(0x077a19ef) /* 0.467309890 */, 18 }, /* 6549 */ { MAD_F(0x077a7db7) /* 0.467405048 */, 18 }, /* 6550 */ { MAD_F(0x077ae180) /* 0.467500211 */, 18 }, /* 6551 */ { MAD_F(0x077b454b) /* 0.467595379 */, 18 }, /* 6552 */ { MAD_F(0x077ba916) /* 0.467690552 */, 18 }, /* 6553 */ { MAD_F(0x077c0ce3) /* 0.467785729 */, 18 }, /* 6554 */ { MAD_F(0x077c70b2) /* 0.467880912 */, 18 }, /* 6555 */ { MAD_F(0x077cd481) /* 0.467976099 */, 18 }, /* 6556 */ { MAD_F(0x077d3852) /* 0.468071291 */, 18 }, /* 6557 */ { MAD_F(0x077d9c24) /* 0.468166488 */, 18 }, /* 6558 */ { MAD_F(0x077dfff8) /* 0.468261690 */, 18 }, /* 6559 */ { MAD_F(0x077e63cd) /* 0.468356896 */, 18 }, /* 6560 */ { MAD_F(0x077ec7a3) /* 0.468452108 */, 18 }, /* 6561 */ { MAD_F(0x077f2b7a) /* 0.468547324 */, 18 }, /* 6562 */ { MAD_F(0x077f8f53) /* 0.468642545 */, 18 }, /* 6563 */ { MAD_F(0x077ff32d) /* 0.468737771 */, 18 }, /* 6564 */ { MAD_F(0x07805708) /* 0.468833002 */, 18 }, /* 6565 */ { MAD_F(0x0780bae5) /* 0.468928237 */, 18 }, /* 6566 */ { MAD_F(0x07811ec3) /* 0.469023478 */, 18 }, /* 6567 */ { MAD_F(0x078182a2) /* 0.469118723 */, 18 }, /* 6568 */ { MAD_F(0x0781e683) /* 0.469213973 */, 18 }, /* 6569 */ { MAD_F(0x07824a64) /* 0.469309228 */, 18 }, /* 6570 */ { MAD_F(0x0782ae47) /* 0.469404488 */, 18 }, /* 6571 */ { MAD_F(0x0783122c) /* 0.469499752 */, 18 }, /* 6572 */ { MAD_F(0x07837612) /* 0.469595022 */, 18 }, /* 6573 */ { MAD_F(0x0783d9f9) /* 0.469690296 */, 18 }, /* 6574 */ { MAD_F(0x07843de1) /* 0.469785575 */, 18 }, /* 6575 */ { MAD_F(0x0784a1ca) /* 0.469880859 */, 18 }, /* 6576 */ { MAD_F(0x078505b5) /* 0.469976148 */, 18 }, /* 6577 */ { MAD_F(0x078569a2) /* 0.470071442 */, 18 }, /* 6578 */ { MAD_F(0x0785cd8f) /* 0.470166740 */, 18 }, /* 6579 */ { MAD_F(0x0786317e) /* 0.470262043 */, 18 }, /* 6580 */ { MAD_F(0x0786956e) /* 0.470357351 */, 18 }, /* 6581 */ { MAD_F(0x0786f95f) /* 0.470452664 */, 18 }, /* 6582 */ { MAD_F(0x07875d52) /* 0.470547982 */, 18 }, /* 6583 */ { MAD_F(0x0787c146) /* 0.470643305 */, 18 }, /* 6584 */ { MAD_F(0x0788253b) /* 0.470738632 */, 18 }, /* 6585 */ { MAD_F(0x07888932) /* 0.470833964 */, 18 }, /* 6586 */ { MAD_F(0x0788ed2a) /* 0.470929301 */, 18 }, /* 6587 */ { MAD_F(0x07895123) /* 0.471024643 */, 18 }, /* 6588 */ { MAD_F(0x0789b51d) /* 0.471119990 */, 18 }, /* 6589 */ { MAD_F(0x078a1919) /* 0.471215341 */, 18 }, /* 6590 */ { MAD_F(0x078a7d16) /* 0.471310698 */, 18 }, /* 6591 */ { MAD_F(0x078ae114) /* 0.471406059 */, 18 }, /* 6592 */ { MAD_F(0x078b4514) /* 0.471501425 */, 18 }, /* 6593 */ { MAD_F(0x078ba915) /* 0.471596796 */, 18 }, /* 6594 */ { MAD_F(0x078c0d17) /* 0.471692171 */, 18 }, /* 6595 */ { MAD_F(0x078c711a) /* 0.471787552 */, 18 }, /* 6596 */ { MAD_F(0x078cd51f) /* 0.471882937 */, 18 }, /* 6597 */ { MAD_F(0x078d3925) /* 0.471978327 */, 18 }, /* 6598 */ { MAD_F(0x078d9d2d) /* 0.472073722 */, 18 }, /* 6599 */ { MAD_F(0x078e0135) /* 0.472169122 */, 18 }, /* 6600 */ { MAD_F(0x078e653f) /* 0.472264527 */, 18 }, /* 6601 */ { MAD_F(0x078ec94b) /* 0.472359936 */, 18 }, /* 6602 */ { MAD_F(0x078f2d57) /* 0.472455350 */, 18 }, /* 6603 */ { MAD_F(0x078f9165) /* 0.472550769 */, 18 }, /* 6604 */ { MAD_F(0x078ff574) /* 0.472646193 */, 18 }, /* 6605 */ { MAD_F(0x07905985) /* 0.472741622 */, 18 }, /* 6606 */ { MAD_F(0x0790bd96) /* 0.472837055 */, 18 }, /* 6607 */ { MAD_F(0x079121a9) /* 0.472932493 */, 18 }, /* 6608 */ { MAD_F(0x079185be) /* 0.473027937 */, 18 }, /* 6609 */ { MAD_F(0x0791e9d3) /* 0.473123384 */, 18 }, /* 6610 */ { MAD_F(0x07924dea) /* 0.473218837 */, 18 }, /* 6611 */ { MAD_F(0x0792b202) /* 0.473314295 */, 18 }, /* 6612 */ { MAD_F(0x0793161c) /* 0.473409757 */, 18 }, /* 6613 */ { MAD_F(0x07937a37) /* 0.473505224 */, 18 }, /* 6614 */ { MAD_F(0x0793de53) /* 0.473600696 */, 18 }, /* 6615 */ { MAD_F(0x07944270) /* 0.473696173 */, 18 }, /* 6616 */ { MAD_F(0x0794a68f) /* 0.473791655 */, 18 }, /* 6617 */ { MAD_F(0x07950aaf) /* 0.473887141 */, 18 }, /* 6618 */ { MAD_F(0x07956ed0) /* 0.473982632 */, 18 }, /* 6619 */ { MAD_F(0x0795d2f2) /* 0.474078128 */, 18 }, /* 6620 */ { MAD_F(0x07963716) /* 0.474173629 */, 18 }, /* 6621 */ { MAD_F(0x07969b3b) /* 0.474269135 */, 18 }, /* 6622 */ { MAD_F(0x0796ff62) /* 0.474364645 */, 18 }, /* 6623 */ { MAD_F(0x07976389) /* 0.474460161 */, 18 }, /* 6624 */ { MAD_F(0x0797c7b2) /* 0.474555681 */, 18 }, /* 6625 */ { MAD_F(0x07982bdd) /* 0.474651205 */, 18 }, /* 6626 */ { MAD_F(0x07989008) /* 0.474746735 */, 18 }, /* 6627 */ { MAD_F(0x0798f435) /* 0.474842270 */, 18 }, /* 6628 */ { MAD_F(0x07995863) /* 0.474937809 */, 18 }, /* 6629 */ { MAD_F(0x0799bc92) /* 0.475033353 */, 18 }, /* 6630 */ { MAD_F(0x079a20c3) /* 0.475128902 */, 18 }, /* 6631 */ { MAD_F(0x079a84f5) /* 0.475224456 */, 18 }, /* 6632 */ { MAD_F(0x079ae929) /* 0.475320014 */, 18 }, /* 6633 */ { MAD_F(0x079b4d5d) /* 0.475415578 */, 18 }, /* 6634 */ { MAD_F(0x079bb193) /* 0.475511146 */, 18 }, /* 6635 */ { MAD_F(0x079c15ca) /* 0.475606719 */, 18 }, /* 6636 */ { MAD_F(0x079c7a03) /* 0.475702296 */, 18 }, /* 6637 */ { MAD_F(0x079cde3c) /* 0.475797879 */, 18 }, /* 6638 */ { MAD_F(0x079d4277) /* 0.475893466 */, 18 }, /* 6639 */ { MAD_F(0x079da6b4) /* 0.475989058 */, 18 }, /* 6640 */ { MAD_F(0x079e0af1) /* 0.476084655 */, 18 }, /* 6641 */ { MAD_F(0x079e6f30) /* 0.476180257 */, 18 }, /* 6642 */ { MAD_F(0x079ed370) /* 0.476275863 */, 18 }, /* 6643 */ { MAD_F(0x079f37b2) /* 0.476371475 */, 18 }, /* 6644 */ { MAD_F(0x079f9bf5) /* 0.476467091 */, 18 }, /* 6645 */ { MAD_F(0x07a00039) /* 0.476562712 */, 18 }, /* 6646 */ { MAD_F(0x07a0647e) /* 0.476658338 */, 18 }, /* 6647 */ { MAD_F(0x07a0c8c5) /* 0.476753968 */, 18 }, /* 6648 */ { MAD_F(0x07a12d0c) /* 0.476849603 */, 18 }, /* 6649 */ { MAD_F(0x07a19156) /* 0.476945243 */, 18 }, /* 6650 */ { MAD_F(0x07a1f5a0) /* 0.477040888 */, 18 }, /* 6651 */ { MAD_F(0x07a259ec) /* 0.477136538 */, 18 }, /* 6652 */ { MAD_F(0x07a2be39) /* 0.477232193 */, 18 }, /* 6653 */ { MAD_F(0x07a32287) /* 0.477327852 */, 18 }, /* 6654 */ { MAD_F(0x07a386d7) /* 0.477423516 */, 18 }, /* 6655 */ { MAD_F(0x07a3eb28) /* 0.477519185 */, 18 }, /* 6656 */ { MAD_F(0x07a44f7a) /* 0.477614858 */, 18 }, /* 6657 */ { MAD_F(0x07a4b3ce) /* 0.477710537 */, 18 }, /* 6658 */ { MAD_F(0x07a51822) /* 0.477806220 */, 18 }, /* 6659 */ { MAD_F(0x07a57c78) /* 0.477901908 */, 18 }, /* 6660 */ { MAD_F(0x07a5e0d0) /* 0.477997601 */, 18 }, /* 6661 */ { MAD_F(0x07a64528) /* 0.478093299 */, 18 }, /* 6662 */ { MAD_F(0x07a6a982) /* 0.478189001 */, 18 }, /* 6663 */ { MAD_F(0x07a70ddd) /* 0.478284708 */, 18 }, /* 6664 */ { MAD_F(0x07a7723a) /* 0.478380420 */, 18 }, /* 6665 */ { MAD_F(0x07a7d698) /* 0.478476137 */, 18 }, /* 6666 */ { MAD_F(0x07a83af7) /* 0.478571858 */, 18 }, /* 6667 */ { MAD_F(0x07a89f57) /* 0.478667585 */, 18 }, /* 6668 */ { MAD_F(0x07a903b9) /* 0.478763316 */, 18 }, /* 6669 */ { MAD_F(0x07a9681c) /* 0.478859052 */, 18 }, /* 6670 */ { MAD_F(0x07a9cc80) /* 0.478954793 */, 18 }, /* 6671 */ { MAD_F(0x07aa30e5) /* 0.479050538 */, 18 }, /* 6672 */ { MAD_F(0x07aa954c) /* 0.479146288 */, 18 }, /* 6673 */ { MAD_F(0x07aaf9b4) /* 0.479242043 */, 18 }, /* 6674 */ { MAD_F(0x07ab5e1e) /* 0.479337803 */, 18 }, /* 6675 */ { MAD_F(0x07abc288) /* 0.479433568 */, 18 }, /* 6676 */ { MAD_F(0x07ac26f4) /* 0.479529337 */, 18 }, /* 6677 */ { MAD_F(0x07ac8b61) /* 0.479625111 */, 18 }, /* 6678 */ { MAD_F(0x07acefd0) /* 0.479720890 */, 18 }, /* 6679 */ { MAD_F(0x07ad543f) /* 0.479816674 */, 18 }, /* 6680 */ { MAD_F(0x07adb8b0) /* 0.479912463 */, 18 }, /* 6681 */ { MAD_F(0x07ae1d23) /* 0.480008256 */, 18 }, /* 6682 */ { MAD_F(0x07ae8196) /* 0.480104054 */, 18 }, /* 6683 */ { MAD_F(0x07aee60b) /* 0.480199857 */, 18 }, /* 6684 */ { MAD_F(0x07af4a81) /* 0.480295664 */, 18 }, /* 6685 */ { MAD_F(0x07afaef9) /* 0.480391477 */, 18 }, /* 6686 */ { MAD_F(0x07b01372) /* 0.480487294 */, 18 }, /* 6687 */ { MAD_F(0x07b077ec) /* 0.480583116 */, 18 }, /* 6688 */ { MAD_F(0x07b0dc67) /* 0.480678943 */, 18 }, /* 6689 */ { MAD_F(0x07b140e4) /* 0.480774774 */, 18 }, /* 6690 */ { MAD_F(0x07b1a561) /* 0.480870611 */, 18 }, /* 6691 */ { MAD_F(0x07b209e1) /* 0.480966452 */, 18 }, /* 6692 */ { MAD_F(0x07b26e61) /* 0.481062298 */, 18 }, /* 6693 */ { MAD_F(0x07b2d2e3) /* 0.481158148 */, 18 }, /* 6694 */ { MAD_F(0x07b33766) /* 0.481254004 */, 18 }, /* 6695 */ { MAD_F(0x07b39bea) /* 0.481349864 */, 18 }, /* 6696 */ { MAD_F(0x07b4006f) /* 0.481445729 */, 18 }, /* 6697 */ { MAD_F(0x07b464f6) /* 0.481541598 */, 18 }, /* 6698 */ { MAD_F(0x07b4c97e) /* 0.481637473 */, 18 }, /* 6699 */ { MAD_F(0x07b52e08) /* 0.481733352 */, 18 }, /* 6700 */ { MAD_F(0x07b59292) /* 0.481829236 */, 18 }, /* 6701 */ { MAD_F(0x07b5f71e) /* 0.481925125 */, 18 }, /* 6702 */ { MAD_F(0x07b65bac) /* 0.482021019 */, 18 }, /* 6703 */ { MAD_F(0x07b6c03a) /* 0.482116917 */, 18 }, /* 6704 */ { MAD_F(0x07b724ca) /* 0.482212820 */, 18 }, /* 6705 */ { MAD_F(0x07b7895b) /* 0.482308728 */, 18 }, /* 6706 */ { MAD_F(0x07b7eded) /* 0.482404640 */, 18 }, /* 6707 */ { MAD_F(0x07b85281) /* 0.482500558 */, 18 }, /* 6708 */ { MAD_F(0x07b8b716) /* 0.482596480 */, 18 }, /* 6709 */ { MAD_F(0x07b91bac) /* 0.482692407 */, 18 }, /* 6710 */ { MAD_F(0x07b98044) /* 0.482788339 */, 18 }, /* 6711 */ { MAD_F(0x07b9e4dc) /* 0.482884275 */, 18 }, /* 6712 */ { MAD_F(0x07ba4976) /* 0.482980216 */, 18 }, /* 6713 */ { MAD_F(0x07baae12) /* 0.483076162 */, 18 }, /* 6714 */ { MAD_F(0x07bb12ae) /* 0.483172113 */, 18 }, /* 6715 */ { MAD_F(0x07bb774c) /* 0.483268069 */, 18 }, /* 6716 */ { MAD_F(0x07bbdbeb) /* 0.483364029 */, 18 }, /* 6717 */ { MAD_F(0x07bc408c) /* 0.483459994 */, 18 }, /* 6718 */ { MAD_F(0x07bca52d) /* 0.483555964 */, 18 }, /* 6719 */ { MAD_F(0x07bd09d0) /* 0.483651939 */, 18 }, /* 6720 */ { MAD_F(0x07bd6e75) /* 0.483747918 */, 18 }, /* 6721 */ { MAD_F(0x07bdd31a) /* 0.483843902 */, 18 }, /* 6722 */ { MAD_F(0x07be37c1) /* 0.483939891 */, 18 }, /* 6723 */ { MAD_F(0x07be9c69) /* 0.484035885 */, 18 }, /* 6724 */ { MAD_F(0x07bf0113) /* 0.484131883 */, 18 }, /* 6725 */ { MAD_F(0x07bf65bd) /* 0.484227886 */, 18 }, /* 6726 */ { MAD_F(0x07bfca69) /* 0.484323894 */, 18 }, /* 6727 */ { MAD_F(0x07c02f16) /* 0.484419907 */, 18 }, /* 6728 */ { MAD_F(0x07c093c5) /* 0.484515924 */, 18 }, /* 6729 */ { MAD_F(0x07c0f875) /* 0.484611946 */, 18 }, /* 6730 */ { MAD_F(0x07c15d26) /* 0.484707973 */, 18 }, /* 6731 */ { MAD_F(0x07c1c1d8) /* 0.484804005 */, 18 }, /* 6732 */ { MAD_F(0x07c2268b) /* 0.484900041 */, 18 }, /* 6733 */ { MAD_F(0x07c28b40) /* 0.484996083 */, 18 }, /* 6734 */ { MAD_F(0x07c2eff6) /* 0.485092128 */, 18 }, /* 6735 */ { MAD_F(0x07c354ae) /* 0.485188179 */, 18 }, /* 6736 */ { MAD_F(0x07c3b967) /* 0.485284235 */, 18 }, /* 6737 */ { MAD_F(0x07c41e21) /* 0.485380295 */, 18 }, /* 6738 */ { MAD_F(0x07c482dc) /* 0.485476360 */, 18 }, /* 6739 */ { MAD_F(0x07c4e798) /* 0.485572430 */, 18 }, /* 6740 */ { MAD_F(0x07c54c56) /* 0.485668504 */, 18 }, /* 6741 */ { MAD_F(0x07c5b115) /* 0.485764583 */, 18 }, /* 6742 */ { MAD_F(0x07c615d6) /* 0.485860667 */, 18 }, /* 6743 */ { MAD_F(0x07c67a97) /* 0.485956756 */, 18 }, /* 6744 */ { MAD_F(0x07c6df5a) /* 0.486052849 */, 18 }, /* 6745 */ { MAD_F(0x07c7441e) /* 0.486148948 */, 18 }, /* 6746 */ { MAD_F(0x07c7a8e4) /* 0.486245051 */, 18 }, /* 6747 */ { MAD_F(0x07c80daa) /* 0.486341158 */, 18 }, /* 6748 */ { MAD_F(0x07c87272) /* 0.486437271 */, 18 }, /* 6749 */ { MAD_F(0x07c8d73c) /* 0.486533388 */, 18 }, /* 6750 */ { MAD_F(0x07c93c06) /* 0.486629510 */, 18 }, /* 6751 */ { MAD_F(0x07c9a0d2) /* 0.486725637 */, 18 }, /* 6752 */ { MAD_F(0x07ca059f) /* 0.486821768 */, 18 }, /* 6753 */ { MAD_F(0x07ca6a6d) /* 0.486917905 */, 18 }, /* 6754 */ { MAD_F(0x07cacf3d) /* 0.487014045 */, 18 }, /* 6755 */ { MAD_F(0x07cb340e) /* 0.487110191 */, 18 }, /* 6756 */ { MAD_F(0x07cb98e0) /* 0.487206342 */, 18 }, /* 6757 */ { MAD_F(0x07cbfdb4) /* 0.487302497 */, 18 }, /* 6758 */ { MAD_F(0x07cc6288) /* 0.487398657 */, 18 }, /* 6759 */ { MAD_F(0x07ccc75e) /* 0.487494821 */, 18 }, /* 6760 */ { MAD_F(0x07cd2c36) /* 0.487590991 */, 18 }, /* 6761 */ { MAD_F(0x07cd910e) /* 0.487687165 */, 18 }, /* 6762 */ { MAD_F(0x07cdf5e8) /* 0.487783344 */, 18 }, /* 6763 */ { MAD_F(0x07ce5ac3) /* 0.487879528 */, 18 }, /* 6764 */ { MAD_F(0x07cebfa0) /* 0.487975716 */, 18 }, /* 6765 */ { MAD_F(0x07cf247d) /* 0.488071909 */, 18 }, /* 6766 */ { MAD_F(0x07cf895c) /* 0.488168107 */, 18 }, /* 6767 */ { MAD_F(0x07cfee3c) /* 0.488264310 */, 18 }, /* 6768 */ { MAD_F(0x07d0531e) /* 0.488360517 */, 18 }, /* 6769 */ { MAD_F(0x07d0b801) /* 0.488456729 */, 18 }, /* 6770 */ { MAD_F(0x07d11ce5) /* 0.488552946 */, 18 }, /* 6771 */ { MAD_F(0x07d181ca) /* 0.488649167 */, 18 }, /* 6772 */ { MAD_F(0x07d1e6b0) /* 0.488745394 */, 18 }, /* 6773 */ { MAD_F(0x07d24b98) /* 0.488841625 */, 18 }, /* 6774 */ { MAD_F(0x07d2b081) /* 0.488937860 */, 18 }, /* 6775 */ { MAD_F(0x07d3156c) /* 0.489034101 */, 18 }, /* 6776 */ { MAD_F(0x07d37a57) /* 0.489130346 */, 18 }, /* 6777 */ { MAD_F(0x07d3df44) /* 0.489226596 */, 18 }, /* 6778 */ { MAD_F(0x07d44432) /* 0.489322851 */, 18 }, /* 6779 */ { MAD_F(0x07d4a922) /* 0.489419110 */, 18 }, /* 6780 */ { MAD_F(0x07d50e13) /* 0.489515375 */, 18 }, /* 6781 */ { MAD_F(0x07d57305) /* 0.489611643 */, 18 }, /* 6782 */ { MAD_F(0x07d5d7f8) /* 0.489707917 */, 18 }, /* 6783 */ { MAD_F(0x07d63cec) /* 0.489804195 */, 18 }, /* 6784 */ { MAD_F(0x07d6a1e2) /* 0.489900479 */, 18 }, /* 6785 */ { MAD_F(0x07d706d9) /* 0.489996766 */, 18 }, /* 6786 */ { MAD_F(0x07d76bd2) /* 0.490093059 */, 18 }, /* 6787 */ { MAD_F(0x07d7d0cb) /* 0.490189356 */, 18 }, /* 6788 */ { MAD_F(0x07d835c6) /* 0.490285658 */, 18 }, /* 6789 */ { MAD_F(0x07d89ac2) /* 0.490381965 */, 18 }, /* 6790 */ { MAD_F(0x07d8ffc0) /* 0.490478277 */, 18 }, /* 6791 */ { MAD_F(0x07d964be) /* 0.490574593 */, 18 }, /* 6792 */ { MAD_F(0x07d9c9be) /* 0.490670914 */, 18 }, /* 6793 */ { MAD_F(0x07da2ebf) /* 0.490767239 */, 18 }, /* 6794 */ { MAD_F(0x07da93c2) /* 0.490863570 */, 18 }, /* 6795 */ { MAD_F(0x07daf8c6) /* 0.490959905 */, 18 }, /* 6796 */ { MAD_F(0x07db5dcb) /* 0.491056245 */, 18 }, /* 6797 */ { MAD_F(0x07dbc2d1) /* 0.491152589 */, 18 }, /* 6798 */ { MAD_F(0x07dc27d9) /* 0.491248939 */, 18 }, /* 6799 */ { MAD_F(0x07dc8ce1) /* 0.491345293 */, 18 }, /* 6800 */ { MAD_F(0x07dcf1ec) /* 0.491441651 */, 18 }, /* 6801 */ { MAD_F(0x07dd56f7) /* 0.491538015 */, 18 }, /* 6802 */ { MAD_F(0x07ddbc04) /* 0.491634383 */, 18 }, /* 6803 */ { MAD_F(0x07de2111) /* 0.491730756 */, 18 }, /* 6804 */ { MAD_F(0x07de8621) /* 0.491827134 */, 18 }, /* 6805 */ { MAD_F(0x07deeb31) /* 0.491923516 */, 18 }, /* 6806 */ { MAD_F(0x07df5043) /* 0.492019903 */, 18 }, /* 6807 */ { MAD_F(0x07dfb556) /* 0.492116295 */, 18 }, /* 6808 */ { MAD_F(0x07e01a6a) /* 0.492212691 */, 18 }, /* 6809 */ { MAD_F(0x07e07f80) /* 0.492309093 */, 18 }, /* 6810 */ { MAD_F(0x07e0e496) /* 0.492405499 */, 18 }, /* 6811 */ { MAD_F(0x07e149ae) /* 0.492501909 */, 18 }, /* 6812 */ { MAD_F(0x07e1aec8) /* 0.492598325 */, 18 }, /* 6813 */ { MAD_F(0x07e213e2) /* 0.492694745 */, 18 }, /* 6814 */ { MAD_F(0x07e278fe) /* 0.492791170 */, 18 }, /* 6815 */ { MAD_F(0x07e2de1b) /* 0.492887599 */, 18 }, /* 6816 */ { MAD_F(0x07e3433a) /* 0.492984033 */, 18 }, /* 6817 */ { MAD_F(0x07e3a859) /* 0.493080472 */, 18 }, /* 6818 */ { MAD_F(0x07e40d7a) /* 0.493176916 */, 18 }, /* 6819 */ { MAD_F(0x07e4729c) /* 0.493273365 */, 18 }, /* 6820 */ { MAD_F(0x07e4d7c0) /* 0.493369818 */, 18 }, /* 6821 */ { MAD_F(0x07e53ce4) /* 0.493466275 */, 18 }, /* 6822 */ { MAD_F(0x07e5a20a) /* 0.493562738 */, 18 }, /* 6823 */ { MAD_F(0x07e60732) /* 0.493659205 */, 18 }, /* 6824 */ { MAD_F(0x07e66c5a) /* 0.493755677 */, 18 }, /* 6825 */ { MAD_F(0x07e6d184) /* 0.493852154 */, 18 }, /* 6826 */ { MAD_F(0x07e736af) /* 0.493948635 */, 18 }, /* 6827 */ { MAD_F(0x07e79bdb) /* 0.494045122 */, 18 }, /* 6828 */ { MAD_F(0x07e80109) /* 0.494141612 */, 18 }, /* 6829 */ { MAD_F(0x07e86638) /* 0.494238108 */, 18 }, /* 6830 */ { MAD_F(0x07e8cb68) /* 0.494334608 */, 18 }, /* 6831 */ { MAD_F(0x07e93099) /* 0.494431113 */, 18 }, /* 6832 */ { MAD_F(0x07e995cc) /* 0.494527623 */, 18 }, /* 6833 */ { MAD_F(0x07e9fb00) /* 0.494624137 */, 18 }, /* 6834 */ { MAD_F(0x07ea6035) /* 0.494720656 */, 18 }, /* 6835 */ { MAD_F(0x07eac56b) /* 0.494817180 */, 18 }, /* 6836 */ { MAD_F(0x07eb2aa3) /* 0.494913709 */, 18 }, /* 6837 */ { MAD_F(0x07eb8fdc) /* 0.495010242 */, 18 }, /* 6838 */ { MAD_F(0x07ebf516) /* 0.495106780 */, 18 }, /* 6839 */ { MAD_F(0x07ec5a51) /* 0.495203322 */, 18 }, /* 6840 */ { MAD_F(0x07ecbf8e) /* 0.495299870 */, 18 }, /* 6841 */ { MAD_F(0x07ed24cc) /* 0.495396422 */, 18 }, /* 6842 */ { MAD_F(0x07ed8a0b) /* 0.495492978 */, 18 }, /* 6843 */ { MAD_F(0x07edef4c) /* 0.495589540 */, 18 }, /* 6844 */ { MAD_F(0x07ee548e) /* 0.495686106 */, 18 }, /* 6845 */ { MAD_F(0x07eeb9d1) /* 0.495782677 */, 18 }, /* 6846 */ { MAD_F(0x07ef1f15) /* 0.495879252 */, 18 }, /* 6847 */ { MAD_F(0x07ef845b) /* 0.495975833 */, 18 }, /* 6848 */ { MAD_F(0x07efe9a1) /* 0.496072418 */, 18 }, /* 6849 */ { MAD_F(0x07f04ee9) /* 0.496169007 */, 18 }, /* 6850 */ { MAD_F(0x07f0b433) /* 0.496265602 */, 18 }, /* 6851 */ { MAD_F(0x07f1197d) /* 0.496362201 */, 18 }, /* 6852 */ { MAD_F(0x07f17ec9) /* 0.496458804 */, 18 }, /* 6853 */ { MAD_F(0x07f1e416) /* 0.496555413 */, 18 }, /* 6854 */ { MAD_F(0x07f24965) /* 0.496652026 */, 18 }, /* 6855 */ { MAD_F(0x07f2aeb5) /* 0.496748644 */, 18 }, /* 6856 */ { MAD_F(0x07f31405) /* 0.496845266 */, 18 }, /* 6857 */ { MAD_F(0x07f37958) /* 0.496941894 */, 18 }, /* 6858 */ { MAD_F(0x07f3deab) /* 0.497038526 */, 18 }, /* 6859 */ { MAD_F(0x07f44400) /* 0.497135162 */, 18 }, /* 6860 */ { MAD_F(0x07f4a956) /* 0.497231804 */, 18 }, /* 6861 */ { MAD_F(0x07f50ead) /* 0.497328450 */, 18 }, /* 6862 */ { MAD_F(0x07f57405) /* 0.497425100 */, 18 }, /* 6863 */ { MAD_F(0x07f5d95f) /* 0.497521756 */, 18 }, /* 6864 */ { MAD_F(0x07f63eba) /* 0.497618416 */, 18 }, /* 6865 */ { MAD_F(0x07f6a416) /* 0.497715081 */, 18 }, /* 6866 */ { MAD_F(0x07f70974) /* 0.497811750 */, 18 }, /* 6867 */ { MAD_F(0x07f76ed3) /* 0.497908425 */, 18 }, /* 6868 */ { MAD_F(0x07f7d433) /* 0.498005103 */, 18 }, /* 6869 */ { MAD_F(0x07f83994) /* 0.498101787 */, 18 }, /* 6870 */ { MAD_F(0x07f89ef7) /* 0.498198475 */, 18 }, /* 6871 */ { MAD_F(0x07f9045a) /* 0.498295168 */, 18 }, /* 6872 */ { MAD_F(0x07f969c0) /* 0.498391866 */, 18 }, /* 6873 */ { MAD_F(0x07f9cf26) /* 0.498488568 */, 18 }, /* 6874 */ { MAD_F(0x07fa348e) /* 0.498585275 */, 18 }, /* 6875 */ { MAD_F(0x07fa99f6) /* 0.498681987 */, 18 }, /* 6876 */ { MAD_F(0x07faff60) /* 0.498778704 */, 18 }, /* 6877 */ { MAD_F(0x07fb64cc) /* 0.498875425 */, 18 }, /* 6878 */ { MAD_F(0x07fbca38) /* 0.498972150 */, 18 }, /* 6879 */ { MAD_F(0x07fc2fa6) /* 0.499068881 */, 18 }, /* 6880 */ { MAD_F(0x07fc9516) /* 0.499165616 */, 18 }, /* 6881 */ { MAD_F(0x07fcfa86) /* 0.499262356 */, 18 }, /* 6882 */ { MAD_F(0x07fd5ff8) /* 0.499359101 */, 18 }, /* 6883 */ { MAD_F(0x07fdc56b) /* 0.499455850 */, 18 }, /* 6884 */ { MAD_F(0x07fe2adf) /* 0.499552604 */, 18 }, /* 6885 */ { MAD_F(0x07fe9054) /* 0.499649362 */, 18 }, /* 6886 */ { MAD_F(0x07fef5cb) /* 0.499746126 */, 18 }, /* 6887 */ { MAD_F(0x07ff5b43) /* 0.499842894 */, 18 }, /* 6888 */ { MAD_F(0x07ffc0bc) /* 0.499939666 */, 18 }, /* 6889 */ { MAD_F(0x0400131b) /* 0.250018222 */, 19 }, /* 6890 */ { MAD_F(0x040045d9) /* 0.250066613 */, 19 }, /* 6891 */ { MAD_F(0x04007897) /* 0.250115006 */, 19 }, /* 6892 */ { MAD_F(0x0400ab57) /* 0.250163402 */, 19 }, /* 6893 */ { MAD_F(0x0400de16) /* 0.250211800 */, 19 }, /* 6894 */ { MAD_F(0x040110d7) /* 0.250260200 */, 19 }, /* 6895 */ { MAD_F(0x04014398) /* 0.250308603 */, 19 }, /* 6896 */ { MAD_F(0x04017659) /* 0.250357008 */, 19 }, /* 6897 */ { MAD_F(0x0401a91c) /* 0.250405415 */, 19 }, /* 6898 */ { MAD_F(0x0401dbdf) /* 0.250453825 */, 19 }, /* 6899 */ { MAD_F(0x04020ea2) /* 0.250502237 */, 19 }, /* 6900 */ { MAD_F(0x04024166) /* 0.250550652 */, 19 }, /* 6901 */ { MAD_F(0x0402742b) /* 0.250599068 */, 19 }, /* 6902 */ { MAD_F(0x0402a6f0) /* 0.250647488 */, 19 }, /* 6903 */ { MAD_F(0x0402d9b6) /* 0.250695909 */, 19 }, /* 6904 */ { MAD_F(0x04030c7d) /* 0.250744333 */, 19 }, /* 6905 */ { MAD_F(0x04033f44) /* 0.250792759 */, 19 }, /* 6906 */ { MAD_F(0x0403720c) /* 0.250841187 */, 19 }, /* 6907 */ { MAD_F(0x0403a4d5) /* 0.250889618 */, 19 }, /* 6908 */ { MAD_F(0x0403d79e) /* 0.250938051 */, 19 }, /* 6909 */ { MAD_F(0x04040a68) /* 0.250986487 */, 19 }, /* 6910 */ { MAD_F(0x04043d32) /* 0.251034924 */, 19 }, /* 6911 */ { MAD_F(0x04046ffd) /* 0.251083365 */, 19 }, /* 6912 */ { MAD_F(0x0404a2c9) /* 0.251131807 */, 19 }, /* 6913 */ { MAD_F(0x0404d595) /* 0.251180252 */, 19 }, /* 6914 */ { MAD_F(0x04050862) /* 0.251228699 */, 19 }, /* 6915 */ { MAD_F(0x04053b30) /* 0.251277148 */, 19 }, /* 6916 */ { MAD_F(0x04056dfe) /* 0.251325600 */, 19 }, /* 6917 */ { MAD_F(0x0405a0cd) /* 0.251374054 */, 19 }, /* 6918 */ { MAD_F(0x0405d39c) /* 0.251422511 */, 19 }, /* 6919 */ { MAD_F(0x0406066c) /* 0.251470970 */, 19 }, /* 6920 */ { MAD_F(0x0406393d) /* 0.251519431 */, 19 }, /* 6921 */ { MAD_F(0x04066c0e) /* 0.251567894 */, 19 }, /* 6922 */ { MAD_F(0x04069ee0) /* 0.251616360 */, 19 }, /* 6923 */ { MAD_F(0x0406d1b3) /* 0.251664828 */, 19 }, /* 6924 */ { MAD_F(0x04070486) /* 0.251713299 */, 19 }, /* 6925 */ { MAD_F(0x0407375a) /* 0.251761772 */, 19 }, /* 6926 */ { MAD_F(0x04076a2e) /* 0.251810247 */, 19 }, /* 6927 */ { MAD_F(0x04079d03) /* 0.251858724 */, 19 }, /* 6928 */ { MAD_F(0x0407cfd9) /* 0.251907204 */, 19 }, /* 6929 */ { MAD_F(0x040802af) /* 0.251955686 */, 19 }, /* 6930 */ { MAD_F(0x04083586) /* 0.252004171 */, 19 }, /* 6931 */ { MAD_F(0x0408685e) /* 0.252052658 */, 19 }, /* 6932 */ { MAD_F(0x04089b36) /* 0.252101147 */, 19 }, /* 6933 */ { MAD_F(0x0408ce0f) /* 0.252149638 */, 19 }, /* 6934 */ { MAD_F(0x040900e8) /* 0.252198132 */, 19 }, /* 6935 */ { MAD_F(0x040933c2) /* 0.252246628 */, 19 }, /* 6936 */ { MAD_F(0x0409669d) /* 0.252295127 */, 19 }, /* 6937 */ { MAD_F(0x04099978) /* 0.252343627 */, 19 }, /* 6938 */ { MAD_F(0x0409cc54) /* 0.252392131 */, 19 }, /* 6939 */ { MAD_F(0x0409ff31) /* 0.252440636 */, 19 }, /* 6940 */ { MAD_F(0x040a320e) /* 0.252489144 */, 19 }, /* 6941 */ { MAD_F(0x040a64ec) /* 0.252537654 */, 19 }, /* 6942 */ { MAD_F(0x040a97cb) /* 0.252586166 */, 19 }, /* 6943 */ { MAD_F(0x040acaaa) /* 0.252634681 */, 19 }, /* 6944 */ { MAD_F(0x040afd89) /* 0.252683198 */, 19 }, /* 6945 */ { MAD_F(0x040b306a) /* 0.252731718 */, 19 }, /* 6946 */ { MAD_F(0x040b634b) /* 0.252780240 */, 19 }, /* 6947 */ { MAD_F(0x040b962c) /* 0.252828764 */, 19 }, /* 6948 */ { MAD_F(0x040bc90e) /* 0.252877290 */, 19 }, /* 6949 */ { MAD_F(0x040bfbf1) /* 0.252925819 */, 19 }, /* 6950 */ { MAD_F(0x040c2ed5) /* 0.252974350 */, 19 }, /* 6951 */ { MAD_F(0x040c61b9) /* 0.253022883 */, 19 }, /* 6952 */ { MAD_F(0x040c949e) /* 0.253071419 */, 19 }, /* 6953 */ { MAD_F(0x040cc783) /* 0.253119957 */, 19 }, /* 6954 */ { MAD_F(0x040cfa69) /* 0.253168498 */, 19 }, /* 6955 */ { MAD_F(0x040d2d4f) /* 0.253217040 */, 19 }, /* 6956 */ { MAD_F(0x040d6037) /* 0.253265585 */, 19 }, /* 6957 */ { MAD_F(0x040d931e) /* 0.253314133 */, 19 }, /* 6958 */ { MAD_F(0x040dc607) /* 0.253362682 */, 19 }, /* 6959 */ { MAD_F(0x040df8f0) /* 0.253411234 */, 19 }, /* 6960 */ { MAD_F(0x040e2bda) /* 0.253459789 */, 19 }, /* 6961 */ { MAD_F(0x040e5ec4) /* 0.253508345 */, 19 }, /* 6962 */ { MAD_F(0x040e91af) /* 0.253556904 */, 19 }, /* 6963 */ { MAD_F(0x040ec49b) /* 0.253605466 */, 19 }, /* 6964 */ { MAD_F(0x040ef787) /* 0.253654029 */, 19 }, /* 6965 */ { MAD_F(0x040f2a74) /* 0.253702595 */, 19 }, /* 6966 */ { MAD_F(0x040f5d61) /* 0.253751164 */, 19 }, /* 6967 */ { MAD_F(0x040f904f) /* 0.253799734 */, 19 }, /* 6968 */ { MAD_F(0x040fc33e) /* 0.253848307 */, 19 }, /* 6969 */ { MAD_F(0x040ff62d) /* 0.253896883 */, 19 }, /* 6970 */ { MAD_F(0x0410291d) /* 0.253945460 */, 19 }, /* 6971 */ { MAD_F(0x04105c0e) /* 0.253994040 */, 19 }, /* 6972 */ { MAD_F(0x04108eff) /* 0.254042622 */, 19 }, /* 6973 */ { MAD_F(0x0410c1f1) /* 0.254091207 */, 19 }, /* 6974 */ { MAD_F(0x0410f4e3) /* 0.254139794 */, 19 }, /* 6975 */ { MAD_F(0x041127d6) /* 0.254188383 */, 19 }, /* 6976 */ { MAD_F(0x04115aca) /* 0.254236974 */, 19 }, /* 6977 */ { MAD_F(0x04118dbe) /* 0.254285568 */, 19 }, /* 6978 */ { MAD_F(0x0411c0b3) /* 0.254334165 */, 19 }, /* 6979 */ { MAD_F(0x0411f3a9) /* 0.254382763 */, 19 }, /* 6980 */ { MAD_F(0x0412269f) /* 0.254431364 */, 19 }, /* 6981 */ { MAD_F(0x04125996) /* 0.254479967 */, 19 }, /* 6982 */ { MAD_F(0x04128c8d) /* 0.254528572 */, 19 }, /* 6983 */ { MAD_F(0x0412bf85) /* 0.254577180 */, 19 }, /* 6984 */ { MAD_F(0x0412f27e) /* 0.254625790 */, 19 }, /* 6985 */ { MAD_F(0x04132577) /* 0.254674403 */, 19 }, /* 6986 */ { MAD_F(0x04135871) /* 0.254723017 */, 19 }, /* 6987 */ { MAD_F(0x04138b6c) /* 0.254771635 */, 19 }, /* 6988 */ { MAD_F(0x0413be67) /* 0.254820254 */, 19 }, /* 6989 */ { MAD_F(0x0413f163) /* 0.254868876 */, 19 }, /* 6990 */ { MAD_F(0x0414245f) /* 0.254917500 */, 19 }, /* 6991 */ { MAD_F(0x0414575c) /* 0.254966126 */, 19 }, /* 6992 */ { MAD_F(0x04148a5a) /* 0.255014755 */, 19 }, /* 6993 */ { MAD_F(0x0414bd58) /* 0.255063386 */, 19 }, /* 6994 */ { MAD_F(0x0414f057) /* 0.255112019 */, 19 }, /* 6995 */ { MAD_F(0x04152356) /* 0.255160655 */, 19 }, /* 6996 */ { MAD_F(0x04155657) /* 0.255209292 */, 19 }, /* 6997 */ { MAD_F(0x04158957) /* 0.255257933 */, 19 }, /* 6998 */ { MAD_F(0x0415bc59) /* 0.255306575 */, 19 }, /* 6999 */ { MAD_F(0x0415ef5b) /* 0.255355220 */, 19 }, /* 7000 */ { MAD_F(0x0416225d) /* 0.255403867 */, 19 }, /* 7001 */ { MAD_F(0x04165561) /* 0.255452517 */, 19 }, /* 7002 */ { MAD_F(0x04168864) /* 0.255501169 */, 19 }, /* 7003 */ { MAD_F(0x0416bb69) /* 0.255549823 */, 19 }, /* 7004 */ { MAD_F(0x0416ee6e) /* 0.255598479 */, 19 }, /* 7005 */ { MAD_F(0x04172174) /* 0.255647138 */, 19 }, /* 7006 */ { MAD_F(0x0417547a) /* 0.255695799 */, 19 }, /* 7007 */ { MAD_F(0x04178781) /* 0.255744463 */, 19 }, /* 7008 */ { MAD_F(0x0417ba89) /* 0.255793128 */, 19 }, /* 7009 */ { MAD_F(0x0417ed91) /* 0.255841796 */, 19 }, /* 7010 */ { MAD_F(0x0418209a) /* 0.255890467 */, 19 }, /* 7011 */ { MAD_F(0x041853a3) /* 0.255939139 */, 19 }, /* 7012 */ { MAD_F(0x041886ad) /* 0.255987814 */, 19 }, /* 7013 */ { MAD_F(0x0418b9b8) /* 0.256036492 */, 19 }, /* 7014 */ { MAD_F(0x0418ecc3) /* 0.256085171 */, 19 }, /* 7015 */ { MAD_F(0x04191fcf) /* 0.256133853 */, 19 }, /* 7016 */ { MAD_F(0x041952dc) /* 0.256182537 */, 19 }, /* 7017 */ { MAD_F(0x041985e9) /* 0.256231224 */, 19 }, /* 7018 */ { MAD_F(0x0419b8f7) /* 0.256279913 */, 19 }, /* 7019 */ { MAD_F(0x0419ec05) /* 0.256328604 */, 19 }, /* 7020 */ { MAD_F(0x041a1f15) /* 0.256377297 */, 19 }, /* 7021 */ { MAD_F(0x041a5224) /* 0.256425993 */, 19 }, /* 7022 */ { MAD_F(0x041a8534) /* 0.256474691 */, 19 }, /* 7023 */ { MAD_F(0x041ab845) /* 0.256523392 */, 19 }, /* 7024 */ { MAD_F(0x041aeb57) /* 0.256572095 */, 19 }, /* 7025 */ { MAD_F(0x041b1e69) /* 0.256620800 */, 19 }, /* 7026 */ { MAD_F(0x041b517c) /* 0.256669507 */, 19 }, /* 7027 */ { MAD_F(0x041b848f) /* 0.256718217 */, 19 }, /* 7028 */ { MAD_F(0x041bb7a3) /* 0.256766929 */, 19 }, /* 7029 */ { MAD_F(0x041beab8) /* 0.256815643 */, 19 }, /* 7030 */ { MAD_F(0x041c1dcd) /* 0.256864359 */, 19 }, /* 7031 */ { MAD_F(0x041c50e3) /* 0.256913078 */, 19 }, /* 7032 */ { MAD_F(0x041c83fa) /* 0.256961800 */, 19 }, /* 7033 */ { MAD_F(0x041cb711) /* 0.257010523 */, 19 }, /* 7034 */ { MAD_F(0x041cea28) /* 0.257059249 */, 19 }, /* 7035 */ { MAD_F(0x041d1d41) /* 0.257107977 */, 19 }, /* 7036 */ { MAD_F(0x041d505a) /* 0.257156708 */, 19 }, /* 7037 */ { MAD_F(0x041d8373) /* 0.257205440 */, 19 }, /* 7038 */ { MAD_F(0x041db68e) /* 0.257254175 */, 19 }, /* 7039 */ { MAD_F(0x041de9a8) /* 0.257302913 */, 19 }, /* 7040 */ { MAD_F(0x041e1cc4) /* 0.257351652 */, 19 }, /* 7041 */ { MAD_F(0x041e4fe0) /* 0.257400394 */, 19 }, /* 7042 */ { MAD_F(0x041e82fd) /* 0.257449139 */, 19 }, /* 7043 */ { MAD_F(0x041eb61a) /* 0.257497885 */, 19 }, /* 7044 */ { MAD_F(0x041ee938) /* 0.257546634 */, 19 }, /* 7045 */ { MAD_F(0x041f1c57) /* 0.257595386 */, 19 }, /* 7046 */ { MAD_F(0x041f4f76) /* 0.257644139 */, 19 }, /* 7047 */ { MAD_F(0x041f8296) /* 0.257692895 */, 19 }, /* 7048 */ { MAD_F(0x041fb5b6) /* 0.257741653 */, 19 }, /* 7049 */ { MAD_F(0x041fe8d7) /* 0.257790414 */, 19 }, /* 7050 */ { MAD_F(0x04201bf9) /* 0.257839176 */, 19 }, /* 7051 */ { MAD_F(0x04204f1b) /* 0.257887941 */, 19 }, /* 7052 */ { MAD_F(0x0420823e) /* 0.257936709 */, 19 }, /* 7053 */ { MAD_F(0x0420b561) /* 0.257985478 */, 19 }, /* 7054 */ { MAD_F(0x0420e885) /* 0.258034250 */, 19 }, /* 7055 */ { MAD_F(0x04211baa) /* 0.258083025 */, 19 }, /* 7056 */ { MAD_F(0x04214ed0) /* 0.258131801 */, 19 }, /* 7057 */ { MAD_F(0x042181f6) /* 0.258180580 */, 19 }, /* 7058 */ { MAD_F(0x0421b51c) /* 0.258229361 */, 19 }, /* 7059 */ { MAD_F(0x0421e843) /* 0.258278145 */, 19 }, /* 7060 */ { MAD_F(0x04221b6b) /* 0.258326931 */, 19 }, /* 7061 */ { MAD_F(0x04224e94) /* 0.258375719 */, 19 }, /* 7062 */ { MAD_F(0x042281bd) /* 0.258424509 */, 19 }, /* 7063 */ { MAD_F(0x0422b4e6) /* 0.258473302 */, 19 }, /* 7064 */ { MAD_F(0x0422e811) /* 0.258522097 */, 19 }, /* 7065 */ { MAD_F(0x04231b3c) /* 0.258570894 */, 19 }, /* 7066 */ { MAD_F(0x04234e67) /* 0.258619694 */, 19 }, /* 7067 */ { MAD_F(0x04238193) /* 0.258668496 */, 19 }, /* 7068 */ { MAD_F(0x0423b4c0) /* 0.258717300 */, 19 }, /* 7069 */ { MAD_F(0x0423e7ee) /* 0.258766106 */, 19 }, /* 7070 */ { MAD_F(0x04241b1c) /* 0.258814915 */, 19 }, /* 7071 */ { MAD_F(0x04244e4a) /* 0.258863726 */, 19 }, /* 7072 */ { MAD_F(0x04248179) /* 0.258912540 */, 19 }, /* 7073 */ { MAD_F(0x0424b4a9) /* 0.258961356 */, 19 }, /* 7074 */ { MAD_F(0x0424e7da) /* 0.259010174 */, 19 }, /* 7075 */ { MAD_F(0x04251b0b) /* 0.259058994 */, 19 }, /* 7076 */ { MAD_F(0x04254e3d) /* 0.259107817 */, 19 }, /* 7077 */ { MAD_F(0x0425816f) /* 0.259156642 */, 19 }, /* 7078 */ { MAD_F(0x0425b4a2) /* 0.259205469 */, 19 }, /* 7079 */ { MAD_F(0x0425e7d6) /* 0.259254298 */, 19 }, /* 7080 */ { MAD_F(0x04261b0a) /* 0.259303130 */, 19 }, /* 7081 */ { MAD_F(0x04264e3f) /* 0.259351964 */, 19 }, /* 7082 */ { MAD_F(0x04268174) /* 0.259400801 */, 19 }, /* 7083 */ { MAD_F(0x0426b4aa) /* 0.259449639 */, 19 }, /* 7084 */ { MAD_F(0x0426e7e1) /* 0.259498480 */, 19 }, /* 7085 */ { MAD_F(0x04271b18) /* 0.259547324 */, 19 }, /* 7086 */ { MAD_F(0x04274e50) /* 0.259596169 */, 19 }, /* 7087 */ { MAD_F(0x04278188) /* 0.259645017 */, 19 }, /* 7088 */ { MAD_F(0x0427b4c2) /* 0.259693868 */, 19 }, /* 7089 */ { MAD_F(0x0427e7fb) /* 0.259742720 */, 19 }, /* 7090 */ { MAD_F(0x04281b36) /* 0.259791575 */, 19 }, /* 7091 */ { MAD_F(0x04284e71) /* 0.259840432 */, 19 }, /* 7092 */ { MAD_F(0x042881ac) /* 0.259889291 */, 19 }, /* 7093 */ { MAD_F(0x0428b4e8) /* 0.259938153 */, 19 }, /* 7094 */ { MAD_F(0x0428e825) /* 0.259987017 */, 19 }, /* 7095 */ { MAD_F(0x04291b63) /* 0.260035883 */, 19 }, /* 7096 */ { MAD_F(0x04294ea1) /* 0.260084752 */, 19 }, /* 7097 */ { MAD_F(0x042981df) /* 0.260133623 */, 19 }, /* 7098 */ { MAD_F(0x0429b51f) /* 0.260182496 */, 19 }, /* 7099 */ { MAD_F(0x0429e85f) /* 0.260231372 */, 19 }, /* 7100 */ { MAD_F(0x042a1b9f) /* 0.260280249 */, 19 }, /* 7101 */ { MAD_F(0x042a4ee0) /* 0.260329129 */, 19 }, /* 7102 */ { MAD_F(0x042a8222) /* 0.260378012 */, 19 }, /* 7103 */ { MAD_F(0x042ab564) /* 0.260426896 */, 19 }, /* 7104 */ { MAD_F(0x042ae8a7) /* 0.260475783 */, 19 }, /* 7105 */ { MAD_F(0x042b1beb) /* 0.260524673 */, 19 }, /* 7106 */ { MAD_F(0x042b4f2f) /* 0.260573564 */, 19 }, /* 7107 */ { MAD_F(0x042b8274) /* 0.260622458 */, 19 }, /* 7108 */ { MAD_F(0x042bb5ba) /* 0.260671354 */, 19 }, /* 7109 */ { MAD_F(0x042be900) /* 0.260720252 */, 19 }, /* 7110 */ { MAD_F(0x042c1c46) /* 0.260769153 */, 19 }, /* 7111 */ { MAD_F(0x042c4f8e) /* 0.260818056 */, 19 }, /* 7112 */ { MAD_F(0x042c82d6) /* 0.260866961 */, 19 }, /* 7113 */ { MAD_F(0x042cb61e) /* 0.260915869 */, 19 }, /* 7114 */ { MAD_F(0x042ce967) /* 0.260964779 */, 19 }, /* 7115 */ { MAD_F(0x042d1cb1) /* 0.261013691 */, 19 }, /* 7116 */ { MAD_F(0x042d4ffb) /* 0.261062606 */, 19 }, /* 7117 */ { MAD_F(0x042d8346) /* 0.261111522 */, 19 }, /* 7118 */ { MAD_F(0x042db692) /* 0.261160441 */, 19 }, /* 7119 */ { MAD_F(0x042de9de) /* 0.261209363 */, 19 }, /* 7120 */ { MAD_F(0x042e1d2b) /* 0.261258286 */, 19 }, /* 7121 */ { MAD_F(0x042e5078) /* 0.261307212 */, 19 }, /* 7122 */ { MAD_F(0x042e83c6) /* 0.261356140 */, 19 }, /* 7123 */ { MAD_F(0x042eb715) /* 0.261405071 */, 19 }, /* 7124 */ { MAD_F(0x042eea64) /* 0.261454004 */, 19 }, /* 7125 */ { MAD_F(0x042f1db4) /* 0.261502939 */, 19 }, /* 7126 */ { MAD_F(0x042f5105) /* 0.261551876 */, 19 }, /* 7127 */ { MAD_F(0x042f8456) /* 0.261600816 */, 19 }, /* 7128 */ { MAD_F(0x042fb7a8) /* 0.261649758 */, 19 }, /* 7129 */ { MAD_F(0x042feafa) /* 0.261698702 */, 19 }, /* 7130 */ { MAD_F(0x04301e4d) /* 0.261747649 */, 19 }, /* 7131 */ { MAD_F(0x043051a1) /* 0.261796597 */, 19 }, /* 7132 */ { MAD_F(0x043084f5) /* 0.261845548 */, 19 }, /* 7133 */ { MAD_F(0x0430b84a) /* 0.261894502 */, 19 }, /* 7134 */ { MAD_F(0x0430eb9f) /* 0.261943458 */, 19 }, /* 7135 */ { MAD_F(0x04311ef5) /* 0.261992416 */, 19 }, /* 7136 */ { MAD_F(0x0431524c) /* 0.262041376 */, 19 }, /* 7137 */ { MAD_F(0x043185a3) /* 0.262090338 */, 19 }, /* 7138 */ { MAD_F(0x0431b8fb) /* 0.262139303 */, 19 }, /* 7139 */ { MAD_F(0x0431ec54) /* 0.262188270 */, 19 }, /* 7140 */ { MAD_F(0x04321fad) /* 0.262237240 */, 19 }, /* 7141 */ { MAD_F(0x04325306) /* 0.262286211 */, 19 }, /* 7142 */ { MAD_F(0x04328661) /* 0.262335185 */, 19 }, /* 7143 */ { MAD_F(0x0432b9bc) /* 0.262384162 */, 19 }, /* 7144 */ { MAD_F(0x0432ed17) /* 0.262433140 */, 19 }, /* 7145 */ { MAD_F(0x04332074) /* 0.262482121 */, 19 }, /* 7146 */ { MAD_F(0x043353d0) /* 0.262531104 */, 19 }, /* 7147 */ { MAD_F(0x0433872e) /* 0.262580089 */, 19 }, /* 7148 */ { MAD_F(0x0433ba8c) /* 0.262629077 */, 19 }, /* 7149 */ { MAD_F(0x0433edea) /* 0.262678067 */, 19 }, /* 7150 */ { MAD_F(0x0434214a) /* 0.262727059 */, 19 }, /* 7151 */ { MAD_F(0x043454aa) /* 0.262776054 */, 19 }, /* 7152 */ { MAD_F(0x0434880a) /* 0.262825051 */, 19 }, /* 7153 */ { MAD_F(0x0434bb6b) /* 0.262874050 */, 19 }, /* 7154 */ { MAD_F(0x0434eecd) /* 0.262923051 */, 19 }, /* 7155 */ { MAD_F(0x0435222f) /* 0.262972055 */, 19 }, /* 7156 */ { MAD_F(0x04355592) /* 0.263021061 */, 19 }, /* 7157 */ { MAD_F(0x043588f6) /* 0.263070069 */, 19 }, /* 7158 */ { MAD_F(0x0435bc5a) /* 0.263119079 */, 19 }, /* 7159 */ { MAD_F(0x0435efbf) /* 0.263168092 */, 19 }, /* 7160 */ { MAD_F(0x04362324) /* 0.263217107 */, 19 }, /* 7161 */ { MAD_F(0x0436568a) /* 0.263266125 */, 19 }, /* 7162 */ { MAD_F(0x043689f1) /* 0.263315144 */, 19 }, /* 7163 */ { MAD_F(0x0436bd58) /* 0.263364166 */, 19 }, /* 7164 */ { MAD_F(0x0436f0c0) /* 0.263413191 */, 19 }, /* 7165 */ { MAD_F(0x04372428) /* 0.263462217 */, 19 }, /* 7166 */ { MAD_F(0x04375791) /* 0.263511246 */, 19 }, /* 7167 */ { MAD_F(0x04378afb) /* 0.263560277 */, 19 }, /* 7168 */ { MAD_F(0x0437be65) /* 0.263609310 */, 19 }, /* 7169 */ { MAD_F(0x0437f1d0) /* 0.263658346 */, 19 }, /* 7170 */ { MAD_F(0x0438253c) /* 0.263707384 */, 19 }, /* 7171 */ { MAD_F(0x043858a8) /* 0.263756424 */, 19 }, /* 7172 */ { MAD_F(0x04388c14) /* 0.263805466 */, 19 }, /* 7173 */ { MAD_F(0x0438bf82) /* 0.263854511 */, 19 }, /* 7174 */ { MAD_F(0x0438f2f0) /* 0.263903558 */, 19 }, /* 7175 */ { MAD_F(0x0439265e) /* 0.263952607 */, 19 }, /* 7176 */ { MAD_F(0x043959cd) /* 0.264001659 */, 19 }, /* 7177 */ { MAD_F(0x04398d3d) /* 0.264050713 */, 19 }, /* 7178 */ { MAD_F(0x0439c0ae) /* 0.264099769 */, 19 }, /* 7179 */ { MAD_F(0x0439f41f) /* 0.264148827 */, 19 }, /* 7180 */ { MAD_F(0x043a2790) /* 0.264197888 */, 19 }, /* 7181 */ { MAD_F(0x043a5b02) /* 0.264246951 */, 19 }, /* 7182 */ { MAD_F(0x043a8e75) /* 0.264296016 */, 19 }, /* 7183 */ { MAD_F(0x043ac1e9) /* 0.264345084 */, 19 }, /* 7184 */ { MAD_F(0x043af55d) /* 0.264394153 */, 19 }, /* 7185 */ { MAD_F(0x043b28d2) /* 0.264443225 */, 19 }, /* 7186 */ { MAD_F(0x043b5c47) /* 0.264492300 */, 19 }, /* 7187 */ { MAD_F(0x043b8fbd) /* 0.264541376 */, 19 }, /* 7188 */ { MAD_F(0x043bc333) /* 0.264590455 */, 19 }, /* 7189 */ { MAD_F(0x043bf6aa) /* 0.264639536 */, 19 }, /* 7190 */ { MAD_F(0x043c2a22) /* 0.264688620 */, 19 }, /* 7191 */ { MAD_F(0x043c5d9a) /* 0.264737706 */, 19 }, /* 7192 */ { MAD_F(0x043c9113) /* 0.264786794 */, 19 }, /* 7193 */ { MAD_F(0x043cc48d) /* 0.264835884 */, 19 }, /* 7194 */ { MAD_F(0x043cf807) /* 0.264884976 */, 19 }, /* 7195 */ { MAD_F(0x043d2b82) /* 0.264934071 */, 19 }, /* 7196 */ { MAD_F(0x043d5efd) /* 0.264983168 */, 19 }, /* 7197 */ { MAD_F(0x043d9279) /* 0.265032268 */, 19 }, /* 7198 */ { MAD_F(0x043dc5f6) /* 0.265081369 */, 19 }, /* 7199 */ { MAD_F(0x043df973) /* 0.265130473 */, 19 }, /* 7200 */ { MAD_F(0x043e2cf1) /* 0.265179580 */, 19 }, /* 7201 */ { MAD_F(0x043e6070) /* 0.265228688 */, 19 }, /* 7202 */ { MAD_F(0x043e93ef) /* 0.265277799 */, 19 }, /* 7203 */ { MAD_F(0x043ec76e) /* 0.265326912 */, 19 }, /* 7204 */ { MAD_F(0x043efaef) /* 0.265376027 */, 19 }, /* 7205 */ { MAD_F(0x043f2e6f) /* 0.265425145 */, 19 }, /* 7206 */ { MAD_F(0x043f61f1) /* 0.265474264 */, 19 }, /* 7207 */ { MAD_F(0x043f9573) /* 0.265523387 */, 19 }, /* 7208 */ { MAD_F(0x043fc8f6) /* 0.265572511 */, 19 }, /* 7209 */ { MAD_F(0x043ffc79) /* 0.265621638 */, 19 }, /* 7210 */ { MAD_F(0x04402ffd) /* 0.265670766 */, 19 }, /* 7211 */ { MAD_F(0x04406382) /* 0.265719898 */, 19 }, /* 7212 */ { MAD_F(0x04409707) /* 0.265769031 */, 19 }, /* 7213 */ { MAD_F(0x0440ca8d) /* 0.265818167 */, 19 }, /* 7214 */ { MAD_F(0x0440fe13) /* 0.265867305 */, 19 }, /* 7215 */ { MAD_F(0x0441319a) /* 0.265916445 */, 19 }, /* 7216 */ { MAD_F(0x04416522) /* 0.265965588 */, 19 }, /* 7217 */ { MAD_F(0x044198aa) /* 0.266014732 */, 19 }, /* 7218 */ { MAD_F(0x0441cc33) /* 0.266063880 */, 19 }, /* 7219 */ { MAD_F(0x0441ffbc) /* 0.266113029 */, 19 }, /* 7220 */ { MAD_F(0x04423346) /* 0.266162181 */, 19 }, /* 7221 */ { MAD_F(0x044266d1) /* 0.266211334 */, 19 }, /* 7222 */ { MAD_F(0x04429a5c) /* 0.266260491 */, 19 }, /* 7223 */ { MAD_F(0x0442cde8) /* 0.266309649 */, 19 }, /* 7224 */ { MAD_F(0x04430174) /* 0.266358810 */, 19 }, /* 7225 */ { MAD_F(0x04433501) /* 0.266407973 */, 19 }, /* 7226 */ { MAD_F(0x0443688f) /* 0.266457138 */, 19 }, /* 7227 */ { MAD_F(0x04439c1d) /* 0.266506305 */, 19 }, /* 7228 */ { MAD_F(0x0443cfac) /* 0.266555475 */, 19 }, /* 7229 */ { MAD_F(0x0444033c) /* 0.266604647 */, 19 }, /* 7230 */ { MAD_F(0x044436cc) /* 0.266653822 */, 19 }, /* 7231 */ { MAD_F(0x04446a5d) /* 0.266702998 */, 19 }, /* 7232 */ { MAD_F(0x04449dee) /* 0.266752177 */, 19 }, /* 7233 */ { MAD_F(0x0444d180) /* 0.266801358 */, 19 }, /* 7234 */ { MAD_F(0x04450513) /* 0.266850541 */, 19 }, /* 7235 */ { MAD_F(0x044538a6) /* 0.266899727 */, 19 }, /* 7236 */ { MAD_F(0x04456c39) /* 0.266948915 */, 19 }, /* 7237 */ { MAD_F(0x04459fce) /* 0.266998105 */, 19 }, /* 7238 */ { MAD_F(0x0445d363) /* 0.267047298 */, 19 }, /* 7239 */ { MAD_F(0x044606f8) /* 0.267096492 */, 19 }, /* 7240 */ { MAD_F(0x04463a8f) /* 0.267145689 */, 19 }, /* 7241 */ { MAD_F(0x04466e25) /* 0.267194888 */, 19 }, /* 7242 */ { MAD_F(0x0446a1bd) /* 0.267244090 */, 19 }, /* 7243 */ { MAD_F(0x0446d555) /* 0.267293294 */, 19 }, /* 7244 */ { MAD_F(0x044708ee) /* 0.267342500 */, 19 }, /* 7245 */ { MAD_F(0x04473c87) /* 0.267391708 */, 19 }, /* 7246 */ { MAD_F(0x04477021) /* 0.267440919 */, 19 }, /* 7247 */ { MAD_F(0x0447a3bb) /* 0.267490131 */, 19 }, /* 7248 */ { MAD_F(0x0447d756) /* 0.267539347 */, 19 }, /* 7249 */ { MAD_F(0x04480af2) /* 0.267588564 */, 19 }, /* 7250 */ { MAD_F(0x04483e8e) /* 0.267637783 */, 19 }, /* 7251 */ { MAD_F(0x0448722b) /* 0.267687005 */, 19 }, /* 7252 */ { MAD_F(0x0448a5c9) /* 0.267736229 */, 19 }, /* 7253 */ { MAD_F(0x0448d967) /* 0.267785456 */, 19 }, /* 7254 */ { MAD_F(0x04490d05) /* 0.267834685 */, 19 }, /* 7255 */ { MAD_F(0x044940a5) /* 0.267883915 */, 19 }, /* 7256 */ { MAD_F(0x04497445) /* 0.267933149 */, 19 }, /* 7257 */ { MAD_F(0x0449a7e5) /* 0.267982384 */, 19 }, /* 7258 */ { MAD_F(0x0449db86) /* 0.268031622 */, 19 }, /* 7259 */ { MAD_F(0x044a0f28) /* 0.268080862 */, 19 }, /* 7260 */ { MAD_F(0x044a42ca) /* 0.268130104 */, 19 }, /* 7261 */ { MAD_F(0x044a766d) /* 0.268179349 */, 19 }, /* 7262 */ { MAD_F(0x044aaa11) /* 0.268228595 */, 19 }, /* 7263 */ { MAD_F(0x044addb5) /* 0.268277844 */, 19 }, /* 7264 */ { MAD_F(0x044b115a) /* 0.268327096 */, 19 }, /* 7265 */ { MAD_F(0x044b44ff) /* 0.268376349 */, 19 }, /* 7266 */ { MAD_F(0x044b78a5) /* 0.268425605 */, 19 }, /* 7267 */ { MAD_F(0x044bac4c) /* 0.268474863 */, 19 }, /* 7268 */ { MAD_F(0x044bdff3) /* 0.268524123 */, 19 }, /* 7269 */ { MAD_F(0x044c139b) /* 0.268573386 */, 19 }, /* 7270 */ { MAD_F(0x044c4743) /* 0.268622651 */, 19 }, /* 7271 */ { MAD_F(0x044c7aec) /* 0.268671918 */, 19 }, /* 7272 */ { MAD_F(0x044cae96) /* 0.268721187 */, 19 }, /* 7273 */ { MAD_F(0x044ce240) /* 0.268770459 */, 19 }, /* 7274 */ { MAD_F(0x044d15eb) /* 0.268819733 */, 19 }, /* 7275 */ { MAD_F(0x044d4997) /* 0.268869009 */, 19 }, /* 7276 */ { MAD_F(0x044d7d43) /* 0.268918287 */, 19 }, /* 7277 */ { MAD_F(0x044db0ef) /* 0.268967568 */, 19 }, /* 7278 */ { MAD_F(0x044de49d) /* 0.269016851 */, 19 }, /* 7279 */ { MAD_F(0x044e184b) /* 0.269066136 */, 19 }, /* 7280 */ { MAD_F(0x044e4bf9) /* 0.269115423 */, 19 }, /* 7281 */ { MAD_F(0x044e7fa8) /* 0.269164713 */, 19 }, /* 7282 */ { MAD_F(0x044eb358) /* 0.269214005 */, 19 }, /* 7283 */ { MAD_F(0x044ee708) /* 0.269263299 */, 19 }, /* 7284 */ { MAD_F(0x044f1ab9) /* 0.269312595 */, 19 }, /* 7285 */ { MAD_F(0x044f4e6b) /* 0.269361894 */, 19 }, /* 7286 */ { MAD_F(0x044f821d) /* 0.269411195 */, 19 }, /* 7287 */ { MAD_F(0x044fb5cf) /* 0.269460498 */, 19 }, /* 7288 */ { MAD_F(0x044fe983) /* 0.269509804 */, 19 }, /* 7289 */ { MAD_F(0x04501d37) /* 0.269559111 */, 19 }, /* 7290 */ { MAD_F(0x045050eb) /* 0.269608421 */, 19 }, /* 7291 */ { MAD_F(0x045084a0) /* 0.269657734 */, 19 }, /* 7292 */ { MAD_F(0x0450b856) /* 0.269707048 */, 19 }, /* 7293 */ { MAD_F(0x0450ec0d) /* 0.269756365 */, 19 }, /* 7294 */ { MAD_F(0x04511fc4) /* 0.269805684 */, 19 }, /* 7295 */ { MAD_F(0x0451537b) /* 0.269855005 */, 19 }, /* 7296 */ { MAD_F(0x04518733) /* 0.269904329 */, 19 }, /* 7297 */ { MAD_F(0x0451baec) /* 0.269953654 */, 19 }, /* 7298 */ { MAD_F(0x0451eea5) /* 0.270002982 */, 19 }, /* 7299 */ { MAD_F(0x0452225f) /* 0.270052313 */, 19 }, /* 7300 */ { MAD_F(0x0452561a) /* 0.270101645 */, 19 }, /* 7301 */ { MAD_F(0x045289d5) /* 0.270150980 */, 19 }, /* 7302 */ { MAD_F(0x0452bd91) /* 0.270200317 */, 19 }, /* 7303 */ { MAD_F(0x0452f14d) /* 0.270249656 */, 19 }, /* 7304 */ { MAD_F(0x0453250a) /* 0.270298998 */, 19 }, /* 7305 */ { MAD_F(0x045358c8) /* 0.270348341 */, 19 }, /* 7306 */ { MAD_F(0x04538c86) /* 0.270397687 */, 19 }, /* 7307 */ { MAD_F(0x0453c045) /* 0.270447036 */, 19 }, /* 7308 */ { MAD_F(0x0453f405) /* 0.270496386 */, 19 }, /* 7309 */ { MAD_F(0x045427c5) /* 0.270545739 */, 19 }, /* 7310 */ { MAD_F(0x04545b85) /* 0.270595094 */, 19 }, /* 7311 */ { MAD_F(0x04548f46) /* 0.270644451 */, 19 }, /* 7312 */ { MAD_F(0x0454c308) /* 0.270693811 */, 19 }, /* 7313 */ { MAD_F(0x0454f6cb) /* 0.270743173 */, 19 }, /* 7314 */ { MAD_F(0x04552a8e) /* 0.270792537 */, 19 }, /* 7315 */ { MAD_F(0x04555e51) /* 0.270841903 */, 19 }, /* 7316 */ { MAD_F(0x04559216) /* 0.270891271 */, 19 }, /* 7317 */ { MAD_F(0x0455c5db) /* 0.270940642 */, 19 }, /* 7318 */ { MAD_F(0x0455f9a0) /* 0.270990015 */, 19 }, /* 7319 */ { MAD_F(0x04562d66) /* 0.271039390 */, 19 }, /* 7320 */ { MAD_F(0x0456612d) /* 0.271088768 */, 19 }, /* 7321 */ { MAD_F(0x045694f4) /* 0.271138148 */, 19 }, /* 7322 */ { MAD_F(0x0456c8bc) /* 0.271187530 */, 19 }, /* 7323 */ { MAD_F(0x0456fc84) /* 0.271236914 */, 19 }, /* 7324 */ { MAD_F(0x0457304e) /* 0.271286301 */, 19 }, /* 7325 */ { MAD_F(0x04576417) /* 0.271335689 */, 19 }, /* 7326 */ { MAD_F(0x045797e2) /* 0.271385080 */, 19 }, /* 7327 */ { MAD_F(0x0457cbac) /* 0.271434474 */, 19 }, /* 7328 */ { MAD_F(0x0457ff78) /* 0.271483869 */, 19 }, /* 7329 */ { MAD_F(0x04583344) /* 0.271533267 */, 19 }, /* 7330 */ { MAD_F(0x04586711) /* 0.271582667 */, 19 }, /* 7331 */ { MAD_F(0x04589ade) /* 0.271632069 */, 19 }, /* 7332 */ { MAD_F(0x0458ceac) /* 0.271681474 */, 19 }, /* 7333 */ { MAD_F(0x0459027b) /* 0.271730880 */, 19 }, /* 7334 */ { MAD_F(0x0459364a) /* 0.271780289 */, 19 }, /* 7335 */ { MAD_F(0x04596a19) /* 0.271829701 */, 19 }, /* 7336 */ { MAD_F(0x04599dea) /* 0.271879114 */, 19 }, /* 7337 */ { MAD_F(0x0459d1bb) /* 0.271928530 */, 19 }, /* 7338 */ { MAD_F(0x045a058c) /* 0.271977948 */, 19 }, /* 7339 */ { MAD_F(0x045a395e) /* 0.272027368 */, 19 }, /* 7340 */ { MAD_F(0x045a6d31) /* 0.272076790 */, 19 }, /* 7341 */ { MAD_F(0x045aa104) /* 0.272126215 */, 19 }, /* 7342 */ { MAD_F(0x045ad4d8) /* 0.272175642 */, 19 }, /* 7343 */ { MAD_F(0x045b08ad) /* 0.272225071 */, 19 }, /* 7344 */ { MAD_F(0x045b3c82) /* 0.272274503 */, 19 }, /* 7345 */ { MAD_F(0x045b7058) /* 0.272323936 */, 19 }, /* 7346 */ { MAD_F(0x045ba42e) /* 0.272373372 */, 19 }, /* 7347 */ { MAD_F(0x045bd805) /* 0.272422810 */, 19 }, /* 7348 */ { MAD_F(0x045c0bdd) /* 0.272472251 */, 19 }, /* 7349 */ { MAD_F(0x045c3fb5) /* 0.272521693 */, 19 }, /* 7350 */ { MAD_F(0x045c738e) /* 0.272571138 */, 19 }, /* 7351 */ { MAD_F(0x045ca767) /* 0.272620585 */, 19 }, /* 7352 */ { MAD_F(0x045cdb41) /* 0.272670035 */, 19 }, /* 7353 */ { MAD_F(0x045d0f1b) /* 0.272719486 */, 19 }, /* 7354 */ { MAD_F(0x045d42f7) /* 0.272768940 */, 19 }, /* 7355 */ { MAD_F(0x045d76d2) /* 0.272818396 */, 19 }, /* 7356 */ { MAD_F(0x045daaaf) /* 0.272867855 */, 19 }, /* 7357 */ { MAD_F(0x045dde8c) /* 0.272917315 */, 19 }, /* 7358 */ { MAD_F(0x045e1269) /* 0.272966778 */, 19 }, /* 7359 */ { MAD_F(0x045e4647) /* 0.273016243 */, 19 }, /* 7360 */ { MAD_F(0x045e7a26) /* 0.273065710 */, 19 }, /* 7361 */ { MAD_F(0x045eae06) /* 0.273115180 */, 19 }, /* 7362 */ { MAD_F(0x045ee1e6) /* 0.273164652 */, 19 }, /* 7363 */ { MAD_F(0x045f15c6) /* 0.273214126 */, 19 }, /* 7364 */ { MAD_F(0x045f49a7) /* 0.273263602 */, 19 }, /* 7365 */ { MAD_F(0x045f7d89) /* 0.273313081 */, 19 }, /* 7366 */ { MAD_F(0x045fb16c) /* 0.273362561 */, 19 }, /* 7367 */ { MAD_F(0x045fe54f) /* 0.273412044 */, 19 }, /* 7368 */ { MAD_F(0x04601932) /* 0.273461530 */, 19 }, /* 7369 */ { MAD_F(0x04604d16) /* 0.273511017 */, 19 }, /* 7370 */ { MAD_F(0x046080fb) /* 0.273560507 */, 19 }, /* 7371 */ { MAD_F(0x0460b4e1) /* 0.273609999 */, 19 }, /* 7372 */ { MAD_F(0x0460e8c7) /* 0.273659493 */, 19 }, /* 7373 */ { MAD_F(0x04611cad) /* 0.273708989 */, 19 }, /* 7374 */ { MAD_F(0x04615094) /* 0.273758488 */, 19 }, /* 7375 */ { MAD_F(0x0461847c) /* 0.273807989 */, 19 }, /* 7376 */ { MAD_F(0x0461b864) /* 0.273857492 */, 19 }, /* 7377 */ { MAD_F(0x0461ec4d) /* 0.273906997 */, 19 }, /* 7378 */ { MAD_F(0x04622037) /* 0.273956505 */, 19 }, /* 7379 */ { MAD_F(0x04625421) /* 0.274006015 */, 19 }, /* 7380 */ { MAD_F(0x0462880c) /* 0.274055527 */, 19 }, /* 7381 */ { MAD_F(0x0462bbf7) /* 0.274105041 */, 19 }, /* 7382 */ { MAD_F(0x0462efe3) /* 0.274154558 */, 19 }, /* 7383 */ { MAD_F(0x046323d0) /* 0.274204076 */, 19 }, /* 7384 */ { MAD_F(0x046357bd) /* 0.274253597 */, 19 }, /* 7385 */ { MAD_F(0x04638bab) /* 0.274303121 */, 19 }, /* 7386 */ { MAD_F(0x0463bf99) /* 0.274352646 */, 19 }, /* 7387 */ { MAD_F(0x0463f388) /* 0.274402174 */, 19 }, /* 7388 */ { MAD_F(0x04642778) /* 0.274451704 */, 19 }, /* 7389 */ { MAD_F(0x04645b68) /* 0.274501236 */, 19 }, /* 7390 */ { MAD_F(0x04648f59) /* 0.274550771 */, 19 }, /* 7391 */ { MAD_F(0x0464c34a) /* 0.274600307 */, 19 }, /* 7392 */ { MAD_F(0x0464f73c) /* 0.274649846 */, 19 }, /* 7393 */ { MAD_F(0x04652b2f) /* 0.274699387 */, 19 }, /* 7394 */ { MAD_F(0x04655f22) /* 0.274748931 */, 19 }, /* 7395 */ { MAD_F(0x04659316) /* 0.274798476 */, 19 }, /* 7396 */ { MAD_F(0x0465c70a) /* 0.274848024 */, 19 }, /* 7397 */ { MAD_F(0x0465faff) /* 0.274897574 */, 19 }, /* 7398 */ { MAD_F(0x04662ef5) /* 0.274947126 */, 19 }, /* 7399 */ { MAD_F(0x046662eb) /* 0.274996681 */, 19 }, /* 7400 */ { MAD_F(0x046696e2) /* 0.275046238 */, 19 }, /* 7401 */ { MAD_F(0x0466cad9) /* 0.275095797 */, 19 }, /* 7402 */ { MAD_F(0x0466fed1) /* 0.275145358 */, 19 }, /* 7403 */ { MAD_F(0x046732ca) /* 0.275194921 */, 19 }, /* 7404 */ { MAD_F(0x046766c3) /* 0.275244487 */, 19 }, /* 7405 */ { MAD_F(0x04679abd) /* 0.275294055 */, 19 }, /* 7406 */ { MAD_F(0x0467ceb7) /* 0.275343625 */, 19 }, /* 7407 */ { MAD_F(0x046802b2) /* 0.275393198 */, 19 }, /* 7408 */ { MAD_F(0x046836ae) /* 0.275442772 */, 19 }, /* 7409 */ { MAD_F(0x04686aaa) /* 0.275492349 */, 19 }, /* 7410 */ { MAD_F(0x04689ea7) /* 0.275541928 */, 19 }, /* 7411 */ { MAD_F(0x0468d2a4) /* 0.275591509 */, 19 }, /* 7412 */ { MAD_F(0x046906a2) /* 0.275641093 */, 19 }, /* 7413 */ { MAD_F(0x04693aa1) /* 0.275690679 */, 19 }, /* 7414 */ { MAD_F(0x04696ea0) /* 0.275740267 */, 19 }, /* 7415 */ { MAD_F(0x0469a2a0) /* 0.275789857 */, 19 }, /* 7416 */ { MAD_F(0x0469d6a0) /* 0.275839449 */, 19 }, /* 7417 */ { MAD_F(0x046a0aa1) /* 0.275889044 */, 19 }, /* 7418 */ { MAD_F(0x046a3ea3) /* 0.275938641 */, 19 }, /* 7419 */ { MAD_F(0x046a72a5) /* 0.275988240 */, 19 }, /* 7420 */ { MAD_F(0x046aa6a8) /* 0.276037842 */, 19 }, /* 7421 */ { MAD_F(0x046adaab) /* 0.276087445 */, 19 }, /* 7422 */ { MAD_F(0x046b0eaf) /* 0.276137051 */, 19 }, /* 7423 */ { MAD_F(0x046b42b3) /* 0.276186659 */, 19 }, /* 7424 */ { MAD_F(0x046b76b9) /* 0.276236269 */, 19 }, /* 7425 */ { MAD_F(0x046baabe) /* 0.276285882 */, 19 }, /* 7426 */ { MAD_F(0x046bdec5) /* 0.276335497 */, 19 }, /* 7427 */ { MAD_F(0x046c12cc) /* 0.276385113 */, 19 }, /* 7428 */ { MAD_F(0x046c46d3) /* 0.276434733 */, 19 }, /* 7429 */ { MAD_F(0x046c7adb) /* 0.276484354 */, 19 }, /* 7430 */ { MAD_F(0x046caee4) /* 0.276533978 */, 19 }, /* 7431 */ { MAD_F(0x046ce2ee) /* 0.276583604 */, 19 }, /* 7432 */ { MAD_F(0x046d16f7) /* 0.276633232 */, 19 }, /* 7433 */ { MAD_F(0x046d4b02) /* 0.276682862 */, 19 }, /* 7434 */ { MAD_F(0x046d7f0d) /* 0.276732495 */, 19 }, /* 7435 */ { MAD_F(0x046db319) /* 0.276782129 */, 19 }, /* 7436 */ { MAD_F(0x046de725) /* 0.276831766 */, 19 }, /* 7437 */ { MAD_F(0x046e1b32) /* 0.276881406 */, 19 }, /* 7438 */ { MAD_F(0x046e4f40) /* 0.276931047 */, 19 }, /* 7439 */ { MAD_F(0x046e834e) /* 0.276980691 */, 19 }, /* 7440 */ { MAD_F(0x046eb75c) /* 0.277030337 */, 19 }, /* 7441 */ { MAD_F(0x046eeb6c) /* 0.277079985 */, 19 }, /* 7442 */ { MAD_F(0x046f1f7c) /* 0.277129635 */, 19 }, /* 7443 */ { MAD_F(0x046f538c) /* 0.277179288 */, 19 }, /* 7444 */ { MAD_F(0x046f879d) /* 0.277228942 */, 19 }, /* 7445 */ { MAD_F(0x046fbbaf) /* 0.277278600 */, 19 }, /* 7446 */ { MAD_F(0x046fefc1) /* 0.277328259 */, 19 }, /* 7447 */ { MAD_F(0x047023d4) /* 0.277377920 */, 19 }, /* 7448 */ { MAD_F(0x047057e8) /* 0.277427584 */, 19 }, /* 7449 */ { MAD_F(0x04708bfc) /* 0.277477250 */, 19 }, /* 7450 */ { MAD_F(0x0470c011) /* 0.277526918 */, 19 }, /* 7451 */ { MAD_F(0x0470f426) /* 0.277576588 */, 19 }, /* 7452 */ { MAD_F(0x0471283c) /* 0.277626261 */, 19 }, /* 7453 */ { MAD_F(0x04715c52) /* 0.277675936 */, 19 }, /* 7454 */ { MAD_F(0x04719069) /* 0.277725613 */, 19 }, /* 7455 */ { MAD_F(0x0471c481) /* 0.277775292 */, 19 }, /* 7456 */ { MAD_F(0x0471f899) /* 0.277824973 */, 19 }, /* 7457 */ { MAD_F(0x04722cb2) /* 0.277874657 */, 19 }, /* 7458 */ { MAD_F(0x047260cc) /* 0.277924343 */, 19 }, /* 7459 */ { MAD_F(0x047294e6) /* 0.277974031 */, 19 }, /* 7460 */ { MAD_F(0x0472c900) /* 0.278023722 */, 19 }, /* 7461 */ { MAD_F(0x0472fd1b) /* 0.278073414 */, 19 }, /* 7462 */ { MAD_F(0x04733137) /* 0.278123109 */, 19 }, /* 7463 */ { MAD_F(0x04736554) /* 0.278172806 */, 19 }, /* 7464 */ { MAD_F(0x04739971) /* 0.278222505 */, 19 }, /* 7465 */ { MAD_F(0x0473cd8e) /* 0.278272207 */, 19 }, /* 7466 */ { MAD_F(0x047401ad) /* 0.278321910 */, 19 }, /* 7467 */ { MAD_F(0x047435cb) /* 0.278371616 */, 19 }, /* 7468 */ { MAD_F(0x047469eb) /* 0.278421324 */, 19 }, /* 7469 */ { MAD_F(0x04749e0b) /* 0.278471035 */, 19 }, /* 7470 */ { MAD_F(0x0474d22c) /* 0.278520747 */, 19 }, /* 7471 */ { MAD_F(0x0475064d) /* 0.278570462 */, 19 }, /* 7472 */ { MAD_F(0x04753a6f) /* 0.278620179 */, 19 }, /* 7473 */ { MAD_F(0x04756e91) /* 0.278669898 */, 19 }, /* 7474 */ { MAD_F(0x0475a2b4) /* 0.278719619 */, 19 }, /* 7475 */ { MAD_F(0x0475d6d7) /* 0.278769343 */, 19 }, /* 7476 */ { MAD_F(0x04760afc) /* 0.278819069 */, 19 }, /* 7477 */ { MAD_F(0x04763f20) /* 0.278868797 */, 19 }, /* 7478 */ { MAD_F(0x04767346) /* 0.278918527 */, 19 }, /* 7479 */ { MAD_F(0x0476a76c) /* 0.278968260 */, 19 }, /* 7480 */ { MAD_F(0x0476db92) /* 0.279017995 */, 19 }, /* 7481 */ { MAD_F(0x04770fba) /* 0.279067731 */, 19 }, /* 7482 */ { MAD_F(0x047743e1) /* 0.279117471 */, 19 }, /* 7483 */ { MAD_F(0x0477780a) /* 0.279167212 */, 19 }, /* 7484 */ { MAD_F(0x0477ac33) /* 0.279216956 */, 19 }, /* 7485 */ { MAD_F(0x0477e05c) /* 0.279266701 */, 19 }, /* 7486 */ { MAD_F(0x04781486) /* 0.279316449 */, 19 }, /* 7487 */ { MAD_F(0x047848b1) /* 0.279366200 */, 19 }, /* 7488 */ { MAD_F(0x04787cdc) /* 0.279415952 */, 19 }, /* 7489 */ { MAD_F(0x0478b108) /* 0.279465707 */, 19 }, /* 7490 */ { MAD_F(0x0478e535) /* 0.279515464 */, 19 }, /* 7491 */ { MAD_F(0x04791962) /* 0.279565223 */, 19 }, /* 7492 */ { MAD_F(0x04794d8f) /* 0.279614984 */, 19 }, /* 7493 */ { MAD_F(0x047981be) /* 0.279664748 */, 19 }, /* 7494 */ { MAD_F(0x0479b5ed) /* 0.279714513 */, 19 }, /* 7495 */ { MAD_F(0x0479ea1c) /* 0.279764281 */, 19 }, /* 7496 */ { MAD_F(0x047a1e4c) /* 0.279814051 */, 19 }, /* 7497 */ { MAD_F(0x047a527d) /* 0.279863824 */, 19 }, /* 7498 */ { MAD_F(0x047a86ae) /* 0.279913598 */, 19 }, /* 7499 */ { MAD_F(0x047abae0) /* 0.279963375 */, 19 }, /* 7500 */ { MAD_F(0x047aef12) /* 0.280013154 */, 19 }, /* 7501 */ { MAD_F(0x047b2346) /* 0.280062935 */, 19 }, /* 7502 */ { MAD_F(0x047b5779) /* 0.280112719 */, 19 }, /* 7503 */ { MAD_F(0x047b8bad) /* 0.280162504 */, 19 }, /* 7504 */ { MAD_F(0x047bbfe2) /* 0.280212292 */, 19 }, /* 7505 */ { MAD_F(0x047bf418) /* 0.280262082 */, 19 }, /* 7506 */ { MAD_F(0x047c284e) /* 0.280311875 */, 19 }, /* 7507 */ { MAD_F(0x047c5c84) /* 0.280361669 */, 19 }, /* 7508 */ { MAD_F(0x047c90bb) /* 0.280411466 */, 19 }, /* 7509 */ { MAD_F(0x047cc4f3) /* 0.280461265 */, 19 }, /* 7510 */ { MAD_F(0x047cf92c) /* 0.280511066 */, 19 }, /* 7511 */ { MAD_F(0x047d2d65) /* 0.280560869 */, 19 }, /* 7512 */ { MAD_F(0x047d619e) /* 0.280610675 */, 19 }, /* 7513 */ { MAD_F(0x047d95d8) /* 0.280660483 */, 19 }, /* 7514 */ { MAD_F(0x047dca13) /* 0.280710292 */, 19 }, /* 7515 */ { MAD_F(0x047dfe4e) /* 0.280760105 */, 19 }, /* 7516 */ { MAD_F(0x047e328a) /* 0.280809919 */, 19 }, /* 7517 */ { MAD_F(0x047e66c7) /* 0.280859736 */, 19 }, /* 7518 */ { MAD_F(0x047e9b04) /* 0.280909554 */, 19 }, /* 7519 */ { MAD_F(0x047ecf42) /* 0.280959375 */, 19 }, /* 7520 */ { MAD_F(0x047f0380) /* 0.281009199 */, 19 }, /* 7521 */ { MAD_F(0x047f37bf) /* 0.281059024 */, 19 }, /* 7522 */ { MAD_F(0x047f6bff) /* 0.281108852 */, 19 }, /* 7523 */ { MAD_F(0x047fa03f) /* 0.281158682 */, 19 }, /* 7524 */ { MAD_F(0x047fd47f) /* 0.281208514 */, 19 }, /* 7525 */ { MAD_F(0x048008c1) /* 0.281258348 */, 19 }, /* 7526 */ { MAD_F(0x04803d02) /* 0.281308184 */, 19 }, /* 7527 */ { MAD_F(0x04807145) /* 0.281358023 */, 19 }, /* 7528 */ { MAD_F(0x0480a588) /* 0.281407864 */, 19 }, /* 7529 */ { MAD_F(0x0480d9cc) /* 0.281457707 */, 19 }, /* 7530 */ { MAD_F(0x04810e10) /* 0.281507552 */, 19 }, /* 7531 */ { MAD_F(0x04814255) /* 0.281557400 */, 19 }, /* 7532 */ { MAD_F(0x0481769a) /* 0.281607250 */, 19 }, /* 7533 */ { MAD_F(0x0481aae0) /* 0.281657101 */, 19 }, /* 7534 */ { MAD_F(0x0481df27) /* 0.281706956 */, 19 }, /* 7535 */ { MAD_F(0x0482136e) /* 0.281756812 */, 19 }, /* 7536 */ { MAD_F(0x048247b6) /* 0.281806670 */, 19 }, /* 7537 */ { MAD_F(0x04827bfe) /* 0.281856531 */, 19 }, /* 7538 */ { MAD_F(0x0482b047) /* 0.281906394 */, 19 }, /* 7539 */ { MAD_F(0x0482e491) /* 0.281956259 */, 19 }, /* 7540 */ { MAD_F(0x048318db) /* 0.282006127 */, 19 }, /* 7541 */ { MAD_F(0x04834d26) /* 0.282055996 */, 19 }, /* 7542 */ { MAD_F(0x04838171) /* 0.282105868 */, 19 }, /* 7543 */ { MAD_F(0x0483b5bd) /* 0.282155742 */, 19 }, /* 7544 */ { MAD_F(0x0483ea0a) /* 0.282205618 */, 19 }, /* 7545 */ { MAD_F(0x04841e57) /* 0.282255496 */, 19 }, /* 7546 */ { MAD_F(0x048452a4) /* 0.282305377 */, 19 }, /* 7547 */ { MAD_F(0x048486f3) /* 0.282355260 */, 19 }, /* 7548 */ { MAD_F(0x0484bb42) /* 0.282405145 */, 19 }, /* 7549 */ { MAD_F(0x0484ef91) /* 0.282455032 */, 19 }, /* 7550 */ { MAD_F(0x048523e1) /* 0.282504921 */, 19 }, /* 7551 */ { MAD_F(0x04855832) /* 0.282554813 */, 19 }, /* 7552 */ { MAD_F(0x04858c83) /* 0.282604707 */, 19 }, /* 7553 */ { MAD_F(0x0485c0d5) /* 0.282654603 */, 19 }, /* 7554 */ { MAD_F(0x0485f527) /* 0.282704501 */, 19 }, /* 7555 */ { MAD_F(0x0486297a) /* 0.282754401 */, 19 }, /* 7556 */ { MAD_F(0x04865dce) /* 0.282804304 */, 19 }, /* 7557 */ { MAD_F(0x04869222) /* 0.282854209 */, 19 }, /* 7558 */ { MAD_F(0x0486c677) /* 0.282904116 */, 19 }, /* 7559 */ { MAD_F(0x0486facc) /* 0.282954025 */, 19 }, /* 7560 */ { MAD_F(0x04872f22) /* 0.283003936 */, 19 }, /* 7561 */ { MAD_F(0x04876379) /* 0.283053850 */, 19 }, /* 7562 */ { MAD_F(0x048797d0) /* 0.283103766 */, 19 }, /* 7563 */ { MAD_F(0x0487cc28) /* 0.283153684 */, 19 }, /* 7564 */ { MAD_F(0x04880080) /* 0.283203604 */, 19 }, /* 7565 */ { MAD_F(0x048834d9) /* 0.283253527 */, 19 }, /* 7566 */ { MAD_F(0x04886933) /* 0.283303451 */, 19 }, /* 7567 */ { MAD_F(0x04889d8d) /* 0.283353378 */, 19 }, /* 7568 */ { MAD_F(0x0488d1e8) /* 0.283403307 */, 19 }, /* 7569 */ { MAD_F(0x04890643) /* 0.283453238 */, 19 }, /* 7570 */ { MAD_F(0x04893a9f) /* 0.283503172 */, 19 }, /* 7571 */ { MAD_F(0x04896efb) /* 0.283553107 */, 19 }, /* 7572 */ { MAD_F(0x0489a358) /* 0.283603045 */, 19 }, /* 7573 */ { MAD_F(0x0489d7b6) /* 0.283652985 */, 19 }, /* 7574 */ { MAD_F(0x048a0c14) /* 0.283702927 */, 19 }, /* 7575 */ { MAD_F(0x048a4073) /* 0.283752872 */, 19 }, /* 7576 */ { MAD_F(0x048a74d3) /* 0.283802818 */, 19 }, /* 7577 */ { MAD_F(0x048aa933) /* 0.283852767 */, 19 }, /* 7578 */ { MAD_F(0x048add93) /* 0.283902718 */, 19 }, /* 7579 */ { MAD_F(0x048b11f5) /* 0.283952671 */, 19 }, /* 7580 */ { MAD_F(0x048b4656) /* 0.284002627 */, 19 }, /* 7581 */ { MAD_F(0x048b7ab9) /* 0.284052584 */, 19 }, /* 7582 */ { MAD_F(0x048baf1c) /* 0.284102544 */, 19 }, /* 7583 */ { MAD_F(0x048be37f) /* 0.284152506 */, 19 }, /* 7584 */ { MAD_F(0x048c17e3) /* 0.284202470 */, 19 }, /* 7585 */ { MAD_F(0x048c4c48) /* 0.284252436 */, 19 }, /* 7586 */ { MAD_F(0x048c80ad) /* 0.284302405 */, 19 }, /* 7587 */ { MAD_F(0x048cb513) /* 0.284352376 */, 19 }, /* 7588 */ { MAD_F(0x048ce97a) /* 0.284402349 */, 19 }, /* 7589 */ { MAD_F(0x048d1de1) /* 0.284452324 */, 19 }, /* 7590 */ { MAD_F(0x048d5249) /* 0.284502301 */, 19 }, /* 7591 */ { MAD_F(0x048d86b1) /* 0.284552281 */, 19 }, /* 7592 */ { MAD_F(0x048dbb1a) /* 0.284602263 */, 19 }, /* 7593 */ { MAD_F(0x048def83) /* 0.284652246 */, 19 }, /* 7594 */ { MAD_F(0x048e23ed) /* 0.284702233 */, 19 }, /* 7595 */ { MAD_F(0x048e5858) /* 0.284752221 */, 19 }, /* 7596 */ { MAD_F(0x048e8cc3) /* 0.284802211 */, 19 }, /* 7597 */ { MAD_F(0x048ec12f) /* 0.284852204 */, 19 }, /* 7598 */ { MAD_F(0x048ef59b) /* 0.284902199 */, 19 }, /* 7599 */ { MAD_F(0x048f2a08) /* 0.284952196 */, 19 }, /* 7600 */ { MAD_F(0x048f5e76) /* 0.285002195 */, 19 }, /* 7601 */ { MAD_F(0x048f92e4) /* 0.285052197 */, 19 }, /* 7602 */ { MAD_F(0x048fc753) /* 0.285102201 */, 19 }, /* 7603 */ { MAD_F(0x048ffbc2) /* 0.285152206 */, 19 }, /* 7604 */ { MAD_F(0x04903032) /* 0.285202214 */, 19 }, /* 7605 */ { MAD_F(0x049064a3) /* 0.285252225 */, 19 }, /* 7606 */ { MAD_F(0x04909914) /* 0.285302237 */, 19 }, /* 7607 */ { MAD_F(0x0490cd86) /* 0.285352252 */, 19 }, /* 7608 */ { MAD_F(0x049101f8) /* 0.285402269 */, 19 }, /* 7609 */ { MAD_F(0x0491366b) /* 0.285452288 */, 19 }, /* 7610 */ { MAD_F(0x04916ade) /* 0.285502309 */, 19 }, /* 7611 */ { MAD_F(0x04919f52) /* 0.285552332 */, 19 }, /* 7612 */ { MAD_F(0x0491d3c7) /* 0.285602358 */, 19 }, /* 7613 */ { MAD_F(0x0492083c) /* 0.285652386 */, 19 }, /* 7614 */ { MAD_F(0x04923cb2) /* 0.285702416 */, 19 }, /* 7615 */ { MAD_F(0x04927128) /* 0.285752448 */, 19 }, /* 7616 */ { MAD_F(0x0492a59f) /* 0.285802482 */, 19 }, /* 7617 */ { MAD_F(0x0492da17) /* 0.285852519 */, 19 }, /* 7618 */ { MAD_F(0x04930e8f) /* 0.285902557 */, 19 }, /* 7619 */ { MAD_F(0x04934308) /* 0.285952598 */, 19 }, /* 7620 */ { MAD_F(0x04937781) /* 0.286002641 */, 19 }, /* 7621 */ { MAD_F(0x0493abfb) /* 0.286052687 */, 19 }, /* 7622 */ { MAD_F(0x0493e076) /* 0.286102734 */, 19 }, /* 7623 */ { MAD_F(0x049414f1) /* 0.286152784 */, 19 }, /* 7624 */ { MAD_F(0x0494496c) /* 0.286202836 */, 19 }, /* 7625 */ { MAD_F(0x04947de9) /* 0.286252890 */, 19 }, /* 7626 */ { MAD_F(0x0494b266) /* 0.286302946 */, 19 }, /* 7627 */ { MAD_F(0x0494e6e3) /* 0.286353005 */, 19 }, /* 7628 */ { MAD_F(0x04951b61) /* 0.286403065 */, 19 }, /* 7629 */ { MAD_F(0x04954fe0) /* 0.286453128 */, 19 }, /* 7630 */ { MAD_F(0x0495845f) /* 0.286503193 */, 19 }, /* 7631 */ { MAD_F(0x0495b8df) /* 0.286553260 */, 19 }, /* 7632 */ { MAD_F(0x0495ed5f) /* 0.286603329 */, 19 }, /* 7633 */ { MAD_F(0x049621e0) /* 0.286653401 */, 19 }, /* 7634 */ { MAD_F(0x04965662) /* 0.286703475 */, 19 }, /* 7635 */ { MAD_F(0x04968ae4) /* 0.286753551 */, 19 }, /* 7636 */ { MAD_F(0x0496bf67) /* 0.286803629 */, 19 }, /* 7637 */ { MAD_F(0x0496f3ea) /* 0.286853709 */, 19 }, /* 7638 */ { MAD_F(0x0497286e) /* 0.286903792 */, 19 }, /* 7639 */ { MAD_F(0x04975cf2) /* 0.286953876 */, 19 }, /* 7640 */ { MAD_F(0x04979177) /* 0.287003963 */, 19 }, /* 7641 */ { MAD_F(0x0497c5fd) /* 0.287054052 */, 19 }, /* 7642 */ { MAD_F(0x0497fa83) /* 0.287104143 */, 19 }, /* 7643 */ { MAD_F(0x04982f0a) /* 0.287154237 */, 19 }, /* 7644 */ { MAD_F(0x04986392) /* 0.287204332 */, 19 }, /* 7645 */ { MAD_F(0x0498981a) /* 0.287254430 */, 19 }, /* 7646 */ { MAD_F(0x0498cca2) /* 0.287304530 */, 19 }, /* 7647 */ { MAD_F(0x0499012c) /* 0.287354632 */, 19 }, /* 7648 */ { MAD_F(0x049935b5) /* 0.287404737 */, 19 }, /* 7649 */ { MAD_F(0x04996a40) /* 0.287454843 */, 19 }, /* 7650 */ { MAD_F(0x04999ecb) /* 0.287504952 */, 19 }, /* 7651 */ { MAD_F(0x0499d356) /* 0.287555063 */, 19 }, /* 7652 */ { MAD_F(0x049a07e2) /* 0.287605176 */, 19 }, /* 7653 */ { MAD_F(0x049a3c6f) /* 0.287655291 */, 19 }, /* 7654 */ { MAD_F(0x049a70fc) /* 0.287705409 */, 19 }, /* 7655 */ { MAD_F(0x049aa58a) /* 0.287755528 */, 19 }, /* 7656 */ { MAD_F(0x049ada19) /* 0.287805650 */, 19 }, /* 7657 */ { MAD_F(0x049b0ea8) /* 0.287855774 */, 19 }, /* 7658 */ { MAD_F(0x049b4337) /* 0.287905900 */, 19 }, /* 7659 */ { MAD_F(0x049b77c8) /* 0.287956028 */, 19 }, /* 7660 */ { MAD_F(0x049bac58) /* 0.288006159 */, 19 }, /* 7661 */ { MAD_F(0x049be0ea) /* 0.288056292 */, 19 }, /* 7662 */ { MAD_F(0x049c157c) /* 0.288106427 */, 19 }, /* 7663 */ { MAD_F(0x049c4a0e) /* 0.288156564 */, 19 }, /* 7664 */ { MAD_F(0x049c7ea1) /* 0.288206703 */, 19 }, /* 7665 */ { MAD_F(0x049cb335) /* 0.288256844 */, 19 }, /* 7666 */ { MAD_F(0x049ce7ca) /* 0.288306988 */, 19 }, /* 7667 */ { MAD_F(0x049d1c5e) /* 0.288357134 */, 19 }, /* 7668 */ { MAD_F(0x049d50f4) /* 0.288407282 */, 19 }, /* 7669 */ { MAD_F(0x049d858a) /* 0.288457432 */, 19 }, /* 7670 */ { MAD_F(0x049dba21) /* 0.288507584 */, 19 }, /* 7671 */ { MAD_F(0x049deeb8) /* 0.288557739 */, 19 }, /* 7672 */ { MAD_F(0x049e2350) /* 0.288607895 */, 19 }, /* 7673 */ { MAD_F(0x049e57e8) /* 0.288658054 */, 19 }, /* 7674 */ { MAD_F(0x049e8c81) /* 0.288708215 */, 19 }, /* 7675 */ { MAD_F(0x049ec11b) /* 0.288758379 */, 19 }, /* 7676 */ { MAD_F(0x049ef5b5) /* 0.288808544 */, 19 }, /* 7677 */ { MAD_F(0x049f2a50) /* 0.288858712 */, 19 }, /* 7678 */ { MAD_F(0x049f5eeb) /* 0.288908881 */, 19 }, /* 7679 */ { MAD_F(0x049f9387) /* 0.288959053 */, 19 }, /* 7680 */ { MAD_F(0x049fc824) /* 0.289009227 */, 19 }, /* 7681 */ { MAD_F(0x049ffcc1) /* 0.289059404 */, 19 }, /* 7682 */ { MAD_F(0x04a0315e) /* 0.289109582 */, 19 }, /* 7683 */ { MAD_F(0x04a065fd) /* 0.289159763 */, 19 }, /* 7684 */ { MAD_F(0x04a09a9b) /* 0.289209946 */, 19 }, /* 7685 */ { MAD_F(0x04a0cf3b) /* 0.289260131 */, 19 }, /* 7686 */ { MAD_F(0x04a103db) /* 0.289310318 */, 19 }, /* 7687 */ { MAD_F(0x04a1387b) /* 0.289360507 */, 19 }, /* 7688 */ { MAD_F(0x04a16d1d) /* 0.289410699 */, 19 }, /* 7689 */ { MAD_F(0x04a1a1be) /* 0.289460893 */, 19 }, /* 7690 */ { MAD_F(0x04a1d661) /* 0.289511088 */, 19 }, /* 7691 */ { MAD_F(0x04a20b04) /* 0.289561287 */, 19 }, /* 7692 */ { MAD_F(0x04a23fa7) /* 0.289611487 */, 19 }, /* 7693 */ { MAD_F(0x04a2744b) /* 0.289661689 */, 19 }, /* 7694 */ { MAD_F(0x04a2a8f0) /* 0.289711894 */, 19 }, /* 7695 */ { MAD_F(0x04a2dd95) /* 0.289762101 */, 19 }, /* 7696 */ { MAD_F(0x04a3123b) /* 0.289812309 */, 19 }, /* 7697 */ { MAD_F(0x04a346e2) /* 0.289862521 */, 19 }, /* 7698 */ { MAD_F(0x04a37b89) /* 0.289912734 */, 19 }, /* 7699 */ { MAD_F(0x04a3b030) /* 0.289962949 */, 19 }, /* 7700 */ { MAD_F(0x04a3e4d8) /* 0.290013167 */, 19 }, /* 7701 */ { MAD_F(0x04a41981) /* 0.290063387 */, 19 }, /* 7702 */ { MAD_F(0x04a44e2b) /* 0.290113609 */, 19 }, /* 7703 */ { MAD_F(0x04a482d5) /* 0.290163833 */, 19 }, /* 7704 */ { MAD_F(0x04a4b77f) /* 0.290214059 */, 19 }, /* 7705 */ { MAD_F(0x04a4ec2a) /* 0.290264288 */, 19 }, /* 7706 */ { MAD_F(0x04a520d6) /* 0.290314519 */, 19 }, /* 7707 */ { MAD_F(0x04a55582) /* 0.290364751 */, 19 }, /* 7708 */ { MAD_F(0x04a58a2f) /* 0.290414986 */, 19 }, /* 7709 */ { MAD_F(0x04a5bedd) /* 0.290465224 */, 19 }, /* 7710 */ { MAD_F(0x04a5f38b) /* 0.290515463 */, 19 }, /* 7711 */ { MAD_F(0x04a62839) /* 0.290565705 */, 19 }, /* 7712 */ { MAD_F(0x04a65ce8) /* 0.290615948 */, 19 }, /* 7713 */ { MAD_F(0x04a69198) /* 0.290666194 */, 19 }, /* 7714 */ { MAD_F(0x04a6c648) /* 0.290716442 */, 19 }, /* 7715 */ { MAD_F(0x04a6faf9) /* 0.290766692 */, 19 }, /* 7716 */ { MAD_F(0x04a72fab) /* 0.290816945 */, 19 }, /* 7717 */ { MAD_F(0x04a7645d) /* 0.290867199 */, 19 }, /* 7718 */ { MAD_F(0x04a79910) /* 0.290917456 */, 19 }, /* 7719 */ { MAD_F(0x04a7cdc3) /* 0.290967715 */, 19 }, /* 7720 */ { MAD_F(0x04a80277) /* 0.291017976 */, 19 }, /* 7721 */ { MAD_F(0x04a8372b) /* 0.291068239 */, 19 }, /* 7722 */ { MAD_F(0x04a86be0) /* 0.291118505 */, 19 }, /* 7723 */ { MAD_F(0x04a8a096) /* 0.291168772 */, 19 }, /* 7724 */ { MAD_F(0x04a8d54c) /* 0.291219042 */, 19 }, /* 7725 */ { MAD_F(0x04a90a03) /* 0.291269314 */, 19 }, /* 7726 */ { MAD_F(0x04a93eba) /* 0.291319588 */, 19 }, /* 7727 */ { MAD_F(0x04a97372) /* 0.291369865 */, 19 }, /* 7728 */ { MAD_F(0x04a9a82b) /* 0.291420143 */, 19 }, /* 7729 */ { MAD_F(0x04a9dce4) /* 0.291470424 */, 19 }, /* 7730 */ { MAD_F(0x04aa119d) /* 0.291520706 */, 19 }, /* 7731 */ { MAD_F(0x04aa4658) /* 0.291570991 */, 19 }, /* 7732 */ { MAD_F(0x04aa7b13) /* 0.291621278 */, 19 }, /* 7733 */ { MAD_F(0x04aaafce) /* 0.291671568 */, 19 }, /* 7734 */ { MAD_F(0x04aae48a) /* 0.291721859 */, 19 }, /* 7735 */ { MAD_F(0x04ab1947) /* 0.291772153 */, 19 }, /* 7736 */ { MAD_F(0x04ab4e04) /* 0.291822449 */, 19 }, /* 7737 */ { MAD_F(0x04ab82c2) /* 0.291872747 */, 19 }, /* 7738 */ { MAD_F(0x04abb780) /* 0.291923047 */, 19 }, /* 7739 */ { MAD_F(0x04abec3f) /* 0.291973349 */, 19 }, /* 7740 */ { MAD_F(0x04ac20fe) /* 0.292023653 */, 19 }, /* 7741 */ { MAD_F(0x04ac55be) /* 0.292073960 */, 19 }, /* 7742 */ { MAD_F(0x04ac8a7f) /* 0.292124269 */, 19 }, /* 7743 */ { MAD_F(0x04acbf40) /* 0.292174580 */, 19 }, /* 7744 */ { MAD_F(0x04acf402) /* 0.292224893 */, 19 }, /* 7745 */ { MAD_F(0x04ad28c5) /* 0.292275208 */, 19 }, /* 7746 */ { MAD_F(0x04ad5d88) /* 0.292325526 */, 19 }, /* 7747 */ { MAD_F(0x04ad924b) /* 0.292375845 */, 19 }, /* 7748 */ { MAD_F(0x04adc70f) /* 0.292426167 */, 19 }, /* 7749 */ { MAD_F(0x04adfbd4) /* 0.292476491 */, 19 }, /* 7750 */ { MAD_F(0x04ae3099) /* 0.292526817 */, 19 }, /* 7751 */ { MAD_F(0x04ae655f) /* 0.292577145 */, 19 }, /* 7752 */ { MAD_F(0x04ae9a26) /* 0.292627476 */, 19 }, /* 7753 */ { MAD_F(0x04aeceed) /* 0.292677808 */, 19 }, /* 7754 */ { MAD_F(0x04af03b4) /* 0.292728143 */, 19 }, /* 7755 */ { MAD_F(0x04af387d) /* 0.292778480 */, 19 }, /* 7756 */ { MAD_F(0x04af6d45) /* 0.292828819 */, 19 }, /* 7757 */ { MAD_F(0x04afa20f) /* 0.292879160 */, 19 }, /* 7758 */ { MAD_F(0x04afd6d9) /* 0.292929504 */, 19 }, /* 7759 */ { MAD_F(0x04b00ba3) /* 0.292979849 */, 19 }, /* 7760 */ { MAD_F(0x04b0406e) /* 0.293030197 */, 19 }, /* 7761 */ { MAD_F(0x04b0753a) /* 0.293080547 */, 19 }, /* 7762 */ { MAD_F(0x04b0aa06) /* 0.293130899 */, 19 }, /* 7763 */ { MAD_F(0x04b0ded3) /* 0.293181253 */, 19 }, /* 7764 */ { MAD_F(0x04b113a1) /* 0.293231610 */, 19 }, /* 7765 */ { MAD_F(0x04b1486f) /* 0.293281968 */, 19 }, /* 7766 */ { MAD_F(0x04b17d3d) /* 0.293332329 */, 19 }, /* 7767 */ { MAD_F(0x04b1b20c) /* 0.293382692 */, 19 }, /* 7768 */ { MAD_F(0x04b1e6dc) /* 0.293433057 */, 19 }, /* 7769 */ { MAD_F(0x04b21bad) /* 0.293483424 */, 19 }, /* 7770 */ { MAD_F(0x04b2507d) /* 0.293533794 */, 19 }, /* 7771 */ { MAD_F(0x04b2854f) /* 0.293584165 */, 19 }, /* 7772 */ { MAD_F(0x04b2ba21) /* 0.293634539 */, 19 }, /* 7773 */ { MAD_F(0x04b2eef4) /* 0.293684915 */, 19 }, /* 7774 */ { MAD_F(0x04b323c7) /* 0.293735293 */, 19 }, /* 7775 */ { MAD_F(0x04b3589b) /* 0.293785673 */, 19 }, /* 7776 */ { MAD_F(0x04b38d6f) /* 0.293836055 */, 19 }, /* 7777 */ { MAD_F(0x04b3c244) /* 0.293886440 */, 19 }, /* 7778 */ { MAD_F(0x04b3f71a) /* 0.293936826 */, 19 }, /* 7779 */ { MAD_F(0x04b42bf0) /* 0.293987215 */, 19 }, /* 7780 */ { MAD_F(0x04b460c7) /* 0.294037606 */, 19 }, /* 7781 */ { MAD_F(0x04b4959e) /* 0.294087999 */, 19 }, /* 7782 */ { MAD_F(0x04b4ca76) /* 0.294138395 */, 19 }, /* 7783 */ { MAD_F(0x04b4ff4e) /* 0.294188792 */, 19 }, /* 7784 */ { MAD_F(0x04b53427) /* 0.294239192 */, 19 }, /* 7785 */ { MAD_F(0x04b56901) /* 0.294289593 */, 19 }, /* 7786 */ { MAD_F(0x04b59ddb) /* 0.294339997 */, 19 }, /* 7787 */ { MAD_F(0x04b5d2b6) /* 0.294390403 */, 19 }, /* 7788 */ { MAD_F(0x04b60791) /* 0.294440812 */, 19 }, /* 7789 */ { MAD_F(0x04b63c6d) /* 0.294491222 */, 19 }, /* 7790 */ { MAD_F(0x04b6714a) /* 0.294541635 */, 19 }, /* 7791 */ { MAD_F(0x04b6a627) /* 0.294592049 */, 19 }, /* 7792 */ { MAD_F(0x04b6db05) /* 0.294642466 */, 19 }, /* 7793 */ { MAD_F(0x04b70fe3) /* 0.294692885 */, 19 }, /* 7794 */ { MAD_F(0x04b744c2) /* 0.294743306 */, 19 }, /* 7795 */ { MAD_F(0x04b779a1) /* 0.294793730 */, 19 }, /* 7796 */ { MAD_F(0x04b7ae81) /* 0.294844155 */, 19 }, /* 7797 */ { MAD_F(0x04b7e362) /* 0.294894583 */, 19 }, /* 7798 */ { MAD_F(0x04b81843) /* 0.294945013 */, 19 }, /* 7799 */ { MAD_F(0x04b84d24) /* 0.294995445 */, 19 }, /* 7800 */ { MAD_F(0x04b88207) /* 0.295045879 */, 19 }, /* 7801 */ { MAD_F(0x04b8b6ea) /* 0.295096315 */, 19 }, /* 7802 */ { MAD_F(0x04b8ebcd) /* 0.295146753 */, 19 }, /* 7803 */ { MAD_F(0x04b920b1) /* 0.295197194 */, 19 }, /* 7804 */ { MAD_F(0x04b95596) /* 0.295247637 */, 19 }, /* 7805 */ { MAD_F(0x04b98a7b) /* 0.295298082 */, 19 }, /* 7806 */ { MAD_F(0x04b9bf61) /* 0.295348529 */, 19 }, /* 7807 */ { MAD_F(0x04b9f447) /* 0.295398978 */, 19 }, /* 7808 */ { MAD_F(0x04ba292e) /* 0.295449429 */, 19 }, /* 7809 */ { MAD_F(0x04ba5e16) /* 0.295499883 */, 19 }, /* 7810 */ { MAD_F(0x04ba92fe) /* 0.295550338 */, 19 }, /* 7811 */ { MAD_F(0x04bac7e6) /* 0.295600796 */, 19 }, /* 7812 */ { MAD_F(0x04bafcd0) /* 0.295651256 */, 19 }, /* 7813 */ { MAD_F(0x04bb31b9) /* 0.295701718 */, 19 }, /* 7814 */ { MAD_F(0x04bb66a4) /* 0.295752183 */, 19 }, /* 7815 */ { MAD_F(0x04bb9b8f) /* 0.295802649 */, 19 }, /* 7816 */ { MAD_F(0x04bbd07a) /* 0.295853118 */, 19 }, /* 7817 */ { MAD_F(0x04bc0566) /* 0.295903588 */, 19 }, /* 7818 */ { MAD_F(0x04bc3a53) /* 0.295954061 */, 19 }, /* 7819 */ { MAD_F(0x04bc6f40) /* 0.296004536 */, 19 }, /* 7820 */ { MAD_F(0x04bca42e) /* 0.296055013 */, 19 }, /* 7821 */ { MAD_F(0x04bcd91d) /* 0.296105493 */, 19 }, /* 7822 */ { MAD_F(0x04bd0e0c) /* 0.296155974 */, 19 }, /* 7823 */ { MAD_F(0x04bd42fb) /* 0.296206458 */, 19 }, /* 7824 */ { MAD_F(0x04bd77ec) /* 0.296256944 */, 19 }, /* 7825 */ { MAD_F(0x04bdacdc) /* 0.296307432 */, 19 }, /* 7826 */ { MAD_F(0x04bde1ce) /* 0.296357922 */, 19 }, /* 7827 */ { MAD_F(0x04be16c0) /* 0.296408414 */, 19 }, /* 7828 */ { MAD_F(0x04be4bb2) /* 0.296458908 */, 19 }, /* 7829 */ { MAD_F(0x04be80a5) /* 0.296509405 */, 19 }, /* 7830 */ { MAD_F(0x04beb599) /* 0.296559904 */, 19 }, /* 7831 */ { MAD_F(0x04beea8d) /* 0.296610404 */, 19 }, /* 7832 */ { MAD_F(0x04bf1f82) /* 0.296660907 */, 19 }, /* 7833 */ { MAD_F(0x04bf5477) /* 0.296711413 */, 19 }, /* 7834 */ { MAD_F(0x04bf896d) /* 0.296761920 */, 19 }, /* 7835 */ { MAD_F(0x04bfbe64) /* 0.296812429 */, 19 }, /* 7836 */ { MAD_F(0x04bff35b) /* 0.296862941 */, 19 }, /* 7837 */ { MAD_F(0x04c02852) /* 0.296913455 */, 19 }, /* 7838 */ { MAD_F(0x04c05d4b) /* 0.296963971 */, 19 }, /* 7839 */ { MAD_F(0x04c09243) /* 0.297014489 */, 19 }, /* 7840 */ { MAD_F(0x04c0c73d) /* 0.297065009 */, 19 }, /* 7841 */ { MAD_F(0x04c0fc37) /* 0.297115531 */, 19 }, /* 7842 */ { MAD_F(0x04c13131) /* 0.297166056 */, 19 }, /* 7843 */ { MAD_F(0x04c1662d) /* 0.297216582 */, 19 }, /* 7844 */ { MAD_F(0x04c19b28) /* 0.297267111 */, 19 }, /* 7845 */ { MAD_F(0x04c1d025) /* 0.297317642 */, 19 }, /* 7846 */ { MAD_F(0x04c20521) /* 0.297368175 */, 19 }, /* 7847 */ { MAD_F(0x04c23a1f) /* 0.297418710 */, 19 }, /* 7848 */ { MAD_F(0x04c26f1d) /* 0.297469248 */, 19 }, /* 7849 */ { MAD_F(0x04c2a41b) /* 0.297519787 */, 19 }, /* 7850 */ { MAD_F(0x04c2d91b) /* 0.297570329 */, 19 }, /* 7851 */ { MAD_F(0x04c30e1a) /* 0.297620873 */, 19 }, /* 7852 */ { MAD_F(0x04c3431b) /* 0.297671418 */, 19 }, /* 7853 */ { MAD_F(0x04c3781c) /* 0.297721967 */, 19 }, /* 7854 */ { MAD_F(0x04c3ad1d) /* 0.297772517 */, 19 }, /* 7855 */ { MAD_F(0x04c3e21f) /* 0.297823069 */, 19 }, /* 7856 */ { MAD_F(0x04c41722) /* 0.297873624 */, 19 }, /* 7857 */ { MAD_F(0x04c44c25) /* 0.297924180 */, 19 }, /* 7858 */ { MAD_F(0x04c48129) /* 0.297974739 */, 19 }, /* 7859 */ { MAD_F(0x04c4b62d) /* 0.298025300 */, 19 }, /* 7860 */ { MAD_F(0x04c4eb32) /* 0.298075863 */, 19 }, /* 7861 */ { MAD_F(0x04c52038) /* 0.298126429 */, 19 }, /* 7862 */ { MAD_F(0x04c5553e) /* 0.298176996 */, 19 }, /* 7863 */ { MAD_F(0x04c58a44) /* 0.298227565 */, 19 }, /* 7864 */ { MAD_F(0x04c5bf4c) /* 0.298278137 */, 19 }, /* 7865 */ { MAD_F(0x04c5f453) /* 0.298328711 */, 19 }, /* 7866 */ { MAD_F(0x04c6295c) /* 0.298379287 */, 19 }, /* 7867 */ { MAD_F(0x04c65e65) /* 0.298429865 */, 19 }, /* 7868 */ { MAD_F(0x04c6936e) /* 0.298480445 */, 19 }, /* 7869 */ { MAD_F(0x04c6c878) /* 0.298531028 */, 19 }, /* 7870 */ { MAD_F(0x04c6fd83) /* 0.298581612 */, 19 }, /* 7871 */ { MAD_F(0x04c7328e) /* 0.298632199 */, 19 }, /* 7872 */ { MAD_F(0x04c7679a) /* 0.298682788 */, 19 }, /* 7873 */ { MAD_F(0x04c79ca7) /* 0.298733379 */, 19 }, /* 7874 */ { MAD_F(0x04c7d1b4) /* 0.298783972 */, 19 }, /* 7875 */ { MAD_F(0x04c806c1) /* 0.298834567 */, 19 }, /* 7876 */ { MAD_F(0x04c83bcf) /* 0.298885165 */, 19 }, /* 7877 */ { MAD_F(0x04c870de) /* 0.298935764 */, 19 }, /* 7878 */ { MAD_F(0x04c8a5ed) /* 0.298986366 */, 19 }, /* 7879 */ { MAD_F(0x04c8dafd) /* 0.299036970 */, 19 }, /* 7880 */ { MAD_F(0x04c9100d) /* 0.299087576 */, 19 }, /* 7881 */ { MAD_F(0x04c9451e) /* 0.299138184 */, 19 }, /* 7882 */ { MAD_F(0x04c97a30) /* 0.299188794 */, 19 }, /* 7883 */ { MAD_F(0x04c9af42) /* 0.299239406 */, 19 }, /* 7884 */ { MAD_F(0x04c9e455) /* 0.299290021 */, 19 }, /* 7885 */ { MAD_F(0x04ca1968) /* 0.299340638 */, 19 }, /* 7886 */ { MAD_F(0x04ca4e7c) /* 0.299391256 */, 19 }, /* 7887 */ { MAD_F(0x04ca8391) /* 0.299441877 */, 19 }, /* 7888 */ { MAD_F(0x04cab8a6) /* 0.299492500 */, 19 }, /* 7889 */ { MAD_F(0x04caedbb) /* 0.299543126 */, 19 }, /* 7890 */ { MAD_F(0x04cb22d1) /* 0.299593753 */, 19 }, /* 7891 */ { MAD_F(0x04cb57e8) /* 0.299644382 */, 19 }, /* 7892 */ { MAD_F(0x04cb8d00) /* 0.299695014 */, 19 }, /* 7893 */ { MAD_F(0x04cbc217) /* 0.299745648 */, 19 }, /* 7894 */ { MAD_F(0x04cbf730) /* 0.299796284 */, 19 }, /* 7895 */ { MAD_F(0x04cc2c49) /* 0.299846922 */, 19 }, /* 7896 */ { MAD_F(0x04cc6163) /* 0.299897562 */, 19 }, /* 7897 */ { MAD_F(0x04cc967d) /* 0.299948204 */, 19 }, /* 7898 */ { MAD_F(0x04cccb98) /* 0.299998849 */, 19 }, /* 7899 */ { MAD_F(0x04cd00b3) /* 0.300049495 */, 19 }, /* 7900 */ { MAD_F(0x04cd35cf) /* 0.300100144 */, 19 }, /* 7901 */ { MAD_F(0x04cd6aeb) /* 0.300150795 */, 19 }, /* 7902 */ { MAD_F(0x04cda008) /* 0.300201448 */, 19 }, /* 7903 */ { MAD_F(0x04cdd526) /* 0.300252103 */, 19 }, /* 7904 */ { MAD_F(0x04ce0a44) /* 0.300302761 */, 19 }, /* 7905 */ { MAD_F(0x04ce3f63) /* 0.300353420 */, 19 }, /* 7906 */ { MAD_F(0x04ce7482) /* 0.300404082 */, 19 }, /* 7907 */ { MAD_F(0x04cea9a2) /* 0.300454745 */, 19 }, /* 7908 */ { MAD_F(0x04cedec3) /* 0.300505411 */, 19 }, /* 7909 */ { MAD_F(0x04cf13e4) /* 0.300556079 */, 19 }, /* 7910 */ { MAD_F(0x04cf4906) /* 0.300606749 */, 19 }, /* 7911 */ { MAD_F(0x04cf7e28) /* 0.300657421 */, 19 }, /* 7912 */ { MAD_F(0x04cfb34b) /* 0.300708096 */, 19 }, /* 7913 */ { MAD_F(0x04cfe86e) /* 0.300758772 */, 19 }, /* 7914 */ { MAD_F(0x04d01d92) /* 0.300809451 */, 19 }, /* 7915 */ { MAD_F(0x04d052b6) /* 0.300860132 */, 19 }, /* 7916 */ { MAD_F(0x04d087db) /* 0.300910815 */, 19 }, /* 7917 */ { MAD_F(0x04d0bd01) /* 0.300961500 */, 19 }, /* 7918 */ { MAD_F(0x04d0f227) /* 0.301012187 */, 19 }, /* 7919 */ { MAD_F(0x04d1274e) /* 0.301062876 */, 19 }, /* 7920 */ { MAD_F(0x04d15c76) /* 0.301113568 */, 19 }, /* 7921 */ { MAD_F(0x04d1919e) /* 0.301164261 */, 19 }, /* 7922 */ { MAD_F(0x04d1c6c6) /* 0.301214957 */, 19 }, /* 7923 */ { MAD_F(0x04d1fbef) /* 0.301265655 */, 19 }, /* 7924 */ { MAD_F(0x04d23119) /* 0.301316355 */, 19 }, /* 7925 */ { MAD_F(0x04d26643) /* 0.301367057 */, 19 }, /* 7926 */ { MAD_F(0x04d29b6e) /* 0.301417761 */, 19 }, /* 7927 */ { MAD_F(0x04d2d099) /* 0.301468468 */, 19 }, /* 7928 */ { MAD_F(0x04d305c5) /* 0.301519176 */, 19 }, /* 7929 */ { MAD_F(0x04d33af2) /* 0.301569887 */, 19 }, /* 7930 */ { MAD_F(0x04d3701f) /* 0.301620599 */, 19 }, /* 7931 */ { MAD_F(0x04d3a54d) /* 0.301671314 */, 19 }, /* 7932 */ { MAD_F(0x04d3da7b) /* 0.301722031 */, 19 }, /* 7933 */ { MAD_F(0x04d40faa) /* 0.301772751 */, 19 }, /* 7934 */ { MAD_F(0x04d444d9) /* 0.301823472 */, 19 }, /* 7935 */ { MAD_F(0x04d47a09) /* 0.301874195 */, 19 }, /* 7936 */ { MAD_F(0x04d4af3a) /* 0.301924921 */, 19 }, /* 7937 */ { MAD_F(0x04d4e46b) /* 0.301975649 */, 19 }, /* 7938 */ { MAD_F(0x04d5199c) /* 0.302026378 */, 19 }, /* 7939 */ { MAD_F(0x04d54ecf) /* 0.302077110 */, 19 }, /* 7940 */ { MAD_F(0x04d58401) /* 0.302127845 */, 19 }, /* 7941 */ { MAD_F(0x04d5b935) /* 0.302178581 */, 19 }, /* 7942 */ { MAD_F(0x04d5ee69) /* 0.302229319 */, 19 }, /* 7943 */ { MAD_F(0x04d6239d) /* 0.302280060 */, 19 }, /* 7944 */ { MAD_F(0x04d658d2) /* 0.302330802 */, 19 }, /* 7945 */ { MAD_F(0x04d68e08) /* 0.302381547 */, 19 }, /* 7946 */ { MAD_F(0x04d6c33e) /* 0.302432294 */, 19 }, /* 7947 */ { MAD_F(0x04d6f875) /* 0.302483043 */, 19 }, /* 7948 */ { MAD_F(0x04d72dad) /* 0.302533794 */, 19 }, /* 7949 */ { MAD_F(0x04d762e5) /* 0.302584547 */, 19 }, /* 7950 */ { MAD_F(0x04d7981d) /* 0.302635303 */, 19 }, /* 7951 */ { MAD_F(0x04d7cd56) /* 0.302686060 */, 19 }, /* 7952 */ { MAD_F(0x04d80290) /* 0.302736820 */, 19 }, /* 7953 */ { MAD_F(0x04d837ca) /* 0.302787581 */, 19 }, /* 7954 */ { MAD_F(0x04d86d05) /* 0.302838345 */, 19 }, /* 7955 */ { MAD_F(0x04d8a240) /* 0.302889111 */, 19 }, /* 7956 */ { MAD_F(0x04d8d77c) /* 0.302939879 */, 19 }, /* 7957 */ { MAD_F(0x04d90cb9) /* 0.302990650 */, 19 }, /* 7958 */ { MAD_F(0x04d941f6) /* 0.303041422 */, 19 }, /* 7959 */ { MAD_F(0x04d97734) /* 0.303092197 */, 19 }, /* 7960 */ { MAD_F(0x04d9ac72) /* 0.303142973 */, 19 }, /* 7961 */ { MAD_F(0x04d9e1b1) /* 0.303193752 */, 19 }, /* 7962 */ { MAD_F(0x04da16f0) /* 0.303244533 */, 19 }, /* 7963 */ { MAD_F(0x04da4c30) /* 0.303295316 */, 19 }, /* 7964 */ { MAD_F(0x04da8171) /* 0.303346101 */, 19 }, /* 7965 */ { MAD_F(0x04dab6b2) /* 0.303396889 */, 19 }, /* 7966 */ { MAD_F(0x04daebf4) /* 0.303447678 */, 19 }, /* 7967 */ { MAD_F(0x04db2136) /* 0.303498469 */, 19 }, /* 7968 */ { MAD_F(0x04db5679) /* 0.303549263 */, 19 }, /* 7969 */ { MAD_F(0x04db8bbc) /* 0.303600059 */, 19 }, /* 7970 */ { MAD_F(0x04dbc100) /* 0.303650857 */, 19 }, /* 7971 */ { MAD_F(0x04dbf644) /* 0.303701657 */, 19 }, /* 7972 */ { MAD_F(0x04dc2b8a) /* 0.303752459 */, 19 }, /* 7973 */ { MAD_F(0x04dc60cf) /* 0.303803263 */, 19 }, /* 7974 */ { MAD_F(0x04dc9616) /* 0.303854070 */, 19 }, /* 7975 */ { MAD_F(0x04dccb5c) /* 0.303904878 */, 19 }, /* 7976 */ { MAD_F(0x04dd00a4) /* 0.303955689 */, 19 }, /* 7977 */ { MAD_F(0x04dd35ec) /* 0.304006502 */, 19 }, /* 7978 */ { MAD_F(0x04dd6b34) /* 0.304057317 */, 19 }, /* 7979 */ { MAD_F(0x04dda07d) /* 0.304108134 */, 19 }, /* 7980 */ { MAD_F(0x04ddd5c7) /* 0.304158953 */, 19 }, /* 7981 */ { MAD_F(0x04de0b11) /* 0.304209774 */, 19 }, /* 7982 */ { MAD_F(0x04de405c) /* 0.304260597 */, 19 }, /* 7983 */ { MAD_F(0x04de75a7) /* 0.304311423 */, 19 }, /* 7984 */ { MAD_F(0x04deaaf3) /* 0.304362251 */, 19 }, /* 7985 */ { MAD_F(0x04dee040) /* 0.304413080 */, 19 }, /* 7986 */ { MAD_F(0x04df158d) /* 0.304463912 */, 19 }, /* 7987 */ { MAD_F(0x04df4adb) /* 0.304514746 */, 19 }, /* 7988 */ { MAD_F(0x04df8029) /* 0.304565582 */, 19 }, /* 7989 */ { MAD_F(0x04dfb578) /* 0.304616421 */, 19 }, /* 7990 */ { MAD_F(0x04dfeac7) /* 0.304667261 */, 19 }, /* 7991 */ { MAD_F(0x04e02017) /* 0.304718103 */, 19 }, /* 7992 */ { MAD_F(0x04e05567) /* 0.304768948 */, 19 }, /* 7993 */ { MAD_F(0x04e08ab8) /* 0.304819795 */, 19 }, /* 7994 */ { MAD_F(0x04e0c00a) /* 0.304870644 */, 19 }, /* 7995 */ { MAD_F(0x04e0f55c) /* 0.304921495 */, 19 }, /* 7996 */ { MAD_F(0x04e12aaf) /* 0.304972348 */, 19 }, /* 7997 */ { MAD_F(0x04e16002) /* 0.305023203 */, 19 }, /* 7998 */ { MAD_F(0x04e19556) /* 0.305074060 */, 19 }, /* 7999 */ { MAD_F(0x04e1caab) /* 0.305124920 */, 19 }, /* 8000 */ { MAD_F(0x04e20000) /* 0.305175781 */, 19 }, /* 8001 */ { MAD_F(0x04e23555) /* 0.305226645 */, 19 }, /* 8002 */ { MAD_F(0x04e26aac) /* 0.305277511 */, 19 }, /* 8003 */ { MAD_F(0x04e2a002) /* 0.305328379 */, 19 }, /* 8004 */ { MAD_F(0x04e2d55a) /* 0.305379249 */, 19 }, /* 8005 */ { MAD_F(0x04e30ab2) /* 0.305430121 */, 19 }, /* 8006 */ { MAD_F(0x04e3400a) /* 0.305480995 */, 19 }, /* 8007 */ { MAD_F(0x04e37563) /* 0.305531872 */, 19 }, /* 8008 */ { MAD_F(0x04e3aabd) /* 0.305582750 */, 19 }, /* 8009 */ { MAD_F(0x04e3e017) /* 0.305633631 */, 19 }, /* 8010 */ { MAD_F(0x04e41572) /* 0.305684513 */, 19 }, /* 8011 */ { MAD_F(0x04e44acd) /* 0.305735398 */, 19 }, /* 8012 */ { MAD_F(0x04e48029) /* 0.305786285 */, 19 }, /* 8013 */ { MAD_F(0x04e4b585) /* 0.305837174 */, 19 }, /* 8014 */ { MAD_F(0x04e4eae2) /* 0.305888066 */, 19 }, /* 8015 */ { MAD_F(0x04e52040) /* 0.305938959 */, 19 }, /* 8016 */ { MAD_F(0x04e5559e) /* 0.305989854 */, 19 }, /* 8017 */ { MAD_F(0x04e58afd) /* 0.306040752 */, 19 }, /* 8018 */ { MAD_F(0x04e5c05c) /* 0.306091652 */, 19 }, /* 8019 */ { MAD_F(0x04e5f5bc) /* 0.306142554 */, 19 }, /* 8020 */ { MAD_F(0x04e62b1c) /* 0.306193457 */, 19 }, /* 8021 */ { MAD_F(0x04e6607d) /* 0.306244364 */, 19 }, /* 8022 */ { MAD_F(0x04e695df) /* 0.306295272 */, 19 }, /* 8023 */ { MAD_F(0x04e6cb41) /* 0.306346182 */, 19 }, /* 8024 */ { MAD_F(0x04e700a3) /* 0.306397094 */, 19 }, /* 8025 */ { MAD_F(0x04e73607) /* 0.306448009 */, 19 }, /* 8026 */ { MAD_F(0x04e76b6b) /* 0.306498925 */, 19 }, /* 8027 */ { MAD_F(0x04e7a0cf) /* 0.306549844 */, 19 }, /* 8028 */ { MAD_F(0x04e7d634) /* 0.306600765 */, 19 }, /* 8029 */ { MAD_F(0x04e80b99) /* 0.306651688 */, 19 }, /* 8030 */ { MAD_F(0x04e84100) /* 0.306702613 */, 19 }, /* 8031 */ { MAD_F(0x04e87666) /* 0.306753540 */, 19 }, /* 8032 */ { MAD_F(0x04e8abcd) /* 0.306804470 */, 19 }, /* 8033 */ { MAD_F(0x04e8e135) /* 0.306855401 */, 19 }, /* 8034 */ { MAD_F(0x04e9169e) /* 0.306906334 */, 19 }, /* 8035 */ { MAD_F(0x04e94c07) /* 0.306957270 */, 19 }, /* 8036 */ { MAD_F(0x04e98170) /* 0.307008208 */, 19 }, /* 8037 */ { MAD_F(0x04e9b6da) /* 0.307059148 */, 19 }, /* 8038 */ { MAD_F(0x04e9ec45) /* 0.307110090 */, 19 }, /* 8039 */ { MAD_F(0x04ea21b0) /* 0.307161034 */, 19 }, /* 8040 */ { MAD_F(0x04ea571c) /* 0.307211980 */, 19 }, /* 8041 */ { MAD_F(0x04ea8c88) /* 0.307262928 */, 19 }, /* 8042 */ { MAD_F(0x04eac1f5) /* 0.307313879 */, 19 }, /* 8043 */ { MAD_F(0x04eaf762) /* 0.307364831 */, 19 }, /* 8044 */ { MAD_F(0x04eb2cd0) /* 0.307415786 */, 19 }, /* 8045 */ { MAD_F(0x04eb623f) /* 0.307466743 */, 19 }, /* 8046 */ { MAD_F(0x04eb97ae) /* 0.307517702 */, 19 }, /* 8047 */ { MAD_F(0x04ebcd1e) /* 0.307568663 */, 19 }, /* 8048 */ { MAD_F(0x04ec028e) /* 0.307619626 */, 19 }, /* 8049 */ { MAD_F(0x04ec37ff) /* 0.307670591 */, 19 }, /* 8050 */ { MAD_F(0x04ec6d71) /* 0.307721558 */, 19 }, /* 8051 */ { MAD_F(0x04eca2e3) /* 0.307772528 */, 19 }, /* 8052 */ { MAD_F(0x04ecd855) /* 0.307823499 */, 19 }, /* 8053 */ { MAD_F(0x04ed0dc8) /* 0.307874473 */, 19 }, /* 8054 */ { MAD_F(0x04ed433c) /* 0.307925449 */, 19 }, /* 8055 */ { MAD_F(0x04ed78b0) /* 0.307976426 */, 19 }, /* 8056 */ { MAD_F(0x04edae25) /* 0.308027406 */, 19 }, /* 8057 */ { MAD_F(0x04ede39a) /* 0.308078389 */, 19 }, /* 8058 */ { MAD_F(0x04ee1910) /* 0.308129373 */, 19 }, /* 8059 */ { MAD_F(0x04ee4e87) /* 0.308180359 */, 19 }, /* 8060 */ { MAD_F(0x04ee83fe) /* 0.308231347 */, 19 }, /* 8061 */ { MAD_F(0x04eeb976) /* 0.308282338 */, 19 }, /* 8062 */ { MAD_F(0x04eeeeee) /* 0.308333331 */, 19 }, /* 8063 */ { MAD_F(0x04ef2467) /* 0.308384325 */, 19 }, /* 8064 */ { MAD_F(0x04ef59e0) /* 0.308435322 */, 19 }, /* 8065 */ { MAD_F(0x04ef8f5a) /* 0.308486321 */, 19 }, /* 8066 */ { MAD_F(0x04efc4d5) /* 0.308537322 */, 19 }, /* 8067 */ { MAD_F(0x04effa50) /* 0.308588325 */, 19 }, /* 8068 */ { MAD_F(0x04f02fcb) /* 0.308639331 */, 19 }, /* 8069 */ { MAD_F(0x04f06547) /* 0.308690338 */, 19 }, /* 8070 */ { MAD_F(0x04f09ac4) /* 0.308741348 */, 19 }, /* 8071 */ { MAD_F(0x04f0d041) /* 0.308792359 */, 19 }, /* 8072 */ { MAD_F(0x04f105bf) /* 0.308843373 */, 19 }, /* 8073 */ { MAD_F(0x04f13b3e) /* 0.308894389 */, 19 }, /* 8074 */ { MAD_F(0x04f170bd) /* 0.308945407 */, 19 }, /* 8075 */ { MAD_F(0x04f1a63c) /* 0.308996427 */, 19 }, /* 8076 */ { MAD_F(0x04f1dbbd) /* 0.309047449 */, 19 }, /* 8077 */ { MAD_F(0x04f2113d) /* 0.309098473 */, 19 }, /* 8078 */ { MAD_F(0x04f246bf) /* 0.309149499 */, 19 }, /* 8079 */ { MAD_F(0x04f27c40) /* 0.309200528 */, 19 }, /* 8080 */ { MAD_F(0x04f2b1c3) /* 0.309251558 */, 19 }, /* 8081 */ { MAD_F(0x04f2e746) /* 0.309302591 */, 19 }, /* 8082 */ { MAD_F(0x04f31cc9) /* 0.309353626 */, 19 }, /* 8083 */ { MAD_F(0x04f3524d) /* 0.309404663 */, 19 }, /* 8084 */ { MAD_F(0x04f387d2) /* 0.309455702 */, 19 }, /* 8085 */ { MAD_F(0x04f3bd57) /* 0.309506743 */, 19 }, /* 8086 */ { MAD_F(0x04f3f2dd) /* 0.309557786 */, 19 }, /* 8087 */ { MAD_F(0x04f42864) /* 0.309608831 */, 19 }, /* 8088 */ { MAD_F(0x04f45dea) /* 0.309659879 */, 19 }, /* 8089 */ { MAD_F(0x04f49372) /* 0.309710928 */, 19 }, /* 8090 */ { MAD_F(0x04f4c8fa) /* 0.309761980 */, 19 }, /* 8091 */ { MAD_F(0x04f4fe83) /* 0.309813033 */, 19 }, /* 8092 */ { MAD_F(0x04f5340c) /* 0.309864089 */, 19 }, /* 8093 */ { MAD_F(0x04f56996) /* 0.309915147 */, 19 }, /* 8094 */ { MAD_F(0x04f59f20) /* 0.309966207 */, 19 }, /* 8095 */ { MAD_F(0x04f5d4ab) /* 0.310017269 */, 19 }, /* 8096 */ { MAD_F(0x04f60a36) /* 0.310068333 */, 19 }, /* 8097 */ { MAD_F(0x04f63fc2) /* 0.310119400 */, 19 }, /* 8098 */ { MAD_F(0x04f6754f) /* 0.310170468 */, 19 }, /* 8099 */ { MAD_F(0x04f6aadc) /* 0.310221539 */, 19 }, /* 8100 */ { MAD_F(0x04f6e06a) /* 0.310272611 */, 19 }, /* 8101 */ { MAD_F(0x04f715f8) /* 0.310323686 */, 19 }, /* 8102 */ { MAD_F(0x04f74b87) /* 0.310374763 */, 19 }, /* 8103 */ { MAD_F(0x04f78116) /* 0.310425842 */, 19 }, /* 8104 */ { MAD_F(0x04f7b6a6) /* 0.310476923 */, 19 }, /* 8105 */ { MAD_F(0x04f7ec37) /* 0.310528006 */, 19 }, /* 8106 */ { MAD_F(0x04f821c8) /* 0.310579091 */, 19 }, /* 8107 */ { MAD_F(0x04f85759) /* 0.310630179 */, 19 }, /* 8108 */ { MAD_F(0x04f88cec) /* 0.310681268 */, 19 }, /* 8109 */ { MAD_F(0x04f8c27e) /* 0.310732360 */, 19 }, /* 8110 */ { MAD_F(0x04f8f812) /* 0.310783453 */, 19 }, /* 8111 */ { MAD_F(0x04f92da6) /* 0.310834549 */, 19 }, /* 8112 */ { MAD_F(0x04f9633a) /* 0.310885647 */, 19 }, /* 8113 */ { MAD_F(0x04f998cf) /* 0.310936747 */, 19 }, /* 8114 */ { MAD_F(0x04f9ce65) /* 0.310987849 */, 19 }, /* 8115 */ { MAD_F(0x04fa03fb) /* 0.311038953 */, 19 }, /* 8116 */ { MAD_F(0x04fa3992) /* 0.311090059 */, 19 }, /* 8117 */ { MAD_F(0x04fa6f29) /* 0.311141168 */, 19 }, /* 8118 */ { MAD_F(0x04faa4c1) /* 0.311192278 */, 19 }, /* 8119 */ { MAD_F(0x04fada59) /* 0.311243390 */, 19 }, /* 8120 */ { MAD_F(0x04fb0ff2) /* 0.311294505 */, 19 }, /* 8121 */ { MAD_F(0x04fb458c) /* 0.311345622 */, 19 }, /* 8122 */ { MAD_F(0x04fb7b26) /* 0.311396741 */, 19 }, /* 8123 */ { MAD_F(0x04fbb0c1) /* 0.311447862 */, 19 }, /* 8124 */ { MAD_F(0x04fbe65c) /* 0.311498985 */, 19 }, /* 8125 */ { MAD_F(0x04fc1bf8) /* 0.311550110 */, 19 }, /* 8126 */ { MAD_F(0x04fc5194) /* 0.311601237 */, 19 }, /* 8127 */ { MAD_F(0x04fc8731) /* 0.311652366 */, 19 }, /* 8128 */ { MAD_F(0x04fcbcce) /* 0.311703498 */, 19 }, /* 8129 */ { MAD_F(0x04fcf26c) /* 0.311754631 */, 19 }, /* 8130 */ { MAD_F(0x04fd280b) /* 0.311805767 */, 19 }, /* 8131 */ { MAD_F(0x04fd5daa) /* 0.311856905 */, 19 }, /* 8132 */ { MAD_F(0x04fd934a) /* 0.311908044 */, 19 }, /* 8133 */ { MAD_F(0x04fdc8ea) /* 0.311959186 */, 19 }, /* 8134 */ { MAD_F(0x04fdfe8b) /* 0.312010330 */, 19 }, /* 8135 */ { MAD_F(0x04fe342c) /* 0.312061476 */, 19 }, /* 8136 */ { MAD_F(0x04fe69ce) /* 0.312112625 */, 19 }, /* 8137 */ { MAD_F(0x04fe9f71) /* 0.312163775 */, 19 }, /* 8138 */ { MAD_F(0x04fed514) /* 0.312214927 */, 19 }, /* 8139 */ { MAD_F(0x04ff0ab8) /* 0.312266082 */, 19 }, /* 8140 */ { MAD_F(0x04ff405c) /* 0.312317238 */, 19 }, /* 8141 */ { MAD_F(0x04ff7601) /* 0.312368397 */, 19 }, /* 8142 */ { MAD_F(0x04ffaba6) /* 0.312419558 */, 19 }, /* 8143 */ { MAD_F(0x04ffe14c) /* 0.312470720 */, 19 }, /* 8144 */ { MAD_F(0x050016f3) /* 0.312521885 */, 19 }, /* 8145 */ { MAD_F(0x05004c9a) /* 0.312573052 */, 19 }, /* 8146 */ { MAD_F(0x05008241) /* 0.312624222 */, 19 }, /* 8147 */ { MAD_F(0x0500b7e9) /* 0.312675393 */, 19 }, /* 8148 */ { MAD_F(0x0500ed92) /* 0.312726566 */, 19 }, /* 8149 */ { MAD_F(0x0501233b) /* 0.312777742 */, 19 }, /* 8150 */ { MAD_F(0x050158e5) /* 0.312828919 */, 19 }, /* 8151 */ { MAD_F(0x05018e90) /* 0.312880099 */, 19 }, /* 8152 */ { MAD_F(0x0501c43b) /* 0.312931280 */, 19 }, /* 8153 */ { MAD_F(0x0501f9e6) /* 0.312982464 */, 19 }, /* 8154 */ { MAD_F(0x05022f92) /* 0.313033650 */, 19 }, /* 8155 */ { MAD_F(0x0502653f) /* 0.313084838 */, 19 }, /* 8156 */ { MAD_F(0x05029aec) /* 0.313136028 */, 19 }, /* 8157 */ { MAD_F(0x0502d09a) /* 0.313187220 */, 19 }, /* 8158 */ { MAD_F(0x05030648) /* 0.313238414 */, 19 }, /* 8159 */ { MAD_F(0x05033bf7) /* 0.313289611 */, 19 }, /* 8160 */ { MAD_F(0x050371a7) /* 0.313340809 */, 19 }, /* 8161 */ { MAD_F(0x0503a757) /* 0.313392010 */, 19 }, /* 8162 */ { MAD_F(0x0503dd07) /* 0.313443212 */, 19 }, /* 8163 */ { MAD_F(0x050412b9) /* 0.313494417 */, 19 }, /* 8164 */ { MAD_F(0x0504486a) /* 0.313545624 */, 19 }, /* 8165 */ { MAD_F(0x05047e1d) /* 0.313596833 */, 19 }, /* 8166 */ { MAD_F(0x0504b3cf) /* 0.313648044 */, 19 }, /* 8167 */ { MAD_F(0x0504e983) /* 0.313699257 */, 19 }, /* 8168 */ { MAD_F(0x05051f37) /* 0.313750472 */, 19 }, /* 8169 */ { MAD_F(0x050554eb) /* 0.313801689 */, 19 }, /* 8170 */ { MAD_F(0x05058aa0) /* 0.313852909 */, 19 }, /* 8171 */ { MAD_F(0x0505c056) /* 0.313904130 */, 19 }, /* 8172 */ { MAD_F(0x0505f60c) /* 0.313955354 */, 19 }, /* 8173 */ { MAD_F(0x05062bc3) /* 0.314006579 */, 19 }, /* 8174 */ { MAD_F(0x0506617a) /* 0.314057807 */, 19 }, /* 8175 */ { MAD_F(0x05069732) /* 0.314109037 */, 19 }, /* 8176 */ { MAD_F(0x0506cceb) /* 0.314160269 */, 19 }, /* 8177 */ { MAD_F(0x050702a4) /* 0.314211502 */, 19 }, /* 8178 */ { MAD_F(0x0507385d) /* 0.314262739 */, 19 }, /* 8179 */ { MAD_F(0x05076e17) /* 0.314313977 */, 19 }, /* 8180 */ { MAD_F(0x0507a3d2) /* 0.314365217 */, 19 }, /* 8181 */ { MAD_F(0x0507d98d) /* 0.314416459 */, 19 }, /* 8182 */ { MAD_F(0x05080f49) /* 0.314467704 */, 19 }, /* 8183 */ { MAD_F(0x05084506) /* 0.314518950 */, 19 }, /* 8184 */ { MAD_F(0x05087ac2) /* 0.314570199 */, 19 }, /* 8185 */ { MAD_F(0x0508b080) /* 0.314621449 */, 19 }, /* 8186 */ { MAD_F(0x0508e63e) /* 0.314672702 */, 19 }, /* 8187 */ { MAD_F(0x05091bfd) /* 0.314723957 */, 19 }, /* 8188 */ { MAD_F(0x050951bc) /* 0.314775214 */, 19 }, /* 8189 */ { MAD_F(0x0509877c) /* 0.314826473 */, 19 }, /* 8190 */ { MAD_F(0x0509bd3c) /* 0.314877734 */, 19 }, /* 8191 */ { MAD_F(0x0509f2fd) /* 0.314928997 */, 19 }, /* 8192 */ { MAD_F(0x050a28be) /* 0.314980262 */, 19 }, /* 8193 */ { MAD_F(0x050a5e80) /* 0.315031530 */, 19 }, /* 8194 */ { MAD_F(0x050a9443) /* 0.315082799 */, 19 }, /* 8195 */ { MAD_F(0x050aca06) /* 0.315134071 */, 19 }, /* 8196 */ { MAD_F(0x050affc9) /* 0.315185344 */, 19 }, /* 8197 */ { MAD_F(0x050b358e) /* 0.315236620 */, 19 }, /* 8198 */ { MAD_F(0x050b6b52) /* 0.315287898 */, 19 }, /* 8199 */ { MAD_F(0x050ba118) /* 0.315339178 */, 19 }, /* 8200 */ { MAD_F(0x050bd6de) /* 0.315390460 */, 19 }, /* 8201 */ { MAD_F(0x050c0ca4) /* 0.315441744 */, 19 }, /* 8202 */ { MAD_F(0x050c426b) /* 0.315493030 */, 19 }, /* 8203 */ { MAD_F(0x050c7833) /* 0.315544318 */, 19 }, /* 8204 */ { MAD_F(0x050cadfb) /* 0.315595608 */, 19 }, /* 8205 */ { MAD_F(0x050ce3c4) /* 0.315646901 */, 19 }, /* 8206 */ { MAD_F(0x050d198d) /* 0.315698195 */, 19 } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/sf_table.dat000066400000000000000000000146231466261456500256530ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: sf_table.dat 1252 2007-07-08 15:46:19Z dominique_libre $ */ /* * These are the scalefactor values for Layer I and Layer II. * The values are from Table B.1 of ISO/IEC 11172-3. * * There is some error introduced by the 32-bit fixed-point representation; * the amount of error is shown. For 16-bit PCM output, this shouldn't be * too much of a problem. * * Strictly speaking, Table B.1 has only 63 entries (0-62), thus a strict * interpretation of ISO/IEC 11172-3 would suggest that a scalefactor index of * 63 is invalid. However, for better compatibility with current practices, we * add a 64th entry. */ MAD_F(0x20000000), /* 2.000000000000 => 2.000000000000, e 0.000000000000 */ MAD_F(0x1965fea5), /* 1.587401051968 => 1.587401051074, e 0.000000000894 */ MAD_F(0x1428a2fa), /* 1.259921049895 => 1.259921051562, e -0.000000001667 */ MAD_F(0x10000000), /* 1.000000000000 => 1.000000000000, e 0.000000000000 */ MAD_F(0x0cb2ff53), /* 0.793700525984 => 0.793700527400, e -0.000000001416 */ MAD_F(0x0a14517d), /* 0.629960524947 => 0.629960525781, e -0.000000000833 */ MAD_F(0x08000000), /* 0.500000000000 => 0.500000000000, e 0.000000000000 */ MAD_F(0x06597fa9), /* 0.396850262992 => 0.396850261837, e 0.000000001155 */ MAD_F(0x050a28be), /* 0.314980262474 => 0.314980261028, e 0.000000001446 */ MAD_F(0x04000000), /* 0.250000000000 => 0.250000000000, e 0.000000000000 */ MAD_F(0x032cbfd5), /* 0.198425131496 => 0.198425132781, e -0.000000001285 */ MAD_F(0x0285145f), /* 0.157490131237 => 0.157490130514, e 0.000000000723 */ MAD_F(0x02000000), /* 0.125000000000 => 0.125000000000, e 0.000000000000 */ MAD_F(0x01965fea), /* 0.099212565748 => 0.099212564528, e 0.000000001220 */ MAD_F(0x01428a30), /* 0.078745065618 => 0.078745067120, e -0.000000001501 */ MAD_F(0x01000000), /* 0.062500000000 => 0.062500000000, e 0.000000000000 */ MAD_F(0x00cb2ff5), /* 0.049606282874 => 0.049606282264, e 0.000000000610 */ MAD_F(0x00a14518), /* 0.039372532809 => 0.039372533560, e -0.000000000751 */ MAD_F(0x00800000), /* 0.031250000000 => 0.031250000000, e 0.000000000000 */ MAD_F(0x006597fb), /* 0.024803141437 => 0.024803142995, e -0.000000001558 */ MAD_F(0x0050a28c), /* 0.019686266405 => 0.019686266780, e -0.000000000375 */ MAD_F(0x00400000), /* 0.015625000000 => 0.015625000000, e 0.000000000000 */ MAD_F(0x0032cbfd), /* 0.012401570719 => 0.012401569635, e 0.000000001084 */ MAD_F(0x00285146), /* 0.009843133202 => 0.009843133390, e -0.000000000188 */ MAD_F(0x00200000), /* 0.007812500000 => 0.007812500000, e 0.000000000000 */ MAD_F(0x001965ff), /* 0.006200785359 => 0.006200786680, e -0.000000001321 */ MAD_F(0x001428a3), /* 0.004921566601 => 0.004921566695, e -0.000000000094 */ MAD_F(0x00100000), /* 0.003906250000 => 0.003906250000, e 0.000000000000 */ MAD_F(0x000cb2ff), /* 0.003100392680 => 0.003100391477, e 0.000000001202 */ MAD_F(0x000a1451), /* 0.002460783301 => 0.002460781485, e 0.000000001816 */ MAD_F(0x00080000), /* 0.001953125000 => 0.001953125000, e 0.000000000000 */ MAD_F(0x00065980), /* 0.001550196340 => 0.001550197601, e -0.000000001262 */ MAD_F(0x00050a29), /* 0.001230391650 => 0.001230392605, e -0.000000000955 */ MAD_F(0x00040000), /* 0.000976562500 => 0.000976562500, e 0.000000000000 */ MAD_F(0x00032cc0), /* 0.000775098170 => 0.000775098801, e -0.000000000631 */ MAD_F(0x00028514), /* 0.000615195825 => 0.000615194440, e 0.000000001385 */ MAD_F(0x00020000), /* 0.000488281250 => 0.000488281250, e 0.000000000000 */ MAD_F(0x00019660), /* 0.000387549085 => 0.000387549400, e -0.000000000315 */ MAD_F(0x0001428a), /* 0.000307597913 => 0.000307597220, e 0.000000000693 */ MAD_F(0x00010000), /* 0.000244140625 => 0.000244140625, e 0.000000000000 */ MAD_F(0x0000cb30), /* 0.000193774542 => 0.000193774700, e -0.000000000158 */ MAD_F(0x0000a145), /* 0.000153798956 => 0.000153798610, e 0.000000000346 */ MAD_F(0x00008000), /* 0.000122070313 => 0.000122070313, e 0.000000000000 */ MAD_F(0x00006598), /* 0.000096887271 => 0.000096887350, e -0.000000000079 */ MAD_F(0x000050a3), /* 0.000076899478 => 0.000076901168, e -0.000000001689 */ MAD_F(0x00004000), /* 0.000061035156 => 0.000061035156, e 0.000000000000 */ MAD_F(0x000032cc), /* 0.000048443636 => 0.000048443675, e -0.000000000039 */ MAD_F(0x00002851), /* 0.000038449739 => 0.000038448721, e 0.000000001018 */ MAD_F(0x00002000), /* 0.000030517578 => 0.000030517578, e 0.000000000000 */ MAD_F(0x00001966), /* 0.000024221818 => 0.000024221838, e -0.000000000020 */ MAD_F(0x00001429), /* 0.000019224870 => 0.000019226223, e -0.000000001354 */ MAD_F(0x00001000), /* 0.000015258789 => 0.000015258789, e -0.000000000000 */ MAD_F(0x00000cb3), /* 0.000012110909 => 0.000012110919, e -0.000000000010 */ MAD_F(0x00000a14), /* 0.000009612435 => 0.000009611249, e 0.000000001186 */ MAD_F(0x00000800), /* 0.000007629395 => 0.000007629395, e -0.000000000000 */ MAD_F(0x00000659), /* 0.000006055454 => 0.000006053597, e 0.000000001858 */ MAD_F(0x0000050a), /* 0.000004806217 => 0.000004805624, e 0.000000000593 */ MAD_F(0x00000400), /* 0.000003814697 => 0.000003814697, e 0.000000000000 */ MAD_F(0x0000032d), /* 0.000003027727 => 0.000003028661, e -0.000000000934 */ MAD_F(0x00000285), /* 0.000002403109 => 0.000002402812, e 0.000000000296 */ MAD_F(0x00000200), /* 0.000001907349 => 0.000001907349, e -0.000000000000 */ MAD_F(0x00000196), /* 0.000001513864 => 0.000001512468, e 0.000000001396 */ MAD_F(0x00000143), /* 0.000001201554 => 0.000001203269, e -0.000000001714 */ MAD_F(0x00000000) /* this compatibility entry is not part of Table B.1 */ alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/stream.c000066400000000000000000000105541466261456500250400ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: stream.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # include "bit.h" # include "stream.h" /* * NAME: stream->init() * DESCRIPTION: initialize stream struct */ void mad_stream_init(struct mad_stream *stream) { stream->buffer = 0; stream->bufend = 0; stream->skiplen = 0; stream->sync = 0; stream->freerate = 0; stream->this_frame = 0; stream->next_frame = 0; mad_bit_init(&stream->ptr, 0); mad_bit_init(&stream->anc_ptr, 0); stream->anc_bitlen = 0; stream->main_data = 0; stream->md_len = 0; stream->options = 0; stream->error = MAD_ERROR_NONE; } /* * NAME: stream->finish() * DESCRIPTION: deallocate any dynamic memory associated with stream */ void mad_stream_finish(struct mad_stream *stream) { if (stream->main_data) { free(stream->main_data); stream->main_data = 0; } mad_bit_finish(&stream->anc_ptr); mad_bit_finish(&stream->ptr); } /* * NAME: stream->buffer() * DESCRIPTION: set stream buffer pointers */ void mad_stream_buffer(struct mad_stream *stream, unsigned char const *buffer, unsigned long length) { stream->buffer = buffer; stream->bufend = buffer + length; stream->this_frame = buffer; stream->next_frame = buffer; stream->sync = 1; mad_bit_init(&stream->ptr, buffer); } /* * NAME: stream->skip() * DESCRIPTION: arrange to skip bytes before the next frame */ void mad_stream_skip(struct mad_stream *stream, unsigned long length) { stream->skiplen += length; } /* * NAME: stream->sync() * DESCRIPTION: locate the next stream sync word */ int mad_stream_sync(struct mad_stream *stream) { register unsigned char const *ptr, *end; ptr = mad_bit_nextbyte(&stream->ptr); end = stream->bufend; while (ptr < end - 1 && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) ++ptr; if (end - ptr < MAD_BUFFER_GUARD) return -1; mad_bit_init(&stream->ptr, ptr); return 0; } /* * NAME: stream->errorstr() * DESCRIPTION: return a string description of the current error condition */ char const *mad_stream_errorstr(struct mad_stream const *stream) { switch (stream->error) { case MAD_ERROR_NONE: return "no error"; case MAD_ERROR_BUFLEN: return "input buffer too small (or EOF)"; case MAD_ERROR_BUFPTR: return "invalid (null) buffer pointer"; case MAD_ERROR_NOMEM: return "not enough memory"; case MAD_ERROR_LOSTSYNC: return "lost synchronization"; case MAD_ERROR_BADLAYER: return "reserved header layer value"; case MAD_ERROR_BADBITRATE: return "forbidden bitrate value"; case MAD_ERROR_BADSAMPLERATE: return "reserved sample frequency value"; case MAD_ERROR_BADEMPHASIS: return "reserved emphasis value"; case MAD_ERROR_BADCRC: return "CRC check failed"; case MAD_ERROR_BADBITALLOC: return "forbidden bit allocation value"; case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index"; case MAD_ERROR_BADMODE: return "bad bitrate/mode combination"; case MAD_ERROR_BADFRAMELEN: return "bad frame length"; case MAD_ERROR_BADBIGVALUES: return "bad big_values count"; case MAD_ERROR_BADBLOCKTYPE: return "reserved block_type"; case MAD_ERROR_BADSCFSI: return "bad scalefactor selection info"; case MAD_ERROR_BADDATAPTR: return "bad main_data_begin pointer"; case MAD_ERROR_BADPART3LEN: return "bad audio data length"; case MAD_ERROR_BADHUFFTABLE: return "bad Huffman table select"; case MAD_ERROR_BADHUFFDATA: return "Huffman data overrun"; case MAD_ERROR_BADSTEREO: return "incompatible block_type for JS"; } return 0; } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/stream.h000066400000000000000000000101541466261456500250410ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: stream.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_STREAM_H # define LIBMAD_STREAM_H # include "bit.h" # define MAD_BUFFER_GUARD 8 # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) enum mad_error { MAD_ERROR_NONE = 0x0000, /* no error */ MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ }; # define MAD_RECOVERABLE(error) ((error) & 0xff00) struct mad_stream { unsigned char const *buffer; /* input bitstream buffer */ unsigned char const *bufend; /* end of buffer */ unsigned long skiplen; /* bytes to skip before next frame */ int sync; /* stream sync found */ unsigned long freerate; /* free bitrate (fixed) */ unsigned char const *this_frame; /* start of current frame */ unsigned char const *next_frame; /* start of next frame */ struct mad_bitptr ptr; /* current processing bit pointer */ struct mad_bitptr anc_ptr; /* ancillary bits pointer */ unsigned int anc_bitlen; /* number of ancillary bits */ unsigned char (*main_data)[MAD_BUFFER_MDLEN]; /* Layer III main_data() */ unsigned int md_len; /* bytes in main_data */ int options; /* decoding options (see below) */ enum mad_error error; /* error code (see above) */ }; enum { MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ # if 0 /* not yet implemented */ MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ # endif }; void mad_stream_init(struct mad_stream *); void mad_stream_finish(struct mad_stream *); # define mad_stream_options(stream, opts) \ ((void) ((stream)->options = (opts))) void mad_stream_buffer(struct mad_stream *, unsigned char const *, unsigned long); void mad_stream_skip(struct mad_stream *, unsigned long); int mad_stream_sync(struct mad_stream *); char const *mad_stream_errorstr(struct mad_stream const *); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/synth.c000066400000000000000000000574371466261456500247250ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: synth.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include "fixed.h" # include "frame.h" # include "synth.h" /* * NAME: synth->init() * DESCRIPTION: initialize synth struct */ void mad_synth_init(struct mad_synth *synth) { mad_synth_mute(synth); synth->phase = 0; synth->pcm.samplerate = 0; synth->pcm.channels = 0; synth->pcm.length = 0; } /* * NAME: synth->mute() * DESCRIPTION: zero all polyphase filterbank values, resetting synthesis */ void mad_synth_mute(struct mad_synth *synth) { unsigned int ch, s, v; for (ch = 0; ch < 2; ++ch) { for (s = 0; s < 16; ++s) { for (v = 0; v < 8; ++v) { synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] = synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0; } } } } /* * An optional optimization called here the Subband Synthesis Optimization * (SSO) improves the performance of subband synthesis at the expense of * accuracy. * * The idea is to simplify 32x32->64-bit multiplication to 32x32->32 such * that extra scaling and rounding are not necessary. This often allows the * compiler to use faster 32-bit multiply-accumulate instructions instead of * explicit 64-bit multiply, shift, and add instructions. * * SSO works like this: a full 32x32->64-bit multiply of two mad_fixed_t * values requires the result to be right-shifted 28 bits to be properly * scaled to the same fixed-point format. Right shifts can be applied at any * time to either operand or to the result, so the optimization involves * careful placement of these shifts to minimize the loss of accuracy. * * First, a 14-bit shift is applied with rounding at compile-time to the D[] * table of coefficients for the subband synthesis window. This only loses 2 * bits of accuracy because the lower 12 bits are always zero. A second * 12-bit shift occurs after the DCT calculation. This loses 12 bits of * accuracy. Finally, a third 2-bit shift occurs just before the sample is * saved in the PCM buffer. 14 + 12 + 2 == 28 bits. */ /* FPM_DEFAULT without OPT_SSO will actually lose accuracy and performance */ # if defined(FPM_DEFAULT) && !defined(OPT_SSO) # define OPT_SSO # endif /* second SSO shift, with rounding */ # if defined(OPT_SSO) # define SHIFT(x) (((x) + (1L << 11)) >> 12) # else # define SHIFT(x) (x) # endif /* possible DCT speed optimization */ # if defined(OPT_SPEED) && defined(MAD_F_MLX) # define OPT_DCTO # define MUL(x, y) \ ({ mad_fixed64hi_t hi; \ mad_fixed64lo_t lo; \ MAD_F_MLX(hi, lo, (x), (y)); \ hi << (32 - MAD_F_SCALEBITS - 3); \ }) # else # undef OPT_DCTO # define MUL(x, y) mad_f_mul((x), (y)) # endif /* * NAME: dct32() * DESCRIPTION: perform fast in[32]->out[32] DCT */ static void dct32(mad_fixed_t const in[32], unsigned int slot, mad_fixed_t lo[16][8], mad_fixed_t hi[16][8]) { mad_fixed_t t0, t1, t2, t3, t4, t5, t6, t7; mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15; mad_fixed_t t16, t17, t18, t19, t20, t21, t22, t23; mad_fixed_t t24, t25, t26, t27, t28, t29, t30, t31; mad_fixed_t t32, t33, t34, t35, t36, t37, t38, t39; mad_fixed_t t40, t41, t42, t43, t44, t45, t46, t47; mad_fixed_t t48, t49, t50, t51, t52, t53, t54, t55; mad_fixed_t t56, t57, t58, t59, t60, t61, t62, t63; mad_fixed_t t64, t65, t66, t67, t68, t69, t70, t71; mad_fixed_t t72, t73, t74, t75, t76, t77, t78, t79; mad_fixed_t t80, t81, t82, t83, t84, t85, t86, t87; mad_fixed_t t88, t89, t90, t91, t92, t93, t94, t95; mad_fixed_t t96, t97, t98, t99, t100, t101, t102, t103; mad_fixed_t t104, t105, t106, t107, t108, t109, t110, t111; mad_fixed_t t112, t113, t114, t115, t116, t117, t118, t119; mad_fixed_t t120, t121, t122, t123, t124, t125, t126, t127; mad_fixed_t t128, t129, t130, t131, t132, t133, t134, t135; mad_fixed_t t136, t137, t138, t139, t140, t141, t142, t143; mad_fixed_t t144, t145, t146, t147, t148, t149, t150, t151; mad_fixed_t t152, t153, t154, t155, t156, t157, t158, t159; mad_fixed_t t160, t161, t162, t163, t164, t165, t166, t167; mad_fixed_t t168, t169, t170, t171, t172, t173, t174, t175; mad_fixed_t t176; /* costab[i] = cos(PI / (2 * 32) * i) */ # if defined(OPT_DCTO) # define costab1 MAD_F(0x7fd8878e) # define costab2 MAD_F(0x7f62368f) # define costab3 MAD_F(0x7e9d55fc) # define costab4 MAD_F(0x7d8a5f40) # define costab5 MAD_F(0x7c29fbee) # define costab6 MAD_F(0x7a7d055b) # define costab7 MAD_F(0x78848414) # define costab8 MAD_F(0x7641af3d) # define costab9 MAD_F(0x73b5ebd1) # define costab10 MAD_F(0x70e2cbc6) # define costab11 MAD_F(0x6dca0d14) # define costab12 MAD_F(0x6a6d98a4) # define costab13 MAD_F(0x66cf8120) # define costab14 MAD_F(0x62f201ac) # define costab15 MAD_F(0x5ed77c8a) # define costab16 MAD_F(0x5a82799a) # define costab17 MAD_F(0x55f5a4d2) # define costab18 MAD_F(0x5133cc94) # define costab19 MAD_F(0x4c3fdff4) # define costab20 MAD_F(0x471cece7) # define costab21 MAD_F(0x41ce1e65) # define costab22 MAD_F(0x3c56ba70) # define costab23 MAD_F(0x36ba2014) # define costab24 MAD_F(0x30fbc54d) # define costab25 MAD_F(0x2b1f34eb) # define costab26 MAD_F(0x25280c5e) # define costab27 MAD_F(0x1f19f97b) # define costab28 MAD_F(0x18f8b83c) # define costab29 MAD_F(0x12c8106f) # define costab30 MAD_F(0x0c8bd35e) # define costab31 MAD_F(0x0647d97c) # else # define costab1 MAD_F(0x0ffb10f2) /* 0.998795456 */ # define costab2 MAD_F(0x0fec46d2) /* 0.995184727 */ # define costab3 MAD_F(0x0fd3aac0) /* 0.989176510 */ # define costab4 MAD_F(0x0fb14be8) /* 0.980785280 */ # define costab5 MAD_F(0x0f853f7e) /* 0.970031253 */ # define costab6 MAD_F(0x0f4fa0ab) /* 0.956940336 */ # define costab7 MAD_F(0x0f109082) /* 0.941544065 */ # define costab8 MAD_F(0x0ec835e8) /* 0.923879533 */ # define costab9 MAD_F(0x0e76bd7a) /* 0.903989293 */ # define costab10 MAD_F(0x0e1c5979) /* 0.881921264 */ # define costab11 MAD_F(0x0db941a3) /* 0.857728610 */ # define costab12 MAD_F(0x0d4db315) /* 0.831469612 */ # define costab13 MAD_F(0x0cd9f024) /* 0.803207531 */ # define costab14 MAD_F(0x0c5e4036) /* 0.773010453 */ # define costab15 MAD_F(0x0bdaef91) /* 0.740951125 */ # define costab16 MAD_F(0x0b504f33) /* 0.707106781 */ # define costab17 MAD_F(0x0abeb49a) /* 0.671558955 */ # define costab18 MAD_F(0x0a267993) /* 0.634393284 */ # define costab19 MAD_F(0x0987fbfe) /* 0.595699304 */ # define costab20 MAD_F(0x08e39d9d) /* 0.555570233 */ # define costab21 MAD_F(0x0839c3cd) /* 0.514102744 */ # define costab22 MAD_F(0x078ad74e) /* 0.471396737 */ # define costab23 MAD_F(0x06d74402) /* 0.427555093 */ # define costab24 MAD_F(0x061f78aa) /* 0.382683432 */ # define costab25 MAD_F(0x0563e69d) /* 0.336889853 */ # define costab26 MAD_F(0x04a5018c) /* 0.290284677 */ # define costab27 MAD_F(0x03e33f2f) /* 0.242980180 */ # define costab28 MAD_F(0x031f1708) /* 0.195090322 */ # define costab29 MAD_F(0x0259020e) /* 0.146730474 */ # define costab30 MAD_F(0x01917a6c) /* 0.098017140 */ # define costab31 MAD_F(0x00c8fb30) /* 0.049067674 */ # endif t0 = in[0] + in[31]; t16 = MUL(in[0] - in[31], costab1); t1 = in[15] + in[16]; t17 = MUL(in[15] - in[16], costab31); t41 = t16 + t17; t59 = MUL(t16 - t17, costab2); t33 = t0 + t1; t50 = MUL(t0 - t1, costab2); t2 = in[7] + in[24]; t18 = MUL(in[7] - in[24], costab15); t3 = in[8] + in[23]; t19 = MUL(in[8] - in[23], costab17); t42 = t18 + t19; t60 = MUL(t18 - t19, costab30); t34 = t2 + t3; t51 = MUL(t2 - t3, costab30); t4 = in[3] + in[28]; t20 = MUL(in[3] - in[28], costab7); t5 = in[12] + in[19]; t21 = MUL(in[12] - in[19], costab25); t43 = t20 + t21; t61 = MUL(t20 - t21, costab14); t35 = t4 + t5; t52 = MUL(t4 - t5, costab14); t6 = in[4] + in[27]; t22 = MUL(in[4] - in[27], costab9); t7 = in[11] + in[20]; t23 = MUL(in[11] - in[20], costab23); t44 = t22 + t23; t62 = MUL(t22 - t23, costab18); t36 = t6 + t7; t53 = MUL(t6 - t7, costab18); t8 = in[1] + in[30]; t24 = MUL(in[1] - in[30], costab3); t9 = in[14] + in[17]; t25 = MUL(in[14] - in[17], costab29); t45 = t24 + t25; t63 = MUL(t24 - t25, costab6); t37 = t8 + t9; t54 = MUL(t8 - t9, costab6); t10 = in[6] + in[25]; t26 = MUL(in[6] - in[25], costab13); t11 = in[9] + in[22]; t27 = MUL(in[9] - in[22], costab19); t46 = t26 + t27; t64 = MUL(t26 - t27, costab26); t38 = t10 + t11; t55 = MUL(t10 - t11, costab26); t12 = in[2] + in[29]; t28 = MUL(in[2] - in[29], costab5); t13 = in[13] + in[18]; t29 = MUL(in[13] - in[18], costab27); t47 = t28 + t29; t65 = MUL(t28 - t29, costab10); t39 = t12 + t13; t56 = MUL(t12 - t13, costab10); t14 = in[5] + in[26]; t30 = MUL(in[5] - in[26], costab11); t15 = in[10] + in[21]; t31 = MUL(in[10] - in[21], costab21); t48 = t30 + t31; t66 = MUL(t30 - t31, costab22); t40 = t14 + t15; t57 = MUL(t14 - t15, costab22); t69 = t33 + t34; t89 = MUL(t33 - t34, costab4); t70 = t35 + t36; t90 = MUL(t35 - t36, costab28); t71 = t37 + t38; t91 = MUL(t37 - t38, costab12); t72 = t39 + t40; t92 = MUL(t39 - t40, costab20); t73 = t41 + t42; t94 = MUL(t41 - t42, costab4); t74 = t43 + t44; t95 = MUL(t43 - t44, costab28); t75 = t45 + t46; t96 = MUL(t45 - t46, costab12); t76 = t47 + t48; t97 = MUL(t47 - t48, costab20); t78 = t50 + t51; t100 = MUL(t50 - t51, costab4); t79 = t52 + t53; t101 = MUL(t52 - t53, costab28); t80 = t54 + t55; t102 = MUL(t54 - t55, costab12); t81 = t56 + t57; t103 = MUL(t56 - t57, costab20); t83 = t59 + t60; t106 = MUL(t59 - t60, costab4); t84 = t61 + t62; t107 = MUL(t61 - t62, costab28); t85 = t63 + t64; t108 = MUL(t63 - t64, costab12); t86 = t65 + t66; t109 = MUL(t65 - t66, costab20); t113 = t69 + t70; t114 = t71 + t72; /* 0 */ hi[15][slot] = SHIFT(t113 + t114); /* 16 */ lo[ 0][slot] = SHIFT(MUL(t113 - t114, costab16)); t115 = t73 + t74; t116 = t75 + t76; t32 = t115 + t116; /* 1 */ hi[14][slot] = SHIFT(t32); t118 = t78 + t79; t119 = t80 + t81; t58 = t118 + t119; /* 2 */ hi[13][slot] = SHIFT(t58); t121 = t83 + t84; t122 = t85 + t86; t67 = t121 + t122; t49 = (t67 * 2) - t32; /* 3 */ hi[12][slot] = SHIFT(t49); t125 = t89 + t90; t126 = t91 + t92; t93 = t125 + t126; /* 4 */ hi[11][slot] = SHIFT(t93); t128 = t94 + t95; t129 = t96 + t97; t98 = t128 + t129; t68 = (t98 * 2) - t49; /* 5 */ hi[10][slot] = SHIFT(t68); t132 = t100 + t101; t133 = t102 + t103; t104 = t132 + t133; t82 = (t104 * 2) - t58; /* 6 */ hi[ 9][slot] = SHIFT(t82); t136 = t106 + t107; t137 = t108 + t109; t110 = t136 + t137; t87 = (t110 * 2) - t67; t77 = (t87 * 2) - t68; /* 7 */ hi[ 8][slot] = SHIFT(t77); t141 = MUL(t69 - t70, costab8); t142 = MUL(t71 - t72, costab24); t143 = t141 + t142; /* 8 */ hi[ 7][slot] = SHIFT(t143); /* 24 */ lo[ 8][slot] = SHIFT((MUL(t141 - t142, costab16) * 2) - t143); t144 = MUL(t73 - t74, costab8); t145 = MUL(t75 - t76, costab24); t146 = t144 + t145; t88 = (t146 * 2) - t77; /* 9 */ hi[ 6][slot] = SHIFT(t88); t148 = MUL(t78 - t79, costab8); t149 = MUL(t80 - t81, costab24); t150 = t148 + t149; t105 = (t150 * 2) - t82; /* 10 */ hi[ 5][slot] = SHIFT(t105); t152 = MUL(t83 - t84, costab8); t153 = MUL(t85 - t86, costab24); t154 = t152 + t153; t111 = (t154 * 2) - t87; t99 = (t111 * 2) - t88; /* 11 */ hi[ 4][slot] = SHIFT(t99); t157 = MUL(t89 - t90, costab8); t158 = MUL(t91 - t92, costab24); t159 = t157 + t158; t127 = (t159 * 2) - t93; /* 12 */ hi[ 3][slot] = SHIFT(t127); t160 = (MUL(t125 - t126, costab16) * 2) - t127; /* 20 */ lo[ 4][slot] = SHIFT(t160); /* 28 */ lo[12][slot] = SHIFT((((MUL(t157 - t158, costab16) * 2) - t159) * 2) - t160); t161 = MUL(t94 - t95, costab8); t162 = MUL(t96 - t97, costab24); t163 = t161 + t162; t130 = (t163 * 2) - t98; t112 = (t130 * 2) - t99; /* 13 */ hi[ 2][slot] = SHIFT(t112); t164 = (MUL(t128 - t129, costab16) * 2) - t130; t166 = MUL(t100 - t101, costab8); t167 = MUL(t102 - t103, costab24); t168 = t166 + t167; t134 = (t168 * 2) - t104; t120 = (t134 * 2) - t105; /* 14 */ hi[ 1][slot] = SHIFT(t120); t135 = (MUL(t118 - t119, costab16) * 2) - t120; /* 18 */ lo[ 2][slot] = SHIFT(t135); t169 = (MUL(t132 - t133, costab16) * 2) - t134; t151 = (t169 * 2) - t135; /* 22 */ lo[ 6][slot] = SHIFT(t151); t170 = (((MUL(t148 - t149, costab16) * 2) - t150) * 2) - t151; /* 26 */ lo[10][slot] = SHIFT(t170); /* 30 */ lo[14][slot] = SHIFT((((((MUL(t166 - t167, costab16) * 2) - t168) * 2) - t169) * 2) - t170); t171 = MUL(t106 - t107, costab8); t172 = MUL(t108 - t109, costab24); t173 = t171 + t172; t138 = (t173 * 2) - t110; t123 = (t138 * 2) - t111; t139 = (MUL(t121 - t122, costab16) * 2) - t123; t117 = (t123 * 2) - t112; /* 15 */ hi[ 0][slot] = SHIFT(t117); t124 = (MUL(t115 - t116, costab16) * 2) - t117; /* 17 */ lo[ 1][slot] = SHIFT(t124); t131 = (t139 * 2) - t124; /* 19 */ lo[ 3][slot] = SHIFT(t131); t140 = (t164 * 2) - t131; /* 21 */ lo[ 5][slot] = SHIFT(t140); t174 = (MUL(t136 - t137, costab16) * 2) - t138; t155 = (t174 * 2) - t139; t147 = (t155 * 2) - t140; /* 23 */ lo[ 7][slot] = SHIFT(t147); t156 = (((MUL(t144 - t145, costab16) * 2) - t146) * 2) - t147; /* 25 */ lo[ 9][slot] = SHIFT(t156); t175 = (((MUL(t152 - t153, costab16) * 2) - t154) * 2) - t155; t165 = (t175 * 2) - t156; /* 27 */ lo[11][slot] = SHIFT(t165); t176 = (((((MUL(t161 - t162, costab16) * 2) - t163) * 2) - t164) * 2) - t165; /* 29 */ lo[13][slot] = SHIFT(t176); /* 31 */ lo[15][slot] = SHIFT((((((((MUL(t171 - t172, costab16) * 2) - t173) * 2) - t174) * 2) - t175) * 2) - t176); /* * Totals: * 80 multiplies * 80 additions * 119 subtractions * 49 shifts (not counting SSO) */ } # undef MUL # undef SHIFT /* third SSO shift and/or D[] optimization preshift */ # if defined(OPT_SSO) # if MAD_F_FRACBITS != 28 # error "MAD_F_FRACBITS must be 28 to use OPT_SSO" # endif # define ML0(hi, lo, x, y) ((lo) = (x) * (y)) # define MLA(hi, lo, x, y) ((lo) += (x) * (y)) # define MLN(hi, lo) ((lo) = -(lo)) # define MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) # define SHIFT(x) ((x) >> 2) # define PRESHIFT(x) ((MAD_F(x) + (1L << 13)) >> 14) # else # define ML0(hi, lo, x, y) MAD_F_ML0((hi), (lo), (x), (y)) # define MLA(hi, lo, x, y) MAD_F_MLA((hi), (lo), (x), (y)) # define MLN(hi, lo) MAD_F_MLN((hi), (lo)) # define MLZ(hi, lo) MAD_F_MLZ((hi), (lo)) # define SHIFT(x) (x) # if defined(MAD_F_SCALEBITS) # undef MAD_F_SCALEBITS # define MAD_F_SCALEBITS (MAD_F_FRACBITS - 12) # define PRESHIFT(x) (MAD_F(x) >> 12) # else # define PRESHIFT(x) MAD_F(x) # endif # endif static mad_fixed_t const D[17][32] = { # include "D.dat" }; # if defined(ASO_SYNTH) void synth_full(struct mad_synth *, struct mad_frame const *, unsigned int, unsigned int); # else /* * NAME: synth->full() * DESCRIPTION: perform full frequency PCM synthesis */ static void synth_full(struct mad_synth *synth, struct mad_frame const *frame, unsigned int nch, unsigned int ns) { unsigned int phase, ch, s, sb, pe, po; mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; mad_fixed_t const (*sbsample)[36][32]; register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8]; register mad_fixed_t const (*Dptr)[32], *ptr; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; for (ch = 0; ch < nch; ++ch) { sbsample = &frame->sbsample[ch]; filter = &synth->filter[ch]; phase = synth->phase; pcm1 = synth->pcm.samples[ch]; for (s = 0; s < ns; ++s) { dct32((*sbsample)[s], phase >> 1, (*filter)[0][phase & 1], (*filter)[1][phase & 1]); pe = phase & ~1; po = ((phase - 1) & 0xf) | 1; /* calculate 32 samples */ fe = &(*filter)[0][ phase & 1][0]; fx = &(*filter)[0][~phase & 1][0]; fo = &(*filter)[1][~phase & 1][0]; Dptr = &D[0]; ptr = *Dptr + po; ML0(hi, lo, (*fx)[0], ptr[ 0]); MLA(hi, lo, (*fx)[1], ptr[14]); MLA(hi, lo, (*fx)[2], ptr[12]); MLA(hi, lo, (*fx)[3], ptr[10]); MLA(hi, lo, (*fx)[4], ptr[ 8]); MLA(hi, lo, (*fx)[5], ptr[ 6]); MLA(hi, lo, (*fx)[6], ptr[ 4]); MLA(hi, lo, (*fx)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[0], ptr[ 0]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[7], ptr[ 2]); *pcm1++ = SHIFT(MLZ(hi, lo)); pcm2 = pcm1 + 30; for (sb = 1; sb < 16; ++sb) { ++fe; ++Dptr; /* D[32 - sb][i] == -D[sb][31 - i] */ ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[7], ptr[ 2]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[0], ptr[ 0]); *pcm1++ = SHIFT(MLZ(hi, lo)); ptr = *Dptr - pe; ML0(hi, lo, (*fe)[0], ptr[31 - 16]); MLA(hi, lo, (*fe)[1], ptr[31 - 14]); MLA(hi, lo, (*fe)[2], ptr[31 - 12]); MLA(hi, lo, (*fe)[3], ptr[31 - 10]); MLA(hi, lo, (*fe)[4], ptr[31 - 8]); MLA(hi, lo, (*fe)[5], ptr[31 - 6]); MLA(hi, lo, (*fe)[6], ptr[31 - 4]); MLA(hi, lo, (*fe)[7], ptr[31 - 2]); ptr = *Dptr - po; MLA(hi, lo, (*fo)[7], ptr[31 - 2]); MLA(hi, lo, (*fo)[6], ptr[31 - 4]); MLA(hi, lo, (*fo)[5], ptr[31 - 6]); MLA(hi, lo, (*fo)[4], ptr[31 - 8]); MLA(hi, lo, (*fo)[3], ptr[31 - 10]); MLA(hi, lo, (*fo)[2], ptr[31 - 12]); MLA(hi, lo, (*fo)[1], ptr[31 - 14]); MLA(hi, lo, (*fo)[0], ptr[31 - 16]); *pcm2-- = SHIFT(MLZ(hi, lo)); ++fo; } ++Dptr; ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); *pcm1 = SHIFT(-MLZ(hi, lo)); pcm1 += 16; phase = (phase + 1) % 16; } } } # endif /* * NAME: synth->half() * DESCRIPTION: perform half frequency PCM synthesis */ static void synth_half(struct mad_synth *synth, struct mad_frame const *frame, unsigned int nch, unsigned int ns) { unsigned int phase, ch, s, sb, pe, po; mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; mad_fixed_t const (*sbsample)[36][32]; register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8]; register mad_fixed_t const (*Dptr)[32], *ptr; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; for (ch = 0; ch < nch; ++ch) { sbsample = &frame->sbsample[ch]; filter = &synth->filter[ch]; phase = synth->phase; pcm1 = synth->pcm.samples[ch]; for (s = 0; s < ns; ++s) { dct32((*sbsample)[s], phase >> 1, (*filter)[0][phase & 1], (*filter)[1][phase & 1]); pe = phase & ~1; po = ((phase - 1) & 0xf) | 1; /* calculate 16 samples */ fe = &(*filter)[0][ phase & 1][0]; fx = &(*filter)[0][~phase & 1][0]; fo = &(*filter)[1][~phase & 1][0]; Dptr = &D[0]; ptr = *Dptr + po; ML0(hi, lo, (*fx)[0], ptr[ 0]); MLA(hi, lo, (*fx)[1], ptr[14]); MLA(hi, lo, (*fx)[2], ptr[12]); MLA(hi, lo, (*fx)[3], ptr[10]); MLA(hi, lo, (*fx)[4], ptr[ 8]); MLA(hi, lo, (*fx)[5], ptr[ 6]); MLA(hi, lo, (*fx)[6], ptr[ 4]); MLA(hi, lo, (*fx)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[0], ptr[ 0]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[7], ptr[ 2]); *pcm1++ = SHIFT(MLZ(hi, lo)); pcm2 = pcm1 + 14; for (sb = 1; sb < 16; ++sb) { ++fe; ++Dptr; /* D[32 - sb][i] == -D[sb][31 - i] */ if (!(sb & 1)) { ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[7], ptr[ 2]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[0], ptr[ 0]); *pcm1++ = SHIFT(MLZ(hi, lo)); ptr = *Dptr - po; ML0(hi, lo, (*fo)[7], ptr[31 - 2]); MLA(hi, lo, (*fo)[6], ptr[31 - 4]); MLA(hi, lo, (*fo)[5], ptr[31 - 6]); MLA(hi, lo, (*fo)[4], ptr[31 - 8]); MLA(hi, lo, (*fo)[3], ptr[31 - 10]); MLA(hi, lo, (*fo)[2], ptr[31 - 12]); MLA(hi, lo, (*fo)[1], ptr[31 - 14]); MLA(hi, lo, (*fo)[0], ptr[31 - 16]); ptr = *Dptr - pe; MLA(hi, lo, (*fe)[0], ptr[31 - 16]); MLA(hi, lo, (*fe)[1], ptr[31 - 14]); MLA(hi, lo, (*fe)[2], ptr[31 - 12]); MLA(hi, lo, (*fe)[3], ptr[31 - 10]); MLA(hi, lo, (*fe)[4], ptr[31 - 8]); MLA(hi, lo, (*fe)[5], ptr[31 - 6]); MLA(hi, lo, (*fe)[6], ptr[31 - 4]); MLA(hi, lo, (*fe)[7], ptr[31 - 2]); *pcm2-- = SHIFT(MLZ(hi, lo)); } ++fo; } ++Dptr; ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); *pcm1 = SHIFT(-MLZ(hi, lo)); pcm1 += 8; phase = (phase + 1) % 16; } } } /* * NAME: synth->frame() * DESCRIPTION: perform PCM synthesis of frame subband samples */ void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame) { unsigned int nch, ns; void (*synth_frame)(struct mad_synth *, struct mad_frame const *, unsigned int, unsigned int); nch = MAD_NCHANNELS(&frame->header); ns = MAD_NSBSAMPLES(&frame->header); synth->pcm.samplerate = frame->header.samplerate; synth->pcm.channels = nch; synth->pcm.length = 32 * ns; synth_frame = synth_full; if (frame->options & MAD_OPTION_HALFSAMPLERATE) { synth->pcm.samplerate /= 2; synth->pcm.length /= 2; synth_frame = synth_half; } synth_frame(synth, frame, nch, ns); synth->phase = (synth->phase + ns) % 16; } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/synth.h000066400000000000000000000036171466261456500247210ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: synth.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_SYNTH_H # define LIBMAD_SYNTH_H # include "fixed.h" # include "frame.h" struct mad_pcm { unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short channels; /* number of channels */ unsigned short length; /* number of samples per channel */ mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ }; struct mad_synth { mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ /* [ch][eo][peo][s][v] */ unsigned int phase; /* current processing phase */ struct mad_pcm pcm; /* PCM output */ }; /* single channel PCM selector */ enum { MAD_PCM_CHANNEL_SINGLE = 0 }; /* dual channel PCM selector */ enum { MAD_PCM_CHANNEL_DUAL_1 = 0, MAD_PCM_CHANNEL_DUAL_2 = 1 }; /* stereo PCM selector */ enum { MAD_PCM_CHANNEL_STEREO_LEFT = 0, MAD_PCM_CHANNEL_STEREO_RIGHT = 1 }; void mad_synth_init(struct mad_synth *); # define mad_synth_finish(synth) /* nothing */ void mad_synth_mute(struct mad_synth *); void mad_synth_frame(struct mad_synth *, struct mad_frame const *); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/timer.c000066400000000000000000000245021466261456500246630ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: timer.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # ifdef HAVE_ASSERT_H # include # endif # include "timer.h" mad_timer_t const mad_timer_zero = { 0, 0 }; /* * NAME: timer->compare() * DESCRIPTION: indicate relative order of two timers */ int mad_timer_compare(mad_timer_t timer1, mad_timer_t timer2) { signed long diff; diff = timer1.seconds - timer2.seconds; if (diff < 0) return -1; else if (diff > 0) return +1; diff = timer1.fraction - timer2.fraction; if (diff < 0) return -1; else if (diff > 0) return +1; return 0; } /* * NAME: timer->negate() * DESCRIPTION: invert the sign of a timer */ void mad_timer_negate(mad_timer_t *timer) { timer->seconds = -timer->seconds; if (timer->fraction) { timer->seconds -= 1; timer->fraction = MAD_TIMER_RESOLUTION - timer->fraction; } } /* * NAME: timer->abs() * DESCRIPTION: return the absolute value of a timer */ mad_timer_t mad_timer_abs(mad_timer_t timer) { if (timer.seconds < 0) mad_timer_negate(&timer); return timer; } /* * NAME: reduce_timer() * DESCRIPTION: carry timer fraction into seconds */ static void reduce_timer(mad_timer_t *timer) { timer->seconds += timer->fraction / MAD_TIMER_RESOLUTION; timer->fraction %= MAD_TIMER_RESOLUTION; } /* * NAME: gcd() * DESCRIPTION: compute greatest common denominator */ static unsigned long gcd(unsigned long num1, unsigned long num2) { unsigned long tmp; while (num2) { tmp = num2; num2 = num1 % num2; num1 = tmp; } return num1; } /* * NAME: reduce_rational() * DESCRIPTION: convert rational expression to lowest terms */ static void reduce_rational(unsigned long *numer, unsigned long *denom) { unsigned long factor; factor = gcd(*numer, *denom); assert(factor != 0); *numer /= factor; *denom /= factor; } /* * NAME: scale_rational() * DESCRIPTION: solve numer/denom == ?/scale avoiding overflowing */ static unsigned long scale_rational(unsigned long numer, unsigned long denom, unsigned long scale) { reduce_rational(&numer, &denom); reduce_rational(&scale, &denom); assert(denom != 0); if (denom < scale) return numer * (scale / denom) + numer * (scale % denom) / denom; if (denom < numer) return scale * (numer / denom) + scale * (numer % denom) / denom; return numer * scale / denom; } /* * NAME: timer->set() * DESCRIPTION: set timer to specific (positive) value */ void mad_timer_set(mad_timer_t *timer, unsigned long seconds, unsigned long numer, unsigned long denom) { timer->seconds = seconds; if (numer >= denom && denom > 0) { timer->seconds += numer / denom; numer %= denom; } switch (denom) { case 0: case 1: timer->fraction = 0; break; case MAD_TIMER_RESOLUTION: timer->fraction = numer; break; case 1000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 1000); break; case 8000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 8000); break; case 11025: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 11025); break; case 12000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 12000); break; case 16000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 16000); break; case 22050: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 22050); break; case 24000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 24000); break; case 32000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 32000); break; case 44100: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 44100); break; case 48000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 48000); break; default: timer->fraction = scale_rational(numer, denom, MAD_TIMER_RESOLUTION); break; } if (timer->fraction >= MAD_TIMER_RESOLUTION) reduce_timer(timer); } /* * NAME: timer->add() * DESCRIPTION: add one timer to another */ void mad_timer_add(mad_timer_t *timer, mad_timer_t incr) { timer->seconds += incr.seconds; timer->fraction += incr.fraction; if (timer->fraction >= MAD_TIMER_RESOLUTION) reduce_timer(timer); } /* * NAME: timer->multiply() * DESCRIPTION: multiply a timer by a scalar value */ void mad_timer_multiply(mad_timer_t *timer, signed long scalar) { mad_timer_t addend; unsigned long factor; factor = scalar; if (scalar < 0) { factor = -scalar; mad_timer_negate(timer); } addend = *timer; *timer = mad_timer_zero; while (factor) { if (factor & 1) mad_timer_add(timer, addend); mad_timer_add(&addend, addend); factor >>= 1; } } /* * NAME: timer->count() * DESCRIPTION: return timer value in selected units */ signed long mad_timer_count(mad_timer_t timer, enum mad_units units) { switch (units) { case MAD_UNITS_HOURS: return timer.seconds / 60 / 60; case MAD_UNITS_MINUTES: return timer.seconds / 60; case MAD_UNITS_SECONDS: return timer.seconds; case MAD_UNITS_DECISECONDS: case MAD_UNITS_CENTISECONDS: case MAD_UNITS_MILLISECONDS: case MAD_UNITS_8000_HZ: case MAD_UNITS_11025_HZ: case MAD_UNITS_12000_HZ: case MAD_UNITS_16000_HZ: case MAD_UNITS_22050_HZ: case MAD_UNITS_24000_HZ: case MAD_UNITS_32000_HZ: case MAD_UNITS_44100_HZ: case MAD_UNITS_48000_HZ: case MAD_UNITS_24_FPS: case MAD_UNITS_25_FPS: case MAD_UNITS_30_FPS: case MAD_UNITS_48_FPS: case MAD_UNITS_50_FPS: case MAD_UNITS_60_FPS: case MAD_UNITS_75_FPS: return timer.seconds * (signed long) units + (signed long) scale_rational(timer.fraction, MAD_TIMER_RESOLUTION, units); case MAD_UNITS_23_976_FPS: case MAD_UNITS_24_975_FPS: case MAD_UNITS_29_97_FPS: case MAD_UNITS_47_952_FPS: case MAD_UNITS_49_95_FPS: case MAD_UNITS_59_94_FPS: return (mad_timer_count(timer, -units) + 1) * 1000 / 1001; } /* unsupported units */ return 0; } /* * NAME: timer->fraction() * DESCRIPTION: return fractional part of timer in arbitrary terms */ unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom) { timer = mad_timer_abs(timer); switch (denom) { case 0: return timer.fraction ? MAD_TIMER_RESOLUTION / timer.fraction : MAD_TIMER_RESOLUTION + 1; case MAD_TIMER_RESOLUTION: return timer.fraction; default: return scale_rational(timer.fraction, MAD_TIMER_RESOLUTION, denom); } } /* * NAME: timer->string() * DESCRIPTION: write a string representation of a timer using a template */ void mad_timer_string(mad_timer_t timer, char *dest, char const *format, enum mad_units units, enum mad_units fracunits, unsigned long subparts) { unsigned long hours, minutes, seconds, sub; unsigned int frac; timer = mad_timer_abs(timer); seconds = timer.seconds; frac = sub = 0; switch (fracunits) { case MAD_UNITS_HOURS: case MAD_UNITS_MINUTES: case MAD_UNITS_SECONDS: break; case MAD_UNITS_DECISECONDS: case MAD_UNITS_CENTISECONDS: case MAD_UNITS_MILLISECONDS: case MAD_UNITS_8000_HZ: case MAD_UNITS_11025_HZ: case MAD_UNITS_12000_HZ: case MAD_UNITS_16000_HZ: case MAD_UNITS_22050_HZ: case MAD_UNITS_24000_HZ: case MAD_UNITS_32000_HZ: case MAD_UNITS_44100_HZ: case MAD_UNITS_48000_HZ: case MAD_UNITS_24_FPS: case MAD_UNITS_25_FPS: case MAD_UNITS_30_FPS: case MAD_UNITS_48_FPS: case MAD_UNITS_50_FPS: case MAD_UNITS_60_FPS: case MAD_UNITS_75_FPS: { unsigned long denom; denom = MAD_TIMER_RESOLUTION / fracunits; frac = timer.fraction / denom; sub = scale_rational(timer.fraction % denom, denom, subparts); } break; case MAD_UNITS_23_976_FPS: case MAD_UNITS_24_975_FPS: case MAD_UNITS_29_97_FPS: case MAD_UNITS_47_952_FPS: case MAD_UNITS_49_95_FPS: case MAD_UNITS_59_94_FPS: /* drop-frame encoding */ /* N.B. this is only well-defined for MAD_UNITS_29_97_FPS */ { unsigned long frame, cycle, d, m; frame = mad_timer_count(timer, fracunits); cycle = -fracunits * 60 * 10 - (10 - 1) * 2; d = frame / cycle; m = frame % cycle; frame += (10 - 1) * 2 * d; if (m > 2) frame += 2 * ((m - 2) / (cycle / 10)); frac = frame % -fracunits; seconds = frame / -fracunits; } break; } switch (units) { case MAD_UNITS_HOURS: minutes = seconds / 60; hours = minutes / 60; sprintf(dest, format, hours, (unsigned int) (minutes % 60), (unsigned int) (seconds % 60), frac, sub); break; case MAD_UNITS_MINUTES: minutes = seconds / 60; sprintf(dest, format, minutes, (unsigned int) (seconds % 60), frac, sub); break; case MAD_UNITS_SECONDS: sprintf(dest, format, seconds, frac, sub); break; case MAD_UNITS_23_976_FPS: case MAD_UNITS_24_975_FPS: case MAD_UNITS_29_97_FPS: case MAD_UNITS_47_952_FPS: case MAD_UNITS_49_95_FPS: case MAD_UNITS_59_94_FPS: if (fracunits < 0) { /* not yet implemented */ sub = 0; } /* fall through */ case MAD_UNITS_DECISECONDS: case MAD_UNITS_CENTISECONDS: case MAD_UNITS_MILLISECONDS: case MAD_UNITS_8000_HZ: case MAD_UNITS_11025_HZ: case MAD_UNITS_12000_HZ: case MAD_UNITS_16000_HZ: case MAD_UNITS_22050_HZ: case MAD_UNITS_24000_HZ: case MAD_UNITS_32000_HZ: case MAD_UNITS_44100_HZ: case MAD_UNITS_48000_HZ: case MAD_UNITS_24_FPS: case MAD_UNITS_25_FPS: case MAD_UNITS_30_FPS: case MAD_UNITS_48_FPS: case MAD_UNITS_50_FPS: case MAD_UNITS_60_FPS: case MAD_UNITS_75_FPS: sprintf(dest, format, mad_timer_count(timer, units), sub); break; } } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/timer.h000066400000000000000000000054601466261456500246720ustar00rootroot00000000000000/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: timer.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef LIBMAD_TIMER_H # define LIBMAD_TIMER_H typedef struct { signed long seconds; /* whole seconds */ unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ } mad_timer_t; extern mad_timer_t const mad_timer_zero; # define MAD_TIMER_RESOLUTION 352800000UL enum mad_units { MAD_UNITS_HOURS = -2, MAD_UNITS_MINUTES = -1, MAD_UNITS_SECONDS = 0, /* metric units */ MAD_UNITS_DECISECONDS = 10, MAD_UNITS_CENTISECONDS = 100, MAD_UNITS_MILLISECONDS = 1000, /* audio sample units */ MAD_UNITS_8000_HZ = 8000, MAD_UNITS_11025_HZ = 11025, MAD_UNITS_12000_HZ = 12000, MAD_UNITS_16000_HZ = 16000, MAD_UNITS_22050_HZ = 22050, MAD_UNITS_24000_HZ = 24000, MAD_UNITS_32000_HZ = 32000, MAD_UNITS_44100_HZ = 44100, MAD_UNITS_48000_HZ = 48000, /* video frame/field units */ MAD_UNITS_24_FPS = 24, MAD_UNITS_25_FPS = 25, MAD_UNITS_30_FPS = 30, MAD_UNITS_48_FPS = 48, MAD_UNITS_50_FPS = 50, MAD_UNITS_60_FPS = 60, /* CD audio frames */ MAD_UNITS_75_FPS = 75, /* video drop-frame units */ MAD_UNITS_23_976_FPS = -24, MAD_UNITS_24_975_FPS = -25, MAD_UNITS_29_97_FPS = -30, MAD_UNITS_47_952_FPS = -48, MAD_UNITS_49_95_FPS = -50, MAD_UNITS_59_94_FPS = -60 }; # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) int mad_timer_compare(mad_timer_t, mad_timer_t); # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) void mad_timer_negate(mad_timer_t *); mad_timer_t mad_timer_abs(mad_timer_t); void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long); void mad_timer_add(mad_timer_t *, mad_timer_t); void mad_timer_multiply(mad_timer_t *, signed long); signed long mad_timer_count(mad_timer_t, enum mad_units); unsigned long mad_timer_fraction(mad_timer_t, unsigned long); void mad_timer_string(mad_timer_t, char *, char const *, enum mad_units, enum mad_units, unsigned long); # endif alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/xing.c000066400000000000000000000040101466261456500245000ustar00rootroot00000000000000/* * mad - MPEG audio decoder * Copyright (C) 2000-2001 Robert Leslie * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: xing.c 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif #include # include "xing.h" # define XING_MAGIC (('X' << 24) | ('i' << 16) | ('n' << 8) | 'g') /* * NAME: xing->init() * DESCRIPTION: initialize Xing structure */ void xing_init(struct xing *xing) { xing->flags = 0; } /* * NAME: xing->parse() * DESCRIPTION: parse a Xing VBR header */ int xing_parse(struct xing *xing, struct mad_bitptr ptr, unsigned int bitlen) { if (bitlen < 64 || mad_bit_read(&ptr, 32) != XING_MAGIC) goto fail; xing->flags = mad_bit_read(&ptr, 32); bitlen -= 64; if (xing->flags & XING_FRAMES) { if (bitlen < 32) goto fail; xing->frames = mad_bit_read(&ptr, 32); bitlen -= 32; } if (xing->flags & XING_BYTES) { if (bitlen < 32) goto fail; xing->bytes = mad_bit_read(&ptr, 32); bitlen -= 32; } if (xing->flags & XING_TOC) { int i; if (bitlen < 800) goto fail; for (i = 0; i < 100; ++i) xing->toc[i] = mad_bit_read(&ptr, 8); bitlen -= 800; } if (xing->flags & XING_SCALE) { if (bitlen < 32) goto fail; xing->scale = mad_bit_read(&ptr, 32); bitlen -= 32; } return 0; fail: xing->flags = 0; return -1; } alsaplayer-0.99.82/attic/experimental/obsolete/input/mad/xing.h000066400000000000000000000025771466261456500245250ustar00rootroot00000000000000/* * mad - MPEG audio decoder * Copyright (C) 2000-2001 Robert Leslie * * This file is part of AlsaPlayer. * * AlsaPlayer 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 3 of the License, or * (at your option) any later version. * * AlsaPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id: xing.h 1252 2007-07-08 15:46:19Z dominique_libre $ */ # ifndef XING_H # define XING_H # include "mad.h" struct xing { long flags; /* valid fields (see below) */ unsigned long frames; /* total number of frames */ unsigned long bytes; /* total number of bytes */ unsigned char toc[100]; /* 100-point seek table */ long scale; /* ?? */ }; enum { XING_FRAMES = 0x00000001L, XING_BYTES = 0x00000002L, XING_TOC = 0x00000004L, XING_SCALE = 0x00000008L }; void xing_init(struct xing *); # define xing_finish(xing) /* nothing */ int xing_parse(struct xing *, struct mad_bitptr, unsigned int); # endif alsaplayer-0.99.82/attic/experimental/obsolete/interface/000077500000000000000000000000001466261456500234345ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/Makefile.am000066400000000000000000000000441466261456500254660ustar00rootroot00000000000000SUBDIRS = gtk gtk2 text daemon xosd alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/000077500000000000000000000000001466261456500242215ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/EffectsWindow.cpp000066400000000000000000000045051466261456500275000ustar00rootroot00000000000000/* EffectsWindow.cpp * Copyright (C) 1998 Andy Lo A Foe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "EffectsWindow.h" #include "support.h" #include "gladesrc.h" #include "gtk_interface.h" extern int global_effects_show; extern int global_reverb_delay; extern int global_reverb_feedback; void effects_scale_cb(GtkWidget *widget, GdkEvent *, gpointer data) { GtkAdjustment *adj; gint *val; val = (gint *)data; adj = GTK_RANGE(widget)->adjustment; *val = (gint) adj->value; } void effects_delete_event(GtkWidget *widget, GdkEvent *, gpointer data) { gint x, y; static gint e_windows_x_offset = 0; static gint e_windows_y_offset = 0; gdk_window_get_origin(widget->window, &x, &y); if (windows_x_offset >= 0) { x -= e_windows_x_offset; y -= e_windows_y_offset; } gtk_widget_hide(widget); gtk_widget_set_uposition(widget, x, y); global_effects_show = 0; } void reverb_off(GtkWidget *, gpointer data) { GtkWidget *feedback_scale; GtkAdjustment *adj; feedback_scale = get_widget(GTK_WIDGET(data), "feedback_scale"); adj = GTK_RANGE(feedback_scale)->adjustment; gtk_adjustment_set_value(adj, 0.0); global_reverb_feedback = 0; } GtkWidget *init_effects_window() { GtkWidget *effects_window; effects_window = create_effects_window(); // Close/delete signals gtk_signal_connect(GTK_OBJECT(effects_window), "destroy", GTK_SIGNAL_FUNC(effects_delete_event), NULL); gtk_signal_connect(GTK_OBJECT(effects_window), "delete_event", GTK_SIGNAL_FUNC(effects_delete_event), NULL); return effects_window; } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/EffectsWindow.h000066400000000000000000000016551466261456500271500ustar00rootroot00000000000000/* EffectsWindow.h * Copyright (C) 1998 Andy Lo A Foe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __EffectsWindow_h__ #define __EffectsWindow_h__ #include extern GtkWidget *init_effects_window(); #endif alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/Makefile.am000066400000000000000000000015711466261456500262610ustar00rootroot00000000000000SUBDIRS = pixmaps gui if HAVE_GTK gtk_interfaceltlibs = libgtk_interface.la gtk_interfaceldflags = -export-dynamic -avoid-version gtk_interfacesources = EffectsWindow.cpp PlaylistWindow.cpp ScopesWindow.h \ gtk.cpp support.cpp EffectsWindow.h PlaylistWindow.h \ gladesrc.cpp ScopesWindow.cpp gladesrc.h support.h \ gtk_interface.cpp gtk_interface.h else gtk_interfaceltlibs = gtk_interfaceldflags = gtk_interfacesources = endif lib_LTLIBRARIES = $(gtk_interfaceltlibs) COMMON_FLAGS = @DFLAGS@ @ARCH_CFLAGS@ AM_CXXFLAGS = -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @GLIB_CFLAGS@ @GTK_CFLAGS@ $(COMMON_FLAGS) \ -D_REENTRANT -DADDON_DIR=\"$(ADDON_DIR)\" AM_CFLAGS = $(CXXFLAGS) libdir = $(ADDON_DIR)/interface libgtk_interface_la_LDFLAGS = $(gtk_interfaceldflags) libgtk_interface_la_LIBADD = @GTK_LIBS@ @GLIB_LIBS@ libgtk_interface_la_SOURCES= $(gtk_interfacesources) alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/PlaylistWindow.cpp000066400000000000000000000646421466261456500277320ustar00rootroot00000000000000/* PlayListWindow.cpp - playlist window 'n stuff * Copyright (C) 1998 Andy Lo A Foe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "AlsaPlayer.h" #include "Playlist.h" #include "PlaylistWindow.h" #include "support.h" #include "gladesrc.h" #include "gtk_interface.h" #include "utilities.h" #include "prefs.h" #include "alsaplayer_error.h" #include "control.h" // Forward declarations static GtkWidget *init_playlist_window(PlaylistWindowGTK *, Playlist *pl); static void new_list_item(const PlayItem *item, gchar **list_item); static int current_entry = -1; void playlist_play_current(Playlist *playlist, GtkWidget *gtklist); void dialog_popup(GtkWidget *widget, gpointer data); // Drag & Drop stuff #define TARGET_URI_LIST 0x0001 static GtkTargetEntry drag_types[] = { {"text/uri-list", 0, TARGET_URI_LIST} }; static int n_drag_types = sizeof(drag_types)/sizeof(drag_types[0]); // Member functions PlaylistWindowGTK::PlaylistWindowGTK(Playlist * pl) { playlist = pl; //alsaplayer_error("PlaylistWindowGTK constructor entered"); playlist_window = init_playlist_window(this, pl); playlist_list = get_widget(playlist_window, "playlist"); playlist_status = (GtkLabel *) gtk_object_get_data(GTK_OBJECT(playlist_list), "status"); showing = false; pthread_mutex_init(&playlist_list_mutex, NULL); memset(&pli, 0, sizeof(playlist_interface)); pli.cbsetcurrent = CbSetCurrent; pli.cbupdated = CbUpdated; pli.cbinsert = CbInsert; pli.cbremove = CbRemove; pli.cbclear = CbClear; pli.data = this; GDK_THREADS_LEAVE(); playlist->Register(&pli); GDK_THREADS_ENTER(); } PlaylistWindowGTK::~PlaylistWindowGTK() { prefs_set_bool(ap_prefs, "gtk_interface", "playlist_active", showing); Hide(); gtk_clist_clear(GTK_CLIST(playlist_list)); playlist->UnRegister(&pli); // XXX } #include "pixmaps/current_play.xpm" #include "pixmaps/current_stop.xpm" static GdkPixmap *current_play_pix = (GdkPixmap *)NULL; static GdkBitmap *current_play_mask = (GdkBitmap *)NULL; static GdkPixmap *current_stop_pix = (GdkPixmap *)NULL; static GdkBitmap *current_stop_mask = (GdkBitmap *)NULL; // Set item currently playing void PlaylistWindowGTK::CbSetCurrent(void *data, unsigned current) { PlaylistWindowGTK *gtkpl = (PlaylistWindowGTK *)data; GtkStyle *style; GDK_THREADS_ENTER(); if (!current_play_pix) { style = gtk_widget_get_style(GTK_WIDGET(gtkpl->playlist_list)); if (!GTK_WIDGET(gtkpl->playlist_window)->window) { gtk_widget_realize(gtkpl->playlist_window); gdk_flush(); } current_play_pix = gdk_pixmap_create_from_xpm_d( GTK_WIDGET(gtkpl->playlist_window)->window, ¤t_play_mask, &style->bg[GTK_STATE_NORMAL], current_play_xpm); current_stop_pix = gdk_pixmap_create_from_xpm_d( GTK_WIDGET(gtkpl->playlist_window)->window, ¤t_stop_mask, &style->bg[GTK_STATE_NORMAL], current_stop_xpm); } else { gtk_clist_set_text(GTK_CLIST(gtkpl->playlist_list), current_entry - 1, 0, ""); } current_entry = current; gtk_clist_set_pixmap(GTK_CLIST(gtkpl->playlist_list), current_entry - 1, 0, current_play_pix, current_play_mask); GDK_THREADS_LEAVE(); } void PlaylistWindowGTK::CbUpdated(void *data,PlayItem & item, unsigned position) { PlaylistWindowGTK *gtkpl = (PlaylistWindowGTK *)data; char tmp[1024]; //alsaplayer_error("About to lock list"); pthread_mutex_lock(>kpl->playlist_list_mutex); //alsaplayer_error("Locked"); GDK_THREADS_ENTER(); gtk_clist_freeze(GTK_CLIST(gtkpl->playlist_list)); if (item.title.size()) { std::string s = item.title; if (item.artist.size()) { s += std::string(" - ") + item.artist; } gtk_clist_set_text(GTK_CLIST(gtkpl->playlist_list), position, 1, g_strdup(s.c_str())); } if (item.playtime >= 0) { sprintf(tmp, "%02d:%02d", item.playtime / 60, item.playtime % 60); gtk_clist_set_text(GTK_CLIST(gtkpl->playlist_list), position, 2, g_strdup(tmp)); } gtk_clist_thaw(GTK_CLIST(gtkpl->playlist_list)); GDK_THREADS_LEAVE(); pthread_mutex_unlock(>kpl->playlist_list_mutex); } // Insert new items into the displayed list void PlaylistWindowGTK::CbInsert(void *data,std::vector & items, unsigned position) { PlaylistWindowGTK *gtkpl = (PlaylistWindowGTK *)data; //alsaplayer_error("CbInsert(`%d items', %d)", items.size(), position); pthread_mutex_lock(>kpl->playlist_list_mutex); GDK_THREADS_ENTER(); std::vector item_copy = items; gtk_clist_freeze(GTK_CLIST(gtkpl->playlist_list)); if(items.size() > 0) { std::vector::const_iterator item; for(item = items.begin(); item != items.end(); item++, position++) { // Make a new item gchar *list_item[4]; new_list_item(&(*item), list_item); // Add it to the playlist int index = gtk_clist_insert(GTK_CLIST(gtkpl->playlist_list), position, list_item); gtk_clist_set_shift(GTK_CLIST(gtkpl->playlist_list), index, 1, 2, 2); gtk_clist_set_shift(GTK_CLIST(gtkpl->playlist_list), index, 2, 2, 2); index ++; } } gtk_clist_thaw(GTK_CLIST(gtkpl->playlist_list)); GDK_THREADS_LEAVE(); pthread_mutex_unlock(>kpl->playlist_list_mutex); } // Remove items from start to end void PlaylistWindowGTK::CbRemove(void *data, unsigned start, unsigned end) { PlaylistWindowGTK *gtkpl = (PlaylistWindowGTK *)data; pthread_mutex_lock(>kpl->playlist_list_mutex); GDK_THREADS_ENTER(); gtk_clist_freeze(GTK_CLIST(gtkpl->playlist_list)); unsigned i = start; while(i <= end) { gtk_clist_remove(GTK_CLIST(gtkpl->playlist_list), start - 1); i++; } gtk_clist_thaw(GTK_CLIST(gtkpl->playlist_list)); GDK_THREADS_LEAVE(); pthread_mutex_unlock(>kpl->playlist_list_mutex); } // Clear the displayed list void PlaylistWindowGTK::CbClear(void *data) { PlaylistWindowGTK *gtkpl = (PlaylistWindowGTK *)data; pthread_mutex_lock(>kpl->playlist_list_mutex); GDK_THREADS_ENTER(); gtk_clist_clear(GTK_CLIST(gtkpl->playlist_list)); GDK_THREADS_LEAVE(); pthread_mutex_unlock(>kpl->playlist_list_mutex); } // Show the playlist void PlaylistWindowGTK::Show() { if(!showing) { gtk_widget_show(playlist_window); showing = true; } } // Hide the playlist void PlaylistWindowGTK::Hide() { if(showing) { gint x, y; gdk_window_get_origin(playlist_window->window, &x, &y); if (windows_x_offset >= 0) { x -= windows_x_offset; y -= windows_y_offset; } gtk_widget_hide(playlist_window); gtk_widget_set_uposition(playlist_window, x, y); showing = false; } } // Toggle visibility void PlaylistWindowGTK::ToggleVisible() { if (showing) { Hide(); } else { Show(); } } // Called when "prev" button is pressed extern void playlist_window_gtk_prev(GtkWidget *, gpointer data) { Playlist * playlist = (Playlist *) data; if(playlist) { playlist->Pause(); GDK_THREADS_LEAVE(); playlist->Prev(); GDK_THREADS_ENTER(); playlist->UnPause(); } } // Called when "next" button is pressed void playlist_window_gtk_next(GtkWidget *widget, gpointer data) { Playlist * playlist = (Playlist *) data; if(playlist) { playlist->Pause(); GDK_THREADS_LEAVE(); playlist->Next(); GDK_THREADS_ENTER(); playlist->UnPause(); } } // Called when playlist is clicked to select an item void playlist_click(GtkWidget *widget, gint /* row */, gint /* column */, GdkEvent *bevent, gpointer data) { Playlist *playlist = (Playlist *) data; GtkWidget *win = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(widget), "window"); if (win && (bevent && bevent->type == GDK_2BUTTON_PRESS)) { // Double click - play from the clicked item playlist_play_current(playlist, widget); } } void playlist_play_current(Playlist *playlist, GtkWidget *list) { int selected; if (!GTK_CLIST(list)->selection) return; selected = GPOINTER_TO_INT(GTK_CLIST(list)->selection->data); GDK_THREADS_LEAVE(); playlist->Pause(); playlist->Play(selected + 1); playlist->UnPause(); GDK_THREADS_ENTER(); } // Called when remove button is clicked void playlist_remove(GtkWidget *, gpointer data) { PlaylistWindowGTK *playlist_window_gtk = (PlaylistWindowGTK *) data; Playlist *playlist = NULL; GtkWidget *list = NULL; GList *next, *start; if (playlist_window_gtk) { playlist = playlist_window_gtk->GetPlaylist(); } else return; list = playlist_window_gtk->GetPlaylist_list(); if (playlist && list) { int selected = 0; next = start = GTK_CLIST(list)->selection; if (next == NULL) { // Nothing was selected return; } while (next->next != NULL) { next = next->next; } while (next != start->prev) { selected = GPOINTER_TO_INT(next->data); GDK_THREADS_LEAVE(); if (playlist->GetCurrent() == selected+1) { playlist->Stop(); playlist->Next(); } if (playlist->Length() == (selected+1)) { gtk_clist_unselect_row(GTK_CLIST(list), selected, 0); //alsaplayer_error("Early trigger"); } playlist->Remove(selected+1, selected+1); GDK_THREADS_ENTER(); next = next->prev; } if (playlist->Length() == selected) { selected--; } gtk_clist_select_row(GTK_CLIST(list), selected, 0); } } // Called when shuffle button clicked void shuffle_cb(GtkWidget *, gpointer data) { Playlist *playlist = (Playlist *)data; if (playlist) { GDK_THREADS_LEAVE(); playlist->Shuffle(); GDK_THREADS_ENTER(); } } // Called when clear button clicked void clear_cb(GtkWidget *widget, gpointer data) { Playlist *playlist = (Playlist *)data; if (playlist) { GDK_THREADS_LEAVE(); playlist->Clear(); GDK_THREADS_ENTER(); } } gint list_resize(GtkWidget *widget, GdkEventConfigure *, gpointer data) { GtkWidget *list = (GtkWidget *)data; GtkWidget *window; static gint old_width = -1; gint w, h; window = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(list), "window"); if (list) { // For some reason the clist widget is always a few events // behind reality. What fun! :-( if (widget->allocation.width != old_width) { if (window) { gdk_window_get_size(window->window, &w, &h); //alsaplayer_error("(%d, %d)", w, h); gtk_clist_set_column_width(GTK_CLIST(list), 1, w-200); } } old_width = widget->allocation.width; } return 0; } // Called when window gets closed, so we don't try to close it again later. static gboolean playlist_delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) { PlaylistWindowGTK * playlist_window_gtk = (PlaylistWindowGTK *) data; if (playlist_window_gtk) { playlist_window_gtk->Hide(); } return TRUE; } void close_cb(GtkWidget *, gpointer data) { PlaylistWindowGTK * playlist_window_gtk = (PlaylistWindowGTK *) data; if (playlist_window_gtk) { playlist_window_gtk->Hide(); } } // Make a new item to go in the list static void new_list_item(const PlayItem *item, gchar **list_item) { gchar *dirname; gchar *filename; gchar *new_path = (gchar *)g_strdup(item->filename.c_str()); char pt[1024]; list_item[0] = NULL; if (item->playtime >= 0) { sprintf(pt, "%02d:%02d", (item->playtime > 0) ? item->playtime / 60 : 0, (item->playtime > 0) ? item->playtime % 60 : 0); } else { sprintf(pt, "00:00"); } list_item[2] = (gchar *)g_strdup(pt); // Strip directory names dirname = strrchr(new_path, '/'); if (dirname) { dirname++; filename = (gchar *)g_strdup(dirname); } else filename = (gchar *)g_strdup(new_path); if (item->title.size()) { std::string s = item->title; if (item->artist.size()) { s += std::string(" - ") + item->artist; } list_item[1] = (gchar *)g_strdup(s.c_str()); } else { list_item[1] = (gchar *)g_strdup(filename); } // Put data in list_item list_item[3] = new_path; } // Called when files have been selected for adding to playlist void add_file_ok(GtkWidget *, gpointer data) { gchar *sel; PlaylistWindowGTK * playlist_window_gtk = (PlaylistWindowGTK *) data; GtkWidget *add_file = playlist_window_gtk->add_file; GtkCList *file_list = GTK_CLIST(GTK_FILE_SELECTION(add_file)->file_list); Playlist *playlist = playlist_window_gtk->GetPlaylist(); GList *next = file_list->selection; if (!playlist) { return; } gchar *current_dir = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(add_file))); int marker = strlen(current_dir)-1; while (marker > 0 && current_dir[marker] != '/') // Get rid of the filename current_dir[marker--] = '\0'; prefs_set_string(ap_prefs, "gtk_interface", "default_playlist_add_path", current_dir); std::vector paths; if (!next) { sel = g_strdup(gtk_entry_get_text(GTK_ENTRY(GTK_FILE_SELECTION(add_file)->selection_entry))); if (sel && strlen(sel)) { if (!strstr(sel, "http://")) paths.push_back(std::string(current_dir) + "/" + sel); else paths.push_back(sel); GDK_THREADS_LEAVE(); playlist->Insert(paths, playlist->Length()); GDK_THREADS_ENTER(); g_free(sel); } gtk_entry_set_text(GTK_ENTRY(GTK_FILE_SELECTION(add_file)->selection_entry), ""); return; } while (next) { // Walk the selection list char *path; int index = GPOINTER_TO_INT(next->data); gtk_clist_get_text(file_list, index, 0, &path); if (path) { paths.push_back(std::string(current_dir) + "/" + path); } next = next->next; } sort(paths.begin(), paths.end()); gtk_clist_unselect_all(file_list); // Clear selection g_free(current_dir); // Insert all the selected paths if (playlist) { GDK_THREADS_LEAVE(); playlist->Insert(paths, playlist->Length()); GDK_THREADS_ENTER(); } else { printf("No Playlist data found\n"); } } // Called when a file has been selected to be loaded as a playlist void load_list_ok(GtkWidget *, gpointer data) { PlaylistWindowGTK *playlist_window_gtk = (PlaylistWindowGTK *)data; //gtk_widget_hide(GTK_WIDGET(playlist_window_gtk->load_list)); Playlist *playlist = playlist_window_gtk->GetPlaylist(); enum plist_result loaderr; gchar *current_dir = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(playlist_window_gtk->load_list))); int marker = strlen(current_dir)-1; while (marker > 0 && current_dir[marker] != '/') // Get rid of the filename current_dir[marker--] = '\0'; prefs_set_string(ap_prefs, "gtk_interface", "default_playlist_load_path", current_dir); g_free(current_dir); std::string file(gtk_file_selection_get_filename( GTK_FILE_SELECTION(playlist_window_gtk->load_list))); GDK_THREADS_LEAVE(); loaderr = playlist->Load(file, playlist->Length(), false); GDK_THREADS_ENTER(); if(loaderr == E_PL_DUBIOUS) { // FIXME - pop up a dialog and check if we really want to load alsaplayer_error("Dubious whether file is a playlist - trying anyway"); GDK_THREADS_LEAVE(); loaderr = playlist->Load(file, playlist->Length(), true); GDK_THREADS_ENTER(); } if(loaderr) { // FIXME - pass playlist_window to this routine } } void save_list_ok(GtkWidget *, gpointer data) { PlaylistWindowGTK *playlist_window_gtk = (PlaylistWindowGTK *)data; gtk_widget_hide(GTK_WIDGET(playlist_window_gtk->save_list)); Playlist *playlist = playlist_window_gtk->GetPlaylist(); gchar *current_dir = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(playlist_window_gtk->save_list))); int marker = strlen(current_dir)-1; while (marker > 0 && current_dir[marker] != '/') // Get rid of the filename current_dir[marker--] = '\0'; prefs_set_string(ap_prefs, "gtk_interface", "default_playlist_save_path", current_dir); std::string file(gtk_file_selection_get_filename( GTK_FILE_SELECTION(playlist_window_gtk->save_list))); enum plist_result saveerr; saveerr = playlist->Save(file, PL_FORMAT_M3U); if(saveerr) { // FIXME - pass playlist_window to this routine } else { // FIXME - pass playlist_window to this routine } } // // Old stuff below here - this needs to be sorted out // void dialog_cancel(GtkWidget *, gpointer data) { GtkWidget *dialog = (GtkWidget *)data; gtk_widget_hide(dialog); } void dialog_delete(GtkWidget *widget, GdkEvent *event, gpointer data) { gtk_widget_hide(widget); } void playlist_window_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data) { PlaylistWindowGTK *playlist_window_gtk = (PlaylistWindowGTK *) data; Playlist *playlist = NULL; GtkWidget *list = NULL; playlist = playlist_window_gtk->GetPlaylist(); list = playlist_window_gtk->GetPlaylist_list(); //alsaplayer_error("Key pressed!"); switch(event->keyval) { case GDK_Insert: dialog_popup(widget, (gpointer) playlist_window_gtk->add_file); break; case GDK_Delete: playlist_remove(widget, data); break; case GDK_Return: playlist_play_current(playlist, list); break; case GDK_Right: // This is a hack, but quite legal ap_set_position_relative(global_session_id, 10); break; case GDK_Left: ap_set_position_relative(global_session_id, -10); break; default: break; } } void dialog_popup(GtkWidget *, gpointer data) { GtkWidget *dialog = (GtkWidget *)data; gtk_widget_show(dialog); } void key_press_event(GtkWidget *, GdkEvent *event, gpointer data) { //printf("Key down\n"); } void button_press_event(GtkWidget *widget, GdkEvent *, gpointer data) { gtk_widget_grab_focus(widget); } gint dnd_drop_event(GtkWidget *widget, GdkDragContext * context, gint /* x */, gint /* y */, GtkSelectionData *selection_data, guint info, guint * /* time */, void * /* data */) { char *uri = NULL; char *filename = NULL; char *p, *s, *res; if (!selection_data) return 0; switch(info) { case TARGET_URI_LIST: //alsaplayer_error("TARGET_URI_LIST drop (%d,%d)", x, y); uri = (char *)malloc(strlen((const char *)selection_data->data)+1); strcpy(uri, (const char *)selection_data->data); filename = uri; while (filename) { if ((p=s=strstr(filename, "\r\n"))) { *s = '\0'; p = s+2; } if (strlen(filename)) { //alsaplayer_error("Adding: %s", filename); res = parse_file_uri(filename); if (res) { GDK_THREADS_LEAVE(); if (is_playlist(res)) { ap_add_playlist(global_session_id, res); } else { ap_add_path(global_session_id, res); } GDK_THREADS_ENTER(); parse_file_uri_free(res); } } filename = p; } free(uri); break; default: alsaplayer_error("Unknown drop!"); break; } return 1; } static GtkWidget *init_playlist_window(PlaylistWindowGTK *playlist_window_gtk, Playlist *playlist) { GtkWidget *playlist_window; GtkWidget *working; GtkWidget *list; GtkWidget *list_status; GtkWidget *status; GtkWidget *toplevel; GtkStyle *style; GdkFont *bold_font; bold_font = gdk_font_load("-adobe-helvetica-bold-r-normal--12-*-*-*-*-*-*-*"); if (!bold_font) assert ((bold_font = gdk_fontset_load("fixed")) != NULL); playlist_window = create_playlist_window(); toplevel = gtk_widget_get_toplevel(playlist_window); list = get_widget(playlist_window, "playlist"); gtk_object_set_data(GTK_OBJECT(list), "window", playlist_window); gtk_object_set_data(GTK_OBJECT(playlist_window), "list", list); gtk_object_set_data(GTK_OBJECT(playlist_window), "Playlist", playlist); list_status = get_widget(playlist_window, "playlist_status"); status = gtk_label_new(""); style = gtk_style_copy(gtk_widget_get_style(status)); gdk_font_unref(style->font); style->font = bold_font; gdk_font_ref(style->font); gtk_widget_set_style(GTK_WIDGET(status), style); gtk_widget_show(status); gtk_box_pack_start(GTK_BOX(list_status), status, true, false, 1); gtk_object_set_data(GTK_OBJECT(list), "status", status); style = gtk_style_copy(gtk_widget_get_style(list)); gtk_widget_set_style(GTK_WIDGET(list), style); gtk_clist_set_column_width(GTK_CLIST(list), 0, 16); gtk_clist_set_column_max_width(GTK_CLIST(list), 0, 16); gtk_clist_set_column_min_width(GTK_CLIST(list), 1, 250); gtk_clist_set_column_width(GTK_CLIST(list), 2, 24); gtk_clist_set_column_max_width(GTK_CLIST(list), 2, 24); gtk_clist_set_row_height(GTK_CLIST(list), 20); gtk_signal_connect(GTK_OBJECT(playlist_window), "configure_event", GTK_SIGNAL_FUNC(list_resize), list); gtk_signal_connect(GTK_OBJECT(playlist_window), "destroy", GTK_SIGNAL_FUNC(playlist_delete_event), (gpointer)playlist_window_gtk); gtk_signal_connect(GTK_OBJECT(playlist_window), "delete_event", GTK_SIGNAL_FUNC(playlist_delete_event), (gpointer)playlist_window_gtk); playlist_window_gtk->add_file = gtk_file_selection_new("Add files or URLs"); gtk_file_selection_set_filename(GTK_FILE_SELECTION(playlist_window_gtk->add_file), prefs_get_string(ap_prefs, "gtk_interface", "default_playlist_add_path", "/")); playlist_window_gtk->load_list = gtk_file_selection_new("Load Playlist"); gtk_file_selection_set_filename(GTK_FILE_SELECTION(playlist_window_gtk->load_list), prefs_get_string(ap_prefs, "gtk_interface", "default_playlist_load_path", "/")); playlist_window_gtk->save_list = gtk_file_selection_new("Save Playlist"); gtk_file_selection_set_filename(GTK_FILE_SELECTION(playlist_window_gtk->save_list), prefs_get_string(ap_prefs, "gtk_interface", "default_playlist_save_path", "/")); GtkCList *file_list = GTK_CLIST(GTK_FILE_SELECTION(playlist_window_gtk->add_file)->file_list); gtk_clist_set_selection_mode(file_list, GTK_SELECTION_EXTENDED); gtk_object_set_data(GTK_OBJECT(playlist_window_gtk->add_file), "list", list); gtk_object_set_data(GTK_OBJECT(playlist_window_gtk->save_list), "list", list); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(playlist_window_gtk->add_file)); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(playlist_window_gtk->load_list)); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(playlist_window_gtk->save_list)); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(playlist_window_gtk->add_file)->cancel_button), "clicked", GTK_SIGNAL_FUNC(dialog_cancel), (gpointer)playlist_window_gtk->add_file); gtk_signal_connect(GTK_OBJECT(playlist_window_gtk->add_file), "delete_event", GTK_SIGNAL_FUNC(dialog_delete), NULL); // Shortcut keys gtk_signal_connect(GTK_OBJECT(playlist_window), "key-press-event", GTK_SIGNAL_FUNC(playlist_window_keypress), (gpointer)playlist_window_gtk); // Modify button text of add_file dialog gtk_object_set(GTK_OBJECT( GTK_FILE_SELECTION(playlist_window_gtk->add_file)->ok_button), "label", "Add", NULL); gtk_object_set(GTK_OBJECT( GTK_FILE_SELECTION(playlist_window_gtk->add_file)->cancel_button), "label", "Close", NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(playlist_window_gtk->add_file)->ok_button), "clicked", GTK_SIGNAL_FUNC(add_file_ok), (gpointer)playlist_window_gtk); // Modify button text of load_list dialog gtk_object_set(GTK_OBJECT( GTK_FILE_SELECTION(playlist_window_gtk->load_list)->cancel_button), "label", "Close", NULL); gtk_object_set(GTK_OBJECT( GTK_FILE_SELECTION(playlist_window_gtk->load_list)->ok_button), "label", "Load", NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(playlist_window_gtk->load_list)->cancel_button), "clicked", GTK_SIGNAL_FUNC(dialog_cancel), (gpointer)playlist_window_gtk->load_list); gtk_signal_connect(GTK_OBJECT(playlist_window_gtk->load_list), "delete_event", GTK_SIGNAL_FUNC(dialog_delete), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(playlist_window_gtk->load_list)->ok_button), "clicked", GTK_SIGNAL_FUNC(load_list_ok), (gpointer)playlist_window_gtk); // MOdify button text of save_list dialog gtk_object_set(GTK_OBJECT( GTK_FILE_SELECTION(playlist_window_gtk->save_list)->cancel_button), "label", "Close", NULL); gtk_object_set(GTK_OBJECT( GTK_FILE_SELECTION(playlist_window_gtk->save_list)->ok_button), "label", "Save", NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(playlist_window_gtk->save_list)->cancel_button), "clicked", GTK_SIGNAL_FUNC(dialog_cancel), (gpointer)playlist_window_gtk->save_list); gtk_signal_connect(GTK_OBJECT(playlist_window_gtk->save_list), "delete_event", GTK_SIGNAL_FUNC(dialog_delete), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(playlist_window_gtk->save_list)->ok_button), "clicked", GTK_SIGNAL_FUNC(save_list_ok), (gpointer)playlist_window_gtk); working = get_widget(playlist_window, "shuffle_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(shuffle_cb), playlist); working = get_widget(playlist_window, "add_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(dialog_popup), (gpointer)playlist_window_gtk->add_file); working = get_widget(playlist_window, "clear_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(clear_cb), playlist); gtk_signal_connect(GTK_OBJECT(list), "key_press_event", GTK_SIGNAL_FUNC(key_press_cb), list); gtk_signal_connect(GTK_OBJECT(list), "button_press_event", GTK_SIGNAL_FUNC(button_press_event), list); gtk_signal_connect(GTK_OBJECT(list), "select_row", GTK_SIGNAL_FUNC(playlist_click), playlist); working = get_widget(playlist_window, "del_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(playlist_remove), (gpointer)playlist_window_gtk); working = get_widget(playlist_window, "close_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(close_cb), (gpointer)playlist_window_gtk); working = get_widget(playlist_window, "save_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(dialog_popup), (gpointer)playlist_window_gtk->save_list); working = get_widget(playlist_window, "load_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(dialog_popup), (gpointer)playlist_window_gtk->load_list); // Setup drag & drop gtk_drag_dest_set(toplevel, GTK_DEST_DEFAULT_ALL, drag_types, n_drag_types, (GdkDragAction) (GDK_ACTION_MOVE | GDK_ACTION_COPY)); gtk_signal_connect(GTK_OBJECT(toplevel), "drag_data_received", GTK_SIGNAL_FUNC(dnd_drop_event), NULL); gtk_widget_grab_focus(GTK_WIDGET(list)); return playlist_window; } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/PlaylistWindow.h000066400000000000000000000041731466261456500273700ustar00rootroot00000000000000/* PlaylistWindow.h * Copyright (C) 1999 Andy Lo A Foe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PlaylistWindow_h__ #define __PlaylistWindow_h__ #include "Playlist.h" #include extern void playlist_window_gtk_prev(GtkWidget *, gpointer); extern void playlist_window_gtk_next(GtkWidget *, gpointer); class PlaylistWindowGTK { private: playlist_interface pli; Playlist * playlist; GtkWidget * playlist_window; // The window containing the list GtkWidget * playlist_list; // The list itself GtkLabel * playlist_status; // Label giving status of list pthread_mutex_t playlist_list_mutex; // Mutex for list bool showing; public: PlaylistWindowGTK(Playlist *); ~PlaylistWindowGTK(); GtkWidget *add_file; GtkWidget *save_list; GtkWidget *load_list; // Callbacks called by playlist when its state changes static void CbSetCurrent(void *,unsigned); static void CbInsert(void *,std::vector &, unsigned); static void CbUpdated(void *,PlayItem &, unsigned); static void CbRemove(void *, unsigned, unsigned); static void CbLock(void *); static void CbUnlock(void *); static void CbClear(void *); // Other methods Playlist *GetPlaylist() { return playlist; } GtkWidget *GetPlaylist_list() { return playlist_list; } void Show(); // Show the playlist window void Hide(); // Hide the playlist window void ToggleVisible(); // Show / Hide the playlist window }; #endif alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/ScopesWindow.cpp000066400000000000000000000321641466261456500273570ustar00rootroot00000000000000/* ScopesWindow.cpp * Copyright (C) 1999-2002 Andy Lo A Foe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: ScopesWindow.cpp 954 2003-04-08 15:23:31Z adnans $ * */ #include "ScopesWindow.h" #include "CorePlayer.h" #include "Effects.h" #include "support.h" #include "gladesrc.h" #include "gtk_interface.h" #include "pixmaps/note.xpm" #include "alsaplayer_error.h" #include "alsaplayer_fft.h" #include "prefs.h" #include #include #include extern int global_scopes_show; static GtkWidget *scopes_window = (GtkWidget *)NULL; static GdkPixmap *active_pix = (GdkPixmap *)NULL; static GdkBitmap *active_mask = (GdkBitmap *)NULL; static scope_entry *root_scope = NULL; static pthread_mutex_t sl_mutex; void dl_close_scopes() { scope_entry *current = root_scope; while (current) { if (current->sp) { dlclose(current->sp->handle); } current = current->next; } } void scope_entry_destroy_notify(gpointer) { } #define SCOPE_BUFFER 2048 bool scope_feeder_func(void *arg, void *data, int size) { static char buf[32768]; static int latency = -1; static int fft_buf[512]; static int fill = 0; static int left = 0; static int init = 0; static int buf_size = 0; static AlsaNode *the_node = NULL; int i; short *sound; int *left_pos; int *right_pos; static double fftmult[FFT_BUFFER_SIZE / 2 + 1]; static sound_sample left_actEq[SCOPE_BUFFER]; static double left_fftout[FFT_BUFFER_SIZE / 2 + 1]; static fft_state *left_fftstate; static sound_sample right_actEq[SCOPE_BUFFER]; static double right_fftout[FFT_BUFFER_SIZE / 2 + 1]; static fft_state *right_fftstate; sound_sample *left_newset; sound_sample *right_newset; size <<= 1; // To bytes again if (size > 32768) return true; if (!init) { for(i = 0; i <= FFT_BUFFER_SIZE / 2 + 1; i++) { double mult = (double)128 / ((FFT_BUFFER_SIZE * 16384) ^ 2); mult *= log(i + 1) / log(2); mult *= 3; fftmult[i] = mult; } right_fftstate = fft_init(); left_fftstate = fft_init(); if (!left_fftstate || !right_fftstate) alsaplayer_error("WARNING: could not do fft_init()"); buf_size = SCOPE_BUFFER <= (FFT_BUFFER_SIZE * 2) ? SCOPE_BUFFER : FFT_BUFFER_SIZE; CorePlayer *the_coreplayer = (CorePlayer *)arg; if (the_coreplayer) { the_node = the_coreplayer->GetNode(); } if (the_node) { latency = the_node->GetLatency(); } if (latency < SCOPE_BUFFER) latency = SCOPE_BUFFER; //init_effects(); init = 1; } scope_entry *se = root_scope; //buffer_effect(data, size); if (fill + size >= SCOPE_BUFFER) { left = SCOPE_BUFFER - fill; memcpy(buf + fill, data, left); // Do global FFT left_newset = left_actEq; right_newset = right_actEq; sound = (short *)buf; //sound = (short *)delay_feed(latency, SCOPE_BUFFER); for (i = 0; i < buf_size; i++) { *left_newset++ = (sound_sample)((int)(*sound)); *right_newset++ = (sound_sample)((int)(*(sound+1))); sound +=2; } fft_perform(right_actEq, right_fftout, right_fftstate); fft_perform(left_actEq, left_fftout, left_fftstate); for (i = 0, left_pos = fft_buf, right_pos = fft_buf + 256; i < 256; i++) { left_pos[i] = (int)(sqrt(left_fftout[i + 1])) >> 8; //* fftmult[i]); right_pos[i] = (int)(sqrt(right_fftout[i + 1])) >> 8; //* fftmult[i]); } while (se && se->sp && se->active) { if (se->sp->running()) { if (se->sp->set_data) se->sp->set_data((short *)buf, SCOPE_BUFFER >> 1); if (se->sp->set_fft) se->sp->set_fft((int *)fft_buf, 256, 2); } if (se->next) se = se->next; else break; } // Copy the remainder fill = 0; memcpy(buf + fill, ((char *)data) + left, size - left); } else { memcpy(buf + fill, data, size); fill += size; } return true; } void apUnregiserScopePlugins() { scope_entry *current = root_scope; pthread_mutex_lock(&sl_mutex); while (current && current->sp) { //printf("closing and unloading scope plugin %s\n", current->sp->name); current->active = 0; current->sp->shutdown(); current = current->next; } pthread_mutex_unlock(&sl_mutex); } int apRegisterScopePlugin(scope_plugin *plugin) { GtkWidget *list; char *list_item[2]; scope_entry *se; if (!scopes_window) { printf("No scopes_window\n"); return 0; } list = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(scopes_window), "list"); se = new scope_entry; se->next = (scope_entry *)NULL; se->sp = plugin; if (se->sp->version != SCOPE_PLUGIN_VERSION) { alsaplayer_error("Wrong version number on scope plugin (v%d, wanted v%d)", se->sp->version - 0x1000, SCOPE_PLUGIN_VERSION - 0x1000); delete se; return -1; } se->active = 0; // Add new scope to GtkClist list_item[0] = g_strdup(" "); list_item[1] = g_strdup(se->sp->name); int index = gtk_clist_append(GTK_CLIST(list), list_item); gtk_clist_set_row_data_full(GTK_CLIST(list), index, se, scope_entry_destroy_notify); // Init scope se->sp->init(NULL); // Add scope to scope list // NOTE: WE CURRENTLY NEVER UNLOAD SCOPES pthread_mutex_lock(&sl_mutex); if (root_scope == NULL) { //printf("registering first scope...\n"); root_scope = se; root_scope->next = (scope_entry *)NULL; root_scope->active = 1; } else { // Not root scope, so insert it at the start se->next = root_scope->next; se->active = 1; root_scope->next = se; } pthread_mutex_unlock(&sl_mutex); //fprintf(stdout, "Loading Scope plugin: %s (%x)\n", se->sp->name, se->sp->handle); return 1; } static void close_all_cb(GtkWidget *, gpointer data) { GtkWidget *list = (GtkWidget *)data; if (list) { scope_entry *current = root_scope; while (current) { GDK_THREADS_LEAVE(); if (current->sp) current->sp->stop(); GDK_THREADS_ENTER(); current = current->next; } } } static void close_scope_cb(GtkWidget *, gpointer data) { GtkWidget *list = (GtkWidget *)data; if (list) { if (!GTK_CLIST(list)->selection) return; gint row = GPOINTER_TO_INT(GTK_CLIST(list)->selection->data); scope_entry *se = (scope_entry *) gtk_clist_get_row_data(GTK_CLIST(list), row); if (se && se->sp) { GDK_THREADS_LEAVE(); se->sp->stop(); GDK_THREADS_ENTER(); } } } static void open_scope_cb(GtkWidget *, gpointer data) { GtkWidget *list = (GtkWidget *)data; if (list) { if (!GTK_CLIST(list)->selection) return; gint row = GPOINTER_TO_INT(GTK_CLIST(list)->selection->data); scope_entry *se = (scope_entry *) gtk_clist_get_row_data(GTK_CLIST(list), row); if (se && se->sp) { GDK_THREADS_LEAVE(); se->sp->start(); GDK_THREADS_ENTER(); } } } static void exclusive_open_cb(GtkWidget *widget, gpointer data) { GtkWidget *list = (GtkWidget *)data; if (list) { scope_entry *current = root_scope; scope_entry *exclusive_one = NULL; if (!GTK_CLIST(list)->selection) return; gint row = GPOINTER_TO_INT(GTK_CLIST(list)->selection->data); scope_entry *se = (scope_entry *) gtk_clist_get_row_data(GTK_CLIST(list), row); if (se && se->sp) { while (current) { if (current == se) { exclusive_one = current; } GDK_THREADS_LEAVE(); //alsaplayer_error("Stopping \"%s\"", current->sp->name); current->sp->stop(); GDK_THREADS_ENTER(); current = current->next; } if (exclusive_one && exclusive_one->sp) { //alsaplayer_error("Starting exclusive scope \"%s\"", exclusive_one->sp->name); exclusive_one->sp->start(); } } } } void scopes_list_button_press(GtkWidget *widget, GdkEvent *bevent, gpointer) { GtkWidget *menu_item; GtkWidget *the_menu; gint row, col; //alsaplayer_error("Button pressed! (%.2f, %.2f, %d)", bevent->button.x, // bevent->button.y, bevent->button.button); gtk_clist_get_selection_info(GTK_CLIST(widget), (gint)bevent->button.x, (gint)bevent->button.y, &row, &col); if (bevent->button.button == 3) { // Right mouse bool selection; gtk_clist_select_row(GTK_CLIST(widget), row, 0); if (!GTK_CLIST(widget)->selection) selection = false; else selection = true; // Construct a popup the_menu = gtk_menu_new(); menu_item = gtk_menu_item_new_with_label("Open"); gtk_menu_append(GTK_MENU(the_menu), menu_item); gtk_widget_show(menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(open_scope_cb), widget); if (!selection) gtk_widget_set_sensitive(menu_item, false); menu_item = gtk_menu_item_new_with_label("Open exclusively"); gtk_menu_append(GTK_MENU(the_menu), menu_item); gtk_widget_show(menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(exclusive_open_cb), widget); if (!selection) gtk_widget_set_sensitive(menu_item, false); // Separator menu_item = gtk_menu_item_new(); gtk_menu_append(GTK_MENU(the_menu), menu_item); gtk_widget_show(menu_item); menu_item = gtk_menu_item_new_with_label("Close"); gtk_menu_append(GTK_MENU(the_menu), menu_item); gtk_widget_show(menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(close_scope_cb), widget); if (!selection) gtk_widget_set_sensitive(menu_item, false); menu_item = gtk_menu_item_new_with_label("Close all"); gtk_menu_append(GTK_MENU(the_menu), menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(close_all_cb), widget); gtk_widget_show(menu_item); gtk_menu_popup(GTK_MENU(the_menu), NULL, NULL, NULL, NULL, bevent->button.button, bevent->button.time); } //alsaplayer_error("Row = %d, Col = %d", row, col); } void scopes_list_click(GtkWidget *widget, gint row, gint /* column */, GdkEvent *bevent, gpointer /* data */) { if (bevent && bevent->type == GDK_2BUTTON_PRESS) { scope_entry *se = (scope_entry *) gtk_clist_get_row_data(GTK_CLIST(widget), row); if (se && se->sp) { #ifdef STUPID_FLUFF if (se->active) se->sp->stop(); else se->sp->start(NULL); se->active = 1 - se->active; if (se->active) { gtk_clist_set_pixmap(GTK_CLIST(widget), row, 0, active_pix, active_mask); } else { gtk_clist_set_text(GTK_CLIST(widget), row, 0, ""); } #else se->sp->start(); #endif } } } void scopes_window_ok_cb(GtkWidget * /*button_widget*/, gpointer data) { gint x, y; static gint s_windows_x_offset = 0; static gint s_windows_y_offset = 0; GtkWidget *widget = (GtkWidget *)data; gdk_window_get_origin(widget->window, &x, &y); if (windows_x_offset >= 0) { x -= s_windows_x_offset; y -= s_windows_y_offset; } gtk_widget_hide(widget); gtk_widget_set_uposition(widget, x, y); global_scopes_show = 0; } gboolean scopes_window_delete_event(GtkWidget *widget, GdkEvent * /*event*/, gpointer /* data */) { gint x, y; gdk_window_get_origin(widget->window, &x, &y); if (windows_x_offset >= 0) { x -= windows_x_offset; y -= windows_y_offset; } gtk_widget_hide(widget); gtk_widget_set_uposition(widget, x, y); global_scopes_show = 0; return TRUE; } void destroy_scopes_window() { if (!scopes_window) return; prefs_set_bool(ap_prefs, "gtk_interface", "scopeswindow_active", global_scopes_show); } GtkWidget *init_scopes_window() { GtkWidget *working; GtkStyle *style; scopes_window = create_scopes_window(); gtk_widget_realize(scopes_window); GtkWidget *list = get_widget(scopes_window, "scopes_list"); style = gtk_widget_get_style(list); active_pix = gdk_pixmap_create_from_xpm_d(scopes_window->window, &active_mask, &style->bg[GTK_STATE_NORMAL], note_xpm); gtk_object_set_data(GTK_OBJECT(scopes_window), "list", list); gtk_clist_set_column_width(GTK_CLIST(list), 0, 16); gtk_clist_set_row_height(GTK_CLIST(list), 20); gtk_signal_connect(GTK_OBJECT(list), "select_row", GTK_SIGNAL_FUNC(scopes_list_click), NULL); gtk_signal_connect(GTK_OBJECT(list), "button_press_event", GTK_SIGNAL_FUNC(scopes_list_button_press), NULL); working = get_widget(scopes_window, "ok_button"); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(scopes_window_ok_cb), scopes_window); // Close/delete signals gtk_signal_connect(GTK_OBJECT(scopes_window), "destroy", GTK_SIGNAL_FUNC(scopes_window_delete_event), NULL); gtk_signal_connect(GTK_OBJECT(scopes_window), "delete_event", GTK_SIGNAL_FUNC(scopes_window_delete_event), NULL); // Init scope list pthread_mutex_init(&sl_mutex, (pthread_mutexattr_t *)NULL); if (prefs_get_bool(ap_prefs, "gtk_interface", "scopeswindow_active", 0)) { gtk_widget_show(scopes_window); global_scopes_show = 1; } return scopes_window; } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/ScopesWindow.h000066400000000000000000000007251466261456500270220ustar00rootroot00000000000000#ifndef __ScopesWindow_h__ #define __ScopesWindow_h__ #include #include "scope_plugin.h" extern GtkWidget *init_scopes_window(); extern void destroy_scopes_window(); extern int apRegisterScopePlugin(scope_plugin *plugin); extern void apUnregiserScopePlugins(); extern bool scope_feeder_func(void *, void *, int); typedef struct _scope_entry { scope_plugin *sp; struct _scope_entry *next; struct _scope_entry *prev; int active; } scope_entry; #endif alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gladesrc.cpp000066400000000000000000000747031466261456500265240ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include "gladesrc.h" #include "support.h" GtkWidget* create_main_window (void) { GtkWidget *main_window; GtkWidget *vbox25; GtkWidget *frame1; GtkWidget *main_box; GtkWidget *info_box; GtkWidget *pos_box; GtkWidget *pos_scale; GtkWidget *button_scale_box; GtkWidget *control_box; GtkWidget *button_box; GtkWidget *cd_button; GtkWidget *prev_button; GtkWidget *play_button; GtkWidget *stop_button; GtkWidget *next_button; GtkWidget *playlist_button; GtkWidget *audio_control_box; GtkWidget *hbox34; GtkWidget *hbox36; GtkWidget *reverse_button; GtkWidget *pause_button; GtkWidget *forward_button; GtkWidget *pitch_scale; GtkWidget *bal_vol_box; GtkWidget *hbox37; GtkWidget *balance_pic_frame; GtkWidget *bal_scale; GtkWidget *volume_box; GtkWidget *volume_frame; GtkWidget *volume_pix_frame; GtkWidget *vol_scale; main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (main_window), "main_window", main_window); gtk_widget_set_usize (main_window, 408, 98); gtk_window_set_title (GTK_WINDOW (main_window), "AlsaPlayer"); gtk_window_set_policy (GTK_WINDOW (main_window), TRUE, TRUE, FALSE); vbox25 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox25); gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox25", vbox25, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox25); gtk_container_add (GTK_CONTAINER (main_window), vbox25); frame1 = gtk_frame_new (NULL); gtk_widget_ref (frame1); gtk_object_set_data_full (GTK_OBJECT (main_window), "frame1", frame1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (vbox25), frame1, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_OUT); main_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (main_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_box", main_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_box); gtk_container_add (GTK_CONTAINER (frame1), main_box); info_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (info_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "info_box", info_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (info_box); gtk_box_pack_start (GTK_BOX (main_box), info_box, TRUE, TRUE, 0); pos_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (pos_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "pos_box", pos_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pos_box); gtk_box_pack_start (GTK_BOX (main_box), pos_box, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (pos_box), 2); pos_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0))); gtk_widget_ref (pos_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "pos_scale", pos_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pos_scale); gtk_box_pack_start (GTK_BOX (pos_box), pos_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (pos_scale), FALSE); button_scale_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (button_scale_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_scale_box", button_scale_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_scale_box); gtk_box_pack_start (GTK_BOX (main_box), button_scale_box, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_scale_box), 2); control_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (control_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "control_box", control_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (control_box); gtk_box_pack_start (GTK_BOX (button_scale_box), control_box, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (control_box), 2); button_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (button_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_box", button_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_box); gtk_box_pack_start (GTK_BOX (control_box), button_box, FALSE, TRUE, 0); cd_button = gtk_button_new (); gtk_widget_ref (cd_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "cd_button", cd_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (cd_button); gtk_box_pack_start (GTK_BOX (button_box), cd_button, FALSE, TRUE, 0); gtk_widget_set_usize (cd_button, 26, 24); prev_button = gtk_button_new (); gtk_widget_ref (prev_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "prev_button", prev_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (prev_button); gtk_box_pack_start (GTK_BOX (button_box), prev_button, FALSE, TRUE, 0); gtk_widget_set_usize (prev_button, 26, 24); play_button = gtk_button_new (); gtk_widget_ref (play_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "play_button", play_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (play_button); gtk_box_pack_start (GTK_BOX (button_box), play_button, FALSE, TRUE, 0); gtk_widget_set_usize (play_button, 26, 24); stop_button = gtk_button_new (); gtk_widget_ref (stop_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "stop_button", stop_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (stop_button); gtk_box_pack_start (GTK_BOX (button_box), stop_button, FALSE, TRUE, 0); gtk_widget_set_usize (stop_button, 26, 24); next_button = gtk_button_new (); gtk_widget_ref (next_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "next_button", next_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (next_button); gtk_box_pack_start (GTK_BOX (button_box), next_button, FALSE, TRUE, 0); gtk_widget_set_usize (next_button, 26, 24); playlist_button = gtk_button_new (); gtk_widget_ref (playlist_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "playlist_button", playlist_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (playlist_button); gtk_box_pack_start (GTK_BOX (button_box), playlist_button, FALSE, TRUE, 0); gtk_widget_set_usize (playlist_button, 26, 24); audio_control_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (audio_control_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "audio_control_box", audio_control_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (audio_control_box); gtk_box_pack_start (GTK_BOX (button_scale_box), audio_control_box, TRUE, TRUE, 0); hbox34 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox34); gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox34", hbox34, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox34); gtk_box_pack_start (GTK_BOX (audio_control_box), hbox34, FALSE, FALSE, 0); hbox36 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox36); gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox36", hbox36, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox36); gtk_box_pack_start (GTK_BOX (hbox34), hbox36, FALSE, FALSE, 0); reverse_button = gtk_button_new (); gtk_widget_ref (reverse_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "reverse_button", reverse_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (reverse_button); gtk_box_pack_start (GTK_BOX (hbox36), reverse_button, TRUE, TRUE, 0); gtk_widget_set_usize (reverse_button, 22, 20); pause_button = gtk_button_new (); gtk_widget_ref (pause_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "pause_button", pause_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pause_button); gtk_box_pack_start (GTK_BOX (hbox36), pause_button, TRUE, TRUE, 0); gtk_widget_set_usize (pause_button, 22, 20); forward_button = gtk_button_new (); gtk_widget_ref (forward_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "forward_button", forward_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (forward_button); gtk_box_pack_start (GTK_BOX (hbox36), forward_button, TRUE, TRUE, 0); gtk_widget_set_usize (forward_button, 22, 20); pitch_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (100, -400, 401, 1, 1, 1))); gtk_widget_ref (pitch_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "pitch_scale", pitch_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pitch_scale); gtk_box_pack_start (GTK_BOX (hbox34), pitch_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (pitch_scale), FALSE); bal_vol_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (bal_vol_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "bal_vol_box", bal_vol_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (bal_vol_box); gtk_box_pack_start (GTK_BOX (audio_control_box), bal_vol_box, TRUE, FALSE, 0); hbox37 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox37); gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox37", hbox37, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox37); gtk_box_pack_start (GTK_BOX (bal_vol_box), hbox37, TRUE, TRUE, 0); balance_pic_frame = gtk_vbox_new (FALSE, 0); gtk_widget_ref (balance_pic_frame); gtk_object_set_data_full (GTK_OBJECT (main_window), "balance_pic_frame", balance_pic_frame, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (balance_pic_frame); gtk_box_pack_start (GTK_BOX (hbox37), balance_pic_frame, FALSE, TRUE, 0); gtk_widget_set_usize (balance_pic_frame, 30, -2); bal_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (100, 0, 201, 1, 1, 1))); gtk_widget_ref (bal_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "bal_scale", bal_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (bal_scale); gtk_box_pack_start (GTK_BOX (hbox37), bal_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (bal_scale), FALSE); volume_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (volume_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "volume_box", volume_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (volume_box); gtk_box_pack_start (GTK_BOX (bal_vol_box), volume_box, TRUE, TRUE, 0); volume_frame = gtk_hbox_new (FALSE, 0); gtk_widget_ref (volume_frame); gtk_object_set_data_full (GTK_OBJECT (main_window), "volume_frame", volume_frame, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (volume_frame); gtk_box_pack_start (GTK_BOX (volume_box), volume_frame, TRUE, TRUE, 0); volume_pix_frame = gtk_vbox_new (FALSE, 0); gtk_widget_ref (volume_pix_frame); gtk_object_set_data_full (GTK_OBJECT (main_window), "volume_pix_frame", volume_pix_frame, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (volume_pix_frame); gtk_box_pack_start (GTK_BOX (volume_frame), volume_pix_frame, FALSE, TRUE, 0); gtk_widget_set_usize (volume_pix_frame, 18, -2); vol_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (14, 0, 14, 1, 1, 1))); gtk_widget_ref (vol_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "vol_scale", vol_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vol_scale); gtk_box_pack_start (GTK_BOX (volume_frame), vol_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (vol_scale), FALSE); return main_window; } GtkWidget* create_playlist_window (void) { GtkWidget *playlist_window; GtkWidget *vbox5; GtkWidget *hbox16; GtkWidget *scrolledwindow1; GtkWidget *viewport1; GtkWidget *playlist; GtkWidget *label2; GtkWidget *label3; GtkWidget *label100; GtkWidget *vbox6; GtkWidget *add_button; GtkWidget *del_button; GtkWidget *close_button; GtkWidget *shuffle_button; GtkWidget *vbox24; GtkWidget *label101; GtkWidget *load_button; GtkWidget *save_button; GtkWidget *clear_button; GtkWidget *loop_button; GtkWidget *playlist_status; playlist_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (playlist_window), "playlist_window", playlist_window); gtk_widget_set_usize (playlist_window, 480, 390); gtk_window_set_title (GTK_WINDOW (playlist_window), "Queue"); vbox5 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox5); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "vbox5", vbox5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox5); gtk_container_add (GTK_CONTAINER (playlist_window), vbox5); hbox16 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox16); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "hbox16", hbox16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox16); gtk_box_pack_start (GTK_BOX (vbox5), hbox16, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox16), 8); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow1); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "scrolledwindow1", scrolledwindow1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (hbox16), scrolledwindow1, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); viewport1 = gtk_viewport_new (NULL, NULL); gtk_widget_ref (viewport1); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "viewport1", viewport1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (viewport1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport1), GTK_SHADOW_NONE); playlist = gtk_clist_new (3); gtk_widget_ref (playlist); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "playlist", playlist, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (playlist); gtk_container_add (GTK_CONTAINER (viewport1), playlist); gtk_clist_set_column_width (GTK_CLIST (playlist), 0, 80); gtk_clist_set_column_width (GTK_CLIST (playlist), 1, 80); gtk_clist_set_column_width (GTK_CLIST (playlist), 2, 80); gtk_clist_set_selection_mode (GTK_CLIST (playlist), GTK_SELECTION_EXTENDED); gtk_clist_column_titles_hide (GTK_CLIST (playlist)); label2 = gtk_label_new ("label2"); gtk_widget_ref (label2); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label2", label2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label2); gtk_clist_set_column_widget (GTK_CLIST (playlist), 0, label2); label3 = gtk_label_new ("label3"); gtk_widget_ref (label3); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label3", label3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label3); gtk_clist_set_column_widget (GTK_CLIST (playlist), 1, label3); label100 = gtk_label_new ("label100"); gtk_widget_ref (label100); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label100", label100, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label100); gtk_clist_set_column_widget (GTK_CLIST (playlist), 2, label100); vbox6 = gtk_vbox_new (FALSE, 6); gtk_widget_ref (vbox6); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "vbox6", vbox6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox6); gtk_box_pack_start (GTK_BOX (hbox16), vbox6, FALSE, TRUE, 6); add_button = gtk_button_new_with_label ("Add..."); gtk_widget_ref (add_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "add_button", add_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (add_button); gtk_box_pack_start (GTK_BOX (vbox6), add_button, FALSE, TRUE, 0); gtk_widget_set_usize (add_button, 70, 22); del_button = gtk_button_new_with_label ("Remove"); gtk_widget_ref (del_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "del_button", del_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (del_button); gtk_box_pack_start (GTK_BOX (vbox6), del_button, FALSE, TRUE, 0); gtk_widget_set_usize (del_button, 70, -2); close_button = gtk_button_new_with_label ("Close"); gtk_widget_ref (close_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "close_button", close_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (close_button); gtk_box_pack_end (GTK_BOX (vbox6), close_button, FALSE, TRUE, 0); shuffle_button = gtk_button_new_with_label ("Shuffle"); gtk_widget_ref (shuffle_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "shuffle_button", shuffle_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (shuffle_button); gtk_box_pack_start (GTK_BOX (vbox6), shuffle_button, FALSE, FALSE, 0); vbox24 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox24); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "vbox24", vbox24, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox24); gtk_box_pack_start (GTK_BOX (vbox6), vbox24, FALSE, TRUE, 18); label101 = gtk_label_new ("playlist"); gtk_widget_ref (label101); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label101", label101, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label101); gtk_box_pack_start (GTK_BOX (vbox24), label101, FALSE, FALSE, 4); load_button = gtk_button_new_with_label ("Load..."); gtk_widget_ref (load_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "load_button", load_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (load_button); gtk_box_pack_start (GTK_BOX (vbox24), load_button, FALSE, FALSE, 0); save_button = gtk_button_new_with_label ("Save..."); gtk_widget_ref (save_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "save_button", save_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (save_button); gtk_box_pack_start (GTK_BOX (vbox24), save_button, FALSE, FALSE, 6); clear_button = gtk_button_new_with_label ("Clear"); gtk_widget_ref (clear_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "clear_button", clear_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (clear_button); gtk_box_pack_start (GTK_BOX (vbox24), clear_button, FALSE, FALSE, 0); gtk_widget_set_usize (clear_button, 70, -2); loop_button = gtk_button_new_with_label ("Loop"); gtk_widget_ref (loop_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "loop_button", loop_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (loop_button); gtk_box_pack_start (GTK_BOX (vbox6), loop_button, FALSE, FALSE, 0); playlist_status = gtk_vbox_new (FALSE, 0); gtk_widget_ref (playlist_status); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "playlist_status", playlist_status, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (playlist_status); gtk_box_pack_start (GTK_BOX (vbox5), playlist_status, FALSE, TRUE, 4); return playlist_window; } GtkWidget* create_playlist_load (void) { GtkWidget *playlist_load; GtkWidget *ok_button1; GtkWidget *cancel_button1; playlist_load = gtk_file_selection_new ("Load Playlist"); gtk_object_set_data (GTK_OBJECT (playlist_load), "playlist_load", playlist_load); gtk_container_set_border_width (GTK_CONTAINER (playlist_load), 10); ok_button1 = GTK_FILE_SELECTION (playlist_load)->ok_button; gtk_object_set_data (GTK_OBJECT (playlist_load), "ok_button1", ok_button1); gtk_widget_show (ok_button1); GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT); cancel_button1 = GTK_FILE_SELECTION (playlist_load)->cancel_button; gtk_object_set_data (GTK_OBJECT (playlist_load), "cancel_button1", cancel_button1); gtk_widget_show (cancel_button1); GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT); return playlist_load; } GtkWidget* create_playlist_save (void) { GtkWidget *playlist_save; GtkWidget *ok_button2; GtkWidget *cancel_button2; playlist_save = gtk_file_selection_new ("Save Playlist"); gtk_object_set_data (GTK_OBJECT (playlist_save), "playlist_save", playlist_save); gtk_container_set_border_width (GTK_CONTAINER (playlist_save), 10); ok_button2 = GTK_FILE_SELECTION (playlist_save)->ok_button; gtk_object_set_data (GTK_OBJECT (playlist_save), "ok_button2", ok_button2); gtk_widget_show (ok_button2); GTK_WIDGET_SET_FLAGS (ok_button2, GTK_CAN_DEFAULT); cancel_button2 = GTK_FILE_SELECTION (playlist_save)->cancel_button; gtk_object_set_data (GTK_OBJECT (playlist_save), "cancel_button2", cancel_button2); gtk_widget_show (cancel_button2); GTK_WIDGET_SET_FLAGS (cancel_button2, GTK_CAN_DEFAULT); return playlist_save; } GtkWidget* create_effects_window (void) { GtkWidget *effects_window; GtkWidget *vbox23; GtkWidget *hbox31; GtkWidget *plugin_list_box; GtkWidget *effects_list; GtkWidget *label16; GtkWidget *label17; GtkWidget *parameter_box; GtkWidget *button_box; GtkWidget *ok_button; effects_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (effects_window), "effects_window", effects_window); gtk_widget_set_usize (effects_window, 500, 300); gtk_window_set_title (GTK_WINDOW (effects_window), "Effects"); vbox23 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox23); gtk_object_set_data_full (GTK_OBJECT (effects_window), "vbox23", vbox23, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox23); gtk_container_add (GTK_CONTAINER (effects_window), vbox23); hbox31 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox31); gtk_object_set_data_full (GTK_OBJECT (effects_window), "hbox31", hbox31, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox31); gtk_box_pack_start (GTK_BOX (vbox23), hbox31, TRUE, TRUE, 0); plugin_list_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (plugin_list_box); gtk_object_set_data_full (GTK_OBJECT (effects_window), "plugin_list_box", plugin_list_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (plugin_list_box); gtk_box_pack_start (GTK_BOX (hbox31), plugin_list_box, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (plugin_list_box), 8); effects_list = gtk_ctree_new (2, 0); gtk_widget_ref (effects_list); gtk_object_set_data_full (GTK_OBJECT (effects_window), "effects_list", effects_list, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (effects_list); gtk_box_pack_start (GTK_BOX (plugin_list_box), effects_list, TRUE, TRUE, 0); gtk_clist_set_column_width (GTK_CLIST (effects_list), 0, 80); gtk_clist_set_column_width (GTK_CLIST (effects_list), 1, 80); gtk_clist_column_titles_hide (GTK_CLIST (effects_list)); label16 = gtk_label_new ("label16"); gtk_widget_ref (label16); gtk_object_set_data_full (GTK_OBJECT (effects_window), "label16", label16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label16); gtk_clist_set_column_widget (GTK_CLIST (effects_list), 0, label16); label17 = gtk_label_new ("label17"); gtk_widget_ref (label17); gtk_object_set_data_full (GTK_OBJECT (effects_window), "label17", label17, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label17); gtk_clist_set_column_widget (GTK_CLIST (effects_list), 1, label17); parameter_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (parameter_box); gtk_object_set_data_full (GTK_OBJECT (effects_window), "parameter_box", parameter_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (parameter_box); gtk_box_pack_start (GTK_BOX (hbox31), parameter_box, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (parameter_box), 8); button_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (button_box); gtk_object_set_data_full (GTK_OBJECT (effects_window), "button_box", button_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_box); gtk_box_pack_start (GTK_BOX (vbox23), button_box, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_box), 8); ok_button = gtk_button_new_with_label ("OK"); gtk_widget_ref (ok_button); gtk_object_set_data_full (GTK_OBJECT (effects_window), "ok_button", ok_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (ok_button); gtk_box_pack_end (GTK_BOX (button_box), ok_button, FALSE, TRUE, 0); gtk_widget_set_usize (ok_button, 80, -2); return effects_window; } GtkWidget* create_scopes_window (void) { GtkWidget *scopes_window; GtkWidget *vbox22; GtkWidget *hbox38; GtkWidget *label18; GtkWidget *scopes_list_box; GtkWidget *scrolledwindow2; GtkWidget *scopes_list; GtkWidget *label14; GtkWidget *label15; GtkWidget *hbox32; GtkWidget *ok_button; scopes_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (scopes_window), "scopes_window", scopes_window); gtk_window_set_title (GTK_WINDOW (scopes_window), "Scopes"); vbox22 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox22); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "vbox22", vbox22, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox22); gtk_container_add (GTK_CONTAINER (scopes_window), vbox22); hbox38 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox38); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "hbox38", hbox38, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox38); gtk_box_pack_start (GTK_BOX (vbox22), hbox38, FALSE, TRUE, 5); label18 = gtk_label_new ("Double click to activate"); gtk_widget_ref (label18); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "label18", label18, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label18); gtk_box_pack_start (GTK_BOX (hbox38), label18, FALSE, FALSE, 10); scopes_list_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (scopes_list_box); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "scopes_list_box", scopes_list_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scopes_list_box); gtk_box_pack_start (GTK_BOX (vbox22), scopes_list_box, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (scopes_list_box), 8); scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow2); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "scrolledwindow2", scrolledwindow2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow2); gtk_box_pack_start (GTK_BOX (scopes_list_box), scrolledwindow2, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); scopes_list = gtk_clist_new (2); gtk_widget_ref (scopes_list); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "scopes_list", scopes_list, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scopes_list); gtk_container_add (GTK_CONTAINER (scrolledwindow2), scopes_list); gtk_widget_set_usize (scopes_list, 150, 220); gtk_clist_set_column_width (GTK_CLIST (scopes_list), 0, 49); gtk_clist_set_column_width (GTK_CLIST (scopes_list), 1, 80); gtk_clist_column_titles_hide (GTK_CLIST (scopes_list)); label14 = gtk_label_new ("label14"); gtk_widget_ref (label14); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "label14", label14, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label14); gtk_clist_set_column_widget (GTK_CLIST (scopes_list), 0, label14); label15 = gtk_label_new ("label15"); gtk_widget_ref (label15); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "label15", label15, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label15); gtk_clist_set_column_widget (GTK_CLIST (scopes_list), 1, label15); hbox32 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox32); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "hbox32", hbox32, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox32); gtk_box_pack_start (GTK_BOX (vbox22), hbox32, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox32), 8); ok_button = gtk_button_new_with_label ("Close"); gtk_widget_ref (ok_button); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "ok_button", ok_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (ok_button); gtk_box_pack_end (GTK_BOX (hbox32), ok_button, FALSE, TRUE, 0); gtk_widget_set_usize (ok_button, 80, -2); return scopes_window; } GtkWidget* create_fileselection1 (void) { GtkWidget *fileselection1; GtkWidget *ok_button3; GtkWidget *cancel_button3; fileselection1 = gtk_file_selection_new ("Select File"); gtk_object_set_data (GTK_OBJECT (fileselection1), "fileselection1", fileselection1); gtk_container_set_border_width (GTK_CONTAINER (fileselection1), 10); ok_button3 = GTK_FILE_SELECTION (fileselection1)->ok_button; gtk_object_set_data (GTK_OBJECT (fileselection1), "ok_button3", ok_button3); gtk_widget_show (ok_button3); GTK_WIDGET_SET_FLAGS (ok_button3, GTK_CAN_DEFAULT); cancel_button3 = GTK_FILE_SELECTION (fileselection1)->cancel_button; gtk_object_set_data (GTK_OBJECT (fileselection1), "cancel_button3", cancel_button3); gtk_widget_show (cancel_button3); GTK_WIDGET_SET_FLAGS (cancel_button3, GTK_CAN_DEFAULT); return fileselection1; } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gladesrc.h000066400000000000000000000005271466261456500261620ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ GtkWidget* create_main_window (void); GtkWidget* create_playlist_window (void); GtkWidget* create_playlist_load (void); GtkWidget* create_playlist_save (void); GtkWidget* create_effects_window (void); GtkWidget* create_scopes_window (void); GtkWidget* create_fileselection1 (void); alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gtk.cpp000066400000000000000000000107061466261456500255160ustar00rootroot00000000000000/* * gtk.cpp - GTK interface plugin main file * Copyright (C) 2001 Andy Lo A Foe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "AlsaPlayer.h" #include "SampleBuffer.h" #include "CorePlayer.h" #include "Playlist.h" #include "ScopesWindow.h" #include "gtk_interface.h" #include "utilities.h" #include "interface_plugin.h" #include "alsaplayer_error.h" static char addon_dir[1024]; static AlsaSubscriber *scopes = NULL; static CorePlayer *the_coreplayer = NULL; void unload_scope_addons() { if (scopes) delete scopes; apUnregiserScopePlugins(); } void load_scope_addons() { char path[1024]; struct stat buf; scope_plugin *tmp; scope_plugin_info_type scope_plugin_info; snprintf(path, sizeof(path)-1, "%s/scopes", addon_dir); DIR *dir = opendir(path); dirent *entry; if (dir) { while ((entry = readdir(dir)) != NULL) { // For each file in scopes if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } sprintf(path, "%s/scopes/%s", addon_dir, entry->d_name); //alsaplayer_error(path); if (stat(path, &buf)) continue; if (S_ISREG(buf.st_mode)) { void *handle; char *ext = strrchr(path, '.'); if (!ext) continue; ext++; if (strcasecmp(ext, "so")) continue; if ((handle = dlopen(path, RTLD_NOW |RTLD_GLOBAL))) { scope_plugin_info = (scope_plugin_info_type) dlsym(handle, "scope_plugin_info"); if (scope_plugin_info) { #ifdef DEBUG alsaplayer_error("Loading scope addon: %s\n", path); #endif tmp = scope_plugin_info(); if (tmp) { tmp->handle = handle; if (apRegisterScopePlugin(tmp) == -1) { alsaplayer_error("%s is deprecated", path); } } } else { dlclose(handle); } } else { printf("%s\n", dlerror()); } } } closedir(dir); } } int interface_gtk_init() { strcpy(addon_dir, ADDON_DIR); return 1; } int interface_gtk_running() { return 1; } int interface_gtk_stop() { global_update = -1; GDK_THREADS_ENTER(); gdk_flush(); gtk_exit(0); // This is *NOT* clean :-( GDK_THREADS_LEAVE(); return 1; } void interface_gtk_close() { return; } void dl_close_scopes(); int interface_gtk_start(Playlist *playlist, int argc, char **argv) { char path[256]; char *home; the_coreplayer = playlist->GetCorePlayer(); g_thread_init(NULL); if (!g_thread_supported()) { alsaplayer_error("Sorry - this interface requires working threads.\n"); return 1; } // Scope functions scopes = new AlsaSubscriber(); scopes->Subscribe(the_coreplayer->GetNode(), POS_END); scopes->EnterStream(scope_feeder_func, the_coreplayer); gtk_set_locale(); gtk_init(&argc, &argv); gdk_rgb_init(); home = getenv("HOME"); if (home) { snprintf(path, 255, "%s/.gtkrc", home); gtk_rc_parse(path); } if (playlist->Length()) playlist->UnPause(); // Scope addons gdk_flush(); GDK_THREADS_ENTER(); init_main_window(playlist); load_scope_addons(); gdk_flush(); gtk_main(); gdk_flush(); GDK_THREADS_LEAVE(); unload_scope_addons(); destroy_scopes_window(); GDK_THREADS_ENTER(); gdk_flush(); GDK_THREADS_LEAVE(); playlist->Pause(); dl_close_scopes(); return 0; } interface_plugin default_plugin = { INTERFACE_PLUGIN_VERSION, "GTK+ interface v1.2", "Andy Lo A Foe", NULL, interface_gtk_init, interface_gtk_start, interface_gtk_running, interface_gtk_stop, interface_gtk_close }; extern "C" { interface_plugin *interface_plugin_info() { return &default_plugin; } } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gtk_interface.cpp000066400000000000000000001215021466261456500275330ustar00rootroot00000000000000/* gtk_interface.cpp - gtk+ callbacks, etc * Copyright (C) 2002 Andy Lo A Foe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "AlsaPlayer.h" #include "config.h" #include "prefs.h" #include "alsaplayer_error.h" #include #include #include #include //#define NEW_SCALE //#define SUBSECOND_DISPLAY #include #include #include "utilities.h" // Include things needed for gtk interface: #include #include #include "support.h" #include "gladesrc.h" #include "gtk_interface.h" #include "pixmaps/f_play.xpm" #include "pixmaps/r_play.xpm" #include "pixmaps/pause.xpm" #include "pixmaps/next.xpm" #include "pixmaps/prev.xpm" #include "pixmaps/stop.xpm" #include "pixmaps/volume_icon.xpm" #include "pixmaps/balance_icon.xpm" #if 0 #include "pixmaps/eject.xpm" #endif #include "pixmaps/play.xpm" #include "pixmaps/playlist.xpm" //#include "pixmaps/cd.xpm" #include "pixmaps/menu.xpm" #include "PlaylistWindow.h" // Include other things: (ultimate aim is to wrap this up into one nice file) #include "CorePlayer.h" #include "Playlist.h" #include "EffectsWindow.h" //#include "Effects.h" #include "ScopesWindow.h" Playlist *playlist = NULL; // Defines #ifdef SUBSECOND_DISPLAY #define UPDATE_TIMEOUT 20000 #else #define UPDATE_TIMEOUT 100000 #endif #define BAL_CENTER 100 #define UPDATE_COUNT 5 #define MIN_BAL_TRESH BAL_CENTER-10 // Center is a special case #define MAX_BAL_TRESH BAL_CENTER+10 // so we build in some slack #define ZERO_PITCH_TRESH 2 #define EQ_TEMP_STEP(freq, step) freq * pow(2.0000, (float) step / 12.0) #define FPS_HACK 32 // number of audio frames // Global variables (get rid of these too... ;-) ) int global_update = 1; /* These are used to contain the size of the window manager borders around our windows, and are used to show/hide windows in the same positions. */ gint global_effects_show = 0; gint global_scopes_show = 0; gint windows_x_offset = -1; gint windows_y_offset = -1; static int global_draw_volume = 1; static GtkWidget *play_pix; static GdkPixmap *val_ind = NULL; static PlaylistWindowGTK *playlist_window_gtk = NULL; static coreplayer_notifier notifier; static gint main_window_x = 150; static gint main_window_y = 175; typedef struct _update_struct { gpointer data; GtkWidget *drawing_area; GtkWidget *vol_scale; GtkWidget *bal_scale; GtkWidget *pos_scale; GtkWidget *speed_scale; float speed; } update_struct; static update_struct global_ustr; #define LOOP_OFF 0 #define LOOP_START_SET 1 #define LOOP_ON 2 typedef struct _loop_struct { int state; gfloat start; gfloat end; unsigned int track; // used to exit loop mode when a new song is played } loop_struct; static loop_struct global_loop; // Static variables (to be moved into a class, at some point) static GtkWidget *play_dialog; static int vol_scale[] = { 0,1,2,4,7,12,18,26,35,45,56,69,83,100 }; #ifdef SUBSECOND_DISPLAY #define INDICATOR_WIDTH 80 #else #define INDICATOR_WIDTH 64 #endif //////////////////////// // Callback functions // //////////////////////// gint indicator_callback(gpointer data, int locking); void draw_speed(float speed); void draw_pan(float pan); void draw_volume(float vol); void position_notify(void *data, int pos); void notifier_lock(); void notifier_unlock(); void play_cb(GtkWidget *widget, gpointer data); void pause_cb(GtkWidget *, gpointer data); void stop_cb(GtkWidget *, gpointer data); void loop_cb(GtkWidget *, gpointer data); void exit_cb(GtkWidget *, gpointer data); void forward_skip_cb(GtkWidget *, gpointer data); void reverse_skip_cb(GtkWidget *, gpointer data); void forward_play_cb(GtkWidget *, gpointer data); void reverse_play_cb(GtkWidget *, gpointer data); void speed_changed(void *, float speed) { notifier_lock(); draw_speed(speed); notifier_unlock(); } void pan_changed(void *, float pan) { notifier_lock(); draw_pan(pan); notifier_unlock(); } void volume_changed(void *, float vol) { notifier_lock(); draw_volume(vol); notifier_unlock(); } void position_notify(void *, int pos) { notifier_lock(); indicator_callback(NULL, 0); notifier_unlock(); } void notifier_lock(void) { GDK_THREADS_ENTER(); } void notifier_unlock(void) { gdk_flush(); GDK_THREADS_LEAVE(); } void stop_notify(void *data) { //alsaplayer_error("Song was stopped"); } void start_notify(void *data) { //alsaplayer_error("Song was started"); } gboolean main_window_delete(GtkWidget *, GdkEvent *event, gpointer data) { global_update = -1; // Remove notifier gdk_flush(); if (playlist_window_gtk) { Playlist *playlist = playlist_window_gtk->GetPlaylist(); GDK_THREADS_LEAVE(); playlist->UnRegisterNotifier(¬ifier); GDK_THREADS_ENTER(); delete playlist_window_gtk; } gtk_main_quit(); gdk_flush(); // Never reached return FALSE; } void press_event(GtkWidget *, GdkEvent *, gpointer) { global_update = 0; } void volume_move_event(GtkWidget *, GdkEvent *, gpointer) { //draw_volume(); } void draw_title(char *title) { update_struct *ustr = &global_ustr; GdkRectangle update_rect; static char old_title[128] = ""; static int count = UPDATE_COUNT; if (count-- > 0 && strcmp(old_title, title) == 0) return; else { count = UPDATE_COUNT; if (strlen(title) > 127) { strncpy(old_title, title, 126); old_title[127] = 0; } else strcpy(old_title, title); } update_rect.x = 82; update_rect.y = 0; update_rect.width = ustr->drawing_area->allocation.width - 82; update_rect.height = 18; if (val_ind) { // Clear area gdk_draw_rectangle(val_ind, ustr->drawing_area->style->black_gc, true, update_rect.x, update_rect.y, update_rect.width, update_rect.height); // Draw string gdk_draw_string(val_ind, ustr->drawing_area->style->font, ustr->drawing_area->style->white_gc, update_rect.x+6, update_rect.y+14, title); // Do the drawing gtk_widget_draw (ustr->drawing_area, &update_rect); } gdk_flush(); } void draw_format(char *format) { update_struct *ustr = &global_ustr; GdkRectangle update_rect; static char old_format[128] = ""; static int count = UPDATE_COUNT; if (count-- > 0 && strcmp(old_format, format) == 0) return; else { count = UPDATE_COUNT; if (strlen(format) > 126) { strncpy(old_format, format, 126); old_format[127] = 0; } else strcpy(old_format, format); } update_rect.x = 82; update_rect.y = 16; update_rect.width = ustr->drawing_area->allocation.width - 82 - INDICATOR_WIDTH; update_rect.height = 18; if (val_ind) { // Clear area gdk_draw_rectangle(val_ind, ustr->drawing_area->style->black_gc, true, update_rect.x, update_rect.y, update_rect.width, update_rect.height); // Draw string gdk_draw_string(val_ind, ustr->drawing_area->style->font, ustr->drawing_area->style->white_gc, update_rect.x+6, update_rect.y+12, format); // Do the drawing gtk_widget_draw (ustr->drawing_area, &update_rect); } } void draw_volume(float the_vol) { update_struct *ustr = &global_ustr; GtkAdjustment *adj; GdkRectangle update_rect; char str[60]; int vol = (int) (the_vol * 100); // quick hack if (!ustr->vol_scale) return; adj = GTK_RANGE(ustr->vol_scale)->adjustment; int val = vol; //(int)GTK_ADJUSTMENT(adj)->value; val ? sprintf(str, "Volume: %d%% ", val) : sprintf(str, "Volume: mute"); update_rect.x = 0; update_rect.y = 16; update_rect.width = 82; update_rect.height = 16; if (val_ind) { gdk_draw_rectangle(val_ind, ustr->drawing_area->style->black_gc, true, update_rect.x, update_rect.y, update_rect.width, update_rect.height); gdk_draw_string(val_ind, ustr->drawing_area->style->font, ustr->drawing_area->style->white_gc, update_rect.x+6, update_rect.y+12, str); gtk_widget_draw (ustr->drawing_area, &update_rect); } gdk_flush(); } void pan_move_event(GtkWidget *, GdkEvent *, gpointer) { global_draw_volume = 0; //draw_balance(); } void pan_release_event(GtkWidget *, GdkEvent *, gpointer) { global_draw_volume = 1; } void draw_pan(float the_val) { update_struct *ustr = &global_ustr; GdkRectangle update_rect; char str[60]; int pan = (int)(the_val * 100.0); if (pan < 0) { sprintf(str, "Pan: left %d%%", - pan); } else if (pan > 0) { sprintf(str, "Pan: right %d%%", pan); } else { sprintf(str, "Pan: center"); } update_rect.x = 0; update_rect.y = 16; update_rect.width = 82; update_rect.height = 18; if (val_ind) { gdk_draw_rectangle(val_ind, ustr->drawing_area->style->black_gc, true, update_rect.x, update_rect.y, update_rect.width, update_rect.height); gdk_draw_string(val_ind, ustr->drawing_area->style->font, ustr->drawing_area->style->white_gc, update_rect.x+6, update_rect.y+12, str); gtk_widget_draw (ustr->drawing_area, &update_rect); } gdk_flush(); } void speed_move_event(GtkWidget *, GdkEvent *, gpointer) { //draw_speed(); } void draw_speed(float speed) { update_struct *ustr = &global_ustr; GtkAdjustment *adj; GdkRectangle update_rect; char str[60]; int speed_val; adj = GTK_RANGE(ustr->speed_scale)->adjustment; //speed_val = (int)GTK_ADJUSTMENT(adj)->value; speed_val = (int)(speed * 100.0); // We need percentages if (speed_val < ZERO_PITCH_TRESH && speed_val > -ZERO_PITCH_TRESH) { sprintf(str, "Speed: pause"); } else sprintf(str, "Speed: %d%% ", speed_val); update_rect.x = 0; update_rect.y = 0; update_rect.width = 82; update_rect.height = 16; if (val_ind) { gdk_draw_rectangle(val_ind, ustr->drawing_area->style->black_gc, true, update_rect.x, update_rect.y, update_rect.width, update_rect.height); gdk_draw_string(val_ind, ustr->drawing_area->style->font, ustr->drawing_area->style->white_gc, update_rect.x+6, update_rect.y+14, str); gtk_widget_draw (ustr->drawing_area, &update_rect); } gdk_flush(); } void val_release_event(GtkWidget *widget, GdkEvent *, gpointer) { update_struct *ustr = &global_ustr; GdkRectangle update_rect; update_rect.x = 0; update_rect.y = 0; update_rect.width = 106; update_rect.height = 20; if (val_ind) { gdk_draw_rectangle(val_ind, ustr->drawing_area->style->black_gc, true, 0, 0, ustr->drawing_area->allocation.width-64, 20); gtk_widget_draw (ustr->drawing_area, &update_rect); } } void release_event(GtkWidget *widget, GdkEvent *, gpointer) { GtkAdjustment *adj; update_struct *ustr = &global_ustr; Playlist *pl = (Playlist *)ustr->data; CorePlayer *p = pl->GetCorePlayer(); adj = GTK_RANGE(widget)->adjustment; p->Seek((int)adj->value); global_update = 1; } void move_event(GtkWidget *, GdkEvent *, gpointer data) { indicator_callback(data, 0); } void speed_cb(GtkWidget *widget, gpointer data) { Playlist *pl = (Playlist *)data; CorePlayer *p = pl->GetCorePlayer(); float val = GTK_ADJUSTMENT(widget)->value; if (val < ZERO_PITCH_TRESH && val > -ZERO_PITCH_TRESH) val = 0; GDK_THREADS_LEAVE(); p->SetSpeed( (float) val / 100.0); GDK_THREADS_ENTER(); draw_speed(val / 100.0); } pthread_t smoother_thread; pthread_mutex_t smoother_mutex = PTHREAD_MUTEX_INITIALIZER; static float destination = 100.0; void smoother(void *data) { GtkAdjustment *adj = (GtkAdjustment *)data; float temp, cur_val; int done = 0; if (pthread_mutex_trylock(&smoother_mutex) != 0) { pthread_exit(NULL); } nice(5); if (adj) { //alsaplayer_error("going from %.2f to %.2f", // adj->value, destination); cur_val = adj->value; while (!done) { temp = cur_val - destination; if (temp < 0.0) temp = -temp; if (temp <= 2.5) { done = 1; continue; } if (cur_val < destination) { GDK_THREADS_ENTER(); gtk_adjustment_set_value(adj, cur_val); gdk_flush(); GDK_THREADS_LEAVE(); cur_val += 5.0; } else { GDK_THREADS_ENTER(); gtk_adjustment_set_value(adj, cur_val); gdk_flush(); GDK_THREADS_LEAVE(); cur_val -= 5.0; } dosleep(10000); } GDK_THREADS_ENTER(); gtk_adjustment_set_value(adj, destination); gdk_flush(); GDK_THREADS_LEAVE(); } pthread_mutex_unlock(&smoother_mutex); pthread_exit(NULL); } pthread_t looper_thread; pthread_mutex_t looper_mutex = PTHREAD_MUTEX_INITIALIZER; void looper(void *data) { // GtkAdjustment *adj = (GtkAdjustment *)data; loop_struct *loop = &global_loop; update_struct *ustr = &global_ustr; Playlist *pl = (Playlist *)ustr->data; unsigned int track = pl->GetCurrent(); CorePlayer *p = pl->GetCorePlayer(); if (pthread_mutex_trylock(&looper_mutex) != 0) { pthread_exit(NULL); } nice(5); while (loop->state == LOOP_ON && loop->track == track) { if (loop->track != track) { loop->state = LOOP_OFF; } else if(p->GetPosition() >= loop->end) { p->Seek(lroundf(loop->start)); // global_update = 1; } dosleep(10000); } pthread_mutex_unlock(&looper_mutex); pthread_exit(NULL); } gboolean key_press_cb (GtkWidget *widget, GdkEventKey *event, gpointer data) { GtkAdjustment *adj; update_struct *ustr = &global_ustr; /* key definitions are from enum gtk_keymap */ if (event->state && GDK_CONTROL_MASK) { switch(event->keyval) { case GDK_q: exit_cb(NULL,NULL); break; default: break; } } else { switch(event->keyval) { case STOP_KEY: stop_cb(NULL, ustr->data); break; case PLAY_KEY: play_cb(NULL, ustr->data); break; case PAUSE_KEY: pause_cb(NULL, ustr->speed_scale); break; case NEXT_KEY: playlist_window_gtk_next(NULL, ustr->data); break; case PREV_KEY: playlist_window_gtk_prev(NULL, ustr->data); break; case FWD_KEY: forward_skip_cb(NULL, ustr->pos_scale); break; case BACK_KEY: reverse_skip_cb(NULL, ustr->pos_scale); break; case FWD_PLAY_KEY: forward_play_cb(NULL, ustr->speed_scale); break; case REV_PLAY_KEY: reverse_play_cb(NULL, ustr->speed_scale); break; case SPEED_UP_KEY: adj = GTK_RANGE(ustr->speed_scale)->adjustment; gtk_adjustment_set_value(adj, EQ_TEMP_STEP(adj->value, 1)); break; case SPEED_DOWN_KEY: adj = GTK_RANGE(ustr->speed_scale)->adjustment; gtk_adjustment_set_value(adj, EQ_TEMP_STEP(adj->value, -1)); break; case SPEED_COMMA_UP_KEY: adj = GTK_RANGE(ustr->speed_scale)->adjustment; gtk_adjustment_set_value(adj, EQ_TEMP_STEP(adj->value, 0.234600103846)); break; case SPEED_COMMA_DOWN_KEY: adj = GTK_RANGE(ustr->speed_scale)->adjustment; gtk_adjustment_set_value(adj, EQ_TEMP_STEP(adj->value, -0.234600103846)); break; case VOL_UP_KEY: adj = GTK_RANGE(ustr->vol_scale)->adjustment; gtk_adjustment_set_value(adj, adj->value + 0.5); break; break; case VOL_DOWN_KEY: adj = GTK_RANGE(ustr->vol_scale)->adjustment; gtk_adjustment_set_value(adj, adj->value - 0.5); break; case LOOP_KEY: loop_cb(NULL, ustr->pos_scale); break; default: //printf("Unknown key pressed: %c\n", event->keyval); break; } } return FALSE; } void loop_cb(GtkWidget *, gpointer data) { GtkAdjustment *adj = GTK_RANGE(data)->adjustment; update_struct *ustr = &global_ustr; Playlist *pl = (Playlist *)ustr->data; loop_struct *loop = &global_loop; switch(loop->state) { case LOOP_OFF: loop->track = pl->GetCurrent(); loop->start = adj->value; loop->state = LOOP_START_SET; break; case LOOP_START_SET: loop->end = adj->value; loop->state = LOOP_ON; pthread_create(&looper_thread, NULL, (void * (*)(void *))looper, adj); pthread_detach(looper_thread); break; case LOOP_ON: loop->state = LOOP_OFF; break; default: break; } } void forward_skip_cb(GtkWidget *, gpointer data) { GtkAdjustment *adj; update_struct *ustr = &global_ustr; Playlist *pl = (Playlist *)ustr->data; CorePlayer *p = pl->GetCorePlayer(); adj = GTK_RANGE(data)->adjustment; p->Seek((int)adj->value + 5 * FPS_HACK); global_update = 1; } void reverse_skip_cb(GtkWidget *, gpointer data) { GtkAdjustment *adj; update_struct *ustr = &global_ustr; Playlist *pl = (Playlist *)ustr->data; CorePlayer *p = pl->GetCorePlayer(); adj = GTK_RANGE(data)->adjustment; p->Seek((int)adj->value - 5 * FPS_HACK); global_update = 1; } void forward_play_cb(GtkWidget *, gpointer data) { GtkAdjustment *adj; int smooth_trans; smooth_trans = prefs_get_bool(ap_prefs, "gtk_interface", "smooth_transition", 0); adj = GTK_RANGE(data)->adjustment; if (smooth_trans) { destination = 100.0; pthread_create(&smoother_thread, NULL, (void * (*)(void *))smoother, adj); pthread_detach(smoother_thread); } else { gtk_adjustment_set_value(adj, 100.0); } } void reverse_play_cb(GtkWidget *, gpointer data) { GtkAdjustment *adj; int smooth_trans; smooth_trans = prefs_get_bool(ap_prefs, "gtk_interface", "smooth_transition", 0); adj = GTK_RANGE(data)->adjustment; if (smooth_trans) { destination = -100.0; pthread_create(&smoother_thread, NULL, (void * (*)(void *))smoother, adj); pthread_detach(smoother_thread); } else { gtk_adjustment_set_value(adj, -100.0); } } void pause_cb(GtkWidget *, gpointer data) { GtkAdjustment *adj; int smooth_trans; adj = GTK_RANGE(data)->adjustment; smooth_trans = prefs_get_bool(ap_prefs, "gtk_interface", "smooth_transition", 0); if (smooth_trans) { if (destination <= adj->value && destination != 0.0) { destination = 0.0; } else { destination = 100.0; } pthread_create(&smoother_thread, NULL, (void * (*)(void *))smoother, adj); pthread_detach(smoother_thread); } else { if (adj->value != 0.0) { gtk_adjustment_set_value(adj, 0.0); } else { gtk_adjustment_set_value(adj, 100.0); } } } void stop_cb(GtkWidget *, gpointer data) { Playlist *pl = (Playlist *)data; CorePlayer *p = pl->GetCorePlayer(); if (p && p->IsPlaying()) { pl->Pause(); GDK_THREADS_LEAVE(); p->Stop(); p->Close(); GDK_THREADS_ENTER(); //clear_buffer(); } } void eject_cb(GtkWidget *, gpointer); void play_cb(GtkWidget *widget, gpointer data) { Playlist *pl = (Playlist *)data; CorePlayer *p = pl->GetCorePlayer(); if (p) { pl->UnPause(); if (p->IsPlaying() || !pl->Length()) { // eject_cb(widget, data); GDK_THREADS_LEAVE(); pl->Play(pl->GetCurrent()); GDK_THREADS_ENTER(); } else if (!p->IsPlaying() && pl->Length()) { GDK_THREADS_LEAVE(); pl->Play(pl->GetCurrent()); GDK_THREADS_ENTER(); } } } void eject_cb(GtkWidget *, gpointer data) { Playlist *pl = (Playlist *)data; CorePlayer *p = pl->GetCorePlayer(); if (p) { gtk_widget_show(play_dialog); gdk_window_raise(play_dialog->window); } } void volume_cb(GtkWidget *widget, gpointer data) { GtkAdjustment *adj = (GtkAdjustment *)widget; Playlist *pl = (Playlist *)data; CorePlayer *p = pl->GetCorePlayer(); if (p) { int idx = (int)adj->value; idx = (idx < 0) ? 0 : ((idx > 13) ? 13 : idx); GDK_THREADS_LEAVE(); p->SetVolume(((float) vol_scale[idx]) / 100.0); GDK_THREADS_ENTER(); } } void pan_cb(GtkWidget *widget, gpointer data) { GtkAdjustment *adj = (GtkAdjustment *)widget; Playlist *pl = (Playlist *)data; CorePlayer *p = pl->GetCorePlayer(); int val; if (p) { val = (int)adj->value; if (val > MIN_BAL_TRESH && val < MAX_BAL_TRESH) val = BAL_CENTER; GDK_THREADS_LEAVE(); p->SetPan((float)(val) / 100.0 - 1.0); GDK_THREADS_ENTER(); } } gint indicator_callback(gpointer, int locking) { update_struct *ustr; Playlist *pl; CorePlayer *p; GtkAdjustment *adj; GdkDrawable *drawable; GdkRectangle update_rect; GdkColor color; stream_info info; char title_string[256]; char str[60]; long slider_val=0, t_min=0, t_sec=0; long c_hsec=0, secs=0, c_min=0, c_sec=0; long sr=0; int nr_frames=0; static char old_str[60] = ""; ustr = &global_ustr; pl = (Playlist *)ustr->data; p = pl->GetCorePlayer(); drawable = ustr->drawing_area->window; adj = GTK_RANGE(ustr->speed_scale)->adjustment; //gtk_adjustment_set_value(adj, p->GetSpeed() * 100.0); adj = GTK_RANGE(ustr->pos_scale)->adjustment; if (p->CanSeek()) { adj->lower = 0; adj->upper = p->GetFrames() - 32; // HACK!! if (locking) GDK_THREADS_ENTER(); gtk_widget_set_sensitive(GTK_WIDGET(ustr->pos_scale), true); if (locking) GDK_THREADS_LEAVE(); } else { adj->lower = adj->upper = 0; if (locking) GDK_THREADS_ENTER(); gtk_adjustment_set_value(adj, 0); gtk_widget_set_sensitive(GTK_WIDGET(ustr->pos_scale), false); if (locking) GDK_THREADS_LEAVE(); } memset(&info, 0, sizeof(stream_info)); color.red = color.blue = color.green = 0; if (locking) GDK_THREADS_ENTER(); gdk_color_alloc(gdk_colormap_get_system(), &color); if (locking) GDK_THREADS_LEAVE(); sr = p->GetSampleRate(); nr_frames = p->GetFrames(); if (p->IsActive()) { int pos; pos = global_update ? p->GetPosition() : (int) adj->value; slider_val = pos; secs = global_update ? p->GetCurrentTime() : p->GetCurrentTime((int) adj->value); c_min = secs / 6000; c_sec = (secs % 6000) / 100; #ifdef SUBSECOND_DISPLAY c_hsec = secs % 100; #endif if (nr_frames >= 0) { secs = p->GetCurrentTime(nr_frames); t_min = secs / 6000; t_sec = (secs % 6000) / 100; } if (locking) GDK_THREADS_ENTER(); gtk_adjustment_set_value(adj, pos); if (locking) GDK_THREADS_LEAVE(); p->GetStreamInfo(&info); } else { t_min = 0; t_sec = 0; c_sec = 0; c_min = 0; c_hsec = 0; sprintf(info.title, "No stream"); } if (nr_frames < 0 || strlen(info.status)) { sprintf(str, "%s", info.status); if (!strlen(info.status)) { alsaplayer_error("empty string"); } } else { #ifdef SUBSECOND_DISPLAY sprintf(str, "%02ld:%02ld.%02d / %02d:%02d", c_min, c_sec, c_hsec, t_min, t_sec); #else if (nr_frames >= 0) sprintf(str, "%02ld:%02ld / %02ld:%02ld", c_min, c_sec, t_min, t_sec); #endif } if (val_ind && strcmp(old_str, str) != 0) { strcpy(old_str, str); // Painting in pixmap here update_rect.x = ustr->drawing_area->allocation.width-INDICATOR_WIDTH; update_rect.y = 16; update_rect.width = INDICATOR_WIDTH; update_rect.height = 18; if (locking) GDK_THREADS_ENTER(); gdk_draw_rectangle(val_ind, ustr->drawing_area->style->black_gc, true, update_rect.x, update_rect.y, update_rect.width, update_rect.height); gdk_draw_string(val_ind, ustr->drawing_area->style->font, ustr->drawing_area->style->white_gc, update_rect.x + 2, update_rect.y + 12, str); gtk_widget_draw (ustr->drawing_area, &update_rect); if (locking) GDK_THREADS_LEAVE(); } if (locking) GDK_THREADS_ENTER(); draw_format(info.stream_type); if (strlen(info.artist)) { sprintf(title_string, "%s - %s", info.title, info.artist); draw_title(title_string); } else if (strlen(info.title)) { sprintf(title_string, "%s", info.title); draw_title(title_string); } else { char *p = strrchr(info.path, '/'); if (p) { p++; draw_title(p); } else { draw_title(info.path); } } update_rect.x = 0; update_rect.y = 0; update_rect.width = ustr->drawing_area->allocation.width; update_rect.height = ustr->drawing_area->allocation.height; gdk_flush(); if (locking) GDK_THREADS_LEAVE(); return true; } void cd_cb(GtkWidget *, gpointer data) { Playlist *pl = (Playlist *)data; CorePlayer *p = pl->GetCorePlayer(); if (p) { pl->Pause(); GDK_THREADS_LEAVE(); p->Stop(); pl->Clear(); if (p->Open("CD.cdda")) { p->Start(); } GDK_THREADS_ENTER(); pl->UnPause(); } } void exit_cb(GtkWidget *, gpointer data) { GtkFunction f = (GtkFunction)data; global_update = -1; gdk_flush(); if (f) { // Oh my, a very ugly HACK indeed! But it works GDK_THREADS_LEAVE(); f(NULL); GDK_THREADS_ENTER(); } // This is more HACK stuff, but then again GTK IS A BIG FREAKING HACK! GDK_THREADS_LEAVE(); gtk_main_quit(); gdk_flush(); GDK_THREADS_ENTER(); } void scopes_cb(GtkWidget *, gpointer data) { GtkWidget *win = (GtkWidget *)data; int x, y; if (global_scopes_show) { gdk_window_get_origin(win->window, &x, &y); if (windows_x_offset >= 0) { x -= windows_x_offset; y -= windows_y_offset; } gtk_widget_hide(win); gtk_widget_set_uposition(win, x, y); } else { gtk_widget_show(win); } global_scopes_show = 1 - global_scopes_show; } void effects_cb(GtkWidget *, gpointer data) { GtkWidget *win = (GtkWidget *)data; int x, y; if (global_effects_show) { gdk_window_get_origin(win->window, &x, &y); if (windows_x_offset >= 0) { x -= windows_x_offset; y -= windows_y_offset; } gtk_widget_hide(win); gtk_widget_set_uposition(win, x, y); } else { gtk_widget_show(win); } global_effects_show = 1 - global_effects_show; } void play_file_ok(GtkWidget *, gpointer data) { Playlist *playlist = (Playlist *)data; CorePlayer *p = playlist->GetCorePlayer(); if (p) { GtkCList *file_list = GTK_CLIST(GTK_FILE_SELECTION(play_dialog)->file_list); GList *next = file_list->selection; std::vector paths; gchar *current_dir = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(play_dialog))); char *path; int index; int marker = strlen(current_dir)-1; while (marker > 0 && current_dir[marker] != '/') current_dir[marker--] = '\0'; // Write default_play_path prefs_set_string(ap_prefs, "gtk_interface", "default_play_path", current_dir); if (!next) { gchar *sel = g_strdup(gtk_entry_get_text(GTK_ENTRY(GTK_FILE_SELECTION(play_dialog)->selection_entry))); if (sel && strlen(sel)) { if (!strstr(sel, "http://")) paths.push_back(std::string(current_dir) + "/" + sel); else paths.push_back(sel); GDK_THREADS_LEAVE(); playlist->AddAndPlay(paths); GDK_THREADS_ENTER(); gtk_entry_set_text(GTK_ENTRY(GTK_FILE_SELECTION(play_dialog)->selection_entry), ""); g_free(sel); } return; } // Get the selections while (next) { index = GPOINTER_TO_INT(next->data); gtk_clist_get_text(file_list, index, 0, &path); if (path) { paths.push_back(std::string(current_dir) + "/" + path); } next = next->next; } // Sort them (they're sometimes returned in a slightly odd order) sort(paths.begin(), paths.end()); // Add selections to the queue, and start playing them GDK_THREADS_LEAVE(); playlist->AddAndPlay(paths); GDK_THREADS_ENTER(); playlist->UnPause(); gtk_clist_unselect_all(file_list); g_free(current_dir); } // Save path gtk_widget_hide(GTK_WIDGET(play_dialog)); } void play_file_cancel(GtkWidget *, gpointer data) { gint x,y; gdk_window_get_root_origin(GTK_WIDGET(data)->window, &x, &y); gtk_widget_hide(GTK_WIDGET(data)); gtk_widget_hide(GTK_WIDGET(data)); gtk_widget_set_uposition(GTK_WIDGET(data), x, y); } gboolean play_file_delete_event(GtkWidget *widget, GdkEvent *, gpointer) { gint x, y; gdk_window_get_root_origin(widget->window, &x, &y); gtk_widget_hide(widget); gtk_widget_set_uposition(widget, x, y); return TRUE; } void playlist_cb(GtkWidget *, gpointer data) { PlaylistWindowGTK *pl = (PlaylistWindowGTK *)data; pl->ToggleVisible(); } gint alsaplayer_button_press(GtkWidget *widget, GdkEvent *event) { if (event->type == GDK_BUTTON_PRESS) { GdkEventButton *bevent = (GdkEventButton *) event; gtk_menu_popup (GTK_MENU (widget), NULL, NULL, NULL, NULL, bevent->button, bevent->time); return true; } return false; } GtkWidget *xpm_label_box(gchar * xpm_data[], GtkWidget *to_win) { GtkWidget *box1; GtkWidget *pixmapwid; GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; box1 = gtk_hbox_new(false, 0); gtk_container_border_width(GTK_CONTAINER(box1), 0); style = gtk_widget_get_style(to_win); pixmap = gdk_pixmap_create_from_xpm_d(to_win->window, &mask, &style->bg[ GTK_STATE_NORMAL], xpm_data); pixmapwid = gtk_pixmap_new(pixmap, mask); gtk_box_pack_start(GTK_BOX(box1), pixmapwid, true, false, 1); gtk_widget_show(pixmapwid); return (box1); } void on_expose_event (GtkWidget * widget, GdkEvent *, gpointer data) { gint x, y; if (windows_x_offset == -1) { gdk_window_get_origin (widget->window, &x, &y); windows_x_offset = x - main_window_x; /* Make sure offset seems reasonable. If not, set it to -2 so we don't try this again later. */ if (windows_x_offset < 0 || windows_x_offset > 50) windows_x_offset = -2; else windows_y_offset = y - main_window_y; } } gint pixmap_expose(GtkWidget *widget, GdkEventExpose *event, gpointer) { GdkPixmap *the_pixmap = val_ind; gdk_draw_pixmap(widget->window, widget->style->black_gc, the_pixmap, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); return false; } gint val_area_configure(GtkWidget *widget, GdkEventConfigure *, gpointer) { if (val_ind) { global_update = 0; gdk_pixmap_unref(val_ind); } val_ind = gdk_pixmap_new(widget->window, widget->allocation.width, 32, -1); gdk_draw_rectangle(val_ind, widget->style->black_gc, true, 0, 0, widget->allocation.width, 32); // Set up expose event handler gtk_signal_connect(GTK_OBJECT(widget), "expose_event", (GtkSignalFunc) pixmap_expose, val_ind); global_update = 1; return true; } void init_main_window(Playlist *pl) { GtkWidget *root_menu; GtkWidget *menu_item; GtkWidget *main_window; GtkWidget *effects_window; GtkWidget *scopes_window; GtkWidget *working; GtkWidget *speed_scale; GtkWidget *pix; GtkWidget *val_area; GtkStyle *style; GdkFont *smallfont; GtkAdjustment *adj; // Dirty trick playlist = pl; main_window = create_main_window(); gtk_window_set_policy(GTK_WINDOW(main_window), false, false, false); gtk_window_set_title(GTK_WINDOW(main_window), global_session_name == NULL ? "AlsaPlayer" : global_session_name); gtk_window_set_wmclass(GTK_WINDOW(main_window), "AlsaPlayer", "alsaplayer"); gtk_widget_realize(main_window); playlist_window_gtk = new PlaylistWindowGTK(playlist); effects_window = init_effects_window(); scopes_window = init_scopes_window(); play_dialog = gtk_file_selection_new("Play file or URL"); gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (play_dialog)); GtkCList *file_list = GTK_CLIST(GTK_FILE_SELECTION(play_dialog)->file_list); gtk_clist_set_selection_mode(file_list, GTK_SELECTION_EXTENDED); gtk_signal_connect(GTK_OBJECT( GTK_FILE_SELECTION(play_dialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(play_file_cancel), play_dialog); gtk_signal_connect(GTK_OBJECT(play_dialog), "delete_event", GTK_SIGNAL_FUNC(play_file_delete_event), play_dialog); gtk_signal_connect(GTK_OBJECT( GTK_FILE_SELECTION(play_dialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(play_file_ok), playlist); gtk_file_selection_set_filename(GTK_FILE_SELECTION(play_dialog), prefs_get_string(ap_prefs, "gtk_interface", "default_play_path", "~/")); gtk_signal_connect (GTK_OBJECT (main_window), "expose_event", GTK_SIGNAL_FUNC (on_expose_event), NULL); gtk_signal_connect(GTK_OBJECT(main_window), "key_press_event", GTK_SIGNAL_FUNC(key_press_cb), main_window); speed_scale = get_widget(main_window, "pitch_scale"); smallfont = gdk_font_load("-adobe-helvetica-medium-r-normal--10-*-*-*-*-*-*-*"); if (!smallfont) assert((smallfont = gdk_fontset_load("fixed")) != NULL); style = gtk_style_new(); style = gtk_style_copy(gtk_widget_get_style(main_window)); gdk_font_unref(style->font); style->font = smallfont; gdk_font_ref(style->font); working = get_widget(main_window, "stop_button"); pix = xpm_label_box(stop_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(stop_cb), playlist); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "reverse_button"); pix = xpm_label_box(r_play_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(reverse_play_cb), speed_scale); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "forward_button"); pix = xpm_label_box(f_play_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(forward_play_cb), speed_scale); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "pause_button"); pix = xpm_label_box(pause_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(pause_cb), speed_scale); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "prev_button"); pix = xpm_label_box(prev_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(playlist_window_gtk_prev), playlist); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "next_button"); pix = xpm_label_box(next_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(playlist_window_gtk_next), playlist); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "play_button"); play_pix = xpm_label_box(play_xpm, main_window); gtk_widget_show(play_pix); gtk_container_add(GTK_CONTAINER(working), play_pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(play_cb), playlist); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "volume_pix_frame"); if (working) { pix = xpm_label_box(volume_icon_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); } working = get_widget(main_window, "vol_scale"); if (working) { adj = GTK_RANGE(working)->adjustment; gtk_adjustment_set_value(adj, (pl->GetCorePlayer())->GetVolume() * 100.0); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC(volume_cb), playlist); } val_area = gtk_drawing_area_new(); gtk_drawing_area_size(GTK_DRAWING_AREA(val_area), 204, 32); gtk_widget_show(val_area); global_ustr.vol_scale = working; global_ustr.drawing_area = val_area; global_ustr.data = playlist; if (working) { gtk_signal_connect (GTK_OBJECT (working), "motion_notify_event", GTK_SIGNAL_FUNC(volume_move_event), &global_ustr); gtk_signal_connect (GTK_OBJECT (working), "button_press_event", GTK_SIGNAL_FUNC(volume_move_event), &global_ustr); } gtk_signal_connect(GTK_OBJECT(val_area), "configure_event", (GtkSignalFunc) val_area_configure, NULL); gtk_signal_connect(GTK_OBJECT(val_area), "expose_event", (GtkSignalFunc) pixmap_expose, NULL); working = get_widget(main_window, "balance_pic_frame"); if (working) { pix = xpm_label_box(balance_icon_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); } working = get_widget(main_window, "bal_scale"); if (working) { adj = GTK_RANGE(working)->adjustment; gtk_adjustment_set_value(adj, 100.0); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC(pan_cb), playlist); global_ustr.bal_scale = working; gtk_signal_connect (GTK_OBJECT (working), "motion_notify_event", GTK_SIGNAL_FUNC(pan_move_event), &global_ustr); gtk_signal_connect (GTK_OBJECT (working), "button_press_event", GTK_SIGNAL_FUNC(pan_move_event), &global_ustr); gtk_signal_connect (GTK_OBJECT(working), "button_release_event", GTK_SIGNAL_FUNC(pan_release_event), &global_ustr); } working = get_widget(main_window, "playlist_button"); pix = xpm_label_box(playlist_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); gtk_signal_connect(GTK_OBJECT(working), "clicked", GTK_SIGNAL_FUNC(playlist_cb), playlist_window_gtk); gtk_button_set_relief(GTK_BUTTON(working), GTK_RELIEF_NONE); working = get_widget(main_window, "cd_button"); pix = xpm_label_box(menu_xpm, main_window); gtk_widget_show(pix); gtk_container_add(GTK_CONTAINER(working), pix); //gtk_signal_connect(GTK_OBJECT(working), "clicked", // GTK_SIGNAL_FUNC(cd_cb), p); gtk_button_set_relief(GTK_BUTTON(working),GTK_RELIEF_NONE); working = get_widget(main_window, "info_box"); gtk_widget_set_style(val_area, style); gtk_box_pack_start (GTK_BOX (working), val_area, true, true, 0); global_ustr.data = playlist; working = get_widget(main_window, "pos_scale"); global_ustr.pos_scale = working; working = get_widget(main_window, "pos_scale"); gtk_signal_connect(GTK_OBJECT(working), "button_release_event", GTK_SIGNAL_FUNC(release_event), &global_ustr); gtk_signal_connect (GTK_OBJECT (working), "button_press_event", GTK_SIGNAL_FUNC(press_event), NULL); gtk_signal_connect (GTK_OBJECT (working), "motion_notify_event", GTK_SIGNAL_FUNC(move_event), &global_ustr); global_ustr.speed_scale = speed_scale; #if 1 gtk_signal_connect (GTK_OBJECT (speed_scale), "motion_notify_event", GTK_SIGNAL_FUNC(speed_move_event), &global_ustr); gtk_signal_connect (GTK_OBJECT (speed_scale), "button_press_event", GTK_SIGNAL_FUNC(speed_move_event), &global_ustr); adj = GTK_RANGE(speed_scale)->adjustment; //gtk_adjustment_set_value(adj, 100.0); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC(speed_cb), playlist); #endif gtk_signal_connect(GTK_OBJECT(main_window), "delete_event", GTK_SIGNAL_FUNC(main_window_delete), NULL); // Create root menu root_menu = gtk_menu_new(); // Preferences #if 0 menu_item = gtk_menu_item_new_with_label("Preferences..."); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_widget_show(menu_item); #endif // Scopes menu_item = gtk_menu_item_new_with_label("Scopes..."); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(scopes_cb), scopes_window); gtk_widget_show(menu_item); // Effects menu_item = gtk_menu_item_new_with_label("Effects..."); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(effects_cb), effects_window); gtk_widget_show(menu_item); gtk_widget_set_sensitive(menu_item, false); // About menu_item = gtk_menu_item_new_with_label("About..."); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_widget_show(menu_item); gtk_widget_set_sensitive(menu_item, false); #if 1 // Separator menu_item = gtk_menu_item_new(); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_widget_show(menu_item); // CD playback menu_item = gtk_menu_item_new_with_label("CD Player (CDDA)"); gtk_widget_show(menu_item); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(cd_cb), playlist); #endif // Separator menu_item = gtk_menu_item_new(); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_widget_show(menu_item); // Exit menu_item = gtk_menu_item_new_with_label("Exit"); gtk_menu_append(GTK_MENU(root_menu), menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(exit_cb), NULL); gtk_widget_show(menu_item); working = get_widget(main_window, "cd_button"); gtk_signal_connect_object (GTK_OBJECT (working), "event", GTK_SIGNAL_FUNC(alsaplayer_button_press), GTK_OBJECT(root_menu)); // cd gdk_flush(); //gdk_window_set_decorations(GTK_WIDGET(main_window)->window, (GdkWMDecoration)0); gtk_widget_show(GTK_WIDGET(main_window)); // Check if we should open the playlist if (prefs_get_bool(ap_prefs, "gtk_interface", "playlist_active", 0)) { playlist_window_gtk->Show(); } memset(¬ifier, 0, sizeof(notifier)); notifier.speed_changed = speed_changed; notifier.pan_changed = pan_changed; notifier.volume_changed = volume_changed; notifier.stop_notify = stop_notify; notifier.start_notify = start_notify; notifier.position_notify = position_notify; GDK_THREADS_LEAVE(); playlist->RegisterNotifier(¬ifier, NULL); GDK_THREADS_ENTER(); #if 0 // Setup geometry stuff memset(&geom, 0, sizeof(geom)); toplevel = gtk_widget_get_toplevel(main_window); geom.min_width = 408; geom.min_height = geom.max_height = 98; geom.max_width = 2048; gtk_window_set_geometry_hints(GTK_WINDOW(toplevel), GTK_WIDGET(main_window), &geom, (GdkWindowHints)(GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE)); #endif gdk_flush(); } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gtk_interface.h000066400000000000000000000030151466261456500271760ustar00rootroot00000000000000/* gtk_interface.h * Copyright (C) 1999 Richard Boulton * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _gtk_interface_h_ #define _gtk_interface_h_ #include "CorePlayer.h" #include "Playlist.h" #include extern gint windows_x_offset; extern gint windows_y_offset; extern int global_update; void init_main_window(Playlist *); gboolean key_press_cb (GtkWidget *widget, GdkEventKey *event, gpointer data); enum gtk_keymap { STOP_KEY = GDK_v, PLAY_KEY = GDK_x, PAUSE_KEY = GDK_c, NEXT_KEY = GDK_b, PREV_KEY = GDK_z, FWD_KEY = GDK_g, BACK_KEY = GDK_a, FWD_PLAY_KEY = GDK_f, REV_PLAY_KEY = GDK_s, SPEED_UP_KEY = GDK_t, SPEED_DOWN_KEY = GDK_q, SPEED_COMMA_UP_KEY = GDK_h, SPEED_COMMA_DOWN_KEY = GDK_i, VOL_UP_KEY = GDK_r, VOL_DOWN_KEY = GDK_w, LOOP_KEY = GDK_l }; #endif /* _gtk_interface_h_ */ alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/000077500000000000000000000000001466261456500250055ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/AUTHORS000066400000000000000000000000001466261456500260430ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/ChangeLog000066400000000000000000000000001466261456500265450ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/Makefile.am000066400000000000000000000000441466261456500270370ustar00rootroot00000000000000EXTRA_DIST = alsaplayer.glade fixup alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/NEWS000066400000000000000000000000001466261456500254720ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/README000066400000000000000000000000001466261456500256530ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/acconfig.h000066400000000000000000000003031466261456500267230ustar00rootroot00000000000000#undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef HAVE_LIBSM #undef PACKAGE_LOCALE_DIR #undef PACKAGE_DATA_DIR #undef PACKAGE_SOURCE_DIR alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/alsaplayer.glade000066400000000000000000000613371466261456500301520ustar00rootroot00000000000000 AlsaPlayer alsaplayer ../../gui/pixmaps C False False False gladesrc.c gladesrc.h gladesig.c gladesig.h GtkWindow main_window 408 98 AlsaPlayer GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True False GtkVBox vbox25 False 0 GtkFrame frame1 0 GTK_SHADOW_OUT 0 True True GtkVBox main_box False 0 GtkHBox info_box False 0 0 True True Placeholder GtkVBox pos_box 2 False 0 0 False False GtkHScale pos_scale True False GTK_POS_TOP 1 GTK_UPDATE_CONTINUOUS 0 0 0 0 0 0 0 True True GtkHBox button_scale_box 2 False 0 0 False False GtkHBox control_box 2 False 0 0 False False GtkHBox button_box False 0 0 False True GtkButton cd_button 26 24 True GTK_RELIEF_NORMAL 0 False True GtkButton prev_button 26 24 True GTK_RELIEF_NORMAL 0 False True GtkButton play_button 26 24 True GTK_RELIEF_NORMAL 0 False True GtkButton stop_button 26 24 True GTK_RELIEF_NORMAL 0 False True GtkButton next_button 26 24 True GTK_RELIEF_NORMAL 0 False True GtkButton playlist_button 26 24 True GTK_RELIEF_NORMAL 0 False True GtkVBox audio_control_box False 0 0 True True GtkHBox hbox34 False 0 0 False False GtkHBox hbox36 False 0 0 False False GtkButton reverse_button 22 20 True GTK_RELIEF_NORMAL 0 True True GtkButton pause_button 22 20 True GTK_RELIEF_NORMAL 0 True True GtkButton forward_button 22 20 True GTK_RELIEF_NORMAL 0 True True GtkHScale pitch_scale True False GTK_POS_TOP 1 GTK_UPDATE_CONTINUOUS 100 -400 401 1 1 1 0 True True GtkHBox bal_vol_box False 0 0 True False GtkHBox hbox37 False 0 0 True True GtkVBox balance_pic_frame 30 False 0 0 False True Placeholder GtkHScale bal_scale True False GTK_POS_TOP 1 GTK_UPDATE_CONTINUOUS 100 0 201 1 1 1 0 True True GtkHBox volume_box False 0 0 True True GtkHBox volume_frame False 0 0 True True GtkVBox volume_pix_frame 18 False 0 0 False True Placeholder GtkHScale vol_scale True False GTK_POS_TOP 1 GTK_UPDATE_CONTINUOUS 14 0 14 1 1 1 0 True True GtkWindow playlist_window 480 390 Queue GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False GtkVBox vbox5 False 0 GtkHBox hbox16 8 False 0 0 True True GtkScrolledWindow scrolledwindow1 GTK_POLICY_AUTOMATIC GTK_POLICY_ALWAYS GTK_UPDATE_CONTINUOUS GTK_UPDATE_CONTINUOUS 0 True True GtkViewport viewport1 GTK_SHADOW_NONE GtkCList playlist True 3 80,80,80 GTK_SELECTION_EXTENDED False GTK_SHADOW_IN GtkLabel CList:title label2 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 GtkLabel CList:title label3 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 GtkLabel CList:title label100 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 GtkVBox vbox6 False 6 6 False True GtkButton add_button 70 22 True GTK_RELIEF_NORMAL 0 False True GtkButton del_button 70 True GTK_RELIEF_NORMAL 0 False True GtkButton close_button True GTK_RELIEF_NORMAL 0 False True GTK_PACK_END GtkButton shuffle_button True GTK_RELIEF_NORMAL 0 False False GtkVBox vbox24 False 0 18 False True GtkLabel label101 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 4 False False GtkButton load_button True GTK_RELIEF_NORMAL 0 False False GtkButton save_button True GTK_RELIEF_NORMAL 6 False False GtkButton clear_button 70 True GTK_RELIEF_NORMAL 0 False False GtkButton loop_button True GTK_RELIEF_NORMAL 0 False False GtkVBox playlist_status False 0 4 False True Placeholder GtkFileSelection playlist_load 10 Load Playlist GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False True GtkButton FileSel:ok_button ok_button1 True True GTK_RELIEF_NORMAL GtkButton FileSel:cancel_button cancel_button1 True True GTK_RELIEF_NORMAL GtkFileSelection playlist_save 10 Save Playlist GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False True GtkButton FileSel:ok_button ok_button2 True True GTK_RELIEF_NORMAL GtkButton FileSel:cancel_button cancel_button2 True True GTK_RELIEF_NORMAL GtkWindow effects_window 500 300 Effects GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False GtkVBox vbox23 False 0 GtkHBox hbox31 False 0 0 True True GtkVBox plugin_list_box 8 False 0 0 False True GtkCTree effects_list True 2 80,80 GTK_SELECTION_SINGLE False GTK_SHADOW_IN 0 True True GtkLabel CTree:title label16 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 GtkLabel CTree:title label17 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 GtkVBox parameter_box 8 False 0 0 True True Placeholder GtkHBox button_box 8 False 0 0 False True GtkButton ok_button 80 True GTK_RELIEF_NORMAL 0 False True GTK_PACK_END GtkWindow scopes_window Scopes GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False GtkVBox vbox22 False 0 GtkHBox hbox38 False 0 5 False True GtkLabel label18 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 10 False False GtkHBox scopes_list_box 8 False 0 0 True True GtkScrolledWindow scrolledwindow2 GTK_POLICY_NEVER GTK_POLICY_ALWAYS GTK_UPDATE_CONTINUOUS GTK_UPDATE_CONTINUOUS 0 True True GtkCList scopes_list 150 220 True 2 49,80 GTK_SELECTION_SINGLE False GTK_SHADOW_IN GtkLabel CList:title label14 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 GtkLabel CList:title label15 GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 GtkHBox hbox32 8 False 0 0 False True GtkButton ok_button 80 True GTK_RELIEF_NORMAL 0 False True GTK_PACK_END GtkFileSelection fileselection1 10 Select File GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False True GtkButton FileSel:ok_button ok_button3 True True GTK_RELIEF_NORMAL GtkButton FileSel:cancel_button cancel_button3 True True GTK_RELIEF_NORMAL alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/autogen.sh000077500000000000000000000106231466261456500270100ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` PKG_NAME="the package." DIE=0 (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed to." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed." echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" echo "(or a newer version if it is available)" DIE=1 } } grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ (gettext --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`gettext' installed." echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" echo "(or a newer version if it is available)" DIE=1 } } grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ (gettext --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`gettext' installed." echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" echo "(or a newer version if it is available)" DIE=1 } } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`automake' installed." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" echo "(or a newer version if it is available)" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" echo "(or a newer version if it is available)" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo \`$0\'" command line." echo fi case $CC in xlc ) am_opt=--include-deps;; esac for coin in `find $srcdir -name configure.in -print` do dr=`dirname $coin` if test -f $dr/NO-AUTO-GEN; then echo skipping $dr -- flagged as no auto-gen else echo processing $dr macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` ( cd $dr aclocalinclude="$ACLOCAL_FLAGS" for k in $macrodirs; do if test -d $k; then aclocalinclude="$aclocalinclude -I $k" ##else ## echo "**Warning**: No such directory \`$k'. Ignored." fi done if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then if grep "sed.*POTFILES" configure.in >/dev/null; then : do nothing -- we still have an old unmodified configure.in else echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 echo "Running gettextize... Ignore non-fatal messages." echo "no" | gettextize --force --copy echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi fi if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 echo "Running gettextize... Ignore non-fatal messages." echo "no" | gettextize --force --copy echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then echo "Running libtoolize..." libtoolize --force --copy fi echo "Running aclocal $aclocalinclude ..." aclocal $aclocalinclude if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then echo "Running autoheader..." autoheader fi echo "Running automake --gnu $am_opt ..." automake --add-missing --gnu $am_opt echo "Running autoconf ..." autoconf ) fi done #conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile $PKG_NAME else echo Skipping configure process. fi alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/configure.in000066400000000000000000000017611466261456500273230ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(alsaplayer, 0.1) AM_CONFIG_HEADER(config.h) AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AM_PATH_GTK(1.2.0, , AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) dnl Set PACKAGE_DATA_DIR in config.h. if test "x${datadir}" = 'x${prefix}/share'; then if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}") else AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}") fi else AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}") fi dnl Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") dnl Use -Wall if we have gcc. changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi changequote([,])dnl AC_OUTPUT([ Makefile ]) alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/fixup000077500000000000000000000005551466261456500260730ustar00rootroot00000000000000#!/bin/sh sed s/_with_label' ("")'/' ()'/ gladesrc.c > tmpfile.blabla1 sed s/'#include "gladesig.h"'// tmpfile.blabla1 > tmpfile.blabla2 sed s/g_malloc/'(gchar *) g_malloc'/ tmpfile.blabla2 > gladesrc.c cp -f support.c ../support.cpp cp -f support.h ../support.h cp -f gladesrc.c ../gladesrc.cpp cp -f gladesrc.h ../gladesrc.h rm -f tmpfile.blabla1 tmpfile.blabla2 alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/gladesig.c000066400000000000000000000011041466261456500267240ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include "gladesig.h" #include "gladesrc.h" #include "support.h" void on_file1_activate (GtkMenuItem *menuitem, gpointer user_data) { } void on_special1_activate (GtkMenuItem *menuitem, gpointer user_data) { } void on_preferences1_activate (GtkMenuItem *menuitem, gpointer user_data) { } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/gladesig.h000066400000000000000000000007001466261456500267320ustar00rootroot00000000000000#include void on_file1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_special1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_preferences1_activate (GtkMenuItem *menuitem, gpointer user_data); alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/gladesrc.c000066400000000000000000000741251466261456500267460ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include "gladesrc.h" #include "support.h" GtkWidget* create_main_window (void) { GtkWidget *main_window; GtkWidget *vbox25; GtkWidget *frame1; GtkWidget *main_box; GtkWidget *info_box; GtkWidget *pos_box; GtkWidget *pos_scale; GtkWidget *button_scale_box; GtkWidget *control_box; GtkWidget *button_box; GtkWidget *cd_button; GtkWidget *prev_button; GtkWidget *play_button; GtkWidget *stop_button; GtkWidget *next_button; GtkWidget *playlist_button; GtkWidget *audio_control_box; GtkWidget *hbox34; GtkWidget *hbox36; GtkWidget *reverse_button; GtkWidget *pause_button; GtkWidget *forward_button; GtkWidget *pitch_scale; GtkWidget *bal_vol_box; GtkWidget *hbox37; GtkWidget *balance_pic_frame; GtkWidget *bal_scale; GtkWidget *volume_box; GtkWidget *volume_frame; GtkWidget *volume_pix_frame; GtkWidget *vol_scale; main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (main_window), "main_window", main_window); gtk_widget_set_usize (main_window, 408, 98); gtk_window_set_title (GTK_WINDOW (main_window), "AlsaPlayer"); gtk_window_set_policy (GTK_WINDOW (main_window), TRUE, TRUE, FALSE); vbox25 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox25); gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox25", vbox25, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox25); gtk_container_add (GTK_CONTAINER (main_window), vbox25); frame1 = gtk_frame_new (NULL); gtk_widget_ref (frame1); gtk_object_set_data_full (GTK_OBJECT (main_window), "frame1", frame1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (vbox25), frame1, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_OUT); main_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (main_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_box", main_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_box); gtk_container_add (GTK_CONTAINER (frame1), main_box); info_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (info_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "info_box", info_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (info_box); gtk_box_pack_start (GTK_BOX (main_box), info_box, TRUE, TRUE, 0); pos_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (pos_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "pos_box", pos_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pos_box); gtk_box_pack_start (GTK_BOX (main_box), pos_box, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (pos_box), 2); pos_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0))); gtk_widget_ref (pos_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "pos_scale", pos_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pos_scale); gtk_box_pack_start (GTK_BOX (pos_box), pos_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (pos_scale), FALSE); button_scale_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (button_scale_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_scale_box", button_scale_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_scale_box); gtk_box_pack_start (GTK_BOX (main_box), button_scale_box, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_scale_box), 2); control_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (control_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "control_box", control_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (control_box); gtk_box_pack_start (GTK_BOX (button_scale_box), control_box, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (control_box), 2); button_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (button_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_box", button_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_box); gtk_box_pack_start (GTK_BOX (control_box), button_box, FALSE, TRUE, 0); cd_button = gtk_button_new (); gtk_widget_ref (cd_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "cd_button", cd_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (cd_button); gtk_box_pack_start (GTK_BOX (button_box), cd_button, FALSE, TRUE, 0); gtk_widget_set_usize (cd_button, 26, 24); prev_button = gtk_button_new (); gtk_widget_ref (prev_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "prev_button", prev_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (prev_button); gtk_box_pack_start (GTK_BOX (button_box), prev_button, FALSE, TRUE, 0); gtk_widget_set_usize (prev_button, 26, 24); play_button = gtk_button_new (); gtk_widget_ref (play_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "play_button", play_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (play_button); gtk_box_pack_start (GTK_BOX (button_box), play_button, FALSE, TRUE, 0); gtk_widget_set_usize (play_button, 26, 24); stop_button = gtk_button_new (); gtk_widget_ref (stop_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "stop_button", stop_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (stop_button); gtk_box_pack_start (GTK_BOX (button_box), stop_button, FALSE, TRUE, 0); gtk_widget_set_usize (stop_button, 26, 24); next_button = gtk_button_new (); gtk_widget_ref (next_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "next_button", next_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (next_button); gtk_box_pack_start (GTK_BOX (button_box), next_button, FALSE, TRUE, 0); gtk_widget_set_usize (next_button, 26, 24); playlist_button = gtk_button_new (); gtk_widget_ref (playlist_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "playlist_button", playlist_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (playlist_button); gtk_box_pack_start (GTK_BOX (button_box), playlist_button, FALSE, TRUE, 0); gtk_widget_set_usize (playlist_button, 26, 24); audio_control_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (audio_control_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "audio_control_box", audio_control_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (audio_control_box); gtk_box_pack_start (GTK_BOX (button_scale_box), audio_control_box, TRUE, TRUE, 0); hbox34 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox34); gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox34", hbox34, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox34); gtk_box_pack_start (GTK_BOX (audio_control_box), hbox34, FALSE, FALSE, 0); hbox36 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox36); gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox36", hbox36, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox36); gtk_box_pack_start (GTK_BOX (hbox34), hbox36, FALSE, FALSE, 0); reverse_button = gtk_button_new (); gtk_widget_ref (reverse_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "reverse_button", reverse_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (reverse_button); gtk_box_pack_start (GTK_BOX (hbox36), reverse_button, TRUE, TRUE, 0); gtk_widget_set_usize (reverse_button, 22, 20); pause_button = gtk_button_new (); gtk_widget_ref (pause_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "pause_button", pause_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pause_button); gtk_box_pack_start (GTK_BOX (hbox36), pause_button, TRUE, TRUE, 0); gtk_widget_set_usize (pause_button, 22, 20); forward_button = gtk_button_new (); gtk_widget_ref (forward_button); gtk_object_set_data_full (GTK_OBJECT (main_window), "forward_button", forward_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (forward_button); gtk_box_pack_start (GTK_BOX (hbox36), forward_button, TRUE, TRUE, 0); gtk_widget_set_usize (forward_button, 22, 20); pitch_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (100, -400, 401, 1, 1, 1))); gtk_widget_ref (pitch_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "pitch_scale", pitch_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pitch_scale); gtk_box_pack_start (GTK_BOX (hbox34), pitch_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (pitch_scale), FALSE); bal_vol_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (bal_vol_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "bal_vol_box", bal_vol_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (bal_vol_box); gtk_box_pack_start (GTK_BOX (audio_control_box), bal_vol_box, TRUE, FALSE, 0); hbox37 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox37); gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox37", hbox37, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox37); gtk_box_pack_start (GTK_BOX (bal_vol_box), hbox37, TRUE, TRUE, 0); balance_pic_frame = gtk_vbox_new (FALSE, 0); gtk_widget_ref (balance_pic_frame); gtk_object_set_data_full (GTK_OBJECT (main_window), "balance_pic_frame", balance_pic_frame, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (balance_pic_frame); gtk_box_pack_start (GTK_BOX (hbox37), balance_pic_frame, FALSE, TRUE, 0); gtk_widget_set_usize (balance_pic_frame, 30, -2); bal_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (100, 0, 201, 1, 1, 1))); gtk_widget_ref (bal_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "bal_scale", bal_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (bal_scale); gtk_box_pack_start (GTK_BOX (hbox37), bal_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (bal_scale), FALSE); volume_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (volume_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "volume_box", volume_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (volume_box); gtk_box_pack_start (GTK_BOX (bal_vol_box), volume_box, TRUE, TRUE, 0); volume_frame = gtk_hbox_new (FALSE, 0); gtk_widget_ref (volume_frame); gtk_object_set_data_full (GTK_OBJECT (main_window), "volume_frame", volume_frame, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (volume_frame); gtk_box_pack_start (GTK_BOX (volume_box), volume_frame, TRUE, TRUE, 0); volume_pix_frame = gtk_vbox_new (FALSE, 0); gtk_widget_ref (volume_pix_frame); gtk_object_set_data_full (GTK_OBJECT (main_window), "volume_pix_frame", volume_pix_frame, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (volume_pix_frame); gtk_box_pack_start (GTK_BOX (volume_frame), volume_pix_frame, FALSE, TRUE, 0); gtk_widget_set_usize (volume_pix_frame, 18, -2); vol_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (14, 0, 14, 1, 1, 1))); gtk_widget_ref (vol_scale); gtk_object_set_data_full (GTK_OBJECT (main_window), "vol_scale", vol_scale, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vol_scale); gtk_box_pack_start (GTK_BOX (volume_frame), vol_scale, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (vol_scale), FALSE); return main_window; } GtkWidget* create_playlist_window (void) { GtkWidget *playlist_window; GtkWidget *vbox5; GtkWidget *hbox16; GtkWidget *scrolledwindow1; GtkWidget *viewport1; GtkWidget *playlist; GtkWidget *label2; GtkWidget *label3; GtkWidget *label100; GtkWidget *vbox6; GtkWidget *add_button; GtkWidget *del_button; GtkWidget *close_button; GtkWidget *shuffle_button; GtkWidget *vbox24; GtkWidget *label101; GtkWidget *load_button; GtkWidget *save_button; GtkWidget *clear_button; GtkWidget *playlist_status; playlist_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (playlist_window), "playlist_window", playlist_window); gtk_widget_set_usize (playlist_window, 480, 300); gtk_window_set_title (GTK_WINDOW (playlist_window), "Queue"); vbox5 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox5); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "vbox5", vbox5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox5); gtk_container_add (GTK_CONTAINER (playlist_window), vbox5); hbox16 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox16); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "hbox16", hbox16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox16); gtk_box_pack_start (GTK_BOX (vbox5), hbox16, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox16), 8); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow1); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "scrolledwindow1", scrolledwindow1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (hbox16), scrolledwindow1, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); viewport1 = gtk_viewport_new (NULL, NULL); gtk_widget_ref (viewport1); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "viewport1", viewport1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (viewport1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport1), GTK_SHADOW_NONE); playlist = gtk_clist_new (3); gtk_widget_ref (playlist); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "playlist", playlist, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (playlist); gtk_container_add (GTK_CONTAINER (viewport1), playlist); gtk_clist_set_column_width (GTK_CLIST (playlist), 0, 80); gtk_clist_set_column_width (GTK_CLIST (playlist), 1, 80); gtk_clist_set_column_width (GTK_CLIST (playlist), 2, 80); gtk_clist_set_selection_mode (GTK_CLIST (playlist), GTK_SELECTION_EXTENDED); gtk_clist_column_titles_hide (GTK_CLIST (playlist)); label2 = gtk_label_new ("label2"); gtk_widget_ref (label2); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label2", label2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label2); gtk_clist_set_column_widget (GTK_CLIST (playlist), 0, label2); label3 = gtk_label_new ("label3"); gtk_widget_ref (label3); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label3", label3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label3); gtk_clist_set_column_widget (GTK_CLIST (playlist), 1, label3); label100 = gtk_label_new ("label100"); gtk_widget_ref (label100); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label100", label100, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label100); gtk_clist_set_column_widget (GTK_CLIST (playlist), 2, label100); vbox6 = gtk_vbox_new (FALSE, 6); gtk_widget_ref (vbox6); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "vbox6", vbox6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox6); gtk_box_pack_start (GTK_BOX (hbox16), vbox6, FALSE, TRUE, 6); add_button = gtk_button_new_with_label ("Add..."); gtk_widget_ref (add_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "add_button", add_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (add_button); gtk_box_pack_start (GTK_BOX (vbox6), add_button, FALSE, TRUE, 0); gtk_widget_set_usize (add_button, 70, 22); del_button = gtk_button_new_with_label ("Remove"); gtk_widget_ref (del_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "del_button", del_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (del_button); gtk_box_pack_start (GTK_BOX (vbox6), del_button, FALSE, TRUE, 0); gtk_widget_set_usize (del_button, 70, -2); close_button = gtk_button_new_with_label ("Close"); gtk_widget_ref (close_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "close_button", close_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (close_button); gtk_box_pack_end (GTK_BOX (vbox6), close_button, FALSE, TRUE, 0); shuffle_button = gtk_button_new_with_label ("Shuffle"); gtk_widget_ref (shuffle_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "shuffle_button", shuffle_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (shuffle_button); gtk_box_pack_start (GTK_BOX (vbox6), shuffle_button, FALSE, FALSE, 0); vbox24 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox24); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "vbox24", vbox24, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox24); gtk_box_pack_start (GTK_BOX (vbox6), vbox24, FALSE, TRUE, 18); label101 = gtk_label_new ("playlist"); gtk_widget_ref (label101); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "label101", label101, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label101); gtk_box_pack_start (GTK_BOX (vbox24), label101, FALSE, FALSE, 4); load_button = gtk_button_new_with_label ("Load..."); gtk_widget_ref (load_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "load_button", load_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (load_button); gtk_box_pack_start (GTK_BOX (vbox24), load_button, FALSE, FALSE, 0); save_button = gtk_button_new_with_label ("Save..."); gtk_widget_ref (save_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "save_button", save_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (save_button); gtk_box_pack_start (GTK_BOX (vbox24), save_button, FALSE, FALSE, 6); clear_button = gtk_button_new_with_label ("Clear"); gtk_widget_ref (clear_button); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "clear_button", clear_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (clear_button); gtk_box_pack_start (GTK_BOX (vbox24), clear_button, FALSE, FALSE, 0); gtk_widget_set_usize (clear_button, 70, -2); playlist_status = gtk_vbox_new (FALSE, 0); gtk_widget_ref (playlist_status); gtk_object_set_data_full (GTK_OBJECT (playlist_window), "playlist_status", playlist_status, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (playlist_status); gtk_box_pack_start (GTK_BOX (vbox5), playlist_status, FALSE, TRUE, 4); return playlist_window; } GtkWidget* create_playlist_load (void) { GtkWidget *playlist_load; GtkWidget *ok_button1; GtkWidget *cancel_button1; playlist_load = gtk_file_selection_new ("Load Playlist"); gtk_object_set_data (GTK_OBJECT (playlist_load), "playlist_load", playlist_load); gtk_container_set_border_width (GTK_CONTAINER (playlist_load), 10); ok_button1 = GTK_FILE_SELECTION (playlist_load)->ok_button; gtk_object_set_data (GTK_OBJECT (playlist_load), "ok_button1", ok_button1); gtk_widget_show (ok_button1); GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT); cancel_button1 = GTK_FILE_SELECTION (playlist_load)->cancel_button; gtk_object_set_data (GTK_OBJECT (playlist_load), "cancel_button1", cancel_button1); gtk_widget_show (cancel_button1); GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT); return playlist_load; } GtkWidget* create_playlist_save (void) { GtkWidget *playlist_save; GtkWidget *ok_button2; GtkWidget *cancel_button2; playlist_save = gtk_file_selection_new ("Save Playlist"); gtk_object_set_data (GTK_OBJECT (playlist_save), "playlist_save", playlist_save); gtk_container_set_border_width (GTK_CONTAINER (playlist_save), 10); ok_button2 = GTK_FILE_SELECTION (playlist_save)->ok_button; gtk_object_set_data (GTK_OBJECT (playlist_save), "ok_button2", ok_button2); gtk_widget_show (ok_button2); GTK_WIDGET_SET_FLAGS (ok_button2, GTK_CAN_DEFAULT); cancel_button2 = GTK_FILE_SELECTION (playlist_save)->cancel_button; gtk_object_set_data (GTK_OBJECT (playlist_save), "cancel_button2", cancel_button2); gtk_widget_show (cancel_button2); GTK_WIDGET_SET_FLAGS (cancel_button2, GTK_CAN_DEFAULT); return playlist_save; } GtkWidget* create_effects_window (void) { GtkWidget *effects_window; GtkWidget *vbox23; GtkWidget *hbox31; GtkWidget *plugin_list_box; GtkWidget *effects_list; GtkWidget *label16; GtkWidget *label17; GtkWidget *parameter_box; GtkWidget *button_box; GtkWidget *ok_button; effects_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (effects_window), "effects_window", effects_window); gtk_widget_set_usize (effects_window, 500, 300); gtk_window_set_title (GTK_WINDOW (effects_window), "Effects"); vbox23 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox23); gtk_object_set_data_full (GTK_OBJECT (effects_window), "vbox23", vbox23, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox23); gtk_container_add (GTK_CONTAINER (effects_window), vbox23); hbox31 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox31); gtk_object_set_data_full (GTK_OBJECT (effects_window), "hbox31", hbox31, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox31); gtk_box_pack_start (GTK_BOX (vbox23), hbox31, TRUE, TRUE, 0); plugin_list_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (plugin_list_box); gtk_object_set_data_full (GTK_OBJECT (effects_window), "plugin_list_box", plugin_list_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (plugin_list_box); gtk_box_pack_start (GTK_BOX (hbox31), plugin_list_box, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (plugin_list_box), 8); effects_list = gtk_ctree_new (2, 0); gtk_widget_ref (effects_list); gtk_object_set_data_full (GTK_OBJECT (effects_window), "effects_list", effects_list, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (effects_list); gtk_box_pack_start (GTK_BOX (plugin_list_box), effects_list, TRUE, TRUE, 0); gtk_clist_set_column_width (GTK_CLIST (effects_list), 0, 80); gtk_clist_set_column_width (GTK_CLIST (effects_list), 1, 80); gtk_clist_column_titles_hide (GTK_CLIST (effects_list)); label16 = gtk_label_new ("label16"); gtk_widget_ref (label16); gtk_object_set_data_full (GTK_OBJECT (effects_window), "label16", label16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label16); gtk_clist_set_column_widget (GTK_CLIST (effects_list), 0, label16); label17 = gtk_label_new ("label17"); gtk_widget_ref (label17); gtk_object_set_data_full (GTK_OBJECT (effects_window), "label17", label17, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label17); gtk_clist_set_column_widget (GTK_CLIST (effects_list), 1, label17); parameter_box = gtk_vbox_new (FALSE, 0); gtk_widget_ref (parameter_box); gtk_object_set_data_full (GTK_OBJECT (effects_window), "parameter_box", parameter_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (parameter_box); gtk_box_pack_start (GTK_BOX (hbox31), parameter_box, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (parameter_box), 8); button_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (button_box); gtk_object_set_data_full (GTK_OBJECT (effects_window), "button_box", button_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_box); gtk_box_pack_start (GTK_BOX (vbox23), button_box, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_box), 8); ok_button = gtk_button_new_with_label ("OK"); gtk_widget_ref (ok_button); gtk_object_set_data_full (GTK_OBJECT (effects_window), "ok_button", ok_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (ok_button); gtk_box_pack_end (GTK_BOX (button_box), ok_button, FALSE, TRUE, 0); gtk_widget_set_usize (ok_button, 80, -2); return effects_window; } GtkWidget* create_scopes_window (void) { GtkWidget *scopes_window; GtkWidget *vbox22; GtkWidget *hbox38; GtkWidget *label18; GtkWidget *scopes_list_box; GtkWidget *scrolledwindow2; GtkWidget *scopes_list; GtkWidget *label14; GtkWidget *label15; GtkWidget *hbox32; GtkWidget *ok_button; scopes_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (scopes_window), "scopes_window", scopes_window); gtk_window_set_title (GTK_WINDOW (scopes_window), "Scopes"); vbox22 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox22); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "vbox22", vbox22, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox22); gtk_container_add (GTK_CONTAINER (scopes_window), vbox22); hbox38 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox38); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "hbox38", hbox38, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox38); gtk_box_pack_start (GTK_BOX (vbox22), hbox38, FALSE, TRUE, 5); label18 = gtk_label_new ("Double click to activate"); gtk_widget_ref (label18); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "label18", label18, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label18); gtk_box_pack_start (GTK_BOX (hbox38), label18, FALSE, FALSE, 10); scopes_list_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (scopes_list_box); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "scopes_list_box", scopes_list_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scopes_list_box); gtk_box_pack_start (GTK_BOX (vbox22), scopes_list_box, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (scopes_list_box), 8); scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow2); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "scrolledwindow2", scrolledwindow2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow2); gtk_box_pack_start (GTK_BOX (scopes_list_box), scrolledwindow2, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); scopes_list = gtk_clist_new (2); gtk_widget_ref (scopes_list); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "scopes_list", scopes_list, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scopes_list); gtk_container_add (GTK_CONTAINER (scrolledwindow2), scopes_list); gtk_widget_set_usize (scopes_list, 150, 220); gtk_clist_set_column_width (GTK_CLIST (scopes_list), 0, 49); gtk_clist_set_column_width (GTK_CLIST (scopes_list), 1, 80); gtk_clist_column_titles_hide (GTK_CLIST (scopes_list)); label14 = gtk_label_new ("label14"); gtk_widget_ref (label14); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "label14", label14, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label14); gtk_clist_set_column_widget (GTK_CLIST (scopes_list), 0, label14); label15 = gtk_label_new ("label15"); gtk_widget_ref (label15); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "label15", label15, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label15); gtk_clist_set_column_widget (GTK_CLIST (scopes_list), 1, label15); hbox32 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox32); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "hbox32", hbox32, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox32); gtk_box_pack_start (GTK_BOX (vbox22), hbox32, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox32), 8); ok_button = gtk_button_new_with_label ("Close"); gtk_widget_ref (ok_button); gtk_object_set_data_full (GTK_OBJECT (scopes_window), "ok_button", ok_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (ok_button); gtk_box_pack_end (GTK_BOX (hbox32), ok_button, FALSE, TRUE, 0); gtk_widget_set_usize (ok_button, 80, -2); return scopes_window; } GtkWidget* create_fileselection1 (void) { GtkWidget *fileselection1; GtkWidget *ok_button3; GtkWidget *cancel_button3; fileselection1 = gtk_file_selection_new ("Select File"); gtk_object_set_data (GTK_OBJECT (fileselection1), "fileselection1", fileselection1); gtk_container_set_border_width (GTK_CONTAINER (fileselection1), 10); ok_button3 = GTK_FILE_SELECTION (fileselection1)->ok_button; gtk_object_set_data (GTK_OBJECT (fileselection1), "ok_button3", ok_button3); gtk_widget_show (ok_button3); GTK_WIDGET_SET_FLAGS (ok_button3, GTK_CAN_DEFAULT); cancel_button3 = GTK_FILE_SELECTION (fileselection1)->cancel_button; gtk_object_set_data (GTK_OBJECT (fileselection1), "cancel_button3", cancel_button3); gtk_widget_show (cancel_button3); GTK_WIDGET_SET_FLAGS (cancel_button3, GTK_CAN_DEFAULT); return fileselection1; } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/gladesrc.h000066400000000000000000000005271466261456500267460ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ GtkWidget* create_main_window (void); GtkWidget* create_playlist_window (void); GtkWidget* create_playlist_load (void); GtkWidget* create_playlist_save (void); GtkWidget* create_effects_window (void); GtkWidget* create_scopes_window (void); GtkWidget* create_fileselection1 (void); alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/stamp-h.in000066400000000000000000000000121466261456500266770ustar00rootroot00000000000000timestamp alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/support.c000066400000000000000000000107461466261456500266750ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include "support.h" /* This is an internally used function to check if a pixmap file exists. */ static gchar* check_file_exists (const gchar *directory, const gchar *filename); /* This is an internally used function to create pixmaps. */ static GtkWidget* create_dummy_pixmap (GtkWidget *widget); GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name) { GtkWidget *parent, *found_widget; for (;;) { if (GTK_IS_MENU (widget)) parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); else parent = widget->parent; if (parent == NULL) break; widget = parent; } found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), widget_name); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget; } /* This is a dummy pixmap we use when a pixmap can't be found. */ static char *dummy_pixmap_xpm[] = { /* columns rows colors chars-per-pixel */ "1 1 1 1", " c None", /* pixels */ " " }; /* This is an internally used function to create pixmaps. */ static GtkWidget* create_dummy_pixmap (GtkWidget *widget) { GdkColormap *colormap; GdkPixmap *gdkpixmap; GdkBitmap *mask; GtkWidget *pixmap; colormap = gtk_widget_get_colormap (widget); gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, NULL, dummy_pixmap_xpm); if (gdkpixmap == NULL) g_error ("Couldn't create replacement pixmap."); pixmap = gtk_pixmap_new (gdkpixmap, mask); gdk_pixmap_unref (gdkpixmap); gdk_bitmap_unref (mask); return pixmap; } static GList *pixmaps_directories = NULL; /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory) { pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup (directory)); } /* This is an internally used function to create pixmaps. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename) { gchar *found_filename = NULL; GdkColormap *colormap; GdkPixmap *gdkpixmap; GdkBitmap *mask; GtkWidget *pixmap; GList *elem; if (!filename || !filename[0]) return create_dummy_pixmap (widget); /* We first try any pixmaps directories set by the application. */ elem = pixmaps_directories; while (elem) { found_filename = check_file_exists ((gchar*)elem->data, filename); if (found_filename) break; elem = elem->next; } /* If we haven't found the pixmap, try the source directory. */ if (!found_filename) { found_filename = check_file_exists ("../../gui/pixmaps", filename); } if (!found_filename) { g_warning ("Couldn't find pixmap file: %s", filename); return create_dummy_pixmap (widget); } colormap = gtk_widget_get_colormap (widget); gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask, NULL, found_filename); if (gdkpixmap == NULL) { g_warning ("Error loading pixmap file: %s", found_filename); g_free (found_filename); return create_dummy_pixmap (widget); } g_free (found_filename); pixmap = gtk_pixmap_new (gdkpixmap, mask); gdk_pixmap_unref (gdkpixmap); gdk_bitmap_unref (mask); return pixmap; } /* This is an internally used function to check if a pixmap file exists. */ static gchar* check_file_exists (const gchar *directory, const gchar *filename) { gchar *full_filename; struct stat s; gint status; full_filename = (gchar*) g_malloc (strlen (directory) + 1 + strlen (filename) + 1); strcpy (full_filename, directory); strcat (full_filename, G_DIR_SEPARATOR_S); strcat (full_filename, filename); status = stat (full_filename, &s); if (status == 0 && S_ISREG (s.st_mode)) return full_filename; g_free (full_filename); return NULL; } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/gui/support.h000066400000000000000000000017651466261456500267030ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include /* * Public Functions. */ /* * This function returns a widget in a component created by Glade. * Call it with the toplevel widget in the component (i.e. a window/dialog), * or alternatively any widget in the component, and the name of the widget * you want returned. */ GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name); /* get_widget() is deprecated. Use lookup_widget instead. */ #define get_widget lookup_widget /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory); /* * Private Functions. */ /* This is used to create the pixmaps in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename); alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/000077500000000000000000000000001466261456500257025ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/Makefile.am000066400000000000000000000003401466261456500277330ustar00rootroot00000000000000EXTRA_DIST = next.xpm play.xpm prev.xpm effects.xpm \ stop.xpm f_play.xpm r_play.xpm pause.xpm \ playlist.xpm cd.xpm cd.xpm note.xpm eject.xpm volume_icon.xpm \ balance_icon.xpm menu.xpm current_play.xpm current_stop.xpm alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/balance_icon.xpm000066400000000000000000000005641466261456500310320ustar00rootroot00000000000000/* XPM */ static char * balance_icon_xpm[] = { "26 9 3 1", " c None", ". c #848284", "+ c #EFEBEF", " . . ", " . ......... . ", " . . .+++++++. . . ", " . . .+++++. . . ", " . . . .+++. . . . ", " . . ....... . . ", " . . .+++++. . . ", " . ....... . ", " . . "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/cd.xpm000066400000000000000000000062601466261456500270220ustar00rootroot00000000000000/* XPM */ static char * cd_xpm[] = { "19 19 150 2", " c None", ". c #000606", "+ c #334C4C", "@ c #4D6767", "# c #152C2C", "$ c #1E4444", "% c #A9E8E8", "& c #BFFEFE", "* c #BFFFFF", "= c #C0FEFE", "- c #97D5D5", "; c #133333", "> c #214C4C", ", c #ADECEC", "' c #BCFDFD", ") c #7BE8E8", "! c #93D6D6", "~ c #0A2727", "{ c #001414", "] c #002F22", "^ c #1E4945", "/ c #9DE2E2", "( c #95F1F1", "_ c #65E1E1", ": c #69E2E2", "< c #53DBDB", "[ c #45BEBE", "} c #002E2E", "| c #001612", "1 c #013D15", "2 c #1F4F25", "3 c #163A19", "4 c #1C4843", "5 c #60CFCF", "6 c #59DDDD", "7 c #6DE3E3", "8 c #34D1D1", "9 c #45D6D6", "0 c #00A3A3", "a c #001615", "b c #023E16", "c c #426240", "d c #7F7F7F", "e c #737973", "f c #1F3E21", "g c #204B49", "h c #51CDCD", "i c #28CDCD", "j c #1ECACA", "k c #00BFBF", "l c #00A7A7", "m c #002323", "n c #002626", "o c #005337", "p c #537153", "q c #D3BDBD", "r c #9F8F8F", "s c #505350", "t c #002000", "u c #00403D", "v c #00AFAF", "w c #009B9B", "x c #002929", "y c #005050", "z c #003F24", "A c #9DA79D", "B c #C0BFBF", "C c #D1BCBC", "D c #767272", "E c #052B2B", "F c #00201C", "G c #153417", "H c #003F3A", "I c #00B5B5", "J c #004D4D", "K c #002828", "L c #006B6B", "M c #006565", "N c #113A20", "O c #A2ABA2", "P c #BFBFBF", "Q c #C2BFBF", "R c #C6B2AF", "S c #354242", "T c #313B3B", "U c #6F756F", "V c #313933", "W c #023F3F", "X c #00B2B2", "Y c #00B3B3", "Z c #005555", "` c #003131", " . c #001818", ".. c #004242", "+. c #009393", "@. c #0A6052", "#. c #6C846C", "$. c #C1BFBF", "%. c #DFCEBF", "&. c #C3D6BF", "*. c #BFBDBD", "=. c #9F9090", "-. c #7B7B7B", ";. c #293A29", ">. c #00403E", ",. c #004B4B", "'. c #001515", "). c #003C3C", "!. c #22A2A0", "~. c #518262", "{. c #C1B4AB", "]. c #BFC0BF", "^. c #D2BCBC", "/. c #A09191", "(. c #808080", "_. c #647264", ":. c #04250D", "<. c #002F2F", "[. c #001616", "}. c #617575", "|. c #D4D8D4", "1. c #798079", "2. c #939B93", "3. c #B8B9B8", "4. c #B8B0AE", "5. c #747B74", "6. c #1E2C22", "7. c #00302F", "8. c #868686", "9. c #8DBDBB", "0. c #0B6042", "a. c #475F5B", "b. c #617961", "c. c #667766", "d. c #2E562E", "e. c #002804", "f. c #053F3F", "g. c #019191", "h. c #016565", "i. c #003F3C", "j. c #013F3D", "k. c #002623", "l. c #004343", "m. c #008D8D", "n. c #006767", "o. c #004545", "p. c #009090", "q. c #006060", "r. c #000404", "s. c #000303", " ", " . + @ @ @ @ @ # ", " $ % & * = = - ; ", " > , & & ' ) ! ~ ", " { ] ^ / ( _ : < [ } ", " | 1 2 3 4 5 6 7 8 9 0 } ", " a b c d e f g h i j k k l m ", " n o p q r d s t u v k k k k w { ", " x y z A B C D E F G H v k k I J K ", " L M N O P Q R S T U V W X Y Z ` . ", " ..+.@.#.$.%.&.*.=.d -.;.>.,.` '. ", " ).!.~.{.&.].B ^./.(._.:.<.[. ", " }.|.1.2.3.P P 4.5.6.7. . ", " 8.9.0.a.b.c.d.e.` '. ", " f.g.h.i.j.k.7.'. ", " l.m.n.` <. . ", " o.p.q.[. ", " r.s. ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/current_play.xpm000066400000000000000000000021551466261456500311420ustar00rootroot00000000000000/* XPM */ static char * current_play_xpm[] = { "13 12 58 1", " c None", ". c #33475B", "+ c #838385", "@ c #125398", "# c #024388", "$ c #B3B3B5", "% c #7E7F80", "& c #334E69", "* c #80C1FF", "= c #07488D", "- c #717B78", "; c #8F9091", "> c #BFC0C1", ", c #0D51A0", "' c #0B509E", ") c #274DA1", "! c #8DB3FF", "~ c #79B1FE", "{ c #0A418E", "] c #AFAFB8", "^ c #969798", "/ c #777879", "( c #1257A5", "_ c #74B9FF", ": c #8EB3FF", "< c #789EF2", "[ c #649BE8", "} c #0E4592", "| c #3C3E3F", "1 c #2B2C2C", "2 c #144F9C", "3 c #4983D1", "4 c #4C80D6", "5 c #4E82D8", "6 c #3C8AD3", "7 c #025099", "8 c #3F3E3E", "9 c #2C2C2C", "0 c #084390", "a c #13479D", "b c #3064BA", "c c #2473BC", "d c #004E97", "e c #ADB0B2", "f c #989797", "g c #797878", "h c #2C435D", "i c #2261A1", "j c #064585", "k c #718381", "l c #919090", "m c #C1C0C0", "n c #0E4D8D", "o c #044383", "p c #B5B3B3", "q c #807F7F", "r c #3B4459", "s c #838282", " ", " . + ", " @# $% ", " &*= - ;> ", " ,')!~{ ]^ / ", " (_:<[} | 1 ", " 234567 8 9 ", " 00abcd ef g ", " hij k lm ", " no pq ", " r s ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/current_stop.xpm000066400000000000000000000014431466261456500311610ustar00rootroot00000000000000/* XPM */ static char * current_stop_xpm[] = { "13 12 36 1", " c None", ". c #33475B", "+ c #125398", "@ c #024388", "# c #334E69", "$ c #80C1FF", "% c #07488D", "& c #0D51A0", "* c #0B509E", "= c #274DA1", "- c #8DB3FF", "; c #79B1FE", "> c #0A418E", ", c #1257A5", "' c #74B9FF", ") c #8EB3FF", "! c #789EF2", "~ c #649BE8", "{ c #0E4592", "] c #144F9C", "^ c #4983D1", "/ c #4C80D6", "( c #4E82D8", "_ c #3C8AD3", ": c #025099", "< c #084390", "[ c #13479D", "} c #3064BA", "| c #2473BC", "1 c #004E97", "2 c #2C435D", "3 c #2261A1", "4 c #064585", "5 c #0E4D8D", "6 c #044383", "7 c #3B4459", " ", " . ", " +@ ", " #$% ", " &*=-;> ", " ,')!~{ ", " ]^/(_: ", " <<[}|1 ", " 234 ", " 56 ", " 7 ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/effects.xpm000066400000000000000000000004641466261456500300530ustar00rootroot00000000000000/* XPM */ static char * effects_xpm[] = { "17 10 3 1", " c None", ". c #000000", "+ c #939393", "...... .. .. ", ".+++++. .++. .++.", ".+++++. .++. .++.", ".++... .++.++. ", ".+++++. .+++. ", ".+++++. .+++. ", ".++... .++.++. ", ".++. .++. .++.", ".++. .++. .++.", " .. .. .. "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/eject.xpm000066400000000000000000000007331466261456500275250ustar00rootroot00000000000000/* XPM */ static char * eject_xpm[] = { "15 16 8 1", " c None", ". c #000000", "+ c #939393", "@ c #AAAAAA", "# c #777777", "$ c #FFFFFF", "% c #BCBCBC", "& c #666666", " . ", " .+. ", " .+@#. ", " .++@##. ", " .+++@###. ", " .++@$@+###. ", " .+@$%@@@@+##. ", ".@$%@@@@@@@@+#.", ".@$%@@@@@@@@+#.", "...............", " ", "...............", ".$@@@@@@@@@@@+.", ".$@@@@@@@@@@@+.", ".+&&&&&&&&&&&..", "..............."}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/f_play.xpm000066400000000000000000000004711466261456500277040ustar00rootroot00000000000000/* XPM */ static char * f_play_xpm[] = { "14 12 3 1", " c None", ". c #000000", "+ c #939393", " ", " ", " .. ", " .+.. ", " .+++.. ", " .+++++.. ", " .+++++.. ", " .+++.. ", " .+.. ", " .. ", " ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/menu.xpm000066400000000000000000000010301466261456500273660ustar00rootroot00000000000000/* XPM */ static char * menu_xpm[] = { "18 18 6 1", " c None", ". c #000000", "+ c #BCBCBC", "@ c #5B5B5B", "# c #AAAAAA", "$ c #727272", " ", " .............. ", " .+++++++++++@. ", " .+##########$. ", " .+#........#$. ", " .+##########$. ", " .+#........#$. ", " .+##########$. ", " .+#........#$. ", " .+##########$. ", " .+#........#$. ", " .+##########$. ", " .+#........#$. ", " .+##########$. ", " .+##########$. ", " .@$$$$$$$$$$$. ", " .............. ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/next.xpm000066400000000000000000000006701466261456500274110ustar00rootroot00000000000000/* XPM */ static char * next_xpm[] = { "15 15 7 1", " c None", ". c #000000", "+ c #AAAAAA", "@ c #FFFFFF", "# c #939393", "$ c #5B5B5B", "% c #BCBCBC", " ... .... ", " .++. .@#. ", " .@@#. .+$. ", " .%%+#. .+$. ", " .++@##. .+$. ", " .++%+##. .+$. ", " .+++@###..+$. ", " .+++++++#.+$. ", " .+++#$$$..+$. ", " .+++$$$. .+$. ", " .++#$$. .+$. ", " .++$$. .+$. ", " .##$. .+$. ", " .$$. .#.. ", " ... .... "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/note.xpm000066400000000000000000000007171466261456500274020ustar00rootroot00000000000000/* XPM */ static char * note_xpm[] = { "15 17 6 1", " c None", ". c #000000", "+ c #FFFFFF", "@ c #FFFF00", "# c #FFA858", "$ c #C05800", " .", " ..", " ..+.", " ..++..", " ...++....", " .++.... .", " ..... .", " ... .", " . .", " . .", " . .....", " ..... ..@@##.", "..@@##. .###$$.", ".###$$. .##$$$.", ".###$$. ..#$$$.", "..#$$$. .... ", " .... "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/pause.xpm000066400000000000000000000004701466261456500275460ustar00rootroot00000000000000/* XPM */ static char * pause_xpm[] = { "14 12 3 1", " c None", ". c #000000", "+ c #939393", " ", " ", " .... .... ", " .++. .++. ", " .++. .++. ", " .++. .++. ", " .++. .++. ", " .++. .++. ", " .++. .++. ", " .... .... ", " ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/play.xpm000066400000000000000000000011251466261456500273740ustar00rootroot00000000000000/* XPM */ static char * play_xpm[] = { "18 18 10 1", " c None", ". c #A0A0A0", "+ c #000000", "@ c #AAAAAA", "# c #FFFFFF", "$ c #939393", "% c #AFAFAF", "& c #BCBCBC", "* c #727272", "= c #5B5B5B", " ", " . ", " ++. ", " +@++ ", " +#$@++ ", " +%$$$@++ ", " +@#$$$$@++ ", " +@%$$$$$$@++ ", " +@@#$$$$$$$@++ ", " +@@@&&&&&&&&&@++ ", " +@@@*******=++ ", " +@@******=++ ", " +@@****=++ ", " +@***=++ ", " +@*=++ ", " +=++ ", " ++ ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/playlist.xpm000066400000000000000000000011671466261456500302760ustar00rootroot00000000000000/* XPM */ static char * playlist_xpm[] = { "18 18 12 1", " c None", ". c #000000", "+ c #CBCBFF", "@ c #980098", "# c #CB98FF", "$ c #FF9898", "% c #FF3300", "& c #FF9800", "* c #FFCB66", "= c #E68600", "- c #FFCB00", "; c #A0A0A0", " ", " . ", " .+@. ", " .+#+#@. ", " .+++#+##@. ", " .+++#+#####@. ", " .+++++#+#####. ", " .@++++#+#####. ", " ...@+++#+###. ", " ..$%.@#+###.&. ", " .*.$$%.@+#.&%.. ", " =*.$$&%..%.. ", " .**.$$&%.=--. ", " =**.&.=---=.. ", " .**-.--=.. ", " =**=..; ", " ... ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/prev.xpm000066400000000000000000000007071466261456500274100ustar00rootroot00000000000000/* XPM */ static char * prev_xpm[] = { "15 15 8 1", " c None", ". c #000000", "+ c #939393", "@ c #FFFFFF", "# c #AFAFAF", "$ c #5B5B5B", "% c #AAAAAA", "& c #BCBCBC", " .... ... ", " .+@. .##. ", " .$%. .+@@. ", " .$%. .+#&&. ", " .$%. .++@%%. ", " .$%. .++#&%%. ", " .$%..+++@%%%. ", " .$%.+%%%%%%%. ", " .$%..$$$+%%%. ", " .$%. .$$$%%%. ", " .$%. .$$+%%. ", " .$%. .$$%%. ", " .$%. .$++. ", " ..+. .$$. ", " .... ... "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/r_play.xpm000066400000000000000000000004711466261456500277200ustar00rootroot00000000000000/* XPM */ static char * r_play_xpm[] = { "14 12 3 1", " c None", ". c #000000", "+ c #939393", " ", " ", " .. ", " ..+. ", " ..+++. ", " ..+++++. ", " ..+++++. ", " ..+++. ", " ..+. ", " .. ", " ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/stop.xpm000066400000000000000000000006511466261456500274170ustar00rootroot00000000000000/* XPM */ static char * stop_xpm[] = { "15 15 6 1", " c None", ". c #000000", "+ c #FFFFFF", "@ c #BCBCBC", "# c #727272", "$ c #AAAAAA", " ", " ............. ", " .+@@@@@@@@@#. ", " .@+@@@@@@@##. ", " .@@$$$$$$$##. ", " .@@$$$$$$$##. ", " .@@$$$$$$$##. ", " .@@$$$$$$$##. ", " .@@$$$$$$$##. ", " .@@$$$$$$$##. ", " .@@$$$$$$$##. ", " .@########.#. ", " .##########.. ", " ............. ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/pixmaps/volume_icon.xpm000066400000000000000000000005021466261456500307440ustar00rootroot00000000000000/* XPM */ static char * volume_icon_xpm[] = { "16 11 3 1", " c None", ". c #848284", "+ c #EFEBEF", " ", " .. . ", " ... .+. . ", " .+..++. . . ", " .+.+++. . . ", " .+.+++. . . . ", " .+.+++. . . ", " .+..++. . . ", " ... .+. . ", " .. . ", " "}; alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/support.cpp000066400000000000000000000107461466261456500264510ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include "support.h" /* This is an internally used function to check if a pixmap file exists. */ static gchar* check_file_exists (const gchar *directory, const gchar *filename); /* This is an internally used function to create pixmaps. */ static GtkWidget* create_dummy_pixmap (GtkWidget *widget); GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name) { GtkWidget *parent, *found_widget; for (;;) { if (GTK_IS_MENU (widget)) parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); else parent = widget->parent; if (parent == NULL) break; widget = parent; } found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), widget_name); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget; } /* This is a dummy pixmap we use when a pixmap can't be found. */ static char *dummy_pixmap_xpm[] = { /* columns rows colors chars-per-pixel */ "1 1 1 1", " c None", /* pixels */ " " }; /* This is an internally used function to create pixmaps. */ static GtkWidget* create_dummy_pixmap (GtkWidget *widget) { GdkColormap *colormap; GdkPixmap *gdkpixmap; GdkBitmap *mask; GtkWidget *pixmap; colormap = gtk_widget_get_colormap (widget); gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, NULL, dummy_pixmap_xpm); if (gdkpixmap == NULL) g_error ("Couldn't create replacement pixmap."); pixmap = gtk_pixmap_new (gdkpixmap, mask); gdk_pixmap_unref (gdkpixmap); gdk_bitmap_unref (mask); return pixmap; } static GList *pixmaps_directories = NULL; /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory) { pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup (directory)); } /* This is an internally used function to create pixmaps. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename) { gchar *found_filename = NULL; GdkColormap *colormap; GdkPixmap *gdkpixmap; GdkBitmap *mask; GtkWidget *pixmap; GList *elem; if (!filename || !filename[0]) return create_dummy_pixmap (widget); /* We first try any pixmaps directories set by the application. */ elem = pixmaps_directories; while (elem) { found_filename = check_file_exists ((gchar*)elem->data, filename); if (found_filename) break; elem = elem->next; } /* If we haven't found the pixmap, try the source directory. */ if (!found_filename) { found_filename = check_file_exists ("../../gui/pixmaps", filename); } if (!found_filename) { g_warning ("Couldn't find pixmap file: %s", filename); return create_dummy_pixmap (widget); } colormap = gtk_widget_get_colormap (widget); gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask, NULL, found_filename); if (gdkpixmap == NULL) { g_warning ("Error loading pixmap file: %s", found_filename); g_free (found_filename); return create_dummy_pixmap (widget); } g_free (found_filename); pixmap = gtk_pixmap_new (gdkpixmap, mask); gdk_pixmap_unref (gdkpixmap); gdk_bitmap_unref (mask); return pixmap; } /* This is an internally used function to check if a pixmap file exists. */ static gchar* check_file_exists (const gchar *directory, const gchar *filename) { gchar *full_filename; struct stat s; gint status; full_filename = (gchar*) g_malloc (strlen (directory) + 1 + strlen (filename) + 1); strcpy (full_filename, directory); strcat (full_filename, G_DIR_SEPARATOR_S); strcat (full_filename, filename); status = stat (full_filename, &s); if (status == 0 && S_ISREG (s.st_mode)) return full_filename; g_free (full_filename); return NULL; } alsaplayer-0.99.82/attic/experimental/obsolete/interface/gtk/support.h000066400000000000000000000017651466261456500261170ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include /* * Public Functions. */ /* * This function returns a widget in a component created by Glade. * Call it with the toplevel widget in the component (i.e. a window/dialog), * or alternatively any widget in the component, and the name of the widget * you want returned. */ GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name); /* get_widget() is deprecated. Use lookup_widget instead. */ #define get_widget lookup_widget /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory); /* * Private Functions. */ /* This is used to create the pixmaps in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename); alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/000077500000000000000000000000001466261456500240605ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/MainWindow.cpp000066400000000000000000000143661466261456500266520ustar00rootroot00000000000000/* * qt_interface.cpp (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include "CorePlayer.h" #include "Playlist.h" #include #include #include #include #include #include #include #include "MainWindow.h" #include "ScopesDialog.h" #include "PlayListDialog.h" #include "license.cpp" MainWindow::MainWindow(CorePlayer * player, Playlist * playList) : MainWindowBase (0, "QtAlsaPlayer"), player_ (player), playList_ (playList), popup_ (0L), playListDialog_ (0L), updateTitleTimer_ (0L), updatePositionSlider_ (true), updateTitle_ (true) { popup_ = new QPopupMenu(this); popup_->insertItem(tr("Scopes..."), this, SLOT(slotScopes())); popup_->insertItem(tr("Effects..."), this, SLOT(slotFX())); popup_->insertItem(tr("About..."), this, SLOT(slotAbout())); popup_->insertSeparator(); popup_->insertItem(tr("CD Player (CDDA)"), this, SLOT(slotCDDA())); popup_->insertSeparator(); popup_->insertItem(tr("Exit"), qApp, SLOT(quit())); menuButton->setPopup(popup_); resize(sizeHint().width(), minimumSizeHint().height()); // poll me bitch. startTimer(200); updateTitleTimer_ = new QTimer(this); connect(updateTitleTimer_, SIGNAL(timeout()), SLOT(slotUpdateTitle())); playListDialog_ = new PlayListDialog(this, playList_); playListDialog_->hide(); } MainWindow::~MainWindow() { } void MainWindow::timerEvent(QTimerEvent *) { ulong sampleRate = player_->GetSampleRate(); bool active = player_->IsActive(); if (active) { ulong currentTime = player_->GetCurrentTime(); ulong currentMin = currentTime / 6000; ulong currentSec = (currentTime % 6000) / 100; ulong totalTime = player_->GetCurrentTime(player_->GetFrames()); ulong totalMin = totalTime / 6000; ulong totalSec = (totalTime % 6000) / 100; timeLabel->setText ( QString().sprintf ( "%02d:%02d/%02d:%02d", currentMin, currentSec, totalMin, totalSec ) ); stream_info info; memset(&info, 0, sizeof(stream_info)); player_->GetStreamInfo(&info); if (updateTitle_) titleLabel->setText(QString::fromUtf8(info.title)); infoLabel ->setText(QString::fromUtf8(info.stream_type)); } else { titleLabel ->setText(tr("No stream")); timeLabel ->setText(tr("No time data")); infoLabel ->setText(""); } speedSlider ->setValue(int(player_->GetSpeed() * 100)); speedLabel ->setText(QString("%1%").arg(int(player_->GetSpeed() * 100))); if (updatePositionSlider_) { positionSlider->setRange(0, player_->GetFrames()); // Let's try to hack around Qt 3's brokenness. int pixelWidth = positionSlider->width(); int maxValue = positionSlider->maxValue(); int stepSize = maxValue / pixelWidth; int oldPosition(positionSlider->value()); int newPosition(player_->GetPosition()); int diff = newPosition - oldPosition; if (diff > stepSize) positionSlider->setValue(player_->GetPosition()); } volumeSlider ->setValue(player_->GetVolume()); balanceSlider ->setValue(player_->GetPan()); volumeLabel->setText(QString("%1%").arg(player_->GetVolume())); } void MainWindow::closeEvent(QCloseEvent *) { qApp->quit(); } void MainWindow::slotSpeedSliderMoved(int value) { player_->SetSpeed(float(value) / 100.0f); } void MainWindow::slotPositionSliderPressed() { updatePositionSlider_ = false; } void MainWindow::slotPositionSliderReleased() { player_->Seek(positionSlider->value()); updatePositionSlider_ = true; } void MainWindow::slotVolumeSliderMoved(int value) { player_->SetVolume(value); } void MainWindow::slotBalanceSliderMoved(int value) { static const int balanceCentre = 0; static const int lowBalanceThreshold = balanceCentre - 10; static const int highBalanceThreshold = balanceCentre + 10; if (value > lowBalanceThreshold && value < highBalanceThreshold) { value = balanceCentre; balanceSlider ->setValue(value); } player_->SetPan(value); QString labelText; if (value < lowBalanceThreshold) labelText = tr("Pan: left %1%").arg(-value); else if (value > highBalanceThreshold) labelText = tr("Pan: right %1%").arg(value); else labelText = tr("Pan: center"); setTemporaryTitle(labelText); } void MainWindow::slotPrevious() { playList_->Prev(); } void MainWindow::slotPlay() { // player_->Start(); // Apparently we should use the playlist... playList_->UnPause(); } void MainWindow::slotNext() { playList_->Next(); } void MainWindow::slotStop() { player_->Stop(); } void MainWindow::slotPlayList() { playListDialog_->show(); } void MainWindow::slotPause() { player_->SetSpeed(0.0f); } void MainWindow::slotBack() { player_->SetSpeed(-1.0f); } void MainWindow::slotForward() { player_->SetSpeed(1.0f); } void MainWindow::slotScopes() { ScopesDialog scopesDialog(this); scopesDialog.exec(); } void MainWindow::slotFX() { } void MainWindow::slotAbout() { QMessageBox::about ( this, tr("About AlsaPlayer"), tr(licenseText) ); } void MainWindow::slotCDDA() { player_->Stop(); player_->SetFile("CD.cdda"); player_->Start(); } void MainWindow::setTemporaryTitle(const QString & s) { updateTitle_ = false; titleLabel->setText(s); updateTitleTimer_->start(4000, true); } void MainWindow::slotUpdateTitle() { updateTitle_ = true; } #include "MainWindow.moc" // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/MainWindow.h000066400000000000000000000040171466261456500263070ustar00rootroot00000000000000/* * qt_interface.h (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef QT_MAIN_WINDOW_H #define QT_MAIN_WINDOW_H #include "MainWindowBase.h" class CorePlayer; class Playlist; class QPopupMenu; class QTimer; class PlayListDialog; class MainWindow : public MainWindowBase { Q_OBJECT public: MainWindow(CorePlayer *, Playlist *); ~MainWindow(); protected slots: void slotPrevious(); void slotPlay(); void slotNext(); void slotStop(); void slotPlayList(); void slotPause(); void slotBack(); void slotForward(); void slotSpeedSliderMoved(int); void slotPositionSliderPressed(); void slotPositionSliderReleased(); void slotBalanceSliderMoved(int); void slotVolumeSliderMoved(int); void slotScopes(); void slotFX(); void slotAbout(); void slotCDDA(); void slotUpdateTitle(); protected: void timerEvent(QTimerEvent *); void closeEvent(QCloseEvent *); void setTemporaryTitle(const QString &); private: CorePlayer * player_; Playlist * playList_; QPopupMenu * popup_; PlayListDialog * playListDialog_; QTimer * updateTitleTimer_; bool updatePositionSlider_; bool updateTitle_; }; #endif // QT_MAIN_WINDOW_H // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/MainWindowBase.ui000066400000000000000000004034401466261456500272730ustar00rootroot00000000000000 MainWindowBase Rik Hemsley MainWindowBase 0 0 368 122 AlsaPlayer true unnamed 4 4 Frame3 0 0 0 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 10 95 137 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 10 95 137 255 255 255 0 0 0 0 0 0 0 0 0 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 10 95 137 255 255 255 0 0 0 0 0 0 NoFrame Plain unnamed 2 4 speedLabelLeft 1 0 0 0 255 255 255 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 255 255 255 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 0 Speed: AlignVCenter|AlignRight timeLabel 1 5 0 0 255 255 255 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 255 255 255 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 0 No time data speedLabel 1 5 0 0 255 255 255 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 255 255 255 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 0 100% titleLabel 7 5 0 0 255 255 255 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 255 255 255 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 255 255 255 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 255 255 255 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 255 255 255 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 0 No stream volumeLabel 1 1 0 0 255 255 255 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 255 255 255 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 0 100% volumeLabelLeft 1 0 0 0 255 255 255 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 255 255 255 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 0 Volume: AlignVCenter|AlignRight infoLabel 7 5 0 0 255 255 255 228 228 228 255 255 255 241 241 241 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 128 128 128 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 128 128 128 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 255 255 255 228 228 228 255 255 255 255 255 255 114 114 114 152 152 152 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 0 0 8 93 139 255 255 255 0 0 0 0 0 0 0 ... positionSlider NoFocus 100 Horizontal Layout10 unnamed 0 4 Layout9 unnamed 0 0 Spacer1 Vertical Expanding 20 20 Layout8 unnamed 0 2 menuButton TabFocus image0 0 true Menu previousButton TabFocus image1 true Skip to previous track playButton TabFocus image2 true Play nextButton TabFocus image3 true Skip to next track stopButton TabFocus image4 true Stop playlistButton TabFocus image5 true Show playlist Spacer2 Vertical Expanding 20 20 Layout5 unnamed 0 2 Layout3 unnamed 0 2 pauseButton TabFocus image6 true Pause backButton TabFocus image7 true Backwards, normal speed forwardButton TabFocus image8 true Forwards, normal speed speedSlider -100 200 66 Horizontal Playback speed and direction Layout4 unnamed 0 2 PixmapLabel2 image9 false Balance balanceSlider -100 100 50 Horizontal Balance PixmapLabel1 image10 false Volume volumeSlider 100 Horizontal Volume 789c8dd4c972db461006e0bb9e82a5bea952bf89958372e5a0c5a23652a256caa91c060b454924b5905a5379770fba7b60a62c25117cf93c3f67d0e806beacb58647bdd6da9795f9c22eae8b5631b68fadb5f2693a7dfbe3cfdfff5a590db256fd2fe8b4c2d5df5656078b56d1eadfcdaa1a74e9406dfeab0d52c7ea99388803364dd52630bc7e210efdef536f5d3ff20ee5f7dfd4715bd607deba7ea636ba5fdb3bccd877ea42f27869ccebd413476df5c43b0a38ffaa2ea41e84deba9ff18ee4bca1386e8b69e61df37ea4f5c7b15aef2736b165435d88712c4efcfd04de0937876ed5895acf4f83546cd5895afb9566a99c772e36a5c9d9fabcb2208bf9bcefea2c2bd8da0f1b58593f54276a9d0f5b59ced38d380f7359cfd4a9baafaef2922df3629afeca3c9834d0e775ef2df5a2a81d34fdc4b5b8e95f47adf38877b5ce23e5de7ade01db34f3b22b6efa5d8a7dff70af36ea37b5cff7c4852da4bebdda61d36fdca8b5dff42af6cf979ed959a4f34ca762d76ea9f7405c54b23f71fd511019a99fae1acbef47623f8fb06a3f6f9be2322c13cef3fb16074999c8fab6d8f703cfe2a67f5be23295df839f6f6cfdfc81e72d09fdfce244dcd17ed29bd8e8fc625fecebc393b8b4257f8fb0c17612139f9fbafd74de4fd47efeb7bd3b11fb589de979ebe2e6bcb9b80aab94f363b675fb49bf1ec4468d85d8e791d4ee449d40cec38e3ad3f3b99e4eeeccef1fbaea524c92cf4da0eb1371652ba997fb65ea7196fdfaea44cdefa7c97d7f88e7398bddfb2cefdf58dcf4eb513c0a4772fffc7dcd8ae6fbb01037df87486c13fd3e3c889be7c5fdb1b1cf5321b656bf1715bbf0f5e0565d697ddcffbccc43fd9eeca9add653aa7d7debe222d4791c8947ee8fd7f9bc2269f67b57a762c46abfdf5c5ca6badf95d8ef077e1fcb9ff9aed8cda7bc3ffc3ccbaad0f5c1e2ff5ccb49102cf2e62a3e4fba6c890a23775db96b8cebcf932e7b835bce8e3071d9e9a77bce70877b3ce011732cf08467bc7c789f33bce20def2ebb8e0d97dcc416bef9eccf24e7b6d1c50e76b1877d1ca087bebb0e71b49cc400c738c129ce5cf61c1718e29273f5f51d339f441b014244885d36714ad181d16c4640db2789c8524e059588a9a2115dd198ae61e8c65db734a169939cd11dddd383cb3dd29c4a5aa04b4ff48c21bdd0a43e7be93e0dbdd21bbdbbdc7a7d0fb4419bb445ae72c92dd74edbd4a51ddaa53db76749fbd8a103ead1f4a3e7497d3aa4231ad0319dd0299df9733fec9171f76b5dd50603ea2de77eedbbabeddc3d87095e68bafcffbf265df6c2ed3bfce77e1f27eb39a5cb7f9fe4ff98f9bfbfaefc00c86f7cfc 789c5dd0cf0a824010c7f1bb4fb1b837894a5048a247283a06d1e1b733b3d4a182fe1c227af766560b7510dcefc7c5456785db6dd7ae9865f7071e277274c4cd15fc3c9f5ffbc3ea9de565edf45ab8329f64f9d491db5c2f626baf6b3f4f63c99635eaa686252c9baa299bca522c4100c892ba9436a365e020812d83654c930ef53ad334b66809a1254ff4239644fa280c494f8a71401e08227d52a1382015dbd427483bfd5dcc0c19bd4b6d44661891d998f40efcc8a3fb46e63f0dfec467997d0195cb6726 789c6dd04d0b823018c0f1fb3ec570378974a898441fa1e8184487672fba0e16941d22faeef5cc692ef7e061ff1f43b625313decb7344ec8bd83ee2ca93470a3b17ab4edf378dabc48c45714bf94f26841a225957477bd685cc377cd523b9806b380a22a00b3c12cb3929719a6c2acf28a573926c3841c38d814362500484ced52f759630a25b4509812b3b6638f341bab2ca8002ca40220a052f9deab56ca73f707a93c778a9b27eeb4df3cfaa0a21e067dd4a61fe3ed9d9aafe6ff0c9efdd404ee6682efe09bd3f9abbfd7e403068c8c08 789c5dd04d0ac2301005e07d4e119a5d91d6428304f1088a4b415c4c6622baa882d6858877372fa5d274c862dec790bfbad487fd5697b57af6d45f59f3851eba9457d7bd8fa7cd47158dd571ad74532c545169d6bbfb2da037b137cb54888268c93a4b888ce85ad7b81691108989881103a2171fbc207ac473aa748a31a64a65d00d443498f13c92470b221929044a362122cfb08ce258b48c30c6262714e7c422329b82e47b3124a724536296f9ed879948fc7f76fe13dfb5fa01cc9062ba 789cc590bd0ac2301080f73cc5916c41aca16806f1112a8e8238dc5d2a3a54c1d641c477b7179bf8f7007e64b8ef1b02778585f5aa025ba8b6c3eec0c07b3c830d97a6b96eb68b9bd26e0afd9b81d323a5c7c0b03c1d6b994d3f9b494494457de99d2f4583283222b2288952a09a82288aee22f1db4f6232ef0c0929c129516afc4a149efc35f180c9893379a1df1dbf2e719fab0784606704 789c75d0414bc33014c0f17b3f45e8bb15d9da39c782ec23383c0ae2e1f525693298829b8731f6ddcdcb6b9ae9b4f490ffaf2149336fd4cbf3936ae6d5e188c7408a3c7eaac67cedf7a7d7b7cdb9aabbb5e277a1bafaaeaa678ad4f6e3ddf218e218daf470f69c9ada5613e78e1397d8e1929338c968ed1c274a124a7a4ebb5a3fc85296d3b9fb716527a9b5a4c9291b054942f93ae45c2dd2816f9e6b85bf14b0871b0524a4d127054466f1ac1929f9a88c136785fe076685e489cbba00c6422fe8cadc010c3b46b430ede69919d8a693c130b20f01ca797d64c7167c5981270710bafee33839d2eed7ed00948b9cfd73eb97c7ea1b79808d44 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232345130345230563054d2e152d2534856f0cbcf4b05b195816c650330007113415c4b134b434b13b04a14804b4419086024542431511946d25c04c376026eaeb5e6020001a43bf5 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232345130345230563054d2e152d2534856f0cbcf4b05b195816c650330007113415c4b134b434b13b04a14805f44591955445939114504c84f441601f3098860eac2663236dbf1b8b9d69a0b00d2b93b89 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232345130345230563054d2e152d2534856f0cbcf4b05b195816c650330007113415c4b134b434b13b04a1480534459194324112e0617498489218940c5f08aa0ebc23019c376fc6eaeb5e60200d5d93b89 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade652323253b05430563054d2e152d2534856f0cbcf4b05b195816c650b630b430b63103711c44d4d4d4d4c05cbeae9e929eb6100901044162aa90c033069b82c4844391102946122605965986e659824541a21ab0c93069b822e8b6431aa5eb834c264655457a1eb4592c5e9df5a6b2e00611245be 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232345330345430563054d2e152d2534856f0cbcf4b05b195816c650b630b430b63103711c44d4d4d4d4c05cbeaa1018498b2329884892903f9ca89ca7a50418858a2b27222484c19452c112c0611441153c62286a60ed33c2cf662731fba3f6aadb900b64e3d13 previousButton clicked() MainWindowBase slotPrevious() playButton clicked() MainWindowBase slotPlay() nextButton clicked() MainWindowBase slotNext() stopButton clicked() MainWindowBase slotStop() playlistButton clicked() MainWindowBase slotPlayList() pauseButton clicked() MainWindowBase slotPause() backButton clicked() MainWindowBase slotBack() forwardButton clicked() MainWindowBase slotForward() positionSlider sliderReleased() MainWindowBase slotPositionSliderReleased() positionSlider sliderPressed() MainWindowBase slotPositionSliderPressed() speedSlider sliderMoved(int) MainWindowBase slotSpeedSliderMoved(int) balanceSlider sliderMoved(int) MainWindowBase slotBalanceSliderMoved(int) volumeSlider sliderMoved(int) MainWindowBase slotVolumeSliderMoved(int) menuButton previousButton playButton nextButton stopButton playlistButton pauseButton backButton forwardButton speedSlider balanceSlider volumeSlider slotCDDA() slotAbout() slotBack() slotBalanceSliderMoved(int) slotFX() slotForward() slotNext() slotPause() slotPlay() slotPlayList() slotPositionSliderPressed() slotPositionSliderReleased() slotPrevious() slotScopes() slotSpeedSliderMoved(int) slotStop() slotVolumeSliderMoved(int) alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/Makefile.am000066400000000000000000000061551466261456500261230ustar00rootroot00000000000000if HAVE_QT qt_interfaceltlibs = libqt_interface.la qt_interfaceldflags = -export-dynamic -avoid-version qt_interfacesources = MainWindowBase.cpp \ ScopesDialogBase.cpp \ PlayListDialogBase.cpp \ MainWindow.cpp \ ScopesDialog.cpp \ PlayListDialog.cpp \ PlayListItem.cpp \ plugin.cpp DESIGNERSOURCES = MainWindowBase.h \ MainWindowBase.cpp \ ScopesDialogBase.h \ ScopesDialogBase.cpp \ PlayListDialogBase.h \ PlayListDialogBase.h METASOURCES = MainWindowBase.moc \ ScopesDialogBase.moc \ PlayListDialogBase.moc \ MainWindow.moc \ ScopesDialog.moc \ PlayListDialog.moc else qt_interfaceltlibs = qt_interfaceldflags = qt_interfacesources = endif lib_LTLIBRARIES = $(qt_interfaceltlibs) COMMON_FLAGS = @ARCH_CFLAGS@ AM_CXXFLAGS = @QT_CXXFLAGS@ @DFLAGS@ $(COMMON_FLAGS) \ -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ -DADDON_DIR=\"$(ADDON_DIR)\" LINK = $(CXXLINK) libdir = $(ADDON_DIR)/interface libqt_interface_la_LDFLAGS = $(qt_interfaceldflags) libqt_interface_la_LIBADD = @QT_LIBS@ libqt_interface_la_SOURCES= $(qt_interfacesources) # UIC headers MainWindowBase.h : $(srcdir)/MainWindowBase.ui $(UIC) -o MainWindowBase.h $(srcdir)/MainWindowBase.ui ScopesDialogBase.h : $(srcdir)/ScopesDialogBase.ui $(UIC) -o ScopesDialogBase.h $(srcdir)/ScopesDialogBase.ui PlayListDialogBase.h : $(srcdir)/PlayListDialogBase.ui $(UIC) -o PlayListDialogBase.h $(srcdir)/PlayListDialogBase.ui # UIC implementations MainWindowBase.cpp : MainWindowBase.h MainWindowBase.moc $(UIC) -impl MainWindowBase.h $(srcdir)/MainWindowBase.ui > MainWindowBase.cpp echo '#include "MainWindowBase.moc"' >> MainWindowBase.cpp ScopesDialogBase.cpp : ScopesDialogBase.h ScopesDialogBase.moc $(UIC) -impl ScopesDialogBase.h $(srcdir)/ScopesDialogBase.ui > ScopesDialogBase.cpp echo '#include "ScopesDialogBase.moc"' >> ScopesDialogBase.cpp PlayListDialogBase.cpp : PlayListDialogBase.h PlayListDialogBase.moc $(UIC) -impl PlayListDialogBase.h $(srcdir)/PlayListDialogBase.ui > PlayListDialogBase.cpp echo '#include "PlayListDialogBase.moc"' >> PlayListDialogBase.cpp MainWindowBase.cpp : MainWindowBase.moc ScopesDialogBase.cpp : ScopesDialogBase.moc PlayListDialogBase.cpp : PlayListDialogBase.moc $(srcdir)/MainWindow.cpp : MainWindow.moc $(srcdir)/ScopesDialog.cpp : ScopesDialog.moc $(srcdir)/PlayListDialog.cpp : PlayListDialog.moc MainWindowBase.moc : MainWindowBase.h $(MOC) MainWindowBase.h -o MainWindowBase.moc ScopesDialogBase.moc : ScopesDialogBase.h $(MOC) ScopesDialogBase.h -o ScopesDialogBase.moc PlayListDialogBase.moc : PlayListDialogBase.h $(MOC) PlayListDialogBase.h -o PlayListDialogBase.moc MainWindow.moc : $(srcdir)/MainWindow.h $(MOC) $(srcdir)/MainWindow.h -o MainWindow.moc ScopesDialog.moc : $(srcdir)/ScopesDialog.h $(MOC) $(srcdir)/ScopesDialog.h -o ScopesDialog.moc PlayListDialog.moc : $(srcdir)/PlayListDialog.h $(MOC) $(srcdir)/PlayListDialog.h -o PlayListDialog.moc DISTCLEANFILES = $(METASOURCES) $(DESIGNERSOURCES) alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/PlayListDialog.cpp000066400000000000000000000131751466261456500274540ustar00rootroot00000000000000/* * playlist_dialog.cpp (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include #include #include #include #include #include #include #include #include #include "PlayListItem.h" #include "PlayListDialog.h" PlayListDialog::PlayListDialog(QWidget * parent, Playlist * playList) : PlayListDialogBase(parent, "PlayListDialog"), PlaylistInterface(), playList_(playList) { list->setSorting(0); list->header()->hide(); playList_->Register(this); connect ( list, SIGNAL(returnPressed(QListViewItem *)), SLOT(slotPlay(QListViewItem*)) ); list->setSelectionMode(QListView::Extended); QString lastUsedPlayListPath (QDir::homeDirPath() + "/.alsaplayer/last_used_playlist"); QFile f(lastUsedPlayListPath); if (f.open(IO_ReadOnly)) { QTextStream str(&f); QString filename; str >> filename; plist_result ret = playList_->Load(string(filename.local8Bit().data()), 0, false); if (E_PL_SUCCESS != ret) { QMessageBox::warning(this, tr("Warning - AlsaPlayer"), tr("Couldn't load last used playlist !")); } } } PlayListDialog::~PlayListDialog() { playList_->UnRegister(this); } void PlayListDialog::slotAdd() { QStringList l = QFileDialog::getOpenFileNames(QString::null, QString::null, this, "FindSomeMusic", tr("Add music - AlsaPlayer")); if (!l.isEmpty()) { std::vector stlVec; for (QStringList::ConstIterator it(l.begin()); it != l.end(); ++it) stlVec.push_back(string((*it).local8Bit().data())); playList_->Insert(stlVec, playList_->Length()); } } void PlayListDialog::slotLoad() { QString filename = QFileDialog::getOpenFileName(QString::null, QString::null, this, "LoadAPlayList", tr("Load playlist - AlsaPlayer")); if (!!filename) { plist_result ret = playList_->Load(string(filename.local8Bit().data()), 0, false); if (E_PL_SUCCESS != ret) { QMessageBox::warning(this, tr("Warning - AlsaPlayer"), tr("Couldn't load playlist !")); } } } void PlayListDialog::slotRemove() { std::vector l; unsigned vPos = 1; for (QListViewItemIterator it(list); it.current(); ++it) if (it.current()->isSelected()) l.push_back(vPos); else ++vPos; for (std::vector::const_iterator it(l.begin()); it != l.end(); ++it) { playList_->Remove(*it, *it); } } void PlayListDialog::slotSave() { QString filename = QFileDialog::getSaveFileName(QString::null, QString::null, this, "LoadAPlayList", tr("Save playlist - AlsaPlayer")); if (!!filename) { plist_result ret = playList_->Save(string(filename.local8Bit().data()), PL_FORMAT_M3U); if (ret != E_PL_SUCCESS) { QMessageBox::warning(this, tr("Warning - AlsaPlayer"), tr("Couldn't save playlist !")); } else { QString alsaPlayerDir(QDir::homeDirPath() + "/.alsaplayer"); QDir d(alsaPlayerDir); if (!d.exists() && !d.mkdir(alsaPlayerDir)) { QMessageBox::warning(this, tr("Warning - AlsaPlayer"), tr("Couldn't create directory %1 !").arg(alsaPlayerDir)); } else { QString lastUsedPlayListPath(alsaPlayerDir + "/last_used_playlist"); QFile f(lastUsedPlayListPath); if (!f.exists() && !f.open(IO_WriteOnly)) { QMessageBox::warning(this, tr("Warning - AlsaPlayer"), tr("Couldn't create file %1 !").arg(lastUsedPlayListPath)); } else { QTextStream str(&f); str << filename; } } } } } void PlayListDialog::slotClear() { playList_->Clear(); } void PlayListDialog::CbSetCurrent(unsigned cur) { for (QListViewItemIterator it(list); it.current(); ++it) { PlayListItem * i = static_cast(it.current()); if (i->height() == cur) { list->setCurrentItem(i); break; } } } void PlayListDialog::CbInsert(std::vector & l, unsigned pos) { std::vector::const_iterator it; for (it = l.begin(); it != l.end(); ++it) new PlayListItem(QString::fromLocal8Bit((*it).filename.c_str()), list); } void PlayListDialog::CbRemove(unsigned begin, unsigned end) { unsigned vPos = 1; for (QListViewItemIterator it(list); it.current(); ++it, ++vPos) if (vPos >= begin && vPos <= end) delete it.current(); } void PlayListDialog::CbLock() { return; } void PlayListDialog::CbUnlock() { return; } void PlayListDialog::CbClear() { list->clear(); } void PlayListDialog::slotPlay(QListViewItem * i) { unsigned vPos = 1; for (QListViewItemIterator it(list); it.current(); ++it, ++vPos) if (it.current() == i) { playList_->Play(vPos); break; } } void PlayListDialog::slotShuffle() { playList_->Shuffle(); } #include "PlayListDialog.moc" // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/PlayListDialog.h000066400000000000000000000030701466261456500271120ustar00rootroot00000000000000/* * playlist_dialog.h (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef QT_PLAY_LIST_DIALOG_H #define QT_PLAY_LIST_DIALOG_H #include "PlayListDialogBase.h" #include "Playlist.h" class PlayListDialog : public PlayListDialogBase, virtual public PlaylistInterface { Q_OBJECT public: PlayListDialog(QWidget * parent, Playlist *); ~PlayListDialog(); void CbSetCurrent(unsigned); void CbInsert(std::vector &, unsigned); void CbRemove(unsigned, unsigned); void CbLock(); void CbUnlock(); void CbClear(); protected slots: void slotAdd(); void slotLoad(); void slotRemove(); void slotSave(); void slotClear(); void slotShuffle(); void slotPlay(QListViewItem *); private: Playlist * playList_; }; #endif // QT_PLAY_LIST_DIALOG_H // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/PlayListDialogBase.ui000066400000000000000000000455151466261456500301050ustar00rootroot00000000000000 PlayListDialogBase PlayListDialogBase 0 0 409 369 Playlist - AlsaPlayer true unnamed 11 6 Filename true true list Multi true Layout2 unnamed 0 6 addButton image0 Add file Line1 HLine Sunken Horizontal loadButton image1 Open playlist saveButton image2 Save playlist Line2 HLine Sunken Horizontal removeButton image3 Remove item clearButton image4 Clear Line3 HLine Sunken Horizontal PushButton7 image5 Shuffle Line4 HLine Sunken Horizontal closeButton image6 true true Close window Spacer1 Vertical Expanding 20 20 789c8dd2496fda4014c0f13b9fc2821baa12bc02aa7a8881847d3f54aa7a18cfd860886d6c16e344fdee9df7deb872ab44aac5c13ffeb3a0191e9bdaf7e54c6b3ed6ce177609b9c6f72cd39ae21a45c58f9fdfde6b75c3d0e4c7ea687afd4badfea0716d9ec43ebc47f2bdd1c207b8059abad93271e458d122ae915dc92eb0afd8212e1439710eb474935b38774ab45ac4069259dc624006b40d8bdb06f008740c47779081a2ddf1804f48e6d80ece7d2d49f5a4d8a52a4a52e525bb1670af2868f00bb06d3aa26d0277c4b64e7c437a6dbb8d4bdd1405f10aec981dbd83833d20b398ce70a30dd0b33cc3433e03b9cd0d6e03fd9241005c293a5447482129804ba0b0b92fb00e89c2209e151d628ef425f1ba5d4546bc2bfac409d097437d0798117d833853748829520ef5716eacc88803459fd8030672688073136260100f8a0ef1820c24f1344245462c1403e2c387cf7f9706fba4343c8f353e285c304f3e6a5ea5c8530b04249af7a7ec76024e415093f3cab20f0fc7239ed02bb5a82cbb304e92e3091b1795b24bd2ec7cbe1cae376c911795ab9d2ee7fc9e256151ecdefe2a4f897b777b87a2280e45d6c7a0ca7190c617f97d3848dde76a7919e4098cef65ee7034a640655fc80dc224bee793389f56ca0dd649d2c9394fc3d95c052cd7384d7a137798ca25f3a85a1ea68be56a78973f2d5ecaeda3a87aa2ebfe7052f4b27c23cbbfb7305f0c57a3cd3a2a43f516b6ebcd66fcc96d6fb7d5ffc1afafb5df79dd4642 789c8dd55973e2381007f0f77c0a2afd96daeab1856d4c6ded43c87d9040c8055bfb205f8110c845cea9fdeedbee6e29d7d466c643323ffaaf96902de6c74ae3bcd76dacfc58ba5fd8c5246fe4637bd758291e66b397bffff9ebe7d2b2310dfa1b9ab06196ff585aee2f1a79e3e07a5ed6402040c07f6ac3013b0d2231ded70e83300852ae0f9d43c99fab2331deb15397c75b67cd6fa9350f564d17e7b76b9b204c75be506c2223fd3376bbeec8b6ea5cfb1931e5dbec8e3a5507ea5c8cbc9e66e8c78fc4ae0e03e766c8be123723316eb2dbf58ad963b5db8f1bb55b6fee2df9404cfd64be5d75aafd27b5a3d0e737d8d6e4ea3571d3cdbf5e3b36dec659f60f66ea48eb1d67ad17e238882cd7f79d637e78e0916dbdcf6a27262e62ce03889330917a976d937622f5c3daada6f7425da8a7ecac55b4329e7fb576da8c63bd1f28a6ed68b22fd9595aa4926fd76e47ce70efdc8ed89be276a83e55c7624cd93939e7faaabaad3e5217ea87da364a0abd7f13b1af1f3b5b99ef446c43a963cb59eb63752cc63d76eefbe7e256a8ee8badd57ce22dfd47ea520cdc2f8b6c99497e28ce8cfa5c9d8881cf6356b4da913cffaf625fdff72ed8176aabfd626faee399bad47caf761e7bdf39e731e74fc5b911c3ad3a51f379c80bb28c7f515b1d7fe22d753e2f459c97ea1de742f2c7e2c2687deeacf5489d8881cf77517a3fabade607def27d7ba42ec5c0e7b54cbc9f9ccb845d8a4b23c6a63a51f3f35f9636d6f3732df6f5beb7ccdf535b3154ea52eb7c7fabc486729e3154c7ea425dca7c7828ae4c25f375d5899af7a3aa282fdf079938333afe499da8779d5b7cbef1426dd5d7de72de2b716ed48fcef2fd80a53a512fbc253f575bf58eb37e1f4cd5a59ed7077161b43ef396fa953a51bf38ebf93c1057b6aae43fe3dfbf7e9d4770d7f7f9b7ecdb98b7719ff39f7b7e9ee763feebfc6ec4ffaffffbfe68f9ca7e6f7f30c7024bacf002c7dfe771829738c52b9ce11caff1066ff18eae7bf7fb4b7e8c0b4a3fe0233ee1f32faef197fe737ca1f42bae6207d7709d5e1bf4ee843a6de2167dae6df7b9b5ff1c777017f7701fbb7840af43ec611f8f7080c77882a77886e738c41106da7f415788866a3d6c52728011e7624a25d8c214dbd41cc0baf543063914d885122aedcd23e002873086095cc214aefcfa2ff0156630c708ae294d73d0b81b98c32ddcd53350fe1ef8ee6bff277880473ca24c897dca3ec133a55fa8ff2bf75fa5d574deed4f487b328235ea5fd2a8f5ba379ec006c694a7f5c326ad7deb6dff611b0a9e9d564463e6b053f7e6f448bbef7ed8ff0dd8a31d3b855bfa8c74d1ef3abd4f3b58af7d13baee89e3efa70338a4cc1e7db29852bdfa27fd7b087dea7d44e9290cdedf5fb0f4de31cd7a4c3bdd82137aadd2754aef5ed2be4fe10cce3fe48770051d18410003ffead0cf0e5d211818be7b7efefd73e93fcb5fd5ab 789c8dd3db52db481006e07b9ec285eea854c73a8c2cd5d65ec449c8814320844392cac5686614303e810d846cedbbef3fdd0dc221d40621bb3ecddfa3d68cf57ca377b2b7d3db78beb658dae599ebb9537bd9dbf05793c9edd76f7fffb3b69e653dfc97752f5b7fb6b6bebfecb9deee6c1a22c802499fffd8a5ba505fb02bb8627f5657ea0fd169bfef52c9bf64576991caf8203aabb32aabd927d1799af7f3947dccaef32a97f12bb553ef441769ee0ac93b71d157cfd585dab02d6cd95e5da9b7d54efd23da648533bc3834129bbe7aa136ea176c0b4bfd585dab4fd55e9c507499195f4afdb5b84cd5976aa33e635b58e64bd5b53a517bf52c7a90977e90b3837890aa6fd4467dce6ee0863d54d7ead76aaffe185de5035f49fd1b7195aa8fd4467dc86e60a96fd5b5fa40edd59fa2eba2f275c1de13d7a9baaf36ea7db6831d7ba9aed559b42d6a6f399f346c67ad95f157d14dd1648dccf796ed9bb2f19c776a2ba64d75506f453bd30467d88dd865ea5b75a9fecef6b0d4efaaad38e1f7cf1b173ce713de5f1f7ce9e5fd2cd456fd531c6c104fa34319b250b26b76c01519ffa20eea77d16dd966ade42b75a9ced92ddcb2dfabad7aa26ec5fbcbbb8312b29d7e77fc92b7d490234fe14ff214a8a5ef744a67381d8de8fc7ff20eb33734a6094d5131e3aa39cd9ecc5f707a8abc1cb1ea92ab1677f7eaf2986f89fcd57dfa61d535dde0d9c62bf91f74abddfc7afca41734c4a85dc9bfa4572bdd74c7825e63fe4dacdbe42e8f6eded05b74faee51fa3dae0e698b2ebafe71751bdd2f69073bf6b8ff05f2bb189b74fdd007daa37d9c1f31eab00f5d3ef67e83f97d974737377480630fe7277c9e63b7a46a8aefd8bb7db89eb876484798e1184f7c80dc21ce23ecf798d3b19b9338fb7dfe335620e0fa17eaa36a1beb3d447ec89d044ab1cedb5d1edda4dc4186fbe758a102598363886cc00a6c51f9f0f74003549c61de0af31754e3738ad51da13b83bd4dd1cd5c66977c42d8eb149de64942456231be895539c2535ca1b36bcc3f7e98e7f599a3669e34d8f5adc4e199e758d903548dbab579f4fb9ce1fe960caa0cd6a745cd0215bbe86bf2fbf74babf85ed8ed63e447f2bb793abf7a2f745e76e9a7f3f755964e57deaf7fff5afb0f54f1312d 789c6dd0dd0a823014c0f17b9f62e89d84a62218d123145d06d1859ee3ac0b0bca2e227af776f6a1db7488eccf0fc6d9d2989d8e7b16a7c16ba8871b30b8d64f16e3bbef3fe7cbee1b8479cec4b76159b80ac284013b3cee2ded1bb18fd67251d626ab82b2a3ac0aa3a0b2ca38a7e494501a8d5442ae142939871c4aca56252d3983b7a2ba11ff05890088e62240d24c2410f9a241902723f862817b9a0dce040ed8826d6b8125c8b926099320bd952405a3a07a46411a8c68106440cb08bc33a06409a420e21c8ce00cf4698a1c301310b9304e8de8c174531f92f0b70dfee366b514 789c85d1df6e82301406f07b9e82e89d5974a2902dcb1e61cb2e972cbbe85f40682950c065d9bbafa7a799cc683c55c38faf1f60d8ace2f7b79778b5897a4b6cc96256902e5ef141a9af8fcfe7ef689124317cb278bbb88b16eb98c5af8d16707c70c7cbdd7677bff31101eec9fe614f804b604ad2c7d4b304524e09e5c03c50207b204ba96029b040b20429033324f3e48c30dfa58102c9813c6582fbcd02c913e4e42960018f4091712132608714097208cc90ada7db2a7cd70412a40e14c80628dd56e9bb0a2913a40dcc9095a77494c03a9020c740895c5f9c5bc9f27cc85f42997f0f8c3226655e9487535255b55b9552ba316dd79f126e6b186b5563cc30e4b3a4aec77174916a202a4e89b03eb1ee72671d7ab573fd3eb4b2eed9ec8567a3caaaca7d95d6c674ddecff3085a3e162ff3a4c37da9d86c630fcebc8c6346e3f36ba69d6918381697d633ace3a45dbbad36deb1bc769f6d44537f8d5f960dec9fbbce80bf7db977d9997a7fb90c3f9dc7edb17939fa7e817ea671465 789ccdd2df6fa2401007f077ff0a226fe642f9b128e4720fd5b6965acc3d5e72b987ddc5012a0a556c95cbfdefb7b3b34a6d72ef37109d4fbe322c8b3723ebc7f7d41add0cf62d6f4b69c982efac5176d86c4e3f7f7dfb3d18fabea54ee65bdef0cb60e858d25ad6db15f6a07adbd5852c0d1971a5192946486118113ba4e7e2813c183262ab1929ea1f378611716d2889f748dff5a4afafcd8978204fc8c00bdc40af7f67c8887bcd38888218f966288929927981997c3c93e96b3991b9c4174346bcd3e4cc2ce3d590318e94c8908771a8991966c40439f6c3d8d7cb280cb3b18fac88638f581b86c4992657d4a3de0d63e2d630236e9093609c4d02e49438f1888fc82898c4b41b0f44f51274bad014e7f496188591403e216316873143ce35a5a2442e9132132b1af58cccc2336d24e8d27f392adbee3f55f589ed7021b31577eccf09089117595e0af894c0cbbadac8625b37af709540d1ec38367cdf54f031a9da35de0acffc507d48deb6d09835396df97eec9302c0b91480ec93934a4ca61ad89904445702349dc040748dda804ed01e34b7d3fc3803dbb9534b809adf4f1fd6665a33af6638ec31c17175fdd45cee739863b0b09f13f50d185c9e47a8074993e522c51d14d7fb8695a47d7f9d38f0cfc4f9af923f5f077f0143f107e1 789ca591cb0ac2301045f7fd8ad0d915e92b6811f113149782b84826822eaaa07521e2bf9bc9a36daa82e29086b973929b6992256cbd5ab0248b2e8d680ec8702fce2c51d7babe6db6f37b149725d363c28a7814c52943b63c1d779483ce2137415291e405cfb95989242b5e8d2b4e521a29b594248593532bd3b7f12d01f88d802730204055fb41400480b44467d82700cabb29bbc91104109eb8dc1167ee67e813ec880889ec0886e4939b74766997875d9b08bb266f657649e5ce6c6f477be8ff40330f6ed41429e4eb2b08aab78dfcffda0179cca227b3fc82b2 closeButton clicked() PlayListDialogBase accept() saveButton clicked() PlayListDialogBase slotSave() loadButton clicked() PlayListDialogBase slotLoad() addButton clicked() PlayListDialogBase slotAdd() removeButton clicked() PlayListDialogBase slotRemove() clearButton clicked() PlayListDialogBase slotClear() PushButton7 clicked() PlayListDialogBase slotShuffle() slotShuffle() slotAdd() slotClear() slotLoad() slotRemove() slotSave() alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/PlayListItem.cpp000066400000000000000000000021631466261456500271460ustar00rootroot00000000000000/* * playlist_item.cpp (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include "PlayListItem.h" PlayListItem::PlayListItem ( const QString & filename, QListView * parent ) : QListViewItem (parent), filename_ (filename) { int lastSlash = filename.findRev('/'); if (-1 == lastSlash) setText(0, filename); else setText(0, filename.mid(lastSlash + 1)); } // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/PlayListItem.h000066400000000000000000000021761466261456500266170ustar00rootroot00000000000000/* * playlist_item.h (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef QT_PLAY_LIST_ITEM_H #define QT_PLAY_LIST_ITEM_H #include class PlayListItem : public QListViewItem { public: PlayListItem(const QString & filename, QListView * parent); QString filename() const { return filename_; } private: QString filename_; }; #endif // QT_PLAY_LIST_ITEM_H // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/ScopesDialog.cpp000066400000000000000000000022721466261456500271430ustar00rootroot00000000000000/* * scopes_dialog.cpp (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include #include #include "ScopesDialog.h" ScopesDialog::ScopesDialog(QWidget * parent) : ScopesDialogBase(parent, "ScopesDialog", true) { listView->header()->hide(); new QCheckListItem(listView, "Some scope", QCheckListItem::CheckBox); new QCheckListItem(listView, "Some other scope", QCheckListItem::CheckBox); } #include "ScopesDialog.moc" // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/ScopesDialog.h000066400000000000000000000020341466261456500266040ustar00rootroot00000000000000/* * scopes_dialog.h (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef QT_SCOPES_DIALOG_H #define QT_SCOPES_DIALOG_H #include "ScopesDialogBase.h" class ScopesDialog : public ScopesDialogBase { Q_OBJECT public: ScopesDialog(QWidget * parent); }; #endif // QT_SCOPES_DIALOG_H // vim:ts=2:sw=2:tw=78:et alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/ScopesDialogBase.ui000066400000000000000000000073531466261456500275760ustar00rootroot00000000000000 ScopesDialogBase Rik Hemsley QDialog name ScopesDialogBase geometry 0 0 259 254 caption Scopes - AlsaPlayer margin 11 spacing 6 QListView text Scopes clickable true resizeable true name listView QLayoutWidget name Layout1 margin 0 spacing 6 name Horizontal Spacing2 orientation Horizontal sizeType Expanding sizeHint 20 20 QPushButton name closeButton text &Close autoDefault true default true closeButton clicked() ScopesDialogBase accept() alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/license.cpp000066400000000000000000000016521466261456500262120ustar00rootroot00000000000000#include "config.h" // For VERSION macro. static const char * const licenseText = "

AlsaPlayer "VERSION"

" "

Copyright (C) 1998-2001 Andy Lo A Foe <andy@alsa-project.org>

" "

" "This program is free software; you can redistribute it and/or modify" " it under the terms of the GNU General Public License as published by" " the Free Software Foundation; either version 2 of the License, or" " (at your option) any later version." "

" "

" "This program is distributed in the hope that it will be useful," " but WITHOUT ANY WARRANTY; without even the implied warranty of" " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" " GNU General Public License for more details." "

" "

" "You should have received a copy of the GNU General Public License" " along with this program; if not, write to the Free Software" " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA." "

"; alsaplayer-0.99.82/attic/experimental/obsolete/interface/qt/plugin.cpp000066400000000000000000000035711466261456500260700ustar00rootroot00000000000000/* * qt.cpp (C) 2001 by Rik Hemsley (rikkus) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include "CorePlayer.h" #include "Playlist.h" #include "MainWindow.h" #include "interface_plugin.h" int interface_qt_init() { return 1; } int interface_qt_running() { return 1; } int interface_qt_stop() { return 1; } void interface_qt_close() { qApp->quit(); } int interface_qt_start ( Playlist * playlist, int argc, char ** argv ) { bool customStyle = false; for (int i = 0; i < argc; i++) { if (QString(argv[i]) == QString("-style")) { customStyle = true; break; } } QApplication app(argc, argv); if (!customStyle) app.setStyle(new QPlatinumStyle); MainWindow w(playlist->GetCorePlayer(), playlist); app.setMainWidget(&w); w.show(); return app.exec(); } interface_plugin default_plugin = { INTERFACE_PLUGIN_VERSION, { "Qt interface v1.0" }, { "Rik Hemsley" }, NULL, interface_qt_init, interface_qt_start, interface_qt_running, interface_qt_stop, interface_qt_close }; extern "C" { interface_plugin * interface_plugin_info() { return &default_plugin; } } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/000077500000000000000000000000001466261456500227705ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/Makefile.am000066400000000000000000000001341466261456500250220ustar00rootroot00000000000000SUBDIRS = logbarfft levelmeter synaescope spacescope monoscope blurscope \ opengl_spectrum alsaplayer-0.99.82/attic/experimental/obsolete/scopes/blurscope/000077500000000000000000000000001466261456500247665ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/blurscope/Makefile.am000066400000000000000000000007511466261456500270250ustar00rootroot00000000000000if HAVE_GTK blurscopeltlibs = libblurscope.la blurscopeldflags = -export-dynamic -avoid-version @GTK_LIBS@ blurscopesources = blurscope.c lib_LTLIBRARIES = $(blurscopeltlibs) else blurscopeltlibs = blurscopeldflags = blurscopesources = endif libdir = $(ADDON_DIR)/scopes AM_CFLAGS = -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @ARCH_CFLAGS@ @GTK_CFLAGS@ @DFLAGS@ libblurscope_la_LDFLAGS = $(blurscopeldflags) LIBS = libblurscope_la_SOURCES= $(blurscopesources) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/blurscope/blur_8.s000066400000000000000000000012261466261456500263460ustar00rootroot00000000000000.globl bscope_blur_8 .type bscope_blur_8,@function bscope_blur_8: pushl %ebp movl %esp,%ebp pushl %edi pushl %esi pushl %ebx movl 20(%ebp),%edi movl %edi,%eax addl 8(%ebp),%eax leal 1(%eax),%esi movl %edi,%ecx imull 16(%ebp),%ecx subl $1,%ecx jc .L26 leal 2(%eax),%ebx .align 4 .L27: movl %esi,%eax subl %edi,%eax movzbl (%eax),%edx movzbl -2(%ebx),%eax addl %eax,%edx movzbl (%ebx),%eax addl %eax,%edx movzbl (%edi,%esi),%eax addl %edx,%eax sarl $2,%eax cmpl $2,%eax jbe .L28 addl $-2,%eax .L28: movb %al,(%esi) incl %ebx incl %esi subl $1,%ecx jnc .L27 .L26: leal -12(%ebp),%esp popl %ebx popl %esi popl %edi leave ret alsaplayer-0.99.82/attic/experimental/obsolete/scopes/blurscope/blurscope.c000066400000000000000000000173451466261456500271420ustar00rootroot00000000000000/* blurscope.c * Copyright (C) 2002 Andy Lo A Foe * Ported from XMMS: * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: blurscope.c 1179 2007-06-06 21:18:21Z dominique_libre $ */ #include #include #include #include #include #include #include #include #include #include #include #include "scope_plugin.h" #include "utilities.h" #include "prefs.h" static GtkWidget *window = NULL,*area; static GdkPixmap *bg_pixmap = NULL; static pthread_t bscope_thread; static pthread_mutex_t bscope_mutex; static pthread_mutex_t edit_mutex; static gint running = 0; static gint16 audio_data[2][256]; #define WIDTH 256 #define HEIGHT 128 #define min(x,y) ((x)<(y)?(x):(y)) #define BPL ((WIDTH + 2)) static guchar rgb_buf[(WIDTH + 2) * (HEIGHT + 2)]; static GdkRgbCmap *cmap = NULL; static int bscope_running(void); static inline void draw_pixel_8(guchar *buffer,gint x, gint y, guchar c) { buffer[((y + 1) * BPL) + (x + 1)] = c; } #ifndef I386_ASSEM void bscope_blur_8(guchar *ptr,gint w, gint h, gint bpl) { register guint i,sum; register guchar *iptr; iptr = ptr + bpl + 1; i = bpl * h; while(i--) { sum = (iptr[-bpl] + iptr[-1] + iptr[1] + iptr[bpl]) >> 2; if(sum > 2) sum -= 2; *(iptr++) = sum; } } #else extern void bscope_blur_8(guchar *ptr,gint w, gint h, gint bpl); #endif void generate_cmap(void) { guint32 colors[256],i,red,blue,green; if(window) { red = (guint32)(0xFF3F7F / 0x10000); green = (guint32)((0xFF3F7F % 0x10000)/0x100); blue = (guint32)(0xFF3F7F % 0x100); for(i = 255; i > 0; i--) { colors[i] = (((guint32)(i*red/256) << 16) | ((guint32)(i*green/256) << 8) | ((guint32)(i*blue/256))); } colors[0]=0; if(cmap) { gdk_rgb_cmap_free(cmap); } cmap = gdk_rgb_cmap_new(colors,256); } } static void stop_bscope(void) { if (running) { running = 0; pthread_join(bscope_thread, NULL); } } static gboolean close_bscope_window(GtkWidget *widget, GdkEvent *event, gpointer data) { GDK_THREADS_LEAVE(); stop_bscope(); GDK_THREADS_ENTER(); return TRUE; } static void bscope_init(void) { GdkColor color; if(window) return; pthread_mutex_init(&bscope_mutex, NULL); pthread_mutex_init(&edit_mutex, NULL); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window),"Blurscope"); gtk_window_set_wmclass (GTK_WINDOW(window), "Blurscope", "AlsaPlayer"); gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE); gtk_widget_realize(window); color.red = SCOPE_BG_RED << 8; color.blue = SCOPE_BG_BLUE << 8; color.green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_signal_connect(GTK_OBJECT(window), "delete_event", GTK_SIGNAL_FUNC(close_bscope_window), window); gtk_widget_set_usize(window, WIDTH, HEIGHT); area = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(window),area); gtk_widget_realize(area); gdk_window_set_background(area->window, &color); generate_cmap(); memset(rgb_buf,0,(WIDTH + 2) * (HEIGHT + 2)); gtk_widget_show(area); gdk_window_clear(window->window); gdk_window_clear(area->window); } static void shutdown_bscope(void) { prefs_set_bool(ap_prefs, "blurscope", "active", bscope_running()); stop_bscope(); if(window) gtk_widget_destroy(window); if(bg_pixmap) { gdk_pixmap_unref(bg_pixmap); bg_pixmap = NULL; } if(cmap) { gdk_rgb_cmap_free(cmap); cmap = NULL; } } static inline void draw_vert_line(guchar *buffer, gint x, gint y1, gint y2) { int y; if(y1 < y2) { for(y = y1; y <= y2; y++) draw_pixel_8(buffer,x,y,0xFF); } else if(y2 < y1) { for(y = y2; y <= y1; y++) draw_pixel_8(buffer,x,y,0xFF); } else draw_pixel_8(buffer,x,y1,0xFF); } static void bscope_hide(); static void bscope_set_data(void *audio_buffer, int size) { #ifndef FREQ_BLUR short i; #endif short *sound = (short *)audio_buffer; #ifdef FREQ_BLUR static gint i,y, prev_y; #endif if (pthread_mutex_trylock(&edit_mutex) != 0) { return; } if (running && sound && size >= 1024) { for(i=0;i<256;i++) { audio_data[0][i] = *(sound++); audio_data[1][i] = *(sound++); } } #ifdef FREQ_BLUR bscope_blur_8(rgb_buf, WIDTH, HEIGHT, BPL); prev_y = y = (HEIGHT / 2) + (audio_data[0][0] >> 9) + (audio_data[1][0] >> 9) / 2; if (prev_y < 0) y = prev_y = 0; if (y >= HEIGHT) y = prev_y = HEIGHT - 1; for(i = 0; i < WIDTH; i++) { y = (HEIGHT / 2) + (audio_data[0][i >> 1] >> 9) + (audio_data[1][i >> 1] >> 9) / 2; /* Take half of other */ if(y < 0) y = 0; if(y >= HEIGHT) y = HEIGHT - 1; draw_vert_line(rgb_buf,i,prev_y,y); prev_y = y; } #endif pthread_mutex_unlock(&edit_mutex); } static void the_bscope(void) { running = 1; while (running) { gint i,y, prev_y; #ifndef FREQ_BLUR pthread_mutex_lock(&edit_mutex); bscope_blur_8(rgb_buf, WIDTH, HEIGHT, BPL); prev_y = y = (HEIGHT / 2) + (audio_data[0][0] >> 9) + (audio_data[1][0] >> 9) / 2; if (prev_y < 0) y = prev_y = 0; if (y >= HEIGHT) y = prev_y = HEIGHT - 1; for(i = 0; i < WIDTH; i++) { y = (HEIGHT / 2) + (audio_data[0][i >> 1] >> 9) + (audio_data[1][i >> 1] >> 9) / 2; /* Take half of other */ if(y < 0) y = 0; if(y >= HEIGHT) y = HEIGHT - 1; draw_vert_line(rgb_buf,i,prev_y,y); prev_y = y; } pthread_mutex_unlock(&edit_mutex); #endif GDK_THREADS_ENTER(); gdk_draw_indexed_image(area->window,area->style->white_gc,0,0,WIDTH,HEIGHT,GDK_RGB_DITHER_NONE,rgb_buf + BPL + 1,(WIDTH + 2),cmap); gdk_flush(); GDK_THREADS_LEAVE(); dosleep(SCOPE_SLEEP); } GDK_THREADS_ENTER(); bscope_hide(); gdk_flush(); GDK_THREADS_LEAVE(); } void bscope_hide(void) { gint x, y; if (window) { gdk_window_get_root_origin(window->window, &x, &y); gtk_widget_hide(window); gtk_widget_set_uposition(window, x, y); } } static void run_bscope(void *data) { nice(SCOPE_NICE); the_bscope(); pthread_mutex_unlock(&bscope_mutex); pthread_exit(NULL); } static void start_bscope(void) { if (pthread_mutex_trylock(&bscope_mutex) != 0) { printf("blurscope already running\n"); return; } gtk_widget_show(window); pthread_create(&bscope_thread, NULL, (void * (*)(void *))run_bscope, NULL); } static int init_bscope(void *arg) { bscope_init(); if (prefs_get_bool(ap_prefs, "blurscope", "active", 0)) { start_bscope(); } return 1; } static int bscope_running() { return running; } static scope_plugin bscope_plugin; scope_plugin *scope_plugin_info(void) { memset(&bscope_plugin, 0, sizeof(scope_plugin)); bscope_plugin.version = SCOPE_PLUGIN_VERSION; bscope_plugin.name = "Blurscope"; bscope_plugin.author = "Andy Lo A Foe"; bscope_plugin.init = init_bscope; bscope_plugin.start = start_bscope; bscope_plugin.running = bscope_running; bscope_plugin.stop = stop_bscope; bscope_plugin.shutdown = shutdown_bscope; bscope_plugin.set_data = bscope_set_data; return &bscope_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/levelmeter/000077500000000000000000000000001466261456500251345ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/levelmeter/Makefile.am000066400000000000000000000007661466261456500272010ustar00rootroot00000000000000if HAVE_GTK levelmeterltlibs = liblevelmeter.la levelmeterldflags = -export-dynamic -avoid-version @GTK_LIBS@ levelmetersources = levelmeter.c lib_LTLIBRARIES = $(levelmeterltlibs) else levelmeterltlibs = levelmeterldflags = levelmetersources = endif libdir = $(ADDON_DIR)/scopes AM_CFLAGS = -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @ARCH_CFLAGS@ @GTK_CFLAGS@ @DFLAGS@ liblevelmeter_la_LDFLAGS = $(levelmeterldflags) LIBS = liblevelmeter_la_SOURCES= $(levelmetersources) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/levelmeter/levelmeter.c000066400000000000000000000205551466261456500274530ustar00rootroot00000000000000/* levelmeter.c * Copyright (C) 1998-2002 Andy Lo A Foe * Original code by Tinic Uro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "scope_config.h" #include "prefs.h" #define DECAY 3 static char actlEq[257]; static char oldlEq[257]; static char actrEq[257]; static char oldrEq[257]; static char scX[256]; static char scY[256]; static GtkWidget *scope_win = NULL; static GtkWidget *area = NULL; static GdkPixmap *draw_pixmap = NULL, *disp = NULL; static GdkGC *gc = NULL; static pthread_t levelmeter_thread; static pthread_mutex_t levelmeter_mutex; static gint is_init = 0; static gint running = 0;/* this global variable determines when and if we should exit the thread loop. we should always exit gracefully from the looper thread or else we might hold the global GDK thread lock (a very shitty hack) and lock our whole app */ static void levelmeter_hide(void); static int levelmeter_running(void); static void levelmeter_set_data(void *audio_buffer, int size) { short i; short *sound = (short *)audio_buffer; if (running && sound) { char *newsetl = actlEq; char *newsetr = actrEq; int bufsize=size/512; for(i=0;i<256;i++) { *newsetl++=(char)((int)(*(sound ))>>8); *newsetr++=(char)((int)(*(sound+1))>>8); sound+=bufsize; } } } static void the_levelmeter(GtkWidget *win) { static int oldl = 0; static int oldr = 0; char *oldsetl = oldlEq; char *newsetl = actlEq; char *oldsetr = oldrEq; char *newsetr = actrEq; int levell, levelr; int maxl = 0, maxr = 0, count = 0; int i; running = 1; while (running) { memcpy(oldsetl, newsetl, 256); memcpy(oldsetr, newsetr, 256); count++; if (count > 30) { count = 0; maxl = 0; maxr = 0; } levell = 0; for (i = 0; i < 256; i++) { if (oldsetl[i] > 0) { levell=MAX(levell,oldsetl[i]); } else { levell=MAX(levell,-oldsetl[i]); } } levelr = 0; for (i = 0; i < 256; i++) { if (oldsetr[i] > 0) { levelr=MAX(levelr, oldsetr[i]); } else { levelr=MAX(levelr,-oldsetr[i]); } } levelr >>= 1; levell >>= 1; if (oldr > 0 && (oldr-=2) > levelr) levelr = oldr; else oldr = levelr; if (oldl > 0 && (oldl-=2) > levell) levell = oldl; else oldl = levell; if (maxl < levell<<2) { maxl = (levell<<2)-4; count = 0; } if (maxr < levelr<<2) { maxr = (levelr<<2)-4; count = 0; } GDK_THREADS_ENTER(); gdk_draw_rectangle(draw_pixmap,gc,TRUE,0,0,256,40); gdk_draw_pixmap(draw_pixmap,gc,disp,0,0,0,1,levell<<2,18); gdk_draw_pixmap(draw_pixmap,gc,disp,maxl,0,maxl,1,4,18); gdk_draw_pixmap(draw_pixmap,gc,disp,0,0,0,21,levelr<<2,18); gdk_draw_pixmap(draw_pixmap,gc,disp,maxr,0,maxr,21,4,18); gdk_draw_pixmap(area->window,gc,draw_pixmap,0,0,0,0,256,40); gdk_flush(); GDK_THREADS_LEAVE(); dosleep(SCOPE_SLEEP); } GDK_THREADS_ENTER(); levelmeter_hide(); gdk_flush(); GDK_THREADS_LEAVE(); } static void stop_levelmeter(void); static gboolean close_levelmeter_window(GtkWidget *widget, GdkEvent *event, gpointer data) { GDK_THREADS_LEAVE(); stop_levelmeter(); GDK_THREADS_ENTER(); return TRUE; } static void popup(GtkWidget *widget, GdkEvent *event, gpointer data) { //printf("Bla\n"); } static GtkWidget *init_levelmeter_window(void) { GtkWidget *levelmeter_win; GdkColor color, col; int i; pthread_mutex_init(&levelmeter_mutex, NULL); levelmeter_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(levelmeter_win), "Levelmeter"); gtk_widget_set_usize(levelmeter_win, 255, 40); gtk_window_set_wmclass (GTK_WINDOW(levelmeter_win), "Levelmeter", "AlsaPlayer"); gtk_window_set_policy (GTK_WINDOW (levelmeter_win), FALSE, FALSE, FALSE); gtk_widget_set_events(levelmeter_win, GDK_BUTTON_PRESS_MASK); gtk_widget_realize(levelmeter_win); gc = gdk_gc_new(levelmeter_win->window); if (!gc) return NULL; color.red = SCOPE_BG_RED << 8; color.blue = SCOPE_BG_BLUE << 8; color.green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), &color); gint depth = gdk_visual_get_system()->depth; // draw_pixmap = gdk_pixmap_new(levelmeter_win->window, 256,40, gdk_visual_get_best_depth()); // disp = gdk_pixmap_new(levelmeter_win->window, 256, 18, gdk_visual_get_best_depth()); draw_pixmap = gdk_pixmap_new(levelmeter_win->window, 256,40, depth); disp = gdk_pixmap_new(levelmeter_win->window, 256, 18, depth); for (i = 0; i < 256; i+=4) { if (i < 128) { col.red = (i<<1) << 8; col.green = 255 << 8; col.blue = 0; } else { col.red = 255 << 8; col.green = (255 - (i << 1)) << 8; col.blue = 0; } gdk_color_alloc(gdk_colormap_get_system(), &col); gdk_gc_set_foreground(gc,&col); gdk_draw_line(disp,gc,i,0,i,18); gdk_draw_line(disp,gc,i+1,0,i+1,18); gdk_draw_line(disp,gc,i+2,0,i+2,18); gdk_gc_set_foreground(gc,&color); gdk_draw_line(disp,gc,i+3,0,i+3,18); } gdk_color_black(gdk_colormap_get_system(),&col); gdk_gc_set_foreground(gc,&col); area = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(levelmeter_win), area); gtk_widget_realize(area); gdk_window_set_background(area->window, &color); gdk_window_clear(area->window); gtk_widget_show(area); // Signals gtk_signal_connect(GTK_OBJECT(levelmeter_win), "delete_event", GTK_SIGNAL_FUNC(close_levelmeter_window), levelmeter_win); gtk_signal_connect(GTK_OBJECT(levelmeter_win), "button_press_event", GTK_SIGNAL_FUNC(popup), levelmeter_win); // Create sin/cos tables for (i = 0; i < 256; i++) { scX[i] = (char) (sin(((2*M_PI)/255)*i)*128); scY[i] = (char) (-cos(((2*M_PI)/255)*i)*128); } return levelmeter_win; } void levelmeter_hide(void) { gint x, y; if (scope_win) { gdk_window_get_root_origin(scope_win->window, &x, &y); gtk_widget_hide(scope_win); gtk_widget_set_uposition(scope_win, x, y); } } static void stop_levelmeter(void) { if (running) { running = 0; pthread_join(levelmeter_thread, NULL); } } static void run_levelmeter(void *data) { nice(SCOPE_NICE); the_levelmeter(scope_win); pthread_mutex_unlock(&levelmeter_mutex); pthread_exit(NULL); } static void start_levelmeter(void) { if (!is_init) { scope_win = init_levelmeter_window(); if (!scope_win) return; is_init = 1; } if (pthread_mutex_trylock(&levelmeter_mutex) != 0) { printf("levelmeter already running\n"); return; } gtk_widget_show(scope_win); pthread_create(&levelmeter_thread, NULL, (void * (*)(void *))run_levelmeter, NULL); } static int init_levelmeter(void *arg) { if (prefs_get_bool(ap_prefs, "levelmeter", "active", 0)) start_levelmeter(); return 1; } static void shutdown_levelmeter(void) { prefs_set_bool(ap_prefs, "levelmeter", "active", levelmeter_running()); stop_levelmeter(); if (disp) { gdk_pixmap_unref(disp); } if (draw_pixmap) { gdk_pixmap_unref(draw_pixmap); } if (area) { gtk_widget_destroy(area); area = NULL; } if (gc) { gdk_gc_destroy(gc); gc = NULL; } if (scope_win) { gtk_widget_destroy(scope_win); scope_win = NULL; } } static int levelmeter_running() { return running; } scope_plugin levelmeter_plugin = { SCOPE_PLUGIN_VERSION, "Levelmeter", "Andy Lo A Foe", NULL, init_levelmeter, start_levelmeter, levelmeter_running, stop_levelmeter, shutdown_levelmeter, levelmeter_set_data, NULL }; scope_plugin *scope_plugin_info(void) { return &levelmeter_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/logbarfft/000077500000000000000000000000001466261456500247365ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/logbarfft/Makefile.am000066400000000000000000000010111466261456500267630ustar00rootroot00000000000000if HAVE_GTK logbarfftltlibs = liblogbarfft.la logbarfftldflags = -export-dynamic -avoid-version @GTK_LIBS@ logbarfftsources = logbarfft.c lib_LTLIBRARIES = $(logbarfftltlibs) else logbarfftltlibs = logbarfftldflags = logbarfftsources = endif AM_CFLAGS = -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ -I$(top_srcdir)/app/scopes \ @ARCH_CFLAGS@ @GTK_CFLAGS@ @DFLAGS@ libdir = $(ADDON_DIR)/scopes liblogbarfft_la_LDFLAGS = $(logbarfftldflags) LIBS = liblogbarfft_la_SOURCES= $(logbarfftsources) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/logbarfft/logbarfft.c000066400000000000000000000141601466261456500270520ustar00rootroot00000000000000/* barfft.cpp * Copyright (C) 1999-2002 Andy Lo A Foe * Based on code by Richard Boulton * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "scope_config.h" #include "prefs.h" #define BARS 16 static GtkWidget *area = NULL; static GdkRgbCmap *color_map = NULL; static int fft_buf[512]; static int maxbar[BARS]; static GtkWidget *scope_win = NULL; static int ready_state = 0; static pthread_t fftscope_thread; static pthread_mutex_t fftscope_mutex; static int is_init = 0; static int running = 0; #if 0 static int xranges[] = {1, 2, 3, 4, 6, 8, 11, 15, 21, 29, 40, 54, 74, 101, 137, 187, 255}; #endif #if 0 static int xranges[] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 15, 17, 19, 21, 23, 25, 29, 33, 37, 40, 44, 48, 54, 61, 67, 74, 90, 101, 137, 158, 187, 255}; #endif static int xranges[] = {0, 1, 2, 3, 5, 7, 10, 14, 20, 28, 40, 54, 74, 101, 137, 187, 255}; static void fftscope_hide(void); static int fftscope_running(void); static const int default_colors[] = { 10, 20, 30, 230, 230, 230 }; void logscope_set_fft(void *fft_data, int samples, int channels) { if (!fft_data) { memset(fft_buf, 0, sizeof(fft_buf)); return; } memcpy(fft_buf, fft_data, sizeof(int) * samples * channels); } static void the_fftscope(void) { guchar *loc; guchar bits [256 * 129]; int i, h; running = 1; while (running) { guint val; gint j; gint k; memset(bits, 0, 256 * 128); for (i=0; i < BARS; i++) { val = 0; for (j = xranges[i]; j < xranges[i + 1]; j++) { /* k = (guint)(sqrt(fftout[j]) * fftmult); */ k = (fft_buf[j] + fft_buf[256+j]) / 256; val += k; } if(val > 127) val = 127; if (val > (guint)maxbar[ i ]) maxbar[ i ] = val; else { k = maxbar[ i ] - (4 + (8 / (128 - maxbar[ i ]))); val = k > 0 ? k : 0; maxbar[ i ] = val; } loc = bits + 256 * 128; for (h = val; h > 0; h--) { for (j = (256 / BARS) * i + 0; j < (256 / BARS) * i + ((256 / BARS) - 1); j++) { *(loc + j) = val-h; } loc -=256; } } GDK_THREADS_ENTER(); gdk_draw_indexed_image(area->window, area->style->white_gc, 0,0,256,128, GDK_RGB_DITHER_NONE, bits, 256, color_map); gdk_flush(); GDK_THREADS_LEAVE(); dosleep(SCOPE_SLEEP); } GDK_THREADS_ENTER(); fftscope_hide(); GDK_THREADS_LEAVE(); } static void stop_fftscope(void); static gboolean close_fftscope_window(GtkWidget *widget, GdkEvent *event, gpointer data) { GDK_THREADS_LEAVE(); stop_fftscope(); GDK_THREADS_ENTER(); return TRUE; } static GtkWidget *init_fftscope_window(void) { GtkWidget *fftscope_win; GdkColor color; guint32 colors[129]; int i; pthread_mutex_init(&fftscope_mutex, NULL); fftscope_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(fftscope_win), "logFFTscope"); gtk_widget_set_usize(fftscope_win, 256,128); gtk_window_set_wmclass (GTK_WINDOW(fftscope_win), "logFFTscope", "AlsaPlayer"); gtk_window_set_policy (GTK_WINDOW (fftscope_win), FALSE, FALSE, FALSE); gtk_widget_realize(fftscope_win); color.red = SCOPE_BG_RED << 8; color.blue = SCOPE_BG_BLUE << 8; color.green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), &color); colors[0] = 0; for (i = 1; i < 64; i++) { colors[i] = ((i*4) << 16) + (255 << 8); colors[i + 63] = (255 << 16) + (((63 - i) * 4) << 8); } color_map = gdk_rgb_cmap_new(colors, 128); area = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(fftscope_win), area); gtk_widget_realize(area); gdk_window_set_background(area->window, &color); gtk_widget_show(area); gtk_widget_show(fftscope_win); gtk_signal_connect(GTK_OBJECT(fftscope_win), "delete_event", GTK_SIGNAL_FUNC(close_fftscope_window), fftscope_win); ready_state = 1; return fftscope_win; } static void fftscope_hide(void) { gint x, y; if (scope_win) { gdk_window_get_root_origin(scope_win->window, &x, &y); gtk_widget_hide(scope_win); gtk_widget_set_uposition(scope_win, x, y); } } static void stop_fftscope(void) { if (running) { running = 0; pthread_join(fftscope_thread, NULL); } } static void run_fftscope(void *data) { nice(SCOPE_NICE); /* Be nice to most processes */ the_fftscope(); pthread_mutex_unlock(&fftscope_mutex); pthread_exit(NULL); } static void start_fftscope(void) { if (!is_init) { is_init = 1; scope_win = init_fftscope_window(); } if (pthread_mutex_trylock(&fftscope_mutex) != 0) { printf("fftscope already running\n"); return; } gtk_widget_show(scope_win); pthread_create(&fftscope_thread, NULL, (void * (*)(void *))run_fftscope, NULL); } static int init_fftscope(void *arg) { int i; for (i = 0; i < BARS; i++) { maxbar[ i ] = 0; } if (prefs_get_bool(ap_prefs, "logbarfft", "active", 0)) start_fftscope(); return 1; } static void shutdown_fftscope(void) { prefs_set_bool(ap_prefs, "logbarfft", "active", fftscope_running()); if (fftscope_running()) stop_fftscope(); } static int fftscope_running(void) { return running; } scope_plugin logscope_plugin = { SCOPE_PLUGIN_VERSION, "logFFTscope", "Andy Lo A Foe", NULL, init_fftscope, start_fftscope, fftscope_running, stop_fftscope, shutdown_fftscope, NULL, logscope_set_fft, }; scope_plugin *scope_plugin_info(void) { return &logscope_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/mesh/000077500000000000000000000000001466261456500237245ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/mesh/Makefile.am000066400000000000000000000006171466261456500257640ustar00rootroot00000000000000meshltlibs = libmesh.la meshldflags = -export-dynamic -avoid-version @GTK_LIBS@ meshsources = mesh.c trackball.c trackball.h lib_LTLIBRARIES = $(meshltlibs) AM_CFLAGS = -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @ARCH_CFLAGS@ @GTK_CFLAGS@ -lgtkgl -lGL -lGLU @DFLAGS@ libdir = $(ADDON_DIR)/scopes libmesh_la_LDFLAGS = $(meshldflags) LIBS = libmesh_la_SOURCES= $(meshsources) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/mesh/mesh.c000066400000000000000000000160331466261456500250270ustar00rootroot00000000000000#include "trackball.h" #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef MIN #define MIN(a, b) (((a) > (b)) ? (a) : (b)) #endif #ifndef MAX #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif Display *meshscope_dpy = NULL; static float val[NUMOLD][NUMBARS]; static Colormap colormap = 0; static Atom wm_delete_window_atom; static GLXContext glxcontext = NULL; static pthread_t meshscope_thread; static pthread_mutex_t meshscope_mutex; static int running = 0; Window meshscope_win; static int is_init = 0; float meshscope_curquat[4]; GLfloat lightZeroPosition[] = {0.0, 0.0, 0.0, 1.0}; GLfloat lightZeroColor[] = {1.0, 1.0, 1.0, 1.0}; static int lighting = 1; static int solid = 1; static int fft_buf[512]; void stop_meshscope () { running = 0; pthread_join(meshscope_thread, NULL); } void meshscope_set_fft (void *fft_data, int samples, int channels) { if (!fft_data || (samples * channels) > 512) { memset (fft_buf, 0, sizeof (fft_buf)); return; } memcpy(fft_buf, fft_data, sizeof(int) * samples * channels); } static Window create_window (int width, int height) { int attr_list[] = {GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None}; int scrnum; XSetWindowAttributes attr; unsigned long mask; Window root, win; XVisualInfo *visinfo; Atom wm_protocols[1]; scrnum = DefaultScreen (meshscope_dpy); root = RootWindow (meshscope_dpy, scrnum); visinfo = glXChooseVisual (meshscope_dpy, scrnum, attr_list); if (!visinfo) return 0; attr.background_pixel = 0; attr.border_pixel = 0; attr.colormap = colormap = XCreateColormap (meshscope_dpy, root, visinfo->visual, AllocNone); attr.event_mask = StructureNotifyMask | KeyPressMask; mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; win = XCreateWindow (meshscope_dpy, root, 0, 0, width, height, 0, visinfo->depth, InputOutput, visinfo->visual, mask, &attr); XmbSetWMProperties(meshscope_dpy, win, "OpenGL MESH Plugin", "OpenGL MESH Plugin", NULL, 0, NULL, NULL, NULL); wm_delete_window_atom = wm_protocols[0] = XInternAtom (meshscope_dpy, "WM_DELETE_WINDOW", False); XSetWMProtocols (meshscope_dpy, win, wm_protocols, 1); glxcontext = glXCreateContext (meshscope_dpy, visinfo, NULL, True); glXMakeCurrent (meshscope_dpy, win, glxcontext); XMapWindow (meshscope_dpy, win); XFlush (meshscope_dpy); printf("Window created...\n"); return win; } void initGL () { glXMakeCurrent (meshscope_dpy, meshscope_win, glxcontext); trackball (meshscope_curquat, 0.0, 0.0, 0.0, 0.0); if (lighting) { glEnable (GL_LIGHTING); glLightModeli (GL_LIGHT_MODEL_LOCAL_VIEWER, 1); glLightfv (GL_LIGHT0, GL_POSITION, lightZeroPosition); glLightfv (GL_LIGHT0, GL_DIFFUSE, lightZeroColor); glEnable (GL_LIGHT0); } else { glDisable (GL_LIGHTING); } glMatrixMode (GL_PROJECTION); glMatrixMode (GL_PROJECTION); gluPerspective ( /* field of view in degree */ 40.0, /* aspect ratio */ 1.0, /* Z near */ 1.0, /* Z far */ 100.0); glMatrixMode (GL_MODELVIEW); gluLookAt (0.0, 20.0, 35.0, /* eye is at (0,0,30) */ 0.0, 0.0, 0.0, /* center is at (0,0,0) */ 0.0, 1.0, 0.0); /* up is in positive Y direction */ glPushMatrix (); /* dummy push so we can pop on model recalc */ glLineWidth (1.0); if (!solid) glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glEnable (GL_DEPTH_TEST); printf("initGL done...\n"); } Window create_meshscope_window () { meshscope_dpy = XOpenDisplay (NULL); meshscope_win = create_window(MESH_W, MESH_H); printf("create_meshscope_window done...\n"); return meshscope_win; } void drawMesh () { int i, j, k, m; static unsigned short l = NUMOLD; float f, g, color[3]; glXMakeCurrent (meshscope_dpy, meshscope_win, glxcontext); /* Draw simple triangle */ glClearColor (0, 0, 0, 1); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glColor3f (1, 1, 1); for (i = 1; i < NUMSAMPLES - 1; i += STEPSIZE) { glBegin (PRIMITIVES); k = i / STEPSIZE+1; for (j = i, val[l % NUMOLD][k] = 0; j < i + STEPSIZE; j++) { f = fft_buf[j]; if (f > val[l % NUMOLD][k]) val[l % NUMOLD][k] = f; } if (val[l % NUMOLD][k] > 127.0) val[l % NUMOLD][k] = 127.0; if (val[l % NUMOLD][k] < 0.0) val[l % NUMOLD][k] = 0.0; for (m = 0; m < NUMOLD; m++) { g = (float) (val[(l - m) % NUMOLD][k]) / 127.0 * 2.0; color[0] = MAX (g - 1.0, 0.0); color[2] = MIN (2.0 - g, 1.0); if (lighting) glMaterialfv (GL_FRONT, GL_DIFFUSE, color); else glColor3f (color[0], color[1], color[2]); glVertex3f ((float) i / (float) NUMSAMPLES * 20.0 - 10.0, val[(l - m) % NUMOLD][k] / 12.8, (5 - m) * 2); g = (float) (val[(l - m) % NUMOLD][k - 1]) / 127.0 * 2.0; color[0] = MAX (g - 1.0, 0.0); color[2] = MIN (2.0 - g, 1.0); if (lighting) glMaterialfv (GL_FRONT, GL_DIFFUSE, color); else glColor3f (color[0], color[1], color[2]); glVertex3f ((float) (i - STEPSIZE) / (float) NUMSAMPLES * 20.0 - 10.0, val[(l - m) % NUMOLD][k - 1] / 12.8, (5 - m) * 2); } glEnd (); } /* Swap backbuffer to front */ glXSwapBuffers (meshscope_dpy, meshscope_win); l++; } static void meshscope(Window *win) { Bool configured = FALSE; while (running) { while (XPending (meshscope_dpy)) { XEvent event; XNextEvent (meshscope_dpy, &event); switch (event.type) { case ConfigureNotify: glViewport (0, 0, event.xconfigure.width, event.xconfigure.height); configured = TRUE; break; case ButtonPress: mousepress(event); break; case ButtonRelease: mouserelease(event); break; case MotionNotify: mousemove(event); break; default: printf("event %x\n", event.type); break; } } drawMesh (); animate(); dosleep (25000); } } void run_meshscope (void *data) { int i; nice (SCOPE_NICE); printf("Going to create window...\n"); create_meshscope_window (); printf("Going to initGL...\n"); initGL (); memset(&val, 0, sizeof(val)); // reset printf("going to run...\n"); meshscope(&meshscope_win); pthread_mutex_unlock (&meshscope_mutex); pthread_exit(NULL); } void start_meshscope (void *data) { if (pthread_mutex_trylock (&meshscope_mutex) != 0) { printf ("meshscope already running\n"); return; } running = 1; printf("Going to spawn thread...\n"); pthread_create (&meshscope_thread, NULL, (void *(*)(void *)) run_meshscope, data); } static int init_meshscope () { pthread_mutex_init (&meshscope_mutex, NULL); memset (fft_buf, 0, sizeof (fft_buf)); return 1; } static void shutdown_meshscope () { } static int meshscope_running () { return running; } scope_plugin meshscope_plugin = { SCOPE_PLUGIN_VERSION, {"Meshscope"}, {"Stefan Eilemann & Andy Lo A Foe"}, NULL, init_meshscope, start_meshscope, meshscope_running, stop_meshscope, shutdown_meshscope, NULL, meshscope_set_fft }; scope_plugin *scope_plugin_info () { return &meshscope_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/mesh/trackball.c000066400000000000000000000243711466261456500260360ustar00rootroot00000000000000#include "trackball.h" /* * (c) Copyright 1993, 1994, Silicon Graphics, Inc. * ALL RIGHTS RESERVED * Permission to use, copy, modify, and distribute this software for * any purpose and without fee is hereby granted, provided that the above * copyright notice appear in all copies and that both the copyright notice * and this permission notice appear in supporting documentation, and that * the name of Silicon Graphics, Inc. not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission. * * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. * * US Government Users Restricted Rights * Use, duplication, or disclosure by the Government is subject to * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph * (c)(1)(ii) of the Rights in Technical Data and Computer Software * clause at DFARS 252.227-7013 and/or in similar or successor * clauses in the FAR or the DOD or NASA FAR Supplement. * Unpublished-- rights reserved under the copyright laws of the * United States. Contractor/manufacturer is Silicon Graphics, * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. * * OpenGL(TM) is a trademark of Silicon Graphics, Inc. */ /* * Trackball code: * * Implementation of a virtual trackball. * Implemented by Gavin Bell, lots of ideas from Thant Tessman and * the August '88 issue of Siggraph's "Computer Graphics," pp. 121-129. * * Vector manip code: * * Original code from: * David M. Ciemiewicz, Mark Grossman, Henry Moreton, and Paul Haeberli * * Much mucking with by: * Gavin Bell */ #if defined(_WIN32) #pragma warning (disable:4244) /* disable bogus conversion warnings */ #endif #include /* * This size should really be based on the distance from the center of * rotation to the point on the object underneath the mouse. That * point would then track the mouse as closely as possible. This is a * simple example, though, so that is left as an Exercise for the * Programmer. */ #define TRACKBALLSIZE (0.8f) int scaling; float scalefactor = 1.0; int beginx, beginy; float lastquat[4]; int newModel = 1; int W = 300, H = 300; int button1down=0; int x,y; /* * Local function prototypes (not defined in trackball.h) */ static float tb_project_to_sphere(float, float, float); static void normalize_quat(float [4]); void vzero(float *v) { v[0] = 0.0; v[1] = 0.0; v[2] = 0.0; } void vset(float *v, float x, float y, float z) { v[0] = x; v[1] = y; v[2] = z; } void vsub(const float *src1, const float *src2, float *dst) { dst[0] = src1[0] - src2[0]; dst[1] = src1[1] - src2[1]; dst[2] = src1[2] - src2[2]; } void vcopy(const float *v1, float *v2) { register int i; for (i = 0 ; i < 3 ; i++) v2[i] = v1[i]; } void vcross(const float *v1, const float *v2, float *cross) { float temp[3]; temp[0] = (v1[1] * v2[2]) - (v1[2] * v2[1]); temp[1] = (v1[2] * v2[0]) - (v1[0] * v2[2]); temp[2] = (v1[0] * v2[1]) - (v1[1] * v2[0]); vcopy(temp, cross); } float vlength(const float *v) { return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); } void vscale(float *v, float div) { v[0] *= div; v[1] *= div; v[2] *= div; } void vnormal(float *v) { vscale(v,1.0/vlength(v)); } float vdot(const float *v1, const float *v2) { return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]; } void vadd(const float *src1, const float *src2, float *dst) { dst[0] = src1[0] + src2[0]; dst[1] = src1[1] + src2[1]; dst[2] = src1[2] + src2[2]; } /* * Ok, simulate a track-ball. Project the points onto the virtual * trackball, then figure out the axis of rotation, which is the cross * product of P1 P2 and O P1 (O is the center of the ball, 0,0,0) * Note: This is a deformed trackball-- is a trackball in the center, * but is deformed into a hyperbolic sheet of rotation away from the * center. This particular function was chosen after trying out * several variations. * * It is assumed that the arguments to this routine are in the range * (-1.0 ... 1.0) */ void trackball(float q[4], float p1x, float p1y, float p2x, float p2y) { float a[3]; /* Axis of rotation */ float phi; /* how much to rotate about axis */ float p1[3], p2[3], d[3]; float t; if (p1x == p2x && p1y == p2y) { /* Zero rotation */ vzero(q); q[3] = 1.0; return; } /* * First, figure out z-coordinates for projection of P1 and P2 to * deformed sphere */ vset(p1,p1x,p1y,tb_project_to_sphere(TRACKBALLSIZE,p1x,p1y)); vset(p2,p2x,p2y,tb_project_to_sphere(TRACKBALLSIZE,p2x,p2y)); /* * Now, we want the cross product of P1 and P2 */ vcross(p2,p1,a); /* * Figure out how much to rotate around that axis. */ vsub(p1,p2,d); t = vlength(d) / (2.0*TRACKBALLSIZE); /* * Avoid problems with out-of-control values... */ if (t > 1.0) t = 1.0; if (t < -1.0) t = -1.0; phi = 2.0 * asin(t); axis_to_quat(a,phi,q); } /* * Given an axis and angle, compute quaternion. */ void axis_to_quat(float a[3], float phi, float q[4]) { vnormal(a); vcopy(a,q); vscale(q,sin(phi/2.0)); q[3] = cos(phi/2.0); } /* * Project an x,y pair onto a sphere of radius r OR a hyperbolic sheet * if we are away from the center of the sphere. */ static float tb_project_to_sphere(float r, float x, float y) { float d, t, z; d = sqrt(x*x + y*y); if (d < r * 0.70710678118654752440) { /* Inside sphere */ z = sqrt(r*r - d*d); } else { /* On hyperbola */ t = r / 1.41421356237309504880; z = t*t / d; } return z; } /* * Given two rotations, e1 and e2, expressed as quaternion rotations, * figure out the equivalent single rotation and stuff it into dest. * * This routine also normalizes the result every RENORMCOUNT times it is * called, to keep error from creeping in. * * NOTE: This routine is written so that q1 or q2 may be the same * as dest (or each other). */ #define RENORMCOUNT 97 void add_quats(float q1[4], float q2[4], float dest[4]) { static int count=0; float t1[4], t2[4], t3[4]; float tf[4]; #if 0 printf("q1 = %f %f %f %f\n", q1[0], q1[1], q1[2], q1[3]); printf("q2 = %f %f %f %f\n", q2[0], q2[1], q2[2], q2[3]); #endif vcopy(q1,t1); vscale(t1,q2[3]); vcopy(q2,t2); vscale(t2,q1[3]); vcross(q2,q1,t3); vadd(t1,t2,tf); vadd(t3,tf,tf); tf[3] = q1[3] * q2[3] - vdot(q1,q2); #if 0 printf("tf = %f %f %f %f\n", tf[0], tf[1], tf[2], tf[3]); #endif dest[0] = tf[0]; dest[1] = tf[1]; dest[2] = tf[2]; dest[3] = tf[3]; if (++count > RENORMCOUNT) { count = 0; normalize_quat(dest); } } /* * Quaternions always obey: a^2 + b^2 + c^2 + d^2 = 1.0 * If they don't add up to 1.0, dividing by their magnitued will * renormalize them. * * Note: See the following for more information on quaternions: * * - Shoemake, K., Animating rotation with quaternion curves, Computer * Graphics 19, No 3 (Proc. SIGGRAPH'85), 245-254, 1985. * - Pletinckx, D., Quaternion calculus as a basic tool in computer * graphics, The Visual Computer 5, 2-13, 1989. */ static void normalize_quat(float q[4]) { int i; float mag; mag = sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3]); for (i = 0; i < 4; i++) q[i] /= mag; } /* * Build a rotation matrix, given a quaternion rotation. * */ void build_rotmatrix(float m[4][4], float q[4]) { m[0][0] = 1.0 - 2.0 * (q[1] * q[1] + q[2] * q[2]); m[0][1] = 2.0 * (q[0] * q[1] - q[2] * q[3]); m[0][2] = 2.0 * (q[2] * q[0] + q[1] * q[3]); m[0][3] = 0.0; m[1][0] = 2.0 * (q[0] * q[1] + q[2] * q[3]); m[1][1]= 1.0 - 2.0 * (q[2] * q[2] + q[0] * q[0]); m[1][2] = 2.0 * (q[1] * q[2] - q[0] * q[3]); m[1][3] = 0.0; m[2][0] = 2.0 * (q[2] * q[0] - q[1] * q[3]); m[2][1] = 2.0 * (q[1] * q[2] + q[0] * q[3]); m[2][2] = 1.0 - 2.0 * (q[1] * q[1] + q[0] * q[0]); m[2][3] = 0.0; m[3][0] = 0.0; m[3][1] = 0.0; m[3][2] = 0.0; m[3][3] = 1.0; } int spinning = 0, moving = 0, anim=0; void motion(int x, int y) { if (scaling) { scalefactor = scalefactor * (1.0 + (((float) (beginy - y)) / H)); beginx = x; beginy = y; newModel = 1; gdk_threads_enter(); glXSwapBuffers(meshscope_dpy,meshscope_win); gdk_threads_leave(); return; } if (moving) { trackball(lastquat, (2.0 * beginx - W) / W, (H - 2.0 * beginy) / H, (2.0 * x - W) / W, (H - 2.0 * y) / H ); beginx = x; beginy = y; spinning = 1; anim=1; } } void mousepress(XEvent event){ if (event.xbutton.button == 1) { spinning = 0; anim=0; moving = 1; beginx = x; beginy = y; button1down = 1; } } void mousemove(XEvent event){ if (button1down) { scaling = 1; } else { scaling = 0; } } void mouserelease(XEvent event){ if (event.xbutton.button == 1 ) { moving = 0; button1down = 0; } } /*void vis(int visible) { if (visible == GLUT_VISIBLE) { if (spinning) anim=1; } else { if (spinning) anim=0; } }*/ void animate(void) { if (!anim) return; add_quats(lastquat, meshscope_curquat, meshscope_curquat); newModel = 1; glXSwapBuffers(meshscope_dpy,meshscope_win); } void idleFunc (void){ if (anim) animate(); while(XPending(meshscope_dpy)) { XEvent event; KeySym keysym; char buf[16]; XNextEvent(meshscope_dpy, &event); switch(event.type) { case ConfigureNotify: break; case KeyPress: exit(17); break; } fprintf(stderr,"1-\n"); } } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/mesh/trackball.h000066400000000000000000000100611466261456500260320ustar00rootroot00000000000000/* * (c) Copyright 1993, 1994, Silicon Graphics, Inc. * ALL RIGHTS RESERVED * Permission to use, copy, modify, and distribute this software for * any purpose and without fee is hereby granted, provided that the above * copyright notice appear in all copies and that both the copyright notice * and this permission notice appear in supporting documentation, and that * the name of Silicon Graphics, Inc. not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission. * * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. * * US Government Users Restricted Rights * Use, duplication, or disclosure by the Government is subject to * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph * (c)(1)(ii) of the Rights in Technical Data and Computer Software * clause at DFARS 252.227-7013 and/or in similar or successor * clauses in the FAR or the DOD or NASA FAR Supplement. * Unpublished-- rights reserved under the copyright laws of the * United States. Contractor/manufacturer is Silicon Graphics, * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. * * OpenGL(TM) is a trademark of Silicon Graphics, Inc. */ /* * trackball.h * A virtual trackball implementation * Written by Gavin Bell for Silicon Graphics, November 1988. */ #include "scope_plugin.h" #include #include #include #include #include #ifdef HAVE_XMESAFINDBUFFER #include #endif #include #include #include #include #include #include #include #include #include #include #include #define MESH_W 440 #define MESH_H 300 #define NUMSAMPLES (512 / 2 + 1) #define STEPSIZE (NUMSAMPLES/NUMBARS) #define NUMBARS 32 #define NUMOLD 18 #define PRIMITIVES (solid ? GL_TRIANGLE_STRIP : GL_QUAD_STRIP) #undef SCOPE_SLEEP #define SCOPE_SLEEP 10000 /* * Pass the x and y coordinates of the last and current positions of * the mouse, scaled so they are from (-1.0 ... 1.0). * * The resulting rotation is returned as a quaternion rotation in the * first paramater. */ void trackball(float q[4], float p1x, float p1y, float p2x, float p2y); /* * Given two quaternions, add them together to get a third quaternion. * Adding quaternions to get a compound rotation is analagous to adding * translations to get a compound translation. When incrementally * adding rotations, the first argument here should be the new * rotation, the second and third the total rotation (which will be * over-written with the resulting new total rotation). */ void add_quats(float *q1, float *q2, float *dest); /* * A useful function, builds a rotation matrix in Matrix based on * given quaternion. */ void build_rotmatrix(float m[4][4], float q[4]); /* * This function computes a quaternion based on an axis (defined by * the given vector) and an angle about which to rotate. The angle is * expressed in radians. The result is put into the third argument. */ void axis_to_quat(float a[3], float phi, float q[4]); void idleFunc(void); void mousepress(XEvent event); void mouserelease(XEvent event); void mousemove(XEvent event); extern Window meshscope_win; extern Display *meshscope_dpy; extern float meshscope_curquat[4]; void animate(void); alsaplayer-0.99.82/attic/experimental/obsolete/scopes/monoscope/000077500000000000000000000000001466261456500247725ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/monoscope/Makefile.am000066400000000000000000000007521466261456500270320ustar00rootroot00000000000000if HAVE_GTK monoscopeltlibs = libmonoscope.la monoscopeldflags = -export-dynamic -avoid-version @GTK_LIBS@ monoscopesources = monoscope.c lib_LTLIBRARIES = $(monoscopeltlibs) else monoscopeltlibs = monoscopeldflags = monoscopesources = endif libdir = $(ADDON_DIR)/scopes AM_CFLAGS = -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @ARCH_CFLAGS@ @GTK_CFLAGS@ @DFLAGS@ libmonoscope_la_LDFLAGS = $(monoscopeldflags) LIBS = libmonoscope_la_SOURCES= $(monoscopesources) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/monoscope/monoscope.c000066400000000000000000000170331466261456500271440ustar00rootroot00000000000000/* monoscope.h * Copyright (C) 1998-2002 Andy Lo A Foe * Original code by Tinic Uro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: monoscope.c 1017 2003-11-09 13:28:30Z adnans $ */ #include #include #include #include #include #include #include #include #include #include #include #include #include "scope_config.h" #include "prefs.h" #include "alsaplayer_convolve.h" #include "alsaplayer_error.h" short newEq[CONVOLVE_BIG]; /* latest block of 512 samples. */ static short copyEq[CONVOLVE_BIG]; int avgEq[CONVOLVE_SMALL]; /* a running average of the last few. */ int avgMax; /* running average of max sample. */ static GtkWidget *area = NULL; static GtkWidget *scope_win = NULL; static GdkRgbCmap *color_map = NULL; static int ready_state = 0; static pthread_t monoscope_thread; static pthread_mutex_t monoscope_mutex; static pthread_mutex_t update_mutex; static int is_init = 0; static int running = 0; static convolve_state *state = NULL; static void monoscope_hide(void); static int monoscope_running(void); static const int default_colors[] = { 10, 20, 30, 230, 230, 230 }; void monoscope_set_data(void *audio_buffer, int size) { int i; short *sound = (short *)audio_buffer; if (pthread_mutex_trylock(&update_mutex) != 0) { /* alsaplayer_error("missing an update"); */ return; } if (!sound) { memset(&newEq, 0, sizeof(newEq)); pthread_mutex_unlock(&update_mutex); return; } if (running && size >= CONVOLVE_BIG) { short * newset = newEq; int skip = (size / (CONVOLVE_BIG * 2)) * 2; for (i = 0; i < CONVOLVE_BIG; i++) { *newset++ = (((int) sound[0]) + (int) sound[1]) >> 1; sound += skip; } } pthread_mutex_unlock(&update_mutex); } void the_monoscope() { int foo; int bar; int i, h; guchar bits[ 257 * 129]; guchar *loc; running = 1; while (running) { int factor; int val; int max = 1; short * thisEq; pthread_mutex_lock(&update_mutex); memcpy (copyEq, newEq, sizeof (short) * CONVOLVE_BIG); thisEq = copyEq; #if 1 val = convolve_match (avgEq, copyEq, state); thisEq += val; #endif pthread_mutex_unlock(&update_mutex); memset(bits, 0, 256 * 128); for (i=0; i < 256; i++) { foo = thisEq[i] + (avgEq[i] >> 1); avgEq[i] = foo; if (foo < 0) foo = -foo; if (foo > max) max = foo; } avgMax += max - (avgMax >> 8); if (avgMax < max) avgMax = max; /* Avoid overflow */ factor = 0x7fffffff / avgMax; /* Keep the scaling sensible. */ if (factor > (1 << 18)) factor = 1 << 18; if (factor < (1 << 8)) factor = 1 << 8; for (i=0; i < 256; i++) { foo = avgEq[i] * factor; foo >>= 18; if (foo > 63) foo = 63; if (foo < -64) foo = -64; val = (i + ((foo+64) << 8)); bar = val; if ((bar > 0) && (bar < (256 * 128))) { loc = bits + bar; if (foo < 0) { for (h = 0; h <= (-foo); h++) { *loc = h; loc+=256; } } else { for (h = 0; h <= foo; h++) { *loc = h; loc-=256; } } } } for (i=16;i < 128; i+=16) { for (h = 0; h < 256; h+=2) { bits[(i << 8) + h] = 63; if (i == 64) bits[(i << 8) + h + 1] = 63; } } for (i = 16; i < 256; i+=16) { for (h = 0; h < 128; h+=2) { bits[i + (h << 8)] = 63; } } GDK_THREADS_ENTER(); gdk_draw_indexed_image(area->window,area->style->white_gc, 0, 0, 256, 128, GDK_RGB_DITHER_NONE, bits, 256, color_map); gdk_flush(); GDK_THREADS_LEAVE(); dosleep(SCOPE_SLEEP); } GDK_THREADS_ENTER(); monoscope_hide(); gdk_flush(); GDK_THREADS_LEAVE(); } static void test_cb(GtkWidget *widget, gpointer data) { printf("Woah!\n"); } void stop_monoscope(void); static gboolean close_monoscope_window(GtkWidget *widget, GdkEvent *event, gpointer data) { GDK_THREADS_LEAVE(); stop_monoscope(); GDK_THREADS_ENTER(); return TRUE; } GtkWidget *init_monoscope_window(void) { GtkWidget *monoscope_win; GdkColor color; guint32 colors[65]; int i; pthread_mutex_init(&monoscope_mutex, NULL); pthread_mutex_init(&update_mutex, NULL); monoscope_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(monoscope_win), "Monoscope"); gtk_widget_set_usize(monoscope_win, 256,128); gtk_window_set_wmclass (GTK_WINDOW(monoscope_win), "Monoscope", "AlsaPlayer"); gtk_window_set_policy (GTK_WINDOW (monoscope_win), FALSE, FALSE, FALSE); gtk_widget_realize(monoscope_win); color.red = SCOPE_BG_RED << 8; color.blue = SCOPE_BG_BLUE << 8; color.green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), &color); colors[0] = 0; for (i = 1; i < 32; i++) { colors[i] = (i*8 << 16) +(255 << 8); colors[i+31] = (255 << 16) + (((31 - i) * 8) << 8); } colors[63] = (40 << 16) + (75 << 8); color_map = gdk_rgb_cmap_new(colors, 64); area = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(monoscope_win), area); gtk_widget_realize(area); gdk_window_set_background(area->window, &color); gtk_widget_show(area); gtk_widget_show(monoscope_win); /* Signals */ gtk_signal_connect(GTK_OBJECT(monoscope_win), "delete_event", GTK_SIGNAL_FUNC(close_monoscope_window), monoscope_win); ready_state = 1; return monoscope_win; } void monoscope_hide(void) { gint x, y; if (scope_win) { gdk_window_get_root_origin(scope_win->window, &x, &y); gtk_widget_hide(scope_win); gtk_widget_set_uposition(scope_win, x, y); } else { printf("Tried to hide destroyed widget!\n"); } } void stop_monoscope(void) { if (running) { running = 0; pthread_join(monoscope_thread, NULL); } } void run_monoscope(void *data) { nice(SCOPE_NICE); /* Be nice to most processes */ the_monoscope(); pthread_mutex_unlock(&monoscope_mutex); pthread_exit(NULL); } void start_monoscope(void) { if (!is_init) { is_init = 1; scope_win = init_monoscope_window(); } if (pthread_mutex_trylock(&monoscope_mutex) != 0) { printf("monoscope already running\n"); return; } gtk_widget_show(scope_win); pthread_create(&monoscope_thread, NULL, (void * (*)(void *))run_monoscope, NULL); } static int init_monoscope(void *arg) { state = convolve_init(); if(!state) return 0; /* FIXME - Need to call convolve_close(state); at some point * if this is going to become a proper plugin. */ if (prefs_get_bool(ap_prefs, "monoscope", "active", 0)) start_monoscope(); return 1; } static void shutdown_monoscope(void) { prefs_set_bool(ap_prefs, "monoscope", "active", monoscope_running()); if (monoscope_running()) stop_monoscope(); /* if (state) */ } static int monoscope_running(void) { return running; } scope_plugin monoscope_plugin = { SCOPE_PLUGIN_VERSION, "Monoscope", "Andy Lo A Foe", NULL, init_monoscope, start_monoscope, monoscope_running, stop_monoscope, shutdown_monoscope, monoscope_set_data, NULL }; scope_plugin *scope_plugin_info(void) { return &monoscope_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/opengl_spectrum/000077500000000000000000000000001466261456500261765ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/opengl_spectrum/Makefile.am000066400000000000000000000011031466261456500302250ustar00rootroot00000000000000if HAVE_OPENGL oglspectrumltlibs = liboglspectrum.la oglspectrumsources = opengl_spectrum.c oglespectrumldflags = -export-dynamic -avoid-version else oglspectrumltlibs = oglspectrumsources = oglespectrumldflags = endif EXTRA_DIST = opengl_spectrum.c lib_LTLIBRARIES = $(oglspectrumltlibs) libdir = $(ADDON_DIR)/scopes liboglspectrum_la_LIBADD = @OPENGL_LIBS@ liboglspectrum_la_LDFLAGS = $(oglespectrumldflags) liboglspectrum_la_SOURCES = $(oglspectrumsources) AM_CFLAGS = -D_REENTRANT @ARCH_CFLAGS@ @DFLAGS@ INCLUDES = -I$(top_srcdir)/alsaplayer -I$(top_builddir) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/opengl_spectrum/opengl_spectrum.c000066400000000000000000000256321466261456500315600ustar00rootroot00000000000000/* opengl_spectrum.c (C) 2002 by Andy Lo A Foe * Based on code found in xmms: * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include "scope_plugin.h" #include "alsaplayer_error.h" #include "utilities.h" #include "prefs.h" #define NUM_BANDS 16 //#define NVIDIA_SYNC #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif static Display *dpy = NULL; static Colormap colormap = 0; static GLXContext glxcontext = NULL; static Window window = 0; static GLfloat y_angle = 45.0, y_speed = 0.5; static GLfloat x_angle = 20.0, x_speed = 0.0; static GLfloat z_angle = 0.0, z_speed = 0.0; static GLfloat heights[16][16], scale; static int going = FALSE, grabbed_pointer = FALSE; static Atom wm_delete_window_atom; static pthread_t draw_thread; static pthread_mutex_t scope_mutex; static int window_w; static int window_h; #ifdef NVIDIA_SYNC #include #include #include #include #endif static void stop_display(int); static void oglspectrum_start(void); static void wait_for_vsync() { #ifdef NVIDIA_SYNC static int init = 0; static int fd = -1; static struct pollfd pollfds; if (!init) { fd = open("/dev/nvidia0", O_RDONLY); if (fd == -1) { alsaplayer_error("Error opening NVIDIA device /dev/nvidia0"); } else { pollfds.fd = fd; pollfds.events = 0xffff; pollfds.revents = 0xffff; alsaplayer_error("Using NVIDIA poll method for vsync"); } init = 1; } poll (&pollfds, 1, -1); #else dosleep(10000); #endif } static Window create_window(int width, int height) { int attr_list[] = { GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None }; int scrnum; XSetWindowAttributes attr; unsigned long mask; Window root, win; XVisualInfo *visinfo; Atom wm_protocols[1]; if ((dpy = XOpenDisplay(NULL)) == NULL) return 0; scrnum = DefaultScreen(dpy); root = RootWindow(dpy, scrnum); if ((visinfo = glXChooseVisual(dpy, scrnum, attr_list)) == NULL) return 0; attr.background_pixel = 0; attr.border_pixel = 0; attr.colormap = colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); attr.event_mask = StructureNotifyMask | KeyPressMask; mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; win = XCreateWindow(dpy, root, 0, 0, width, height, 0, visinfo->depth, InputOutput, visinfo->visual, mask, &attr); XmbSetWMProperties(dpy, win, "OpenGL Spectrum analyzer", "OpenGL Spectrum analyzer", NULL, 0, NULL, NULL, NULL); wm_delete_window_atom = wm_protocols[0] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); XSetWMProtocols(dpy, win, wm_protocols, 1); glxcontext = glXCreateContext(dpy, visinfo, NULL, True); XFree(visinfo); glXMakeCurrent(dpy, win, glxcontext); return win; } static void draw_rectangle(GLfloat x1, GLfloat y1, GLfloat z1, GLfloat x2, GLfloat y2, GLfloat z2) { if(y1 == y2) { glVertex3f(x1, y1, z1); glVertex3f(x2, y1, z1); glVertex3f(x2, y2, z2); glVertex3f(x2, y2, z2); glVertex3f(x1, y2, z2); glVertex3f(x1, y1, z1); } else { glVertex3f(x1, y1, z1); glVertex3f(x2, y1, z2); glVertex3f(x2, y2, z2); glVertex3f(x2, y2, z2); glVertex3f(x1, y2, z1); glVertex3f(x1, y1, z1); } } static void draw_bar(GLfloat x_offset, GLfloat z_offset, GLfloat height, GLfloat red, GLfloat green, GLfloat blue ) { GLfloat width = 0.1; glColor3f(red,green,blue); draw_rectangle(x_offset, height, z_offset, x_offset + width, height, z_offset + 0.1); draw_rectangle(x_offset, 0, z_offset, x_offset + width, 0, z_offset + 0.1); glColor3f(0.5 * red, 0.5 * green, 0.5 * blue); draw_rectangle(x_offset, 0.0, z_offset + 0.1, x_offset + width, height, z_offset + 0.1); draw_rectangle(x_offset, 0.0, z_offset, x_offset + width, height, z_offset ); glColor3f(0.25 * red, 0.25 * green, 0.25 * blue); draw_rectangle(x_offset, 0.0, z_offset , x_offset, height, z_offset + 0.1); draw_rectangle(x_offset + width, 0.0, z_offset , x_offset + width, height, z_offset + 0.1); } static void draw_bars(void) { int x,y; GLfloat x_offset, z_offset, r_base, b_base; glClearColor(0,0,0,0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glTranslatef(0.0,-0.5,-5.0); glRotatef(x_angle,1.0,0.0,0.0); glRotatef(y_angle,0.0,1.0,0.0); glRotatef(z_angle,0.0,0.0,1.0); glBegin(GL_TRIANGLES); for(y = 0; y < 16; y++) { z_offset = -1.6 + ((15 - y) * 0.2); b_base = y * (1.0 / 15); r_base = 1.0 - b_base; for(x = 0; x < 16; x++) { x_offset = -1.6 + (x * 0.2); draw_bar(x_offset, z_offset, heights[y][x], r_base - (x * (r_base / 15.0)), x * (1.0 / 15), b_base); } } glEnd(); glPopMatrix(); wait_for_vsync(); glXSwapBuffers(dpy,window); } #define DEFAULT_W 640 #define DEFAULT_H 480 void *draw_thread_func(void *arg) { Bool configured = FALSE; window_w = prefs_get_int(ap_prefs, "opengl_spectrum", "width", DEFAULT_W); window_h = prefs_get_int(ap_prefs, "opengl_spectrum", "height", DEFAULT_H); if ((window = create_window(window_w, window_h)) == 0) { alsaplayer_error("unable to create window"); pthread_exit(NULL); } XMapWindow(dpy, window); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-1, 1, -1, 1, 1.5, 10); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); while(going) { while(XPending(dpy)) { XEvent event; KeySym keysym; char buf[16]; XNextEvent(dpy, &event); switch(event.type) { case ConfigureNotify: glViewport(0,0,event.xconfigure.width, event.xconfigure.height); window_w = event.xconfigure.width; window_h = event.xconfigure.height; prefs_set_int(ap_prefs, "opengl_spectrum", "width", window_w); prefs_set_int(ap_prefs, "opengl_spectrum", "height", window_h); configured = TRUE; break; case KeyPress: XLookupString (&event.xkey, buf, 16, &keysym, NULL); switch(keysym) { case XK_Escape: going = FALSE; break; case XK_z: /*xmms_remote_playlist_prev(oglspectrum_vp.xmms_session); */ break; case XK_x: /*xmms_remote_play(oglspectrum_vp.xmms_session); */ break; case XK_c: /*xmms_remote_pause(oglspectrum_vp.xmms_session); */ break; case XK_v: /*xmms_remote_stop(oglspectrum_vp.xmms_session); */ break; case XK_b: /* xmms_remote_playlist_next(oglspectrum_vp.xmms_session); */ break; case XK_Up: x_speed -= 0.1; if(x_speed < -3.0) x_speed = -3.0; break; case XK_Down: x_speed += 0.1; if(x_speed > 3.0) x_speed = 3.0; break; case XK_Left: y_speed -= 0.1; if(y_speed < -3.0) y_speed = -3.0; break; case XK_Right: y_speed += 0.1; if(y_speed > 3.0) y_speed = 3.0; break; case XK_w: z_speed -= 0.1; if(z_speed < -3.0) z_speed = -3.0; break; case XK_q: z_speed += 0.1; if(z_speed > 3.0) z_speed = 3.0; break; case XK_Return: x_speed = 0.0; y_speed = 0.5; z_speed = 0.0; x_angle = 20.0; y_angle = 45.0; z_angle = 0.0; break; } break; case ClientMessage: if ((Atom)event.xclient.data.l[0] == wm_delete_window_atom) { going = FALSE; } break; } } if(configured) { x_angle += x_speed; if(x_angle >= 360.0) x_angle -= 360.0; y_angle += y_speed; if(y_angle >= 360.0) y_angle -= 360.0; z_angle += z_speed; if(z_angle >= 360.0) z_angle -= 360.0; draw_bars(); } } if (glxcontext) { glXMakeCurrent(dpy, 0, NULL); glXDestroyContext(dpy, glxcontext); glxcontext = NULL; } if (window) { if (grabbed_pointer) { XUngrabPointer(dpy, CurrentTime); grabbed_pointer = FALSE; } XDestroyWindow(dpy, window); window = 0; } pthread_mutex_unlock(&scope_mutex); stop_display(0); /* Close down display */ pthread_exit(NULL); } static void start_display(void) { int x, y; for(x = 0; x < 16; x++) { for(y = 0; y < 16; y++) { heights[y][x] = 0.0; } } scale = 1.0 / log(256.0); x_speed = 0.0; y_speed = 0.5; z_speed = 0.0; x_angle = 20.0; y_angle = 45.0; z_angle = 0.0; going = TRUE; pthread_create(&draw_thread, NULL, draw_thread_func, NULL); } static void stop_display(int join_thread) { if (going && join_thread) { going = FALSE; pthread_join(draw_thread, NULL); } if (colormap) { XFreeColormap(dpy, colormap); colormap = 0; } if (dpy) { XCloseDisplay(dpy); dpy = NULL; } } static int oglspectrum_init(void *arg) { pthread_mutex_init(&scope_mutex, NULL); if (prefs_get_bool(ap_prefs, "opengl_spectrum", "active", 0)) { oglspectrum_start(); } return 1; } static void oglspectrum_cleanup(void) { stop_display(1); } static void oglspectrum_start(void) { if (pthread_mutex_trylock(&scope_mutex) != 0) { alsaplayer_error("spectrum already running"); return; } start_display(); } static void oglspectrum_stop(void) { stop_display(1); } static void oglspectrum_set_fft(void *fft_buffer, int samples, int channels) { int i,c; int y; GLfloat val; int *buf = (int *)fft_buffer; int xscale[] = {0, 1, 2, 3, 5, 7, 10, 14, 20, 28, 40, 54, 74, 101, 137, 187, 255}; for(y = 15; y > 0; y--) { for(i = 0; i < 16; i++) { heights[y][i] = heights[y - 1][i]; } } for(i = 0; i < NUM_BANDS; i++) { for(c = xscale[i], y = 0; c < xscale[i + 1]; c++) { if((buf[c]+buf[samples+c]) > y) y = buf[c]+buf[samples+c]; } y >>= 7; if(y > 0) val = (log(y) * scale); else val = 0; heights[0][i] = val; } } static int oglspectrum_running(void) { return going; } static void oglspectrum_shutdown(void) { prefs_set_bool(ap_prefs, "opengl_spectrum", "active", oglspectrum_running()); if (oglspectrum_running()) { oglspectrum_stop(); } } scope_plugin oglspectrum_plugin = { SCOPE_PLUGIN_VERSION, "Spectrum GL", "Andy Lo A Foe", NULL, oglspectrum_init, oglspectrum_start, oglspectrum_running, oglspectrum_stop, oglspectrum_shutdown, NULL, oglspectrum_set_fft }; scope_plugin *scope_plugin_info(void) { return &oglspectrum_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/spacescope/000077500000000000000000000000001466261456500251155ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/spacescope/Makefile.am000066400000000000000000000007661466261456500271620ustar00rootroot00000000000000if HAVE_GTK spacescopeltlibs = libspacescope.la spacescopeldflags = -export-dynamic -avoid-version @GTK_LIBS@ spacescopesources = spacescope.c lib_LTLIBRARIES = $(spacescopeltlibs) else spacescopeltlibs = spacescopeldflags = spacescopesources = endif AM_CFLAGS = -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @ARCH_CFLAGS@ @GTK_CFLAGS@ @DFLAGS@ libdir = $(ADDON_DIR)/scopes libspacescope_la_LDFLAGS = $(spacescopeldflags) LIBS = libspacescope_la_SOURCES= $(spacescopesources) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/spacescope/spacescope.c000066400000000000000000000136221466261456500274120ustar00rootroot00000000000000/* spacescope.c * Copyright (C) 1998-2002 Andy Lo A Foe * Original code by Tinic Uro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "scope_config.h" #include "prefs.h" #define SPACE_WH 128 /* Leave this at 128 for now */ static char actEq[257]; static char oldEq[257]; static char scX[257]; static char scY[257]; static GtkWidget *area = NULL; static GtkWidget *scope_win = NULL; static GdkRgbCmap *color_map = NULL; static pthread_t spacescope_thread; static pthread_mutex_t spacescope_mutex; static gint is_init = 0; static gint running = 0; static void spacescope_hide(void); static int spacescope_running(void); void spacescope_set_data(void *audio_buffer, int size) { int i; short *sound = (short *)audio_buffer; if (!sound) { memset(&actEq, 0, sizeof(actEq)); return; } if (running && sound) { char *newset = actEq; int bufsize = size / (size >= 512 ? 512 : size); for (i=0; i < 256; i++) { *newset++=(char)(((int)(*sound)+(int)(*(sound+1)))>>10); sound += bufsize; } } } void the_spacescope(void) { gint foo, bar; char *oldset = oldEq; char *newset = actEq; guchar bits[(SPACE_WH+1) * (SPACE_WH+1)], *loc; int i; while (running) { memset(bits, 0, SPACE_WH * SPACE_WH); memcpy(oldset,newset,256); for (i=0; i < 256; i++) { foo = (1+(oldset[i]+64))>>1; bar = ((( scX[i]*foo)>>7 )+(64)) + ((((scY[i]*foo) ) + (64 * SPACE_WH)) & 0xffffff80); if ((bar > 0) && (bar < (SPACE_WH * SPACE_WH))) { loc = bits + bar; *loc = foo; } } GDK_THREADS_ENTER(); gdk_draw_indexed_image(area->window,area->style->white_gc, 0, 0, SPACE_WH, SPACE_WH, GDK_RGB_DITHER_NONE, bits, SPACE_WH, color_map); GDK_THREADS_LEAVE(); dosleep(SCOPE_SLEEP); } GDK_THREADS_ENTER(); spacescope_hide(); GDK_THREADS_LEAVE(); } void stop_spacescope(void); static gboolean close_spacescope_window(GtkWidget *widget, GdkEvent *event, gpointer data) { GDK_THREADS_LEAVE(); stop_spacescope(); GDK_THREADS_ENTER(); return TRUE; } GtkWidget *init_spacescope_window(void) { GtkWidget *spacescope_win; GdkColor color; guint32 colors[65]; int i; pthread_mutex_init(&spacescope_mutex, NULL); spacescope_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(spacescope_win), "Spacescope"); gtk_widget_set_usize(spacescope_win, SPACE_WH, SPACE_WH); gtk_window_set_wmclass (GTK_WINDOW(spacescope_win), "Spacescope", "AlsaPlayer"); gtk_window_set_policy (GTK_WINDOW (spacescope_win), FALSE, FALSE, TRUE); gtk_widget_realize(spacescope_win); color.red = SCOPE_BG_RED << 8; color.blue = SCOPE_BG_BLUE << 8; color.green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), &color); colors[0] = 0; for (i = 1; i < 32; i++) { colors[i] = (i*8 << 16) + (255*8 << 8); colors[i+31] = (255*8 << 16) + ((31 - i)*8 << 8); } colors[63] = (255*8 << 16); color_map = gdk_rgb_cmap_new(colors, 64); area = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(spacescope_win), area); gtk_widget_realize(area); gdk_window_set_background(area->window, &color); gtk_widget_show(area); gtk_widget_show(spacescope_win); /* Signals */ gtk_signal_connect(GTK_OBJECT(spacescope_win), "delete_event", GTK_SIGNAL_FUNC(close_spacescope_window), spacescope_win); /* Create sin/cos tables */ for (i = 0; i < 256; i++) { scX[i] = (char) (sin(((2*M_PI)/255)*i)*128); scY[i] = (char) (-cos(((2*M_PI)/255)*i)*128); } return spacescope_win; } void spacescope_hide(void) { gint x, y; if (scope_win) { gdk_window_get_root_origin(scope_win->window, &x, &y); gtk_widget_hide(scope_win); gtk_widget_set_uposition(scope_win, x, y); } } void stop_spacescope(void) { if (running) { running = 0; pthread_join(spacescope_thread, NULL); } } void run_spacescope(void *data) { nice(SCOPE_NICE); the_spacescope(); pthread_mutex_unlock(&spacescope_mutex); pthread_exit(NULL); } void start_spacescope(void) { if (!is_init) { is_init = 1; scope_win = init_spacescope_window(); } if (pthread_mutex_trylock(&spacescope_mutex) != 0) { printf("spacescope already running\n"); return; } running = 1; gtk_widget_show(scope_win); pthread_create(&spacescope_thread, NULL, (void * (*)(void *))run_spacescope, NULL); } static int init_spacescope(void *arg) { if (prefs_get_bool(ap_prefs, "spacescope", "active", 0)) start_spacescope(); return 1; } static void shutdown_spacescope(void) { prefs_set_bool(ap_prefs, "spacescope", "active", spacescope_running()); if (spacescope_running()) { stop_spacescope(); } if (area) { gtk_widget_destroy(area); area = NULL; } if (scope_win) { gtk_widget_destroy(scope_win); scope_win = NULL; } } static int spacescope_running(void) { return running; } scope_plugin spacescope_plugin = { SCOPE_PLUGIN_VERSION, "Spacescope", "Andy Lo A Foe", NULL, init_spacescope, start_spacescope, spacescope_running, stop_spacescope, shutdown_spacescope, spacescope_set_data, NULL }; scope_plugin *scope_plugin_info(void) { return &spacescope_plugin; } alsaplayer-0.99.82/attic/experimental/obsolete/scopes/synaescope/000077500000000000000000000000001466261456500251415ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/obsolete/scopes/synaescope/Makefile.am000066400000000000000000000007661466261456500272060ustar00rootroot00000000000000if HAVE_GTK synaescopeltlibs = libsynaescope.la synaescopeldflags = -export-dynamic -avoid-version @GTK_LIBS@ synaescopesources = synaescope.c lib_LTLIBRARIES = $(synaescopeltlibs) else synaescopeltlibs = synaescopeldflags = synaescopesources = endif AM_CFLAGS = -D_REENTRANT -I$(top_builddir) -I$(top_srcdir)/alsaplayer \ @ARCH_CFLAGS@ @GTK_CFLAGS@ @DFLAGS@ libdir = $(ADDON_DIR)/scopes libsynaescope_la_LDFLAGS = $(synaescopeldflags) LIBS = libsynaescope_la_SOURCES= $(synaescopesources) alsaplayer-0.99.82/attic/experimental/obsolete/scopes/synaescope/synaescope.c000066400000000000000000000410021466261456500274530ustar00rootroot00000000000000/* synaescope.c * Copyright (C) 1999 Richard Boulton * Further support (C) 2002 Andy Lo A Foe * * Much code copied from Synaesthesia - a program to display sound * graphically, by Paul Francis Harrison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "scope_config.h" #include "prefs.h" #define FFT_BUFFER_SIZE_LOG 8 #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) typedef short int sound_sample; #define syn_width 320 #define syn_height 200 #define brightMin 200 #define brightMax 2000 #define brightDec 10 #define brightInc 6 #define brTotTargetLow 5000 #define brTotTargetHigh 15000 static int autobrightness = 1; /* Whether to use automatic brightness adjust */ static unsigned int brightFactor = 400; static unsigned char output[syn_width * syn_height * 2]; static sound_sample pcmt_l[FFT_BUFFER_SIZE]; static sound_sample pcmt_r[FFT_BUFFER_SIZE]; static sound_sample pcm_l[FFT_BUFFER_SIZE]; static sound_sample pcm_r[FFT_BUFFER_SIZE]; static double fftout_l[FFT_BUFFER_SIZE]; static double fftout_r[FFT_BUFFER_SIZE]; static double fftmult[FFT_BUFFER_SIZE / 2 + 1]; static double corr_l[FFT_BUFFER_SIZE]; static double corr_r[FFT_BUFFER_SIZE]; static int clarity[FFT_BUFFER_SIZE]; /* Surround sound */ static double cosTable[FFT_BUFFER_SIZE]; static double negSinTable[FFT_BUFFER_SIZE]; static int bitReverse[FFT_BUFFER_SIZE]; static int scaleDown[256]; static GdkImage *image = NULL; static GtkWidget *scope_win = NULL; static int ready_state = 0; static pthread_t synaescope_thread; static pthread_mutex_t synaescope_mutex; static int is_init = 0; static int running = 0; static void synaescope_hide(void); static void synaes_fft(double *x, double *y); static void synaescope_coreGo(void); static int synaescope_running(void); static const int default_colors[] = { 10, 20, 30, 230, 220, 210 }; static void synaescope_set_data(void *audio_buffer, int size) { short *sound = (short *)audio_buffer; if (!sound) { memset(&pcm_l, 0, sizeof(pcm_l)); memset(&pcm_r, 0, sizeof(pcm_r)); return; } if (running && size > FFT_BUFFER_SIZE * 2) { int i; sound_sample *newset_l = pcmt_l; sound_sample *newset_r = pcmt_r; sound += (size / 2 - FFT_BUFFER_SIZE) * 2; /* Use the very latest data */ for (i=0; i < FFT_BUFFER_SIZE; i++) { *(newset_l++) = (sound_sample)(*(sound++)); *(newset_r++) = (sound_sample)(*(sound++)); } } } #define SYNAESCOPE_DOLOOP() \ while (running) { \ unsigned char *outptr = output; \ int w; \ \ synaescope_coreGo(); \ \ outptr = output; \ for (w=0; w < syn_width * syn_height; w++) { \ bits[w] = colEq[(outptr[0] >> 4) + (outptr[1] & 0xf0)]; \ outptr += 2; \ } \ \ GDK_THREADS_ENTER(); \ gdk_draw_image(win,gc,image,0,0,0,0,-1,-1); \ gdk_flush(); \ GDK_THREADS_LEAVE(); \ dosleep(SCOPE_SLEEP); \ } static inline void addPixel(unsigned char *output, int x,int y,int br1,int br2) { unsigned char *p; if (x < 0 || x >= syn_width || y < 0 || y >= syn_height) return; p = output + x * 2 + y * syn_width * 2; if (p[0] < 255 - br1) p[0] += br1; else p[0] = 255; if (p[1] < 255 - br2) p[1] += br2; else p[1] = 255; } static inline void addPixelFast(unsigned char *p,int br1,int br2) { if (p[0] < 255 - br1) p[0] += br1; else p[0] = 255; if (p[1] < 255 - br2) p[1] += br2; else p[1] = 255; } static void synaescope_coreGo(void) { int i,j; register unsigned long *ptr; register unsigned long *end; int heightFactor; int actualHeight; int heightAdd; double brightFactor2; long int brtot; GDK_THREADS_ENTER(); memcpy(pcm_l, pcmt_l, sizeof(pcm_l)); memcpy(pcm_r, pcmt_r, sizeof(pcm_r)); GDK_THREADS_LEAVE(); for(i = 0; i < FFT_BUFFER_SIZE; i++) { fftout_l[i] = pcm_l[i]; fftout_r[i] = pcm_r[i]; } synaes_fft(fftout_l,fftout_r); for(i=0 +1;i>1)>>4; */ if (*ptr) { if (*ptr & 0xf0f0f0f0) { *ptr = *ptr - ((*ptr & 0xf0f0f0f0) >> 4) - ((*ptr & 0xe0e0e0e0) >> 5); } else { *ptr = (*ptr * 14 >> 4) & 0x0f0f0f0f; /* Should be 29/32 to be consistent. Who cares. This is totally */ /* hacked anyway. */ /* unsigned char *subptr = (unsigned char*)(ptr++); subptr[0] = (int)subptr[0] * 29 / 32; subptr[1] = (int)subptr[0] * 29 / 32; subptr[2] = (int)subptr[0] * 29 / 32; subptr[3] = (int)subptr[0] * 29 / 32; */ } } ptr++; } while(ptr < end); heightFactor = FFT_BUFFER_SIZE/2 / syn_height + 1; actualHeight = FFT_BUFFER_SIZE/2 / heightFactor; heightAdd = (syn_height + actualHeight) >> 1; /* Correct for window size */ brightFactor2 = (brightFactor/65536.0/FFT_BUFFER_SIZE)* sqrt(actualHeight * syn_width / (320.0*200.0)); brtot = 0; for(i=1;i 0 || corr_r[i] > 0) { int h = (int)( corr_r[i] * syn_width / (corr_l[i]+corr_r[i]) ); /* int h = (int)( syn_width - 1 ); */ int br1, br2, br = (int)( (corr_l[i]+corr_r[i])*i*brightFactor2 ); int px = h, py = heightAdd - i / heightFactor; brtot += br; br1 = br*(clarity[i]+128)>>8; br2 = br*(128-clarity[i])>>8; if (br1 < 0) br1 = 0; else if (br1 > 255) br1 = 255; if (br2 < 0) br2 = 0; else if (br2 > 255) br2 = 255; /* unsigned char *p = output+ h*2+(164-((i<<8)>>FFT_BUFFER_SIZE_LOG))*(syn_width*2); */ if (px < 30 || py < 30 || px > syn_width-30 || py > syn_height-30) { addPixel(output, px,py,br1,br2); for(j=1;br1>0||br2>0;j++,br1=scaleDown[br1],br2=scaleDown[br2]) { addPixel(output, px+j,py,br1,br2); addPixel(output, px,py+j,br1,br2); addPixel(output, px-j,py,br1,br2); addPixel(output, px,py-j,br1,br2); } } else { unsigned char *p = output+px*2+py*syn_width*2, *p1=p, *p2=p, *p3=p, *p4=p; addPixelFast(p,br1,br2); for(;br1>0||br2>0;br1=scaleDown[br1],br2=scaleDown[br2]) { p1 += 2; addPixelFast(p1,br1,br2); p2 -= 2; addPixelFast(p2,br1,br2); p3 += syn_width * 2; addPixelFast(p3,br1,br2); p4 -= syn_width * 2; addPixelFast(p4,br1,br2); } } } } /* Apply autoscaling: makes quiet bits brighter, and loud bits * darker, but still keeps loud bits brighter than quiet bits. */ if(brtot != 0 && autobrightness) { long int brTotTarget = brTotTargetHigh; if(brightMax != brightMin) { brTotTarget -= ((brTotTargetHigh - brTotTargetLow) * (brightFactor - brightMin)) / (brightMax - brightMin); } if(brtot < brTotTarget) { brightFactor += brightInc; if(brightFactor > brightMax) brightFactor = brightMax; } else { brightFactor -= brightDec; if(brightFactor < brightMin) brightFactor = brightMin; } /* printf("brtot: %ld\tbrightFactor: %d\tbrTotTarget: %d\n", brtot, brightFactor, brTotTarget); */ } } #define BOUND(x) ((x) > 255 ? 255 : (x)) #define PEAKIFY(x) BOUND((x) - (x)*(255-(x))/255/2) static void synaescope32(void *data) { guint32 *bits; guint32 colEq[256]; int i; GdkWindow *win; GdkColormap *c; GdkVisual *v; GdkGC *gc; GdkColor bg_color; win = (GdkWindow *)data; GDK_THREADS_ENTER(); c = gdk_colormap_get_system(); gc = gdk_gc_new(win); v = gdk_window_get_visual(win); for (i = 0; i < 256; i++) { GdkColor color; color.red = PEAKIFY((i&15*16)) << 8; color.green = PEAKIFY((i&15)*16+(i&15*16)/4) << 8; color.blue = PEAKIFY((i&15)*16) << 8; gdk_color_alloc(c, &color); colEq[i] = color.pixel; } /* Create render image */ if (image) { gdk_image_destroy(image); image = NULL; } image = gdk_image_new(GDK_IMAGE_FASTEST, v, syn_width, syn_height); bg_color.red = SCOPE_BG_RED << 8; bg_color.green = SCOPE_BG_GREEN << 8; bg_color.blue = SCOPE_BG_BLUE << 8; gdk_color_alloc(c, &bg_color); GDK_THREADS_LEAVE(); assert(image); assert(image->bpp > 2); bits = (guint32 *)image->mem; running = 1; SYNAESCOPE_DOLOOP(); GDK_THREADS_ENTER(); synaescope_hide(); GDK_THREADS_LEAVE(); } static void synaescope16(void *data) { guint16 *bits; guint16 colEq[256]; int i; GdkWindow *win; GdkColormap *c; GdkVisual *v; GdkGC *gc; GdkColor bg_color; win = (GdkWindow *)data; GDK_THREADS_ENTER(); c = gdk_colormap_get_system(); gc = gdk_gc_new(win); v = gdk_window_get_visual(win); for (i = 0; i < 256; i++) { GdkColor color; color.red = PEAKIFY((i&15*16)) << 8; color.green = PEAKIFY((i&15)*16+(i&15*16)/4) << 8; color.blue = PEAKIFY((i&15)*16) << 8; gdk_color_alloc(c, &color); colEq[i] = color.pixel; } /* Create render image */ if (image) { gdk_image_destroy(image); image = NULL; } image = gdk_image_new(GDK_IMAGE_FASTEST, v, syn_width, syn_height); bg_color.red = SCOPE_BG_RED << 8; bg_color.green = SCOPE_BG_GREEN << 8; bg_color.blue = SCOPE_BG_BLUE << 8; gdk_color_alloc(c, &bg_color); GDK_THREADS_LEAVE(); assert(image); assert(image->bpp == 2); bits = (guint16 *)image->mem; running = 1; SYNAESCOPE_DOLOOP(); GDK_THREADS_ENTER(); synaescope_hide(); GDK_THREADS_LEAVE(); } static void synaescope8(void *data) { guint8 *bits; guint8 colEq[256]; int i; GdkWindow *win; GdkColormap *c; GdkVisual *v; GdkGC *gc; GdkColor bg_color; win = (GdkWindow *)data; GDK_THREADS_ENTER(); c = gdk_colormap_get_system(); gc = gdk_gc_new(win); v = gdk_window_get_visual(win); for (i = 0; i < 64; i++) { GdkColor color; color.red = PEAKIFY((i&7*8)*4) << 8; color.green = PEAKIFY((i&7)*32+(i&7*8)*2) << 8; color.blue = PEAKIFY((i&7)*32) << 8; gdk_color_alloc(c, &color); colEq[i * 4] = color.pixel; colEq[i * 4 + 1] = color.pixel; colEq[i * 4 + 2] = color.pixel; colEq[i * 4 + 3] = color.pixel; } /* Create render image */ if (image) { gdk_image_destroy(image); image = NULL; } image = gdk_image_new(GDK_IMAGE_FASTEST, v, syn_width, syn_height); bg_color.red = SCOPE_BG_RED << 8; bg_color.green = SCOPE_BG_GREEN << 8; bg_color.blue = SCOPE_BG_BLUE << 8; gdk_color_alloc(c, &bg_color); GDK_THREADS_LEAVE(); assert(image); assert(image->bpp == 1); bits = (guint8 *)image->mem; running = 1; SYNAESCOPE_DOLOOP(); GDK_THREADS_ENTER(); synaescope_hide(); GDK_THREADS_LEAVE(); } static GdkVisual *visual; static GdkWindow *win; static void test_cb(GtkWidget *widget, gpointer data) { printf("Woah!\n"); } static void stop_synaescope(void); static gboolean close_synaescope_window(GtkWidget *widget, GdkEvent *event, gpointer data) { GDK_THREADS_LEAVE(); stop_synaescope(); GDK_THREADS_ENTER(); return TRUE; } static GtkWidget *init_synaescope_window(void) { GtkWidget *synaescope_win; GtkStyle *style; GdkColor *color; pthread_mutex_init(&synaescope_mutex, NULL); style = gtk_style_new(); synaescope_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(synaescope_win), "Synaescope"); gtk_widget_set_usize(synaescope_win, syn_width, syn_height); gtk_window_set_wmclass (GTK_WINDOW(synaescope_win), "Synaescope", "AlsaPlayer"); gtk_window_set_policy (GTK_WINDOW (synaescope_win), FALSE, FALSE, FALSE); style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(synaescope_win))); color = &style->bg[GTK_STATE_NORMAL]; color->red = SCOPE_BG_RED << 8; color->blue = SCOPE_BG_BLUE << 8; color->green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), color); gtk_widget_set_style(GTK_WIDGET(synaescope_win), style); gtk_widget_show(synaescope_win); win = synaescope_win->window; /* Signals */ gtk_signal_connect(GTK_OBJECT(synaescope_win), "delete_event", GTK_SIGNAL_FUNC(close_synaescope_window), synaescope_win); /* Clear and show the window */ gdk_window_clear(win); gdk_window_show(win); gdk_flush(); ready_state = 1; return synaescope_win; } static void synaescope_hide(void) { gint x, y; if (scope_win) { gdk_window_get_root_origin(scope_win->window, &x, &y); gtk_widget_hide(scope_win); gtk_widget_set_uposition(scope_win, x, y); } } static void stop_synaescope(void) { if (running) { running = 0; pthread_join(synaescope_thread, NULL); } } static void run_synaescope(void *data) { nice(SCOPE_NICE); /* Be nice to most processes */ GDK_THREADS_ENTER(); visual = gdk_window_get_visual(win); GDK_THREADS_LEAVE(); switch (visual->depth) { case 8: synaescope8(win); break; case 16: synaescope16(win); break; case 24: case 32: synaescope32(win); break; } pthread_mutex_unlock(&synaescope_mutex); pthread_exit(NULL); } static void start_synaescope(void) { if (pthread_mutex_trylock(&synaescope_mutex) != 0) { printf("synaescope already running\n"); return; } if (!is_init) { is_init = 1; scope_win = init_synaescope_window(); } gtk_widget_show(scope_win); pthread_create(&synaescope_thread, NULL, (void * (*)(void *))run_synaescope, NULL); } static int bitReverser(int i) { int sum = 0; int j; for(j = 0; j < FFT_BUFFER_SIZE_LOG; j++) { sum = (i & 1) + sum * 2; i >>= 1; } return sum; } static int init_synaescope(void *arg) { int i; for(i = 0; i <= FFT_BUFFER_SIZE / 2 + 1; i++) { double mult = (double)128 / ((FFT_BUFFER_SIZE * 16384) ^ 2); /* Result now guaranteed (well, almost) to be in range 0..128 */ /* Low values represent more frequencies, and thus get more */ /* intensity - this helps correct for that. */ mult *= log(i + 1) / log(2); mult *= 3; /* Adhoc parameter, looks about right for me. */ fftmult[i] = mult; } for(i = 0; i < FFT_BUFFER_SIZE; i++) { negSinTable[i] = -sin(M_PI * 2 / FFT_BUFFER_SIZE*i); cosTable[i] = cos(M_PI * 2 / FFT_BUFFER_SIZE*i); bitReverse[i] = bitReverser(i); } for(i=0;i<256;i++) scaleDown[i] = i*200>>8; memset(output, 0, syn_width * syn_height * 2); if (prefs_get_bool(ap_prefs, "synaescope", "active", 0)) start_synaescope(); return 1; } static void synaes_fft(double *x, double *y) { int n2 = FFT_BUFFER_SIZE; int n1; int twoToTheK; int j; for(twoToTheK = 1; twoToTheK < FFT_BUFFER_SIZE; twoToTheK *= 2) { n1 = n2; n2 /= 2; for(j = 0; j < n2; j++) { double c = cosTable[j * twoToTheK & (FFT_BUFFER_SIZE - 1)]; double s = negSinTable[j * twoToTheK & (FFT_BUFFER_SIZE - 1)]; int i; for(i = j; i < FFT_BUFFER_SIZE; i += n1) { int l = i + n2; double xt = x[i] - x[l]; double yt = y[i] - y[l]; x[i] = (x[i] + x[l]); y[i] = (y[i] + y[l]); x[l] = xt * c - yt * s; y[l] = xt * s + yt * c; } } } } static void shutdown_synaescope(void) { prefs_set_bool(ap_prefs, "synaescope", "active", synaescope_running()); if (synaescope_running()) stop_synaescope(); } static int synaescope_running(void) { return running; } scope_plugin synaescope_plugin = { SCOPE_PLUGIN_VERSION, "Synaescope", "Richard Boulton", NULL, init_synaescope, start_synaescope, synaescope_running, stop_synaescope, shutdown_synaescope, synaescope_set_data, NULL }; scope_plugin *scope_plugin_info(void) { return &synaescope_plugin; } alsaplayer-0.99.82/attic/experimental/tta/000077500000000000000000000000001466261456500204505ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/tta/ChangeLog000066400000000000000000000010121466261456500222140ustar00rootroot00000000000000* Mon Nov 5 2007 Dominique Michel - Fixed typo in tta_engine.c * Sun Nov 4 2007 Peter Lemenkov - Removed id3-metadata handling completely - Removed stream_info from tta-plugin - Save path of playing file for future use in CorePlayer * Tue Apr 3 2007 Dominique Michel - Added conditional PREFIX and install target in Makefile * Fri Mar 2 2007 Peter Lemenkov - Starting ChangeLog - Plugin still doesn't works alsaplayer-0.99.82/attic/experimental/tta/Makefile000066400000000000000000000007311466261456500221110ustar00rootroot00000000000000# # $Id: Makefile,v 1.1.1.1 2005/03/21 17:17:16 peter_lemenkov Exp $ # CC = gcc PREFIX? = /usr DEBUG = -Wall -O2 CFLAGS = -fPIC CPPFLAGS = -I$(PREFIX)/include/alsaplayer LINKER_FLAGS = LINKER_OBJECTS = tta_engine.o \ ttadec.o all: $(LINKER_OBJECTS) $(CC) -fPIC -shared $(LINKER_OBJECTS) $(LINKER_FLAGS) -o tta_engine.so .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< install: cp tta_engine.so $(PREFIX)/lib/alsaplayer/input/ clean: rm -f *.o *.lo *~ *.so alsaplayer-0.99.82/attic/experimental/tta/README000066400000000000000000000053421466261456500213340ustar00rootroot00000000000000TTA Hardware Players Library ============================ Version 1.2, (c) 2004 Alexander Djourik. All rights reserved. * Introduction This library provides to decode a multichannel 8,16 and 24 bits TTA audio files. TTA is a lossless audio format. Being "lossless" means that no data/quality is lost in the compression - when uncompressed, the data will be identical to the original. The compression ratios of TTA depend on the type of music file being compressed, but the compression size will generally range between 30% - 70% of the original. TTA format supports both of ID3v1/v2 tags. Detailed format description is available at http://www.true-audio.com. The decoder process has a minimal system requirements and does not required to create a big additional memory pools. As the TTA algorithms has a same system requirements both for decoding and for encoding processes - the TTA recorder can be easily realized also. * Changes 14/04/2004 1.0 Initial release 16/04/2004 1.1 Code optimization Code clean-up 29/10/2004 1.2 ID3 tags support Code clean-up * To Do - TTA recorder functions. * Developers Alexander Djourik Pavel Zhilin * Copying Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the True Audio Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * See also Please visit the TTA homepage at http://tta.sourceforge.net for the latest in news and downloads. alsaplayer-0.99.82/attic/experimental/tta/crc32.h000066400000000000000000000107761466261456500215500ustar00rootroot00000000000000/* * crc32.h * * Description: CRC32 functions * Developed by: Alexander Djourik * Pavel Zhilin * * Copyright (c) 1999-2004 Alexander Djourik. All rights reserved. * */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Please see the file COPYING in this directory for full copyright * information. */ #ifndef CRC32_H #define CRC32_H const unsigned long crc32_table[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; #define UPDATE_CRC32(x, crc) crc = \ (((crc>>8) & 0x00FFFFFF) ^ crc32_table[(crc^x) & 0xFF]) static unsigned long crc32 (unsigned char *buffer, unsigned long len) { unsigned long i; unsigned long crc = 0xFFFFFFFF; for (i = 0; i < len; i++) UPDATE_CRC32(buffer[i], crc); return (crc ^ 0xFFFFFFFF); } #endif /* CRC32_H */ alsaplayer-0.99.82/attic/experimental/tta/filters.h000066400000000000000000000056001466261456500222720ustar00rootroot00000000000000/* * filters.h * * Description: TTAv1 filter functions * Developed by: Alexander Djourik * Pavel Zhilin * * Copyright (c) 1999-2004 Alexander Djourik. All rights reserved. * */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * aint with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Please see the file COPYING in this directory for full copyright * information. */ #ifndef FILTERS_H #define FILTERS_H ///////// Filter Settings ////////// static long flt_set[3] = {10, 9, 10}; __inline void memshl (register long *pA, register long *pB) { *pA++ = *pB++; *pA++ = *pB++; *pA++ = *pB++; *pA++ = *pB++; *pA++ = *pB++; *pA++ = *pB++; *pA++ = *pB++; *pA = *pB; } __inline void hybrid_filter (fltst *fs, long *in) { register long *pA = fs->dl; register long *pB = fs->qm; register long *pM = fs->dx; register long sum = fs->round; if (!fs->error) { sum += *pA++ * *pB, pB++; sum += *pA++ * *pB, pB++; sum += *pA++ * *pB, pB++; sum += *pA++ * *pB, pB++; sum += *pA++ * *pB, pB++; sum += *pA++ * *pB, pB++; sum += *pA++ * *pB, pB++; sum += *pA++ * *pB, pB++; pM += 8; } else if (fs->error < 0) { sum += *pA++ * (*pB -= *pM++), pB++; sum += *pA++ * (*pB -= *pM++), pB++; sum += *pA++ * (*pB -= *pM++), pB++; sum += *pA++ * (*pB -= *pM++), pB++; sum += *pA++ * (*pB -= *pM++), pB++; sum += *pA++ * (*pB -= *pM++), pB++; sum += *pA++ * (*pB -= *pM++), pB++; sum += *pA++ * (*pB -= *pM++), pB++; } else { sum += *pA++ * (*pB += *pM++), pB++; sum += *pA++ * (*pB += *pM++), pB++; sum += *pA++ * (*pB += *pM++), pB++; sum += *pA++ * (*pB += *pM++), pB++; sum += *pA++ * (*pB += *pM++), pB++; sum += *pA++ * (*pB += *pM++), pB++; sum += *pA++ * (*pB += *pM++), pB++; sum += *pA++ * (*pB += *pM++), pB++; } *(pM-0) = ((*(pA-1) >> 30) | 1) << 2; *(pM-1) = ((*(pA-2) >> 30) | 1) << 1; *(pM-2) = ((*(pA-3) >> 30) | 1) << 1; *(pM-3) = ((*(pA-4) >> 30) | 1); fs->error = *in; *in += (sum >> fs->shift); *pA = *in; *(pA-1) = *(pA-0) - *(pA-1); *(pA-2) = *(pA-1) - *(pA-2); *(pA-3) = *(pA-2) - *(pA-3); memshl (fs->dl, fs->dl + 1); memshl (fs->dx, fs->dx + 1); } void filter_init (fltst *fs, long shift) { memset (fs, 0, sizeof(fltst)); fs->shift = shift; fs->round = 1 << (shift - 1); } #endif /* FILTERS_H */ alsaplayer-0.99.82/attic/experimental/tta/tta_engine.c000066400000000000000000000151131466261456500227320ustar00rootroot00000000000000/* * tta_engine.cpp (C) 2005-2007 by Peter Lemenkov * * WARNING!!! This is a development version - DO NOT USE! * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * p typedef struct { FILE *HANDLE; // file handle unsigned int FILESIZE; // compressed size unsigned short NCH; // number of channels unsigned short BPS; // bits per sample unsigned short BSIZE; // byte size unsigned short FORMAT; // audio format unsigned int SAMPLERATE; // samplerate (sps) unsigned int DATALENGTH; // data length in samples unsigned int FRAMELEN; // frame length unsigned int LENGTH; // playback time (sec) unsigned int STATE; // return code unsigned int DATAPOS; // size of ID3v2 header unsigned int BITRATE; // average bitrate (kbps) double COMPRESS; // compression ratio id3_info ID3; // ID3 information } tta_info; * */ #include #include /* memset */ #include #include #include #include "ttalib.h" #define BLOCK_SIZE 4608 /* We can use any block size we like */ static char* pcm_buffer;; int pcm_size_total; int pcm_size_played; static int tta_init(void) { pcm_size_played = 0; pcm_size_total = 0; pcm_buffer = NULL; return 1; } static void tta_shutdown(void) { return; } static float tta_can_handle(const char *path) { tta_info temp; char *ext; ext = strrchr(path, '.'); if (!ext) return 0.0; ext++; if (!strcasecmp(ext, "tta")){ if (open_tta_file (path, &temp, 0) == 0) { printf("TTA Decoder OK\n"); close_tta_file (&temp); return 1.0; } printf("TTA Decoder Error\n"); close_tta_file (&temp); } return 0.0; } static int tta_open(input_object *obj, const char *path) { void* datasource = NULL; if ((datasource = reader_open(path, NULL, NULL)) == NULL) { return 0; } obj->flags = 0; if (reader_seekable ((reader_type*)datasource)) { obj->flags |= P_SEEK; obj->flags |= P_PERFECTSEEK; obj->flags |= P_FILEBASED; } else { obj->flags |= P_STREAMBASED; } obj->local_data = malloc (sizeof (tta_info)); if (open_tta_file (path, obj->local_data, 0) < 0) { printf("TTA Decoder Error\n"); close_tta_file (obj->local_data); return 0; } /*************************/ printf ("\n\n debug: \n >> NCH: %d\n >> BPS: %d\n >> SAMPLERATE: %d\n >> FRAMELEN: %d\n\n", ((tta_info*)obj->local_data)->NCH, ((tta_info*)obj->local_data)->BPS, ((tta_info*)obj->local_data)->SAMPLERATE, ((tta_info*)obj->local_data)->FRAMELEN); /*************************/ obj->nr_channels = ((tta_info*)obj->local_data)->NCH; obj->nr_tracks = 1; obj->frame_size = BLOCK_SIZE; pcm_buffer = malloc (sizeof (unsigned char) * BLOCK_SIZE * ((tta_info*)obj->local_data)->NCH * ((tta_info*)obj->local_data)->BPS>>3); player_init(obj->local_data); return 1; } static void tta_close(input_object *obj) { if (!obj || !(obj->local_data)) return; close_tta_file (obj->local_data); free(obj->local_data); obj->local_data = NULL; if (pcm_buffer) free(pcm_buffer); } static long tta_frame_to_sec (input_object *obj, int frame) { if (!obj || !(obj->local_data)) return 0; return (100 * frame * (BLOCK_SIZE>>1)) / (((tta_info*)obj->local_data)->SAMPLERATE * ((tta_info*)obj->local_data)->NCH * (((tta_info*)obj->local_data)->BPS>>3)); } static int tta_sample_rate(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return ((tta_info*)obj->local_data)->SAMPLERATE; } static int tta_channels(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return ((tta_info*)obj->local_data)->NCH; } static int tta_nr_frames(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return (int) ((tta_info*)obj->local_data)->DATALENGTH * ((tta_info*)obj->local_data)->NCH * ((tta_info*)obj->local_data)->BPS>>3 / obj->frame_size; } static int tta_frame_size(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return obj->frame_size; } static int tta_frame_seek(input_object *obj, int frame) { if (!obj || !(obj->local_data)) return 0; printf ("tta: set_pos [%d]\n", frame); set_position ((1000 * frame * BLOCK_SIZE) / ((tta_info*)obj->local_data)->SAMPLERATE * ((tta_info*)obj->local_data)->NCH * (((tta_info*)obj->local_data)->BPS>>3)); return 1; } static int tta_play_frame (input_object *obj, char *buf) { if (!obj || !(obj->local_data)) return 0; if (pcm_size_played == 0){ memset (buf, 0, sizeof (unsigned char) * BLOCK_SIZE * ((tta_info*)obj->local_data)->NCH * ((tta_info*)obj->local_data)->BPS>>3); pcm_size_total = get_samples (pcm_buffer) * ((tta_info*)obj->local_data)->NCH * ((tta_info*)obj->local_data)->BPS>>3; printf ("tta: play frame 1st time - ret [%u] bytes\n", pcm_size_total); } memset (buf, 0, sizeof (char) * BLOCK_SIZE); memcpy (buf, pcm_buffer + pcm_size_played, BLOCK_SIZE); pcm_size_played += BLOCK_SIZE; pcm_size_total -= BLOCK_SIZE; printf ("tta: play frame played[%d], total[%d]\n", pcm_size_played, pcm_size_total); if (pcm_size_total <= 0) pcm_size_played = 0; return 1; } static input_plugin tta_plugin; #ifdef __cplusplus extern "C" { #endif input_plugin *input_plugin_info (void) { memset(&tta_plugin, 0, sizeof(input_plugin)); tta_plugin.version = INPUT_PLUGIN_VERSION; tta_plugin.name = "TTA plugin ver. 0.0.0.0"; tta_plugin.author = "Peter Lemenkov"; tta_plugin.init = tta_init; tta_plugin.shutdown = tta_shutdown; tta_plugin.can_handle = tta_can_handle; tta_plugin.open = tta_open; tta_plugin.close = tta_close; tta_plugin.play_frame = tta_play_frame; /* TODO */ tta_plugin.frame_seek = tta_frame_seek; /* TODO */ tta_plugin.frame_size = tta_frame_size; tta_plugin.nr_frames = tta_nr_frames; /* TODO */ tta_plugin.frame_to_sec = tta_frame_to_sec; /* TODO */ tta_plugin.sample_rate = tta_sample_rate; /* TODO */ tta_plugin.channels = tta_channels; /* TODO */ tta_plugin.stream_info = NULL; return &tta_plugin; } #ifdef __cplusplus } #endif alsaplayer-0.99.82/attic/experimental/tta/ttadec.c000066400000000000000000000276301466261456500220700ustar00rootroot00000000000000/* * ttadec.c * * Description: TTAv1 decoder library for HW players. * Developed by: Alexander Djourik * Pavel Zhilin * * Copyright (c) 1999-2004 Alexander Djourik. All rights reserved. * */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Please see the file COPYING in this directory for full copyright * information. */ #include #include #include #include "ttalib.h" #include "ttadec.h" #include "crc32.h" #include "filters.h" /******************* static variables and structures *******************/ static unsigned char isobuffers[ISO_BUFFERS_SIZE + 4]; static unsigned char *iso_buffers_end = isobuffers + ISO_BUFFERS_SIZE; static unsigned long pcm_buffer_size; static decoder tta[MAX_NCH]; // decoder state static long cache[MAX_NCH]; // decoder cache tta_info *ttainfo; // currently playing file info static unsigned long fframes; // number of frames in file static unsigned long framelen; // the frame length in samples static unsigned long lastlen; // the length of the last frame in samples static unsigned long data_pos; // currently playing frame index static unsigned long data_cur; // the playing position in frame static long maxvalue; // output data max value static unsigned long *seek_table; // the playing position table static unsigned long st_state; //seek table status static unsigned long frame_crc32; static unsigned long bit_count; static unsigned long bit_cache; static unsigned char *bitpos; static unsigned long bitrate; /************************* bit operations ******************************/ static void init_buffer_read() { frame_crc32 = 0xFFFFFFFFUL; bit_count = bit_cache = 0; bitpos = iso_buffers_end; } __inline void get_binary(unsigned long *value, unsigned long bits) { while (bit_count < bits) { if (bitpos == iso_buffers_end) { long res = fread(isobuffers, 1, ISO_BUFFERS_SIZE, ttainfo->HANDLE); if (!res) { ttainfo->STATE = READ_ERROR; return; } bitpos = isobuffers; } UPDATE_CRC32(*bitpos, frame_crc32); bit_cache |= *bitpos << bit_count; bit_count += 8; bitpos++; } *value = bit_cache & bit_mask[bits]; bit_cache >>= bits; bit_count -= bits; bit_cache &= bit_mask[bit_count]; } __inline void get_unary(unsigned long *value) { *value = 0; while (!(bit_cache ^ bit_mask[bit_count])) { if (bitpos == iso_buffers_end) { long res = fread(isobuffers, 1, ISO_BUFFERS_SIZE, ttainfo->HANDLE); if (!res) { ttainfo->STATE = READ_ERROR; return; } bitpos = isobuffers; } *value += bit_count; bit_cache = *bitpos++; UPDATE_CRC32(bit_cache, frame_crc32); bit_count = 8; } while (bit_cache & 1) { (*value)++; bit_cache >>= 1; bit_count--; } bit_cache >>= 1; bit_count--; } static long done_buffer_read() { unsigned long crc32, rbytes, res; frame_crc32 ^= 0xFFFFFFFFUL; rbytes = iso_buffers_end - bitpos; if (rbytes < sizeof(long)) { memcpy(isobuffers, bitpos, 4); res = fread(isobuffers + rbytes, 1, ISO_BUFFERS_SIZE - rbytes, ttainfo->HANDLE); if (!res) { ttainfo->STATE = READ_ERROR; return 0; } bitpos = isobuffers; } memcpy(&crc32, bitpos, 4); crc32 = ENDSWAP_INT32(crc32); bitpos += sizeof(long); res = (crc32 != frame_crc32); bit_cache = bit_count = 0; frame_crc32 = 0xFFFFFFFFUL; // calculate dynamic bitrate if (data_pos < fframes) { rbytes = seek_table[data_pos] - seek_table[data_pos - 1]; bitrate = (rbytes << 3) / 1070; } return res; } /************************* decoder functions ****************************/ static long skip_id3v2_header (FILE *infile) { struct { unsigned char id[3]; unsigned short version; unsigned char flags; unsigned char size[4]; } __ATTRIBUTE_PACKED__ id3v2; unsigned long len = 0; // read ID3V2 header if (fread (&id3v2, sizeof(id3v2), 1, infile) == 0) { fclose (infile); ttainfo->STATE = READ_ERROR; return -1; } // skip ID3V2 header if (!memcmp (id3v2.id, "ID3", 3)) { if (id3v2.size[0] & 0x80) { fclose (infile); ttainfo->STATE = FILE_ERROR; return FILE_ERROR; } len = (id3v2.size[0] & 0x7f); len = (len << 7) | (id3v2.size[1] & 0x7f); len = (len << 7) | (id3v2.size[2] & 0x7f); len = (len << 7) | (id3v2.size[3] & 0x7f); len += 10; if (id3v2.flags & (1 << 4)) len += 10; fseek (infile, len, SEEK_SET); } else fseek (infile, 0, SEEK_SET); return len; } long open_tta_file (const char *filename, tta_info *info, unsigned long data_offset) { FILE *infile; tta_hdr ttahdr; unsigned long checksum; // clear the memory memset (info, 0, sizeof(tta_info)); info->HANDLE = infile = fopen(filename, "rb"); if (!infile) return OPEN_ERROR; // skip id3v2 header if (!data_offset) { data_offset = skip_id3v2_header(infile); if (data_offset < 0) return -1; } else fseek (infile, data_offset, SEEK_SET); // read TTA header if (fread (&ttahdr, 1, sizeof (ttahdr), infile) == 0) { fclose (infile); info->STATE = READ_ERROR; return -1; } // check for TTA3 signature if (ENDSWAP_INT32(ttahdr.TTAid) != TTA1_SIGN) { fclose (infile); info->STATE = FORMAT_ERROR; return -1; } ttahdr.CRC32 = ENDSWAP_INT32(ttahdr.CRC32); checksum = crc32((unsigned char *) &ttahdr, sizeof(tta_hdr) - sizeof(long)); if (checksum != ttahdr.CRC32) { fclose (infile); info->STATE = FILE_ERROR; return -1; } ttahdr.AudioFormat = ENDSWAP_INT16(ttahdr.AudioFormat); ttahdr.NumChannels = ENDSWAP_INT16(ttahdr.NumChannels); ttahdr.BitsPerSample = ENDSWAP_INT16(ttahdr.BitsPerSample); ttahdr.SampleRate = ENDSWAP_INT32(ttahdr.SampleRate); ttahdr.DataLength = ENDSWAP_INT32(ttahdr.DataLength); // check for player supported formats if (ttahdr.AudioFormat != WAVE_FORMAT_PCM || ttahdr.NumChannels > MAX_NCH || ttahdr.BitsPerSample > MAX_BPS ||( ttahdr.SampleRate != 16000 && ttahdr.SampleRate != 22050 && ttahdr.SampleRate != 24000 && ttahdr.SampleRate != 32000 && ttahdr.SampleRate != 44100 && ttahdr.SampleRate != 48000 && ttahdr.SampleRate != 64000 && ttahdr.SampleRate != 88200 && ttahdr.SampleRate != 96000)) { fclose (infile); info->STATE = FORMAT_ERROR; return FORMAT_ERROR; } // fill the File Info info->HANDLE = infile; info->NCH = ttahdr.NumChannels; info->BPS = ttahdr.BitsPerSample; info->BSIZE = (ttahdr.BitsPerSample + 7)/8; info->FORMAT = ttahdr.AudioFormat; info->SAMPLERATE = ttahdr.SampleRate; info->DATALENGTH = ttahdr.DataLength; info->FRAMELEN = (long) (FRAME_TIME * ttahdr.SampleRate); info->LENGTH = ttahdr.DataLength / ttahdr.SampleRate; info->DATAPOS = data_offset; return 0; } static void rice_init(adapt *rice, unsigned long k0, unsigned long k1) { rice->k0 = k0; rice->k1 = k1; rice->sum0 = shift_16[k0]; rice->sum1 = shift_16[k1]; } static void decoder_init(decoder *tta, long nch, long byte_size) { long shift = flt_set[byte_size - 1]; long i; for (i = 0; i < nch; i++) { filter_init(&tta[i].fst, shift); rice_init(&tta[i].rice, 10, 10); tta[i].last = 0; } } static void seek_table_init (unsigned long *seek_table, unsigned long len, unsigned long data_offset) { unsigned long *st, frame_len; for (st = seek_table; st < (seek_table + len); st++) { frame_len = ENDSWAP_INT32(*st); *st = data_offset; data_offset += frame_len; } } long set_position (unsigned long pos) { unsigned long seek_pos; if (pos >= fframes) return 0; if (!st_state) { ttainfo->STATE = FILE_ERROR; return -1; } seek_pos = ttainfo->DATAPOS + seek_table[data_pos = pos]; fseek(ttainfo->HANDLE, seek_pos, SEEK_SET); data_cur = 0; framelen = 0; // init bit reader init_buffer_read(); return 0; } long player_init (tta_info *info) { unsigned long checksum; unsigned long data_offset; unsigned long st_size; ttainfo = info; framelen = 0; data_pos = 0; data_cur = 0; bitrate = 0; lastlen = ttainfo->DATALENGTH % ttainfo->FRAMELEN; fframes = ttainfo->DATALENGTH / ttainfo->FRAMELEN + (lastlen ? 1:0); st_size = (fframes + 1) * sizeof(long); seek_table = (unsigned long *) malloc(st_size); if (!seek_table) { ttainfo->STATE = MEMORY_ERROR; return -1; } // read seek table if (!fread(seek_table, st_size, 1, ttainfo->HANDLE)) { ttainfo->STATE = READ_ERROR; return -1; } checksum = crc32((unsigned char *) seek_table, st_size - sizeof(long)); st_state = (checksum == ENDSWAP_INT32(seek_table[fframes])); data_offset = sizeof(tta_hdr) + st_size; // init seek table seek_table_init(seek_table, fframes, data_offset); // init bit reader init_buffer_read(); pcm_buffer_size = PCM_BUFFER_LENGTH * ttainfo->BSIZE * ttainfo->NCH; maxvalue = (1UL << ttainfo->BPS) - 1; return 0; } void close_tta_file (tta_info *info) { if (info->HANDLE) { fclose (info->HANDLE); info->HANDLE = NULL; } } void player_stop () { if (seek_table) { free(seek_table); seek_table = NULL; } } long get_bitrate () { return bitrate; } long get_samples (byte *buffer) { unsigned long k, depth, unary, binary; byte *p = buffer; decoder *dec = tta; long *prev = cache; long value, res; for (res = 0; p < buffer + pcm_buffer_size;) { fltst *fst = &dec->fst; adapt *rice = &dec->rice; long *last = &dec->last; if (data_cur == framelen) { if (data_pos == fframes) break; if (framelen && done_buffer_read()) { if (set_position(data_pos) < 0) return -1; if (res) break; } if (data_pos == fframes - 1 && lastlen) framelen = lastlen; else framelen = ttainfo->FRAMELEN; decoder_init(tta, ttainfo->NCH, ttainfo->BSIZE); data_pos++; data_cur = 0; } // decode Rice unsigned get_unary(&unary); switch (unary) { case 0: depth = 0; k = rice->k0; break; default: depth = 1; k = rice->k1; unary--; } if (k) { get_binary(&binary, k); value = (unary << k) + binary; } else value = unary; switch (depth) { case 1: rice->sum1 += value - (rice->sum1 >> 4); if (rice->k1 > 0 && rice->sum1 < shift_16[rice->k1]) rice->k1--; else if (rice->sum1 > shift_16[rice->k1 + 1]) rice->k1++; value += bit_shift[rice->k0]; default: rice->sum0 += value - (rice->sum0 >> 4); if (rice->k0 > 0 && rice->sum0 < shift_16[rice->k0]) rice->k0--; else if (rice->sum0 > shift_16[rice->k0 + 1]) rice->k0++; } value = DEC(value); // decompress stage 1: adaptive hybrid filter hybrid_filter(fst, &value); // decompress stage 2: fixed order 1 prediction switch (ttainfo->BSIZE) { case 1: value += PREDICTOR1(*last, 4); break; // bps 8 case 2: value += PREDICTOR1(*last, 5); break; // bps 16 case 3: value += PREDICTOR1(*last, 5); break; // bps 24 case 4: value += *last; break; // bps 32 } *last = value; // check for errors if (abs(value) > maxvalue) { unsigned long tail = pcm_buffer_size / (ttainfo->BSIZE * ttainfo->NCH) - res; memset(buffer, 0, pcm_buffer_size); data_cur += tail; res += tail; break; } if (dec < tta + (ttainfo->NCH - 1)) { *prev++ = value; dec++; } else { *prev = value; if (ttainfo->NCH > 1) { long *r = prev - 1; for (*prev += *r/2; r >= cache; r--) *r = *(r + 1) - *r; for (r = cache; r < prev; r++) WRITE_BUFFER(r, ttainfo->BSIZE, p) } WRITE_BUFFER(prev, ttainfo->BSIZE, p) prev = cache; data_cur++; res++; dec = tta; } } return res; } /* end */ alsaplayer-0.99.82/attic/experimental/tta/ttadec.h000066400000000000000000000074421466261456500220740ustar00rootroot00000000000000/* * ttadec.h * * Description: TTAv1 decoder definitions and prototypes * Developed by: Alexander Djourik * Pavel Zhilin * * Copyright (c) 1999-2004 Alexander Djourik. All rights reserved. * */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Please see the file COPYING in this directory for full copyright * information. */ #ifndef TTADEC_H_ #define TTADEC_H_ #ifdef _WIN32 #pragma pack(1) #define __ATTRIBUTE_PACKED__ #else #define __ATTRIBUTE_PACKED__ __attribute__((packed)) #endif #define TTA1_SIGN 0x31415454 #define FRAME_TIME 1.04489795918367346939 #define MAX_ORDER 8 #ifndef WAVE_FORMAT_PCM #define WAVE_FORMAT_PCM 1 #endif #ifdef _WIN32 typedef unsigned __int64 uint64; #else typedef unsigned long long uint64; #endif const unsigned long bit_mask[] = { 0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff }; const unsigned long bit_shift[] = { 0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020, 0x00000040, 0x00000080, 0x00000100, 0x00000200, 0x00000400, 0x00000800, 0x00001000, 0x00002000, 0x00004000, 0x00008000, 0x00010000, 0x00020000, 0x00040000, 0x00080000, 0x00100000, 0x00200000, 0x00400000, 0x00800000, 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; const unsigned long *shift_16 = bit_shift + 4; typedef unsigned char byte; #ifdef _BIG_ENDIAN #define ENDSWAP_INT16(x) (((((x)>>8)&0xFF)|(((x)&0xFF)<<8))) #define ENDSWAP_INT32(x) (((((x)>>24)&0xFF)|(((x)>>8)&0xFF00)|(((x)&0xFF00)<<8)|(((x)&0xFF)<<24))) #define WRITE_BUFFER(x, bsize, out) { \ if (bsize > 2) *out++ = (byte)(*x >> 16); \ if (bsize > 1) *out++ = (byte)(*x >> 8); \ *out++ = (byte) *x; } #else #define ENDSWAP_INT16(x) (x) #define ENDSWAP_INT32(x) (x) #define WRITE_BUFFER(x, bsize, out) { \ *out++ = (byte) *x; \ if (bsize > 1) *out++ = (byte)(*x >> 8); \ if (bsize > 2) *out++ = (byte)(*x >> 16); } #endif #define PREDICTOR1(x, k) ((long)((((uint64)x << k) - x) >> k)) #define DEC(x) (((x)&1)?(++(x)>>1):(-(x)>>1)) typedef struct { unsigned long TTAid; unsigned short AudioFormat; unsigned short NumChannels; unsigned short BitsPerSample; unsigned long SampleRate; unsigned long DataLength; unsigned long CRC32; } __ATTRIBUTE_PACKED__ tta_hdr; typedef struct { unsigned long k0; unsigned long k1; unsigned long sum0; unsigned long sum1; } adapt; typedef struct { long shift; long round; long error; long mutex; long qm[MAX_ORDER+1]; long dx[MAX_ORDER+1]; long dl[MAX_ORDER+1]; } fltst; typedef struct { fltst fst; adapt rice; long last; } decoder; #endif /* TTADEC_H_ */ alsaplayer-0.99.82/attic/experimental/tta/ttalib.h000066400000000000000000000110001466261456500220700ustar00rootroot00000000000000/* * ttalib.h * * Description: TTAv1 player library prototypes * Developed by: Alexander Djourik * Pavel Zhilin * * Copyright (c) 1999-2004 Alexander Djourik. All rights reserved. * */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Please see the file COPYING in this directory for full copyright * information. */ #ifndef TTALIB_H_ #define TTALIB_H_ //#define _BIG_ENDIAN #define MAX_BPS 24 // Max supported Bit resolution #define MAX_NCH 8 // Max supported number of channels // return codes #define NO_ERROR 0 #define OPEN_ERROR 1 // Can't open file #define FORMAT_ERROR 2 // Unknown TTA format version #define PLAYER_ERROR 3 // Not supported file format #define FILE_ERROR 4 // File is corrupted #define READ_ERROR 5 // Can't read from file #define MEMORY_ERROR 6 // Insufficient memory available #define FRAME_TIME 1.04489795918367346939 #define SEEK_STEP (int)(FRAME_TIME * 1000) #define ISO_BUFFER_LENGTH (1024*32) #define ISO_NBUFFERS (8) #define ISO_BUFFERS_SIZE (ISO_BUFFER_LENGTH*ISO_NBUFFERS) #define PCM_BUFFER_LENGTH (4608) typedef struct { FILE *HANDLE; // file handle unsigned short NCH; // number of channels unsigned short BPS; // bits per sample unsigned short BSIZE; // byte size unsigned short FORMAT; // audio format unsigned long SAMPLERATE; // samplerate (sps) unsigned long DATALENGTH; // data length in samples unsigned long FRAMELEN; // frame length unsigned long LENGTH; // playback time (sec) unsigned long STATE; // return code unsigned long DATAPOS; // size of ID3v2 header } tta_info; /*********************** Library functions *************************/ #ifdef LIBTEST #ifndef DPRINTF #define DPRINTF(x) fprintf(stderr, (x)) #endif /* DPRINTF */ static void tta_error (int error) { DPRINTF("TTA Decoder Error - "); switch (error) { case OPEN_ERROR: DPRINTF("Can't open file\n"); break; case FORMAT_ERROR: DPRINTF("Not supported file format\n"); break; case FILE_ERROR: DPRINTF("File is corrupted\n"); break; case READ_ERROR: DPRINTF("Can't read from file\n"); break; case MEMORY_ERROR: DPRINTF("Insufficient memory available\n"); break; } } #endif /* LIBTEST */ long open_tta_file ( // FUNCTION: opens TTA file const char *filename, // file to open tta_info *info, // file info structure unsigned long offset); // ID3v2 header size /* * RETURN VALUE * This function returns 0 if success. Otherwise, -1 is returned * and the variable STATE of the currently using info structure * is set to indicate the error. * */ void close_tta_file ( // FUNCTION: closes currently playing file tta_info *info); // file info structure long set_position ( // FUNCTION: sets playback position unsigned long pos); // seek position = seek_time_ms / SEEK_STEP /* * RETURN VALUE * This function returns 0 if success. Otherwise, -1 is returned * and the variable STATE of the currently using info structure * is set to indicate the error. * */ long player_init ( // FUNCTION: initializes TTA player tta_info *info); // file info structure /* * RETURN VALUE * This function returns 0 if success. Otherwise, -1 is returned * and the variable STATE of the currently using info structure * is set to indicate the error. * */ void player_stop (void); // FUNCTION: destroys memory pools long get_samples ( // FUNCTION: decode PCM_BUFFER_LENGTH samples unsigned char *buffer); // into the current PCM buffer position /* * RETURN VALUE * This function returns the number of samples successfully decoded. * Otherwise, -1 is returned and the variable STATE of the currently * using info structure is set to indicate the error. * */ long get_bitrate (void); // RETURN VALUE: TTA dynamic bitrate #endif /* TTALIB_H_ */ alsaplayer-0.99.82/attic/experimental/wv/000077500000000000000000000000001466261456500203145ustar00rootroot00000000000000alsaplayer-0.99.82/attic/experimental/wv/ChangeLog000066400000000000000000000013441466261456500220700ustar00rootroot00000000000000* Sun Nov 4 2007 Peter Lemenkov - Save path of playing file for future use in CorePlayer - Prevent double free attempt. * Tue Apr 3 2007 Peter Lemenkov -Fix for endianness * Tue Apr 3 2007 Dominique Michel - Conditional PREFIX in Makefile; use "PREFIX= make" - Added target install in Makefile * Tue Apr 3 2007 Peter Lemenkov - use of input_object->path * Mon Apr 2 2007 Peter Lemenkov - Ver. 0.0.0.3 - Added initial support for tags * Tue Feb 27 2007 Peter Lemenkov - Ver. 0.0.0.2 - Removed unnecessary variables - Fixed wrong detection of elapsed time - Still only 16/2/44100 alsaplayer-0.99.82/attic/experimental/wv/Makefile000066400000000000000000000007201466261456500217530ustar00rootroot00000000000000PREFIX? = /usr # choose suitable compiler COMPILATOR = gcc DEBUG = -Wall -O2 CFLAGS = -fPIC CPPFLAGS = -I$(PREFIX)/include LINKER_FLAGS = -L${PREFIX}/lib -lwavpack LINKER_OBJECTS = wv_engine.o # bumps the empty 'make' command all: $(LINKER_OBJECTS) $(CC) -shared -fPIC $(LINKER_OBJECTS) $(LINKER_FLAGS) -o wv_engine.so .cpp.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< install: cp wv_engine.so $(PREFIX)/lib/alsaplayer/input/ clean: rm -f *.so *.o *~ alsaplayer-0.99.82/attic/experimental/wv/wv_engine.c000066400000000000000000000150151466261456500224430ustar00rootroot00000000000000/* * wv_engine.cpp (C) 2006-2007 by Peter Lemenkov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include /* memset */ #include #include #include #include #include #ifdef __BIG_ENDIAN #include /* BE to LE */ #endif #define BLOCK_SIZE 4096 /* We can use any block size we like */ static int wv_init(void) { return 1; } static void wv_shutdown(void) { return; } static float wv_can_handle(const char *path) { char *ext; ext = strrchr(path, '.'); if (!ext) return 0.0; ext++; if (!strcasecmp(ext, "wv")) return 1.0; return 0.0; } static int wv_open(input_object *obj, const char *path) { char error [128]; void* datasource = NULL; if (!obj) return 0; if ((datasource = reader_open(path, NULL, NULL)) == NULL) return 0; obj->flags = 0; if (reader_seekable ((reader_type*)datasource)) { obj->flags |= P_SEEK; obj->flags |= P_PERFECTSEEK; obj->flags |= P_FILEBASED; } else obj->flags |= P_STREAMBASED; obj->local_data = WavpackOpenFileInput (path, error, OPEN_TAGS | OPEN_2CH_MAX | OPEN_NORMALIZE, 23); if (!obj->local_data) return 0; else printf ("WPC: RC[%u], NC[%u], NS[%u], SR[%u], ByPS[%u], V[%u]\n", WavpackGetReducedChannels (obj->local_data), WavpackGetNumChannels (obj->local_data), WavpackGetNumSamples (obj->local_data), WavpackGetSampleRate (obj->local_data), WavpackGetBytesPerSample (obj->local_data), WavpackGetVersion(obj->local_data)); obj->nr_channels = WavpackGetReducedChannels (obj->local_data); obj->nr_tracks = 1; obj->frame_size = BLOCK_SIZE; return 1; } static void wv_close(input_object *obj) { if (!obj || !(obj->local_data)) return; WavpackCloseFile (obj->local_data); obj->local_data = NULL; } static long wv_frame_to_sec (input_object *obj, int frame) { if (!obj || !(obj->local_data)) return 0; return (frame * obj->frame_size) / (WavpackGetSampleRate (obj->local_data) * WavpackGetBytesPerSample (obj->local_data) * obj->nr_channels) * 100; } static int wv_sample_rate(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return WavpackGetSampleRate (obj->local_data); } static int wv_channels(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return obj->nr_channels; } static int wv_stream_info (input_object *obj, stream_info *info) { if (!info || !obj || !(obj->local_data)) return 0; sprintf(info->stream_type, "WavPack version %u", WavpackGetVersion(obj->local_data)); strcpy(info->status, "playing..."); strcpy(info->path, obj->path); WavpackGetTagItem(obj->local_data,"Artist", info->artist, 128); WavpackGetTagItem(obj->local_data,"Title", info->title, 128); WavpackGetTagItem(obj->local_data,"Album", info->album, 128); WavpackGetTagItem(obj->local_data,"Comment", info->comment, 128); WavpackGetTagItem(obj->local_data,"Genre", info->genre, 128); WavpackGetTagItem(obj->local_data,"Track", info->track, 10); WavpackGetTagItem(obj->local_data,"Year", info->year, 10); info->channels = obj->nr_channels; info->tracks = 1; // number of tracks info->current_track = 1; // number of current track info->sample_rate = WavpackGetSampleRate (obj->local_data); info->bitrate = (int)WavpackGetAverageBitrate (obj->local_data, obj->nr_channels); return 1; } static int wv_nr_frames(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return (WavpackGetNumSamples (obj->local_data) * WavpackGetBytesPerSample (obj->local_data) * obj->nr_channels / obj->frame_size); } static int wv_frame_size(input_object *obj) { if (!obj || !(obj->local_data)) return 0; return obj->frame_size; } static int wv_frame_seek(input_object *obj, int frame) { if (!obj || !(obj->local_data) || obj->flags & P_STREAMBASED) return 0; WavpackSeekSample (obj->local_data, frame * obj->frame_size / (WavpackGetBytesPerSample (obj->local_data))); return frame; } static int wv_play_frame (input_object *obj, char *buf) { int i; uint32_t ret; if (!obj || !(obj->local_data)) return 0; int32_t* samples = (int32_t*) calloc (obj->frame_size / WavpackGetBytesPerSample (obj->local_data), sizeof (int32_t)); ret = WavpackUnpackSamples (obj->local_data, samples, obj->frame_size / (WavpackGetBytesPerSample (obj->local_data) * obj->nr_channels)); if (WavpackGetBytesPerSample (obj->local_data) == 2){ for (i = 0; i < obj->frame_size / WavpackGetBytesPerSample (obj->local_data); i++){ #ifdef __BIG_ENDIAN__ /* tile.tileIndex = __le16_to_cpu(tile.tileIndex); tile.indexAddon = __le16_to_cpu(tile.indexAddon); tile.uniqNumber1 = __le32_to_cpu(tile.uniqNumber1); tile.uniqNumber2 = __le32_to_cpu(tile.uniqNumber2); */ buf[2*i] = samples[i] >> 8; buf[2*i+1] = samples[i]; #else buf[2*i] = samples[i]; buf[2*i+1] = samples[i] >> 8; #endif } } // printf ("WV: ret[%d]\n", ret); free (samples); if (ret == 0) return 0; return 1; } static input_plugin wv_plugin; #ifdef __cplusplus extern "C" { #endif input_plugin *input_plugin_info (void) { memset(&wv_plugin, 0, sizeof(input_plugin)); wv_plugin.version = INPUT_PLUGIN_VERSION; wv_plugin.name = "WavPack plugin ver. 0.0.0.3"; wv_plugin.author = "Peter Lemenkov"; wv_plugin.init = wv_init; // DONE wv_plugin.shutdown = wv_shutdown; //DONE wv_plugin.can_handle = wv_can_handle; // DONE wv_plugin.open = wv_open; // DONE wv_plugin.close = wv_close; // DONE wv_plugin.play_frame = wv_play_frame; // TODO wv_plugin.frame_seek = wv_frame_seek; // DONE wv_plugin.frame_size = wv_frame_size; // DONE wv_plugin.nr_frames = wv_nr_frames; // DONE wv_plugin.frame_to_sec = wv_frame_to_sec; // DONE wv_plugin.sample_rate = wv_sample_rate; // DONE wv_plugin.channels = wv_channels; // DONE wv_plugin.stream_info = wv_stream_info; // TODO return &wv_plugin; } #ifdef __cplusplus } #endif alsaplayer-0.99.82/attic/fftscope/000077500000000000000000000000001466261456500167745ustar00rootroot00000000000000alsaplayer-0.99.82/attic/fftscope/AUTHORS000066400000000000000000000002351466261456500200440ustar00rootroot00000000000000Andy Lo A Foe based on code by Richard Boulton Tinic Uro Debugging by Dominique Michel alsaplayer-0.99.82/attic/fftscope/COPYING000066400000000000000000001043731466261456500200370ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . alsaplayer-0.99.82/attic/fftscope/ChangeLog000066400000000000000000000017431466261456500205530ustar00rootroot00000000000000Wed Dec 19 2007 --------------- * Replaced include by . Needed on OSX. Thu Jul 12 2007 --------------- * Removed unneeded excpetion from the license file. Sun Jul 08 2007 --------------- " Updated licence to GPL-v3 or later. Sun June 24 2007 ---------------- * Moved obsolete gtk1 version into trunk/experimental/fftscope * Moved fftscope into main directory. Sun June 10 2007 ---------------- * Removed unwanted wmclass Sat May 26 2007 --------------- * FftScope for GTK2 initial commit * Changed GTK2 micro version to 4-gtk2 in order to avoid collision with the GTK1 scope Tue May 22 22:21:44 CEST 2007 ----------------------------- * Makefile.am use AM_CFLAGS instead of CFLAGS Mon May 21 21:40:08 CEST 2007 ----------------------------- * Fixed quit function. Thu May 16 15:38:22 CEST 2002 ----------------------------- * Remember window status * Follow minor API changes Sun Mar 31 15:39:14 CEST 2002 ----------------------------- * First packaged release alsaplayer-0.99.82/attic/fftscope/Makefile.am000066400000000000000000000006221466261456500210300ustar00rootroot00000000000000fftscopeltlibs = libfftscope.la fftscopeldflags = -export-dynamic -avoid-version @GTK2_LIBS@ fftscopesources = fftscope.c lib_LTLIBRARIES = $(fftscopeltlibs) libdir = $(PLUGIN_DIR)/scopes2 AM_CFLAGS = -D_REENTRANT -I$(top_builddir) @GTK2_CFLAGS@ @ALSAPLAYER_CFLAGS@ libfftscope_la_LDFLAGS = $(fftscopeldflags) LIBS = libfftscope_la_SOURCES= $(fftscopesources) EXTRA_DIST = bootstrap fftscope.png alsaplayer-0.99.82/attic/fftscope/NEW000066400000000000000000000000001466261456500173360ustar00rootroot00000000000000alsaplayer-0.99.82/attic/fftscope/NEWS000066400000000000000000000003121466261456500174670ustar00rootroot00000000000000Sun Jul 08 2007 --------------- First release of FftScope for AlsaPlayer under the GPL-v3. Sat May 26 14:51:23 CEST 2007 ----------------------------- First release of the GTK+-2 version of this scope alsaplayer-0.99.82/attic/fftscope/README000066400000000000000000000015731466261456500176620ustar00rootroot00000000000000Introduction ------------ FftScope is the first released external visualization scope for AlsaPlayer It will hopefully be a good starting point for others. The scope API is generic enough to be useful in other projects. The ultimate goal is to create a system wide visualization by either tapping straight into ALSA or the jack sound server. To learn more about AlsaPlayer please visit the webpage; http://www.alsaplayer.org Building -------- Make sure you have AlsaPlayer installed, including the development files (libalsaplayer-version-dev if you are using a packaging system). Running ./configure && make && make install should build and install the FFTscope on your system. You will have to restart a running alsaplayer for the new scope to show up. Original Author --------------- You can reach me at andy@loafoe.com Current Maintainer ----------------- dominique@tuxfamily.org alsaplayer-0.99.82/attic/fftscope/bootstrap000077500000000000000000000023211466261456500207350ustar00rootroot00000000000000#! /bin/sh # Check Autoconf version if [ -x `which autoconf` ]; then AC_VER=`autoconf --version | head -1 | sed 's/^[^0-9]*//'` AC_VER_MAJOR=`echo $AC_VER | cut -f1 -d'.'` AC_VER_MINOR=`echo $AC_VER | cut -f2 -d'.' | sed 's/[^0-9]*$//'` if [ "$AC_VER_MAJOR" -lt "2" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "13" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "50" ]; then if [ ! -e configure.in ]; then ln -s configure.ac configure.in fi echo "If you see some warnings about cross-compiling, don't worry; this is normal." else rm -f configure.in fi else echo Autoconf not found. AlsaPlayer CVS requires autoconf to bootstrap itself. exit 1 fi run_cmd() { echo running $* ... if ! $*; then echo failed! exit 1 fi } # Check if /usr/local/share/aclocal exists if [ -d /usr/local/share/aclocal ]; then ACLOCAL_INCLUDE="$ACLOCAL_INCLUDE -I /usr/local/share/aclocal" fi run_cmd aclocal $ACLOCAL_INCLUDE run_cmd autoheader run_cmd libtoolize --automake run_cmd automake --add-missing run_cmd autoconf echo echo "Now type './configure' to configure the FFTscope" echo alsaplayer-0.99.82/attic/fftscope/configure.ac000066400000000000000000000035661466261456500212740ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(fftscope.c) FFTSCOPE_MAJOR_VERSION=1 FFTSCOPE_MINOR_VERSION=0 FFTSCOPE_MICRO_VERSION=6 BETA= FFTSCOPE_VERSION=$FFTSCOPE_MAJOR_VERSION.$FFTSCOPE_MINOR_VERSION.${FFTSCOPE_MICRO_VERSION}${BETA} AM_INIT_AUTOMAKE(fftscope, ${FFTSCOPE_VERSION}) AM_MAINTAINER_MODE if test "x$x_includes" = "xNONE" then x_includes=/usr/X11R6/include fi if test "x$x_libraries" = "xNONE" then x_libraries=/usr/X11R6/lib fi dnl Check for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AM_DISABLE_STATIC AM_PROG_LIBTOOL AC_PROG_MAKE_SET AM_PATH_GLIB(1.2.6, have_glib=yes, have_glib=no) AC_HEADER_STDC dnl pkg-config stuff if test -z $PKG_CONFIG_PATH; then PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig fi AC_ARG_WITH(alsaplayer, [ --with-alsaplayer Location of alsaplayer build dir (will prepend to PKG_CONFIG_PATH)], [PKG_CONFIG_PATH="${withval}:${PKG_CONFIG_PATH}"],) export PKG_CONFIG_PATH PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3) AC_SUBST(GTK2_LIBS) AC_SUBST(GTK2_CFLAGS) PKG_CHECK_MODULES(ALSAPLAYER, alsaplayer >= 0.99.60) PLUGIN_DIR=`pkg-config alsaplayer --variable=plugindir` INTERFACEPLUGIN_DIR=`pkg-config alsaplayer --variable=interfaceplugindir` INPUTPLUGIN_DIR=`pkg-config alsaplayer --variable=inputplugindir` OUTPUTPLUGIN_DIR=`pkg-config alsaplayer --variable=outputplugindir` SCOPEPLUGIN_DIR=`pkg-config alsaplayer --variable=scopeplugindir` AC_SUBST(ALSAPLAYER_LIBS) AC_SUBST(ALSAPLAYER_CFLAGS) AC_SUBST(PLUGIN_DIR) AC_SUBST(INTERFACEPLUGIN_DIR) AC_SUBST(INPUTPLUGIN_DIR) AC_SUBST(OUTPUTPLUGIN_DIR) AC_SUBST(SCOPEPLUGIN_DIR) AM_CONFIG_HEADER(config.h) AC_SUBST(FFTSCOPE_MAJOR_VERSION) AC_SUBST(FFTSCOPE_MINOR_VERSION) AC_SUBST(FFTSCOPE_MICRO_VERSION) AC_SUBST(FFTSCOPE_VERSION) AC_OUTPUT([ Makefile ]) echo echo Now type \'make\' to build the FFTscope. echo alsaplayer-0.99.82/attic/fftscope/fftscope.c000066400000000000000000000157071466261456500207630ustar00rootroot00000000000000/* fftscope.c * Copyright (C) 2002 Andy Lo A Foe * Copyright (C) 1999 Richard Boulton * Original code by Tinic Uro * * This file is part of FftScope. * * FftScope 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 3 of the License, or * (at your option) any later version. * * FftScope is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * 2002-03-30: converted to use indexed pixmap * * $Id: fftscope.c 1119 2007-05-21 19:30:33Z dominique_libre $ * */ #include #include #include #include #include #include #include #include #include "prefs.h" #include "alsaplayer/scope_plugin.h" #include "alsaplayer/utilities.h" #define SCOPE_HEIGHT 128 /* Only tested for 64 and 128 */ static int act_fft[512]; static GdkImage *image = NULL; static GtkWidget *scope_win = NULL; static GdkRgbCmap *color_map = NULL; static GtkWidget *area = NULL; static int ready_state = 0; static pthread_t fftscope_thread; static pthread_mutex_t fftscope_mutex; static int is_init = 0; static int running = 0; static void fftscope_hide(); static void stop_fftscope(); static const int default_colors[] = { 10, 20, 30, 230, 230, 230 }; /* * Important note: the set_fft and set_data calls should NEVER contain * calls that can block. These functions are called from the main audio * thread so they should ideally not do any heavy computation and definitely * not contain blocking calls. * * fft_buffer is an int array with samples * channels integers * All fft samples are grouped per channel so the data is NON-interleaved * */ void fftscope_set_fft(void *fft_buffer, int samples, int channels) { if (!fft_buffer || (samples * channels) > 512) { memset(act_fft, 0, sizeof(act_fft)); return; } /* Just store data for later use inside the render thread */ memcpy(act_fft, fft_buffer, (sizeof(int)) * samples * channels); } /* The actual FFTscope renderer function. */ static void the_fftscope() { guint8 *loc; guint8 bits[256 * 129]; int i, h; running = 1; while (running) { int w; guint val; memset(bits, 128, 256 * SCOPE_HEIGHT); for (i = 0; i < 256; i++) { val = (act_fft[i] + act_fft[i + 256]) / (64 * (128 / SCOPE_HEIGHT)); if (val > (SCOPE_HEIGHT-1)) { val = (SCOPE_HEIGHT-1); } loc = bits + i + 256 * (SCOPE_HEIGHT-1); for (h = val; h > 0; h--) { *loc = h; loc -= 256; } } GDK_THREADS_ENTER(); gdk_draw_indexed_image(area->window, area->style->white_gc, 0, 0, 256, SCOPE_HEIGHT, GDK_RGB_DITHER_NONE, bits, 256, color_map); gdk_flush(); GDK_THREADS_LEAVE(); dosleep(SCOPE_SLEEP); } GDK_THREADS_ENTER(); fftscope_hide(); GDK_THREADS_LEAVE(); } static gboolean close_fftscope_window(GtkWidget * widget, GdkEvent * event, gpointer data) { GDK_THREADS_LEAVE(); stop_fftscope(); GDK_THREADS_ENTER(); return TRUE; } /* Init function. Here we setup all the gtk stuff */ static GtkWidget *init_fftscope_window() { GtkWidget *fftscope_win; GtkStyle *style; GdkColor color; guint32 colors[129]; int i; pthread_mutex_init(&fftscope_mutex, NULL); style = gtk_style_new(); fftscope_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(fftscope_win), "FFTscope"); gtk_widget_set_usize(fftscope_win, 256, SCOPE_HEIGHT); gtk_window_set_policy(GTK_WINDOW(fftscope_win), FALSE, FALSE, FALSE); style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(fftscope_win))); color.red = SCOPE_BG_RED << 8; color.blue = SCOPE_BG_BLUE << 8; color.green = SCOPE_BG_GREEN << 8; gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_widget_set_style(GTK_WIDGET(fftscope_win), style); for (i = 0; i < 32; i++) { colors[i * 2] = colors[i * 2 + 1] = ((i * 8) << 16) + (255 << 8); colors[i * 2 + 64] = colors[i * 2 + 65] = (255 << 16) + (((31 - i) * 8) << 8); } colors[128] = 0; color_map = gdk_rgb_cmap_new(colors, 129); area = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(fftscope_win), area); gtk_widget_realize(area); gdk_window_set_background(area->window, &color); gtk_widget_show(area); gtk_widget_show(fftscope_win); /* Signals */ gtk_signal_connect(GTK_OBJECT(fftscope_win), "delete_event", GTK_SIGNAL_FUNC(close_fftscope_window), fftscope_win); /* Clear and show the window */ gdk_window_clear(fftscope_win->window); gdk_flush(); ready_state = 1; return fftscope_win; } static void fftscope_hide() { gint x, y; if (scope_win) { gdk_window_get_root_origin(scope_win->window, &x, &y); gtk_widget_hide(scope_win); gtk_widget_set_uposition(scope_win, x, y); } } /* Called to stop the FFTscope window */ static void stop_fftscope() { running = 0; pthread_join(fftscope_thread, NULL); } /* This is our main looper */ static void run_fftscope(void *data) { nice(SCOPE_NICE); // Be nice to most processes the_fftscope(); pthread_mutex_unlock(&fftscope_mutex); pthread_exit(NULL); } /* Called to startup the FFTscope */ static void start_fftscope() { if (!is_init) { scope_win = init_fftscope_window(); is_init = 1; } if (pthread_mutex_trylock(&fftscope_mutex) != 0) { printf("fftscope already running\n"); return; } gtk_widget_show(scope_win); pthread_create(&fftscope_thread, NULL, (void *(*)(void *)) run_fftscope, NULL); } /* Init function */ static int init_fftscope() { int i; memset(act_fft, 0, sizeof(act_fft)); if (prefs_get_bool(ap_prefs, "fftscope", "active", 0)) start_fftscope(); return 1; } /* Are we running? */ static int fftscope_running() { return running; } /* Shutdown function. Should deallocate stuff here too */ static void shutdown_fftscope(void) { prefs_set_bool(ap_prefs, "fftscope", "active", fftscope_running()); if (fftscope_running()) { stop_fftscope(); } } /* The C struct that contains all our functions */ static scope_plugin fftscope_plugin; /* Our entry point so the HOST can get to the above struct */ scope_plugin *scope_plugin_info() { memset(&fftscope_plugin, 0, sizeof(scope_plugin)); fftscope_plugin.version = SCOPE_PLUGIN_VERSION; fftscope_plugin.name = "FFTscope"; fftscope_plugin.author = "Andy Lo-A-Foe, Richard Boulton & Dominique Michel"; fftscope_plugin.init = init_fftscope; fftscope_plugin.start = start_fftscope; fftscope_plugin.running = fftscope_running; fftscope_plugin.stop = stop_fftscope; fftscope_plugin.shutdown = shutdown_fftscope; fftscope_plugin.set_fft = fftscope_set_fft; /* We don't assign set_data since it's not needed for this plugin */ return &fftscope_plugin; } alsaplayer-0.99.82/attic/fftscope/fftscope.png000066400000000000000000000313521466261456500213170ustar00rootroot00000000000000‰PNG  IHDR;Ëž[£=bKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ!8`ÎX" IDATxœí}½²%9rÞ—‰º=íé8ÆD¬» jÄÕÏJZj †~-F‡þ(…"HS2DóŒq¨'˜äÐéXO’Áh9)§ë¬±Œ1–O@wfîA¦ŒPYªNsëܾwßtœ©  P@™ÈL$è·~ö/ ",¡ª9‡Û,+¿~לURÚ¬ö®‚R†ˆ˜Y2”—öYa&U¨rÌlÕŠHŒ1Æh¥ˆÈ*`æBÕ¼ý²\…*rAK_é#Å“Ràcy¢PU‰ª†˜¹üi¯BU'URøï…0MÓ4æ Æ(£œì>U!Uˆ33§‰DU©=ÎcwfUÕÔ@õ¯¢|¦ÒBMEED-á ìÉV9bŒ£ªŠjŒ1׬P¤¯Ed¥A*rj?Š*‹¤×eß4„à^ uJD¢õÂÁDašlÄxRQˆ¬y©‰P•ôòÔª8Yî+2ç¾Û]öèSÒ.²7#\—‹Ðac@ɶ%"r:BPæ;" ÌÅ—«´MUc^œP±Q÷F5ÞüyºâB~~QÙKš7mU›R‘†.Uÿ¥¤jžŒ—†–ye˜§ ¢FcØ ›ï×êÐFåÓ­°ìÿD@yÓM™]ŠÖ7ºÝ3”ç>³át)ì%N¶¯²¬Ùòç-š¼&"!"3óÌ‹¸ÌI\ IŽ]6 h–‹² Ê­8óÉ"l½óvÌßQ/–òdÚÑ\­ ûí^8Å^RƒïÿÌjXóçÌfý˜¨ïmVªù«ÒÒBÏsÕùËu‡‹¿.ܾ•ÁZ*-­íVHDfM¤dÞyyµœŸ2?W¢÷:¢LoA²= ³Bk¡S-6Í‚3®NÓdÍ4ÿÇ|›Dg–µ™åôýƒUO0"'¢È4aÖ?Ío>M9ÌFÒD$%v‚{u~b]¼¨F[æ™Éü‹Ü| ü÷RÕƒuÅÝþ<¦Â­gõ³’:n_…mÐÚ-mVK3%Ý˙ꖷØ<ì«*߯ ]þU´Cþ–²  2Î[¬³Hɽ]/pì«è¨ªÃdÁ\ƒ-ïªY#÷Ô†¼÷ y-檔Ÿ[:ãHzº{íU;Ý;L/çOÙ¸ªä™Cà˜W«ù²D‰‰¬>?zþveŠñ¯;[¼%»¡¬Pœu:Å:X¼"$Y|ç†hûžõ¥ðØ~ßv3ÙêvÍ ‘G2ÙRm—˜}®.9­ch5—ñ’ç£lÆÈÛ”’b%*Ââ£ÎCÜm8Û‹ŠßÖYåYî…)UOñ]KñåCZx«¯Ö¦(·`NåÍ/"?Ѧâ2‘¢á0‡À Ñè(KÌ@ì)š)Í;TÊä·6Qga¢"T¸—šGÜðšçší/±Ïc‰h—橛㿢ƒ¾}Ù½š§nVk2U…½–ú®zŸÇó ¦U{ZØÎÁh(Öï/·Õ¨.éÇo)u. GÏ…b%רł¸bJ”Ç4->…㱞¼É¦ÿüŒCùö™nY[zª9º:ß ÿŠ\Ó<MÚÃ|÷,º6(L!åAÍê(V¶*³ÈB\©æ­ìD³N¡4Be«$šÃ2DLª f<øñ–Ö§yÀ«ªŠ „2©Ío5y ÖswUùÌճϙ/0Í ÝB+䘺ö­ÿüÝß¼}```Æ_ÿ;ÿBÉ6ÝcÖƒ˜ÍtÈÆ!“­Öz )óÌ7ªÚ D¨±x€÷ïßÜ-À»wïÞ¾}ûõ×_ߢò ·oïÞ½ûòË/UÒzGY•,h˜}* ÑB!¯cß½{÷Å_øûöíÛRù¯ýëc[;0PÁ7Ül<û“žb=üª¤,=D¿õ³UÖXòج¡!jœ«õ÷ÿûßÿíýû÷¥YǼ¼Œ2ç^óÀ@‹Û··oß¾yóæË/¿ü?ý׶ʱ}s4I,×ÿ^¥@Ýmw r-ä:ð”¸Åx{óæñج¬Æ~ƒGº¥x)6êJWt·NÕ³~kÜ!¿È«‹ýèG»_ÎÀÀ5øñŒ<ÞÞ.îïï3¹--´KÕ±z#ËlÝ9°·…ÇØUÿû‹_üâÀÖ ´¸Å¸­èÙ`f¾[ÀÂlÖbab¢Ÿüö¿Ñ¼cÈ3Ì"I ªuŪjnôvËŸ¿û¯~[äõ_åÀÀKD—.>ÿû¿çÂSé鋤›5RÅ£ƒœ¯îCåΖ¯ýa!«hç’™|ž9Œmþä'?A.Ì…”gJ$¢©Î®@Úw©fݱ=MªYó” ©ù*—«Ö¿lÕ\rßf]ýkõ Ï@…O?ýô@ë l¬çg?ûÙŸþéŸZ [º0i¶ÐWöjÍ[ŽQï‘Ènaô·ÿáïIVZqãÎf-ѪÂÜ*¼T §a{ûöíýý½‰ÿ*¦pêâ.´Ç5Ò¾ûÿüç¿üå/»tñ7öo‰(Õ‰™ò® µhtneZr§tøžHf°µæ =ŠEößÝÐ-3Ö#_nl=x¡(>Ž ?Òö«c¾úê«rýóŸÿ¼\·t‘7è£ìÈÒ>¼²í!­*IÎÖÛzïóº×sbC±­¼Žƒ¦½£ªøá¡ ¶ÇOèk#͓⋖bÏòØK½ là¾,{ ø÷VóZVõªKV™®¨óyâ,™íïΓñX,‚ï°€ÐêÑ´FVU “®xö®ØáôŸ.®â±ûG@yÑ/ˆÇnpÈ=̳[¦JüòË/[òóYå½ùtW[ÉZíÏ{ÈlgwžŒÇV`ðÑWB.p…µ”‰z‡ÿ\‡Ã×±ö~_]ãoÛY;±F®×•Tx‰2ùK\Ǧ #¡&{MÁV™1¾¼Í`kЕëØ+¶¼ k¸h»-;íÖö’+ŸæemáØCf;{ô”ëØb{M1Ûzá>ç ÃÄ2ˆÀd‡ˆê)ž¢ŠRrYTÊG,Ø?˜,«ÔXj?kýꫯ®L¹=vƒE_Š=ôüUƒÇ<ñ p–ÌöwᨑvÖ+‚|"T™9;AÄ¢;ΪbæÀ˜9ïH¿ª vD>f¯}%w§®øÒAðRxì-±† ãÐcZµ³aÏû×±gñd<6ÓjQ5•[KŒKL’Õ–²fíÄnÇ’s¶éJîðy:;©Ôt*—Þ~–˜_„xü||ž|=Û<¶,%Õ¢U\S æìclša9¢ˆL–T­`«];›x<†=öp¬™a,½ÍZK÷XËÝsï3Ä µÇzsk±ô̧Ÿ¨Úþuf¨æSm¡1ÆEÔ˜Š>‘ãÌèÊÉ1>rŸ§G*œÖÊ•¾s»ÕÄg‰¬+.‡ô,c­yÁ•ÂÈ.VãOªù,¼jSåÒV˜ýÝåÂE¢‡ÏVkݱŽxzÜz{…Â|ÏÞ‚Š˜<§µu¬qTN9šÔÝ „€r®^>/¬D@žý§l—±ç½ƒÇ>g¼D‰wžf{ÑÛ;Ëc§i N""1 M«¢ ‹?^6»kD4%/Ef‹23~äs{;õÔ—ËèÊëe^ydI«áG?úQµÌž›ÔSu ¨žmÃÎÖðœöñvýî  Ã8"êÙu¬)†CÈq(Tgñ¸ÿ*f¢ŸþÎK.‹`µSëXý)ËŠÔtÑDôg¿øú«¯¾òLßâÙX"ŽÀö¾‡Cªzxxàã<z¾¿¿ÿ­ßþ÷”C:U§×–ótüv<87Fúéïü²]Èò®£X ¦î»ý"¬y7…'ôSÀýýýçÿàßy%ðÃÃ-c î]gýAŽÌ¦ª“æµé#[æð³&þøÇ?öŠì•òõóÏ?/ò¬—3mªÑr1ØŠhÞ,G8ƨ k~ Š0'­ÕÚ¦´‹h`àù ÕcU—Ù «b¦OÌ…&ìÏ9… Á)¾›)§fî[S’¦ˆ2 O ÿý›¿ù›ž»¾¾íõ¤M_+90ðrñÙgŸýú׿þæ›oþò/ÿò¯þê¯,Ñ›a“è›#PdI8§«¨ÛÜ3Åx‚‚“µ1„Àᎈ,È[&ÎT•(¨Â‚H=eÿ^y‚Îjå’çéveûÀÀÀ•Èd¹ðâÊy¢Õ–ǘ²z €õmH4¼¦+Þ…Ác<Òz5Ÿ†S`f.ÌFnóÜ”´lšB›ÊVG¡ðC˜V]¦µñég¢iš^9çF!¢B^KŽFÃUuÞ{V]SWî­ÐÒäËZÇ;ð¬Y#-·¬޲¼ÎÈóʼn`ÁM¯Ôý>RcBôL0pÿ3ûõDKDSv!¶˜msT§…jbáH/ˆwóØséƒÇ| 'Ê’,U50Ïj`Ïib™(ùõ‹¨—[×N)š ºì%ÚB *Q>¡cÞPT[ ~>¨vñu1xìÀ€GTeóU"`6ö$Ø6:Ktn‡é )FþQ¯—žièpK€ }в·Î ·èj]Á•™'Û - KÑÙ»7ùÜýí}Œ?S‹ÁcD‘¼öä, 'y´EtÌ<™bkùAâº.œñµh÷ÁÎéçRÁ˜ž,T¢qWK!¢$œXDº Ö0±ñcuîŽS¯X\õc¬i‰`«ˆÄansÔb‘åî.õUwN•3”)šËV»á”vái”("Ó^¶Ä%WÓb1s¦^V;…zjjðØâÀDY‹Ôým!"S®Am,"!£X«o'¢ÌF´!¨8«ª…ŸŸmâk÷Û¦ |T°ÃèŠ=¶l5·\ÍÇÁvoœ>ùä3¡Õ›þ*mîI6$fNŽÇ" J¤½‰ÁcZ´žØ!´N¶@õǼk>Ò蓉Tèt:Å™9„ÀJ!¡òT±Ác ÊÂ5GV«AýÓ^̓"…)70®;M“­]…ðp:™Fj–™3Å]ñÀÀ0yÖûžMÈDøðð<íV¯J¢wÌ@ˆ&壢Ç:v`à2”cq0ok-Dkì¶-‹=9DÄSŒ1„«N¢³†rO§Á˜A±š”˜H•ÀÔÕAW/„óR1p¨ˆ³ðž§6É듌…>؉ÑΫªßÿpw7Ù±ÛùødWú'ßíëñ…sÁÀ³„Úv9ɧïÌçY5*'@PÅãI¶"MyY06Oã(¢ߥ wpgámÚà±™P$ï~+îÀD`êã7¥C$%¯c1WÝ!yFœBÞ·“9¸ÛÙs¾ßöyl'ýÛËz¾c.xV¨¨Æ›^yX¸îÛy:°íÉX»<Ô}®”PŽö0Š·-ïe[ìs÷yÚµ[a`àƒÁè˧ˆ(‘xy–™N­i¨„e³›‰‰§PŠ‘ÃÞ} üµ}é7౯xƨH©u'®ÊOµÂ*‰»šwð0šiØïÇ%¥Æ:v` ÀëŠ-¡:x² Ò-¬;åàI[±æPQM~ÿšª¤eTÔ-¬qÎ6}ðØ ™lÕ«‰íÂK»Æ/Ed"&U‚Øv;‹H¡9ª…k#Õ´qG5Þ·ÛƒÇ ôÐúKx‚bædXÍŽD4i`ŠBJú QÉb*‚™” 'QÙê±ùàááÁlB磟çl9ñà±%ººâ'-ûۺu²s°àÈÝl¹¥P”¨ÝŸ Îâõ å¤hÐÕÀÀy°“B¸»»+ZæìâïB7QÌ9Þqf«ç×±¯›” pn=xìÀ SQ§­¼Õl/«c§ãڹᠬ`»”ãݯ£«×·r»¸<5mèbŠ1UU,í7Ÿ¸Jùºˆ¸•ûØÁc¿Ý.ù ;ðCÂTeGŠ8$.Ü£ºžÃvƒ<šÇz§Éi“íÇöxSm‹kx¬nIÙW`ðØgˆbOM¿>Âx•µÄd²0f}³šË)1ò¦Y¨(”`gÜU˜½Ñ2Ïc·]ÿKÉ‹èk/=z"¸e›w¡[¢‘¨¹ô—ñZZ†¢xÿ«ÊRÅj{y£f&bIçd{ñÖ)öù¬c‡£ÅÀó*5¤8Ÿ¯C ³OU,N…ùÎQbv†–±OT¨ pn«Ýsá±Ïû7½µ˜¼‹bIÍãÅ)ì¥@>äNˆÒQÂ#99ÙÙ<¹|{1íù? ;ðB±tîP욃ªæóð|؇JÚ^'¾€Ý&É•ñ|Ș™Ç";!zì㱯›‹6k`àšO¬LଞµJssÑ{\¤+žÉR«+ÞI«ƒÇ<7Ð#°°ÇSà RÎI(Ò²9'ñÚù–Û^Šhyl“^¥¬ñØoWrEŠÃÙxà¥a"gÌMf˜#Ź=îFå!½ŠÈ^rõ)ß6éŠÇG¨‡¯Ø ·n;{Ú[`)æ8ÁL¶²eæ¼çàhkõQSø {.hÜÀÀ„I©D¡ÍÉmd63Ѩ±§O̧n•kUÕ6ß+xl›^ñØ×õM›•Ÿ+3xìÀ3„³ËÌÔÔCK±ÙÖZNÑB/ö?gHœ#WÃQëØê¢ÌAC¥4ðQ ›!§[ˆ²ŽØN²3ëW¶Þ½{÷GôGß|ó €Ï>ûìW¿úÁcÏÒa]feê8ËcnO?ýô›o¾yûöíoüÆo]xÝ/.TOëQ¨w{ËÛ·oË/€7oÞØõañé<'ÄÁëØ&Œ-üZ’¢\V·yßã’x0Õ­.:º'nMg?ï†p¸~ïÕì±ÃcµéÚŽ!¹1#oTÒjÏNÝ{g,e®ú#öä î¨kŸ~]ñ!øàºâU"oÖ±]:ŸÙN¯µ–U…#ë–¬[³ë¥¨¼-¨ˆªÊeü°Êbž»á²$ \'¶ÃM^ÿ Å®UûØïuYÖZΣžÕ-ð´ýzTV[äÒ o¡yêŒUéËŠL LjlË‘»QSò6/ö¯d•È«ˆ>؆.š±¯Ž•9…iy¶îúhÛb…=¦ôCMcÓÄÕ½ùцºK²Vsê»–†›ÛÖ œ½k;ë å‘v$ôæ§eîEâÜÆ›m r_s;´/¬oOE>OûTD9Žº»TÏ]ì¡åE{ên­ó‡Kžµ’¥ËLÉ*»‰ã†YµN7j_NßÐŒìQš<>뉈–‹TXqÕëmÇ‘>O·Æ‚Ç^èAÑɵmò›wmUÞU¥l©ÔÖŸ²¼kÑÚg«`üagí7Ëz”þö™dÕš§KÉc``à)ÑPloA°_§êïÞÐåÞR}GU®³µ®ç¼Ñ³FÖÇ–ÕXwžŠÇb´lMSCDøa£¶îP’.1Çuøê…TÔ}Öþ*´¹¸èö O¼¶Ü Ýüóê¬Ç6ì¬uäÖYÚR,÷ˆs?Åñ†åPï˜UûnOåÝ=YÖÀ…Ø9á^—u èŠõ#ä Ãìô+nqKË tÅ+Ϻø®6ëèo»YÏQ·¿!+>Ý÷þ?nÌñ‡'ÁIEND®B`‚alsaplayer-0.99.82/attic/midi/000077500000000000000000000000001466261456500161055ustar00rootroot00000000000000alsaplayer-0.99.82/attic/midi/AUTHORS000066400000000000000000000014471466261456500171630ustar00rootroot00000000000000Copyright (C) 1995 Tuukka Toivonen. Tuukka Toivonen AWE SoundFont support by Takashi Iwai IW patchset support, karaoke, AWE/XG enhancements, much reworking of the code, conversion to alsaplayer plugin by Greg Lee Effects filter by Nicolas Witczak , see URL \fIhttp://www.geocities.com/SiliconValley/Lab/6307/\fP). Portamento, mod wheel, and other enhancements from TiMidity++ Copyright (C) 1999 Masanao Izumo . See URL \fIhttp://www.goice.co.jp/member/mo/hack-progs/timidity.html\fP. XG patch translation derived from Eric Welsh's eawpats distribution. (See TiMidity++ above.) Current maintainer of this MIDI input plugin for AlsaPlayer: Dominique Michel alsaplayer-0.99.82/attic/midi/COPYING000066400000000000000000001043731466261456500171500ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . alsaplayer-0.99.82/attic/midi/ChangeLog000066400000000000000000000071151466261456500176630ustar00rootroot00000000000000Thu Jul 12 2007 Removed unneeded exception from the license file Sun Jul 8 2007 Updated the licence to GPL-v3 or later Sun May 5 05:11:44 HST 2002 Makefile.am, configure.ac: more optimization; debug option midi_engine.c: notes=0 at end of song; max trouble=50 Sat May 4 16:18:37 HST 2002 sndfont.c: always call calc_cutoff() resample.c: modulation_delay decrement by control_ratio resample_l.c: correct lfo frequency modulation Fri May 3 13:28:39 HST 2002 pcmap.c: corrections Fri May 3 04:05:54 HST 2002 sndfont.c: in envelope calc. to_msec() safeguard against unreasonably large values Wed May 1 03:27:09 HST 2002 autocfg.c: must not chdir Mon Apr 29 09:34:41 HST 2002 playmidi.c: return to LaGrange interpolation; fix up polyphony reduction midi_engine.c: put title in Queue list Mon Apr 29 07:15:46 HST 2002 readmidi.c: improve title detection midi_in.1: work on man page Sun Apr 28 08:53:11 HST 2002 readmidi.c: spruce up panel display playmidi.c: improve polyphony reduction Sat Apr 27 15:03:40 HST 2002 xmap.h: added -- XG voice substitutions cfg.l, playmidi.c, readmidi.c: do XG voice substitutions for GUS patches pcmap.c: added -- voice subst. for PC42b.sf2 Thu Apr 25 07:48:50 HST 2002 resample.h, etc: do cspline interpolation by default sndfont.c, cfg.l: init_soundfont returns success/failure Wed Apr 24 14:03:26 HST 2002 added PC42b.h: makes timidity.cfg unnecessary instrum.h, cfg.l, autocfg.c: automation of configuration midi_engine.c: make sure I got initialized Tue Apr 23 10:00:35 HST 2002 effect.c, playmidi.c: destroy effects on midi-close reverb_e.c: disable DESIGN: add some info about dropouts Tue Apr 23 08:03:14 HST 2002 reduce clicks; increase polyphony Mon Apr 22 03:25:16 HST 2002 midi_engine.c, playmidi.c: better buffering and polyphony control Sat Apr 20 12:14:52 HST 2002 readmidi.c, playmidi.c: bug in metatext caused seg fault Sat Apr 20 06:48:05 HST 2002 midi_engine.c: better buffering to avoid dropouts various: move a little more into local_data Fri Apr 19 04:39:35 HST 2002 readinfo.c: remove various: move a little more into local_data Thu Apr 18 09:19:58 HST 2002 got filter effects working again, but reverb is disabled (causes timeouts) Wed Apr 17 19:38:13 HST 2002 many changes, aiming to make cross-fading work Sun Apr 14 04:17:37 HST 2002 ChangeLog sf2cfg.c: added; reads soundfont and writes timidity.cfg autocfg.c: added; constructs timidity.cfg in ~/.alsaplayer Makefile.am: add above two sources midi_engine.c: call autocfg() README cfg.l (cfg.c): ensure same timidity.cfg always read sbk.h: declare autocfg() midi-in.1: added man page Sat Apr 13 08:18:19 HST 2002 Changelog midi_engine.c: add _shutdown (does nothing) look first in ~/.alsaplayer for timidity.cfg correct frame_seek cfg.l: added (flex source for cfg.c) cfg.c: changed Makefile.am: get cfg.c from cfg.l DESIGN: document added README Wed Apr 10 07:28:30 HST 2002 ChangeLog Makefile.am: add timidity subdir configure.ac: create timidity/Makefile, timidity/patch/Makefile add timidity/ configuration & patch directory README Mon Apr 8 14:20:49 HST 2002 remove slang_c.c (useless leftover that wasn't compiled) configure.ac: make location of timidity/ dir configurable, etc. readinfo.c: now equals readmidi.c with one extra #define readmidi.c: has the needed #ifdefs (see above) midi_engine.c: _open and _close can now be done independent of playing _frame_seek now works dumb_a.c: remove debugging printout stmt gtim.h: restore #include "config.h" playmidi.c: change default interpolation to LaGrange change default dryness to wet README: say something relevant alsaplayer-0.99.82/attic/midi/DESIGN000066400000000000000000000125171466261456500170070ustar00rootroot00000000000000Midi Design Greg Lee, 4/02 Synthesis Model TiMidity has a tone generator, two envelope generators, three low frequency sine-wave oscillators, a low pass filter, and an effects unit. The tone generator resamples instrument patches at the basic frequencies appropriate for specific notes being played. (The interpolation algorithm used is selectable using the four checkboxes on the upper panel.) The envelope generators modulate each note with successively: an attack phase, a hold phase, a decay, and a release. One of the generators affects amplitude, and the other affects pitch and/or the cutoff frequency of the low pass filter. The low frequency oscillators modulate amplitude (for tremolo), frequency (for vibrato), and the low pass filter cutoff frequency (XG "rezo sweep"). The effects unit supplies echo, detuning, reverberation, chorusing, celeste, and phaser effects. Echo (done by generating extra echo notes) and reverbration (done with a filter) implement midi reverberation. Detuning (done by generating extra pitch bent notes) and chorusing (done with a filter) implement midi chorusing. Instruments may have either one or two tone elements, and for each of these, a patch set may provide separate patches for different note-velocity ranges (commonly for pianos) and for different note-pitch ranges. GUS patch sets, however, provide only one tone element and one velocity range per instrument. Midi Implementation Almost all midi messages and controllers that I'm aware of are implemented somehow (meaning that they cause something to happen, if not necessarily the right thing). NRPN controllers for setting attack and decay time are not implemented, because I haven't found any midi files that use them. The flanging controller is not implemented (though flanging requested in an XG sysex dump is implemented). Only a few of the hardware oriented controls in Roland and Yamaha system exclusive dumps are implemented. TiMidity can handle midi files meant to play on up to four synthesizers, keeping separate the four sets of 16 channels for each synth. However, in the midi file, the synths have to be selected using port commands (in either Roland-GS or Yamaha-XG sysex dumps). Some midi files intended for multiple synths don't have port commands. (The info window shows port commands when present.) Volume I've reduced the volumes levels TiMidity generates quite a lot, as compared with the original implementation. This minimizes clipping and gives an increased dynamic range. (There may be some artifacts now at low volumes, unfortunately.) If you need more volume, I suggest you turn up the volume somewhere else, either use a mixer to turn up the line volume, the mixer volume for /dev/dsp, or turn up earphones, amplified speakers, or whatever. Computation Issues TiMidity can fall behind in computing data to send out to the sound driver, and then there are dropouts in the music. TiMidity tries to anticipate the possibility of a dropout by monitoring the state of its output buffer, and when there is not much in the buffer, it tries to catch up by minimising the calculations it has to do: it uses a cruder interpolation routine in resampling, stops doing extra echo and detuned notes for reverb and chorus effects, and starts terminating notes early. So, depending on midi song, patchset, how fast your system is, even if you don't hear dropouts, you will notice a loss in quality as TiMidity gets busier. A way to reduce computation time, in the event you're getting too many dropouts, is to put "-p " in the configuration file timiditiy.cfg. This limits the maximum polyphony -- the number of simultaneously playing notes -- to the number you specify. The default maximum is 256. Memory Issues It's possible for TiMidity to use an excessive amount of memory for patches. Symptoms are your window system becoming very sluggish, or crashing. This is probably only a problem when using big sf2 soundfonts of 30+ megabytes. For instance, the piano patches in Personal Choice's PC400 soundfont can occupy 25 megs each. After playing a list of midi files which use three of these pianos, well, that's 75 megs of ram right there. TiMidity assumes a maximum number of megs to be used to keep patches used in playing previous midi files; when this maximum is exceeded, TiMidity will unload least recently used patches, returning ram to the system. The default maximum is 60 megs, which works ok on my system (I have 48 megs ram and 196 megs cache). Setting this to a lower value means that more patches have to be reloaded from patch files as you play through a list of midi songs, which slows things up. If you're ram rich, you can set it to "no limit". (Actually, at this writing, you can't set it at all, since there are no front panel controls to do that.) If you allowed enough room, entire soundfont files are read at once, instead of patch by patch. Setting the maximum too low can be counterproductive, because soundfont files occupy much less memory in toto when the entire file is read than when the patches are read individually (I don't know why). For little-endian systems like x86, rather than being read in, sf2 soundfonts are mmapped. This is much faster on startup. I haven't figured out a way to do this for big-endian systems. (The problem is that the patches are little-endian, and byte-order has to be changed for big-endian systems.) alsaplayer-0.99.82/attic/midi/INSTALL000066400000000000000000000172271466261456500171470ustar00rootroot00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. alsaplayer-0.99.82/attic/midi/Makefile.am000066400000000000000000000024151466261456500201430ustar00rootroot00000000000000 #SUBDIRS = timidity midi_inltlibs = libmidi_in.la midi_inldflags = -export-dynamic -avoid-version midi_insources = midi_engine.c common.c playmidi.c readmidi.c \ resample.c mix.c instrum.c tables.c controls.c output.c filter.c \ fffload.c sndfont.c readsbk.c effects.c reverb_e.c chorus_e.c \ phaser_e.c celeste_e.c resample_l.c resample_f.c cfg.c dumb_c.c \ dumb_a.c b_out.c common.h controls.h effects.h filter.h gtim.h \ instrum.h mix.h output.h playmidi.h readmidi.h resample.h sbk.h \ sflayer.h tables.h version.h sf2cfg.c autocfg.c md.h PC42b.h \ xmap.h pcmap.c noinst_HEADERS = gtim.h common.h readmidi.h playmidi.h resample.h mix.h instrum.h \ tables.h controls.h output.h filter.h md.h cfg.l PC42b.h xmap.h EXTRA_DIST = bootstrap midi_in.1 TIMID_DIR = @TIMIDITY_DIR@ AM_CFLAGS = -DDEFAULT_PATH=\"$(TIMID_DIR)\" lib_LTLIBRARIES = $(midi_inltlibs) #AM_CPPFLAGS = -O2 -fstrict-aliasing -fomit-frame-pointer if OPTIMIZE AM_CPPFLAGS = @ARCH_CFLAGS@ else AM_CPPFLAGS = -O endif CFLAGS = -I$(top_builddir) -D_REENTRANT -Wall -W -Wconversion @ALSAPLAYER_CFLAGS@ @DFLAGS@ libdir = $(INPUTPLUGIN_DIR) libmidi_in_la_LDFLAGS = $(midi_inldflags) LIBS = libmidi_in_la_SOURCES= $(midi_insources) man_MANS = midi_in.1 cfg.c: cfg.l rm -f cfg.c flex -t -B $(srcdir)/cfg.l >cfg.c alsaplayer-0.99.82/attic/midi/NEWS000066400000000000000000000000001466261456500165720ustar00rootroot00000000000000alsaplayer-0.99.82/attic/midi/PC42b.h000066400000000000000000000715231466261456500171000ustar00rootroot00000000000000/* PC42b.h * * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id$ Greg Lee */ struct cfg_type PC42b[] = { { FONT_TONESET, 0, NULL }, { FONT_PRESET, 0, "Grand_Piano" }, { FONT_PRESET, 1, "Bright_Piano" }, { FONT_PRESET, 2, "Electric_Grand" }, { FONT_PRESET, 3, "HonkyTonk_Piano" }, { FONT_PRESET, 4, "Rhodes_EP_(Stereo)" }, { FONT_PRESET, 5, "Epiano_2_-_Rev_(r)" }, { FONT_PRESET, 6, "Ger._Harpsichord" }, { FONT_PRESET, 7, "Clavinet" }, { FONT_PRESET, 8, "Celesta" }, { FONT_PRESET, 9, "Glockenspiel" }, { FONT_PRESET, 10, "Music_Box" }, { FONT_PRESET, 11, "Vibraphone" }, { FONT_PRESET, 12, "Marimba" }, { FONT_PRESET, 13, "Xylophone" }, { FONT_PRESET, 14, "Tubular_Bell" }, { FONT_PRESET, 15, "Dulcimer-Hammered" }, { FONT_PRESET, 16, "Organ_1-rockn" }, { FONT_PRESET, 17, "Organ_2-rockn" }, { FONT_PRESET, 18, "Organ_3-rockn" }, { FONT_PRESET, 19, "Church_Organ" }, { FONT_PRESET, 20, "Reed_Organ_C12" }, { FONT_PRESET, 21, "Accordion_(r)" }, { FONT_PRESET, 22, "HARMONICA_U" }, { FONT_PRESET, 23, "Bandoneon" }, { FONT_PRESET, 24, "NYLON_GUITAR_U" }, { FONT_PRESET, 25, "STEEL_AC._GUITAR_U" }, { FONT_PRESET, 26, "Jazz_Guitar" }, { FONT_PRESET, 27, "+++Clean_Guitar" }, { FONT_PRESET, 28, "Muted_Gt" }, { FONT_PRESET, 29, "| Installing a soundfont: The best and most straightforward way of providing patches for midi-in, IMO, is to download Jim Roe's soundfont PC42b.sf2, which is in a separate file accompanying this distribution. (Now, it is in the alsaplayer CVS Files section in the tar archive PC42b.tar.bz2.) It's quite large. Unpack the tar file, and put the file PC42b.sf2 in your home directory in a subdirectory .alsaplayer (where alsaplayer keeps its configuration info). Or alternatively, you can put it in /usr/local/share/timidity, or wherever you configured midi-in to look for patch info (see above). You can use soft links, also. Installing a soundfont (alternative): If you prefer some other soundfont, you can put that in /.alsaplayer/ instead of PC42b.sf2. When midi_in sees it there, it will automatically construct a patch configuration file for it called timiditiy.cfg, which, if you like, you can subsequently edit (there is a man page midi_in.1 telling about the format of .cfg files). Installing a soundfont (second alternative): Design your own patch configuration file timidity.cfg and put it in /.alsaplayer/ . midi_in will look first for /.alsaplayer/timidity.cfg and use the information there, in preference to other alternatives. Installing a soundfont (third alternative): Don't install a soundfont, but use GUS patches, instead. If you happen to have installed TiMidity++ and Eric Welsh's eawpats, or some other set, and your file /usr/local/lib/timidity/timidity.cfg is set up for timidity++ to use them, midi_in can use them, too. (The eawpats set of GUS patches is at http://www.stardate.bc.ca/eawpatches/eawpats12_full.rar) --Greg Lee, greg@ling.lll.hawaii.edu alsaplayer-0.99.82/attic/midi/README.CVS000066400000000000000000000002031466261456500174120ustar00rootroot00000000000000You need to run the ./bootstrap script if you are checking out from CVS This will then set up the build enviroment on your system. alsaplayer-0.99.82/attic/midi/autocfg.c000066400000000000000000000051551466261456500177070ustar00rootroot00000000000000/* PC42b.h * * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id$ Greg Lee */ #include #include #include #include #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" extern int sf2cfg(char *sffname, char *outname); static int choose(const struct dirent *nm) { char *fname = nm->d_name; int len = strlen(fname); if (len < 5) return 0; if (!strcmp( fname + len - 4, ".sf2" )) return 1; if (!strcmp( fname + len - 4, ".SF2" )) return 1; return 0; } int autocfg() { struct dirent **namelist; int n, haveone = 0; char *homedir; char prefs_path[1024]; char cfg_path[1024]; char curr_path[1024]; FILE *fp; if (!(homedir = getenv("HOME"))) return 0; sprintf(prefs_path, "%s/.alsaplayer", homedir); strcpy(cfg_path, prefs_path); strcat(cfg_path,"/timidity.cfg"); if ( (fp=fopen(cfg_path, "r")) ) { haveone = 1; fclose(fp); } if (!haveone) { strcpy(cfg_path, prefs_path); strcat(cfg_path,"/PC42b.sf2"); if ( (fp=fopen(cfg_path, "r")) ) { fclose(fp); current_config_pc42b = 1; add_to_pathlist(prefs_path, 0); return 1; } } if (!haveone) { if (!getcwd(curr_path, 1024)) return 0; chdir(prefs_path); n = scandir(prefs_path, &namelist, choose, 0); if (n < 0) return 0; while(n--) { if (!haveone) haveone = sf2cfg(namelist[n]->d_name, "timidity.cfg"); free(namelist[n]); } free(namelist); chdir(curr_path); } if (haveone) { current_config_file = strdup(cfg_path); add_to_pathlist(prefs_path, 0); } #ifdef DEFAULT_PATH if (!haveone) { strcpy(cfg_path, DEFAULT_PATH); strcat(cfg_path,"PC42b.sf2"); if ( (fp=fopen("PC42b.sf2", "r")) ) { fclose(fp); current_config_pc42b = 1; add_to_pathlist(DEFAULT_PATH, 0); return 1; } } #endif return haveone; } alsaplayer-0.99.82/attic/midi/b_out.c000066400000000000000000000072411466261456500173650ustar00rootroot00000000000000/* * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id$ */ /* #if defined(__linux__) || defined(__FreeBSD__) || defined(sun) */ #include #include #include #include #include #ifdef AU_OSS #ifdef __linux__ #include /* new with 1.2.0? Didn't need this under 1.1.64 */ #include #endif #ifdef __FreeBSD__ #include #endif #endif #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "controls.h" #define PRESUMED_FULLNESS 20 /*static int bboffset = 0;*/ /*int bbcount = 0;*/ /*static int outchunk = 0;*/ /*static int starting_up = 1, flushing = 0;*/ /*static int out_count = 0;*/ /*static int total_bytes = 0;*/ /* #if defined(AU_OSS) || defined(AU_SUN) || defined(AU_BSDI) || defined(AU_ESD) #define WRITEDRIVER(fd,buf,cnt) write(fd,buf,cnt) #else */ #define WRITEDRIVER(fd,buf,cnt) play_mode->driver_output_data(buf,cnt) /* #endif */ int plug_output(unsigned char *buf, struct md *d) { int ret = output_fragsize; if (buf && d->bbuf && d->bbcount >= ret) { memcpy(buf, d->bbuf + d->bboffset, ret); d->out_count += ret; d->bboffset += ret; d->bbcount -= ret; } else ret = 0; if (!ret) fprintf(stderr,"something's wrong\n"); return ret; } int b_out_count(struct md *d) { return d->out_count; } void b_out(char id, int fd, int *buf, int ocount, struct md *d) { int ret; uint32 ucount; if (ocount < 0) { if (d->bbuf && d->bbcount >= output_fragsize) { if (d->bbcount > 2 * output_fragsize) d->bbcount = 2 * output_fragsize; else d->bbcount = output_fragsize; return; } d->out_count = d->bboffset = d->bbcount = d->outchunk = 0; d->starting_up = 1; d->flushing = 0; /*d->output_buffer_full = PRESUMED_FULLNESS;*/ d->total_bytes = 0; return; } ucount = (uint32)ocount; if (!d->bbuf) { d->bbcount = d->bboffset = 0; d->bbuf = (unsigned char *)malloc(BB_SIZE); if (!d->bbuf) { fprintf(stderr, "malloc output error"); } } if (!d->total_bytes) { if (output_fragsize > 0) d->outchunk = output_fragsize; if (output_frags > 0) d->total_bytes = output_frags * d->outchunk; if (!d->total_bytes) d->total_bytes = AUDIO_BUFFER_SIZE*2; } if (ucount && !d->outchunk) d->outchunk = ucount; if (d->starting_up && ucount + d->bboffset + d->bbcount >= BB_SIZE) d->starting_up = 0; if (!ucount) { d->starting_up = 0; d->flushing = 1; } else d->flushing = 0; ret = 0; if (d->bboffset) { memcpy(d->bbuf, d->bbuf + d->bboffset, d->bbcount); d->bboffset = 0; } if (!ucount) { d->flushing = 0; d->starting_up = 1; d->out_count = d->bbcount = d->bboffset = 0; return; } if (d->bboffset + d->bbcount + ucount >= BB_SIZE) { fprintf(stderr,"buffer overflow\n"); d->bboffset = d->bbcount = 0; return; } memcpy(d->bbuf + d->bboffset + d->bbcount, buf, ucount); d->bbcount += ucount; } /* #endif */ alsaplayer-0.99.82/attic/midi/bootstrap000077500000000000000000000023241466261456500200510ustar00rootroot00000000000000#! /bin/sh # Check Autoconf version if [ -x `which autoconf` ]; then AC_VER=`autoconf --version | head -1 | sed 's/^[^0-9]*//'` AC_VER_MAJOR=`echo $AC_VER | cut -f1 -d'.'` AC_VER_MINOR=`echo $AC_VER | cut -f2 -d'.' | sed 's/[^0-9]*$//'` if [ "$AC_VER_MAJOR" -lt "2" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "13" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "50" ]; then if [ ! -e configure.in ]; then ln -s configure.ac configure.in fi echo "If you see some warnings about cross-compiling, don't worry; this is normal." else rm -f configure.in fi else echo Autoconf not found. AlsaPlayer CVS requires autoconf to bootstrap itself. exit 1 fi run_cmd() { echo running $* ... if ! $*; then echo failed! exit 1 fi } # Check if /usr/local/share/aclocal exists if [ -d /usr/local/share/aclocal ]; then ACLOCAL_INCLUDE="$ACLOCAL_INCLUDE -I /usr/local/share/aclocal" fi run_cmd aclocal $ACLOCAL_INCLUDE run_cmd autoheader run_cmd libtoolize --automake run_cmd automake --add-missing run_cmd autoconf echo echo "Now type './configure' to configure the MIDI plugin" echo alsaplayer-0.99.82/attic/midi/celeste_e.c000066400000000000000000000173371466261456500202140ustar00rootroot00000000000000/* * celeste_e.c * experimental channel effects processing * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * contents : celeste ( controller 94 ) effect processing * Nicolas Witczak juillet 1998 * witczak@geocities.com */ #include "gtim.h" #ifdef CHANNEL_EFFECT #ifndef NO_STRING_H #include #else #include #endif #include #ifndef __WIN32__ #include #endif #include #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "tables.h" /**************************************************************************/ /** celeste_effect structure definition * formula : * * output signal * * phi = d + sw * triangle( 2Pi/T * t ) * * s = x( n - phi ) */ /** abs macro */ #define abs(x) ( ( (x) >= 0 ) ? (x) : (-(x)) ) /* >> choice of the day >> */ /** G_BIT and G : denominator size and fractionnal time part */ #define G_BITS 8 #define G ((int32)( 1 << G_BITS )) /** relative min and max ampl for phi signal modulation */ #define D_MIN 0.004 #define D_MAX 0.01 /** max die time in ms */ #define DIE_TIME ( 1000 / FREQU ) /** celeste detune frequency Hz */ #define FREQU 20.0 /** time param normalized to sampling rate*/ static uint32 dieTime = 0 ; typedef struct { /*---------------------------------------------------*/ /* Effect base implementation */ void *m_pfnActionMono; void *m_pfnActionStereo ; void *m_pfnCtrlChange ; void *m_pfnCtrlReset ; void *m_pfnName ; void *m_pfnDestruct ; /*---------------------------------------------------*/ /* additionnal parameters */ /** m_uiNullCount : number of last null samples or 0 */ uint32 m_uiNullCount ; /** l/rX/Y past samples circular buffer for x and ya left(or mono) and right */ cirbuff leftX , rightX ; /** d_max : depth and average delay relative to sampling rate and G_BITS fractionnal part for * linear interpolation */ uint32 d_max ; /** current state for triangle phase ramp relative to fractionnal part G_BITS */ uint32 d ; /** incremental step for chorus phase eval , calculated according to FREQU and depth */ int32 incr ; } celeste_effect ; /**************************************************************************/ /** reverb_effect function overriding */ static void ActionMono( celeste_effect* pThis , int32* pMonoBuffer, int32 count , int* pbSignal ) { if( pThis->d_max == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pMonoBuffer; int32* pEnd = pMonoBuffer + count ; int32 x , xd , v1 , v2 , tmp ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G ; v1 = (pThis->leftX.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->leftX.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; xd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; *pCur = ( G * xd ) ; pushval_cirbuff( &(pThis->leftX) , x ) ; if( pThis->d > pThis->d_max ) { pThis->incr = -abs( pThis->incr ) ; pThis->d = pThis->d_max; } else if( pThis->d <= FRACTION ) { pThis->incr = +abs( pThis->incr ) ; pThis->d = FRACTION + 1 ; } else pThis->d += pThis->incr ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; pThis->d = 1 ; } } static void ActionStereo( celeste_effect* pThis , int32* pStereoBuffer , int32 count , int* pbSignal ) { if( pThis->d_max == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pStereoBuffer; int32* pEnd = pStereoBuffer + 2 * count ; int32 x , xd , v1 , v2 , tmp ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G ; v1 = (pThis->leftX.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->leftX.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; xd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; *pCur = ( G * xd ) ; pushval_cirbuff( &(pThis->leftX) , x ) ; ++pCur ; x = *pCur / G ; v1 = (pThis->rightX.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->rightX.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; xd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; *pCur = ( G * xd ) ; pushval_cirbuff( &(pThis->rightX) , x ) ; if( pThis->d > pThis->d_max ) { pThis->incr = -abs( pThis->incr ) ; pThis->d = pThis->d_max ; } else if( pThis->d <= FRACTION ) { pThis->incr = +abs( pThis->incr ) ; pThis->d = FRACTION + 1 ; } else pThis->d += pThis->incr ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->rightX ) , pThis->m_uiNullCount ) ; pThis->d = FRACTION_BITS ; } } static void CtrlReset( celeste_effect* pThis ) { pThis->m_uiNullCount = 0 ; redim_cirbuff( &( pThis->leftX ) , 0 ) ; redim_cirbuff( &( pThis->rightX ) , 0 ) ; pThis->d_max = 0 ; pThis->incr = 0 ; pThis->d = 0 ; dieTime = (uint32)( ( DIE_TIME * play_mode->rate ) / 1000 ); } static void CtrlChange( celeste_effect* pThis , MidiEvent* pCurrentEvent ) { int amount = pCurrentEvent->a; if (amount < global_chorus) amount = global_chorus; if( pCurrentEvent->type == ME_CELESTE || (pCurrentEvent->type == ME_CHORUSDEPTH && XG_effect_chorus_is_celeste_flag) ) { if( amount != 0 ) { pThis->d_max = (uint32)( ( ( D_MAX * play_mode->rate * ( D_MIN + ( ( 1.0 - D_MIN ) / 126.0 ) * ( amount - 1 ) ) ) / FREQU ) * FRACTION ); pThis->incr = (int32)( ( 2 * pThis->d_max * FREQU ) / play_mode->rate ); redim_cirbuff( &( pThis->leftX ) , ( pThis->d_max >> FRACTION_BITS ) + 2 ) ; if( ! ( play_mode->encoding & PE_MONO ) ) { redim_cirbuff( &( pThis->rightX ) , ( pThis->d_max >> FRACTION_BITS ) + 2 ) ; } } else CtrlReset( pThis ) ; } } static void Name( char* pszBuff ) { strcpy( pszBuff , "celeste" ); } static void Destruct( celeste_effect* pThis ) { delete_cirbuff( &( pThis->leftX ) ) ; delete_cirbuff( &( pThis->rightX ) ) ; memset( pThis , 0 , sizeof( celeste_effect ) ) ; free( pThis ) ; } /**************************************************************************/ /** chorus_effect construction function prototype */ Effect* CelesteCtor(void) { celeste_effect* pReturn = 0 ; pReturn = ( celeste_effect* )malloc( sizeof( celeste_effect) ) ; memset( pReturn , 0 , sizeof( celeste_effect ) ) ; pReturn->m_pfnActionMono = (void*)&ActionMono ; pReturn->m_pfnActionStereo = (void*)&ActionStereo ; pReturn->m_pfnCtrlChange = (void*)&CtrlChange ; pReturn->m_pfnCtrlReset = (void*)&CtrlReset ; pReturn->m_pfnName = (void*)&Name ; pReturn->m_pfnDestruct = (void*)&Destruct ; create_cirbuff( &( pReturn->leftX ) , 0 ) ; create_cirbuff( &( pReturn->rightX ) , 0 ) ; CtrlReset( pReturn ) ; return ( Effect* )pReturn ; } #endif /* CHANNEL_EFFECT */ alsaplayer-0.99.82/attic/midi/cfg.c000066400000000000000000002462461466261456500170260ustar00rootroot00000000000000/* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header$ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 50 #define YY_END_OF_BUFFER 51 static yyconst short int yy_accept[405] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 48, 48, 49, 1, 48, 1, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 21, 24, 0, 0, 0, 28, 0, 34, 0, 33, 0, 32, 0, 31, 0, 26, 0, 30, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 42, 0, 0, 45, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 17, 5, 0, 0, 0, 0, 0, 0, 0, 0, 40, 41, 43, 44, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 0, 0, 0, 0, 0, 0, 6, 0, 0, 5, 5, 0, 0, 0, 35, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 0, 0, 0, 25, 25, 0, 0, 0, 0, 0, 13, 0, 0, 0, 5, 5, 0, 0, 36, 0, 39, 0, 20, 0, 0, 46, 47, 0, 0, 25, 25, 46, 47, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 18, 0, 0, 25, 25, 0, 0, 0, 0, 0, 15, 16, 7, 0, 0, 0, 19, 46, 47, 0, 0, 0, 0, 12, 11, 0, 37, 0, 0, 0, 0, 0, 7, 6, 6, 6, 6, 0, 6, 6, 6, 0, 0, 10, 0, 10, 6, 6, 6, 0, 0, 0, 0, 0, 6, 6, 6, 0, 0, 0, 10, 9, 6, 6, 6, 0, 0, 25, 0, 6, 6, 6, 0, 0, 10, 0, 6, 6, 6, 6, 23, 0, 8, 0, 0, 0, 0, 8, 22, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 6, 7, 1, 1, 1, 1, 1, 1, 1, 8, 9, 10, 1, 1, 11, 12, 13, 11, 14, 11, 15, 11, 11, 11, 16, 1, 1, 17, 1, 1, 1, 18, 19, 20, 21, 19, 19, 19, 19, 19, 19, 19, 19, 22, 19, 23, 24, 19, 19, 19, 19, 19, 25, 19, 26, 19, 19, 27, 1, 28, 1, 1, 1, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 38, 45, 46, 47, 48, 49, 38, 50, 51, 38, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[52] = { 0, 1, 2, 3, 4, 5, 6, 7, 1, 8, 1, 9, 9, 9, 9, 9, 10, 8, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 } ; static yyconst short int yy_base[435] = { 0, 0, 7, 57, 63, 67, 61, 73, 79, 80, 86, 1034, 1687, 88, 1687, 0, 135, 1027, 116, 164, 106, 122, 76, 999, 34, 986, 991, 994, 98, 209, 973, 979, 968, 959, 945, 173, 136, 189, 929, 927, 928, 190, 85, 199, 910, 904, 916, 195, 129, 219, 903, 247, 238, 0, 0, 0, 171, 0, 248, 254, 95, 905, 98, 892, 883, 238, 906, 1687, 248, 271, 172, 273, 229, 287, 292, 306, 311, 325, 330, 344, 264, 345, 350, 861, 865, 832, 828, 820, 814, 239, 815, 819, 307, 804, 0, 810, 809, 798, 787, 781, 775, 781, 755, 751, 748, 0, 334, 367, 747, 740, 736, 707, 712, 717, 346, 165, 368, 708, 703, 707, 685, 686, 690, 378, 185, 288, 376, 153, 0, 424, 390, 0, 408, 438, 391, 277, 1687, 443, 448, 462, 457, 476, 471, 490, 485, 504, 499, 518, 513, 532, 534, 550, 536, 426, 542, 552, 554, 407, 567, 576, 565, 590, 674, 674, 669, 326, 649, 653, 599, 380, 425, 591, 1687, 640, 600, 636, 638, 630, 616, 1687, 608, 611, 1687, 603, 597, 591, 598, 622, 611, 613, 628, 643, 629, 659, 661, 672, 677, 682, 690, 695, 707, 689, 584, 566, 705, 633, 614, 719, 0, 721, 567, 560, 442, 726, 548, 1687, 728, 572, 756, 0, 554, 742, 761, 743, 747, 535, 533, 1687, 1687, 1687, 1687, 525, 510, 1687, 775, 776, 777, 793, 799, 540, 806, 782, 801, 818, 502, 500, 816, 530, 490, 834, 825, 0, 130, 851, 865, 515, 475, 870, 875, 833, 1687, 838, 889, 852, 472, 453, 571, 890, 903, 908, 1687, 891, 174, 290, 909, 916, 442, 437, 914, 455, 429, 948, 459, 399, 384, 914, 953, 660, 967, 962, 931, 1687, 937, 1687, 404, 402, 981, 982, 71, 146, 938, 990, 1687, 1687, 992, 370, 353, 983, 1687, 667, 302, 998, 1000, 1005, 363, 1687, 83, 328, 1014, 1016, 1022, 329, 360, 364, 1030, 1687, 1687, 1044, 0, 1046, 1046, 1687, 357, 352, 1060, 325, 305, 271, 1687, 1061, 285, 1067, 1081, 1086, 238, 238, 1062, 1687, 1088, 1094, 1105, 1107, 1129, 1147, 1112, 1161, 214, 186, 1117, 0, 1138, 1145, 1169, 1171, 1177, 1183, 1201, 1217, 1191, 1231, 1245, 1247, 172, 182, 192, 1185, 1210, 1215, 1233, 1256, 1286, 1300, 1265, 1273, 0, 1314, 1316, 165, 93, 1687, 1284, 1302, 1322, 1330, 1332, 1687, 91, 1324, 0, 27, 61, 33, 1687, 1687, 1687, 1365, 1376, 1387, 1397, 1406, 1416, 1425, 1435, 1446, 1457, 1468, 1479, 1490, 1501, 1511, 1521, 1532, 1543, 1554, 1565, 1576, 1587, 1598, 1609, 1620, 1631, 1642, 1653, 1664, 1675 } ; static yyconst short int yy_def[435] = { 0, 405, 404, 405, 2, 405, 2, 405, 2, 405, 2, 404, 404, 404, 404, 406, 404, 407, 408, 404, 409, 409, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 16, 404, 404, 404, 404, 404, 16, 404, 404, 404, 404, 404, 16, 404, 410, 404, 16, 404, 406, 406, 16, 408, 19, 409, 409, 404, 404, 404, 404, 404, 404, 407, 404, 411, 411, 404, 404, 412, 404, 404, 404, 404, 404, 404, 409, 413, 414, 409, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 29, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 35, 404, 404, 404, 404, 404, 404, 404, 404, 16, 404, 404, 404, 404, 404, 404, 404, 404, 16, 404, 410, 404, 404, 51, 404, 411, 415, 404, 404, 404, 412, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 409, 413, 414, 416, 404, 413, 404, 404, 414, 404, 417, 409, 404, 404, 404, 404, 404, 404, 404, 404, 404, 418, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 415, 404, 419, 413, 413, 404, 414, 414, 414, 416, 417, 416, 420, 417, 404, 404, 404, 404, 419, 417, 417, 421, 409, 404, 404, 404, 422, 404, 404, 404, 404, 418, 423, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 413, 414, 414, 420, 421, 421, 420, 421, 417, 417, 404, 404, 409, 404, 404, 404, 422, 424, 404, 404, 418, 423, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 414, 414, 413, 404, 421, 421, 421, 417, 417, 404, 404, 409, 404, 404, 404, 424, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 414, 414, 421, 421, 417, 417, 404, 404, 409, 404, 404, 404, 404, 404, 404, 425, 404, 404, 404, 404, 421, 421, 417, 417, 409, 404, 404, 404, 404, 404, 404, 425, 426, 404, 404, 404, 421, 421, 414, 404, 404, 404, 404, 404, 426, 404, 422, 427, 404, 404, 428, 404, 429, 422, 422, 427, 430, 422, 427, 427, 404, 404, 428, 431, 428, 429, 422, 422, 430, 424, 430, 424, 432, 422, 427, 427, 404, 404, 431, 428, 428, 422, 422, 414, 424, 424, 432, 432, 421, 427, 427, 404, 404, 404, 433, 422, 422, 427, 427, 404, 404, 433, 434, 404, 434, 404, 404, 404, 0, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404 } ; static yyconst short int yy_nxt[1739] = { 0, 404, 13, 14, 404, 13, 404, 15, 12, 16, 14, 12, 16, 12, 17, 12, 18, 19, 18, 18, 18, 18, 18, 12, 12, 20, 20, 20, 20, 20, 20, 21, 20, 20, 22, 12, 12, 23, 12, 24, 25, 12, 12, 12, 26, 12, 12, 12, 27, 12, 12, 12, 12, 28, 12, 12, 12, 12, 12, 29, 14, 403, 29, 41, 15, 35, 41, 402, 35, 37, 14, 86, 37, 401, 15, 43, 14, 270, 43, 87, 15, 47, 49, 14, 47, 49, 30, 15, 51, 270, 52, 51, 30, 52, 42, 53, 31, 83, 84, 32, 38, 39, 31, 33, 34, 32, 44, 39, 40, 36, 34, 316, 48, 45, 40, 80, 83, 84, 68, 45, 46, 68, 81, 80, 399, 88, 46, 111, 91, 396, 50, 80, 92, 69, 332, 86, 50, 55, 81, 80, 55, 93, 53, 87, 56, 57, 56, 56, 56, 56, 56, 82, 270, 58, 58, 58, 58, 58, 58, 59, 58, 58, 60, 283, 284, 61, 91, 62, 63, 88, 92, 120, 64, 68, 132, 105, 68, 132, 105, 93, 270, 65, 70, 103, 71, 185, 317, 72, 69, 73, 74, 107, 114, 395, 107, 114, 53, 123, 389, 186, 123, 116, 95, 75, 116, 88, 53, 111, 76, 77, 78, 94, 96, 388, 94, 97, 53, 298, 387, 106, 99, 125, 108, 115, 125, 88, 53, 120, 124, 109, 109, 135, 117, 373, 135, 118, 110, 110, 95, 118, 52, 168, 119, 52, 168, 53, 119, 372, 96, 128, 68, 97, 128, 68, 131, 98, 99, 80, 129, 129, 129, 129, 129, 80, 81, 80, 154, 357, 91, 155, 81, 80, 92, 404, 356, 133, 404, 131, 133, 135, 156, 93, 135, 82, 134, 134, 134, 134, 134, 137, 125, 347, 137, 125, 139, 53, 270, 139, 138, 138, 138, 138, 138, 140, 140, 140, 140, 140, 141, 171, 338, 141, 171, 143, 325, 326, 143, 142, 142, 142, 142, 142, 144, 144, 144, 144, 144, 145, 213, 345, 145, 213, 147, 299, 270, 147, 146, 146, 146, 146, 146, 148, 148, 148, 148, 148, 149, 157, 114, 150, 158, 114, 149, 151, 159, 150, 344, 172, 270, 151, 152, 153, 160, 270, 91, 336, 152, 153, 92, 107, 116, 333, 107, 116, 53, 53, 335, 93, 331, 115, 123, 103, 217, 123, 322, 217, 109, 126, 126, 126, 126, 126, 404, 110, 337, 404, 404, 161, 338, 321, 108, 117, 134, 134, 134, 134, 134, 109, 118, 157, 132, 124, 157, 132, 110, 119, 315, 314, 118, 188, 188, 188, 188, 188, 160, 119, 68, 171, 197, 68, 171, 198, 199, 56, 310, 129, 129, 129, 129, 129, 133, 69, 200, 133, 249, 137, 309, 249, 137, 134, 134, 134, 134, 134, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 139, 308, 306, 139, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 141, 305, 303, 141, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 143, 302, 293, 143, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145, 292, 287, 145, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, 286, 280, 147, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 149, 279, 149, 149, 192, 150, 277, 193, 276, 151, 154, 159, 270, 154, 156, 160, 152, 153, 189, 160, 154, 190, 201, 155, 156, 201, 266, 191, 191, 191, 191, 191, 156, 207, 156, 157, 207, 208, 158, 265, 217, 264, 159, 217, 204, 263, 194, 204, 195, 294, 160, 256, 295, 205, 205, 205, 205, 205, 149, 171, 252, 150, 171, 219, 202, 151, 203, 168, 221, 248, 168, 221, 152, 153, 247, 245, 216, 216, 216, 216, 216, 189, 404, 222, 189, 404, 404, 209, 188, 188, 188, 188, 188, 244, 233, 156, 189, 192, 232, 190, 192, 157, 231, 230, 157, 191, 191, 191, 191, 191, 156, 149, 160, 229, 234, 404, 160, 228, 227, 226, 191, 191, 191, 191, 191, 156, 153, 192, 311, 157, 193, 311, 158, 225, 159, 324, 159, 224, 324, 202, 157, 203, 160, 158, 160, 154, 223, 159, 155, 80, 197, 220, 215, 197, 208, 160, 214, 201, 197, 200, 201, 198, 199, 238, 200, 239, 240, 80, 239, 194, 235, 195, 200, 204, 212, 201, 204, 241, 201, 404, 211, 236, 205, 205, 205, 205, 205, 207, 210, 149, 207, 208, 150, 184, 213, 183, 151, 213, 251, 202, 182, 203, 122, 152, 153, 216, 216, 216, 216, 216, 221, 259, 121, 221, 259, 261, 120, 242, 261, 243, 181, 180, 179, 246, 253, 222, 260, 253, 404, 257, 262, 113, 257, 254, 254, 254, 254, 254, 258, 258, 258, 258, 258, 149, 157, 157, 234, 158, 158, 112, 271, 159, 159, 271, 270, 111, 178, 156, 153, 160, 160, 238, 177, 239, 240, 269, 239, 238, 176, 404, 238, 270, 404, 404, 238, 241, 239, 240, 269, 239, 175, 241, 267, 268, 149, 174, 404, 150, 241, 404, 404, 151, 272, 404, 273, 104, 404, 404, 152, 153, 103, 259, 249, 278, 259, 249, 261, 102, 101, 261, 274, 281, 281, 281, 281, 281, 260, 100, 173, 253, 290, 262, 253, 290, 170, 169, 167, 275, 285, 285, 285, 285, 285, 253, 166, 291, 253, 404, 257, 165, 164, 257, 254, 254, 254, 254, 254, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 288, 157, 271, 288, 158, 271, 270, 163, 159, 289, 289, 289, 289, 289, 157, 162, 160, 158, 67, 154, 404, 159, 155, 404, 404, 149, 89, 404, 150, 160, 404, 404, 151, 156, 285, 285, 285, 285, 285, 152, 153, 88, 290, 85, 272, 290, 273, 127, 312, 404, 296, 312, 404, 404, 122, 297, 121, 291, 300, 307, 304, 120, 307, 313, 253, 301, 113, 253, 281, 281, 281, 281, 281, 285, 285, 285, 285, 285, 288, 112, 111, 288, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 157, 157, 307, 158, 158, 307, 318, 159, 159, 404, 104, 149, 404, 404, 150, 160, 160, 311, 151, 312, 311, 328, 312, 103, 329, 152, 153, 329, 102, 101, 330, 100, 330, 404, 313, 404, 404, 404, 404, 404, 90, 149, 89, 88, 150, 85, 323, 67, 151, 324, 319, 404, 324, 404, 320, 334, 153, 404, 339, 339, 339, 339, 339, 404, 404, 329, 404, 404, 329, 404, 404, 330, 404, 330, 341, 341, 341, 341, 341, 342, 346, 346, 343, 346, 346, 359, 159, 404, 404, 339, 339, 339, 339, 339, 160, 341, 341, 341, 341, 341, 342, 404, 404, 342, 251, 342, 404, 207, 343, 352, 207, 208, 353, 404, 404, 348, 404, 404, 404, 404, 348, 194, 404, 195, 404, 360, 157, 404, 404, 158, 81, 157, 404, 353, 158, 81, 404, 404, 353, 404, 404, 348, 349, 404, 350, 404, 348, 354, 365, 355, 282, 366, 81, 282, 362, 367, 404, 404, 404, 404, 404, 404, 404, 368, 404, 363, 204, 404, 404, 204, 404, 404, 370, 404, 404, 369, 369, 369, 369, 369, 157, 404, 404, 158, 81, 375, 404, 353, 404, 376, 404, 404, 404, 404, 404, 348, 365, 404, 282, 366, 379, 282, 365, 367, 404, 365, 308, 404, 404, 404, 383, 368, 282, 383, 384, 282, 404, 368, 404, 404, 365, 371, 282, 366, 379, 282, 377, 367, 378, 390, 404, 404, 390, 404, 404, 368, 380, 404, 404, 380, 308, 376, 404, 404, 404, 381, 381, 381, 381, 381, 157, 404, 404, 157, 404, 404, 404, 404, 404, 369, 369, 369, 369, 369, 157, 348, 157, 158, 81, 158, 81, 353, 404, 353, 404, 157, 404, 404, 158, 348, 404, 348, 159, 391, 282, 404, 282, 282, 308, 282, 160, 404, 383, 392, 282, 383, 384, 282, 404, 404, 404, 404, 385, 390, 386, 380, 390, 398, 380, 308, 404, 404, 404, 404, 381, 381, 381, 381, 381, 365, 404, 404, 365, 308, 404, 404, 404, 404, 381, 381, 381, 381, 381, 157, 368, 157, 158, 81, 158, 81, 353, 404, 353, 404, 404, 404, 404, 404, 348, 157, 348, 157, 158, 81, 158, 81, 353, 404, 353, 404, 404, 404, 404, 404, 348, 404, 348, 404, 404, 404, 404, 404, 404, 404, 404, 404, 394, 404, 404, 404, 404, 404, 393, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 54, 54, 404, 54, 54, 54, 54, 54, 54, 54, 54, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 56, 404, 404, 56, 404, 404, 56, 56, 79, 404, 404, 404, 79, 79, 404, 79, 79, 79, 79, 126, 404, 404, 126, 404, 126, 404, 126, 130, 130, 404, 404, 130, 130, 404, 130, 130, 130, 130, 136, 404, 404, 136, 404, 404, 404, 404, 404, 136, 80, 80, 404, 404, 80, 80, 404, 80, 80, 80, 80, 81, 81, 404, 404, 81, 81, 404, 81, 81, 81, 81, 187, 187, 404, 187, 187, 404, 187, 187, 187, 187, 187, 196, 196, 404, 404, 196, 196, 404, 196, 196, 196, 196, 206, 206, 404, 404, 206, 206, 404, 206, 206, 206, 206, 218, 218, 404, 404, 218, 218, 404, 218, 218, 218, 218, 205, 404, 404, 205, 404, 404, 404, 205, 205, 237, 237, 404, 237, 237, 237, 237, 237, 237, 237, 237, 239, 239, 404, 239, 239, 404, 239, 239, 239, 239, 239, 250, 250, 404, 404, 250, 250, 404, 250, 250, 250, 250, 255, 255, 404, 255, 255, 404, 255, 255, 255, 255, 255, 282, 282, 404, 282, 282, 404, 282, 282, 282, 282, 282, 327, 327, 404, 404, 327, 327, 404, 327, 327, 327, 327, 340, 340, 404, 340, 340, 404, 340, 340, 340, 340, 340, 351, 351, 404, 404, 351, 351, 404, 351, 351, 351, 351, 358, 358, 404, 404, 358, 358, 404, 358, 358, 358, 358, 361, 361, 404, 404, 361, 361, 404, 361, 361, 361, 361, 364, 364, 404, 364, 364, 364, 364, 364, 364, 364, 364, 374, 374, 404, 374, 374, 404, 374, 374, 374, 374, 374, 382, 382, 404, 382, 382, 382, 382, 382, 382, 382, 382, 397, 397, 404, 404, 397, 397, 404, 397, 397, 397, 397, 400, 400, 404, 400, 400, 404, 400, 400, 400, 400, 400, 11, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404 } ; static yyconst short int yy_chk[1739] = { 0, 0, 1, 1, 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 401, 3, 6, 3, 4, 6, 400, 4, 5, 5, 24, 5, 399, 5, 7, 7, 298, 7, 24, 7, 8, 9, 9, 8, 9, 3, 9, 10, 316, 13, 10, 4, 13, 6, 13, 3, 22, 22, 3, 5, 6, 4, 3, 3, 4, 7, 5, 6, 4, 4, 298, 8, 7, 5, 20, 60, 60, 18, 8, 7, 18, 20, 20, 396, 42, 8, 42, 28, 388, 9, 21, 28, 18, 316, 62, 10, 16, 21, 21, 16, 28, 16, 62, 16, 16, 16, 16, 16, 16, 16, 21, 299, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 252, 252, 16, 36, 16, 16, 48, 36, 48, 16, 56, 70, 35, 56, 70, 35, 36, 272, 16, 19, 36, 19, 127, 299, 19, 56, 19, 19, 37, 41, 387, 37, 41, 37, 47, 374, 127, 47, 43, 35, 19, 43, 115, 43, 115, 19, 19, 19, 29, 35, 373, 29, 35, 29, 272, 372, 35, 35, 49, 37, 41, 49, 124, 49, 124, 47, 37, 41, 72, 43, 357, 72, 47, 37, 41, 29, 43, 52, 89, 47, 52, 89, 52, 43, 356, 29, 51, 68, 29, 51, 68, 68, 29, 29, 58, 51, 51, 51, 51, 51, 59, 58, 58, 80, 345, 65, 80, 59, 59, 65, 69, 344, 71, 69, 69, 71, 135, 80, 65, 135, 59, 71, 71, 71, 71, 71, 73, 125, 340, 73, 125, 74, 125, 273, 74, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 75, 92, 337, 75, 92, 76, 310, 310, 76, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 77, 165, 336, 77, 165, 78, 273, 317, 78, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 79, 81, 114, 79, 81, 114, 82, 79, 81, 82, 335, 92, 333, 82, 79, 79, 81, 332, 106, 322, 82, 82, 106, 107, 116, 317, 107, 116, 107, 116, 321, 106, 314, 114, 123, 106, 169, 123, 306, 169, 114, 126, 126, 126, 126, 126, 130, 114, 323, 130, 130, 82, 323, 305, 107, 116, 134, 134, 134, 134, 134, 107, 116, 157, 132, 123, 157, 132, 107, 116, 295, 294, 123, 132, 132, 132, 132, 132, 157, 123, 129, 170, 153, 129, 170, 153, 153, 129, 284, 129, 129, 129, 129, 129, 133, 129, 153, 133, 212, 137, 283, 212, 137, 133, 133, 133, 133, 133, 137, 137, 137, 137, 137, 138, 138, 138, 138, 138, 139, 282, 280, 139, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 141, 279, 277, 141, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 143, 276, 265, 143, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 145, 264, 256, 145, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 147, 255, 248, 147, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 149, 247, 150, 149, 152, 150, 245, 152, 244, 150, 154, 152, 239, 154, 149, 149, 150, 150, 151, 152, 155, 151, 156, 155, 154, 156, 232, 151, 151, 151, 151, 151, 151, 160, 155, 158, 160, 160, 158, 231, 217, 226, 158, 217, 159, 225, 152, 159, 152, 266, 158, 220, 266, 159, 159, 159, 159, 159, 161, 171, 214, 161, 171, 171, 156, 161, 156, 168, 174, 211, 168, 174, 161, 161, 210, 203, 168, 168, 168, 168, 168, 189, 206, 174, 189, 206, 206, 161, 188, 188, 188, 188, 188, 202, 187, 189, 190, 192, 186, 190, 192, 205, 185, 184, 205, 190, 190, 190, 190, 190, 190, 191, 192, 183, 191, 205, 205, 181, 180, 178, 191, 191, 191, 191, 191, 191, 191, 193, 287, 194, 193, 287, 194, 177, 193, 309, 194, 176, 309, 192, 195, 192, 193, 195, 194, 196, 175, 195, 196, 196, 197, 173, 167, 197, 197, 195, 166, 201, 198, 196, 201, 198, 198, 199, 197, 199, 199, 199, 199, 193, 194, 193, 198, 204, 164, 200, 204, 199, 200, 200, 163, 195, 204, 204, 204, 204, 204, 207, 162, 209, 207, 207, 209, 122, 213, 121, 209, 213, 213, 201, 120, 201, 119, 209, 209, 216, 216, 216, 216, 216, 221, 223, 118, 221, 223, 224, 117, 200, 224, 200, 113, 112, 111, 209, 218, 221, 223, 218, 218, 222, 224, 110, 222, 218, 218, 218, 218, 218, 222, 222, 222, 222, 222, 234, 235, 236, 234, 235, 236, 109, 241, 235, 236, 241, 241, 108, 104, 234, 234, 235, 236, 237, 103, 237, 237, 237, 237, 238, 102, 242, 238, 238, 242, 242, 240, 237, 240, 240, 240, 240, 101, 238, 235, 236, 246, 100, 243, 246, 240, 243, 243, 246, 241, 250, 241, 99, 250, 250, 246, 246, 98, 259, 249, 246, 259, 249, 261, 97, 96, 261, 242, 249, 249, 249, 249, 249, 259, 95, 93, 253, 263, 261, 253, 263, 91, 90, 88, 243, 253, 253, 253, 253, 253, 254, 87, 263, 254, 254, 257, 86, 85, 257, 254, 254, 254, 254, 254, 257, 257, 257, 257, 257, 258, 258, 258, 258, 258, 262, 267, 271, 262, 267, 271, 271, 84, 267, 262, 262, 262, 262, 262, 268, 83, 267, 268, 66, 269, 274, 268, 269, 274, 274, 278, 64, 275, 278, 268, 275, 275, 278, 269, 285, 285, 285, 285, 285, 278, 278, 63, 290, 61, 271, 290, 271, 50, 292, 300, 267, 292, 300, 300, 46, 268, 45, 290, 274, 281, 278, 44, 281, 292, 286, 275, 40, 286, 281, 281, 281, 281, 281, 286, 286, 286, 286, 286, 288, 39, 38, 288, 289, 289, 289, 289, 289, 288, 288, 288, 288, 288, 296, 297, 307, 296, 297, 307, 300, 296, 297, 301, 34, 304, 301, 301, 304, 296, 297, 311, 304, 312, 311, 311, 312, 33, 313, 304, 304, 313, 32, 31, 313, 30, 313, 318, 312, 319, 318, 318, 319, 319, 27, 320, 26, 25, 320, 23, 307, 17, 320, 324, 301, 11, 324, 0, 304, 320, 320, 0, 324, 324, 324, 324, 324, 327, 0, 329, 327, 327, 329, 0, 0, 329, 0, 329, 330, 330, 330, 330, 330, 334, 339, 346, 334, 339, 346, 346, 334, 0, 0, 339, 339, 339, 339, 339, 334, 341, 341, 341, 341, 341, 342, 0, 0, 342, 342, 343, 0, 348, 343, 343, 348, 348, 343, 349, 0, 342, 349, 349, 0, 0, 343, 334, 0, 334, 350, 346, 351, 350, 350, 351, 351, 354, 0, 351, 354, 354, 358, 0, 354, 358, 358, 351, 342, 0, 342, 0, 354, 343, 352, 343, 352, 352, 352, 352, 349, 352, 0, 360, 0, 0, 360, 360, 0, 352, 361, 350, 353, 361, 361, 353, 353, 0, 354, 0, 0, 353, 353, 353, 353, 353, 355, 0, 0, 355, 355, 360, 0, 355, 362, 360, 363, 362, 362, 363, 363, 355, 364, 0, 364, 364, 364, 364, 365, 364, 375, 365, 365, 375, 375, 0, 368, 364, 368, 368, 368, 368, 0, 365, 0, 0, 366, 355, 366, 366, 366, 366, 362, 366, 363, 376, 0, 0, 376, 376, 377, 366, 367, 377, 377, 367, 367, 375, 0, 0, 0, 367, 367, 367, 367, 367, 369, 0, 378, 369, 369, 378, 378, 0, 0, 369, 369, 369, 369, 369, 370, 369, 371, 370, 370, 371, 371, 370, 0, 371, 0, 379, 0, 0, 379, 370, 0, 371, 379, 377, 382, 0, 382, 382, 382, 382, 379, 0, 383, 378, 383, 383, 383, 383, 0, 0, 0, 0, 370, 390, 371, 380, 390, 390, 380, 380, 0, 0, 0, 0, 380, 380, 380, 380, 380, 381, 0, 391, 381, 381, 391, 391, 0, 0, 381, 381, 381, 381, 381, 385, 381, 386, 385, 385, 386, 386, 385, 392, 386, 397, 392, 392, 397, 397, 385, 393, 386, 394, 393, 393, 394, 394, 393, 0, 394, 0, 0, 0, 0, 0, 393, 0, 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 0, 0, 0, 0, 0, 385, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 406, 406, 0, 406, 406, 406, 406, 406, 406, 406, 406, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 408, 0, 0, 408, 0, 0, 408, 408, 409, 0, 0, 0, 409, 409, 0, 409, 409, 409, 409, 410, 0, 0, 410, 0, 410, 0, 410, 411, 411, 0, 0, 411, 411, 0, 411, 411, 411, 411, 412, 0, 0, 412, 0, 0, 0, 0, 0, 412, 413, 413, 0, 0, 413, 413, 0, 413, 413, 413, 413, 414, 414, 0, 0, 414, 414, 0, 414, 414, 414, 414, 415, 415, 0, 415, 415, 0, 415, 415, 415, 415, 415, 416, 416, 0, 0, 416, 416, 0, 416, 416, 416, 416, 417, 417, 0, 0, 417, 417, 0, 417, 417, 417, 417, 418, 418, 0, 0, 418, 418, 0, 418, 418, 418, 418, 419, 0, 0, 419, 0, 0, 0, 419, 419, 420, 420, 0, 420, 420, 420, 420, 420, 420, 420, 420, 421, 421, 0, 421, 421, 0, 421, 421, 421, 421, 421, 422, 422, 0, 0, 422, 422, 0, 422, 422, 422, 422, 423, 423, 0, 423, 423, 0, 423, 423, 423, 423, 423, 424, 424, 0, 424, 424, 0, 424, 424, 424, 424, 424, 425, 425, 0, 0, 425, 425, 0, 425, 425, 425, 425, 426, 426, 0, 426, 426, 0, 426, 426, 426, 426, 426, 427, 427, 0, 0, 427, 427, 0, 427, 427, 427, 427, 428, 428, 0, 0, 428, 428, 0, 428, 428, 428, 428, 429, 429, 0, 0, 429, 429, 0, 429, 429, 429, 429, 430, 430, 0, 430, 430, 430, 430, 430, 430, 430, 430, 431, 431, 0, 431, 431, 0, 431, 431, 431, 431, 431, 432, 432, 0, 432, 432, 432, 432, 432, 432, 432, 432, 433, 433, 0, 0, 433, 433, 0, 433, 433, 433, 433, 434, 434, 0, 434, 434, 0, 434, 434, 434, 434, 434, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "./cfg.l" #define INITIAL 0 #line 2 "./cfg.l" /* * Cfg file reader, Greg Lee, 8/93. * Adapted from Adagio for KMidi 12/99. * $Id$ */ #include #include #include #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include "output.h" #include "controls.h" #include "tables.h" #include "version.h" #define YY_ALWAYS_INTERACTIVE 0 #define YY_NEVER_INTERACTIVE 1 #define YY_INPUT(buf,result,max_size) \ result = fread( buf, 1, max_size, yyin ); #ifdef STANDALONE extern int set_play_mode(char *cp); #endif static int prescanning; static char doing_drums = 0; static char doing_sf = 0; static int patchno = -1; static int i, j; static char *patchname; static char cfg_flag = 1; static int tone_bank; static void set_patchno(char *m); static char *s_dirname = 0; static char *sfname = 0; static int current_toneset = 0; static int current_drumset = 0; static int cfg_condition = -1; static ToneBank *bank=0; static int banknum=0; static int rcf_count=1; static int font_type=FONT_NORMAL; #define MAX_INCLUDE_DEPTH 40 static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; static int include_stack_ptr = 0; static void new_toneset(int n); static void new_patch(const char *vname, int num); #include "xmap.h" static int map_col, map_row; #define YY_NO_UNPUT 1 #define P 1 #define K 2 #define S 3 #define M 4 /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ yy_current_buffer->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 79 "./cfg.l" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 405 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 404 ); yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 81 "./cfg.l" ; YY_BREAK case 2: YY_RULE_SETUP #line 82 "./cfg.l" ; YY_BREAK case 3: YY_RULE_SETUP #line 84 "./cfg.l" { int i = 0; while (isspace(yytext[i])) i++; i += 2; cfg_condition = atoi(yytext+i); } YY_BREAK case 4: YY_RULE_SETUP #line 90 "./cfg.l" { cfg_condition = 0; } YY_BREAK case 5: YY_RULE_SETUP #line 93 "./cfg.l" { int sf_oldbank, sf_newbank = banknum; int i = 0, j; while (isspace(yytext[i])) i++; if (yytext[i+1] == 'f') i += 2; else i += 3; while (isspace(yytext[i])) i++; if (yytext[i] == '"') { i++; for (j = i; j < yyleng && yytext[j] != '"'; j++) ; /*j--;*/ } else for (j = i; j < yyleng && !isspace(yytext[j]); j++) ; sfname = strncpy( (char *)malloc(j-i+1), yytext+i, j-i ); sfname[j-i] = '\0'; if (doing_drums) sf_newbank += 256; sf_oldbank = sf_newbank; if (j < yyleng) { while (j < yyleng && isspace(yytext[j])) j++; if (j < yyleng && isdigit(yytext[j])) sf_oldbank = atoi(yytext+j); } if (!init_soundfont(sfname, sf_oldbank, sf_newbank, rcf_count)) return -1; } YY_BREAK case 6: YY_RULE_SETUP #line 116 "./cfg.l" { int i = 0; while (isspace(yytext[i])) i++; if (yytext[i] == 'd') i += 3; else i += 9; while (isspace(yytext[i])) i++; s_dirname = strcpy( (char *)malloc(strlen(yytext+i)+1), yytext+i ); add_to_pathlist(s_dirname, rcf_count); free(s_dirname); } YY_BREAK case 7: YY_RULE_SETUP #line 126 "./cfg.l" { char *fname; int i = 0; FILE *save_yyin; while (isspace(yytext[i])) i++; i += 6; while (isspace(yytext[i])) i++; if (prescanning && cfg_condition >= 0 && cfg_condition < 30 && rcf_count==1 && !cfg_names[cfg_condition]) { cfg_names[cfg_condition] = (char *)safe_malloc(strlen(yytext+i)+1); strcpy(cfg_names[cfg_condition], yytext+i); } if (!prescanning && (cfg_condition < 0 || cfg_condition == cfg_select)) { if ( include_stack_ptr >= MAX_INCLUDE_DEPTH ) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Probable source loop in configuration files"); return (-1); } include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER; fname = strcpy( (char *)malloc(strlen(yytext+i)+1), yytext+i ); save_yyin = yyin; yyin = NULL; yyin = open_file(fname, 1, OF_VERBOSE, rcf_count); if (yyin == NULL) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Source file %s not found\n", fname); include_stack_ptr--; } if (yyin == NULL) yyin = save_yyin; else { cfg_condition = -1; rcf_count++; yy_switch_to_buffer( yy_create_buffer( yyin, YY_BUF_SIZE ) ); } } cfg_condition = -1; } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(P): case YY_STATE_EOF(K): case YY_STATE_EOF(S): case YY_STATE_EOF(M): #line 177 "./cfg.l" { if ( --include_stack_ptr < 0 ) { yyterminate(); } else { if (yyin) close_file(yyin); yy_delete_buffer( YY_CURRENT_BUFFER ); rcf_count--; yy_switch_to_buffer( include_stack[include_stack_ptr] ); } } YY_BREAK case 8: YY_RULE_SETUP #line 190 "./cfg.l" { char *bank_name = NULL; int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 1; new_toneset(current_drumset); font_type=FONT_SBK; if (!bank->name) { while (isspace(yytext[i])) i++; while (isdigit(yytext[i])) i++; while (isspace(yytext[i])) i++; if (yytext[i+1] == 'f') i += 2; else i += 3; while (isspace(yytext[i])) i++; patchname = yytext + i; if (patchname[0] == '"') { bank_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); bank_name[strlen(patchname)-2] = '\0'; } else bank_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); bank->name = bank_name; } } YY_BREAK case 9: YY_RULE_SETUP #line 216 "./cfg.l" { int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 1; new_toneset(current_drumset); font_type=FONT_SBK; } YY_BREAK case 10: YY_RULE_SETUP #line 226 "./cfg.l" { char *bank_name = NULL; int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; if (!bank->name) { while (isspace(yytext[i])) i++; while (isdigit(yytext[i])) i++; while (isspace(yytext[i])) i++; patchname = yytext + i; if (patchname[0] == '"') { bank_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); bank_name[strlen(patchname)-2] = '\0'; } else bank_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); bank->name = bank_name; } } YY_BREAK case 11: YY_RULE_SETUP #line 249 "./cfg.l" { int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; } YY_BREAK case 12: YY_RULE_SETUP #line 259 "./cfg.l" { int i = 0; while (isspace(yytext[i])) i++; i += 4; current_toneset = atoi(yytext+i); doing_drums = 0; doing_sf = 1; new_toneset(current_toneset); font_type=FONT_SBK; } YY_BREAK case 13: YY_RULE_SETUP #line 269 "./cfg.l" { int i = 0; while (isspace(yytext[i])) i++; i += 4; current_toneset = atoi(yytext+i); doing_drums = 0; doing_sf = 0; new_toneset(current_toneset); font_type=FONT_NORMAL; } YY_BREAK case 14: YY_RULE_SETUP #line 279 "./cfg.l" { current_toneset = SFXBANK; doing_drums = 0; doing_sf = 0; new_toneset(current_toneset); font_type=FONT_NORMAL; } YY_BREAK case 15: YY_RULE_SETUP #line 286 "./cfg.l" { current_drumset = SFXDRUM1; doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; bank->name = "drumsfx1"; } YY_BREAK case 16: YY_RULE_SETUP #line 294 "./cfg.l" { current_drumset = SFXDRUM2; doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; bank->name = "drumsfx2"; } YY_BREAK case 17: YY_RULE_SETUP #line 303 "./cfg.l" { BEGIN(M); if (xmap[map_row][0]) { if (xmap[map_row][1] == xmap[map_row][3] && xmap[map_row][2] == xmap[map_row][4] ) xmap[map_row][0] = 0; else if (map_row < XMAPMAX) map_row++; } map_col = -1; } YY_BREAK case 18: YY_RULE_SETUP #line 314 "./cfg.l" { xmap[map_row][0] = SFXBANK; map_col = 1; current_toneset = SFXBANK; doing_drums = 0; doing_sf = 0; new_toneset(current_toneset); font_type=FONT_NORMAL; } YY_BREAK case 19: YY_RULE_SETUP #line 323 "./cfg.l" { xmap[map_row][0] = SFXDRUM1; map_col = 1; current_drumset = SFXDRUM1; doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; bank->name = "drumsfx1"; } YY_BREAK case 20: YY_RULE_SETUP #line 333 "./cfg.l" { xmap[map_row][0] = XGDRUM; map_col = 1; } YY_BREAK case 21: YY_RULE_SETUP #line 338 "./cfg.l" { if (map_col >= 1 && map_col <= 4) xmap[map_row][map_col++] = atoi(yytext); } YY_BREAK case 22: YY_RULE_SETUP #line 343 "./cfg.l" { doing_drums = 0; } YY_BREAK case 23: YY_RULE_SETUP #line 346 "./cfg.l" { doing_drums = 1; current_drumset = current_toneset; } YY_BREAK case 24: YY_RULE_SETUP #line 351 "./cfg.l" { const char *gm_name = NULL; char *vc_name = NULL; patchno = atoi(yytext); tone_bank = 0; if (patchno >= 0) { i = 0; while (isspace(yytext[i])) i++; while (isdigit(yytext[i])) i++; if (yytext[i] == ',') { i++; tone_bank = atoi(yytext + i); while (isdigit(yytext[i])) i++; } else { if (doing_drums) tone_bank = current_drumset; else tone_bank = current_toneset; } new_toneset(tone_bank); while (isspace(yytext[i])) i++; if (!cfg_flag && yytext[i] == '=') i++; if ( (patchname = strrchr(yytext + i, '\\')) == NULL) patchname = yytext + i; else patchname++; if (patchname[0] == '"') { vc_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); vc_name[strlen(patchname)-2] = '\0'; } else vc_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); if (patchno < 128) gm_name = gm_voice[doing_drums? patchno+128 : patchno].vname; else { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Bad patch number %d in cfg file.", patchno); } if (gm_name == NULL) gm_name = (doing_drums)? "drum":"instr"; ctl->cmsg(CMSG_INFO, VERB_DEBUG, "config: voice %s[%d,%d] = patch %s", gm_name, patchno, tone_bank, vc_name); new_patch(vc_name, patchno); } BEGIN(P); } YY_BREAK case 25: YY_RULE_SETUP #line 396 "./cfg.l" { const char *gm_name = NULL; char *vc_name = NULL; int i; set_patchno(yytext); tone_bank = 0; if (patchno < 256) { i = 0; while (yytext[i] != '=' && yytext[i] != ',') i++; if (yytext[i] == ',') { i++; tone_bank = atoi(yytext + i); } else { if (doing_drums) tone_bank = current_drumset; else tone_bank = current_toneset; } while (yytext[i] != '=') i++; i++; while (isspace(yytext[i])) i++; if ( (patchname = strrchr(yytext + i, '\\')) == NULL) patchname = yytext + i; else patchname++; if (patchname[0] == '"') { vc_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); vc_name[strlen(patchname)-2] = '\0'; } else vc_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); gm_name = gm_voice[patchno].vname; if (gm_name == NULL) gm_name = (doing_drums)? "drum":"instr"; ctl->cmsg(CMSG_INFO, VERB_DEBUG, "config: voice %s[%d,%d] = patch %s", gm_name, patchno, tone_bank, vc_name); } else { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Bad line \"%s ...\" in cfg file.", yytext); } new_patch(vc_name, patchno); BEGIN(P); } YY_BREAK case 26: YY_RULE_SETUP #line 440 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j > 1 && j <= MAX_VOICES) config_voices = j; } } YY_BREAK case 27: YY_RULE_SETUP #line 445 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j > 1 && j <= MAX_AMPLIFICATION) config_amplification = j; } } YY_BREAK case 28: YY_RULE_SETUP #line 450 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j > 1 && j <= MAX_CONTROL_RATIO) control_ratio = j; } } YY_BREAK case 29: YY_RULE_SETUP #line 455 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j < 100) j *= 1000; if (j > MIN_OUTPUT_RATE && j <= MAX_OUTPUT_RATE) play_mode->rate = j; } } YY_BREAK case 30: YY_RULE_SETUP #line 461 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); max_patch_memory = j * 1000000; } } YY_BREAK case 31: YY_RULE_SETUP #line 466 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j >= 0 && j <= 3) config_interpolation = j; } } YY_BREAK case 32: YY_RULE_SETUP #line 471 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j >= 0 && j <= 2) opt_expression_curve = j; } } YY_BREAK case 33: YY_RULE_SETUP #line 476 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j >= 0 && j <= 2) opt_volume_curve = j; } } YY_BREAK case 34: YY_RULE_SETUP #line 481 "./cfg.l" { if (prescanning) { i=0; while(isspace(yytext[i])) i++; i+=2; while(isspace(yytext[i])) i++; #ifdef STANDALONE if (set_play_mode(yytext+i)) /* error */; #endif } } YY_BREAK case 35: YY_RULE_SETUP #line 490 "./cfg.l" { int i = 0; while (yytext[i] != '=') i++; bank->tone[patchno].amp = atoi(yytext+i+1); BEGIN(P); } YY_BREAK case 36: YY_RULE_SETUP #line 496 "./cfg.l" { int i = 0; while (yytext[i] != '=') i++; bank->tone[patchno].note = atoi(yytext+i+1); BEGIN(P); } YY_BREAK case 37: YY_RULE_SETUP #line 502 "./cfg.l" { int i = 0; while (yytext[i] != '=') i++; bank->tone[patchno].tuning = atoi(yytext+i+1); BEGIN(P); } YY_BREAK case 38: YY_RULE_SETUP #line 508 "./cfg.l" BEGIN(K); YY_BREAK case 39: YY_RULE_SETUP #line 509 "./cfg.l" BEGIN(S); YY_BREAK case 40: YY_RULE_SETUP #line 511 "./cfg.l" { bank->tone[patchno].strip_loop=0; BEGIN(P); } YY_BREAK case 41: YY_RULE_SETUP #line 515 "./cfg.l" { bank->tone[patchno].strip_tail=0; BEGIN(P); } YY_BREAK case 42: YY_RULE_SETUP #line 519 "./cfg.l" { bank->tone[patchno].strip_envelope=0; BEGIN(P); } YY_BREAK case 43: YY_RULE_SETUP #line 523 "./cfg.l" { bank->tone[patchno].strip_loop=1; BEGIN(P); } YY_BREAK case 44: YY_RULE_SETUP #line 527 "./cfg.l" { bank->tone[patchno].strip_tail=1; BEGIN(P); } YY_BREAK case 45: YY_RULE_SETUP #line 531 "./cfg.l" { bank->tone[patchno].strip_envelope=1; BEGIN(P); } YY_BREAK case 46: YY_RULE_SETUP #line 535 "./cfg.l" { set_patchno(yytext); if (patchno < 256) gm_voice[patchno].flags &= ~SOLO_MASK; } YY_BREAK case 47: YY_RULE_SETUP #line 539 "./cfg.l" { set_patchno(yytext); if (patchno < 256) gm_voice[patchno].flags |= SOLO_MASK; } YY_BREAK case 48: #line 545 "./cfg.l" case 49: YY_RULE_SETUP #line 545 "./cfg.l" { patchno = -1; BEGIN(0); } YY_BREAK case 50: YY_RULE_SETUP #line 549 "./cfg.l" ECHO; YY_BREAK case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 405 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 405 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 404); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; yy_current_buffer->yy_at_bol = (c == '\n'); return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 549 "./cfg.l" static void new_toneset(int n) { banknum=n; if (!doing_drums) { if (!tonebank[n]) { tonebank[n]=(ToneBank *)safe_malloc(sizeof(ToneBank)); memset(tonebank[n], 0, sizeof(ToneBank)); } bank=tonebank[n]; } else { if (!drumset[n]) { drumset[n]=(ToneBank *)safe_malloc(sizeof(ToneBank)); memset(drumset[n], 0, sizeof(ToneBank)); } bank=drumset[n]; } } static void new_patch(const char *vname, int num) { if (bank->tone[num].name) return; bank->tone[num].name=vname; bank->tone[num].note=bank->tone[num].amp=bank->tone[num].pan= bank->tone[num].strip_loop=bank->tone[num].strip_envelope= bank->tone[num].sf_ix= bank->tone[num].strip_tail=bank->tone[num].last_used=-1; bank->tone[num].font_type=font_type; bank->tone[num].tuning=0; bank->tone[num].layer=0; } static void set_patchno(char *m) { int i,j,w,y; const char *vn; y = w = 0; while (isspace(m[w])) w++; for (i = 0; i < 256; i++) { vn = gm_voice[i].vname; if (vn == NULL) continue; for (j = 0; m[j+w] && vn[j+y] && m[j+w] == vn[j+y]; j++) if (vn[j+y+1] && isspace(vn[j+y+1]) && m[j+w+1] && !isspace(m[j+w+1]) ) y++ ; if (!m[j+w] || m[j+w] == '=' || m[j+w] == ',' || m[j+w] == ':') break; if (!vn[j+y] && isspace(m[j+w])) break; } if (i < 256 && vn != NULL) patchno = i; else patchno = 256; } char *current_config_file = 0; int current_config_pc42b = 0; static int pc42b_config_file(const char *name, int prescan); int read_config_file(const char *name, int prescan) { int retvalue = 0, i; prescanning = prescan; include_stack_ptr = 0; rcf_count = 1; if (current_config_pc42b) { return pc42b_config_file(name, prescan); } if (current_config_file) { yyin = fopen(current_config_file, "r"); } else yyin = open_file(name, 1, OF_VERBOSE, rcf_count); if (!yyin) return -1; if (!current_config_file) { current_config_file = (char *)safe_malloc(strlen(current_filename)+1); strcpy(current_config_file, current_filename); } for (i = 0; i < XMAPMAX; i++) xmap[i][0] = 0; map_row = map_col = 0; current_toneset = current_drumset = 0; doing_drums = doing_sf = 0; if (!(retvalue = yylex())) { if (prescan) got_a_configuration = 1; else got_a_configuration = 2; } #if 0 if (!prescan) { fprintf(stderr,"int xmap[][] = {\n"); for (i = 0; i < XMAPMAX; i++) { if (!xmap[i][0]) break; fprintf(stderr,"{ %d, %d, %d, %d, %d }\n", xmap[i][0], xmap[i][1], xmap[i][2], xmap[i][3], xmap[i][4] ); } fprintf(stderr,"};\n"); } #endif close_file(yyin); return retvalue; } #include "PC42b.h" static int pc42b_config_file(const char *name, int prescan) { int retvalue = 0; int i = 0; prescanning = prescan; rcf_count = 1; doing_drums = 0; new_toneset(3); new_toneset(4); new_toneset(5); new_toneset(6); new_toneset(7); new_toneset(8); new_toneset(9); new_toneset(120); doing_drums = 1; new_toneset(26); new_toneset(49); new_toneset(50); new_toneset(121); new_toneset(122); new_toneset(127); current_toneset = current_drumset = 0; doing_drums = doing_sf = 0; while (1) { int action, which; const char *sfname; action = PC42b[i].font_code; which = PC42b[i].num; sfname = PC42b[i].name; switch (action) { case FONT_TONESET: current_toneset = which; doing_drums = 0; doing_sf = 1; new_toneset(current_toneset); font_type=FONT_SBK; break; case FONT_DRUMSET: current_drumset = which; doing_drums = 1; doing_sf = 1; new_toneset(current_drumset); font_type=FONT_SBK; if (!bank->name) bank->name = sfname; break; case FONT_PRESET: patchno = which; if (doing_drums) tone_bank = current_drumset; else tone_bank = current_toneset; new_toneset(tone_bank); new_patch(sfname, patchno); break; case FONT_SBK: if (!init_soundfont((char *)sfname, which, which, 1)) retvalue = -1; break; } if (action == FONT_SBK) break; i++; } /*if (prescan) got_a_configuration = 1; else*/ got_a_configuration = 2; return retvalue; } alsaplayer-0.99.82/attic/midi/cfg.l000066400000000000000000000427421466261456500170320ustar00rootroot00000000000000%{ /* * Cfg file reader, Greg Lee, 8/93. * Adapted from Adagio for KMidi 12/99. * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id$ */ #include #include #include #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include "output.h" #include "controls.h" #include "tables.h" #include "version.h" #define YY_ALWAYS_INTERACTIVE 0 #define YY_NEVER_INTERACTIVE 1 #define YY_INPUT(buf,result,max_size) \ result = fread( buf, 1, max_size, yyin ); #ifdef STANDALONE extern int set_play_mode(char *cp); #endif static int prescanning; static char doing_drums = 0; static char doing_sf = 0; static int patchno = -1; static int i, j; static char *patchname; static char cfg_flag = 1; static int tone_bank; static void set_patchno(char *m); static char *s_dirname = 0; static char *sfname = 0; static int current_toneset = 0; static int current_drumset = 0; static int cfg_condition = -1; static ToneBank *bank=0; static int banknum=0; static int rcf_count=1; static int font_type=FONT_NORMAL; #define MAX_INCLUDE_DEPTH 40 static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; static int include_stack_ptr = 0; static void new_toneset(int n); static void new_patch(const char *vname, int num); #include "xmap.h" static int map_col, map_row; %} %option noyywrap %option nounput %s P K S M wh [ \t]+ owh [ \t]* nm ([^ \t\n\r\"#]+|\"[^\"\n]+\") cm [ \t]*("#".*)?\n %% {owh}"#".* ; ^#.*\n ; ^{owh}"if"{wh}[0-9]+ { int i = 0; while (isspace(yytext[i])) i++; i += 2; cfg_condition = atoi(yytext+i); } ^{owh}"else" { cfg_condition = 0; } ^{owh}("sf"|"sbk"){wh}{nm}{owh}[0-9]* { int sf_oldbank, sf_newbank = banknum; int i = 0, j; while (isspace(yytext[i])) i++; if (yytext[i+1] == 'f') i += 2; else i += 3; while (isspace(yytext[i])) i++; if (yytext[i] == '"') { i++; for (j = i; j < yyleng && yytext[j] != '"'; j++) ; /*j--;*/ } else for (j = i; j < yyleng && !isspace(yytext[j]); j++) ; sfname = strncpy( (char *)malloc(j-i+1), yytext+i, j-i ); sfname[j-i] = '\0'; if (doing_drums) sf_newbank += 256; sf_oldbank = sf_newbank; if (j < yyleng) { while (j < yyleng && isspace(yytext[j])) j++; if (j < yyleng && isdigit(yytext[j])) sf_oldbank = atoi(yytext+j); } if (!init_soundfont(sfname, sf_oldbank, sf_newbank, rcf_count)) return -1; } ^{owh}("dir"|"PatchDir:"){wh}{nm} { int i = 0; while (isspace(yytext[i])) i++; if (yytext[i] == 'd') i += 3; else i += 9; while (isspace(yytext[i])) i++; s_dirname = strcpy( (char *)malloc(strlen(yytext+i)+1), yytext+i ); add_to_pathlist(s_dirname, rcf_count); free(s_dirname); } ^{owh}"source"{wh}{nm} { char *fname; int i = 0; FILE *save_yyin; while (isspace(yytext[i])) i++; i += 6; while (isspace(yytext[i])) i++; if (prescanning && cfg_condition >= 0 && cfg_condition < 30 && rcf_count==1 && !cfg_names[cfg_condition]) { cfg_names[cfg_condition] = (char *)safe_malloc(strlen(yytext+i)+1); strcpy(cfg_names[cfg_condition], yytext+i); } if (!prescanning && (cfg_condition < 0 || cfg_condition == cfg_select)) { if ( include_stack_ptr >= MAX_INCLUDE_DEPTH ) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Probable source loop in configuration files"); return (-1); } include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER; fname = strcpy( (char *)malloc(strlen(yytext+i)+1), yytext+i ); save_yyin = yyin; yyin = NULL; yyin = open_file(fname, 1, OF_VERBOSE, rcf_count); if (yyin == NULL) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Source file %s not found\n", fname); include_stack_ptr--; } if (yyin == NULL) yyin = save_yyin; else { cfg_condition = -1; rcf_count++; yy_switch_to_buffer( yy_create_buffer( yyin, YY_BUF_SIZE ) ); } } cfg_condition = -1; } <> { if ( --include_stack_ptr < 0 ) { yyterminate(); } else { if (yyin) close_file(yyin); yy_delete_buffer( YY_CURRENT_BUFFER ); rcf_count--; yy_switch_to_buffer( include_stack[include_stack_ptr] ); } } ^{owh}"drumset"{wh}[0-9]+{wh}("sf"|"sbk"){wh}{nm} { char *bank_name = NULL; int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 1; new_toneset(current_drumset); font_type=FONT_SBK; if (!bank->name) { while (isspace(yytext[i])) i++; while (isdigit(yytext[i])) i++; while (isspace(yytext[i])) i++; if (yytext[i+1] == 'f') i += 2; else i += 3; while (isspace(yytext[i])) i++; patchname = yytext + i; if (patchname[0] == '"') { bank_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); bank_name[strlen(patchname)-2] = '\0'; } else bank_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); bank->name = bank_name; } } ^{owh}"drumset"{wh}[0-9]+{wh}("sf"|"sbk") { int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 1; new_toneset(current_drumset); font_type=FONT_SBK; } ^{owh}"drumset"{wh}[0-9]+{wh}{nm} { char *bank_name = NULL; int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; if (!bank->name) { while (isspace(yytext[i])) i++; while (isdigit(yytext[i])) i++; while (isspace(yytext[i])) i++; patchname = yytext + i; if (patchname[0] == '"') { bank_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); bank_name[strlen(patchname)-2] = '\0'; } else bank_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); bank->name = bank_name; } } ^{owh}"drumset"{wh}[0-9]+ { int i = 0; while (isspace(yytext[i])) i++; i += 7; current_drumset = atoi(yytext+i); doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; } ^{owh}"bank"{wh}[0-9]+{wh}("sf"|"sbk") { int i = 0; while (isspace(yytext[i])) i++; i += 4; current_toneset = atoi(yytext+i); doing_drums = 0; doing_sf = 1; new_toneset(current_toneset); font_type=FONT_SBK; } ^{owh}"bank"{wh}[0-9]+ { int i = 0; while (isspace(yytext[i])) i++; i += 4; current_toneset = atoi(yytext+i); doing_drums = 0; doing_sf = 0; new_toneset(current_toneset); font_type=FONT_NORMAL; } ^{owh}"sfx" { current_toneset = SFXBANK; doing_drums = 0; doing_sf = 0; new_toneset(current_toneset); font_type=FONT_NORMAL; } ^{owh}"drumsfx1" { current_drumset = SFXDRUM1; doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; bank->name = "drumsfx1"; } ^{owh}"drumsfx2" { current_drumset = SFXDRUM2; doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; bank->name = "drumsfx2"; } ^"map"{wh} { BEGIN(M); if (xmap[map_row][0]) { if (xmap[map_row][1] == xmap[map_row][3] && xmap[map_row][2] == xmap[map_row][4] ) xmap[map_row][0] = 0; else if (map_row < XMAPMAX) map_row++; } map_col = -1; } "xgsfx64" { xmap[map_row][0] = SFXBANK; map_col = 1; current_toneset = SFXBANK; doing_drums = 0; doing_sf = 0; new_toneset(current_toneset); font_type=FONT_NORMAL; } "xgsfx126" { xmap[map_row][0] = SFXDRUM1; map_col = 1; current_drumset = SFXDRUM1; doing_drums = 1; doing_sf = 0; new_toneset(current_drumset); font_type=FONT_NORMAL; bank->name = "drumsfx1"; } "xgdrum" { xmap[map_row][0] = XGDRUM; map_col = 1; } {wh}[0-9]+ { if (map_col >= 1 && map_col <= 4) xmap[map_row][map_col++] = atoi(yytext); } ^{owh}"[Melodic Patches]" { doing_drums = 0; } ^{owh}"[Drum Patches]" { doing_drums = 1; current_drumset = current_toneset; } ^{owh}[0-9,]+("="|{wh}){nm} { const char *gm_name = NULL; char *vc_name = NULL; patchno = atoi(yytext); tone_bank = 0; if (patchno >= 0) { i = 0; while (isspace(yytext[i])) i++; while (isdigit(yytext[i])) i++; if (yytext[i] == ',') { i++; tone_bank = atoi(yytext + i); while (isdigit(yytext[i])) i++; } else { if (doing_drums) tone_bank = current_drumset; else tone_bank = current_toneset; } new_toneset(tone_bank); while (isspace(yytext[i])) i++; if (!cfg_flag && yytext[i] == '=') i++; if ( (patchname = strrchr(yytext + i, '\\')) == NULL) patchname = yytext + i; else patchname++; if (patchname[0] == '"') { vc_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); vc_name[strlen(patchname)-2] = '\0'; } else vc_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); if (patchno < 128) gm_name = gm_voice[doing_drums? patchno+128 : patchno].vname; else { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Bad patch number %d in cfg file.", patchno); } if (gm_name == NULL) gm_name = (doing_drums)? "drum":"instr"; ctl->cmsg(CMSG_INFO, VERB_DEBUG, "config: voice %s[%d,%d] = patch %s", gm_name, patchno, tone_bank, vc_name); new_patch(vc_name, patchno); } BEGIN(P); } ^{owh}[A-Z][^\n\r\t\=,#]+(","{owh}[0-9]+)?{owh}"="{owh}{nm} { const char *gm_name = NULL; char *vc_name = NULL; int i; set_patchno(yytext); tone_bank = 0; if (patchno < 256) { i = 0; while (yytext[i] != '=' && yytext[i] != ',') i++; if (yytext[i] == ',') { i++; tone_bank = atoi(yytext + i); } else { if (doing_drums) tone_bank = current_drumset; else tone_bank = current_toneset; } while (yytext[i] != '=') i++; i++; while (isspace(yytext[i])) i++; if ( (patchname = strrchr(yytext + i, '\\')) == NULL) patchname = yytext + i; else patchname++; if (patchname[0] == '"') { vc_name = strncpy( (char *)malloc(strlen(patchname)-1), patchname + 1, strlen(patchname)-1 ); vc_name[strlen(patchname)-2] = '\0'; } else vc_name = strcpy( (char *)malloc(strlen(patchname)+1), patchname ); gm_name = gm_voice[patchno].vname; if (gm_name == NULL) gm_name = (doing_drums)? "drum":"instr"; ctl->cmsg(CMSG_INFO, VERB_DEBUG, "config: voice %s[%d,%d] = patch %s", gm_name, patchno, tone_bank, vc_name); } else { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Bad line \"%s ...\" in cfg file.", yytext); } new_patch(vc_name, patchno); BEGIN(P); } ^{owh}"-p"{owh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j > 1 && j <= MAX_VOICES) config_voices = j; } } ^{owh}"-A"{wh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j > 1 && j <= MAX_AMPLIFICATION) config_amplification = j; } } ^{owh}"-C"{owh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j > 1 && j <= MAX_CONTROL_RATIO) control_ratio = j; } } ^{owh}"-s"{owh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j < 100) j *= 1000; if (j > MIN_OUTPUT_RATE && j <= MAX_OUTPUT_RATE) play_mode->rate = j; } } ^{owh}"-r"{owh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); max_patch_memory = j * 1000000; } } ^{owh}"-k"{owh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j >= 0 && j <= 3) config_interpolation = j; } } ^{owh}"-X"{owh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j >= 0 && j <= 2) opt_expression_curve = j; } } ^{owh}"-V"{owh}[0-9]+ { if (prescanning) { i=0; while(isspace(yytext[i])) i++; j = atoi(yytext+i+2); if (j >= 0 && j <= 2) opt_volume_curve = j; } } ^{owh}"-O"{owh}[a-zA-Z] { if (prescanning) { i=0; while(isspace(yytext[i])) i++; i+=2; while(isspace(yytext[i])) i++; #ifdef STANDALONE if (set_play_mode(yytext+i)) /* error */; #endif } }

{owh}"amp"{owh}"="{owh}[0-9]+ { int i = 0; while (yytext[i] != '=') i++; bank->tone[patchno].amp = atoi(yytext+i+1); BEGIN(P); }

{owh}"note"{owh}"="{owh}[0-9]+ { int i = 0; while (yytext[i] != '=') i++; bank->tone[patchno].note = atoi(yytext+i+1); BEGIN(P); }

{owh}"tuning"{owh}"="{owh}("+"|"-")[0-9]+ { int i = 0; while (yytext[i] != '=') i++; bank->tone[patchno].tuning = atoi(yytext+i+1); BEGIN(P); }

{owh}"keep"{owh}"=" BEGIN(K);

{owh}"strip"{owh}"=" BEGIN(S); {owh}"loop" { bank->tone[patchno].strip_loop=0; BEGIN(P); } {owh}"tail" { bank->tone[patchno].strip_tail=0; BEGIN(P); } {owh}"env" { bank->tone[patchno].strip_envelope=0; BEGIN(P); } {owh}"loop" { bank->tone[patchno].strip_loop=1; BEGIN(P); } {owh}"tail" { bank->tone[patchno].strip_tail=1; BEGIN(P); } {owh}"env" { bank->tone[patchno].strip_envelope=1; BEGIN(P); } ^{owh}[A-Z][^\n\r\t\:#]+{owh}":"{owh}"poly" { set_patchno(yytext); if (patchno < 256) gm_voice[patchno].flags &= ~SOLO_MASK; } ^{owh}[A-Z][^\n\r\t\:#]+{owh}":"{owh}"solo" { set_patchno(yytext); if (patchno < 256) gm_voice[patchno].flags |= SOLO_MASK; } . | \n { patchno = -1; BEGIN(0); } %% static void new_toneset(int n) { banknum=n; if (!doing_drums) { if (!tonebank[n]) { tonebank[n]=(ToneBank *)safe_malloc(sizeof(ToneBank)); memset(tonebank[n], 0, sizeof(ToneBank)); } bank=tonebank[n]; } else { if (!drumset[n]) { drumset[n]=(ToneBank *)safe_malloc(sizeof(ToneBank)); memset(drumset[n], 0, sizeof(ToneBank)); } bank=drumset[n]; } } static void new_patch(const char *vname, int num) { if (bank->tone[num].name) return; bank->tone[num].name=vname; bank->tone[num].note=bank->tone[num].amp=bank->tone[num].pan= bank->tone[num].strip_loop=bank->tone[num].strip_envelope= bank->tone[num].sf_ix= bank->tone[num].strip_tail=bank->tone[num].last_used=-1; bank->tone[num].font_type=font_type; bank->tone[num].tuning=0; bank->tone[num].layer=0; } static void set_patchno(char *m) { int i,j,w,y; const char *vn; y = w = 0; while (isspace(m[w])) w++; for (i = 0; i < 256; i++) { vn = gm_voice[i].vname; if (vn == NULL) continue; for (j = 0; m[j+w] && vn[j+y] && m[j+w] == vn[j+y]; j++) if (vn[j+y+1] && isspace(vn[j+y+1]) && m[j+w+1] && !isspace(m[j+w+1]) ) y++ ; if (!m[j+w] || m[j+w] == '=' || m[j+w] == ',' || m[j+w] == ':') break; if (!vn[j+y] && isspace(m[j+w])) break; } if (i < 256 && vn != NULL) patchno = i; else patchno = 256; } char *current_config_file = 0; int current_config_pc42b = 0; static int pc42b_config_file(const char *name, int prescan); int read_config_file(const char *name, int prescan) { int retvalue = 0, i; prescanning = prescan; include_stack_ptr = 0; rcf_count = 1; if (current_config_pc42b) { return pc42b_config_file(name, prescan); } if (current_config_file) { yyin = fopen(current_config_file, "r"); } else yyin = open_file(name, 1, OF_VERBOSE, rcf_count); if (!yyin) return -1; if (!current_config_file) { current_config_file = (char *)safe_malloc(strlen(current_filename)+1); strcpy(current_config_file, current_filename); } for (i = 0; i < XMAPMAX; i++) xmap[i][0] = 0; map_row = map_col = 0; current_toneset = current_drumset = 0; doing_drums = doing_sf = 0; if (!(retvalue = yylex())) { if (prescan) got_a_configuration = 1; else got_a_configuration = 2; } #if 0 if (!prescan) { fprintf(stderr,"int xmap[][] = {\n"); for (i = 0; i < XMAPMAX; i++) { if (!xmap[i][0]) break; fprintf(stderr,"{ %d, %d, %d, %d, %d }\n", xmap[i][0], xmap[i][1], xmap[i][2], xmap[i][3], xmap[i][4] ); } fprintf(stderr,"};\n"); } #endif close_file(yyin); return retvalue; } #include "PC42b.h" static int pc42b_config_file(const char *name, int prescan) { int retvalue = 0; int i = 0; prescanning = prescan; rcf_count = 1; doing_drums = 0; new_toneset(3); new_toneset(4); new_toneset(5); new_toneset(6); new_toneset(7); new_toneset(8); new_toneset(9); new_toneset(120); doing_drums = 1; new_toneset(26); new_toneset(49); new_toneset(50); new_toneset(121); new_toneset(122); new_toneset(127); current_toneset = current_drumset = 0; doing_drums = doing_sf = 0; while (1) { int action, which; const char *sfname; action = PC42b[i].font_code; which = PC42b[i].num; sfname = PC42b[i].name; switch (action) { case FONT_TONESET: current_toneset = which; doing_drums = 0; doing_sf = 1; new_toneset(current_toneset); font_type=FONT_SBK; break; case FONT_DRUMSET: current_drumset = which; doing_drums = 1; doing_sf = 1; new_toneset(current_drumset); font_type=FONT_SBK; if (!bank->name) bank->name = sfname; break; case FONT_PRESET: patchno = which; if (doing_drums) tone_bank = current_drumset; else tone_bank = current_toneset; new_toneset(tone_bank); new_patch(sfname, patchno); break; case FONT_SBK: if (!init_soundfont((char *)sfname, which, which, 1)) retvalue = -1; break; } if (action == FONT_SBK) break; i++; } /*if (prescan) got_a_configuration = 1; else*/ got_a_configuration = 2; return retvalue; } alsaplayer-0.99.82/attic/midi/chorus_e.c000066400000000000000000000213461466261456500200660ustar00rootroot00000000000000/* * chorus_e.c * experimental channel effects processing * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * contents : chorus ( controller 93 ) effect processing * Nicolas Witczak juillet 1998 * witczak@geocities.com */ #include "gtim.h" #ifdef CHANNEL_EFFECT #ifndef NO_STRING_H #include #else #include #endif #include #ifndef __WIN32__ #include #endif #include #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "tables.h" /**************************************************************************/ /** chorus_effect structure definition * formula : * * output signal * * phi = d + sw * triangle( 2Pi/T * t ) * * sl(n) = xl(n) + A * x( n - phi(t) ) * * sr(n) = xr(n) + A * x( n - phi(t - T / 4 ) ) * */ /* >> choice of the day >> */ /** G_BIT and G : denominator size */ #define G_BITS 9 #define G ((int32)( 1 << G_BITS )) /** average delays in ms */ #define D 25 /** max die time in ms */ #define DIE_TIME ( D * 2 ) /** sweep ratio in percent of D */ #define SWEEP 0.08 /** max chorus amplitude */ #define A_MAX 1.0 #define A_MIN 0.3 /** time param normalized to sampling rate*/ static uint32 dieTime = 0 ; /** approximate chorus frequency Hz */ #define FREQU 1.5 /** d_min , d_max : chorus depth and average delay relative to sampling rate and G_BITS fractionnal part for * linear interpolation */ static uint32 d_min = 0 ; static uint32 d_max = 0 ; typedef struct { /*---------------------------------------------------*/ /* Effect base implementation */ void *m_pfnActionMono; void *m_pfnActionStereo ; void *m_pfnCtrlChange ; void *m_pfnCtrlReset ; void *m_pfnName ; void *m_pfnDestruct ; /*---------------------------------------------------*/ /* additionnal parameters */ /** m_uiNullCount : number of last null samples or 0 */ uint32 m_uiNullCount ; /** l/rX/Y past samples circular buffer for x and ya left(or mono) and right */ cirbuff leftX , rightX ; /** gain param , if != 0 this effect is active*/ int32 a ; /** current state for triangle phase ramp relative to fractionnal part G_BITS */ uint32 d_left , d_right ; /** incremental step for chorus phase eval , calculated according to FREQU and depth */ int32 incr_left , incr_right ; } chorus_effect ; /**************************************************************************/ /** reverb_effect function overriding */ static void ActionMono( chorus_effect* pThis , int32* pMonoBuffer, int32 count , int* pbSignal ) { if( pThis->a == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pMonoBuffer; int32* pEnd = pMonoBuffer + count ; int32 x , v1 , v2 , delta , tmp ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G; v1 = (pThis->leftX.m_pCur)[ - ( pThis->d_left >> FRACTION_BITS ) ] ; v2 = (pThis->leftX.m_pCur)[ 1 - ( pThis->d_left >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d_left & FRACTION_MASK ) ) ; delta = ( (v2-v1) * tmp ) / FRACTION ; *pCur += pThis->a * ( v1 + delta ) ; pushval_cirbuff( &(pThis->leftX) , x ) ; if( pThis->d_left > d_max ) { pThis->incr_left = -abs( pThis->incr_left ) ; pThis->d_left = d_max ; } else if( pThis->d_left < d_min ) { pThis->incr_left = +abs( pThis->incr_left ) ; pThis->d_left = d_min ; } else pThis->d_left += pThis->incr_left ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; pThis->d_left = ( d_max + d_min ) / 2 ; } } static void ActionStereo( chorus_effect* pThis , int32* pStereoBuffer , int32 count , int* pbSignal ) { if( pThis->a == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pStereoBuffer; int32* pEnd = pStereoBuffer + 2 * count ; int32 x , v1 , v2 , delta , tmp ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G ; v1 = (pThis->leftX.m_pCur)[ - ( pThis->d_left >> FRACTION_BITS ) ] ; v2 = (pThis->leftX.m_pCur)[ 1 - ( pThis->d_left >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d_left & FRACTION_MASK ) ) ; delta = ( (v2-v1) * tmp ) / FRACTION ; *pCur += pThis->a * ( v1 + delta ) ; pushval_cirbuff( &(pThis->leftX) , x ) ; if( pThis->d_left > d_max ) { pThis->incr_left = -abs( pThis->incr_left ) ; pThis->d_left = d_max ; } else if( pThis->d_left < d_min ) { pThis->incr_left = +abs( pThis->incr_left ) ; pThis->d_left = d_min ; } else pThis->d_left += pThis->incr_left ; ++pCur ; x = *pCur ; v1 = (pThis->rightX.m_pCur)[ - ( pThis->d_right >> FRACTION_BITS ) ] / G ; v2 = (pThis->rightX.m_pCur)[ 1 - ( pThis->d_right >> FRACTION_BITS ) ] / G ; tmp = ( FRACTION_MASK - ( pThis->d_right & FRACTION_MASK ) ) ; delta = ( (v2-v1) * tmp ) / FRACTION ; *pCur += pThis->a * ( v1 + delta ) ; pushval_cirbuff( &(pThis->rightX) , x ) ; if( pThis->d_right > d_max ) { pThis->incr_right = -abs( pThis->incr_right ) ; pThis->d_right = d_max ; } else if( pThis->d_right < d_min ) { pThis->incr_right = +abs( pThis->incr_right ) ; pThis->d_right = d_min ; } else pThis->d_right += pThis->incr_right ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->rightX ) , pThis->m_uiNullCount ) ; pThis->d_left = ( d_max + d_min ) / 2 ; pThis->d_right = d_min ; } } static void CtrlReset( chorus_effect* pThis ) { pThis->m_uiNullCount = 0 ; redim_cirbuff( &( pThis->leftX ) , 0 ) ; redim_cirbuff( &( pThis->rightX ) , 0 ) ; d_max = (uint32)( ( ( ( D * ( 1.0 + ( SWEEP / 2 ) ) * play_mode->rate ) / 1000 ) - 1 ) * FRACTION ); d_min = (uint32)( ( ( ( D * ( 1.0 - ( SWEEP / 2 ) ) * play_mode->rate ) / 1000 ) - 1 ) * FRACTION ); pThis->incr_left = (int32)( ( 2 * ( d_max - d_min ) * FREQU ) / play_mode->rate ); pThis->incr_right = pThis->incr_left ; pThis->d_left = ( d_max + d_min ) / 2 ; pThis->d_right = d_min ; dieTime = ( DIE_TIME * play_mode->rate ) / 1000 ; pThis->a = 0 ; } static void CtrlChange( chorus_effect* pThis , MidiEvent* pCurrentEvent ) { int amount = pCurrentEvent->a; if (amount < global_chorus) amount = global_chorus; #if 0 if( pCurrentEvent->b == ME_CELESTE || (pCurrentEvent->b == ME_CHORUSDEPTH && XG_effect_chorus_is_celeste_flag) ) if( pCurrentEvent->b == ME_CHORUSDEPTH && !XG_effect_chorus_is_celeste_flag && !XG_effect_chorus_is_phaser_flag) #endif if( pCurrentEvent->type == ME_CHORUSDEPTH ) { if( amount != 0 ) { redim_cirbuff( &( pThis->leftX ) , ( d_max >> FRACTION_BITS ) + 1 ) ; if( ! ( play_mode->encoding & PE_MONO ) ) { redim_cirbuff( &( pThis->rightX ) , ( d_max >> FRACTION_BITS ) + 1 ) ; } pThis->a = (int32)( G * ( A_MIN + ( A_MAX - A_MIN ) * ( amount - 1 ) / 126.0 ) ); } else CtrlReset( pThis ) ; } } static void Name( char* pszBuff ) { strcpy( pszBuff , "chorus" ); } static void Destruct( chorus_effect* pThis ) { delete_cirbuff( &( pThis->leftX ) ) ; delete_cirbuff( &( pThis->rightX ) ) ; memset( pThis , 0 , sizeof( chorus_effect ) ) ; free( pThis ) ; } /**************************************************************************/ /** chorus_effect construction function prototype */ Effect* ChorusCtor() { chorus_effect* pReturn = 0 ; pReturn = (chorus_effect *) malloc( sizeof( chorus_effect ) ) ; memset( pReturn , 0 , sizeof( chorus_effect ) ) ; pReturn->m_pfnActionMono = (void*)&ActionMono ; pReturn->m_pfnActionStereo = (void*)&ActionStereo ; pReturn->m_pfnCtrlChange = (void*)&CtrlChange ; pReturn->m_pfnCtrlReset = (void*)&CtrlReset ; pReturn->m_pfnName = (void*)&Name ; pReturn->m_pfnDestruct = (void*)&Destruct ; create_cirbuff( &( pReturn->leftX ) , 0 ) ; create_cirbuff( &( pReturn->rightX ) , 0 ) ; CtrlReset( pReturn ) ; return ( Effect* )pReturn ; } #endif /* CHANNEL_EFFECT */ alsaplayer-0.99.82/attic/midi/common.c000066400000000000000000000152371466261456500175510ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * common.c */ #include #include #ifndef NO_STRING_H #include #else #include #endif #ifndef OLD_FOPEN_METHOD #include #include #include #endif #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include "output.h" #include "controls.h" /* I guess "rb" should be right for any libc */ #define OPEN_MODE "rb" char *program_name, current_filename[1024]; int current_filedescriptor; static PathList *pathlist=0; #ifdef __WIN32__ #define R_OPEN_MODE O_RDONLY | O_BINARY #else #define R_OPEN_MODE O_RDONLY #endif /* Try to open a file for reading. If the filename ends in one of the defined compressor extensions, pipe the file through the decompressor */ static FILE *try_to_open(char *name, int decompress) { FILE *fp; #ifdef OLD_FOPEN_METHOD fp=fopen(name, OPEN_MODE); /* First just check that the file exists */ #else if ( (current_filedescriptor = open(name, R_OPEN_MODE)) == -1) return 0; fp = fdopen(current_filedescriptor, OPEN_MODE); #endif if (!fp) return 0; #ifdef DECOMPRESSOR_LIST if (decompress) { int l,el; static const char *decompressor_list[] = DECOMPRESSOR_LIST, **dec; char tmp[1024], tmp2[1024], *cp, *cp2; /* Check if it's a compressed file */ l=strlen(name); for (dec=decompressor_list; *dec; dec+=2) { el=strlen(*dec); if ((el>=l) || (strcmp(name+l-el, *dec))) continue; /* Yes. Close the file, open a pipe instead. */ fclose(fp); /* Quote some special characters in the file name */ cp=name; cp2=tmp2; while (*cp) { switch(*cp) { case '\'': case '\\': case ' ': case '`': case '!': case '"': case '&': case ';': *cp2++='\\'; } *cp2++=*cp++; } *cp2=0; sprintf(tmp, *(dec+1), tmp2); fp=popen(tmp, "r"); break; } } #endif return fp; } /* This is meant to find and open files for reading, possibly piping them through a decompressor. */ FILE *open_file(const char *name, int decompress, int noise_mode, int level) { FILE *fp; PathList *plp=pathlist; int l; if (!name || !(*name)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Attempted to open nameless file."); return 0; } /* First try the given name */ strncpy(current_filename, name, 1023); current_filename[1023]='\0'; /* when called from read_config_file, do not look in current dir */ if (level==0 || name[0]==PATH_SEP) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, "Trying to open %s", current_filename); if ( (fp=try_to_open(current_filename, decompress)) ) return fp; if (noise_mode && (errno != ENOENT)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", current_filename, sys_errlist[errno]); return 0; } } if (name[0] != PATH_SEP) while (plp) /* Try along the path then */ { *current_filename=0; l=strlen(plp->path); if(l) { strcpy(current_filename, plp->path); if(current_filename[l-1]!=PATH_SEP) strcat(current_filename, PATH_STRING); } strcat(current_filename, name); ctl->cmsg(CMSG_INFO, VERB_DEBUG, "Trying to open %s", current_filename); if ((fp=try_to_open(current_filename, decompress))) return fp; if (noise_mode && (errno != ENOENT)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", current_filename, sys_errlist[errno]); return 0; } plp=(PathList *)plp->next; } /* Nothing could be opened. */ *current_filename=0; if (noise_mode>=2) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", name, sys_errlist[errno]); return 0; } /* This closes files opened with open_file */ void close_file(FILE *fp) { #ifdef DECOMPRESSOR_LIST if (pclose(fp)) /* Any better ideas? */ #endif fclose(fp); } /* This is meant for skipping a few bytes in a file or fifo. */ void skip(FILE *fp, size_t len) { size_t c; char tmp[1024]; while (len>0) { c=len; if (c>1024) c=1024; len-=c; if (c!=fread(tmp, 1, c, fp)) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: skip: %s", current_filename, sys_errlist[errno]); } } /* This'll allocate memory or die. */ void *safe_malloc(size_t count) { void *p; if (count > (1<<21)) { ctl->cmsg(CMSG_FATAL, VERB_NORMAL, "Strange, I feel like allocating %d bytes. This must be a bug.", count); } else if ((p=malloc(count))) return p; else ctl->cmsg(CMSG_FATAL, VERB_NORMAL, "Sorry. Couldn't malloc %d bytes.", count); ctl->close(); /*play_mode->purge_output();*/ /*play_mode->close_output();*/ #ifdef ADAGIO X_EXIT #else exit(10); #endif return 0; } /* This adds a directory to the path list */ void add_to_pathlist(char *s, int level) { int l; PathList *plp=(PathList *)safe_malloc(sizeof(PathList)); if (s[0] == PATH_SEP) strcpy((plp->path=(char *)safe_malloc(strlen(s)+1)),s); else { PathList *pnp = pathlist; while (pnp && pnp->next && ((PathList *)(pnp->next))->level == level) pnp = (PathList *)pnp->next; if (!pnp || !pnp->path) return; l=strlen(pnp->path); plp->path = (char *)safe_malloc(l + strlen(s) + 2); if(l) { strcpy(plp->path, pnp->path); if(plp->path[l-1]!=PATH_SEP) strcat(plp->path, PATH_STRING); } else plp->path[0] = '\0'; strcat( plp->path, s); } plp->next=pathlist; plp->level=level; pathlist=plp; } /* This clears the path list of paths added from read_config_file. */ void clear_pathlist(int level) { PathList *nlp, *plp=pathlist, *prev=0; while (plp) { nlp = (PathList *)plp->next; if (plp->level > level) { if (plp == pathlist) pathlist = nlp; free(plp->path); free(plp); if (prev) prev->next = nlp; } else prev = plp; plp = nlp; } } alsaplayer-0.99.82/attic/midi/common.h000066400000000000000000000027151466261456500175530ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * common.h */ extern char *program_name, current_filename[]; extern int current_filedescriptor; #include extern FILE *msgfp; typedef struct { char *path; void *next; int level; } PathList; /* Noise modes for open_file */ #define OF_SILENT 0 #define OF_NORMAL 1 #define OF_VERBOSE 2 extern FILE *open_file(const char *name, int decompress, int noise_mode, int level); extern void add_to_pathlist(char *s, int level); extern void clear_pathlist(int level); extern void close_file(FILE *fp); extern void skip(FILE *fp, size_t len); extern void *safe_malloc(size_t count); alsaplayer-0.99.82/attic/midi/configure.ac000066400000000000000000000117251466261456500204010ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(midi_engine.c) MIDI_MAJOR_VERSION=0 MIDI_MINOR_VERSION=1 MIDI_MICRO_VERSION=1 BETA= MIDI_VERSION=$MIDI_MAJOR_VERSION.$MIDI_MINOR_VERSION.${MIDI_MICRO_VERSION}${BETA} AM_INIT_AUTOMAKE(midi_in, ${MIDI_VERSION}) AM_MAINTAINER_MODE if test "x$x_includes" = "xNONE" then x_includes=/usr/X11R6/include fi if test "x$x_libraries" = "xNONE" then x_libraries=/usr/X11R6/lib fi dnl Check for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AM_DISABLE_STATIC AM_PROG_LIBTOOL AC_PROG_MAKE_SET dnl ====================== dnl Check for header files dnl ====================== AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(unistd.h) dnl =========================== dnl Check for library functions dnl =========================== AC_PROG_GCC_TRADITIONAL AC_FUNC_MMAP AC_FUNC_MALLOC AC_CHECK_FUNCS(strdup) dnl =============== dnl Debugging stuff dnl =============== AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging (default=no)],, enable_debug=no) if test "$enable_debug" = yes; then DFLAGS="$DFLAGS -g" fi AC_ARG_ENABLE(profiling, [ --enable-profiling Enable profiling (-pg)],, enable_profiling=no) if test "$enable_profiling" = yes; then DFLAGS="$DFLAGS -pg" fi AC_SUBST(DFLAGS) AM_CONDITIONAL(OPTIMIZE,test "$enable_debug" = "no") dnl ============ dnl Machine type dnl ============ AC_MSG_CHECKING(machine architecture) AC_SUBST(ARCH_TYPE) ARCH_TYPE=`uname -m` AC_MSG_RESULT($ARCH_TYPE) AM_CONDITIONAL(ARCH_X86,test "$ARCH_TYPE" = "i486" || test "$ARCH_TYPE" = "i586" || test "$ARCH_TYPE" = "i686" ) AM_CONDITIONAL(ARCH_486,test "$ARCH_TYPE" = "i486") AM_CONDITIONAL(ARCH_586,test "$ARCH_TYPE" = "i586") AM_CONDITIONAL(ARCH_686,test "$ARCH_TYPE" = "i686") AM_CONDITIONAL(ARCH_PPC,test "$ARCH_TYPE" = "ppc") AM_CONDITIONAL(ARCH_ULTRA,test "$ARCH_TYPE" = "sun4u") AC_MSG_CHECKING(for gcc optimization flags) old_cflags=$CFLAGS CFLAGS="-O2 -fexpensive-optimizations -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math" AC_TRY_COMPILE([#include ], [ printf ("hello, world"); ], [ EXTRA_OPT_CFLAGS="-O2 -fexpensive-optimizations -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math"],[ EXTRA_OPT_CFLAGS=""]) CFLAGS=$old_cflags AC_MSG_RESULT([$EXTRA_OPT_CFLAGS]) ARCH_CFLAGS="$EXTRA_OPT_CFLAGS" if test "$ARCH_TYPE" = "i486" || test "$ARCH_TYPE" = "i586" || test "$ARCH_TYPE" = "i686" then AC_DEFINE(ARCH_X86, 1, [Define if on x86 platform]) fi if test "$ARCH_TYPE" = "i486" then AC_DEFINE(ARCH_486, 1, [Define if on a 486 platform]) fi if test "$ARCH_TYPE" = "i586" then AC_DEFINE(ARCH_586, 1, [Define if on a 586 platform]) fi if test "$ARCH_TYPE" = "i686" then AC_DEFINE(ARCH_686, 1, [Define if on a 686 platform]) # EXTRA_CPU_CFLAGS=$(if $CC -march=i686 -S -o /dev/null -xc /dev/null > /dev/null; then echo "-march=i686"; fi) fi if test "$ARCH_TYPE" = "ppc" then AC_DEFINE(ARCH_PPC, 1, [Define if on a PPC platform]) fi if test "$ARCH_TYPE" = "sun4u" then AC_DEFINE(ARCH_ULTRA, 1, [Define if on a SUN ULTRA platform]) fi dnl ================================================================ dnl Special assembly options. Note: Need to fix the above arch code! dnl ================================================================ case "$host" in i?86-* | k?-* | athlon-*) dnl catch i386,i486,i586,i686,k6,k7 AC_DEFINE(FPM_INTEL, 1, [Define if we are on Intel]) ;; *-*) echo "host_alias = $host_alias" AC_DEFINE(FPM_64BIT, 1, [Use this otherwise]) ;; esac ARCH_CFLAGS="$ARCH_CFLAGS $EXTRA_CPU_CFLAGS" AC_SUBST(ARCH_CFLAGS) dnl pkg-config stuff if test -z $PKG_CONFIG_PATH; then PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig fi AC_ARG_WITH(alsaplayer, [ --with-alsaplayer Location of alsaplayer build dir (will prepend to PKG_CONFIG_PATH)], [PKG_CONFIG_PATH="${withval}:${PKG_CONFIG_PATH}"],) export PKG_CONFIG_PATH TIMIDITY_DIR=${datadir}/timidity AC_ARG_WITH(timidity, [ --with-timidity Location of timidity patch dir (DATADIR/timidity)], [TIMIDITY_DIR="$withval"],) export TIMIDITY_DIR PKG_CHECK_MODULES(ALSAPLAYER, alsaplayer) PLUGIN_DIR=`pkg-config alsaplayer --variable=plugindir` INTERFACEPLUGIN_DIR=`pkg-config alsaplayer --variable=interfaceplugindir` INPUTPLUGIN_DIR=`pkg-config alsaplayer --variable=inputplugindir` OUTPUTPLUGIN_DIR=`pkg-config alsaplayer --variable=outputplugindir` SCOPEPLUGIN_DIR=`pkg-config alsaplayer --variable=scopeplugindir` AC_SUBST(TIMIDITY_DIR) AC_SUBST(ALSAPLAYER_LIBS) AC_SUBST(ALSAPLAYER_CFLAGS) AC_SUBST(PLUGIN_DIR) AC_SUBST(INTERFACEPLUGIN_DIR) AC_SUBST(INPUTPLUGIN_DIR) AC_SUBST(OUTPUTPLUGIN_DIR) AC_SUBST(SCOPEPLUGIN_DIR) AM_CONFIG_HEADER(config.h) AC_SUBST(MIDI_MAJOR_VERSION) AC_SUBST(MIDI_MINOR_VERSION) AC_SUBST(MIDI_MICRO_VERSION) AC_SUBST(MIDI_VERSION) AC_OUTPUT([ Makefile ]) echo echo Now type \'make\' to build the MIDI input plugin. echo alsaplayer-0.99.82/attic/midi/controls.c000066400000000000000000000032331466261456500201150ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * controls.c */ #include "gtim.h" #include "controls.h" int last_rc_command = 0; int last_rc_arg = 0; int check_for_rc(void) { int rc = last_rc_command; int32 val; return 0; if (!rc) { rc = ctl->read(&val); last_rc_command = rc; last_rc_arg = val; } switch (rc) { case RC_QUIT: /* [] */ case RC_LOAD_FILE: case RC_NEXT: /* >>| */ case RC_REALLY_PREVIOUS: /* |<< */ case RC_PATCHCHANGE: case RC_CHANGE_VOICES: case RC_STOP: return rc; default: return 0; } } /* Minimal control mode */ extern ControlMode dumb_control_mode; #ifndef DEFAULT_CONTROL_MODE # define DEFAULT_CONTROL_MODE &dumb_control_mode #endif ControlMode *ctl_list[]={ &dumb_control_mode, 0 }; ControlMode *ctl=DEFAULT_CONTROL_MODE; alsaplayer-0.99.82/attic/midi/controls.h000066400000000000000000000106101466261456500201170ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * controls.h */ /* Return values for ControlMode.read */ #define RC_ERROR -1 #define RC_NONE 0 #define RC_QUIT 1 #define RC_NEXT 2 #define RC_PREVIOUS 3 /* Restart this song at beginning, or the previous song if we're less than a second into this one. */ #define RC_FORWARD 4 #define RC_BACK 5 #define RC_JUMP 6 #define RC_TOGGLE_PAUSE 7 /* Pause/continue */ #define RC_RESTART 8 /* Restart song at beginning */ #define RC_PAUSE 9 /* Really pause playing */ #define RC_CONTINUE 10 /* Continue if paused */ #define RC_REALLY_PREVIOUS 11 /* Really go to the previous song */ #define RC_CHANGE_VOLUME 12 #define RC_LOAD_FILE 13 /* Load a new midifile */ #define RC_TUNE_END 14 /* The tune is over, play it again sam? */ #define RC_TRY_OPEN_DEVICE 15 #define RC_PATCHCHANGE 16 #define RC_CHANGE_VOICES 17 #define RC_STOP 18 #define CMSG_INFO 0 #define CMSG_WARNING 1 #define CMSG_ERROR 2 #define CMSG_FATAL 3 #define CMSG_TRACE 4 #define CMSG_TIME 5 #define CMSG_TOTAL 6 #define CMSG_FILE 7 #define CMSG_TEXT 8 #define CMSG_LYRIC 9 #define VERB_ALWAYS -1 #define VERB_NORMAL 0 #define VERB_VERBOSE 1 #define VERB_NOISY 2 #define VERB_DEBUG 3 #define VERB_DEBUG_SILLY 4 /* * MESSAGE FROM KERNEL TO MOTIF */ #define REFRESH_MESSAGE 1 #define HELPMODE_MESSAGE 2 #define TOTALTIME_MESSAGE 3 #define MASTERVOL_MESSAGE 4 #define FILENAME_MESSAGE 5 #define CURTIME_MESSAGE 6 #define NOTE_MESSAGE 7 #define PROGRAM_MESSAGE 8 #define VOLUME_MESSAGE 9 #define EXPRESSION_MESSAGE 10 #define PANNING_MESSAGE 11 #define SUSTAIN_MESSAGE 12 #define PITCH_MESSAGE 13 #define RESET_MESSAGE 14 #define CLOSE_MESSAGE 15 #define CMSG_MESSAGE 16 #define FILE_LIST_MESSAGE 17 #define NEXT_FILE_MESSAGE 18 #define PREV_FILE_MESSAGE 19 #define TUNE_END_MESSAGE 20 #define DEVICE_OPEN 21 #define DEVICE_NOT_OPEN 22 #define PATCH_CHANGED_MESSAGE 23 #define JUMP_MESSAGE 24 /* * MESSAGE ON THE PIPE FROM MOTIF TOWARD KERNEL */ #define MOTIF_CHANGE_VOLUME 1 #define MOTIF_CHANGE_LOCATOR 2 #define MOTIF_QUIT 3 #define MOTIF_PLAY_FILE 4 #define MOTIF_NEXT 5 #define MOTIF_PREV 6 #define MOTIF_RESTART 7 #define MOTIF_FWD 8 #define MOTIF_RWD 9 #define MOTIF_PAUSE 10 #define TRY_OPEN_DEVICE 11 #define MOTIF_PATCHSET 12 #define MOTIF_EFFECTS 13 #define MOTIF_CHANGE_VOICES 14 #define MOTIF_CHECK_STATE 15 #define MOTIF_FILTER 16 #define MOTIF_INTERPOLATION 17 #define MOTIF_REVERB 18 #define MOTIF_CHORUS 19 #define MOTIF_DRY 20 #define MOTIF_STOP 21 #define MOTIF_EVS 22 /* from TiMidity++, but not implemented */ #define MOTIF_KEYUP 23 #define MOTIF_KEYDOWN 24 #define MOTIF_SLOWER 25 #define MOTIF_FASTER 26 #define MOTIF_TOGGLE_DRUMS 27 typedef struct { const char *id_name; char id_character; int verbosity, trace_playing, opened; int (*open)(int using_stdin, int using_stdout); void (*pass_playing_list)(int number_of_files, const char *list_of_files[]); void (*close)(void); int (*read)(int32 *valp); int (*cmsg)(int type, int verbosity_level, const char *fmt, ...); void (*refresh)(void); void (*reset)(void); void (*file_name)(char *name); void (*total_time)(uint32 tt); void (*current_time)(uint32 ct); void (*note)(int v); void (*master_volume)(int mv); void (*program)(int channel, int val, const char *name); void (*volume)(int channel, int val); void (*expression)(int channel, int val); void (*panning)(int channel, int val); void (*sustain)(int channel, int val); void (*pitch_bend)(int channel, int val); } ControlMode; extern int last_rc_command; extern int last_rc_arg; extern ControlMode *ctl_list[], *ctl; extern int check_for_rc(void); alsaplayer-0.99.82/attic/midi/dumb_a.c000066400000000000000000000052131466261456500175010ustar00rootroot00000000000000/* * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "controls.h" static int open_output(struct md *d); /* 0=success, 1=warning, -1=fatal error */ static void close_output(struct md *d); static void output_data(int32 *buf, uint32 count, struct md *d); static int driver_output_data(unsigned char *buf, uint32 count, struct md *d); static void flush_output(struct md *d); static void purge_output(struct md *d); static int output_count(uint32 ct, struct md *d); /* export the playback mode */ #undef dpm #define dpm dumb_play_mode PlayMode dpm = { DEFAULT_RATE, PE_16BIT|PE_SIGNED, -1, {0}, /* default: get all the buffer fragments you can */ "Dumb dsp device", 'a', "/dev/dsp", open_output, close_output, output_data, driver_output_data, flush_output, purge_output, output_count }; static int open_output(struct md *d) { dpm.fd=0; return 0; } static int output_count(uint32 ct, struct md *d) { int samples = (int)ct; return samples; } static int driver_output_data(unsigned char *buf, uint32 count, struct md *d) { return count; } static void output_data(int32 *buf, uint32 count, struct md *d) { int ocount; if (!(dpm.encoding & PE_MONO)) count*=2; /* Stereo samples */ ocount = (int)count; if (ocount) { if (dpm.encoding & PE_16BIT) { /* Convert data to signed 16-bit PCM */ s32tos16(buf, count); ocount *= 2; } else { /* Convert to 8-bit unsigned and write out. */ s32tou8(buf, count); } } b_out(dpm.id_character, dpm.fd, (int *)buf, ocount, d); } static void close_output(struct md *d) { } static void flush_output(struct md *d) { output_data(0, 0, d); } static void purge_output(struct md *d) { /*fprintf(stderr,"dumb purge\n");*/ b_out(dpm.id_character, dpm.fd, 0, -1, d); } alsaplayer-0.99.82/attic/midi/dumb_c.c000066400000000000000000000071561466261456500175130ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * dumb_c.c Minimal control mode -- no interaction, just prints out messages. */ #include #include #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include "output.h" #include "controls.h" static void ctl_refresh(void); static void ctl_total_time(uint32 tt); static void ctl_master_volume(int mv); static void ctl_file_name(char *name); static void ctl_current_time(uint32 ct); static void ctl_note(int v); static void ctl_program(int ch, int val, const char *name); static void ctl_volume(int ch, int val); static void ctl_expression(int ch, int val); static void ctl_panning(int ch, int val); static void ctl_sustain(int ch, int val); static void ctl_pitch_bend(int ch, int val); static void ctl_reset(void); static int ctl_open(int using_stdin, int using_stdout); static void ctl_close(void); static int ctl_read(int32 *valp); static int cmsg(int type, int verbosity_level, const char *fmt, ...); /**********************************/ /* export the interface functions */ #define ctl dumb_control_mode ControlMode ctl= { "dumb interface", 'd', 1,0,0, ctl_open,0, ctl_close, ctl_read, cmsg, ctl_refresh, ctl_reset, ctl_file_name, ctl_total_time, ctl_current_time, ctl_note, ctl_master_volume, ctl_program, ctl_volume, ctl_expression, ctl_panning, ctl_sustain, ctl_pitch_bend }; static int ctl_open(int using_stdin, int using_stdout) { ctl.opened=1; return 0; } static void ctl_close(void) { ctl.opened=0; } static int ctl_read(int32 *valp) { return RC_NONE; } static int cmsg(int type, int verbosity_level, const char *fmt, ...) { return 0; } static void ctl_refresh(void) { } static void ctl_total_time(uint32 tt) { uint32 mins, secs; if (ctl.trace_playing) { secs=tt/play_mode->rate; mins=secs/60; secs-=mins*60; /*fprintf(outfp, "Total playing time: %3ld min %02ld s\n", mins, secs);*/ } } static void ctl_master_volume(int mv) { mv = 0; } static void ctl_file_name(char *name) { } static void ctl_current_time(uint32 ct) { uint32 mins, secs; if (ctl.trace_playing) { secs=ct/play_mode->rate; mins=secs/60; secs-=mins*60; /*fprintf(outfp, "\r%3ld:%02ld", mins, secs);*/ } } static void ctl_note(int v) { v = 0; } static void ctl_program(int ch, int val, const char *name) { ch = val = 0; name = 0; } static void ctl_volume(int ch, int val) { ch = val = 0; } static void ctl_expression(int ch, int val) { ch = val = 0; } static void ctl_panning(int ch, int val) { ch = val = 0; } static void ctl_sustain(int ch, int val) { ch = val = 0; } static void ctl_pitch_bend(int ch, int val) { ch = val = 0; } static void ctl_reset(void) {} alsaplayer-0.99.82/attic/midi/effects.c000066400000000000000000000326651466261456500177040ustar00rootroot00000000000000/* * effects.c * experimental channel effects processing * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * contents : channel pre-mix , effect struct definition * Nicolas Witczak juillet 1998 * witczak@geocities.com */ #include "gtim.h" #ifdef CHANNEL_EFFECT #include #ifndef __WIN32__ #include #endif #include #ifndef NO_STRING_H #include #else #include #endif #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "mix.h" #include "controls.h" int XG_effect_chorus_is_celeste_flag = 0; int XG_effect_chorus_is_flanger_flag = 0; int XG_effect_chorus_is_phaser_flag = 0; /**************************************************************************/ /** null terminated list of effects types extern Effect* ChorusCtor( int ) ; extern Effect* PhaserCtor( int ) ; extern Effect* CelesteCtor( int ) ; extern Effect* ReverbCtor( int ) ; */ EFFECT_CTOR effect_type_list[]={ ChorusCtor , PhaserCtor , CelesteCtor , ReverbCtor , 0 }; /* number of effects*/ /*#define NUM_EFFECTS (int)(( sizeof(effect_type_list) / sizeof(EFFECT_CTOR) ) - 1)*/ /* Effect* effect_list[ NUM_EFFECTS ][MAXCHAN] ; */ char effect_name[NUM_EFFECTS][MAXCHAN] ; /**************************************************************************/ /** channel buffers and empty flags */ /*static int32 channel_buffer[MAXCHAN][AUDIO_BUFFER_SIZE*2] ;*/ /* stereo samples */ /*static int channel_buffer_state[MAXCHAN] ;*/ /* 0 means null signal , 1 non null */ void do_compute_data_effect(uint32 count, struct md *d); /**************************************************************************/ /** c_buff structure helpers functions */ #define CIRCBUFF_PARAM 8 /* define factor between active content part and actual buffer */ void create_cirbuff( cirbuff* pThis , uint32 count ) { memset( pThis , 0 , sizeof( cirbuff ) ) ; if( count != 0 ) { pThis->m_pBufLast = (int32 *) safe_malloc( count * CIRCBUFF_PARAM * 4 ) ; memset( pThis->m_pBufLast , 0 , count * CIRCBUFF_PARAM * 4 ) ; -- pThis->m_pBufLast ; pThis->m_pBufCur = pThis->m_pBufLast + count * CIRCBUFF_PARAM ; pThis->m_pCur = pThis->m_pBufLast + count ; pThis->m_count = count ; } } void delete_cirbuff( cirbuff* pThis ) { if( pThis->m_pBufLast != 0 ) { ++ pThis->m_pBufLast ; free( pThis->m_pBufLast ) ; } memset( pThis , 0 , sizeof( cirbuff ) ) ; } void redim_cirbuff( cirbuff* pThis , uint32 count ) { if( count == 0 ) delete_cirbuff( pThis ) ; else if( count <= pThis->m_count ) pThis->m_count = count ; else { cirbuff CircTmp ; create_cirbuff( &CircTmp , count ) ; memcpy( CircTmp.m_pCur - pThis->m_count + 1 , pThis->m_pCur - pThis->m_count + 1, pThis->m_count * 4 ) ; delete_cirbuff( pThis ) ; memcpy( pThis , &CircTmp , sizeof( cirbuff ) ) ; } } void pushval_cirbuff( cirbuff* pThis , int32 newSample ) { if( pThis->m_pCur >= pThis->m_pBufCur ) { memcpy( pThis->m_pBufLast + 1 , pThis->m_pCur - pThis->m_count + 2 , ( pThis->m_count - 1 ) * 4 ) ; pThis->m_pCur = pThis->m_pBufLast + pThis->m_count - 1 ; } ++ pThis->m_pCur ; *(pThis->m_pCur) = newSample ; } void shift_cirbuff( cirbuff* pThis , uint32 uiShift ) { if( uiShift == 0 ) return ; if( uiShift >= pThis->m_count ) { memset( pThis->m_pBufLast + 1 , 0 , pThis->m_count * 4 ) ; pThis->m_pCur = pThis->m_pBufLast + pThis->m_count ; } else { uint32 offset ; if( pThis->m_pCur + uiShift <= pThis->m_pBufCur ) pThis->m_pCur += uiShift ; else { offset = pThis->m_count - uiShift ; memcpy( pThis->m_pBufLast + 1 , pThis->m_pCur - offset + 1, offset * 4 ); pThis->m_pCur = pThis->m_pBufLast + pThis->m_count ; } memset( pThis->m_pCur - uiShift + 1 , 0 , uiShift * 4 ); } } void dump_cirbuff( cirbuff* pThis , FILE* pOutFile ) { int32* pTest ; fprintf( pOutFile , "{ " ) ; for( pTest = pThis->m_pBufLast + 1 ; pTest <= pThis->m_pBufCur ; ++ pTest ) { fprintf( pOutFile , " %lu " , *pTest ) ; if( pTest == pThis->m_pCur - pThis->m_count ) fprintf( pOutFile , "[ " ) ; if( pTest == pThis->m_pCur ) fprintf( pOutFile , " ]" ) ; } fprintf( pOutFile , " }\n\n" ) ; } /** performs various buffer manipulations */ #if 0 static void DebugCircBuffer() { cirbuff test ; FILE* pfTest ; pfTest = fopen("test.txt","w"); create_cirbuff( &test , 4 ) ; pushval_cirbuff( &test , 1 ) ; dump_cirbuff( &test , pfTest ) ; pushval_cirbuff( &test , 2 ) ; dump_cirbuff( &test , pfTest ) ; pushval_cirbuff( &test , 3 ) ; dump_cirbuff( &test , pfTest ) ; pushval_cirbuff( &test , 4 ) ; dump_cirbuff( &test , pfTest ) ; shift_cirbuff( &test , 2 ) ; dump_cirbuff( &test , pfTest ) ; pushval_cirbuff( &test , 5 ) ; dump_cirbuff( &test , pfTest ) ; redim_cirbuff( &test , 6 ) ; dump_cirbuff( &test , pfTest ) ; pushval_cirbuff( &test , 6 ) ; dump_cirbuff( &test , pfTest ) ; shift_cirbuff( &test , 2 ) ; dump_cirbuff( &test , pfTest ) ; pushval_cirbuff( &test , 7 ) ; dump_cirbuff( &test , pfTest ) ; pushval_cirbuff( &test , 8 ) ; dump_cirbuff( &test , pfTest ) ; shift_cirbuff( &test , 3 ) ; dump_cirbuff( &test , pfTest ) ; delete_cirbuff( &test ) ; fclose( pfTest ) ; } #endif /**************************************************************************/ /** do_compute_data redefined from playmidi */ void do_compute_data_effect(uint32 count, struct md *d) { int idChannel , idVoice , idEffect; uint32 byteCount; int32 *pBuffDestEnd ; if( play_mode->encoding & PE_MONO ) byteCount = count * 4 ; else byteCount = count * 8 ; /* mix voices into channel buffers*/ for ( idVoice = 0; idVoice < d->voices; ++idVoice ) { if( d->voice[ idVoice ].status != VOICE_FREE ) { idChannel = d->voice[ idVoice ].channel ; if (!d->voice[ idVoice ].sample_offset && d->voice[ idVoice ].echo_delay_count) { if (d->voice[ idVoice ].echo_delay_count >= count) d->voice[ idVoice ].echo_delay_count -= count; else { mix_voice( d->channel_buffer[ idChannel ] + d->voice[ idVoice ].echo_delay_count, idVoice, count - d->voice[ idVoice ].echo_delay_count, d); d->voice[ idVoice ].echo_delay_count = 0; } } else mix_voice( d->channel_buffer[ idChannel ] , idVoice , count, d ); d->channel_buffer_state[ idChannel ] = 1 ; } } /* apply effects*/ if( play_mode->encoding & PE_MONO ) for( idEffect = 0 ; idEffect < NUM_EFFECTS ; ++ idEffect ) { for( idChannel = 0 ; idChannel < MAXCHAN ; ++ idChannel ) { if( d->effect_list[idEffect][idChannel] != 0 ) (( d->effect_list[idEffect][idChannel] )->m_pfnActionMono) ( d->effect_list[idEffect][idChannel] , d->channel_buffer[ idChannel ] , count , &(d->channel_buffer_state[ idChannel ]) ) ; } } else for( idEffect = 0 ; idEffect < NUM_EFFECTS ; ++ idEffect ) { for( idChannel = 0 ; idChannel < MAXCHAN ; ++ idChannel ) { if( d->effect_list[idEffect][idChannel] != 0 ) (( d->effect_list[idEffect][idChannel] )->m_pfnActionStereo) ( d->effect_list[idEffect][idChannel] , d->channel_buffer[ idChannel ] , count , &(d->channel_buffer_state[ idChannel ]) ) ; } } /* clear common buffer */ memset(d->buffer_pointer, 0, byteCount ); /* mix channel buffers into common_buffer */ if( play_mode->encoding & PE_MONO ) pBuffDestEnd = d->buffer_pointer + count ; else pBuffDestEnd = d->buffer_pointer + ( count * 2 ) ; for( idChannel = 0 ; idChannel < MAXCHAN ; ++ idChannel ) { int32 *pBuffSrcCur , *pBuffDestCur ; if( d->channel_buffer_state[ idChannel ] ) { /* mix this channel if non empty */ pBuffSrcCur = d->channel_buffer[ idChannel ] ; pBuffDestCur = d->buffer_pointer ; for( ; pBuffDestCur != pBuffDestEnd ; ++ pBuffDestCur , ++ pBuffSrcCur ) *pBuffDestCur += *pBuffSrcCur ; } } /* clear channel buffer */ for( idChannel = 0 ; idChannel < MAXCHAN ; ++ idChannel ) { if( d->channel_buffer_state[ idChannel ] ) { memset( d->channel_buffer[ idChannel ] , 0, byteCount ) ; d->channel_buffer_state[ idChannel ] = 0 ; } } d->current_sample += count; } /** cut and paste from playmidi*/ static void do_compute_data_default(uint32 count, struct md *d) { int i; if (!count) return; /* (gl) */ memset(d->buffer_pointer, 0, (play_mode->encoding & PE_MONO) ? (count * 4) : (count * 8)); for (i=0; ivoices; i++) { if(d->voice[i].status != VOICE_FREE) { if (!d->voice[i].sample_offset && d->voice[i].echo_delay_count) { if (d->voice[i].echo_delay_count >= count) d->voice[i].echo_delay_count -= count; else { mix_voice(d->buffer_pointer+d->voice[i].echo_delay_count, i, count - d->voice[i].echo_delay_count, d); d->voice[i].echo_delay_count = 0; } } else mix_voice(d->buffer_pointer, i, count, d); } } d->current_sample += count; } /**************************************************************************/ /** switch beetween effect / no_effect mixing mode */ void (*do_compute_data)(uint32, struct md *) = &do_compute_data_default ; /**************************************************************************/ /** fct : effect_activate */ void effect_activate( int iSwitch ) { if( iSwitch ) { do_compute_data = &do_compute_data_effect ; opt_effect = 1; } else { do_compute_data = &do_compute_data_default ; opt_effect = 0; } } /**************************************************************************/ /** initialize this file scope variables according to (TODO) command line * switches , to be called prior any other processing * return 1 if success */ int init_effect(struct md *d) { int idChannel ; for( idChannel = 0 ; idChannel < MAXCHAN ; ++ idChannel ) { int idEffect ; memset( d->channel_buffer[ idChannel ] , 0, AUDIO_BUFFER_SIZE*8 ) ; d->channel_buffer_state[ idChannel ] = 0 ; for( idEffect = 0 ; idEffect < NUM_EFFECTS ; ++ idEffect ) { d->effect_list[ idEffect ][ idChannel ] = effect_type_list[idEffect]() ; if( d->effect_list[ idEffect ][ idChannel ] == 0 ) return 0 ; if( idChannel == 0 ) ((d->effect_list[ idEffect ][ idChannel ])->m_pfnName)( effect_name[idEffect] ); } d->effect_list[ idEffect ][ idChannel ] = 0 ; } return 1 ; } /**************************************************************************/ /** fct : effect_ctrl_change */ void effect_ctrl_change( MidiEvent* pCurrentEvent, struct md *d ) { int idEffect ; for( idEffect = 0 ; idEffect < NUM_EFFECTS ; ++ idEffect ) { if( d->effect_list[idEffect][pCurrentEvent->channel] != 0 ) ( (d->effect_list[idEffect][pCurrentEvent->channel])->m_pfnCtrlChange ) ( d->effect_list[idEffect][pCurrentEvent->channel] , pCurrentEvent ) ; } } /**************************************************************************/ /** get info about XG effects */ static void reset_XG_effect_info(struct md *d) { XG_effect_chorus_is_celeste_flag = XG_effect_chorus_is_flanger_flag = XG_effect_chorus_is_phaser_flag = 0; if (d->XG_System_chorus_type >= 0) { /* int subtype = d->XG_System_chorus_type & 0x07; */ int chtype = 0x0f & (d->XG_System_chorus_type >> 3); switch (chtype) { case 0: /* no effect */ break; case 1: /* chorus */ break; case 2: /* celeste */ XG_effect_chorus_is_celeste_flag = 1; break; case 3: /* flanger */ XG_effect_chorus_is_flanger_flag = 1; break; case 4: /* symphonic : cf Children of the Night /128 bad, /1024 ok */ break; case 8: /* phaser */ XG_effect_chorus_is_phaser_flag = 1; break; default: break; } } if (d->XG_System_reverb_type >= 0) { /* int subtype = d->XG_System_reverb_type & 0x07; */ int rtype = d->XG_System_reverb_type >>3; switch (rtype) { case 0: /* no effect */ break; case 1: /* hall */ break; case 2: /* room */ break; case 3: /* stage */ break; case 4: /* plate */ break; case 16: /* white room */ break; case 17: /* tunnel */ break; case 18: /* canyon */ break; case 19: /* basement */ break; default: break; } } } /**************************************************************************/ /** fct : effect_ctrl_reset */ void effect_ctrl_reset( int idChannel, struct md *d ) { int idEffect ; if (!idChannel) reset_XG_effect_info(d); for( idEffect = 0 ; idEffect < NUM_EFFECTS ; ++ idEffect ) { if( d->effect_list[idEffect][idChannel] != 0 ) ( (d->effect_list[idEffect][idChannel])->m_pfnCtrlReset )( d->effect_list[idEffect][idChannel] ) ; } } /**************************************************************************/ /** fct : effect_ctrl_kill */ void effect_ctrl_kill( int idChannel, struct md *d ) { int idEffect ; for( idEffect = 0 ; idEffect < NUM_EFFECTS ; ++ idEffect ) { if( d->effect_list[idEffect][idChannel] != 0 ) ( (d->effect_list[idEffect][idChannel])->m_pfnDestruct )( d->effect_list[idEffect][idChannel] ) ; } } #endif /*CHANNEL_EFFECT*/ alsaplayer-0.99.82/attic/midi/effects.h000066400000000000000000000170751466261456500177070ustar00rootroot00000000000000/* * effects.h * experimental channel effects processing * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * contents : channel pre-mix , effect struct definition * Nicolas Witczak juillet 1998 * witczak@geocities.com */ /* remarks about occured changes + each note from a voice was directly mixed in the common_buffer in order to add channel effect we need to insert an extra and inefficient mixing so implementing the scheme : voice -> channel_buffer -> common_buffer -> output_buffer the only optimisation I see from now is to keep track of empty channel_buffer in order to skip them from processing and mixing + I tried to keep the C but yet modular style of prog , hope it'll be usefull + this experimental add on can be switched on and off with the define CHANNEL_EFFECT */ #ifndef EFFECTS_H #define EFFECTS_H extern int XG_effect_chorus_is_celeste_flag; extern int XG_effect_chorus_is_flanger_flag; extern int XG_effect_chorus_is_phaser_flag; /**************************************************************************/ /** exported from playmidi.c */ /*extern MidiEvent *event_list, *current_event;*/ /*extern uint32 sample_count, current_sample;*/ /*extern int32 *buffer_pointer;*/ /**************************************************************************/ /** helpers functions : circular buffer impl */ /** used in several effect that need phase modulation */ #define FRACTION ( 1 << FRACTION_BITS ) /**************************************************************************/ /** cirbuff structure : manage a circular buffer : given x it retreives x * z-1 , x * z-2 ... * accesible values are (ptr->m_pCur)[0] , (ptr->m_pCur)[-1] ... (ptr->m_pCur)[ -m_count + 1 ] */ typedef struct { /** m_count : active content sample count */ uint32 m_count ; /** m_pCur : represent the past sample content ] pLast , m_pCur ] * transient should not be stored */ int32* m_pCur ; /** m_pBufCur , m_pBufLast represent the actual buffer ] m_pBufLast , m_pBufCur ] such that * m_pBufLast <= m_pLast < m_pCur <= m_pBufCur */ int32* m_pBufCur ; int32* m_pBufLast ; } cirbuff ; /** create_cirbuff : initialize a circular buffer given as pThis with an active size of count */ void create_cirbuff( cirbuff* pThis , uint32 count ) ; /** delete_cirbuff : delete a circular buffer given as pThis */ void delete_cirbuff( cirbuff* pThis ) ; /** redim_cirbuff : resize a circular buffer given as pThis with an new size of count * preserve content */ void redim_cirbuff( cirbuff* pThis , uint32 count ) ; /** pushval_cirbuff : insert newSample inside pThis */ void pushval_cirbuff( cirbuff* pThis , int32 newSample ) ; /** shift_cirbuff : shift past samples inside pThis of uiShift complete with 0 sample val */ void shift_cirbuff( cirbuff* pThis , uint32 uiShift ) ; /* dump_cirbuff : output a ascii dump of this buffer ( for debugging) */ void dump_cirbuff( cirbuff* pThis , FILE* pOutFile ) ; /**************************************************************************/ /** Effect structure * this structure represent a particuliar kind of effect * ie rev , chorus, acting on a single channel buffer */ typedef struct { /** called each time a new mono data chunk is to be processed * PARAM : this Effect derived structure * PARAM : the channel buffer to process * PARAM : number of samples to process * PARAM : 1 if this buffer is not null signal, may be set to 1 by this function * RELATED GLOBAL VAR : sample_count, current_sample (current sample counter) */ void (*m_pfnActionMono)( void* , int32* , uint32 , int* ) ; /** called each time a new stereo data chunk is to be processed * PARAM : this Effect derived structure * PARAM : the channel buffer to process * PARAM : number of samples to process * PARAM : 1 if this buffer is not null signal, may be set to 1 by this function * RELATED GLOBAL VAR : sample_count, current_sample (current sample counter) * RQ : sample buffer contains 2 * PARAM2 samples */ void (*m_pfnActionStereo)( void* , int32* , uint32 , int* ) ; /** hook function : called when a controller have changed * PARAM : this Effect derived structure */ void (*m_pfnCtrlChange)( void* , MidiEvent* pCurrentEvent ); /** hook function : called when a controller must be reseted in a inactive state * PARAM : this Effect derived structure */ void (*m_pfnCtrlReset)( void* ); /** accessor : give the name of this effect * fill the buffer given as argument ( max size 16 char including \0 ) */ void (*m_pfnName)( char* ); /** destructor function * PARAM : this Effect derived structure */ void (*m_pfnDestruct)( void* ); } Effect; /**************************************************************************/ /** Effect construction function prototype * this function is called once for each effect on each channel upon * it will be used * PARAM : channel attached to the newly constructed Effect obj * may be used to access the channel array * RELATED GLOBAL VAR : channel array * RETURN : shall return an allocated effect object whose structure is compatible * whith the Effect one */ typedef Effect* (*EFFECT_CTOR)(void) ; /**************************************************************************/ /** null terminated list effects types contructors */ extern EFFECT_CTOR effect_type_list[5] ; #define NUM_EFFECTS (int)(( sizeof(effect_type_list) / sizeof(EFFECT_CTOR) ) - 1) /* effect_list[effect type][channel] , list of * active effects for each channel in the same order than former list * RQ1 : may contains 0 if not activated * RQ2 : placed in the same than for the effect_type_list array */ /*extern Effect* effect_list[][MAXCHAN] ; */ /** effect name list */ extern char effect_name[][MAXCHAN] ; /**************************************************************************/ /** effect_ctrl_change * this function is called in order to give a chance to ctrl effect * object to update their parameters * PARAM pCurrentEvent : midi event reflecting changes */ /*void effect_ctrl_change( MidiEvent* pCurrentEvent, struct md *d );*/ /**************************************************************************/ /** effect_ctrl_reset * this function is called in order to reset all ctrl effect attached to a channel * object to update their parameters * PARAM idChannel : midi channel number */ /*void effect_ctrl_reset( int idChannel, struct md *d );*/ /**************************************************************************/ /** effect_activate * this function turns on or off effect processing according to iSwitch */ void effect_activate( int iSwitch ) ; #endif /*EFFECTS_H*/ /****************************************************************************************/ extern int opt_effect; extern int opt_effect_reverb; extern Effect* ChorusCtor(void) ; extern Effect* PhaserCtor(void) ; extern Effect* CelesteCtor(void) ; extern Effect* ReverbCtor(void) ; /*extern int init_effect(struct md *d) ;*/ alsaplayer-0.99.82/attic/midi/fffload.c000066400000000000000000001226301466261456500176560ustar00rootroot00000000000000 #ifdef FFF_HAS_BEEN_FIXED /* * fffload - Read .fff patch-description files and load the patches * they refer to. The routine load_fff_patch is adapted from "load_instrument", * which is Copyright (C) 1995 Tuukka Toivonen . * -- Greg Lee, lee@Hawaii.edu, June, 1997. * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id$ */ #include #include #include #include #include #include #include #include #ifdef __FreeBSD__ #include #else #include #endif #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "output.h" #include "controls.h" #include "resample.h" #include "tables.h" #include "filter.h" extern int32 convert_envelope_rate(uint8); extern int32 convert_envelope_rate_attack(uint8, uint8); extern int32 convert_envelope_offset(uint8); extern int32 convert_tremolo_sweep(uint8); extern int32 convert_vibrato_sweep(uint8, int32); extern int32 convert_tremolo_rate(uint8); extern int32 convert_vibrato_rate(uint8); #define FFFF 1 #define CPRT 2 #define DATA 4 #define ENVP 8 #define PROG 16 #define PTCH 32 #define LAYR 64 #define WAVE 128 #define ANY_HUNK 255 #define SIZEOF_PROG_HEADER 16 #define SIZEOF_DATA_HEADER 12 static int current_toneset = 0; static int old_toneset = -1; static int fsize; static unsigned char *fff; struct hunk_type { int tag; unsigned char *ptr; }; struct envp_point { unsigned short offset, rate; }; struct envp_rec { unsigned short nattack, nrelease, sustain_offset, sustain_rate, release_rate; unsigned char hirange, pad; struct envp_point *envp_points_attack; struct envp_point *envp_points_release; }; struct envp_type { unsigned char num_envelopes, flags, mode, index_type; struct envp_rec *envp_records; struct envp_type *next; }; struct wave_type { unsigned long size, start, loopstart, loopend, mstart, sample_ratio; unsigned char attenuation, low_note, high_note, format, m_format; struct wave_type *next_wave; }; struct TLFO { unsigned short freq; short depth, sweep; unsigned char shape, delay; }; struct layr_type { unsigned long id; unsigned char nwaves, flags, high_range, low_range, pan, pan_freq_scale; struct TLFO tremolo, vibrato; unsigned char velocity_mode, attenuation; unsigned short freq_scale; unsigned char freq_center, layer_event; unsigned long penv, venv; struct layr_type *next; struct wave_type *waves; }; static struct hunk_type *hunkit(unsigned char *here, int req); #define SHGT(a) ( (here[a+1]<<8)|here[a] ) #define LGGT(a) ( (here[a+3]<<24)|(here[a+2]<<16)|(here[a+1]<<8)|here[a] ) static struct hunk_type *global_wave_hunk; static struct wave_type *make_wave(unsigned char *here, struct hunk_type *me) { struct wave_type *wave; struct hunk_type *wave_hunk; wave = (struct wave_type *)malloc( sizeof(struct wave_type) ); wave->size = LGGT(4); wave->start = LGGT(8); wave->loopstart = LGGT(12); wave->loopend = LGGT(16); wave->mstart = LGGT(20); wave->sample_ratio = LGGT(24); wave->attenuation = here[28]; wave->low_note = here[29]; wave->high_note = here[30]; wave->format = here[31]; wave->m_format = here[32]; if (!me->ptr) { wave->next_wave = 0; global_wave_hunk = me; return(wave); } global_wave_hunk = wave_hunk = hunkit(me->ptr, ANY_HUNK); if (wave_hunk->tag != WAVE) wave->next_wave = 0; else wave->next_wave = make_wave(me->ptr + 8, wave_hunk); return(wave); } static struct layr_type *make_layr(unsigned char *here, struct hunk_type *me) { struct layr_type *layr; struct hunk_type *wave_hunk; layr = (struct layr_type *)malloc( sizeof(struct layr_type) ); layr->nwaves = here[4]; layr->flags = here[5]; layr->high_range = here[6]; layr->low_range = here[7]; layr->pan = here[8]; layr->pan_freq_scale = here[9]; layr->tremolo.freq = (unsigned short)SHGT(10); layr->tremolo.depth = (short)SHGT(12); layr->tremolo.sweep = (short)SHGT(14); layr->tremolo.shape = here[16]; layr->tremolo.delay = here[17]; layr->vibrato.freq = (unsigned short)SHGT(18); layr->vibrato.depth = (short)SHGT(20); layr->vibrato.sweep = (short)SHGT(22); layr->vibrato.shape = here[24]; layr->vibrato.delay = here[25]; layr->velocity_mode = here[26]; layr->attenuation = here[27]; layr->freq_scale = (unsigned short)SHGT(28); layr->freq_center = here[30]; layr->layer_event = here[31]; wave_hunk = hunkit(me->ptr, WAVE); layr->waves = make_wave(me->ptr + 8, wave_hunk); return(layr); } static struct envp_type *make_envp(unsigned char *here) { struct envp_type *envp; int i, j, off; envp = (struct envp_type *)malloc( sizeof(struct envp_type) ); envp->num_envelopes = here[4]; envp->flags = here[5]; envp->mode = here[6]; envp->index_type = here[7]; envp->envp_records = (struct envp_rec *)malloc( sizeof(struct envp_rec) * envp->num_envelopes ); off = 8; for (i = 0; i < envp->num_envelopes; i++) { int na, nr; na = envp->envp_records[i].nattack = SHGT(off); off += 2; nr = envp->envp_records[i].nrelease = SHGT(off); off += 2; envp->envp_records[i].sustain_offset = SHGT(off); off += 2; envp->envp_records[i].sustain_rate = SHGT(off); off += 2; envp->envp_records[i].release_rate = SHGT(off); off += 2; envp->envp_records[i].hirange = here[off]; off++; envp->envp_records[i].pad = here[off]; off++; envp->envp_records[i].envp_points_attack = (struct envp_point *) malloc( sizeof(struct envp_point) * na ); for (j = 0; j < na; j++) { envp->envp_records[i].envp_points_attack[j].offset = SHGT(off); off += 2; envp->envp_records[i].envp_points_attack[j].rate = SHGT(off); off += 2; } envp->envp_records[i].envp_points_release = (struct envp_point *) malloc( sizeof(struct envp_point) * nr ); for (j = 0; j < nr; j++) { envp->envp_records[i].envp_points_release[j].offset = SHGT(off); off += 2; envp->envp_records[i].envp_points_release[j].rate = SHGT(off); off += 2; } } return(envp); } #define MAX_FFF_FILES 40 static char fff_filename[MAX_FFF_FILES][200]; static char dat_filename[MAX_FFF_FILES][200]; static int dat_opened[MAX_FFF_FILES] = { 0 }; static int f_ix = 0; static char ptch_data_name[80]; static struct ptch_type { /*unsigned long id;*/ struct envp_type *envelope; unsigned short nlayers; unsigned char layer_mode, exclusion_mode; unsigned short exclusion_group; unsigned char effect1, effect1_depth, effect2, effect2_depth; unsigned char bank, program, file_index; unsigned long iw_layer; struct layr_type *layr; struct ptch_type *next_bank; } *ptch[256] = { 0 }; static int layr_count = 0; static struct ptch_type *make_ptch(unsigned char *here, struct hunk_type *patch, struct envp_type *envelope) { struct ptch_type *p; struct hunk_type *layr_hunk; p = (struct ptch_type*)malloc( sizeof(struct ptch_type) ); p->envelope = envelope; layr_count = p->nlayers = (unsigned short)SHGT(4); p->layer_mode = here[6]; p->exclusion_mode = here[7]; p->exclusion_group = (unsigned short)SHGT(8); p->effect1 = here[10]; p->effect1_depth = here[11]; p->effect2 = here[12]; p->effect2_depth = here[13]; if ((int)here[14] == old_toneset) p->bank = (unsigned char)current_toneset; else p->bank = here[14]; p->program = here[15]; p->file_index = f_ix; layr_hunk = hunkit(patch->ptr, LAYR); p->layr = make_layr(patch->ptr + 8, layr_hunk); p->next_bank = ptch[p->program]; ptch[p->program] = p; return(p); } static struct hunk_type *hunkit(unsigned char *here, int req) { int tag = -1; struct hunk_type *h; unsigned long offset; if (!strncmp(here, "FFFF", 4)) tag = FFFF; else if (!strncmp(here, "CPRT", 4)) tag = CPRT; else if (!strncmp(here, "DATA", 4)) tag = DATA; else if (!strncmp(here, "ENVP", 4)) tag = ENVP; else if (!strncmp(here, "PROG", 4)) tag = PROG; else if (!strncmp(here, "PTCH", 4)) tag = PTCH; else if (!strncmp(here, "LAYR", 4)) tag = LAYR; else if (!strncmp(here, "WAVE", 4)) tag = WAVE; else { int i; fprintf(stderr,"unknown hunk type "); for (i = 0; i < 4; i++) { if (here[i] >= 'A' && here[i] <= 'Z') putchar(here[i]); else fprintf(stderr,"[%d]", here[i]); } fprintf(stderr,"\n"); #ifdef ADAGIO X_EXIT #else exit(1); #endif } if (!(req & tag)) { fprintf(stderr,"requested %d hunk but got %d hunk\n", req, tag); #ifdef ADAGIO X_EXIT #else exit(1); #endif } h = (struct hunk_type *)malloc( sizeof(struct hunk_type) ); if (!h) { fprintf(stderr,"out of mem!\n"); #ifdef ADAGIO X_EXIT #else exit(1); #endif } h->tag = tag; offset = (unsigned long)LGGT(4); if (here - fff + offset + 8 >= (unsigned long)fsize) h->ptr = 0; else h->ptr = here + offset + 8; return h; } /* Following depends on ENVP hunk preceding corresponding PROG hunk. */ static int make_hunks(unsigned char *start) { int cnt = 0; unsigned char *next, *prev; struct hunk_type *patch, *hunk; struct envp_type *envelope, *next_envelope, *last_envelope=0; struct ptch_type *p; struct layr_type *dangle, *last_layr=0; envelope = 0; next = start; while (next) { hunk = hunkit(next, DATA|ENVP|PROG|LAYR|WAVE); prev = next; next = hunk->ptr; if (hunk->tag == PROG) { patch = hunkit(prev + SIZEOF_PROG_HEADER, PTCH); if (!envelope) { fprintf(stderr,"strange hunk order!\n"); #ifdef ADAGIO X_EXIT #else exit(1); #endif } p = make_ptch(prev + SIZEOF_PROG_HEADER + 8, patch, envelope); last_layr = p->layr; last_layr->next = 0; envelope = 0; } else if (hunk->tag == DATA) strcpy(ptch_data_name, prev + SIZEOF_DATA_HEADER); else if (hunk->tag == ENVP) { last_layr = 0; next_envelope = make_envp(prev + 8); next_envelope->next = 0; if (!envelope) { envelope = next_envelope; last_envelope = envelope; } else { last_envelope->next = next_envelope; last_envelope = next_envelope; } } else if (hunk->tag == LAYR) { dangle = make_layr(prev + 8, hunk); dangle->next = 0; if (last_layr && layr_count > 1) { last_layr->next = dangle; last_layr = dangle; layr_count--; } else fprintf(stderr,"\nFound dangling LAYR in .fff file.\n\n"); next = global_wave_hunk->ptr; } else if (hunk->tag == WAVE) { fprintf(stderr,"Found stray WAVE in .fff file.\n"); } cnt++; } return(cnt); } int loadfff(char * filename, int bank, int oldbank) { int cnt; struct stat info; struct hunk_type *ffff_hunk, *cprt_hunk; static int f = 0; char tmpnm[200]; #ifdef ADAGIO if (tracing) printf("loadfff(%s,bank=%d)\n", filename, bank); #else ctl->cmsg(CMSG_INFO, VERB_NOISY, "Loading fff file %s", filename); #endif if (!filename) return(1); if (filename[0] == '/' || (filename[0] == '.' && filename[1] == '/')) strcpy(tmpnm, filename); else { strcpy(tmpnm, TIMID_DIR); strcat(tmpnm, "/"); strcat(tmpnm, filename); } if (strcmp(".fff", tmpnm + strlen(tmpnm) - 4)) strcat(tmpnm,".fff"); for (cnt = f_ix - 1; cnt >= 0; cnt--) if (!strcmp(tmpnm, fff_filename[cnt])) return(0); if (stat(tmpnm, &info)) { perror(tmpnm); f = -1; return (1); } f = open(tmpnm, O_RDONLY, 0); if (f < 0) { perror(tmpnm); return(1); } fff = (unsigned char *)malloc(info.st_size); if (!fff) { perror("malloc"); f = -1; return(1); } fsize = read(f, fff, info.st_size); if (fsize < info.st_size) { perror(tmpnm); close(f); free(fff); return(1); } close(f); ffff_hunk = hunkit(fff, FFFF); if (!ffff_hunk) { fprintf(stderr,"Couldn't even get FFFF hunk.\n"); f = -1; return(1); } if (ffff_hunk->tag != FFFF) { fprintf(stderr,"First hunk is wrong type (%d).\n", ffff_hunk->tag); f = -1; return(1); } if (ffff_hunk->ptr) { fprintf(stderr,"Looks like multiple FFFF hunks here ...\n"); fprintf(stderr," I'll just do the first one.\n"); } current_toneset = bank & 0x7f; old_toneset = oldbank; cprt_hunk = hunkit(fff + 8, CPRT); cnt = make_hunks(cprt_hunk->ptr); strcpy(fff_filename[f_ix], tmpnm); { int i = strlen(tmpnm); while ( i && tmpnm[--i] != '/' ) ; tmpnm[++i] = '\0'; strcat(tmpnm, ptch_data_name); } strcpy(dat_filename[f_ix], tmpnm); f_ix++; free(fff); return(0); } #ifdef ADAGIO int fff_test(int prog, int bank) { struct ptch_type *p; if (!(p=ptch[prog])) return(0); bank &= 0x7f; while (p->bank != bank && p->next_bank) p = p->next_bank; return (p->bank == bank); } #endif #define LEFT_SIDE 0 #define RIGHT_SIDE 1 #ifndef USEENV_FLAG #define USEENV_FLAG 0x16 #endif #ifdef ADAGIO InstrumentLayer *load_fff_patch(int prog, int tpgm, int reverb, int main_volume) { extern int next_wave_prog; int amp=-1, note_to_use, strip_loop, strip_envelope, strip_tail, bank, newmode; int percussion; char *name; #else InstrumentLayer *load_fff_patch(char *name, int prog, int bank, int percussion, int panning, int amp, int note_to_use, int strip_loop, int strip_envelope, int strip_tail) { #endif InstrumentLayer *lp; Instrument *ip; Sample *sp; int i; uint32 cnt; unsigned char mode; struct ptch_type *p; struct envp_type *e; struct layr_type *l; struct wave_type *w; int f, d_ix; int current_side = LEFT_SIDE; #ifdef ADAGIO if (!(gus_voice[tpgm].keep & FFF_FLAG)) return(0); if (tracing) printf("load_fff_patch(prog=%d,tpgm=%d,reverb=%d,main_volume=%d) keep 0x%02X\n", prog,tpgm,reverb,main_volume, gus_voice[tpgm].keep); #endif if (!(p=ptch[prog])) return(0); #ifdef ADAGIO name = gus_voice[tpgm].vname; percussion = (prog >= 128); bank = gus_voice[tpgm].bank & 0x7f; newmode = gus_voice[tpgm].modes; #endif while (p->bank != bank && p->next_bank) p = p->next_bank; if (p->bank != bank) return(0); #ifdef ADAGIO if (prog < 128) note_to_use = prog; else note_to_use = prog - 128; #endif d_ix = p->file_index; f = dat_opened[d_ix]; if (f < 0) return(0); if (!f) { f = open(dat_filename[d_ix], O_RDONLY, 0); dat_opened[d_ix] = f; if (f < 0) { perror(dat_filename[d_ix]); return(0); } } ctl->cmsg(CMSG_INFO, VERB_NOISY, "Loading%s %s[%d,%d] from %s", (p->nlayers == 2)? " stereo" : "", name, (percussion)? prog-128 : prog, bank, dat_filename[d_ix]); #ifdef FFFDEBUG printf("patch for prog %d, note %d:\n", prog, note); #endif e = p->envelope; l = p->layr; if (!l->nwaves) return(0); ip = (Instrument *)safe_malloc(sizeof(Instrument)); lp=(InstrumentLayer *)safe_malloc(sizeof(InstrumentLayer)); lp->lo = 0; lp->hi = 127; lp->instrument = ip; lp->next = 0; #ifdef ADAGIO gus_voice[tpgm].loaded |= DSP_MASK; gus_voice[tpgm].prog = next_wave_prog++; #endif /* back here to load right part of a stereo patch */ other_side: ip->type = INST_GUS; ip->samples = l->nwaves; ip->sample = (Sample *)malloc(sizeof(Sample) * ip->samples); if (current_side == LEFT_SIDE) { ip->left_samples = ip->samples; ip->left_sample = ip->sample; ip->right_samples = 0; ip->right_sample = 0; } else { ip->right_samples = ip->samples; ip->right_sample = ip->sample; } w = l->waves; for (i = 0; i < ip->samples; i++) { int v; for (v = 0; v < ip->samples && v < e->num_envelopes ; v++) if (e->envp_records[v].hirange >= w->high_note) break; sp=&(ip->sample[i]); sp->data_length = w->size; sp->loop_start = w->loopstart >> 4; sp->loop_end = w->loopend >> 4; #ifdef FFFDEBUG printf("data_length %ld, loop_start %ld, loop_end %ld\n", sp->data_length, sp->loop_start, sp->loop_end); #endif sp->sample_rate = 44100; sp->freq_center = l->freq_center; sp->freq_scale = l->freq_scale; #ifdef ADAGIO if (prog > 127 && gus_voice[tpgm].fix_key) { sp->freq_scale = 0; note_to_use = sp->freq_center = gus_voice[tpgm].fix_key; } else if (!sp->freq_scale) gus_voice[tpgm].fix_key = sp->freq_center; #endif if (prog > 127 && l->freq_scale == 1024) { /* for the SoundCanvas patch set, we should play the prog # */ sp->freq_scale = 0; sp->freq_center = note_to_use; } #ifdef ADAGIO if (gus_voice[tpgm].trnsps && current_side == LEFT_SIDE) sp->freq_center += gus_voice[tpgm].trnsps - 64; if (gus_voice[tpgm].right_trnsps && current_side == RIGHT_SIDE) sp->freq_center += gus_voice[tpgm].right_trnsps - 64; #endif if (sp->freq_scale) { note_to_use = -1; sp->low_freq = freq_table[w->low_note]; sp->high_freq = freq_table[w->high_note]; } else { /* for the time being, the note_to_play logic for percussion is disabled, * and freq for note will be determined by freq_center */ note_to_use = sp->freq_center; sp->low_freq = sp->high_freq = freq_table[note_to_use]; } sp->root_freq = w->sample_ratio; #ifdef FFFDEBUG printf("sample_rate %ld, low_freq %ld, high_freq %ld, root_freq %ld\n", sp->sample_rate, sp->low_freq, sp->high_freq, sp->root_freq); #endif sp->attenuation = 0x7f & (l->attenuation + w->attenuation); sp->panning = l->pan; for (v=ATTACK; vmodulation_rate[v]=0; sp->modulation_offset[v]=0; } sp->modulation_rate[DELAY] = sp->modulation_offset[DELAY] = 0; sp->modEnvToFilterFc=0; sp->modEnvToPitch=0; sp->resonance=0; sp->cutoff_freq=0; sp->reverberation=0; sp->chorusdepth=0; sp->exclusiveClass=0; sp->keyToModEnvHold=0; sp->keyToModEnvDecay=0; sp->keyToVolEnvHold=0; sp->keyToVolEnvDecay=0; sp->lfo_sweep_increment = 0; sp->lfo_phase_increment = 0; sp->modLfoToFilterFc = 0; sp->vibrato_delay = 0; if (!l->tremolo.freq || !l->tremolo.depth) { sp->tremolo_sweep_increment= sp->tremolo_phase_increment=sp->tremolo_depth=0; } else { sp->tremolo_sweep_increment=convert_tremolo_sweep(l->tremolo.sweep); sp->tremolo_phase_increment=convert_tremolo_rate(l->tremolo.freq/4); sp->tremolo_depth=l->tremolo.depth; } if (!l->vibrato.freq || !l->vibrato.depth) { sp->vibrato_sweep_increment= sp->vibrato_control_ratio=sp->vibrato_depth=0; } else { sp->vibrato_control_ratio=convert_vibrato_rate(l->vibrato.freq/4); sp->vibrato_sweep_increment= convert_vibrato_sweep(l->vibrato.sweep, (int32)sp->vibrato_control_ratio); sp->vibrato_depth=l->vibrato.depth; } mode = MODES_ENVELOPE; if (e->mode == 2) mode |= MODES_SUSTAIN; else if (e->mode == 1) mode |= MODES_FAST_RELEASE; if (!(w->format & 1)) mode |= MODES_16BIT; if (!(w->format & 2)) mode |= MODES_UNSIGNED; /* bit pos. for REVERSE and PINGPONG are inverted ? */ if (!(w->format & 4)) mode |= MODES_REVERSE; if (w->format & 8) mode |= MODES_LOOPING; if (w->format & 16) mode |= MODES_PINGPONG; if (w->format & 32) { fprintf(stderr, "can't handle uLaw wave data\n"); #ifdef ADAGIO gus_voice[tpgm].loaded = 0; #endif return(0); } sp->modes = mode; /** I think it's better to adjust the envelopes, somehow. Now, loops and envelopes are only stripped by specific request in config file. if (note_to_use >= 0) { strip_loop = 1; strip_envelope = 1; } **/ #define STRIP_PERCUSSION #ifdef ADAGIO #ifndef STRIP_PERCUSSION strip_loop = strip_envelope = strip_tail = 0; #endif if (!i && current_side == LEFT_SIDE) { gus_voice[tpgm].vibrato_sweep = l->vibrato.sweep; gus_voice[tpgm].vibrato_rate = l->vibrato.freq; gus_voice[tpgm].vibrato_depth = l->vibrato.depth; if (!newmode) gus_voice[tpgm].modes = sp->modes; } if (newmode) sp->modes = newmode; amp = gus_voice[tpgm].volume; if (gus_voice[tpgm].strip & LOOPS_FLAG) strip_loop = 1; if (gus_voice[tpgm].strip & ENVELOPE_FLAG) strip_envelope = 1; if (gus_voice[tpgm].strip & TAIL_FLAG) strip_tail = 1; if (gus_voice[tpgm].keep & LOOPS_FLAG) strip_loop = 0; if (gus_voice[tpgm].keep & ENVELOPE_FLAG) strip_envelope = 0; if (gus_voice[tpgm].keep & TAIL_FLAG) strip_tail = 0; #endif /* ADAGIO */ /* next is taken literally from timidity routine */ /* Mark this as a fixed-pitch instrument if such a deed is desired. */ if (note_to_use!=-1) sp->note_to_use=(uint8)(note_to_use); else sp->note_to_use=0; /* seashore.pat in the Midia patch set has no Sustain. I don't understand why, and fixing it by adding the Sustain flag to all looped patches probably breaks something else. We do it anyway. */ #if 0 if (sp->modes & MODES_LOOPING) sp->modes |= MODES_SUSTAIN; #endif /** debug -- How is strip_loop set to 1 here??? **/ /**if (!percussion) strip_loop = 0;*/ /* if (sp->loop_start < 0) strip_loop = 1; */ if (sp->loop_end > sp->data_length) strip_loop = 1; if (sp->loop_start >= sp->loop_end) strip_loop = 1; if (!percussion && strip_loop == 1) { fprintf(stderr, "loop start %lu, loop end %lu, datalength %lu\n", sp->loop_start, sp->loop_end, sp->data_length); } /* Strip any loops and envelopes we're permitted to */ if ((strip_loop==1) && (sp->modes & (MODES_SUSTAIN | MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE))) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Removing loop and/or sustain"); sp->modes &=~(MODES_SUSTAIN | MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE); } if (strip_envelope==1) { if (sp->modes & MODES_ENVELOPE) ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Removing envelope"); sp->modes &= ~MODES_ENVELOPE; } else if (strip_envelope != 0) { /* Have to make a guess. */ if (!(sp->modes & (MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE))) { /* No loop? Then what's there to sustain? No envelope needed either... */ sp->modes &= ~(MODES_SUSTAIN|MODES_ENVELOPE); ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - No loop, removing sustain and envelope"); } #ifndef ADAGIO else if (!(sp->modes & MODES_SUSTAIN)) { /* No sustain? Then no envelope. I don't know if this is justified, but patches without sustain usually don't need the envelope either... at least the Gravis ones. They're mostly drums. I think. */ sp->modes &= ~MODES_ENVELOPE; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - No sustain, removing envelope"); } #endif /* ADAGIO */ } #define ENV_FS #define MIR_R 40 /*#define MIR_R 40*/ /* Magic Increase Release_Rate */ { /* Take up to 6 rate/offset pairs from envelope points; * if there are fewer than 6, go to offset=8 at the specified * release rate + an ad hoc adjustment MIR_R to speed up * percussion releases. */ int j, k, na, nr, so, sr; na = e->envp_records[v].nattack; nr = e->envp_records[v].nrelease; so = e->envp_records[v].sustain_offset; sr = e->envp_records[v].sustain_rate; j = 0; #ifdef NO_ENV_FILL if (na + nr < 2) sp->modes &= ~MODES_ENVELOPE; #endif if (!na) { sp->envelope_offset[j] = 255; sp->envelope_rate[j] = 63; j++; } else for (k = 0; k < na && j < 6; k++,j++) { sp->envelope_offset[j] = e->envp_records[v].envp_points_attack[k].offset; sp->envelope_rate[j] = e->envp_records[v].envp_points_attack[k].rate; } #ifdef ENV_FS for (; j < 3; j++) { sp->envelope_offset[j] = (na)? e->envp_records[v].envp_points_attack[na-1].offset : 245; sp->envelope_rate[j] = 193; } #endif if (!nr) { sp->envelope_offset[j] = 8; sp->envelope_rate[j] = 63; /* sp->envelope_rate[j] = 193 ; */ /*if (prog > 127) sp->envelope_rate[j] = 193; else sp->envelope_rate[j] = e->envp_records[v].sustain_rate;*/ j++; } else for (k = 0; k < nr && j < 6; k++,j++) { sp->envelope_offset[j] = e->envp_records[v].envp_points_release[k].offset; sp->envelope_rate[j] = e->envp_records[v].envp_points_release[k].rate; } #ifdef ENV_FS for (; j < 6; j++) { sp->envelope_offset[j] = (nr)? e->envp_records[v].envp_points_release[nr-1].offset : 8; /*sp->envelope_rate[j] = 193;*/ sp->envelope_rate[j] = 63; } #endif #define ZERO_OFFSET 8 #ifndef ENV_FS for (; j < 6; j++) { sp->envelope_offset[j] = ZERO_OFFSET; sp->envelope_rate[j] = e->envp_records[v].release_rate+MIR_R; } #endif #ifdef ADAGIO for (j = 0; j < 6; j++) { if (gus_voice[tpgm].keep & USEENV_FLAG) { sp->envelope_offset[j] = gus_voice[tpgm].envelope_offset[j]; sp->envelope_rate[j] = gus_voice[tpgm].envelope_rate[j]; } else if (!i && current_side == LEFT_SIDE) { gus_voice[tpgm].envelope_offset[j] = sp->envelope_offset[j]; gus_voice[tpgm].envelope_rate[j] = sp->envelope_rate[j]; } } #ifdef REV_E_ADJUST if (reverb && prog < 120) { int r = reverb; int dec = sp->envelope_rate[2]; r = (127 - r) / 6; if (r < 0) r = 0; if (r > 28) r = 28; r += dec & 0x3f; if (r > 63) r = 63; dec = (dec & 0xc0) | r; sp->envelope_rate[2] = dec; #if 0 r = reverb; if (r > 127) r = 127; if (prog < 120) sp->envelope_rate[3] = (2<<6) | (12 - (r>>4)); else if (prog > 127) sp->envelope_rate[1] = (3<<6) | (63 - (r>>1)); #endif } #endif /* REV_E_ADJUST */ #ifdef VOL_E_ADJUST #define VR_NUM 2 #define VR_DEN 3 for (j = 0; j < 6; j++) { int voff, poff; voff = sp->envelope_offset[j]; poff = 2 + main_volume + 63 + gus_voice[tpgm].volume / 2; voff = ((poff + VR_NUM*256) * voff + VR_DEN*128) / (VR_DEN*256); sp->envelope_offset[j] = voff; } #endif /* VOL_E_ADJUST */ #endif /* ADAGIO */ /******debug********* if (prog==67) for (j = 0; j < 6; j++) { printf("\t%d: rate %ld offset %ld\n", j, sp->envelope_rate[j], sp->envelope_offset[j]); } ******debug*********/ for (j = 0; j < 6; j++) { sp->envelope_offset[j] = convert_envelope_offset(sp->envelope_offset[j]); sp->envelope_rate[j] = (j<3)? convert_envelope_rate_attack(sp->envelope_rate[j], 11) : convert_envelope_rate(sp->envelope_rate[j]); } } sp->data = (sample_t *)safe_malloc( 2 * w->size ); if (lseek(f, (off_t)w->start, SEEK_SET) == -1) { perror("bad seek in data file"); #ifdef ADAGIO gus_voice[tpgm].loaded = 0; #endif return (0); } cnt = read(f, sp->data, 2 * w->size); #ifdef FFFDEBUG printf("read %d byte sample\n", cnt); #endif if (cnt != 2 * w->size) { perror("bad read of data file"); fprintf(stderr, "read %d bytes of desired %ld at offset %ld\n", cnt, 2 * w->size, w->start); #ifdef ADAGIO gus_voice[tpgm].loaded = 0; #endif return(0); } if (!(sp->modes & MODES_16BIT)) /* convert to 16-bit data */ { int32 i=sp->data_length; uint8 *cp=(uint8 *)(sp->data); uint16 *tmp,*new; tmp=new=safe_malloc(sp->data_length*2); while (i--) *tmp++ = (uint16)(*cp++) << 8; cp=(uint8 *)(sp->data); sp->data = (sample_t *)new; free(cp); sp->data_length *= 2; sp->loop_start *= 2; sp->loop_end *= 2; } #ifndef LITTLE_ENDIAN else /* convert to machine byte order */ { int32 i=w->size; int16 *tmp=(int16 *)sp->data,s; while (i--) { s=LE_SHORT(*tmp); *tmp++=s; } } #endif if (sp->modes & MODES_UNSIGNED) /* convert to signed data */ { int32 i=w->size; int16 *tmp=(int16 *)sp->data; while (i--) *tmp++ ^= 0x8000; } /* Reverse reverse loops and pass them off as normal loops */ if (sp->modes & MODES_REVERSE) { int32 t; /* The GUS apparently plays reverse loops by reversing the whole sample. We do the same because the GUS does not SUCK. */ t=sp->loop_start; sp->loop_start=sp->data_length - sp->loop_end; sp->loop_end=sp->data_length - t; sp->modes &= ~MODES_REVERSE; sp->modes |= MODES_LOOPING; /* just in case */ } /* If necessary do some anti-aliasing filtering */ if (antialiasing_allowed) antialiasing(sp,play_mode->rate); #ifdef ADJUST_SAMPLE_VOLUMES if (amp!=-1) sp->volume=(double)(amp) / 100.0; else { /* For Adagio, this adjustment is never done, now, since amp value is taken from * gus_voice value. Maybe I should change this back. */ /* Try to determine a volume scaling factor for the sample. This is a very crude adjustment, but things sound more balanced with it. Still, this should be a runtime option. */ int32 i=sp->data_length/2; int16 maxamp=0,a; int16 *tmp=(int16 *)sp->data; while (i--) { a=*tmp++; if (a<0) a=-a; if (a>maxamp) maxamp=a; } sp->volume=32768.0 / (double)(maxamp); ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * volume comp: %f", sp->volume); } #else if (amp!=-1) sp->volume=(double)(amp) / 100.0; else sp->volume=1.0; #endif /* Following keeps high 4 bits of fraction. */ /* Then fractional samples */ sp->data_length <<= FRACTION_BITS; sp->loop_start <<= FRACTION_BITS; sp->loop_end <<= FRACTION_BITS; /* Adjust for fractional loop points. This is a guess. Does anyone know what "fractions" really stands for? */ /* I think the low 4 bits of the fraction are always 0, but may as well * use them ... I have no idea what they're for, but information should * never be discarded. */ sp->loop_start |= (w->loopstart & 0x0F) << (FRACTION_BITS-4); sp->loop_end |= (w->loopend & 0x0F) << (FRACTION_BITS-4); /* If this instrument will always be played on the same note, and it's not looped, we can resample it now. */ if (sp->note_to_use && !(sp->modes & MODES_LOOPING)) pre_resample(sp); if (w->next_wave) w = w->next_wave; } /**if (!(play_mode->encoding & PE_MONO)) {**/ if (current_side == LEFT_SIDE && p->nlayers == 2 && l->next) { if (e->next) e = e->next; l = l->next; current_side = RIGHT_SIDE; goto other_side; } /* conceal the left/right distinction from timidity */ ip->samples = ip->left_samples; ip->sample = ip->left_sample; /**}**/ return(lp); } #ifdef ADAGIO #ifndef FFF_DISPLAY_ONLY int load_fff_gus_patch(int seq_fd, int prog, int tpgm, int reverb, int main_volume, int voicepan, int patch_mem_avail) { #ifdef NO_DEV_SEQUENCER return(0); #else extern int next_wave_prog; struct patch_info *patch; int cnt, i, bank, newmode; int amp=-1, note_to_use, strip_loop, strip_envelope, strip_tail; unsigned int mode; struct ptch_type *p; struct envp_type *e; struct layr_type *l; struct wave_type *w; int f, d_ix; int current_side = LEFT_SIDE; if (!(gus_voice[tpgm].keep & FFF_FLAG)) return(0); if (!(p=ptch[prog])) return(0); bank = gus_voice[tpgm].bank & 0x7f; newmode = gus_voice[tpgm].modes; while (p->bank != bank && p->next_bank) p = p->next_bank; if (p->bank != bank) return(0); if (prog < 128) note_to_use = prog; else note_to_use = prog - 128; d_ix = p->file_index; f = dat_opened[d_ix]; if (f < 0) return(0); if (!f) { f = open(dat_filename[d_ix], O_RDONLY, 0); dat_opened[d_ix] = f; if (f < 0) { perror(dat_filename[d_ix]); return(0); } } #ifdef FFFDEBUG printf("patch for prog %d, note %d:\n", prog, note); #endif e = p->envelope; l = p->layr; if (!l->nwaves) return(0); /************/ w = l->waves; for (i = 0, cnt = 0; i < l->nwaves; i++) { cnt += sizeof(*patch) + 2 * w->size; if (w->next_wave) w = w->next_wave; } if (p->nlayers == 2 && l->next) { if (e->next) e = e->next; l = l->next; w = l->waves; for (i = 0; i < l->nwaves; i++) { cnt += sizeof(*patch) + 2 * w->size; if (w->next_wave) w = w->next_wave; } } gus_voice[tpgm].mem_req = cnt; if (cnt + 100 > patch_mem_avail) return(0); e = p->envelope; l = p->layr; /************/ if (very_verbose) printf("Loading %s from %s\n", gus_voice[tpgm].vname, dat_filename[d_ix]); gus_voice[tpgm].loaded |= GUS_MASK; /* back here to load right part of a stereo patch */ other_side: if (current_side == LEFT_SIDE) { gus_voice[tpgm].prog = next_wave_prog; } else { gus_voice[tpgm].right_prog = next_wave_prog; } w = l->waves; for (i = 0; i < l->nwaves; i++) { int v; for (v = 0; v < l->nwaves && v < e->num_envelopes ; v++) if (e->envp_records[v].hirange >= w->high_note) break; patch = (struct patch_info *) malloc(sizeof(*patch) + 2 * w->size); patch->key = GUS_PATCH; patch->device_no = gus_dev; patch->instr_no = next_wave_prog; patch->len = 2 * w->size; /** patch->loop_start = 2 * (w->loopstart >> 8); patch->loop_end = 2 * (w->loopend >> 8); **/ patch->loop_start = 2 * (w->loopstart >> 4); patch->loop_end = 2 * (w->loopend >> 4); patch->fractions = (int)( (0x0f & (w->loopstart >> 4)) | (0xf0 & w->loopend) ); #ifdef FFFDEBUG printf("data_length %ld, loop_start %ld, loop_end %ld\n", patch->len, patch->loop_start, patch->loop_end); #endif patch->base_freq = 44100; patch->scale_frequency = l->freq_center; patch->scale_factor = l->freq_scale; if (prog > 127 && gus_voice[tpgm].fix_key) { patch->scale_factor = 0; note_to_use = patch->scale_frequency = gus_voice[tpgm].fix_key; } else if (!patch->scale_factor) gus_voice[tpgm].fix_key = patch->scale_frequency; if (prog > 127 && l->freq_scale == 1024) { /* for the SoundCanvas patch set, we should play the prog # */ patch->scale_factor = 0; patch->scale_frequency = note_to_use; } /* calculate this? driver doesn't use it */ patch->detuning = 0; if (patch->scale_factor) { note_to_use = -1; patch->low_note = freq_table[w->low_note]; patch->high_note = freq_table[w->high_note]; } else { /* for the time being, the note_to_play logic for percussion is disabled, * and freq for note will be determined by freq_center */ note_to_use = patch->scale_frequency; patch->low_note = patch->high_note = freq_table[note_to_use]; } patch->base_note = w->sample_ratio; #ifdef FFFDEBUG printf("sample_rate %ld, low_freq %ld, high_freq %ld, root_freq %ld\n", patch->base_freq, patch->low_note, patch->high_note, patch->base_note); #endif if (current_side == LEFT_SIDE) gus_voice[tpgm].attenuation = 0x7f & (l->attenuation + w->attenuation); else gus_voice[tpgm].right_attenuation = 0x7f & (l->attenuation + w->attenuation); patch->panning = 2*(l->pan - 64); patch->resonance=0; patch->cutoff_freq=0; patch->reverberation=0; patch->chorusdepth=0; patch->tremolo_sweep = l->tremolo.sweep; patch->tremolo_rate = l->tremolo.freq; patch->tremolo_depth = l->tremolo.depth; patch->vibrato_sweep = l->vibrato.sweep; patch->vibrato_rate = l->vibrato.freq; patch->vibrato_depth = l->vibrato.depth; mode = WAVE_ENVELOPES | WAVE_FRACTIONS | WAVE_VIBRATO | WAVE_TREMOLO | WAVE_SCALE; if (e->mode == 2) mode |= WAVE_SUSTAIN_ON; else if (e->mode == 1) mode |= WAVE_FAST_RELEASE; if (!(w->format & 1)) mode |= WAVE_16_BITS; if (!(w->format & 2)) mode |= WAVE_UNSIGNED; /* bit pos. for REVERSE and PINGPONG are inverted ? */ if (!(w->format & 4)) mode |= WAVE_LOOP_BACK; if (w->format & 8) mode |= WAVE_LOOPING; if (w->format & 16) mode |= WAVE_BIDIR_LOOP; if (w->format & 32) mode |= WAVE_MULAW; patch->mode = mode; strip_loop = strip_envelope = strip_tail = 0; if (!i && current_side == LEFT_SIDE) { gus_voice[tpgm].vibrato_sweep = l->vibrato.sweep; gus_voice[tpgm].vibrato_rate = l->vibrato.freq; gus_voice[tpgm].vibrato_depth = l->vibrato.depth; if (!newmode) gus_voice[tpgm].modes = patch->mode; } if (newmode) patch->mode = newmode; amp = gus_voice[tpgm].volume; /** if (gus_voice[tpgm].fix_key) { patch->scale_factor = 0; patch->scale_frequency = gus_voice[tpgm].fix_key; } **/ if (gus_voice[tpgm].strip & LOOPS_FLAG) strip_loop = 1; if (gus_voice[tpgm].strip & ENVELOPE_FLAG) strip_envelope = 1; if (gus_voice[tpgm].strip & TAIL_FLAG) strip_tail = 1; if (gus_voice[tpgm].keep & LOOPS_FLAG) strip_loop = 0; if (gus_voice[tpgm].keep & ENVELOPE_FLAG) strip_envelope = 0; if (gus_voice[tpgm].keep & TAIL_FLAG) strip_tail = 0; #ifndef MIR_R #define MIR_R 40 #endif /* Magic Increase Release_Rate */ { /* Take up to 6 rate/offset pairs from envelope points; * if there are fewer than 6, go to offset=8 at the specified * release rate + an ad hoc adjustment MIR_R to speed up * percussion releases. */ int j, k, na, nr, so, sr; #ifdef GVOL_E_ADJUST int voff, poff; #endif na = e->envp_records[v].nattack; nr = e->envp_records[v].nrelease; so = e->envp_records[v].sustain_offset; sr = e->envp_records[v].sustain_rate; j = 0; /*#if 0*/ for (k = 0; k < na && j < 6; k++,j++) { patch->env_offset[j] = e->envp_records[v].envp_points_attack[k].offset; patch->env_rate[j] = e->envp_records[v].envp_points_attack[k].rate; } for (k = 0; k < nr && j < 6; k++,j++) { patch->env_offset[j] = e->envp_records[v].envp_points_release[k].offset; patch->env_rate[j] = e->envp_records[v].envp_points_release[k].rate; } for (; j < 6; j++) { patch->env_offset[j] = 8; patch->env_rate[j] = e->envp_records[v].release_rate+MIR_R; } /*#endif*/ #if 0 #ifdef NO_ENV_FILL if (na + nr < 2) patch->mode &= ~WAVE_ENVELOPES; #endif if (!na) { patch->env_offset[j] = 255; patch->env_rate[j] = 63; j++; } else for (k = 0; k < na && j < 6; k++,j++) { patch->env_offset[j] = e->envp_records[v].envp_points_attack[k].offset; patch->env_rate[j] = e->envp_records[v].envp_points_attack[k].rate; } #ifdef ENV_FS for (; j < 3; j++) { patch->env_offset[j] = (na)? e->envp_records[v].envp_points_attack[na-1].offset : 245; patch->env_rate[j] = 193; } #endif if (!nr) { patch->env_offset[j] = 8; /*patch->env_rate[j] = 193;*/ if (prog > 127) patch->env_rate[j] = 193; else patch->env_rate[j] = e->envp_records[v].sustain_rate; j++; } else for (k = 0; k < nr && j < 6; k++,j++) { patch->env_offset[j] = e->envp_records[v].envp_points_release[k].offset; patch->env_rate[j] = e->envp_records[v].envp_points_release[k].rate; } #ifdef ENV_FS for (; j < 6; j++) { patch->env_offset[j] = (nr)? e->envp_records[v].envp_points_release[nr-1].offset : 8; patch->env_rate[j] = 193; } #endif #ifndef ENV_FS #define ZERO_OFFSET 8 for (; j < 6; j++) { patch->env_offset[j] = ZERO_OFFSET; patch->env_rate[j] = e->envp_records[v].release_rate+MIR_R; } #endif for (j = 0; j < 6; j++) { if (gus_voice[tpgm].keep & USEENV_FLAG) { patch->env_offset[j] = gus_voice[tpgm].envelope_offset[j]; patch->env_rate[j] = gus_voice[tpgm].envelope_rate[j]; } else if (!i && current_side == LEFT_SIDE) { gus_voice[tpgm].envelope_offset[j] = patch->env_offset[j]; gus_voice[tpgm].envelope_rate[j] = patch->env_rate[j]; } } #ifdef GREV_E_ADJUST if (reverb) { int r = reverb; int dec = patch->env_rate[2]; r = (127 - r) / 6; if (r < 0) r = 0; if (r > 28) r = 28; r += dec & 0x3f; if (r > 63) r = 63; dec = (dec & 0xc0) | r; patch->env_rate[2] = dec; r = reverb; if (r > 127) r = 127; if (prog < 120) patch->env_rate[3] = (2<<6) | (12 - (r>>4)); else if (prog > 127) patch->env_rate[1] = (3<<6) | (63 - (r>>1)); } #endif #ifdef GVOL_E_ADJUST #ifndef VR_NUMG #define VR_NUMG 3 #define VR_DENG 5 #endif for (j = 0; j < 6; j++) { voff = patch->env_offset[j]; poff = 2 + main_volume + 63 + gus_voice[tpgm].volume / 2; voff = ((poff + VR_NUMG*256) * voff + VR_DENG*128) / (VR_DENG*256); patch->env_offset[j] = voff; } #endif #endif /* #if 0 */ } patch->volume = (int)gus_voice[tpgm].volume; if (lseek(f, (off_t)w->start, SEEK_SET) == -1) { perror("bad seek in data file"); gus_voice[tpgm].loaded = 0; return (0); } cnt = read(f, patch->data, 2 * w->size); #ifdef FFFDEBUG printf("read %d byte sample\n", cnt); #endif if (cnt != 2 * w->size) { perror("bad read of data file"); gus_voice[tpgm].loaded = 0; return(0); } if (write(seq_fd, (char *) patch, sizeof(*patch) + patch->len) == -1) { free(patch); fprintf(stderr, "couldn't send fff patch to gus\n"); gus_voice[tpgm].loaded = 0; return (0); } /* patch_mem_used += patch->len; */ free(patch); if (w->next_wave) w = w->next_wave; } next_wave_prog++; if (current_side == LEFT_SIDE && p->nlayers == 2 && l->next) { if (e->next) e = e->next; l = l->next; current_side = RIGHT_SIDE; goto other_side; } return(1); #endif /* !NO_DEV_SEQUENCER */ } #endif #endif /* ADAGIO */ #endif alsaplayer-0.99.82/attic/midi/filter.c000066400000000000000000000130711466261456500175400ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * filter.c: written by Vincent Pagel ( pagel@loria.fr ) implements fir antialiasing filter : should help when setting sample rates as low as 8Khz. April 95 - first draft 22/5/95 - modify "filter" so that it simulate leading and trailing 0 in the buffer */ #include #include #include #include #include "gtim.h" #include "common.h" #include "controls.h" #include "instrum.h" #include "filter.h" /* bessel function */ static float ino(float x) { float y, de, e, sde; int i; y = x / 2; e = 1.0; de = 1.0; i = 1; do { de = de * y / (float) i; sde = de * de; e += sde; } while (!( (e * 1.0e-08 - sde > 0) || (i++ > 25) )); return(e); } /* Kaiser Window (symetric) */ static void kaiser(float *w,int n,float beta) { float xind, xi; int i; xind = (2*n - 1) * (2*n - 1); for (i =0; i apply the filter given by coef[] to the data buffer * Note that we simulate leading and trailing 0 at the border of the * data buffer */ static void filter(sample_t *result,sample_t *data, int32 length,float coef[]) { int32 sample,i,sample_window; int16 peak = 0; float sum; /* Simulate leading 0 at the begining of the buffer */ for (sample = 0; sample < ORDER2 ; sample++ ) { sum = 0.0; sample_window= sample - ORDER2; for (i = 0; i < ORDER ;i++) sum += coef[i] * ((sample_window<0)? 0.0 : data[sample_window++]) ; /* Saturation ??? */ if (sum> 32767.) { sum=32767.; peak++; } if (sum< -32768.) { sum=-32768; peak++; } result[sample] = (sample_t) sum; } /* The core of the buffer */ for (sample = ORDER2; sample < length - ORDER + ORDER2 ; sample++ ) { sum = 0.0; sample_window= sample - ORDER2; for (i = 0; i < ORDER ;i++) sum += data[sample_window++] * coef[i]; /* Saturation ??? */ if (sum> 32767.) { sum=32767.; peak++; } if (sum< -32768.) { sum=-32768; peak++; } result[sample] = (sample_t) sum; } /* Simulate 0 at the end of the buffer */ for (sample = length - ORDER + ORDER2; sample < length ; sample++ ) { sum = 0.0; sample_window= sample - ORDER2; for (i = 0; i < ORDER ;i++) sum += coef[i] * ((sample_window>=length)? 0.0 : data[sample_window++]) ; /* Saturation ??? */ if (sum> 32767.) { sum=32767.; peak++; } if (sum< -32768.) { sum=-32768; peak++; } result[sample] = (sample_t) sum; } if (peak) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Saturation %2.3f %%.", 100.0*peak/ (float) length); } /***********************************************************************/ /* Prevent aliasing by filtering any freq above the output_rate */ /* */ /* I don't worry about looping point -> they will remain soft if they */ /* were already */ /***********************************************************************/ void antialiasing(Sample *sp, uint32 output_rate ) { sample_t *temp; int i; float fir_symetric[ORDER]; float fir_coef[ORDER2]; float freq_cut; /* cutoff frequency [0..1.0] FREQ_CUT/SAMP_FREQ*/ ctl->cmsg(CMSG_INFO, VERB_DEBUG, "Antialiasing: Fsample=%iKHz", sp->sample_rate); /* No oversampling */ if (output_rate>=sp->sample_rate) return; freq_cut= (float) output_rate / (float) sp->sample_rate; ctl->cmsg(CMSG_INFO, VERB_DEBUG, "Antialiasing: cutoff=%f%%", freq_cut*100.); designfir(fir_coef,freq_cut); /* Make the filter symetric */ for (i = 0 ; idata_length); memcpy(temp,sp->data,sp->data_length); filter(sp->data,temp,sp->data_length/sizeof(sample_t),fir_symetric); free(temp); } alsaplayer-0.99.82/attic/midi/filter.h000066400000000000000000000023441466261456500175460ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * filter.h : written by Vincent Pagel ( pagel@loria.fr ) implements fir antialiasing filter : should help when setting sample rates as low as 8Khz. */ /* Order of the FIR filter = 20 should be enough ! */ #define ORDER 20 #define ORDER2 ORDER/2 #ifndef PI #define PI 3.14159265 #endif extern void antialiasing(Sample *sp, uint32 output_rate); alsaplayer-0.99.82/attic/midi/gtim.h000066400000000000000000000305351466261456500172240ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include "config.h" #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef HAVE_STRING_H #define NO_STRING_H #endif #ifndef TIMID_DIR #ifdef DEFAULT_PATH #define TIMID_DIR DEFAULT_PATH #else #define TIMID_DIR "/usr/local/lib/timidity" #endif #endif /* Enable extensions taken from TiMidity++ */ #define tplus /* Enable Nicolas Witczak's effects processing */ /*#define CHANNEL_EFFECT*/ /* Filename extension, followed by command to run decompressor so that output is written to stdout. Terminate the list with a 0. Any file with a name ending in one of these strings will be run through the corresponding decompressor. If you don't like this behavior, you can undefine DECOMPRESSOR_LIST to disable automatic decompression entirely. This is currently ignored for Win32. */ #define DECOMPRESSOR_LIST { \ ".gz", "gunzip -c %s", \ ".Z", "zcat %s", \ ".zip", "unzip -p %s", \ ".lha", "lha -pq %s", \ ".lzh", "lha -pq %s", \ ".shn", "shorten -x %s -", \ ".wav", "wav2pat %s", \ 0 } /* When a patch file can't be opened, one of these extensions is appended to the filename and the open is tried again. This is ignored for Win32, which uses only ".pat" (see the bottom of this file if you need to change this.) */ #define PATCH_EXT_LIST { \ ".pat", \ ".shn", ".pat.shn", \ ".gz", ".pat.gz", \ 0 } /* Acoustic Grand Piano seems to be the usual default instrument. */ #define DEFAULT_PROGRAM 0 /* 9 here is MIDI channel 10, which is the standard percussion channel. Some files (notably C:\WINDOWS\CANYON.MID) think that 16 is one too. On the other hand, some files know that 16 is not a drum channel and try to play music on it. This is now a runtime option, so this isn't a critical choice anymore. */ #define DEFAULT_DRUMCHANNELS (1<<9) /*#define DEFAULT_DRUMCHANNELS ((1<<9) | (1<<15))*/ /* type of floating point number */ typedef double FLOAT_T; /* typedef float FLOAT_T; */ /* A somewhat arbitrary frequency range. The low end of this will sound terrible as no lowpass filtering is performed on most instruments before resampling. */ #define MIN_OUTPUT_RATE 4000 #define MAX_OUTPUT_RATE 65000 /* In percent. */ #ifndef DEFAULT_AMPLIFICATION #define DEFAULT_AMPLIFICATION 70 #endif /* Default sampling rate, default polyphony, and maximum polyphony. All but the last can be overridden from the command line. */ #ifndef DEFAULT_RATE /*#define DEFAULT_RATE 32000*/ #define DEFAULT_RATE 44100 #endif #ifndef DEFAULT_VOICES #ifdef ADAGIO #define DEFAULT_VOICES DEFAULT_DSPVOICES #else #define DEFAULT_VOICES 256 #endif #endif #ifndef MAX_VOICES #ifdef ADAGIO /* Should check this. MAX_DSPVOICES should be the number of Timidity "channels", but the maximum number of polyphonic voices playing simultaneously should be larger. Now the two maxima are treated the same. */ #define MAX_VOICES MAX_DSPVOICES #else #define MAX_VOICES 256 #endif #endif /* The size of the internal buffer is 2^AUDIO_BUFFER_BITS samples. This determines maximum number of samples ever computed in a row. For Linux and FreeBSD users: This also specifies the size of the buffer fragment. A smaller fragment gives a faster response in interactive mode -- 10 or 11 is probably a good number. Unfortunately some sound cards emit a click when switching DMA buffers. If this happens to you, try increasing this number to reduce the frequency of the clicks. For other systems: You should probably use a larger number for improved performance. */ #define AUDIO_BUFFER_BITS 10 /* 1000 here will give a control ratio of 22:1 with 22 kHz output. Higher CONTROLS_PER_SECOND values allow more accurate rendering of envelopes and tremolo. The cost is CPU time. */ /*#define CONTROLS_PER_SECOND 1000*/ #define CONTROLS_PER_SECOND 2000 /* Make envelopes twice as fast. Saves ~20% CPU time (notes decay faster) and sounds more like a GUS. There is now a command line option to toggle this as well. */ /*#define FAST_DECAY*/ /* How many bits to use for the fractional part of sample positions. This affects tonal accuracy. The entire position counter must fit in 32 bits, so with FRACTION_BITS equal to 12, the maximum size of a sample is 1048576 samples (2 megabytes in memory). The GUS gets by with just 9 bits and a little help from its friends... "The GUS does not SUCK!!!" -- a happy user :) */ /* #define FRACTION_BITS 12 */ #define FRACTION_BITS 13 /* For some reason the sample volume is always set to maximum in all patch files. Define this for a crude adjustment that may help equalize instrument volumes. */ #define ADJUST_SAMPLE_VOLUMES /* If you have root access, you can define DANGEROUS_RENICE and chmod timidity setuid root to have it automatically raise its priority when run -- this may make it possible to play MIDI files in the background while running other CPU-intensive jobs. Of course no amount of renicing will help if the CPU time simply isn't there. The root privileges are used and dropped at the beginning of main() in timidity.c -- please check the code to your satisfaction before using this option. (And please check sections 11 and 12 in the GNU General Public License (under GNU Emacs, hit ^H^W) ;) */ /* #define DANGEROUS_RENICE -15 */ /* The number of samples to use for ramping out a dying note. Affects click removal. */ #define MAX_DIE_TIME 20 /* On some machines (especially PCs without math coprocessors), looking up sine values in a table will be significantly faster than computing them on the fly. Uncomment this to use lookups. */ /* #define LOOKUP_SINE */ /* If calling ldexp() is faster than a floating point multiplication on your machine/compiler/libm, uncomment this. It doesn't make much difference either way, but hey -- it was on the TODO list, so it got done. */ /* #define USE_LDEXP */ /**************************************************************************/ /* Anything below this shouldn't need to be changed unless you're porting to a new machine with other than 32-bit, big-endian words. */ /**************************************************************************/ /* change FRACTION_BITS above, not these */ #define INTEGER_BITS (32 - FRACTION_BITS) #define INTEGER_MASK (0xFFFFFFFF << FRACTION_BITS) #define FRACTION_MASK (~ INTEGER_MASK) /* This is enforced by some computations that must fit in an int */ #define MAX_CONTROL_RATIO 255 /* Audio buffer size has to be a power of two to allow DMA buffer fragments under the VoxWare (Linux & FreeBSD) audio driver */ #define AUDIO_BUFFER_SIZE (1< for FreeBSD and DEC OSF/1 */ #ifdef __osf__ #include #endif #ifdef __linux__ /* * Byte order is defined in as __BYTE_ORDER, that need to * be checked against __LITTLE_ENDIAN and __BIG_ENDIAN defined in * includes automagically * for Linux. */ #include /* * We undef the two things to start with a clean situation * (oddly enough, defines under certain conditions * the two things below, as __LITTLE_ENDIAN and __BIG_ENDIAN, that * are useless for our plans) */ #undef LITTLE_ENDIAN #undef BIG_ENDIAN # if __BYTE_ORDER == __LITTLE_ENDIAN # define LITTLE_ENDIAN # elif __BYTE_ORDER == __BIG_ENDIAN # define BIG_ENDIAN # else # error No byte sex defined # endif # include # if (__GLIBC__ >= 2) # include /* needed for glibc 2 */ # include # define PI M_PI # include # endif #endif /* linux */ #if defined(__FreeBSD__) || defined(__NetBSD__) #include #include #include #if BYTE_ORDER == LITTLE_ENDIAN #undef BIG_ENDIAN #undef PDP_ENDIAN #elif BYTE_ORDER == BIG_ENDIAN #undef LITTLE_ENDIAN #undef PDP_ENDIAN #else # error No valid byte sex defined #endif #define USE_LDEXP #define PI M_PI #endif /* __FreeBSD__ */ #ifdef _UNIXWARE #undef BIG_ENDIAN #define LITTLE_ENDIAN #endif /* Win32 on Intel machines */ #ifdef __WIN32__ # define LITTLE_ENDIAN #endif /* DEC MMS has 64 bit long words */ #ifdef __osf__ typedef unsigned int uint32; typedef int int32; #else typedef unsigned long uint32; typedef long int32; #endif typedef unsigned short uint16; typedef short int16; typedef unsigned char uint8; typedef char int8; /* Instrument files are little-endian, MIDI files big-endian, so we need to do some conversions. */ #define XCHG_SHORT(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF)) #ifdef __i486__ # define XCHG_LONG(x) \ ({ int32 __value; \ asm ("bswap %1; movl %1,%0" : "=g" (__value) : "r" (x)); \ __value; }) #else # define XCHG_LONG(x) ((((x)&0xFF)<<24) | \ (((x)&0xFF00)<<8) | \ (((x)&0xFF0000)>>8) | \ (((x)>>24)&0xFF)) #endif #ifdef LITTLE_ENDIAN #define LE_SHORT(x) x #define LE_LONG(x) x #ifdef __FreeBSD__ #define BE_SHORT(x) __byte_swap_word(x) #define BE_LONG(x) __byte_swap_long(x) #else #define BE_SHORT(x) XCHG_SHORT(x) #define BE_LONG(x) XCHG_LONG(x) #endif #else #define BE_SHORT(x) x #define BE_LONG(x) x #ifdef __FreeBSD__ #define LE_SHORT(x) __byte_swap_word(x) #define LE_LONG(x) __byte_swap_long(x) #else #define LE_SHORT(x) XCHG_SHORT(x) #define LE_LONG(x) XCHG_LONG(x) #endif #endif #define MAX_AMPLIFICATION 800 /* You could specify a complete path, e.g. "/etc/timidity.cfg", and then specify the library directory in the configuration file. */ #ifndef CONFIG_FILE #define CONFIG_FILE DEFAULT_PATH##"/timidity.cfg" #endif /* These affect general volume */ #define GUARD_BITS 3 #define AMP_BITS (15-GUARD_BITS) #ifdef LOOKUP_HACK typedef int8 sample_t; typedef uint8 final_volume_t; # define FINAL_VOLUME(v) (~_l2u[v]) # define MIXUP_SHIFT 5 # define MAX_AMP_VALUE 4095 #else typedef int16 sample_t; typedef int32 final_volume_t; # define FINAL_VOLUME(v) (v) # define MAX_AMP_VALUE ((1<<(AMP_BITS+1))-1) #endif #ifdef tplus /* #define MIN_AMP_VALUE (MAX_AMP_VALUE >> 9) */ #define MIN_AMP_VALUE (MAX_AMP_VALUE >> 10) #endif #ifdef USE_LDEXP # define FRSCALE(a,b) ldexp((double)(a),(b)) # define FRSCALENEG(a,b) ldexp((double)(a),-(b)) #else # define FRSCALE(a,b) ((a) * (double)(1<<(b))) # define FRSCALENEG(a,b) ((a) * (1.0L / (double)(1<<(b)))) #endif /* Vibrato and tremolo Choices of the Day */ #define SWEEP_TUNING 38 #define VIBRATO_AMPLITUDE_TUNING 1.0L #define VIBRATO_RATE_TUNING 38 #define TREMOLO_AMPLITUDE_TUNING 1.0L #define TREMOLO_RATE_TUNING 38 #define SWEEP_SHIFT 16 #define RATE_SHIFT 5 #define VIBRATO_SAMPLE_INCREMENTS 32 #ifdef tplus #define MODULATION_WHEEL_RATE (1.0/6.0) #define VIBRATO_DEPTH_TUNING (1.0/4.0) #endif #if defined(hpux) || defined(__hpux) extern char *sys_errlist[]; #define PI 3.14159265358979323846 #endif #ifdef sun #ifdef HAVE_SYS_STDTYPES_H #include #endif #include extern char *sys_errlist[]; extern int opterr; extern int optind; extern int optopt; extern char *optarg; #define PI 3.14159265358979323846 #define rindex(s,c) strrchr(s,c) #endif #ifdef _UNIXWARE extern char *sys_errlist[]; #include #define PI M_PI #include #endif /* The path separator (D.M.) */ # define PATH_SEP '/' # define PATH_STRING "/" #ifdef __osf__ #include #define PI 3.14159265358979323846 #endif #ifdef __FreeBSD__ #include #ifndef PI #define PI M_PI #endif #endif #ifdef _SCO_DS #include #ifndef PI #define PI M_PI #endif #endif alsaplayer-0.99.82/attic/midi/instrum.c000066400000000000000000000743361466261456500177670ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * instrum.c Code to load and unload GUS-compatible instrument patches. */ #include #ifndef NO_STRING_H #include #else #include #endif #if defined(__FreeBSD__) || defined (__WIN32__) #include #else #include #endif #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "controls.h" #include "resample.h" #include "tables.h" #include "filter.h" /* Some functions get aggravated if not even the standard banks are available. */ #ifndef ADAGIO static ToneBank standard_tonebank, standard_drumset; #else /* ADAGIO */ static ToneBank standard_tonebank; #endif /* ADAGIO */ ToneBank #ifndef ADAGIO *tonebank[MAXBANK]={&standard_tonebank}, *drumset[MAXBANK]={&standard_drumset}; #else /* ADAGIO */ *tonebank[1]={&standard_tonebank}; #endif /* ADAGIO */ /* This is a special instrument, used for all melodic programs */ InstrumentLayer *default_instrument=0; /* This is only used for tracks that don't specify a program */ int default_program=DEFAULT_PROGRAM; int antialiasing_allowed=0; #ifdef FAST_DECAY int fast_decay=1; #else int fast_decay=0; #endif int current_tune_number = 0; int last_tune_purged = 0; int current_patch_memory = 0; int max_patch_memory = 60000000; static void purge_as_required(void); static void free_instrument(Instrument *ip) { Sample *sp; int i; if (!ip) return; if (!ip->contents) for (i=0; isamples; i++) { sp=&(ip->sample[i]); if (sp->data) free(sp->data); } free(ip->sample); if (!ip->contents) for (i=0; iright_samples; i++) { sp=&(ip->right_sample[i]); if (sp->data) free(sp->data); } if (ip->right_sample) free(ip->right_sample); free(ip); } static void free_layer(InstrumentLayer *lp) { InstrumentLayer *next; current_patch_memory -= lp->size; #ifdef DEBUG_MEM_PATCH ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "-mem %d (freed %d)", current_patch_memory, lp->size); #endif for (; lp; lp = next) { next = lp->next; free_instrument(lp->instrument); free(lp); } } #ifndef ADAGIO static void free_bank(int dr, int b) #else /* ADAGIO */ static void free_bank(int b) #endif /* ADAGIO */ { int i; #ifndef ADAGIO ToneBank *bank=((dr) ? drumset[b] : tonebank[b]); for (i=0; itone[i].layer) { /* Not that this could ever happen, of course */ if (bank->tone[i].layer != MAGIC_LOAD_INSTRUMENT) { free_layer(bank->tone[i].layer); bank->tone[i].layer=0; bank->tone[i].last_used=-1; } } } static void free_old_bank(int dr, int b, int how_old) { int i; ToneBank *bank=((dr) ? drumset[b] : tonebank[b]); for (i=0; itone[i].layer && bank->tone[i].last_used < how_old) { if (bank->tone[i].layer != MAGIC_LOAD_INSTRUMENT) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, "Unloading %s %s[%d,%d] - last used %d.", (dr)? "drum" : "inst", bank->tone[i].name, i, b, bank->tone[i].last_used); free_layer(bank->tone[i].layer); bank->tone[i].layer=0; bank->tone[i].last_used=-1; } } } int32 convert_envelope_rate_attack(uint8 rate, uint8 fastness) { int32 r; r=3-((rate>>6) & 0x3); r*=3; r = (int32)(rate & 0x3f) << r; /* 6.9 fixed point */ /* 15.15 fixed point. */ return (((r * 44100) / play_mode->rate) * control_ratio) << 10; #if 0 << fastness; #endif } int32 convert_envelope_rate(uint8 rate) { int32 r; r=3-((rate>>6) & 0x3); r*=3; r = (int32)(rate & 0x3f) << r; /* 6.9 fixed point */ /* 15.15 fixed point. */ return (((r * 44100) / play_mode->rate) * control_ratio) << ((fast_decay) ? 10 : 9); } int32 convert_envelope_offset(uint8 offset) { /* This is not too good... Can anyone tell me what these values mean? Are they GUS-style "exponential" volumes? And what does that mean? */ /* 15.15 fixed point */ return offset << (7+15); } int32 convert_tremolo_sweep(uint8 sweep) { if (!sweep) return 0; #if 0 printf("tremolo sweep %d -> %d\n", (int)sweep, ((control_ratio * SWEEP_TUNING) << SWEEP_SHIFT) / (play_mode->rate * sweep) ); #endif return ((control_ratio * SWEEP_TUNING) << SWEEP_SHIFT) / (play_mode->rate * sweep); } int32 convert_vibrato_sweep(uint8 sweep, int32 vib_control_ratio) { if (!sweep) return 0; #if 0 printf("vibrato sweep %d (vcr %d) -> %d\n", (int)sweep, (int)vib_control_ratio, (int) (FRSCALE((double) (vib_control_ratio) * SWEEP_TUNING, SWEEP_SHIFT) / (double)(play_mode->rate * sweep)) ); #endif return (int32) (FRSCALE((double) (vib_control_ratio) * SWEEP_TUNING, SWEEP_SHIFT) / (double)(play_mode->rate * sweep)); /* this was overflowing with seashore.pat ((vib_control_ratio * SWEEP_TUNING) << SWEEP_SHIFT) / (play_mode->rate * sweep); */ } int32 convert_tremolo_rate(uint8 rate) { #if 0 printf("tremolo rate %d -> %d\n", (int)rate, ((SINE_CYCLE_LENGTH * control_ratio * rate) << RATE_SHIFT) / (TREMOLO_RATE_TUNING * play_mode->rate) ); #endif return ((SINE_CYCLE_LENGTH * control_ratio * rate) << RATE_SHIFT) / (TREMOLO_RATE_TUNING * play_mode->rate); } int32 convert_vibrato_rate(uint8 rate) { #if 0 printf("vibrato rate %d -> %d\n", (int)rate, (VIBRATO_RATE_TUNING * play_mode->rate) / (rate * 2 * VIBRATO_SAMPLE_INCREMENTS) ); #endif /* Return a suitable vibrato_control_ratio value */ return (VIBRATO_RATE_TUNING * play_mode->rate) / (rate * 2 * VIBRATO_SAMPLE_INCREMENTS); } static void reverse_data(int16 *sp, int32 ls, int32 le) { int16 s, *ep=sp+le; sp+=ls; le-=ls; le/=2; while (le--) { s=*sp; *sp++=*ep; *ep--=s; } } /* If panning or note_to_use != -1, it will be used for all samples, instead of the sample-specific values in the instrument file. For note_to_use, any value <0 or >127 will be forced to 0. For other parameters, 1 means yes, 0 means no, other values are undefined. TODO: do reverse loops right */ static InstrumentLayer *load_instrument(const char *name, int font_type, int percussion, int panning, int amp, int cfg_tuning, int note_to_use, int strip_loop, int strip_envelope, #ifndef ADAGIO int strip_tail, int bank, int gm_num, int sf_ix) #else /* ADAGIO */ int strip_tail, int gm_num, int tpgm, int reverb, int main_volume) #endif /* ADAGIO */ { InstrumentLayer *lp; Instrument *ip; Sample *sp; FILE *fp; uint8 tmp[1024]; char tmpbuf[1024]; int i,j,noluck=0; #ifdef PATCH_EXT_LIST static const char *patch_ext[] = PATCH_EXT_LIST; #endif #ifdef ADAGIO int newmode; extern InstrumentLayer *load_fff_patch(int, int, int, int); extern InstrumentLayer *load_sbk_patch(int, int, int, int, int, int); extern int next_wave_prog; if (gm_num >= 0) { if ((lp = load_fff_patch(gm_num, tpgm, reverb, main_volume))) return(lp); if ((lp = load_sbk_patch(0, gm_num, tpgm, reverb, main_volume))) return(lp); } #else if (gm_num >= 0) { #ifdef FFF_HAS_BEEN_FIXED if (font_type == FONT_FFF && (lp = load_fff_patch(name, gm_num, bank, percussion, panning, amp, note_to_use, strip_loop, strip_envelope, strip_tail))) return(lp); #endif if (font_type == FONT_SBK && (lp = load_sbk_patch(name, gm_num, bank, percussion, panning, amp, note_to_use, sf_ix))) return(lp); } #endif if (check_for_rc()) return 0; if (!name) return 0; /* Open patch file */ if (!(fp=open_file(name, 1, OF_NORMAL, 0))) { noluck=1; #ifdef PATCH_EXT_LIST /* Try with various extensions */ for (i=0; patch_ext[i]; i++) { if (strlen(name)+strlen(patch_ext[i])<1024) { strcpy(tmpbuf, name); strcat(tmpbuf, patch_ext[i]); if ((fp=open_file(tmpbuf, 1, OF_NORMAL, 0))) { noluck=0; break; } } } #endif } if (noluck) { ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Instrument `%s' can't be found.", name); #ifdef ADAGIO gus_voice[tpgm].volume = DOES_NOT_EXIST; #endif return 0; } /*ctl->cmsg(CMSG_INFO, VERB_NOISY, "Loading instrument %s", current_filename); */ ctl->cmsg(CMSG_INFO, VERB_NOISY, "%s%s[%d,%d]", percussion? " " : "", name, (percussion)? note_to_use : gm_num, bank); /* Read some headers and do cursory sanity checks. There are loads of magic offsets. This could be rewritten... */ if ((239 != fread(tmp, 1, 239, fp)) || (memcmp(tmp, "GF1PATCH110\0ID#000002", 22) && memcmp(tmp, "GF1PATCH100\0ID#000002", 22))) /* don't know what the differences are */ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: not an instrument", name); return 0; } if (tmp[82] != 1 && tmp[82] != 0) /* instruments. To some patch makers, 0 means 1 */ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Can't handle patches with %d instruments", tmp[82]); return 0; } if (tmp[151] != 1 && tmp[151] != 0) /* layers. What's a layer? */ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Can't handle instruments with %d layers", tmp[151]); return 0; } #ifdef ADAGIO gus_voice[tpgm].loaded |= DSP_MASK; gus_voice[tpgm].prog = next_wave_prog++; newmode = gus_voice[tpgm].modes; #endif lp=(InstrumentLayer *)safe_malloc(sizeof(InstrumentLayer)); lp->size = sizeof(InstrumentLayer); lp->lo = 0; lp->hi = 127; ip=(Instrument *)safe_malloc(sizeof(Instrument)); lp->size += sizeof(Instrument); lp->instrument = ip; lp->next = 0; ip->type = INST_GUS; ip->samples = tmp[198]; ip->sample = (Sample *)safe_malloc(sizeof(Sample) * ip->samples); lp->size += sizeof(Sample) * ip->samples; ip->left_samples = ip->samples; ip->left_sample = ip->sample; ip->right_samples = 0; ip->right_sample = 0; ip->contents = 0; for (i=0; isamples; i++) { uint8 fractions; int32 tmplong; uint16 tmpshort; uint8 tmpchar; #define READ_CHAR(thing) \ if (1 != fread(&tmpchar, 1, 1, fp)) goto fail; \ thing = tmpchar; #define READ_SHORT(thing) \ if (1 != fread(&tmpshort, 2, 1, fp)) goto fail; \ thing = LE_SHORT(tmpshort); #define READ_LONG(thing) \ if (1 != fread(&tmplong, 4, 1, fp)) goto fail; \ thing = LE_LONG(tmplong); skip(fp, 7); /* Skip the wave name */ if (1 != fread(&fractions, 1, 1, fp)) { fail: ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Error reading sample %d", i); for (j=0; jsample[j].data); free(ip->sample); free(ip); return 0; } sp=&(ip->sample[i]); READ_LONG(sp->data_length); READ_LONG(sp->loop_start); READ_LONG(sp->loop_end); READ_SHORT(sp->sample_rate); READ_LONG(sp->low_freq); READ_LONG(sp->high_freq); READ_LONG(sp->root_freq); skip(fp, 2); /* Why have a "root frequency" and then "tuning"?? */ READ_CHAR(tmp[0]); if (panning==-1) sp->panning = (tmp[0] * 8 + 4) & 0x7f; else sp->panning=(uint8)(panning & 0x7F); sp->resonance=0; sp->cutoff_freq=0; sp->reverberation=0; sp->chorusdepth=0; sp->exclusiveClass=0; sp->keyToModEnvHold=0; sp->keyToModEnvDecay=0; sp->keyToVolEnvHold=0; sp->keyToVolEnvDecay=0; if (cfg_tuning) { double tune_factor = (double)(cfg_tuning)/1200.0; tune_factor = pow(2.0, tune_factor); sp->root_freq = (uint32)( tune_factor * (double)sp->root_freq ); } /* envelope, tremolo, and vibrato */ if (18 != fread(tmp, 1, 18, fp)) goto fail; if (!tmp[13] || !tmp[14]) { sp->tremolo_sweep_increment= sp->tremolo_phase_increment=sp->tremolo_depth=0; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * no tremolo"); } else { sp->tremolo_sweep_increment=convert_tremolo_sweep(tmp[12]); sp->tremolo_phase_increment=convert_tremolo_rate(tmp[13]); sp->tremolo_depth=tmp[14]; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * tremolo: sweep %d, phase %d, depth %d", sp->tremolo_sweep_increment, sp->tremolo_phase_increment, sp->tremolo_depth); } #ifdef ADAGIO if (1) #else if (!tmp[16] || !tmp[17]) #endif { sp->vibrato_sweep_increment= sp->vibrato_control_ratio=sp->vibrato_depth=0; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * no vibrato"); } else { sp->vibrato_control_ratio=convert_vibrato_rate(tmp[16]); sp->vibrato_sweep_increment= convert_vibrato_sweep(tmp[15], sp->vibrato_control_ratio); sp->vibrato_depth=tmp[17]; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * vibrato: sweep %d, ctl %d, depth %d", sp->vibrato_sweep_increment, sp->vibrato_control_ratio, sp->vibrato_depth); } READ_CHAR(sp->modes); READ_SHORT(sp->freq_center); READ_SHORT(sp->freq_scale); skip(fp, 36); #if 0 skip(fp, 40); /* skip the useless scale frequency, scale factor (what's it mean?), and reserved space */ #endif #ifdef ADAGIO if (sp->freq_scale == 1024) sp->freq_center = 60; #ifndef STRIP_PERCUSSION strip_loop = strip_envelope = strip_tail = 0; #endif if (!i) { gus_voice[tpgm].vibrato_sweep = tmp[15]; gus_voice[tpgm].vibrato_rate = tmp[16]; gus_voice[tpgm].vibrato_depth = sp->vibrato_depth; if (!newmode) gus_voice[tpgm].modes = sp->modes; } if (newmode) sp->modes = newmode; amp = gus_voice[tpgm].volume; if (gm_num > 127 && gus_voice[tpgm].fix_key) { sp->freq_scale = 0; note_to_use = sp->freq_center = gus_voice[tpgm].fix_key; } else if (!sp->freq_scale) gus_voice[tpgm].fix_key = sp->freq_center; if (gus_voice[tpgm].strip & LOOPS_FLAG) strip_loop = 1; if (gus_voice[tpgm].strip & ENVELOPE_FLAG) strip_envelope = 1; if (gus_voice[tpgm].strip & TAIL_FLAG) strip_tail = 1; if (gus_voice[tpgm].keep & LOOPS_FLAG) strip_loop = 0; if (gus_voice[tpgm].keep & ENVELOPE_FLAG) strip_envelope = 0; if (gus_voice[tpgm].keep & TAIL_FLAG) strip_tail = 0; #endif /* ADAGIO */ /* Mark this as a fixed-pitch instrument if such a deed is desired. */ if (note_to_use!=-1) sp->note_to_use=(uint8)(note_to_use); else sp->note_to_use=0; /* seashore.pat in the Midia patch set has no Sustain. I don't understand why, and fixing it by adding the Sustain flag to all looped patches probably breaks something else. We do it anyway. */ if (sp->modes & MODES_LOOPING) sp->modes |= MODES_SUSTAIN; /* Strip any loops and envelopes we're permitted to */ if ((strip_loop==1) && (sp->modes & (MODES_SUSTAIN | MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE))) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Removing loop and/or sustain"); sp->modes &=~(MODES_SUSTAIN | MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE); } if (strip_envelope==1) { if (sp->modes & MODES_ENVELOPE) ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Removing envelope"); sp->modes &= ~MODES_ENVELOPE; } else if (strip_envelope != 0) { /* Have to make a guess. */ if (!(sp->modes & (MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE))) { /* No loop? Then what's there to sustain? No envelope needed either... */ sp->modes &= ~(MODES_SUSTAIN|MODES_ENVELOPE); ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - No loop, removing sustain and envelope"); } else if (!memcmp(tmp, "??????", 6) || tmp[11] >= 100) { /* Envelope rates all maxed out? Envelope end at a high "offset"? That's a weird envelope. Take it out. */ sp->modes &= ~MODES_ENVELOPE; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Weirdness, removing envelope"); } #ifndef ADAGIO else if (!(sp->modes & MODES_SUSTAIN)) { /* No sustain? Then no envelope. I don't know if this is justified, but patches without sustain usually don't need the envelope either... at least the Gravis ones. They're mostly drums. I think. */ sp->modes &= ~MODES_ENVELOPE; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - No sustain, removing envelope"); } #endif } sp->attenuation = 0; #ifdef ADAGIO for (j = ATTACK; j < DELAY; j++) { if (gus_voice[tpgm].keep & USEENV_FLAG) { tmp[6+j] = gus_voice[tpgm].envelope_offset[j]; tmp[j] = gus_voice[tpgm].envelope_rate[j]; } else if (!i) { gus_voice[tpgm].envelope_offset[j] = tmp[6+j]; gus_voice[tpgm].envelope_rate[j] = tmp[j]; } } #ifdef REV_E_ADJUST if (reverb) { int r = reverb; int dec = tmp[2]; r = (127 - r) / 6; if (r < 0) r = 0; if (r > 28) r = 28; r += dec & 0x3f; if (r > 63) r = 63; dec = (dec & 0xc0) | r; tmp[2] = dec; r = reverb; if (r > 127) r = 127; if (gm_num < 120) tmp[3] = (2<<6) | (12 - (r>>4)); else if (gm_num > 127) tmp[1] = (3<<6) | (63 - (r>>1)); } #endif #ifdef VOL_E_ADJUST #define VR_NUM 2 #define VR_DEN 3 { unsigned voff, poff; for (j = 0; j < 6; j++) { voff = tmp[6+j]; poff = 2 + main_volume + 63 + gus_voice[tpgm].volume / 2; voff = ((poff + VR_NUM*256) * voff + VR_DEN*128) / (VR_DEN*256); tmp[6+j] = voff; } } #endif #endif /******debug********* if (gm_num==67) for (j = 0; j < 6; j++) { printf("\t%d: rate %ld offset %ld\n", j, tmp[j], tmp[6+j]); } ******debug*********/ for (j=ATTACK; jenvelope_rate[j]= (j<3)? convert_envelope_rate_attack(tmp[j], 11) : convert_envelope_rate(tmp[j]); sp->envelope_offset[j]= convert_envelope_offset(tmp[6+j]); } sp->envelope_rate[DELAY] = sp->envelope_offset[DELAY] = 0; for (j=ATTACK; jmodulation_rate[j]=sp->envelope_rate[j]; sp->modulation_offset[j]=sp->envelope_offset[j]; } sp->modulation_rate[DELAY] = sp->modulation_offset[DELAY] = 0; sp->modEnvToFilterFc=0; sp->modEnvToPitch=0; sp->lfo_sweep_increment = 0; sp->lfo_phase_increment = 0; sp->modLfoToFilterFc = 0; sp->vibrato_delay = 0; #ifdef EXAMINE_SOME_ENVELOPES if (percussion /* && (gm_num >= 42 && gm_num <= 51) */) { printf("\nPRESET %d:\n", gm_num); printf(" attack(0): off %ld rate %ld\n", sp->envelope_offset[0] >>(7+15), sp->envelope_rate[0] >>(7+15)); printf(" hold(1): off %ld rate %ld\n", sp->envelope_offset[1] >>(7+15), sp->envelope_rate[1] >>(7+15)); printf("sustain(2): off %ld rate %ld\n", sp->envelope_offset[2] >>(7+15), sp->envelope_rate[2] >>(7+15)); printf("release(3): off %ld rate %ld\n", sp->envelope_offset[3] >>(7+15), sp->envelope_rate[3] >>(7+15)); printf(" decay(4): off %ld rate %ld\n", sp->envelope_offset[4] >>(7+15), sp->envelope_rate[4] >>(7+15)); printf(" die(5): off %ld rate %ld\n", sp->envelope_offset[5] >>(7+15), sp->envelope_rate[5] >>(7+15)); printf(" delay(6): off %ld rate %ld\n", sp->envelope_offset[6] >>(7+15), sp->envelope_rate[6] >>(7+15)); printf("MODES: %s%s%s%s\n", (sp->modes & MODES_LOOPING)? "looping ":"", (sp->modes & MODES_SUSTAIN)? "sustain ":"", (sp->modes & MODES_PINGPONG)? "pingpong ":"", (sp->modes & MODES_REVERSE)? "reverse ":"" ); } #endif /* Then read the sample data */ /* Then read the sample data */ #ifdef tplus sp->data = (sample_t *)safe_malloc(sp->data_length+1); lp->size += sp->data_length+1; #else sp->data = safe_malloc(sp->data_length); lp->size += sp->data_length; #endif if (1 != fread(sp->data, sp->data_length, 1, fp)) goto fail; if (!(sp->modes & MODES_16BIT)) /* convert to 16-bit data */ { int32 i=sp->data_length; uint8 *cp=(uint8 *)(sp->data); uint16 *tmp,*newdta; #ifdef tplus tmp = newdta = (uint16 *)safe_malloc(sp->data_length*2+2); #else tmp=newdta=safe_malloc(sp->data_length*2); #endif while (i--) *tmp++ = (uint16)(*cp++) << 8; cp=(uint8 *)(sp->data); sp->data = (sample_t *)newdta; free(cp); sp->data_length *= 2; sp->loop_start *= 2; sp->loop_end *= 2; } #ifndef LITTLE_ENDIAN else /* convert to machine byte order */ { int32 i=sp->data_length/2; int16 *tmp=(int16 *)sp->data,s; while (i--) { s=LE_SHORT(*tmp); *tmp++=s; } } #endif if (sp->modes & MODES_UNSIGNED) /* convert to signed data */ { int32 i=sp->data_length/2; int16 *tmp=(int16 *)sp->data; while (i--) *tmp++ ^= 0x8000; } /* Reverse reverse loops and pass them off as normal loops */ if (sp->modes & MODES_REVERSE) { int32 t; /* The GUS apparently plays reverse loops by reversing the whole sample. We do the same because the GUS does not SUCK. */ ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "Reverse loop in %s", name); reverse_data((int16 *)sp->data, 0, sp->data_length/2); t=sp->loop_start; sp->loop_start=sp->data_length - sp->loop_end; sp->loop_end=sp->data_length - t; sp->modes &= ~MODES_REVERSE; sp->modes |= MODES_LOOPING; /* just in case */ } /* If necessary do some anti-aliasing filtering */ if (antialiasing_allowed) antialiasing(sp,play_mode->rate); #ifdef ADJUST_SAMPLE_VOLUMES if (amp!=-1) sp->volume=(double)(amp) / 100.0; else { /* Try to determine a volume scaling factor for the sample. This is a very crude adjustment, but things sound more balanced with it. Still, this should be a runtime option. */ uint32 i, numsamps=sp->data_length/2; uint32 higher=0, highcount=0; int16 maxamp=0,a; int16 *tmp=(int16 *)sp->data; i = numsamps; while (i--) { a=*tmp++; if (a<0) a=-a; if (a>maxamp) maxamp=a; } tmp=(int16 *)sp->data; i = numsamps; while (i--) { a=*tmp++; if (a<0) a=-a; if (a > 3*maxamp/4) { higher += a; highcount++; } } if (highcount) higher /= highcount; else higher = 10000; sp->volume = (32768.0 * 0.875) / (double)higher ; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * volume comp: %f", sp->volume); } #else if (amp!=-1) sp->volume=(double)(amp) / 100.0; else sp->volume=1.0; #endif sp->data_length /= 2; /* These are in bytes. Convert into samples. */ sp->loop_start /= 2; sp->loop_end /= 2; #ifdef tplus /* The sample must be padded out by 1 extra sample, so that round off errors in the offsets used in interpolation will not cause a "pop" by reading random data beyond data_length */ sp->data[sp->data_length] = sp->data[sp->data_length-1]; #endif /* Then fractional samples */ sp->data_length <<= FRACTION_BITS; sp->loop_start <<= FRACTION_BITS; sp->loop_end <<= FRACTION_BITS; /* Adjust for fractional loop points. This is a guess. Does anyone know what "fractions" really stands for? */ sp->loop_start |= (fractions & 0x0F) << (FRACTION_BITS-4); sp->loop_end |= ((fractions>>4) & 0x0F) << (FRACTION_BITS-4); /* trim off zero data at end */ { int ls = sp->loop_start>>FRACTION_BITS; int le = sp->loop_end>>FRACTION_BITS; int se = sp->data_length>>FRACTION_BITS; while (se > 1 && !sp->data[se-1]) se--; if (le > se) le = se; if (ls >= le) sp->modes &= ~MODES_LOOPING; sp->loop_end = le<data_length = se<note_to_use && !(sp->modes & MODES_LOOPING)) pre_resample(sp); #ifdef LOOKUP_HACK /* Squash the 16-bit data into 8 bits. */ { uint8 *gulp,*ulp; int16 *swp; int l=sp->data_length >> FRACTION_BITS; gulp=ulp=safe_malloc(l+1); swp=(int16 *)sp->data; while(l--) *ulp++ = (*swp++ >> 8) & 0xFF; free(sp->data); sp->data=(sample_t *)gulp; } #endif if (strip_tail==1) { /* Let's not really, just say we did. */ ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Stripping tail"); sp->data_length = sp->loop_end; } } close_file(fp); return lp; } #ifndef ADAGIO static int fill_bank(int dr, int b) #else /* ADAGIO */ static int fill_bank(int b) #endif /* ADAGIO */ { #ifndef ADAGIO int i, errors=0; ToneBank *bank=((dr) ? drumset[b] : tonebank[b]); #else /* ADAGIO */ int i, errors=0, dr; ToneBank *bank=tonebank[b]; #endif /* ADAGIO */ if (!bank) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, #ifndef ADAGIO "Huh. Tried to load instruments in non-existent %s %d", (dr) ? "drumset" : "tone bank", b); #else /* ADAGIO */ "Huh. Tried to load instruments in non-existent tone bank %d", b); #endif /* ADAGIO */ return 0; } #ifndef ADAGIO for (i=0; itone[i].gm_num - 128); if (dr < 0) dr = 0; #endif /* ADAGIO */ if (bank->tone[i].layer==MAGIC_LOAD_INSTRUMENT) { if (!(bank->tone[i].name)) { const char *s; if (dr) s = gm_voice[i+128].vname; else s = gm_voice[i].vname; if (s) ctl->cmsg(CMSG_WARNING, (b!=0) ? VERB_VERBOSE : VERB_NORMAL, "No patch for %s %d, %s.", (dr)? "drumset" : "bank", b, s); else ctl->cmsg(CMSG_WARNING, (b!=0) ? VERB_VERBOSE : VERB_NORMAL, "No patch for %s %d, program %d.", (dr)? "drumset" : "bank", b, i); if (b!=0) { /* Mark the corresponding instrument in the default bank / drumset for loading (if it isn't already) */ #ifndef ADAGIO if (!dr) { #endif /* not ADAGIO */ if (!(standard_tonebank.tone[i].layer)) standard_tonebank.tone[i].layer= MAGIC_LOAD_INSTRUMENT; #ifndef ADAGIO } else { if (!(standard_drumset.tone[i].layer)) standard_drumset.tone[i].layer= MAGIC_LOAD_INSTRUMENT; } #endif /* not ADAGIO */ } bank->tone[i].layer=0; errors++; } else if (!(bank->tone[i].layer= load_instrument(bank->tone[i].name, bank->tone[i].font_type, (dr) ? 1 : 0, bank->tone[i].pan, bank->tone[i].amp, bank->tone[i].tuning, (bank->tone[i].note!=-1) ? bank->tone[i].note : #ifndef ADAGIO ((dr) ? i : -1), #else /* ADAGIO */ ((dr) ? dr : -1), #endif /* ADAGIO */ (bank->tone[i].strip_loop!=-1) ? bank->tone[i].strip_loop : ((dr) ? 1 : -1), (bank->tone[i].strip_envelope != -1) ? bank->tone[i].strip_envelope : ((dr) ? 1 : -1), #ifndef ADAGIO bank->tone[i].strip_tail, b, ((dr) ? i + 128 : i), bank->tone[i].sf_ix ))) #else /* ADAGIO */ bank->tone[i].strip_tail, bank->tone[i].gm_num, bank->tone[i].tpgm, bank->tone[i].reverb, bank->tone[i].main_volume ))) #endif /* ADAGIO */ { ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Couldn't load instrument %s (%s %d, program %d)", bank->tone[i].name, (dr)? "drum set" : "tone bank", b, i); errors++; } else { /* it's loaded now */ bank->tone[i].last_used = current_tune_number; current_patch_memory += bank->tone[i].layer->size; #ifdef DEBUG_MEM_PATCH ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "+mem %d (added %d)", current_patch_memory, bank->tone[i].layer->size); #endif purge_as_required(); if (current_patch_memory > max_patch_memory) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Not enough memory to load instrument %s (%s %d, program %d)", bank->tone[i].name, (dr)? "drum set" : "tone bank", b, i); errors++; free_layer(bank->tone[i].layer); bank->tone[i].layer=0; bank->tone[i].last_used=-1; } if (check_for_rc()) { free_layer(bank->tone[i].layer); bank->tone[i].layer=0; bank->tone[i].last_used=-1; return 0; } } } /* if MAGIC ... */ } /* for */ return errors; } static void free_old_instruments(int how_old) { int i=MAXBANK; while(i--) { if (tonebank[i]) free_old_bank(0, i, how_old); if (drumset[i]) free_old_bank(1, i, how_old); } } static void purge_as_required(void) { if (!max_patch_memory) return; while (last_tune_purged < current_tune_number && current_patch_memory > max_patch_memory) { last_tune_purged++; #ifdef DEBUG_MEM_PATCH ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "purging patches older than %d", last_tune_purged); #endif free_old_instruments(last_tune_purged); } } int load_missing_instruments(void) { #ifdef ADAGIO int errors=0; errors+=fill_bank(0); #else int i=MAXBANK,errors=0; #ifdef DEBUG_MEM_PATCH ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "load missing for song %d (last purged %d)", current_tune_number, last_tune_purged); #endif while (i--) { if (check_for_rc()) return errors; if (tonebank[i]) errors+=fill_bank(0,i); if (drumset[i]) errors+=fill_bank(1,i); } current_tune_number++; #endif return errors; } void free_instruments(void) { int i=MAXBANK; while(i--) { if (tonebank[i]) #ifndef ADAGIO free_bank(0,i); if (drumset[i]) free_bank(1,i); #else /* ADAGIO */ free_bank(i); #endif /* ADAGIO */ } } int set_default_instrument(char *name) { InstrumentLayer *lp; #ifndef ADAGIO if (!(lp=load_instrument(name, FONT_NORMAL, 0, -1, -1, 0, -1, -1, -1, -1, 0, -1, -1))) #else /* ADAGIO */ if (!(lp=load_instrument(name, FONT_NORMAL, 0, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0))) #endif /* ADAGIO */ return -1; if (default_instrument) free_layer(default_instrument); default_instrument=lp; default_program=SPECIAL_PROGRAM; return 0; } alsaplayer-0.99.82/attic/midi/instrum.h000066400000000000000000000113241466261456500177600ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * instrum.h */ typedef struct { uint32 loop_start, loop_end, data_length, sample_rate, low_freq, high_freq, root_freq; uint8 root_tune, fine_tune; uint32 envelope_rate[7], envelope_offset[7], modulation_rate[7], modulation_offset[7]; FLOAT_T volume, resonance, modEnvToFilterFc, modEnvToPitch, modLfoToFilterFc; sample_t *data; int32 tremolo_sweep_increment, tremolo_phase_increment, lfo_sweep_increment, lfo_phase_increment, vibrato_sweep_increment; uint32 vibrato_control_ratio, cutoff_freq; uint8 reverberation, chorusdepth, tremolo_depth, vibrato_depth, modes; uint8 panning, note_to_use, exclusiveClass; int16 scale_tuning, keyToModEnvHold, keyToModEnvDecay, keyToVolEnvHold, keyToVolEnvDecay; uint8 attenuation, freq_center; int32 freq_scale, vibrato_delay; } Sample; /* Bits in modes: */ #define MODES_16BIT (1<<0) #define MODES_UNSIGNED (1<<1) #define MODES_LOOPING (1<<2) #define MODES_PINGPONG (1<<3) #define MODES_REVERSE (1<<4) #define MODES_SUSTAIN (1<<5) #define MODES_ENVELOPE (1<<6) #define MODES_FAST_RELEASE (1<<7) #define INST_GUS 0 #define INST_SF2 1 typedef struct { int type; int samples; Sample *sample; int left_samples; Sample *left_sample; int right_samples; Sample *right_sample; unsigned char *contents; } Instrument; typedef struct _InstrumentLayer { uint8 lo, hi; int size; Instrument *instrument; struct _InstrumentLayer *next; } InstrumentLayer; struct cfg_type { int font_code; int num; const char *name; }; #define FONT_NORMAL 0 #define FONT_FFF 1 #define FONT_SBK 2 #define FONT_TONESET 3 #define FONT_DRUMSET 4 #define FONT_PRESET 5 typedef struct { const char *name; InstrumentLayer *layer; int font_type, sf_ix, last_used, tuning; #ifndef ADAGIO int note, amp, pan, strip_loop, strip_envelope, strip_tail; #else /* ADAGIO */ int note, amp, pan, strip_loop, strip_envelope, strip_tail, gm_num, tpgm, reverb, main_volume; #endif /* ADAGIO */ } ToneBankElement; /* A hack to delay instrument loading until after reading the entire MIDI file. */ #define MAGIC_LOAD_INSTRUMENT ((InstrumentLayer *)(-1)) #define MAXPROG 128 #define MAXBANK 130 #define SFXBANK (MAXBANK-1) #define SFXDRUM1 (MAXBANK-2) #define SFXDRUM2 (MAXBANK-1) #define XGDRUM 1 typedef struct { const char *name; #ifndef ADAGIO ToneBankElement tone[MAXPROG]; #else /* ADAGIO */ ToneBankElement tone[MAX_TONE_VOICES]; #endif /* ADAGIO */ } ToneBank; extern char *sf_file; #ifndef ADAGIO extern ToneBank *tonebank[], *drumset[]; #else /* ADAGIO */ extern ToneBank *tonebank[]; #endif /* ADAGIO */ extern InstrumentLayer *default_instrument; extern int default_program; extern int antialiasing_allowed; extern int fast_decay; extern int free_instruments_afterwards; extern int cutoff_allowed; #define SPECIAL_PROGRAM -1 extern int load_missing_instruments(void); extern void free_instruments(void); extern void end_soundfont(void); extern int set_default_instrument(char *name); extern int32 convert_tremolo_sweep(uint8 sweep); extern int32 convert_vibrato_sweep(uint8 sweep, int32 vib_control_ratio); extern int32 convert_tremolo_rate(uint8 rate); extern int32 convert_vibrato_rate(uint8 rate); extern int init_soundfont(char *fname, int oldbank, int newbank, int level); #ifdef FFF_HAS_BEEN_FIXED extern InstrumentLayer *load_fff_patch(const char *name, int gm_num, int bank, int percussion, int panning, int amp, int note_to_use, int strip_loop, int strip_envelope, int strip_tail); #endif extern InstrumentLayer *load_sbk_patch(const char *name, int gm_num, int bank, int percussion, int panning, int amp, int note_to_use, int sf_ix); extern int current_tune_number; extern int max_patch_memory; extern int current_patch_memory; #define XMAPMAX 800 extern int xmap[XMAPMAX][5]; extern void pcmap(int *b, int *v, int *p, int *drums); alsaplayer-0.99.82/attic/midi/md.h000066400000000000000000000067221466261456500166650ustar00rootroot00000000000000/* md.h * * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * $Id$ Greg Lee */ #ifdef PLAYLOCK #include #endif struct md { char midi_name[FILENAME_MAX+1]; char midi_path_name[FILENAME_MAX+1]; char artist[128]; char title[128]; char midi_type[3]; int is_playing; int is_open; unsigned char *bbuf; int bboffset; int bbcount; int outchunk; int starting_up; int flushing; int out_count; int total_bytes; int output_buffer_full; int output_device_open; int flushing_output_device; unsigned super_buffer_count; #ifdef PLAYLOCK sem_t play_lock; #endif int xmp_epoch; unsigned xxmp_epoch; unsigned time_expired; unsigned last_time_expired; unsigned last_req_time; unsigned calc_window; unsigned last_calc; unsigned last_slack; unsigned trouble_ahead; MidiEvent *event; MidiEvent *current_event; MidiEventList *evlist; int32 event_count; FILE *fp; uint32 at; int32 sample_increment, sample_correction; int track_info; int curr_track; int curr_title_track; int midi_port_number; FLOAT_T *vol_table; Channel channel[MAXCHAN]; Voice voice[MAX_VOICES]; int voices; int voice_reserve; int32 amplification; FLOAT_T master_volume; unsigned lost_notes; unsigned current_polyphony; unsigned current_free_voices; unsigned current_dying_voices; #ifdef POLYPHONY_COUNT int future_polyphony; #endif int dont_chorus; int dont_reverb; int dont_cspline; int current_interpolation; int dont_keep_looping; int GM_System_On; int XG_System_On; int GS_System_On; int XG_System_reverb_type; int XG_System_chorus_type; int XG_System_variation_type; signed char drumvolume[MAXCHAN][MAXNOTE]; signed char drumpanpot[MAXCHAN][MAXNOTE]; signed char drumreverberation[MAXCHAN][MAXNOTE]; signed char drumchorusdepth[MAXCHAN][MAXNOTE]; int32 drumchannels; int adjust_panning_immediately; int32 common_buffer[AUDIO_BUFFER_SIZE*2], /* stereo samples */ *buffer_pointer; uint32 buffered_count; uint32 sample_count; uint32 current_sample; sample_t resample_buffer[AUDIO_BUFFER_SIZE+100]; uint32 resample_buffer_offset; int32 channel_buffer[MAXCHAN][AUDIO_BUFFER_SIZE*2] ; /* stereo samples */ int channel_buffer_state[MAXCHAN] ; /* 0 means null signal , 1 non null */ Effect* effect_list[ NUM_EFFECTS ][MAXCHAN] ; }; extern int play_midi_file(struct md *d); extern int play_some_midi(struct md *d); extern void play_midi_finish(struct md *d); extern int skip_to(uint32 until_time, struct md *d); extern void recompute_freq(int v, struct md *d); extern int init_effect(struct md *d) ; extern void effect_ctrl_change( MidiEvent* pCurrentEvent, struct md *d ); extern void effect_ctrl_reset( int idChannel, struct md *d ); extern void effect_ctrl_kill( int idChannel, struct md *d ); alsaplayer-0.99.82/attic/midi/midi_engine.c000066400000000000000000000434601466261456500205270ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . The midi plugin for alsaplayer is a version of Tuukka Toivonen's TiMidity done by Greg Lee, greg@ling.lll.hawaii.edu, April 2002. */ #include #include #include #include #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include "output.h" #include "controls.h" #include "tables.h" #include "resample.h" #include "version.h" #include "sbk.h" #include #include "input_plugin.h" #ifdef DO_PREFS #include "prefs.h" #endif /*#define PLUGDEBUG*/ /************************************/ int config_voices=DEFAULT_VOICES; int config_amplification = DEFAULT_AMPLIFICATION; int free_instruments_afterwards=0; /*int free_instruments_afterwards=1;*/ static char def_instr_name[256]=""; int cfg_select = 0; #ifdef CHANNEL_EFFECT extern void effect_activate( int iSwitch ) ; extern int init_effect(struct md *d) ; #endif /*CHANNEL_EFFECT*/ int have_commandline_midis = 0; int32 tmpi32, output_rate=0; char *output_name=0; char *cfg_names[30]; void clear_config(void) { ToneBank *bank=0; int i, j; for (i = 0; i < MAXBANK; i++) { if (tonebank[i]) { bank = tonebank[i]; if (bank->name) free((void *)bank->name); bank->name = 0; for (j = 0; j < MAXPROG; j++) if (bank->tone[j].name) { free((void *)bank->tone[j].name); bank->tone[j].name = 0; } if (i > 0) { free(tonebank[i]); tonebank[i] = 0; } } if (drumset[i]) { bank = drumset[i]; if (bank->name) free((void *)bank->name); bank->name = 0; for (j = 0; j < MAXPROG; j++) if (bank->tone[j].name) { free((void *)bank->tone[j].name); bank->tone[j].name = 0; } if (i > 0) { free(drumset[i]); drumset[i] = 0; } } } memset(drumset[0], 0, sizeof(ToneBank)); memset(tonebank[0], 0, sizeof(ToneBank)); clear_pathlist(0); } int reverb_options=7; int global_reverb = 0; int global_chorus = 0; int global_echo = 0; int global_detune = 0; int got_a_configuration=0; static int look_midi_file(struct md *d) { ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "MIDI file: %s", d->midi_name); if (!(d->fp=fopen(d->midi_path_name, "r"))) return 0; ctl->file_name(d->midi_name); read_midi_file(d); if (d->fp) close_file(d->fp); if (!d->event) return 0; ctl->cmsg(CMSG_INFO, VERB_NOISY, "%d supported events, %d samples", d->event_count, d->sample_count); ctl->total_time(d->sample_count); free(d->event); return 1; } static int configuration_failed = FALSE; static int init_midi() { if (configuration_failed) return FALSE; if (got_a_configuration) return TRUE; #ifdef PLUGDEBUG fprintf(stderr,"init_midi\n"); #endif autocfg(); #ifdef DO_PREFS prefs_set_bool(ap_prefs, "midi", "active", 1); #endif output_fragsize = 8192; if (read_config_file("timidity.cfg", 1)) { configuration_failed = TRUE; return FALSE; } if (output_rate) play_mode->rate=output_rate; if (output_name) { play_mode->name=output_name; } init_tables(); if (!control_ratio) { control_ratio = play_mode->rate / CONTROLS_PER_SECOND; if(control_ratio<1) control_ratio=1; else if (control_ratio > MAX_CONTROL_RATIO) control_ratio=MAX_CONTROL_RATIO; } if (*def_instr_name) set_default_instrument(def_instr_name); if (got_a_configuration < 2) { if (read_config_file(current_config_file, 0)) { configuration_failed = TRUE; return FALSE; } } return TRUE; } /* * test, if it's a .MIDI file, 0 if ok (and set the speed, stereo etc.) * < 0 if not */ static int test_midifile(char *buffer) { if (strncmp(buffer, "MThd", 4)) return -1; return 0; } static int midi_open(input_object *obj, char *name) { struct md *d; int rc = 0; char *ptr; if (!init_midi()) return FALSE; if (!obj) return 0; obj->local_data = malloc(sizeof(struct md)); if (!obj->local_data) return 0; d = (struct md *)obj->local_data; d->bbuf = 0; d->event = 0; d->is_playing = FALSE; d->is_open = FALSE; d->bboffset = 0; d->bbcount = 0; d->outchunk = 0; d->starting_up = 1; d->flushing = 0; d->out_count = 0; d->total_bytes = 0; d->super_buffer_count = 0; d->voices = config_voices; d->amplification = config_amplification; d->drumchannels = DEFAULT_DRUMCHANNELS; d->adjust_panning_immediately = 1; d->voice_reserve = 7 * config_voices / 8; d->dont_chorus = 0; d->dont_reverb = 0; d->dont_cspline = 0; d->current_interpolation = config_interpolation; d->dont_keep_looping = 0; d->XG_System_reverb_type = 0; d->XG_System_chorus_type = 0; d->XG_System_variation_type = 0; d->GM_System_On = 0; d->XG_System_On = 0; d->GS_System_On = 0; d->artist[0] = '\0'; d->title[0] = '\0'; d->xmp_epoch = -1; d->xxmp_epoch = 0; d->time_expired = 0; d->last_time_expired = 0; d->last_req_time = 0; d->last_calc = 0; d->trouble_ahead = 0; d->calc_window = 1000; d->output_buffer_full = 10; d->flushing_output_device = FALSE; d->midi_type[0] = 'G'; d->midi_type[1] = 'M'; d->midi_type[2] = '\0'; #ifdef PLAYLOCK if (sem_init(&d->play_lock, 0, 1)) fprintf(stderr,"no semaphore\n"); #endif strncpy(d->midi_path_name, name, FILENAME_MAX-1); d->midi_path_name[FILENAME_MAX-1] = 0; ptr = strrchr(name, '/'); if (ptr) ptr++; else ptr = name; strncpy(d->midi_name, ptr, FILENAME_MAX-1); d->midi_name[FILENAME_MAX-1] = 0; rc = look_midi_file(d); #ifdef PLUGDEBUG fprintf(stderr,"midi open maybe(%s) returned %d\n", name, rc); #endif obj->flags = P_SEEK | P_REENTRANT; if (rc) { obj->ready = TRUE; obj->nr_frames = d->sample_count * 4 / output_fragsize; obj->nr_tracks = 0; obj->nr_channels = 2; obj->frame_size = output_fragsize; if (d->GS_System_On) { d->midi_type[0] = 'G'; d->midi_type[1] = 'S'; } if (d->XG_System_On) { d->midi_type[0] = 'X'; d->midi_type[1] = 'G'; } } return rc; } static int midi_truly_open(struct md *d) { if (d->is_playing) { play_midi_finish(d); d->is_playing = FALSE; } #ifdef PLUGDEBUG fprintf(stderr,"midi truly open(%s)\n", d->midi_path_name); #endif if (!got_a_configuration) init_midi(); #ifdef CHANNEL_EFFECT init_effect(d); effect_activate(TRUE); #endif play_mode->purge_output(d); /*d->is_playing = TRUE;*/ /*d->is_open = TRUE;*/ play_midi_file(d); if (d->is_playing) return 1; return 0; } void midi_close(input_object *obj) { struct md *d; if (!init_midi()) return; if (!obj) return; if (!obj->local_data) return; d = (struct md *)obj->local_data; #ifdef PLAYLOCK sem_wait(&d->play_lock); #endif if (d->is_playing) { play_midi_finish(d); } #ifdef PLAYLOCK sem_destroy(&d->play_lock); #endif if (d->bbuf) free(d->bbuf); free(obj->local_data); obj->local_data = NULL; #ifdef PLUGDEBUG fprintf(stderr,"midi_close\n"); #endif } #ifdef PLAYLOCK static void play_more(struct md *d) { int rc; if (!d->is_playing) return; if (!d->bbuf) return; if (d->flushing_output_device) return; if (d->bbcount < BB_SIZE/2) { if ( sem_trywait(&d->play_lock) ) return; rc = play_some_midi(d); sem_post(&d->play_lock); if (rc == RC_TUNE_END) d->flushing_output_device = TRUE; } } #endif #include extern int gettimeofday(struct timeval *, struct timezone *); static struct timeval tv; static struct timezone tz; static void time_sync(uint32 resync, int dosync, struct md *d) { unsigned jiffies; if (dosync) { d->last_time_expired = resync; d->xmp_epoch = -1; d->xxmp_epoch = 0; d->time_expired = 0; /*return;*/ } gettimeofday (&tv, &tz); if (d->xmp_epoch < 0) { d->xxmp_epoch = tv.tv_sec; d->xmp_epoch = tv.tv_usec; } jiffies = (tv.tv_sec - d->xxmp_epoch)*100 + (tv.tv_usec - d->xmp_epoch)/10000; d->time_expired = (jiffies * play_mode->rate)/100 + d->last_time_expired; } static int midi_play_frame(input_object *obj, char *buf) { struct md *d; int rc = 0; int need_more, obfp; unsigned calc_start, req_interval, slacktime; #ifdef PLUGDEBUG fprintf(stderr,"midi_play_frame to %x\n", buf); #endif if (!init_midi()) return FALSE; if (!obj) return 0; if (!obj->local_data) return 0; d = (struct md *)obj->local_data; if (!d->is_playing) { time_sync(0,1,d); midi_truly_open(d); d->last_slack = 0; } if (!d->is_playing) return 0; time_sync(0,0,d); calc_start = d->time_expired; if (d->last_req_time) req_interval = d->time_expired - d->last_req_time; else req_interval = d->calc_window; slacktime = req_interval - d->last_calc; if (slacktime) { if (d->last_slack) d->trouble_ahead = 0; else if (d->trouble_ahead) d->trouble_ahead--; } else if (d->trouble_ahead < 50) { d->trouble_ahead++; if (!d->last_slack) d->trouble_ahead += 2; } d->last_slack = slacktime; /* Adjust the window. */ if (!slacktime) /*d->calc_window -= d->calc_window / 4*/; else if (slacktime < d->calc_window) d->calc_window -= (d->calc_window - slacktime) / 2; else if (slacktime > d->calc_window) d->calc_window += (slacktime - d->calc_window)/ 4; d->last_req_time = d->time_expired; #ifdef TIMEREQDEBUG fprintf(stderr,"mpf: t=%d req int=%d cs=%d poly=%d bbc=%d\n", d->time_expired, req_interval, d->current_sample, d->current_polyphony, d->bbcount); #endif obfp = d->bbcount * 100 / BB_SIZE; /* fprintf(stderr,"mpf: slack=%d lc=%d req int=%d cwindow=%d poly=%d fp=%d rp=%d dv=%d vperm=%d obfp=%d trouble=%d lost=%d\n", slacktime, d->last_calc, req_interval, d->calc_window, d->current_polyphony, 0, d->voices - d->current_free_voices, d->current_dying_voices, d->voices - d->voice_reserve, obfp, d->trouble_ahead, d->lost_notes); */ d->output_buffer_full = obfp - d->trouble_ahead; need_more = TRUE; if (d->bbcount < output_fragsize) { need_more = TRUE; } else if (!slacktime) need_more = FALSE; /*else if (d->last_calc > d->calc_window) need_more = FALSE;*/ else if (d->bbcount > BB_SIZE - 3 * output_fragsize) { need_more = FALSE; } d->last_calc = 0; while (need_more) { unsigned calc_time; #ifdef PLUGDEBUG fprintf(stderr,"bbcount of %d < fragsize %d: ", d->bbcount, output_fragsize); #endif #ifdef PLAYLOCK sem_wait(&d->play_lock); #endif rc = play_some_midi(d); #ifdef PLAYLOCK sem_post(&d->play_lock); #endif need_more = FALSE; time_sync(0,0,d); #ifdef TIMEREQDEBUG fprintf(stderr,"calc time %d for bbc=%d\n", d->time_expired - calc_start, d->bbcount); #endif calc_time = d->time_expired - calc_start; d->last_calc = calc_time; if (rc == RC_TUNE_END) d->flushing_output_device = TRUE; else if (d->super_buffer_count || calc_time > d->calc_window) /* nothing */; else if (d->bbcount < BB_SIZE - 3 * output_fragsize && d->time_expired - calc_start <= 3*d->calc_window / 4) need_more = TRUE; /* fprintf(stderr,"\tcalc %d, need_more=%d, bbcount=%d\n", d->time_expired - calc_start, need_more, d->bbcount); */ #ifdef PLUGDEBUG if (rc == RC_TUNE_END) fprintf(stderr,"tune is ending: bbcount after play is %d\n", d->bbcount); fprintf(stderr,"bbcount after play is %d\n", d->bbcount); #endif } #ifdef PLUGDEBUG if (d->bbcount < output_fragsize) fprintf(stderr, "Can't play -- wish to stop.\n"); #endif if (d->bbcount < output_fragsize) return 0; rc = plug_output(buf, d); #ifdef PLUGDEBUG if (!rc) fprintf(stderr, "Nothing to write -- wish to stop.\n"); #endif if (!rc) return 0; /* nothing was written */ return 1; } static int midi_frame_seek(input_object *obj, int frame) { struct md *d; int result = 0; int current_frame = 0; unsigned tim_time = 0; if (!init_midi()) return FALSE; if (!obj) return 0; if (!obj->local_data) return 0; d = (struct md *)obj->local_data; if (d->is_playing) { current_frame = (b_out_count(d) + d->bbcount) / output_fragsize; if (frame < 0) frame = 0; if (current_frame == frame) return 1; /*if (current_frame > frame - 2 && current_frame < frame + 2) return 1;*/ tim_time = (unsigned)(frame * output_fragsize / 4); if (tim_time > d->sample_count) return 0; play_mode->purge_output(d); result = skip_to(tim_time, d); } else if (!frame) result = 1; else result = 0; #ifdef PLUGDEBUG fprintf(stderr,"midi_frame_seek to %d; result %d from skip_to(%d, d)\n", frame, result, tim_time); #endif return result; } static int midi_frame_size(input_object *obj) { struct md *d; if (!init_midi()) return FALSE; if (!obj) return 0; if (!obj->local_data) return 0; d = (struct md *)obj->local_data; #ifdef PLUGDEBUG fprintf(stderr,"midi_frame_size is %d\n", output_fragsize); #endif /*play_more(d);*/ return output_fragsize; } static int midi_nr_frames(input_object *obj) { struct md *d; int result = 0; if (!init_midi()) return FALSE; if (!obj) return 0; if (!obj->local_data) return 0; d = (struct md *)obj->local_data; #ifdef PLAYLOCK play_more(d); #endif result = d->sample_count * 4 / output_fragsize; #ifdef PLUGDEBUG fprintf(stderr,"midi_nr_frames is %d\n", result); #endif return result; } static int midi_sample_rate(input_object *obj) { struct md *d; int result = 0; if (!init_midi()) return FALSE; if (!obj) return 0; if (!obj->local_data) return 0; d = (struct md *)obj->local_data; /*play_more(d);*/ result = 44100; #ifdef PLUGDEBUG fprintf(stderr,"midi_sample_rate is %d\n", result); #endif return result; } static int midi_channels(input_object *obj) { #ifdef PLUGDEBUG fprintf(stderr,"midi_channels\n"); #endif if (!obj) return 0; return 2; /* Yes, always stereo ... */ } static long midi_frame_to_sec(input_object *obj, int frame) { struct md *d; unsigned long result = 0; unsigned long sample_pos; if (!init_midi()) return FALSE; if (!obj) return 0; if (!obj->local_data) return 0; d = (struct md *)obj->local_data; sample_pos = frame * output_fragsize / 4; /*result = (unsigned long)( pos / 44100 / 100 / 4 );*/ /*result = (unsigned long)( pos / 44100 / 100 );*/ /*result = (unsigned long)( pos / 44100);*/ result = (unsigned long)( sample_pos / 44100); result *= 100; /* centiseconds ?? */ #ifdef PLUGDEBUG fprintf(stderr,"midi_frame_to_sec for %d frames is %lu for frag=%d\n", frame, result, output_fragsize); #endif return result; } static float midi_can_handle(const char *name) { FILE *fd; struct stat st; char mbuff[4]; #ifdef PLUGDEBUG fprintf(stderr,"midi_can_handle(%s)?\n", name); #endif if (!init_midi()) return FALSE; if (stat(name, &st)) return 0.0; if (!S_ISREG(st.st_mode)) return 0.0; if ((fd = fopen(name, "r")) == NULL) { return 0.0; } if (fread(mbuff, 1, 4, fd) != 4) { fclose(fd); return 0.0; } fclose(fd); if (test_midifile(mbuff) >= 0) return 1.0; else return 0.0; } static int midi_stream_info(input_object *obj, stream_info *info) { struct md *d; if (!init_midi()) return FALSE; if (!obj) return 0; if (!obj->local_data) return 0; d = (struct md *)obj->local_data; #ifdef PLUGDEBUG fprintf(stderr,"midi_stream_info\n"); #endif if (!info) return 0; sprintf(info->stream_type, "%s midi: %d track%s, %lu events", d->midi_type, d->track_info, (d->track_info > 1)? "s" : "", d->event_count); if (d->artist[0]) snprintf(info->artist, 80, "%s", d->artist); else { if (!d->is_open && d->title[0]) sprintf(info->artist,"*"); else info->artist[0] = '\0'; } if (d->is_playing && !d->flushing_output_device) sprintf(info->status, "notes: %3d", d->current_polyphony); else sprintf(info->status, "notes: %3d", 0); if (d->is_open) { if (d->title[0]) sprintf(info->title, "%s", d->title); else strcpy(info->title, d->midi_name); } else { if (d->title[0]) sprintf(info->title, "%s [%s]", d->title, d->midi_type); else sprintf(info->title, "%s [%s]", d->midi_name, d->midi_type); } return 1; } static int midi_init() { #ifdef PLUGDEBUG fprintf(stderr,"midi_init\n"); #endif if (!init_midi()) return FALSE; return 1; } static void midi_shutdown() { #ifdef PLUGDEBUG fprintf(stderr,"midi_shutdown\n"); #endif } /*****for reference typedef struct _input_plugin { input_version_type version; input_flags_type flags; char *name; char *author; void *handle; input_init_type init; input_shutdown_type shutdown; input_plugin_handle_type plugin_handle; input_can_handle_type can_handle; input_open_type open; input_close_type close; input_play_frame_type play_frame; input_frame_seek_type frame_seek; input_frame_size_type frame_size; input_nr_frames_type nr_frames; input_frame_to_sec_type frame_to_sec; input_sample_rate_type sample_rate; input_channels_type channels; input_stream_info_type stream_info; input_nr_tracks_type nr_tracks; input_track_seek_type track_seek; } input_plugin; * **********/ input_plugin midi_plugin = { INPUT_PLUGIN_VERSION, /*0,*/ P_SEEK | P_REENTRANT, "MIDI player v0.01", "Greg Lee", NULL, midi_init, midi_shutdown, NULL, midi_can_handle, midi_open, midi_close, midi_play_frame, midi_frame_seek, midi_frame_size, midi_nr_frames, midi_frame_to_sec, midi_sample_rate, midi_channels, midi_stream_info, NULL, NULL }; input_plugin *input_plugin_info(void) { #ifdef PLUGDEBUG fprintf(stderr,"I'm me\n"); #endif init_midi(); return &midi_plugin; } alsaplayer-0.99.82/attic/midi/midi_in.1000066400000000000000000000273421466261456500176070ustar00rootroot00000000000000.TH midi_in 1 "8 Sep 1995" \" -*-nroff-*- .SH NAME midi_in \- plugin midi synthesizer for alsaplayer .P .SH SYNOPSIS .B midi_in is used by interfaces for alsaplayer(1) to play midi files. .P .SH DESCRIPTION midi_in is derived from TiMidity, which is a MIDI to WAVE converter using Gravis Ultrasound\-compatible patch files or AWE\-compatible SoundFonts to generate digital audio data from General MIDI, GS, or XG midi files. .P When it is plugged in to alsaplayer, it is given file names, and it examines the files to see if they contain midi data (it does not care whether the file name ends in ".mid"). When a file does have midi data, midi_in tells alsaplayer it can handle the file; otherwise, the file name will be passed to some other plugin (or rejected). .P Alsaplayer then asks midi_in to open the file and determine some facts about it: title, author, playing time. midi_in can tell the playing time, but usually cannot figure out the author or title, so the playing time is all the alsaplayer interface will display for you. .P If you decide to play the file, alsaplayer tells midi_in to play it, and midi_in reads the file, uses it's instrument patches to convert midi events into a stream of samples, and directs this stream back to alsaplayer, which sends the samples to an output plugin. Then, if all goes well, you hear the music. .P .SH PANEL DISPLAY Supposing that you are using the Gtk interface to alsaplayer, as a midi file is playing, you will see on the top line of the little information window either the name of the midi file, or possibly the title and/or author information from inside the midi file, if midi_in could find any. .P Below this is a line saying whether the midi file is a GM (General Midi), a GS (with Roland extensions to GM), or an XG file (with Yamaha extensions to GM/GS). The line also says how many tracks the file has and how many midi events are in it. .P To the right is a continuously updated display of how many concurrently sounding notes midi_in is dealing with. To make sense of the numbers displayed here (in case you're interested), you should know that midi_in usually works a second or two ahead of the music that you're hearing, and also that extra notes are generated to approximate reverberation and chorus effects, so often the numbers you see reported are much higher than the number of distinct notes that can be picked out by ear. Some instrument patches are in stereo, so this also adds to the number of notes midi_in actually generates, but which merge perceptually. (A single perceived note played with chorus and reverberation on a stereo patch requires at least 6 notes to be played.) .P There is only a theoretical limit of 256 simultaneously sounding notes, since before the polyphony gets this high, midi_in has to terminate some notes early, to give itself enough time to calculate samples fast enough to keep up with the music. Unless, I suppose, you have a very powerful computer. .P .SH OPTIONS Currently, it is not possible to pass any options or configuration information to midi_in from alsaplayer. It is possible to set some options for midi_in using a patch configuration file called timidity.cfg. It's rather involved, and I hope you don't need to do it. The details are described later. .SH FILES .TP .B PC42b.sf2 .P To work at all, midi_in requires instrument patches. It doesn't have any built in, so you have to supply them. That can be done very simply by acquiring the soundfont file PC42b.sf2 and putting it where midi_in can find it. The author of this "Personal Copy" soundfont, Jim Roe, very kindly allowed it to be distributed along with midi_in, so it you don't have it already, look for the file PC42b.tar.gz wherever you got the midi_in distribution, unpack it, and put the soundfont itself, PC42b.sf2 either in the subdirectory .alsaplayer/ of your home directory or else in the directory /usr/local/share/timidity/. (Actually, this last path name is just the default -- midi_in could have been configured to look in some different directory.) .P That's the easy way to provide instrument patches. There are alternatives that provide more flexibility but require more work. .TP .IB xxxx .sf2 .P If you have your own favorite soundfont of instrument patches, or just want to try some alternatives to PC42b.sf2, you can do that in the following way. Go to your .alsaplayer/ subdirectory of your home directory and move away or delete PC42b.sf2 and any file timidity.cfg that is there. Then put the new soundfont you'd like to use there, or perhaps just a soft link to it. When midi_in is next used, it will notice the new soundfont and construct a file timidity.cfg for it, which contains information about the structure of the soundfont. Then the new soundfont will be used. For this to work, the soundfont file name has to end in either ".sf2" or ".SF2". .P Since midi_in has special knowledge of the Personal Copy soundfont, it can make some substitutions appropriate for playing GS and XG midi files when you use PC42b.sf2. For other soundfonts, that can't be done. .P The file timidity.cfg that is contructed for a new soundfont and left in .alsaplayer/ is a text file which you can edit to add options, add, remove or modify information about individual patches within the soundfont, or bring in additional soundfonts. There's hardly any end to the possible elaborations for enriching the set of instrument patches available to midi_in as it plays midi files. .TP .B timidity.cfg .P midi_in looks for the configuration file \fItimidity.cfg\fP at startup, before processing any options. .P Configuration files define the mapping of MIDI programs to instrument files. Multiple files may be specified, and statements in later ones will override earlier ones. The following statements can be used in a configuration file: .TP .BI \-p " voices" Sets polyphony (maximum number of simultaneous voices) to \fIvoices\fP. .TP .BI \-A " amplification" Multiplies the master volume by \fIamplification\fP%. .TP .BI \-X " curve" With the value 0, the midi expression controller affects the volume linearly. With 1 (the default) or 2, it affects volume exponentially. .TP .BI \-V " curve" With the value 0, the midi volume controller affects the volume linearly. With 1 (the default) or 2, it affects volume exponentially. .TP .BI \-C " ratio" Sets the ratio of sampling and control frequencies. This determines how often envelopes are recalculated -- small ratios yield better quality but use more CPU time. .TP .BI \-s " frequency" Sets the resampling frequency. Not all sound devices are capable of all frequencies -- an approximate frequency may be selected, depending on the implementation. .TP .B \-k " number" Select interpolation algorithm for resampling: 0 for linear interpolation, 1 for cspline interpolation, 2 for LaGrange interpolation, 3 for cspline interpolation with low-pass filtering. .TP .B \-r " number" Set maximum of ram in megabytes to use up keeping patches from previously played midi files. This should presumably be less than your total ram plus disk cache size. The default is 60 megabytes. It probably doesn't matter unless you're using big sf2 soundfont patchsets. .TP .BI dir " directory" Adds \fIdirectory\fP to the search path in the same manner as the \fB\-L\fP command line option. .TP .BI source " file" Reads another configuration file, then continues processing the current one. .TP .BI sf " file [option]" Reads the parameters and waveforms in an AWE\-compatible SoundFont file. Both ".sbk" and ".sf2" SoundFonts can be used. Preceding patch mappings must list all patches that are to be loaded from the file, and the preceding \fBbank\fP/\fBdrumset\fP keywords must be followed by \fBsf\fP. The options allowed are: .RS .TP \fIbanknumber\fP The bank number given in the first preceding "bank"/"drumset" statement is to be used in place of the bank \fIbanknumber\fP given in the SoundFont itself. .RE .TP .BI bank " number [option]" Selects the tone bank to modify. Patch mappings that follow will affect this tone bank. The options allowed are \fBfff\fP and \fBsbk\fP, which were described above. .TP .BI drumset " number [option]" Selects the drum set to modify. Patch mappings that follow will affect this drum set. The options allowed are \fBfff\fP and \fBsbk\fP, which were described above. .TP .BI sfx Selects the XG non-rhythm SFX bank to modify. Patch mappings that follow will affect this tone bank. .TP .BI drumsfx1 .TP .BI drumsfx2 Select the XG rhythm SFX banks to modify. Patch mappings that follow will affect these tone banks. .TP .I "number file [options]" Specifies that the the MIDI program \fInumber\fP in the current tone bank or drum set should be played using the patch \fIfile\fP. \fIoptions\fP may be any of the following: .RS .TP \fBamp=\fP\fIamplification\fP Amplifies the instrument's volume by \fIamplification\fP percent. If no value is specified, one will be automatically determined whenever the instrument is loaded. .TP \fBnote=\fP\fInote\fP Specifies a fixed MIDI note to use when playing the instrument. If \fInote\fP is 0, the instrument will be played at whatever note the Note On event triggering it has. For percussion instruments, if no value is specified in the configuration file, the default in the patch file will be used. .TP \fBtuning=\fP\fIcents\fP Changes the pitch of the instrument. \fIcents\fP is a signed quantity in units of 1/100th of a semitone, so, e.g., specify "+1200" to go up an octave. The number must begin with a "+" or a "-". .TP \fBpan=\fP\fIpanning\fP Sets the instrument's default panning. \fIpanning\fP may be \fBleft\fP, \fBright\fP, \fBcenter\fP, or an integer between -100 and 100, designating full left and full right respectively. If no value is specified, the default in the patch file will be used. Note that panning controls in MIDI files will override this value. .TP \fBkeep=\fP{\fBloop\fP|\fBenv\fP} Strangely shaped envelopes are removed automatically from melodic instruments in GUS patches. \fBkeep\fP can be used to prevent stripping envelope or loop data. (Stripping envelopes was originally the default for TiMidity, but in this version it's not. So these options are no longer useful -- they are kept for compatibility. G.L.) .TP \fBstrip=\fP{\fBloop\fP|\fBenv\fP|\fBtail\fP} Force removal of loop or envelope information from all patches in the instrument, or strip the tail, i.e. all data after the loop. Some third-party instruments have garbage after the loop, as evidenced by a clicking noise whenever the instrument is played, so adding the \fBstrip=tail\fP option will markedly improve sound quality. .SH COPYRIGHT Copyright (C) 1995 Tuukka Toivonen. .br See AUTHORS below for additional copyrights. .P midi_in is free software; you can redistribute it and/or modify it under the terms of the \fIGNU General Public License\fP as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .P midi_in 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 \fIGNU General Public License\fP for more details. .SH AVAILABILITY Presently available by cvs from the alsaplayer area at www.sourceforge.net. .SH BUGS .P Eats more CPU time than a small CPU-time-eating animal. .SH AUTHORS Tuukka Toivonen .br AWE SoundFont support by Takashi Iwai .br IW patchset support, karaoke, AWE/XG enhancements, much reworking of the code, conversion to alsaplayer plugin by Greg Lee .br Effects filter by Nicolas Witczak , see URL \fIhttp://www.geocities.com/SiliconValley/Lab/6307/\fP). .br Portamento, mod wheel, and other enhancements from TiMidity++ Copyright (C) 1999 Masanao Izumo . See URL \fIhttp://www.goice.co.jp/member/mo/hack-progs/timidity.html\fP. alsaplayer-0.99.82/attic/midi/mix.c000066400000000000000000000347741466261456500170650ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . I bet they'll be amazed. mix.c */ #include #include #ifdef __FreeBSD__ #include #else #include #endif #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "controls.h" #include "tables.h" #include "resample.h" #include "mix.h" /* Returns 1 if envelope runs out */ int recompute_envelope(int v, struct md *d) { int stage; stage = d->voice[v].envelope_stage; #if 0 if (d->voice[v].envelope_offset[stage] >> 23 > 127) fprintf(stderr, "offset %d\n", d->voice[v].envelope_offset[stage]>>23); #endif if (stage>5) { /* Envelope ran out. */ if (!(d->voice[v].status & VOICE_FREE)) { d->voice[v].status = VOICE_FREE; ctl->note(v); } return 1; } /**if (d->voice[v].sample->modes & MODES_ENVELOPE)**/ if ((d->voice[v].sample->modes & MODES_ENVELOPE) && (d->voice[v].sample->modes & MODES_SUSTAIN)) { if (d->voice[v].status & (VOICE_ON | VOICE_SUSTAINED)) { if (stage>2) { /* Freeze envelope until note turns off. Trumpets want this. */ d->voice[v].envelope_increment=0; return 0; } } } d->voice[v].envelope_stage=stage+1; #if 0 fprintf(stderr, "v=%d stage %d, inc %ld[%ld], vol %ld[%ld], offset %ld[%ld]\n", v, stage, d->voice[v].envelope_increment, d->voice[v].envelope_increment>>23, d->voice[v].envelope_volume, d->voice[v].envelope_volume>>23, d->voice[v].envelope_offset[stage], d->voice[v].envelope_offset[stage]>>23); #endif #ifdef tplus if (d->voice[v].envelope_volume==(int)d->voice[v].envelope_offset[stage] || (stage > 2 && d->voice[v].envelope_volume < (int)d->voice[v].envelope_offset[stage])) #else if (d->voice[v].envelope_volume==d->voice[v].envelope_offset[stage]) #endif #if 0 if ( (d->voice[v].envelope_increment >= 0 && d->voice[v].envelope_volume >= d->voice[v].envelope_offset[stage]) || (d->voice[v].envelope_increment < 0 && d->voice[v].envelope_volume <= d->voice[v].envelope_offset[stage]) ) #endif return recompute_envelope(v, d); d->voice[v].envelope_target=d->voice[v].envelope_offset[stage]; d->voice[v].envelope_increment = d->voice[v].envelope_rate[stage]; if ((int)d->voice[v].envelope_targetvoice[v].envelope_volume) d->voice[v].envelope_increment = -d->voice[v].envelope_increment; #if 0 fprintf(stderr, " cont:v=%d, stage %d, inc %ld[%ld], vol %ld[%ld], offset %ld[%ld]\n", v, stage, d->voice[v].envelope_increment, d->voice[v].envelope_increment>>23, d->voice[v].envelope_volume, d->voice[v].envelope_volume>>23, d->voice[v].envelope_offset[stage], d->voice[v].envelope_offset[stage]>>23); #endif return 0; } #ifdef tplus int apply_envelope_to_amp(int v, struct md *d) #else void apply_envelope_to_amp(int v, struct md *d) #endif { FLOAT_T lamp=d->voice[v].left_amp, ramp; int32 la,ra; if (d->voice[v].panned == PANNED_MYSTERY) { ramp=d->voice[v].right_amp; if (d->voice[v].tremolo_phase_increment) { lamp *= d->voice[v].tremolo_volume; ramp *= d->voice[v].tremolo_volume; } if (d->voice[v].sample->modes & MODES_ENVELOPE) { lamp *= d->vol_table[d->voice[v].envelope_volume>>23]; ramp *= d->vol_table[d->voice[v].envelope_volume>>23]; #if 0 if (d->voice[v].envelope_volume>>23 > 127) fprintf(stderr,"env vol %d >>23 = %d\n", d->voice[v].envelope_volume, d->voice[v].envelope_volume >> 23); #endif } la = (int32)FRSCALE(lamp,AMP_BITS); if (la>MAX_AMP_VALUE) la=MAX_AMP_VALUE; ra = (int32)FRSCALE(ramp,AMP_BITS); if (ra>MAX_AMP_VALUE) ra=MAX_AMP_VALUE; #ifdef tplus if ((d->voice[v].status & (VOICE_OFF | VOICE_DIE | VOICE_FREE | VOICE_SUSTAINED)) && (la | ra) <= MIN_AMP_VALUE) { if (!(d->voice[v].status & VOICE_FREE)) { d->voice[v].status = VOICE_FREE; ctl->note(v); } return 1; } #endif d->voice[v].left_mix=FINAL_VOLUME(la); d->voice[v].right_mix=FINAL_VOLUME(ra); } else { if (d->voice[v].tremolo_phase_increment) lamp *= d->voice[v].tremolo_volume; if (d->voice[v].sample->modes & MODES_ENVELOPE) lamp *= d->vol_table[d->voice[v].envelope_volume>>23]; la = (int32)FRSCALE(lamp,AMP_BITS); if (la>MAX_AMP_VALUE) la=MAX_AMP_VALUE; #ifdef tplus if ( (d->voice[v].status & (VOICE_OFF | VOICE_DIE | VOICE_FREE | VOICE_SUSTAINED)) && la <= MIN_AMP_VALUE) { if (!(d->voice[v].status & VOICE_FREE)) { d->voice[v].status = VOICE_FREE; ctl->note(v); } return 1; } #endif d->voice[v].left_mix=FINAL_VOLUME(la); } #ifdef tplus return 0; #endif } static int update_envelope(int v, struct md *d) { d->voice[v].envelope_volume += d->voice[v].envelope_increment; if (d->voice[v].envelope_volume<0) d->voice[v].envelope_volume = 0; /* Why is there no ^^ operator?? */ if (((d->voice[v].envelope_increment < 0) && (d->voice[v].envelope_volume <= (int)d->voice[v].envelope_target)) || ((d->voice[v].envelope_increment > 0) && (d->voice[v].envelope_volume >= (int)d->voice[v].envelope_target))) { d->voice[v].envelope_volume = d->voice[v].envelope_target; if (recompute_envelope(v, d)) return 1; } return 0; } static void update_tremolo(int v, struct md *d) { int32 depth=d->voice[v].sample->tremolo_depth<<7; if (d->voice[v].tremolo_sweep) { /* Update sweep position */ d->voice[v].tremolo_sweep_position += d->voice[v].tremolo_sweep; if (d->voice[v].tremolo_sweep_position>=(1<voice[v].tremolo_sweep=0; /* Swept to max amplitude */ else { /* Need to adjust depth */ depth *= d->voice[v].tremolo_sweep_position; depth >>= SWEEP_SHIFT; } } d->voice[v].tremolo_phase += d->voice[v].tremolo_phase_increment; /* if (d->voice[v].tremolo_phase >= (SINE_CYCLE_LENGTH<voice[v].tremolo_phase -= SINE_CYCLE_LENGTH<voice[v].tremolo_volume = 1.0 - FRSCALENEG((sine(d->voice[v].tremolo_phase >> RATE_SHIFT) + 1.0) * depth * TREMOLO_AMPLITUDE_TUNING, 17); /* I'm not sure about the +1.0 there -- it makes tremoloed voices' volumes on average the lower the higher the tremolo amplitude. */ } /* Returns 1 if the note died */ static int update_signal(int v, struct md *d) { if (d->voice[v].envelope_increment && update_envelope(v, d)) return 1; if (d->voice[v].tremolo_phase_increment) update_tremolo(v, d); #ifdef tplus return apply_envelope_to_amp(v, d); #else apply_envelope_to_amp(v, d); return 0; #endif } #ifdef LOOKUP_HACK # define MIXATION(a) *lp++ += mixup[(a<<8) | (uint8)s]; #else # define MIXATION(a) *lp++ += (a)*s; #endif static void mix_mystery_signal(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { Voice *vp = d->voice + v; final_volume_t left=vp->left_mix, right=vp->right_mix; uint32 cc; sample_t s; if (!(cc = vp->control_counter)) { cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; right = vp->right_mix; } while (count) if (cc < count) { count -= cc; while (cc--) { s = *sp++; MIXATION(left); MIXATION(right); } cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; right = vp->right_mix; } else { vp->control_counter = cc - count; while (count--) { s = *sp++; MIXATION(left); MIXATION(right); } return; } } static void mix_center_signal(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { Voice *vp = d->voice + v; final_volume_t left=vp->left_mix; uint32 cc; sample_t s; if (!(cc = vp->control_counter)) { cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; } while (count) if (cc < count) { count -= cc; while (cc--) { s = *sp++; MIXATION(left); MIXATION(left); } cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; } else { vp->control_counter = cc - count; while (count--) { s = *sp++; MIXATION(left); MIXATION(left); } return; } } static void mix_single_signal(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { Voice *vp = d->voice + v; final_volume_t left=vp->left_mix; uint32 cc; sample_t s; if (!(cc = vp->control_counter)) { cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; } while (count) if (cc < count) { count -= cc; while (cc--) { s = *sp++; MIXATION(left); lp++; } cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; } else { vp->control_counter = cc - count; while (count--) { s = *sp++; MIXATION(left); lp++; } return; } } static void mix_mono_signal(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { Voice *vp = d->voice + v; final_volume_t left=vp->left_mix; uint32 cc; sample_t s; if (!(cc = vp->control_counter)) { cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; } while (count) if (cc < count) { count -= cc; while (cc--) { s = *sp++; MIXATION(left); } cc = control_ratio; if (update_signal(v, d)) return; /* Envelope ran out */ left = vp->left_mix; } else { vp->control_counter = cc - count; while (count--) { s = *sp++; MIXATION(left); } return; } } static void mix_mystery(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { final_volume_t left=d->voice[v].left_mix, right=d->voice[v].right_mix; sample_t s; while (count--) { s = *sp++; MIXATION(left); MIXATION(right); } } static void mix_center(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { final_volume_t left=d->voice[v].left_mix; sample_t s; while (count--) { s = *sp++; MIXATION(left); MIXATION(left); } } static void mix_single(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { final_volume_t left=d->voice[v].left_mix; sample_t s; while (count--) { s = *sp++; MIXATION(left); lp++; } } static void mix_mono(sample_t *sp, int32 *lp, int v, uint32 count, struct md *d) { final_volume_t left=d->voice[v].left_mix; sample_t s; while (count--) { s = *sp++; MIXATION(left); } } /* Ramp a note out in c samples */ static void ramp_out(sample_t *sp, int32 *lp, int v, uint32 c, struct md *d) { /* should be final_volume_t, but uint8 gives trouble. */ int32 left, right, li, ri; sample_t s=0; /* silly warning about uninitialized s */ left=d->voice[v].left_mix; if (c < 1) return; li=-(left/c); /*NB: c can be 0 here */ if (!li) li=-1; /* printf("Ramping out: left=%d, c=%d, li=%d\n", left, c, li); */ if (!(play_mode->encoding & PE_MONO)) { if (d->voice[v].panned==PANNED_MYSTERY) { right=d->voice[v].right_mix; ri=-(right/c); while (c--) { left += li; if (left<0) left=0; right += ri; if (right<0) right=0; s=*sp++; MIXATION(left); MIXATION(right); } } else if (d->voice[v].panned==PANNED_CENTER) { while (c--) { left += li; if (left<0) return; s=*sp++; MIXATION(left); MIXATION(left); } } else if (d->voice[v].panned==PANNED_LEFT) { while (c--) { left += li; if (left<0) return; s=*sp++; MIXATION(left); lp++; } } else if (d->voice[v].panned==PANNED_RIGHT) { while (c--) { left += li; if (left<0) return; s=*sp++; lp++; MIXATION(left); } } } else { /* Mono output. */ while (c--) { left += li; if (left<0) return; s=*sp++; MIXATION(left); } } } /**************** interface function ******************/ void mix_voice(int32 *buf, int v, uint32 c, struct md *d) { Voice *vp=d->voice+v; sample_t *sp; uint32 count=c; if (vp->status&VOICE_DIE) { /* this seems no longer useful: resample kill voices before they get here */ if (count>=MAX_DIE_TIME) count=MAX_DIE_TIME; sp=resample_voice(v, &count, d); ramp_out(sp, buf, v, count, d); vp->status=VOICE_FREE; } else { sp=resample_voice(v, &count, d); if (count<1) { vp->status=VOICE_FREE; return; } if (play_mode->encoding & PE_MONO) { /* Mono output. */ if (vp->envelope_increment || vp->tremolo_phase_increment) mix_mono_signal(sp, buf, v, count, d); else mix_mono(sp, buf, v, count, d); } else { if (vp->panned == PANNED_MYSTERY) { if (vp->envelope_increment || vp->tremolo_phase_increment) mix_mystery_signal(sp, buf, v, count, d); else mix_mystery(sp, buf, v, count, d); } else if (vp->panned == PANNED_CENTER) { if (vp->envelope_increment || vp->tremolo_phase_increment) mix_center_signal(sp, buf, v, count, d); else mix_center(sp, buf, v, count, d); } else { /* It's either full left or full right. In either case, every other sample is 0. Just get the offset right: */ if (vp->panned == PANNED_RIGHT) buf++; if (vp->envelope_increment || vp->tremolo_phase_increment) mix_single_signal(sp, buf, v, count, d); else mix_single(sp, buf, v, count, d); } } } } alsaplayer-0.99.82/attic/midi/mix.h000066400000000000000000000022101466261456500170460ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . mix.h */ extern void mix_voice(int32 *buf, int v, uint32 c, struct md *d); extern int recompute_envelope(int v, struct md *d); #ifdef tplus extern int apply_envelope_to_amp(int v, struct md *d); #else extern void apply_envelope_to_amp(int v, struct md *d); #endif alsaplayer-0.99.82/attic/midi/output.c000066400000000000000000000070061466261456500176140ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . output.c Audio output (to file / device) functions. */ #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include "output.h" #include "tables.h" extern PlayMode dumb_play_mode; #ifndef DEFAULT_PLAY_MODE #define DEFAULT_PLAY_MODE &dumb_play_mode #endif PlayMode *play_mode_list[] = { &dumb_play_mode, 0 }; PlayMode *play_mode=&dumb_play_mode; int output_clips = 0; /*int output_buffer_full = 50;*/ int enable_output_device = TRUE; /*int flushing_output_device = FALSE;*/ int output_frags = 0; int output_fragsize = 0; /*****************************************************************/ /* Some functions to convert signed 32-bit data to other formats */ void s32tos8(int32 *lp, uint32 c) { int8 *cp=(int8 *)(lp); int32 l; while (c--) { l=(*lp++)>>(32-8-GUARD_BITS); if (l>127) { l=127; output_clips++; } else if (l<-128) { l=-128; output_clips++; } *cp++ = (int8) (l); } } void s32tou8(int32 *lp, uint32 c) { uint8 *cp=(uint8 *)(lp); int32 l; while (c--) { l=(*lp++)>>(32-8-GUARD_BITS); if (l>127) { l=127; output_clips++; } else if (l<-128) { l=-128; output_clips++; } *cp++ = 0x80 ^ ((uint8) l); } } void s32tos16(int32 *lp, uint32 c) { int16 *sp=(int16 *)(lp); int32 l; while (c--) { l=(*lp++)>>(32-16-GUARD_BITS); if (l > 32767) { l=32767; output_clips++; } else if (l<-32768) { l=-32768; output_clips++; } *sp++ = (int16)(l); } } void s32tou16(int32 *lp, uint32 c) { uint16 *sp=(uint16 *)(lp); int32 l; while (c--) { l=(*lp++)>>(32-16-GUARD_BITS); if (l > 32767) { l=32767; output_clips++; } else if (l<-32768) { l=-32768; output_clips++; } *sp++ = 0x8000 ^ (uint16)(l); } } void s32tos16x(int32 *lp, uint32 c) { int16 *sp=(int16 *)(lp); int32 l; while (c--) { l=(*lp++)>>(32-16-GUARD_BITS); if (l > 32767) { l=32767; output_clips++; } else if (l<-32768) { l=-32768; output_clips++; } *sp++ = XCHG_SHORT((int16)(l)); } } void s32tou16x(int32 *lp, uint32 c) { uint16 *sp=(uint16 *)(lp); int32 l; while (c--) { l=(*lp++)>>(32-16-GUARD_BITS); if (l > 32767) { l=32767; output_clips++; } else if (l<-32768) { l=-32768; output_clips++; } *sp++ = XCHG_SHORT(0x8000 ^ (uint16)(l)); } } void s32toulaw(int32 *lp, uint32 c) { uint8 *up=(uint8 *)(lp); int32 l; while (c--) { l=(*lp++)>>(32-13-GUARD_BITS); if (l > 4095) { l=4095; output_clips++; } else if (l<-4096) { l=-4096; output_clips++; } *up++ = _l2u[l]; } } alsaplayer-0.99.82/attic/midi/output.h000066400000000000000000000062731466261456500176260ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . output.h */ #ifndef OUTPUT_H #define OUTPUT_H /* Data format encoding bits */ #define PE_MONO 0x01 /* versus stereo */ #define PE_SIGNED 0x02 /* versus unsigned */ #define PE_16BIT 0x04 /* versus 8-bit */ #define PE_ULAW 0x08 /* versus linear */ #define PE_BYTESWAP 0x10 /* versus the other way */ typedef struct { uint32 rate, encoding; int fd; /* file descriptor for the audio device */ int32 extra_param[5]; /* e.g. buffer fragments, output channel, ... */ const char *id_name; char id_character; const char *name; /* default device or file name */ int (*open_output)(struct md *d); /* 0=success, 1=warning, -1=fatal error */ void (*close_output)(struct md *d); void (*output_data)(int32 *buf, uint32 count, struct md *d); int (*driver_output_data)(unsigned char *buf, uint32 count, struct md *d); void (*flush_output)(struct md *d); void (*purge_output)(struct md *d); int (*output_count)(uint32 ct, struct md *d); } PlayMode; extern PlayMode *play_mode_list[], *play_mode; extern char *cfg_names[]; extern int got_a_configuration; /*extern int output_buffer_full;*/ /*extern int output_device_open;*/ /*extern int flushing_output_device;*/ extern int plug_output(unsigned char *buf, struct md *d); /* extern int current_sample_count(uint32 ct); */ /* extern int driver_output_data(char *buf, uint32 count); */ extern int b_out_count(struct md *d); extern void b_out(char id, int fd, int *buf, int ocount, struct md *d); /* Conversion functions -- These overwrite the int32 data in *lp with data in another format */ extern int output_clips; extern int output_frags; extern int output_fragsize; /* 8-bit signed and unsigned*/ extern void s32tos8(int32 *lp, uint32 c); extern void s32tou8(int32 *lp, uint32 c); /* 16-bit */ extern void s32tos16(int32 *lp, uint32 c); extern void s32tou16(int32 *lp, uint32 c); /* byte-exchanged 16-bit */ extern void s32tos16x(int32 *lp, uint32 c); extern void s32tou16x(int32 *lp, uint32 c); /* uLaw (8 bits) */ extern void s32toulaw(int32 *lp, uint32 c); /* little-endian and big-endian specific */ #ifdef LITTLE_ENDIAN #define s32tou16l s32tou16 #define s32tou16b s32tou16x #define s32tos16l s32tos16 #define s32tos16b s32tos16x #else #define s32tou16l s32tou16x #define s32tou16b s32tou16 #define s32tos16l s32tos16x #define s32tos16b s32tos16 #endif #endif /*OUTPUT_H*/ alsaplayer-0.99.82/attic/midi/pcmap.c000066400000000000000000000747751466261456500173750ustar00rootroot00000000000000/* pcmap.c * * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id$ Greg Lee */ /* bank 1 sf */ /* */ /* 120 Cut_Noise */ /* 121 Fl._Key_Click */ /* 122 Rain */ /* This table is derived from Eric Welsh's .cfg files for hiw "eawpats" distribution. */ #define STS 1 #define SDS 2 static int pc42bmap[][7] = { /* Toneset?, bank, prog, newbank, newprog, note, pan */ {STS, 1, 123, 56, 76, 1, 0 }, /* Dog1oct1 */ {STS, 1, 124, 0, 124, 0, 0 }, /* sfx/dialtone # telephone dial */ {STS, 1, 125, 56, 63, 1, 0 }, /* sfx/carengin # car engine */ {STS, 1, 126, 56, 52, 1, 0 }, /* sfx/laugh # laughing */ {STS, 1, 127, 56, 73, 1, 0 }, /* sfx/machgun2 # machine gun */ {STS, 2, 120, 0, 120, 0, 0 }, /* fx-fret # string slap */ /* 122 Thunder*/ {STS, 2, 123, 56, 77, 1, 0 }, /* sfx/hoofs # horse gallop */ {STS, 2, 124, 56, 59, 1, 0 }, /* sfx/creak # door creaking */ {STS, 2, 125, 56, 64, 1, 0 }, /* sfx/carstop # car stop */ {STS, 2, 126, 56, 53, 1, 0 }, /* sfx/scream # screaming */ {STS, 2, 127, 56, 81, 1, 0 }, /* gus/sqrwave # laser gun */ {STS, 3, 120, 56, 49, 1, 0 }, /* sfx/cutnoiz # cut noise 2 */ {STS, 3, 122, 56, 82, 1, 0 }, /* sfx/newwind amp=75 # wind */ {STS, 3, 123, 56, 78, 1, 0 }, /* sfx/birdtwee amp=25 # bird 2 */ {STS, 3, 124, 56, 60, 1, 0 }, /* sfx/door # door slam */ {STS, 3, 125, 56, 65, 1, 0 }, /* sfx/carpass # car pass */ {STS, 3, 126, 56, 54, 1, 0 }, /* sfx/punch # punch */ {STS, 3, 127, 56, 75, 1, 0 }, /* pistol # explosion */ {STS, 4, 120, 56, 48, 1, 0 }, /* sfx/cutnoiz # dist cut noise */ {STS, 4, 122, 56, 83, 1, 0 }, /* sfx/stream amp=75 # stream */ {STS, 4, 123, 56, 78, 1, 0 }, /* sfx/meow BIRD! # kitty */ {STS, 4, 124, 56, 61, 1, 0 }, /* sfx/scratch1 # scratch */ {STS, 4, 125, 56, 66, 1, 0 }, /* sfx/carcrash # car crash */ {STS, 4, 126, 56, 55, 1, 0 }, /* sfx/heartbt # heart beat */ {STS, 4, 127, 56, 58, 1, 0 }, /* sfx/firework APPLAUSE! # fireworks (?) */ {STS, 5, 120, 0, 120, 0, 0 }, /* fx-fret # bass slide */ {STS, 5, 122, 56, 84, 1, 0 }, /* sfx/bubbles1 # bubble */ {STS, 5, 123, 56, 76, 1, 0 }, /* sfx/doggrowl # growl */ {STS, 5, 124, 56, 62, 1, 0 }, /* sfx/windchim RIDE BELL! # wind chime */ {STS, 5, 125, 56, 67, 1, 0 }, /* sfx/ambulanc # siren */ {STS, 5, 126, 56, 56, 1, 0 }, /* mazpat/fx/newstep # footsteps */ {STS, 6, 120, 0, 120, 0, 0 }, /* fx-fret # pick strape */ {STS, 6, 124, 56, 61, 1, 0 }, /* sfx/scratch2 # scratch 2 (?) */ {STS, 6, 125, 56, 68, 1, 0 }, /* mazpat/fx/newtrain # train */ {STS, 6, 126, 56, 58, 1, 0 }, /* applause # applause 2 */ {STS, 7, 124, 56, 61, 1, 0 }, /* sfx/scratch2 # scratch 2 */ {STS, 7, 125, 56, 82, 1, 0 }, /* mazpat/fx/jet amp=70 # jetplane */ {STS, 8, 125, 56, 81, 1, 0 }, /* sfx/starship # starship */ {STS, 9, 125, 56, 72, 1, 0 }, /* pistol # burst noise */ /* bank 120 */ { STS, 120, 0, 56, 48, 1, 0 }, /* sfx/cutnoiz # cut noise */ { STS, 120, 1, 56, 49, 1, 0 }, /* sfx/cutnoiz # cut noise 2 */ { STS, 120, 2, 56, 48, 1, 0 }, /* sfx/cutnoiz # dist cut noise */ { STS, 120, 3, 0, 120, 0, 0 }, /* fx-fret # string slap */ { STS, 120, 4, 0, 120, 0, 0 }, /* fx-fret # bass slide */ { STS, 120, 5, 0, 120, 0, 0 }, /* fx-fret # pick strape */ { STS, 120, 16, 1, 121, 0, 0 }, /* sfx/flclick # fl key click */ { STS, 120, 32, 56, 82, 1, 0 }, /* mazpat/fx/rainyday # rain */ { STS, 120, 33, 56, 80, 1, 0 }, /* sfx/thunder2 # thunder */ { STS, 120, 34, 56, 82, 1, 0 }, /* sfx/newwind amp=75 # wind */ { STS, 120, 35, 56, 81, 1, 0 }, /* sfx/stream amp=75 # stream */ { STS, 120, 36, 56, 84, 1, 0 }, /* sfx/bubbles1 # bubbling */ /* #37 # feed */ { STS, 120, 48, 56, 76, 1, 0 }, /* sfx/dog1 # dog */ { STS, 120, 49, 56, 77, 1, 0 }, /* sfx/hoofs # horse gallop */ { STS, 120, 50, 56, 78, 1, 0 }, /* sfx/birdtwee amp=25 # bird 2 */ { STS, 120, 51, 56, 78, 1, 0 }, /* sfx/meow # kitty */ { STS, 120, 52, 56, 76, 1, 0 }, /* sfx/doggrowl # growl */ /* #53 # haunted */ { STS, 120, 54, 56, 82, 1, 0 }, /* sfx/ghost # ghost */ /* #55 sfx/badmaou # maou */ { STS, 120, 64, 0, 124, 0, 0 }, /* sfx/dialtone # telephone dial */ { STS, 120, 65, 56, 59, 1, 0 }, /* sfx/creak # door creaking */ { STS, 120, 66, 56, 60, 1, 0 }, /* sfx/door # door slam */ { STS, 120, 67, 56, 29, 1, 0 }, /* sfx/scratch1 # scratch */ { STS, 120, 68, 56, 30, 1, 0 }, /* sfx/scratch2 # scratch 2 */ { STS, 120, 69, 56, 62, 1, 0 }, /* sfx/windchim # wind chime */ { STS, 120, 70, 0, 124, 0, 0 }, /* telephon # telephone 2 */ { STS, 120, 80, 56, 63, 1, 0 }, /* sfx/carengin # car engine */ { STS, 120, 81, 56, 64, 1, 0 }, /* sfx/carstop # car stop */ { STS, 120, 82, 56, 65, 1, 0 }, /* sfx/carpass # car pass */ { STS, 120, 83, 56, 66, 1, 0 }, /* sfx/carcrash # car crash */ { STS, 120, 84, 56, 67, 1, 0 }, /* sfx/ambulanc # siren */ { STS, 120, 85, 56, 68, 1, 0 }, /* mazpat/fx/newtrain # train */ { STS, 120, 86, 56, 82, 1, 0 }, /* mazpat/fx/jet amp=70 # jetplane */ { STS, 120, 87, 56, 81, 1, 0 }, /* sfx/starship # starship */ { STS, 120, 88, 56, 72, 1, 0 }, /* pistol # burst noise */ { STS, 120, 89, 56, 68, 1, 0 }, /* mazpat/fx/train # coaster */ { STS, 120, 90, 56, 84, 1, 0 }, /* sfx/bubbles1 # submarine (needs to be replaced) */ { STS, 120, 96, 56, 52, 1, 0 }, /* sfx/laugh # laughing */ { STS, 120, 97, 56, 53, 1, 0 }, /* sfx/scream # screaming */ { STS, 120, 98, 56, 54, 1, 0 }, /* sfx/punch # punch */ { STS, 120, 99, 56, 55, 1, 0 }, /* sfx/heartbt # heart beat */ { STS, 120, 100, 56, 56, 1, 0 }, /* mazpat/fx/newstep # footsteps */ { STS, 120, 101, 56, 58, 1, 0 }, /* applause # applause 2 */ { STS, 120, 112, 56, 73, 1, 0 }, /* sfx/machgun2 # machine gun */ { STS, 120, 113, 56, 69, 1, 0 }, /* gus/sqrwave # laser gun */ { STS, 120, 114, 56, 72, 1, 0 }, /* pistol # explosion */ { STS, 120, 115, 56, 58, 1, 0 }, /* sfx/firework # fireworks */ /* drumset 0 sf Standard */ { SDS, 0, 13, 0, 86, 0, 0 }, /* surdo1 note=86 pan=-21 */ { SDS, 0, 14, 0, 87, 0, 0 }, /* surdo2 note=87 pan=-32 */ { SDS, 0, 15, 0, 27, 0, 0 }, /* highq note=65 pan=-21 amp=50 */ { SDS, 0, 16, 8, 28, 0, 0 }, /* slap note=28 pan=-21 */ { SDS, 0, 17, 0, 29, 0, 0 }, /* scratch1 note=29 pan=-19 amp=30 */ { SDS, 0, 18, 0, 30, 0, 0 }, /* scratch2 note=30 pan=-19 amp=30 */ { SDS, 0, 19, 0, 27, 0, 0 }, /* snap note=65 pan=center */ { SDS, 0, 20, 8, 32, 0, 0 }, /* sqrclick note=60 pan=center */ { SDS, 0, 21, 0, 33, 0, 0 }, /* metclick note=60 pan=center */ { SDS, 0, 22, 0, 53, 0, 0 }, /* metbell note=60 pan=center */ /* ?? Ride Bell */ { SDS, 0, 23, 0, 34, 0, 0 }, /* metclick note=60 pan=center # Seq Click L */ /* 24 metclick note=60 pan=center # Seq Click H */ /* # needed to remap sets 24/25 */ { SDS, 0, 100, 0, 119, 1, 0 }, /* gsdrum25/revcym pan=center note=52 # reverse cymbal */ /* # repitch congas for most XG sets (verified as correct) */ { SDS, 0, 101, 8, 63, 0, 0 }, /* congahi1 pan=-40 note=52 # +7 */ { SDS, 0, 102, 8, 63, 0, 0 }, /* congahi2 pan=-62 note=61 # +4 */ { SDS, 0, 103, 8, 63, 0, 0 }, /* congalo pan=center note=62 # low */ /* # conga pitches for XG Analog set (verified as correct) */ { SDS, 0, 104, 8, 63, 0, 0 }, /* congahi1 pan=-40 note=55 # +12 */ { SDS, 0, 105, 8, 63, 0, 0 }, /* congahi2 pan=-62 note=62 # +7 */ { SDS, 0, 106, 8, 63, 0, 0 }, /* congalo pan=center note=60 # low */ /* # Dance */ /* drumset 26 */ /* */ /* # like the Electric set but with CR-78 drums */ { SDS, 26, 35, 24, 35, 0, 0 }, /* gsdrum25/78kick pan=center amp=100 note=36 */ { SDS, 26, 36, 24, 36, 0, 0 }, /* gsdrum25/808bd2 pan=center amp=100 */ { SDS, 26, 38, 24, 38, 0, 0 }, /* gsdrum25/78snare pan=center */ { SDS, 26, 40, 24, 40, 0, 0 }, /* gsdrum25/909snare pan=center note=38 */ { SDS, 26, 41, 24, 41, 0, 0 }, /* gsdrum25/808toml2 pan=-63 */ { SDS, 26, 42, 24, 42, 0, 0 }, /* gsdrum25/78hhc pan=21 */ { SDS, 26, 43, 24, 43, 0, 0 }, /* gsdrum25/808toml1 pan=-40 */ { SDS, 26, 45, 24, 45, 0, 0 }, /* gsdrum25/808tomm2 pan=-19 */ { SDS, 26, 46, 24, 46, 0, 0 }, /* gsdrum25/78hho pan=21 */ { SDS, 26, 47, 24, 47, 0, 0 }, /* gsdrum25/808tomm1 pan=center */ { SDS, 26, 48, 24, 48, 0, 0 }, /* gsdrum25/808tomh2 pan=30 */ { SDS, 26, 50, 24, 50, 0, 0 }, /* gsdrum25/808tomh1 pan=63 */ { SDS, 26, 52, 24, 52, 0, 0 }, /* gsdrum25/revcym pan=center */ /* */ /* # Roland SC-88 Ethnic Set */ /* drumset 49 */ /* */ /* # Normal drums should be ok, but most of the exotic drums sound wrong. I */ /* # have a set of reference samples from an SC-88 now, so I will improve the */ /* # exotic drum assignments in the future. There are two mappings for the */ /* # tablas. The bongo/conga mapping is taken from the included tabla.txt. */ /* # The tabla.pat tabla mapping is based off the bongo/conga tabla mapping, */ /* # where I tried to assign the pitches by ear to those heard in the bongo/conga */ /* # mapping. I hadn't done this correctly in some previous releases, but */ /* # hopefully I've got it right now. The pitches of the two different mappings */ /* # should sound the same. */ { SDS, 49, 25, 8, 26, 0, 0 }, /* snap note=65 pan=center # Finger Snap */ { SDS, 49, 26, 0, 54, 0, 0 }, /* tamborin note=60 pan=center # Tambourine */ { SDS, 49, 27, 0, 85, 0, 0 }, /* castinet note=85 pan=center # Castanets */ { SDS, 49, 28, 0, 55, 0, 0 }, /* cymcrsh1 note=49 pan=8 amp=90 # Crash Cymbal1 */ { SDS, 49, 29, 8, 41, 0, 0 }, /* snarerol keep=env note=60 amp=225 pan=center # Snare Roll ?? */ { SDS, 49, 30, 99, 38, 0, 0 }, /* snare1 note=38 pan=center # Concert Snare Drum */ { SDS, 49, 31, 0, 55, 0, 0 }, /* cymcrsh2 note=57 pan=-21 amp=90 # Concert Cymbal */ { SDS, 49, 32, 0, 35, 0, 0 }, /* concrtbd note=48 pan=center # Concert BD1 */ { SDS, 49, 33, 0, 83, 0, 0 }, /* jingles note=92 pan=65 # Jingle Bell */ { SDS, 49, 34, 8, 84, 0, 0 }, /* belltree note=84 pan=center keep=loop keep=env # Bell Tree */ { SDS, 49, 35, 8, 84, 0, 0 }, /* belltree note=84 keep=loop keep=env # Bar Chimes */ { SDS, 49, 36, 99, 47, 0, 0 }, /* tommid1 note=47 # Wadaiko */ { SDS, 49, 37, 0, 37, 0, 0 }, /* stickrim note=37 # Wadaiko Rim */ { SDS, 49, 38, 99, 47, 0, 0 }, /* tommid1 note=47 # Shimo Taiko */ { SDS, 49, 39, 99, 47, 0, 0 }, /* tommid1 note=47 # Atarigana */ { SDS, 49, 40, 99, 48, 0, 0 }, /* tommid1 note=47 # Hyoushigi */ { SDS, 49, 41, 99, 48, 0, 0 }, /* tommid1 note=47 # Ohkawa */ { SDS, 49, 42, 8, 63, 0, 0 }, /* congahi2 note=62 # High Kotsuzumi */ { SDS, 49, 43, 8, 63, 0, 0 }, /* congalo note=60 # Low Kotsuzumi */ { SDS, 49, 44, 99, 50, 0, 0 }, /* tommid1 note=47 # Ban Gu */ { SDS, 49, 45, 0, 14, 1, 0 }, /* ethnic/gong note=59 # Big Gong */ { SDS, 49, 46, 0, 14, 1, 0 }, /* ethnic/gong note=59 # Small Gong */ { SDS, 49, 47, 0, 14, 1, 0 }, /* ethnic/gong note=59 # Bend Gong */ { SDS, 49, 48, 0, 14, 1, 0 }, /* ethnic/gong note=59 # Thai Gong */ { SDS, 49, 49, 8, 52, 1, 0 }, /* cymchina note=52 # Rama Cymbal */ { SDS, 49, 50, 8, 52, 0, 0 }, /* cymchina note=52 # Gamelon Gong */ { SDS, 49, 51, 99, 47, 0, 0 }, /* tommid1 note=47 # Udo Short */ { SDS, 49, 52, 99, 48, 0, 0 }, /* tommid1 note=47 # Udo Long */ { SDS, 49, 53, 8, 28, 0, 0 }, /* slap note=28 # Udo Slap */ { SDS, 49, 54, 8, 63, 0, 0 }, /* congalo note=60 # Bendir */ { SDS, 49, 55, 8, 63, 0, 0 }, /* congalo note=60 # Rec Dum */ { SDS, 49, 56, 8, 63, 0, 0 }, /* congalo note=60 # Rec Tik */ { SDS, 49, 57, 0, 104, 1, 0 }, /* ethnic/tabla note=60 # Tabla Te */ { SDS, 49, 58, 0, 104, 1, 0 }, /* ethnic/tabla note=52 # Tabla Na */ { SDS, 49, 59, 0, 104, 1, 0 }, /* ethnic/tabla note=50 # Tabla Tun */ { SDS, 49, 60, 0, 104, 1, 0 }, /* ethnic/tabla note=43 # Tabla Ge */ { SDS, 49, 61, 0, 104, 1, 0 }, /* ethnic/tabla note=55 # Tabla Ge Hi */ { SDS, 49, 62, 0, 117, 1, 0 }, /* ethnic/talkdrum note=64 # Talking Drum */ { SDS, 49, 63, 0, 117, 1, 0 }, /* ethnic/talkbend note=51 # Bend Talking Drum */ { SDS, 49, 64, 8, 63, 0, 0 }, /* congalo note=60 # Caxixi */ { SDS, 49, 65, 99, 61, 0, 0 }, /* bongohi note=60 # Djembe */ { SDS, 49, 66, 99, 60, 0, 0 }, /* stickrim note=37 # Djembe Rim */ { SDS, 49, 67, 99, 66, 0, 0 }, /* timbalel note=60 pan=center # Timbales Low */ { SDS, 49, 68, 0, 66, 0, 0 }, /* timbalel note=60 pan=center # Timbales Paila */ { SDS, 49, 69, 0, 65, 0, 0 }, /* timbaleh note=60 pan=center # Timbales High */ { SDS, 49, 70, 8, 56, 0, 0 }, /* cowbell note=56 pan=21 # Cowbell */ { SDS, 49, 71, 99, 61, 0, 0 }, /* bongohi note=60 pan=73 # Hi Bongo */ { SDS, 49, 72, 99, 61, 0, 0 }, /* bongolo note=61 pan=73 # Low Bongo */ { SDS, 49, 73, 8, 63, 0, 0 }, /* congahi1 note=55 pan=-40 # Mute Hi Conga */ { SDS, 49, 74, 8, 63, 0, 0 }, /* congahi2 note=62 pan=-62 # Open Hi Conga */ { SDS, 49, 75, 8, 63, 0, 0 }, /* congalo note=60 pan=center # Mute Low Conga */ { SDS, 49, 76, 8, 63, 0, 0 }, /* congalo note=60 pan=center # Conga Slap */ { SDS, 49, 77, 8, 63, 0, 0 }, /* congalo note=60 pan=center # Open Low Conga */ { SDS, 49, 78, 8, 63, 0, 0 }, /* congalo note=60 pan=center # Conga Slide */ { SDS, 49, 79, 0, 86, 0, 0 }, /* surdo1 note=86 pan=-21 # Mute Pandiero */ { SDS, 49, 80, 0, 87, 0, 0 }, /* surdo2 note=87 pan=-21 # Open Pandiero */ { SDS, 49, 81, 0, 87, 0, 0 }, /* surdo2 note=87 pan=-21 # Open Surdo */ { SDS, 49, 82, 0, 86, 0, 0 }, /* surdo1 note=86 pan=-21 # Mute Surdo */ { SDS, 49, 83, 0, 54, 0, 0 }, /* tamborin note=60 pan=center # Tamborim */ { SDS, 49, 84, 99, 67, 0, 0 }, /* agogohi note=60 pan=-48 # High Agogo */ { SDS, 49, 85, 99, 68, 0, 0 }, /* agogolo note=60 pan=-48 # Low Agogo */ { SDS, 49, 86, 99, 82, 0, 0 }, /* shaker note=82 pan=30 # Shaker */ { SDS, 49, 87, 99, 71, 0, 0 }, /* whistle1 note=60 pan=59 keep=loop keep=env # High Whistle */ { SDS, 49, 88, 99, 72, 0, 0 }, /* whistle2 note=60 pan=59 keep=loop keep=env # Low Whistle */ { SDS, 49, 89, 99, 78, 0, 0 }, /* cuica1 note=60 pan=-68 # Mute Cuica */ { SDS, 49, 90, 99, 79, 0, 0 }, /* cuica2 note=79 pan=-48 # Open Cuica */ { SDS, 49, 91, 99, 80, 0, 0 }, /* triangl1 note=60 pan=-62 # Mute Triangle */ { SDS, 49, 92, 99, 81, 0, 0 }, /* triangl2 note=60 pan=-62 # Open Triangle */ { SDS, 49, 93, 99, 73, 0, 0 }, /* guiro1 note=73 pan=49 # Short Guiro */ { SDS, 49, 94, 99, 74, 0, 0 }, /* guiro2 note=60 pan=73 keep=env # Long Guiro */ { SDS, 49, 95, 99, 69, 0, 0 }, /* cabasa note=69 pan=-57 # Cabasa Up */ { SDS, 49, 96, 99, 69, 0, 0 }, /* cabasa note=69 pan=-57 # Cabasa Down */ { SDS, 49, 97, 99, 75, 0, 0 }, /* clave note=75 pan=center # Claves */ { SDS, 49, 98, 99, 76, 0, 0 }, /* woodblk1 note=60 pan=63 # High Wood Block */ { SDS, 49, 99, 99, 77, 0, 0 }, /* woodblk2 note=60 pan=63 # Low Wood Block */ /* # Roland SC-88 Kick & Snare Set */ /* drumset 50 */ { SDS, 50, 40, 99, 36, 0, 0 }, /* kick1 note=35 pan=center # Standard 1 Kick 1 */ { SDS, 50, 41, 99, 35, 0, 0 }, /* kick2 note=36 pan=center # Standard 1 Kick 2 */ { SDS, 50, 42, 99, 36, 0, 0 }, /* kick1 note=35 pan=center # Standard 2 Kick 1 */ { SDS, 50, 43, 99, 35, 0, 0 }, /* kick2 note=36 pan=center # Standard 2 Kick 2 */ { SDS, 50, 44, 99, 36, 0, 0 }, /* kick1 note=35 pan=center # Kick 1 */ { SDS, 50, 45, 99, 35, 0, 0 }, /* kick2 note=36 pan=center # Kick 2 */ { SDS, 50, 46, 99, 35, 0, 0 }, /* kick2 note=36 pan=center # Soft Kick */ { SDS, 50, 47, 99, 36, 0, 0 }, /* kick1 note=35 pan=center # Jazz Kick 1 */ { SDS, 50, 48, 99, 35, 0, 0 }, /* kick2 note=36 pan=center # Jazz Kick 2 */ { SDS, 50, 49, 0, 35, 0, 0 }, /* concrtbd note=48 pan=center # Concert BD */ { SDS, 50, 50, 8, 36, 0, 0 }, /* kick1 note=35 pan=center # Room Kick 1 */ { SDS, 50, 51, 8, 35, 0, 0 }, /* gsdrum08/roomkick note=36 pan=center # Room Kick 2 */ { SDS, 50, 52, 16, 36, 0, 0 }, /* power/powrkic1 amp=150 note=36 pan=center # Power Kick 1 */ { SDS, 50, 53, 16, 35, 0, 0 }, /* power/powrkic3 amp=150 note=36 pan=center # Power Kick 2 */ { SDS, 50, 54, 24, 35, 0, 0 }, /* power/powrkic1 amp=150 note=36 pan=center # Electric Kick 2 (1?) */ { SDS, 50, 55, 24, 36, 0, 0 }, /* power/powrkic3 amp=150 note=36 pan=center # Electric Kick 1 (2?) */ { SDS, 50, 56, 24, 36, 0, 0 }, /* power/powrkic1 amp=150 note=36 pan=center # Electric Kick */ { SDS, 50, 57, 25, 36, 0, 0 }, /* gsdrum25/808bd2 amp=100 note=36 pan=center # 808 Bass Drum */ { SDS, 50, 58, 25, 35, 0, 0 }, /* gsdrum25/909kick amp=100 note=36 pan=center # 909 Bass Drum */ { SDS, 50, 59, 32, 35, 0, 0 }, /* gsdrum25/78kick amp=100 note=36 pan=center # Dance Kick */ { SDS, 50, 60, 32, 38, 0, 0 }, /* snare1 note=38 pan=center # Standard 1 Snare 1 */ { SDS, 50, 61, 32, 40, 0, 0 }, /* snare2 note=40 pan=center # Standard 1 Snare 2 */ { SDS, 50, 62, 32, 38, 0, 0 }, /* snare1 note=38 pan=center # Standard 2 Snare 1 */ { SDS, 50, 63, 32, 40, 0, 0 }, /* snare2 note=40 pan=center # Standard 2 Snare 2 */ { SDS, 50, 64, 32, 40, 0, 0 }, /* snare2 note=40 pan=center # Tight Snare */ { SDS, 50, 65, 32, 38, 0, 0 }, /* snare1 note=38 pan=center # Concert Snare */ { SDS, 50, 66, 32, 38, 0, 0 }, /* snare1 note=38 pan=center # Jazz Snare 1 */ { SDS, 50, 67, 32, 40, 0, 0 }, /* snare2 note=40 pan=center # Jazz Snare 2 */ { SDS, 50, 68, 32, 38, 0, 0 }, /* snare1 note=38 pan=center # Room Snare 1 */ { SDS, 50, 69, 32, 40, 0, 0 }, /* snare2 note=40 pan=center # Room Snare 2 */ { SDS, 50, 70, 16, 38, 0, 0 }, /* power/gatesd1 pan=center note=38 # Power Snare 1 */ { SDS, 50, 71, 16, 40, 0, 0 }, /* power/gatesd0 pan=center note=38 # Power Snare 2 */ { SDS, 50, 72, 16, 39, 0, 0 }, /* power/gatesd2 pan=center note=38 # Gated Snare */ { SDS, 50, 73, 32, 38, 0, 0 }, /* gsdrum25/78snare pan=center note=38 # Dance Snare 1 */ { SDS, 50, 74, 32, 40, 0, 0 }, /* gsdrum25/909snare pan=center note=40 # Dance Snare 2 */ { SDS, 50, 75, 32, 40, 0, 0 }, /* snare1 pan=center note=38 # Disco Snare */ { SDS, 50, 76, 24, 40, 0, 0 }, /* power/gatesd0 pan=center note=38 # Electric Snare 2 */ { SDS, 50, 77, 24, 39, 0, 0 }, /* power/gatesd1 pan=center note=38 # House Snare */ { SDS, 50, 78, 24, 38, 0, 0 }, /* power/gatesd1 pan=center note=38 # Electric Snare 1 */ { SDS, 50, 79, 24, 39, 0, 0 }, /* power/gatesd0 pan=center note=38 # Electric Snare 3 */ { SDS, 50, 80, 25, 38, 0, 0 }, /* gsdrum25/808snare pan=center note=38 # 808 Snare 1 */ { SDS, 50, 81, 25, 40, 0, 0 }, /* gsdrum25/808snar2 pan=center note=40 # 808 Snare 2 */ { SDS, 50, 82, 25, 38, 0, 0 }, /* gsdrum25/909snare pan=center note=38 # 909 Snare 1 */ { SDS, 50, 83, 25, 40, 0, 0 }, /* gsdrum25/808snar2 pan=center note=40 # 909 Snare 2 */ { SDS, 50, 84, 40, 33, 0, 0 }, /* gsdrum40/br_swish amp=70 pan=center note=38 # Brush Tap1 */ { SDS, 50, 85, 40, 34, 0, 0 }, /* gsdrum40/br_swish amp=70 pan=center note=38 # Brush Tap2 */ { SDS, 50, 86, 40, 39, 0, 0 }, /* gsdrum40/br_slap pan=center note=39 # Brush Slap1 */ { SDS, 50, 87, 40, 39, 0, 0 }, /* gsdrum40/br_slap pan=center note=39 # Brush Slap2 */ { SDS, 50, 88, 40, 39, 0, 0 }, /* gsdrum40/br_slap pan=center note=39 # Brush Slap3 */ { SDS, 50, 89, 40, 40, 0, 0 }, /* gsdrum40/br_swirl amp=70 pan=center note=40 keep=env # Brush Swirl1 */ { SDS, 50, 90, 40, 40, 0, 0 }, /* gsdrum40/br_swirl amp=70 pan=center note=40 keep=env # Brush Swirl2 */ { SDS, 50, 91, 40, 40, 0, 0 }, /* gsdrum40/br_swirl amp=70 pan=center note=40 keep=env # Brush Long Swirl */ /* drumset 56 sf SFX_[SC-55] */ { SDS, 56, 31, 56, 42, 0, 0 }, /* sfx/scratch1 note=60 pan=center # Scratch Push2 */ { SDS, 56, 32, 56, 41, 0, 0 }, /* sfx/scratch2 note=60 pan=center # Scratch Pull2 */ { SDS, 56, 33, 56, 49, 0, 0 }, /* sfx/cutnoiz note=60 pan=center # Cutting Noise 2 Up */ { SDS, 56, 34, 56, 48, 0, 0 }, /* sfx/cutnoiz note=60 pan=center # Cutting Noise 2 Down */ { SDS, 56, 35, 56, 49, 0, 0 }, /* sfx/cutnoiz note=60 pan=center # DistGuitar Cutting Noise Up */ { SDS, 56, 36, 56, 48, 0, 0 }, /* sfx/cutnoiz note=60 pan=center # DistGuitar Cutting Noise Down */ { SDS, 56, 37, 0, 120, 1, 0 }, /* fx-fret note=60 pan=center # Bass Slide */ { SDS, 56, 38, 0, 120, 1, 0 }, /* fx-fret note=60 pan=center # Pick Scrape */ { SDS, 56, 85, 56, 78, 0, 0 }, /* sfx/meow note=60 pan=center # Kitty */ { SDS, 56, 86, 56, 78, 0, 0 }, /* sfx/birdtwee amp=25 note=60 keep=loop keep=env pan=center # Bird2 */ { SDS, 56, 87, 56, 76, 0, 0 }, /* sfx/doggrowl note=60 pan=center # Growl */ { SDS, 56, 88, 56, 58, 0, 0 }, /* applause note=60 keep=loop keep=env pan=center # Applause2 */ { SDS, 56, 89, 0, 124, 1, 0 }, /* telephon note=60 pan=center # Telephone1 */ { SDS, 56, 90, 0, 124, 1, 0 }, /* sfx/dialtone note=60 keep=loop keep=env pan=center # Telephone2 (dial) */ /* drumset 121 */ { SDS, 121, 36, 56, 49, 0, 0 }, /* sfx/cutnoiz note=60 # cut noise */ { SDS, 121, 37, 56, 48, 0, 0 }, /* sfx/cutnoiz note=60 # cut noise 2 */ { SDS, 121, 38, 56, 48, 0, 0 }, /* sfx/cutnoiz note=60 # dist cut noise */ { SDS, 121, 39, 0, 120, 1, 0 }, /* fx-fret note=60 # string slap */ { SDS, 121, 40, 0, 120, 1, 0 }, /* fx-fret note=60 # bass slide */ { SDS, 121, 41, 0, 120, 1, 0 }, /* fx-fret note=60 # pick slide */ { SDS, 121, 52, 56, 44, 0, 0 }, /* sfx/flclick note=60 # fl key click */ { SDS, 121, 68, 56, 81, 0, 0 }, /* mazpat/fx/rainyday keep=loop keep=env note=60 # rain */ { SDS, 121, 69, 56, 80, 0, 0 }, /* sfx/thunder2 keep=loop keep=env note=60 # thunder */ { SDS, 121, 70, 56, 82, 0, 0 }, /* sfx/newwind amp=75 keep=loop keep=env note=60 # wind */ { SDS, 121, 71, 56, 83, 0, 0 }, /* sfx/stream amp=75 keep=loop keep=env note=60 # stream */ { SDS, 121, 72, 56, 84, 0, 0 }, /* sfx/bubbles1 keep=loop keep=env note=48 # bubble */ /* #73 # feed */ { SDS, 121, 84, 56, 76, 0, 0 }, /* sfx/dog1 note=60 # dog */ { SDS, 121, 85, 56, 77, 0, 0 }, /* sfx/hoofs keep=loop keep=env note=60 # horse gallop */ { SDS, 121, 86, 56, 78, 0, 0 }, /* sfx/birdtwee amp=25 keep=loop keep=env note=60 # bird 2 */ { SDS, 121, 87, 56, 78, 0, 0 }, /* sfx/meow note=60 # kitty */ { SDS, 121, 88, 56, 76, 0, 0 }, /* sfx/doggrowl note=60 # growl */ /* #89 # haunted */ { SDS, 121, 90, 56, 82, 0, 0 }, /* sfx/ghost note=60 # ghost */ /* #91 sfx/badmaou keep=loop keep=env note=60 # maou */ /* drumset 122 */ { SDS, 122, 36, 0, 124, 1, 0 }, /* telephon note=60 # telephone 2 */ { SDS, 122, 37, 56, 59, 0, 0 }, /* sfx/creak note=60 # door creaking */ { SDS, 122, 38, 56, 60, 0, 0 }, /* sfx/door note=60 # door slam */ { SDS, 122, 39, 56, 61, 0, 0 }, /* sfx/scratch1 note=60 # scratch */ { SDS, 122, 40, 56, 61, 0, 0 }, /* sfx/scratch2 note=60 # scratch 2 */ { SDS, 122, 41, 56, 62, 0, 0 }, /* sfx/windchim keep=loop keep=env note=60 # wind chime */ { SDS, 122, 42, 0, 124, 1, 0 }, /* telephon note=60 # telephone ring */ { SDS, 122, 52, 56, 63, 0, 0 }, /* sfx/carengin note=60 # engine start */ { SDS, 122, 53, 56, 64, 0, 0 }, /* sfx/carstop note=60 # stop */ { SDS, 122, 54, 56, 65, 0, 0 }, /* sfx/carpass note=60 # car pass */ { SDS, 122, 55, 56, 66, 0, 0 }, /* sfx/carcrash note=60 # crash */ { SDS, 122, 56, 56, 67, 0, 0 }, /* sfx/ambulanc keep=loop keep=env note=60 # siren */ { SDS, 122, 57, 56, 68, 0, 0 }, /* mazpat/fx/newtrain keep=loop keep=env note=60 # train */ { SDS, 122, 58, 56, 82, 0, 0 }, /* mazpat/fx/jet amp=70 keep=loop keep=env note=60 # jetplane */ { SDS, 122, 59, 56, 82, 0, 0 }, /* sfx/starship keep=loop keep=env note=60 # starship */ { SDS, 122, 60, 56, 72, 0, 0 }, /* pistol note=60 # burst noise */ { SDS, 122, 61, 56, 68, 0, 0 }, /* mazpat/fx/train keep=loop keep=env note=60 # coaster */ { SDS, 122, 62, 56, 84, 0, 0 }, /* sfx/bubbles1 keep=loop keep=env note=48 # submarine (needs to be replaced */ { SDS, 122, 68, 56, 52, 0, 0 }, /* sfx/laugh note=60 # laughing */ { SDS, 122, 69, 56, 53, 0, 0 }, /* sfx/scream note=60 # screaming */ { SDS, 122, 70, 56, 54, 0, 0 }, /* sfx/punch note=60 # punch */ { SDS, 122, 71, 56, 55, 0, 0 }, /* sfx/heartbt note=60 # heart beat */ { SDS, 122, 72, 56, 56, 0, 0 }, /* mazpat/fx/newstep note=60 # footsteps */ { SDS, 122, 73, 56, 58, 0, 0 }, /* applause keep=loop keep=env note=60 # applause */ { SDS, 122, 84, 56, 73, 0, 0 }, /* sfx/machgun2 keep=loop keep=env note=60 # machine gun */ { SDS, 122, 85, 56, 69, 0, 0 }, /* gus/sqrwave note=60 # laser gun */ { SDS, 122, 86, 56, 72, 0, 0 }, /* pistol note=60 # explosion */ { SDS, 122, 87, 56, 81, 0, 0 }, /* sfx/firework note=60 # fireworks */ /* drumset 127 # GS XM-64/32L drumset, half drums, half SFX */ { SDS, 127, 76, 56, 52, 0, 0 }, /* sfx/laugh note=60 pan=center # Laughing */ { SDS, 127, 77, 56, 53, 0, 0 }, /* sfx/scream note=60 pan=center # Scream */ { SDS, 127, 78, 56, 54, 0, 0 }, /* sfx/punch note=60 pan=center # Punch */ { SDS, 127, 79, 56, 55, 0, 0 }, /* sfx/heartbt note=60 pan=center # Heart Beat */ { SDS, 127, 80, 56, 56, 0, 0 }, /* mazpat/fx/newstep note=60 pan=center # Footsteps1 */ { SDS, 127, 81, 56, 56, 0, 0 }, /* mazpat/fx/newstep note=60 pan=center # Footsteps2 */ { SDS, 127, 82, 56, 58, 0, 0 }, /* applause note=60 keep=loop keep=env pan=center # Applause */ { SDS, 127, 83, 56, 83, 0, 0 }, /* sfx/creak note=60 pan=center # Door Creaking */ { SDS, 127, 84, 56, 84, 0, 0 }, /* sfx/door note=60 pan=center # Door */ { SDS, 127, 85, 56, 85, 0, 0 }, /* sfx/scratch2 note=60 pan=center # Scratch */ { SDS, 127, 86, 56, 62, 0, 0 }, /* sfx/windchim note=60 keep=loop keep=env pan=center # Wind Chimes */ { SDS, 127, 87, 56, 63, 0, 0 }, /* sfx/carengin note=60 pan=center # Car-Engine */ { SDS, 127, 88, 56, 64, 0, 0 }, /* sfx/carstop note=60 pan=center # Car-Stop */ { SDS, 127, 89, 56, 65, 0, 0 }, /* sfx/carpass note=60 pan=center # Car-Pass */ { SDS, 127, 90, 56, 66, 0, 0 }, /* sfx/carcrash note=60 pan=center # Car-Crash */ { SDS, 127, 91, 56, 67, 0, 0 }, /* sfx/ambulanc note=60 keep=loop keep=env pan=center # Siren */ { SDS, 127, 92, 56, 68, 0, 0 }, /* mazpat/fx/newtrain note=60 keep=loop keep=env pan=center # Train */ { SDS, 127, 93, 56, 82, 0, 0 }, /* mazpat/fx/jet amp=70 note=60 keep=loop keep=env pan=center # Jetplane */ { SDS, 127, 94, 56, 70, 0, 0 }, /* helicptr note=60 keep=loop keep=env pan=center # Helicopter */ { SDS, 127, 95, 56, 81, 0, 0 }, /* sfx/starship note=60 keep=loop keep=env pan=center # Starship */ { SDS, 127, 96, 56, 72, 0, 0 }, /* pistol note=60 pan=center # Gun Shot */ { SDS, 127, 97, 56, 73, 0, 0 }, /* sfx/machgun2 note=60 keep=loop keep=env pan=center # Machine Gun */ { SDS, 127, 98, 56, 69, 0, 0 }, /* gus/sqrwave note=60 pan=center # Lasergun */ { SDS, 127, 99, 56, 72, 0, 0 }, /* pistol note=60 pan=center # Explosion */ { SDS, 127, 100, 56, 76, 0, 0 }, /* sfx/dog1 note=60 pan=center # Dog */ { SDS, 127, 101, 56, 77, 0, 0 }, /* sfx/hoofs note=60 keep=loop keep=env pan=center # Horse-Gallop */ { SDS, 127, 102, 56, 78, 0, 0 }, /* sfx/birdtwee amp=25 note=60 keep=loop keep=env pan=center # Birds */ { SDS, 127, 103, 56, 81, 0, 0 }, /* mazpat/fx/rainyday note=60 keep=loop keep=env pan=center # Rain */ { SDS, 127, 104, 56, 80, 0, 0 }, /* sfx/thunder2 note=60 keep=loop keep=env pan=center # Thunder */ { SDS, 127, 105, 56, 81, 0, 0 }, /* sfx/newwind amp=75 note=60 keep=loop keep=env pan=center # Wind */ { SDS, 127, 106, 56, 82, 0, 0 }, /* seashore note=60 keep=loop keep=env pan=center # Seashore */ { SDS, 127, 107, 56, 83, 0, 0 }, /* sfx/stream amp=75 note=60 keep=loop keep=env pan=center # Stream */ { SDS, 127, 108, 56, 84, 0, 0 }, /* sfx/bubbles1 note=48 keep=loop keep=env pan=center # Bubble */ { 0, 0, 0, 0, 0, 0, 0 } }; #include void pcmap(int *b, int *v, int *p, int *drums) { int bank = *b; int voi = *v; int i, bktype; if (!*drums) voi = *p; for (i = 0; ; i++) { bktype = pc42bmap[i][0]; if (!bktype) return; if (*drums && (bktype != SDS)) continue; if (!*drums && (bktype != STS)) continue; if (bank != pc42bmap[i][1]) continue; if (voi != pc42bmap[i][2]) continue; *b = pc42bmap[i][3]; if (*drums) *v = pc42bmap[i][4]; else *p = pc42bmap[i][4]; if (bktype == SDS && pc42bmap[i][5]) *drums = 0; else if (bktype == STS && pc42bmap[i][5]) *drums = 1; return; } } alsaplayer-0.99.82/attic/midi/phaser_e.c000066400000000000000000000233661466261456500200510ustar00rootroot00000000000000/* * phaser_e.c * experimental channel effects processing * based on timidity (Unix ) from Tuukka Toivonen tt@cgs.fi * and provided under GNU General Public License b3 or later * contents : phaser ( controller 95 ) effect processing * Nicolas Witczak juillet 1998 * witczak@geocities.com * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include "gtim.h" #ifdef CHANNEL_EFFECT #ifndef NO_STRING_H #include #else #include #endif #include #ifndef __WIN32__ #include #endif #include #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "tables.h" /**************************************************************************/ /** phaser_effect structure definition * formula : * * output signal * * phi = d + sw * triangle( 2Pi/T * t ) * * y(n) = - GP * x(n) + x( n - phi ) + GP * y( n - d ) (phase filter) * * s = gx * x + gy * y(n) */ /* >> choice of the day >> */ /** G_BIT and G : denominator size and fractionnal time part */ #define G_BITS 9 #define G ((int32)( 1 << G_BITS )) /** average delays in ms */ #define D 1.0 /** phaser loopback gain*/ #define GP 0.5 /** relative min gain for phased signal */ #define G_MIN 0.3 /** max die time in ms */ #define DIE_TIME ( 1000 / FREQU ) /** approximate phaser frequency Hz */ #define FREQU 1.0 /** sweep ratio in percent of D */ #define SWEEP ( D / 1.01 ) /** time param normalized to sampling rate*/ static uint32 dieTime = 0 ; /** phaser loopback gain normalized to G */ static int32 gp = ( (int32)( GP * G) ) ; /** d_min , d_max : phaser depth and average delay relative to sampling rate and G_BITS fractionnal part for * linear interpolation */ static uint32 d_min = 0 ; static uint32 d_max = 0 ; typedef struct { /*---------------------------------------------------*/ /* Effect base implementation */ void *m_pfnActionMono; void *m_pfnActionStereo ; void *m_pfnCtrlChange ; void *m_pfnCtrlReset ; void *m_pfnName ; void *m_pfnDestruct ; /*---------------------------------------------------*/ /* additionnal parameters */ /** m_uiNullCount : number of last null samples or 0 */ uint32 m_uiNullCount ; /** l/rX/Y past samples circular buffer for x and ya left(or mono) and right */ cirbuff leftX , rightX , leftY , rightY ; /** current state for triangle phase ramp relative to fractionnal part G_BITS */ uint32 d ; /** incremental step for phaser phase eval , calculated according to FREQU and depth */ int32 incr; /** dry and phased gain normalized to G */ int32 gx , gy ; } phaser_effect ; /**************************************************************************/ /** reverb_effect function overriding */ static void ActionMono( phaser_effect* pThis , int32* pMonoBuffer, int32 count , int* pbSignal ) { if( pThis->gy == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pMonoBuffer; int32* pEnd = pMonoBuffer + count ; int32 x , y , xd , yd , v1 , v2 , tmp ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G ; v1 = (pThis->leftX.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->leftX.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; xd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; v1 = (pThis->leftY.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->leftY.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; yd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; ; y = ( ( - gp * x ) + ( gp * yd ) + ( G * xd ) ) / G ; *pCur = ( G * x ) + ( pThis->gy * y ) ; pushval_cirbuff( &(pThis->leftX) , x ) ; pushval_cirbuff( &(pThis->leftY) , y ) ; if( pThis->d > d_max ) { pThis->incr = -abs( pThis->incr ) ; pThis->d = d_max ; } else if( pThis->d < d_min ) { pThis->incr = +abs( pThis->incr ) ; pThis->d = d_min ; } else pThis->d += pThis->incr ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->leftY ) , pThis->m_uiNullCount ) ; pThis->d = d_min ; } } static void ActionStereo( phaser_effect* pThis , int32* pStereoBuffer , int32 count , int* pbSignal ) { if( pThis->gy == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pStereoBuffer; int32* pEnd = pStereoBuffer + 2 * count ; int32 x , y , xd , yd , v1 , v2 , tmp ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G ; v1 = (pThis->leftX.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->leftX.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; xd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; v1 = (pThis->leftY.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->leftY.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; yd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; y = ( ( - gp * x ) + ( gp * yd ) + ( G * xd ) ) / G ; *pCur = ( G * x ) + ( pThis->gy * y ) ; pushval_cirbuff( &(pThis->leftX) , x ) ; pushval_cirbuff( &(pThis->leftY) , y ) ; ++pCur; x = *pCur / G ; v1 = (pThis->rightX.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->rightX.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; xd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; v1 = (pThis->rightY.m_pCur)[ - ( pThis->d >> FRACTION_BITS ) ] ; v2 = (pThis->rightY.m_pCur)[ 1 - ( pThis->d >> FRACTION_BITS ) ] ; tmp = ( FRACTION_MASK - ( pThis->d & FRACTION_MASK ) ) ; yd = v1 + ( ( (v2-v1) * tmp ) / FRACTION ) ; y = ( ( - gp * x ) + ( gp * yd ) + ( G * xd ) ) / G ; *pCur = ( G * x ) + ( pThis->gy * y ) ; pushval_cirbuff( &(pThis->rightX) , x ) ; pushval_cirbuff( &(pThis->rightY) , y ) ; if( pThis->d > d_max ) { pThis->incr = -abs( pThis->incr ) ; pThis->d = d_max ; } else if( pThis->d < d_min ) { pThis->incr = +abs( pThis->incr ) ; pThis->d = d_min ; } else pThis->d += pThis->incr ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->leftY ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->rightX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->rightY ) , pThis->m_uiNullCount ) ; pThis->d = d_min ; } } static void CtrlReset( phaser_effect* pThis ) { pThis->m_uiNullCount = 0 ; redim_cirbuff( &( pThis->leftX ) , 0 ) ; redim_cirbuff( &( pThis->rightX ) , 0 ) ; pThis->gy = 0 ; d_max = (uint32)( ( ( ( D * ( 1.0 + ( SWEEP / 2 ) ) * play_mode->rate ) / 1000 ) - 1 ) * FRACTION ); d_min = (uint32)( ( ( ( D * ( 1.0 - ( SWEEP / 2 ) ) * play_mode->rate ) / 1000 ) - 1 ) * FRACTION ); pThis->incr = (int32)( ( 2 * ( d_max - d_min ) * FREQU ) / play_mode->rate ); pThis->d = d_min ; dieTime = (uint32)( ( DIE_TIME * play_mode->rate ) / 1000 ); } static void CtrlChange( phaser_effect* pThis , MidiEvent* pCurrentEvent ) { if( pCurrentEvent->type == ME_PHASER || (pCurrentEvent->type == ME_CHORUSDEPTH && XG_effect_chorus_is_phaser_flag) ) { if( pCurrentEvent->a != 0 ) { redim_cirbuff( &( pThis->leftX ) , ( d_max >> FRACTION_BITS ) + 1 ) ; redim_cirbuff( &( pThis->leftY ) , ( d_max >> FRACTION_BITS ) + 1 ) ; if( ! ( play_mode->encoding & PE_MONO ) ) { redim_cirbuff( &( pThis->rightX ) , ( d_max >> FRACTION_BITS ) + 1 ) ; redim_cirbuff( &( pThis->rightY ) , ( d_max >> FRACTION_BITS ) + 1 ) ; } pThis->gy = (int32)( G * ( G_MIN + ( ( 1.0 - G_MIN ) / 126.0 ) * ( pCurrentEvent->a - 1 ) ) ); } else CtrlReset( pThis ) ; } } static void Name( char* pszBuff ) { strcpy( pszBuff , "phaser" ); } static void Destruct( phaser_effect* pThis ) { delete_cirbuff( &( pThis->leftX ) ) ; delete_cirbuff( &( pThis->rightX ) ) ; delete_cirbuff( &( pThis->leftY ) ) ; delete_cirbuff( &( pThis->rightY ) ) ; memset( pThis , 0 , sizeof( phaser_effect ) ) ; free( pThis ) ; } /**************************************************************************/ /** phaser_effect construction function prototype */ Effect* PhaserCtor() { phaser_effect* pReturn = 0 ; pReturn = ( phaser_effect* )malloc( sizeof( phaser_effect) ) ; memset( pReturn , 0 , sizeof( phaser_effect ) ) ; pReturn->m_pfnActionMono = (void*)&ActionMono ; pReturn->m_pfnActionStereo = (void*)&ActionStereo ; pReturn->m_pfnCtrlChange = (void*)&CtrlChange ; pReturn->m_pfnCtrlReset = (void*)&CtrlReset ; pReturn->m_pfnName = (void*)&Name ; pReturn->m_pfnDestruct = (void*)&Destruct ; create_cirbuff( &( pReturn->leftX ) , 0 ) ; create_cirbuff( &( pReturn->rightX ) , 0 ) ; create_cirbuff( &( pReturn->leftY ) , 0 ) ; create_cirbuff( &( pReturn->rightY ) , 0 ) ; CtrlReset( pReturn ) ; return ( Effect* )pReturn ; } #endif /* CHANNEL_EFFECT */ alsaplayer-0.99.82/attic/midi/playmidi.c000066400000000000000000002351711466261456500200720ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . playmidi.c -- random stuff in need of rearrangement */ #include #include #include #ifndef NO_STRING_H # include #else #include #endif #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include #include "output.h" #include "mix.h" #include "controls.h" #include "resample.h" #include "tables.h" /*<95GUI_MODIF_BEGIN>*/ #ifdef CHANNEL_EFFECT extern void effect_ctrl_change( MidiEvent* pCurrentEvent, struct md *d ); extern void effect_ctrl_reset( int idChannel, struct md *d ) ; int opt_effect = FALSE; int opt_effect_reverb = FALSE; #endif /* CHANNEL_EFFECT */ /*<95GUI_MODIF_END>*/ #ifdef tplus #define PORTAMENTO_TIME_TUNING (1.0 / 5000.0) #define PORTAMENTO_CONTROL_RATIO 256 /* controls per sec */ #endif int opt_dry = 0; int opt_expression_curve = 1; int opt_volume_curve = 1; int opt_stereo_surround = 1; int dont_filter_melodic=1; int dont_filter_drums=1; int config_interpolation=DO_LAGRANGE_INTERPOLATION; int32 control_ratio=0; static int32 /*lost_notes,*/ cut_notes, played_notes; #ifdef tplus static void update_portamento_controls(int ch, struct md *d); #endif static void kill_note(int i, struct md *d); static void adjust_amplification(struct md *d) { d->master_volume = (double)(d->amplification) / 100.0L; d->master_volume /= 4; } static void adjust_master_volume(int32 vol, struct md *d) { d->master_volume = (double)(vol*d->amplification) / 1638400.0L; d->master_volume /= 4; } static void reset_voices(struct md *d) { int i; for (i=0; ivoice[i].status=VOICE_FREE; } /* Process the Reset All Controllers event */ static void reset_controllers(int c, struct md *d) { d->channel[c].volume=90; /* Some standard says, although the SCC docs say 0. */ d->channel[c].expression=127; /* SCC-1 does this. */ d->channel[c].sustain=0; d->channel[c].pitchbend=0x2000; d->channel[c].pitchfactor=0; /* to be computed */ d->channel[c].reverberation = global_reverb; d->channel[c].chorusdepth = global_chorus; #ifdef tplus d->channel[c].modulation_wheel = 0; d->channel[c].portamento_time_lsb = 0; d->channel[c].portamento_time_msb = 0; d->channel[c].tuning_lsb = 64; d->channel[c].tuning_msb = 64; d->channel[c].porta_control_ratio = 0; d->channel[c].portamento = 0; d->channel[c].last_note_fine = -1; d->channel[c].vibrato_ratio = 0; d->channel[c].vibrato_depth = 0; d->channel[c].vibrato_delay = 0; /* memset(d->channel[c].envelope_rate, 0, sizeof(d->channel[c].envelope_rate)); */ update_portamento_controls(c, d); #endif #ifdef CHANNEL_EFFECT if (opt_effect) effect_ctrl_reset( c, d ) ; #endif /* CHANNEL_EFFECT */ } static void redraw_controllers(int c, struct md *d) { ctl->volume(c, d->channel[c].volume); ctl->expression(c, d->channel[c].expression); ctl->sustain(c, d->channel[c].sustain); ctl->pitch_bend(c, d->channel[c].pitchbend); } static void reset_midi(struct md *d) { int i; for (i=0; ichannel[i].program=default_program; d->channel[i].panning=NO_PANNING; d->channel[i].pitchsens=2; d->channel[i].bank=0; /* tone bank or drum set */ d->channel[i].harmoniccontent=64, d->channel[i].releasetime=64, d->channel[i].attacktime=64, d->channel[i].brightness=64, /*d->channel[i].kit=0;*/ d->channel[i].sfx=0; /* d->channel[i].transpose and .kit are initialized in readmidi.c */ } reset_voices(d); } static void select_sample(int v, Instrument *ip, struct md *d) { int32 f, cdiff, diff, midfreq; int s,i; Sample *sp, *closest; s=ip->samples; sp=ip->sample; if (s==1) { d->voice[v].sample=sp; return; } f=d->voice[v].orig_frequency; #if 0 /* Even if in range, a later patch may be closer. */ for (i=0; ilow_freq <= f && sp->high_freq >= f) { d->voice[v].sample=sp; return; } sp++; } #endif /* No suitable sample found! We'll select the sample whose root frequency is closest to the one we want. (Actually we should probably convert the low, high, and root frequencies to MIDI note values and compare those.) */ cdiff=0x7FFFFFFF; closest=sp=ip->sample; midfreq = (sp->low_freq + sp->high_freq) / 2; for(i=0; iroot_freq - f; /* But the root freq. can perfectly well lie outside the keyrange * frequencies, so let's try: */ /* diff=midfreq - f; */ if (diff<0) diff=-diff; if (diffvoice[v].sample=closest; return; } static void select_stereo_samples(int v, InstrumentLayer *lp, struct md *d) { Instrument *ip; InstrumentLayer *nlp, *bestvel; int diffvel, midvel, mindiff; /* select closest velocity */ bestvel = lp; mindiff = 500; for (nlp = lp; nlp; nlp = nlp->next) { midvel = (nlp->hi + nlp->lo)/2; if (!midvel) diffvel = 127; else if (d->voice[v].velocity < nlp->lo || d->voice[v].velocity > nlp->hi) diffvel = 200; else diffvel = d->voice[v].velocity - midvel; if (diffvel < 0) diffvel = -diffvel; if (diffvel < mindiff) { mindiff = diffvel; bestvel = nlp; } } ip = bestvel->instrument; if (ip->right_sample) { ip->sample = ip->right_sample; ip->samples = ip->right_samples; select_sample(v, ip, d); d->voice[v].right_sample = d->voice[v].sample; } else d->voice[v].right_sample = 0; ip->sample = ip->left_sample; ip->samples = ip->left_samples; select_sample(v, ip, d); } #ifndef tplus static #endif void recompute_freq(int v, struct md *d) { int sign, /* for bidirectional loops */ pb; double a; int32 tuning = 0; if (!d->voice[v].sample) { fprintf(stderr,"No SAMPLE!!\n"); return; } sign=(d->voice[v].sample_increment < 0); /* for bidirectional loops */ pb=d->channel[d->voice[v].channel].pitchbend; if (!d->voice[v].sample->sample_rate) return; #ifdef tplus #if 0 if(!opt_modulation_wheel) d->voice[v].modulation_wheel = 0; if(!opt_portamento) d->voice[v].porta_control_ratio = 0; #endif d->voice[v].vibrato_control_ratio = d->voice[v].orig_vibrato_control_ratio; if(d->voice[v].modulation_wheel > 0) { d->voice[v].vibrato_control_ratio = (int32)(play_mode->rate * MODULATION_WHEEL_RATE / (2.0 * VIBRATO_SAMPLE_INCREMENTS)); d->voice[v].vibrato_delay = 0; } #endif #ifdef tplus if(d->voice[v].vibrato_control_ratio || d->voice[v].modulation_wheel > 0) #else if (d->voice[v].vibrato_control_ratio) #endif { /* This instrument has vibrato. Invalidate any precomputed sample_increments. */ int i=VIBRATO_SAMPLE_INCREMENTS; while (i--) d->voice[v].vibrato_sample_increment[i]=0; #ifdef tplus29 if(d->voice[v].modulation_wheel > 0) { d->voice[v].vibrato_control_ratio = (int32)(play_mode->rate * MODULATION_WHEEL_RATE / (2.0 * VIBRATO_SAMPLE_INCREMENTS)); d->voice[v].vibrato_delay = 0; } #endif } #ifdef tplus /* fine: [0..128] => [-256..256] * 1 coarse = 256 fine (= 1 note) * 1 fine = 2^5 tuning */ tuning = (((int32)d->channel[d->voice[v].channel].tuning_lsb - 0x40) + 64 * ((int32)d->channel[d->voice[v].channel].tuning_msb - 0x40)) << 7; #endif #ifdef tplus if(!d->voice[v].porta_control_ratio) { #endif #ifdef tplus29 if(tuning == 0 && pb == 0x2000) #else if (pb==0x2000 || pb<0 || pb>0x3FFF) #endif d->voice[v].frequency=d->voice[v].orig_frequency; else { pb-=0x2000; if (!(d->channel[d->voice[v].channel].pitchfactor)) { /* Damn. Somebody bent the pitch. */ int32 i=pb*d->channel[d->voice[v].channel].pitchsens + tuning; #ifdef tplus29 tuning; if(i >= 0) d->channel[ch].pitchfactor = bend_fine[(i>>5) & 0xFF] * bend_coarse[(i>>13) & 0x7F]; else { i = -i; d->channel[ch].pitchfactor = 1.0 / (bend_fine[(i>>5) & 0xFF] * bend_coarse[(i>>13) & 0x7F]); } #else if (pb<0) i=-i; d->channel[d->voice[v].channel].pitchfactor= bend_fine[(i>>5) & 0xFF] * bend_coarse[i>>13]; #endif } #ifndef tplus29 if (pb>0) #endif d->voice[v].frequency= (int32)(d->channel[d->voice[v].channel].pitchfactor * (double)(d->voice[v].orig_frequency)); #ifndef tplus29 else d->voice[v].frequency= (int32)((double)(d->voice[v].orig_frequency) / d->channel[d->voice[v].channel].pitchfactor); #endif } #ifdef tplus } else /* Portament */ { int32 i; FLOAT_T pf; pb -= 0x2000; i = pb * d->channel[d->voice[v].channel].pitchsens + (d->voice[v].porta_pb << 5) + tuning; if(i >= 0) pf = bend_fine[(i>>5) & 0xFF] * bend_coarse[(i>>13) & 0x7F]; else { i = -i; pf = 1.0 / (bend_fine[(i>>5) & 0xFF] * bend_coarse[(i>>13) & 0x7F]); } d->voice[v].frequency = (int32)((double)(d->voice[v].orig_frequency) * pf); /*d->voice[v].cache = NULL;*/ } #endif a = FRSCALE(((double)(d->voice[v].sample->sample_rate) * (double)(d->voice[v].frequency)) / ((double)(d->voice[v].sample->root_freq) * (double)(play_mode->rate)), FRACTION_BITS); /* what to do if incr is 0? --gl */ /* if (!a) a++; */ a += 0.5; if ((int32)a < 1) a = 1; if (sign) a = -a; /* need to preserve the loop direction */ d->voice[v].sample_increment = (int32)(a); } static int vcurve[128] = { 0,0,18,29,36,42,47,51,55,58, 60,63,65,67,69,71,73,74,76,77, 79,80,81,82,83,84,85,86,87,88, 89,90,91,92,92,93,94,95,95,96, 97,97,98,99,99,100,100,101,101,102, 103,103,104,104,105,105,106,106,106,107, 107,108,108,109,109,109,110,110,111,111, 111,112,112,112,113,113,114,114,114,115, 115,115,116,116,116,116,117,117,117,118, 118,118,119,119,119,119,120,120,120,120, 121,121,121,122,122,122,122,123,123,123, 123,123,124,124,124,124,125,125,125,125, 126,126,126,126,126,127,127,127 }; static void recompute_amp(int v, struct md *d) { int32 tempamp; int chan = d->voice[v].channel; int vol = d->channel[chan].volume; int expr = d->channel[chan].expression; int vel = vcurve[d->voice[v].velocity]; FLOAT_T curved_expression, curved_volume; /* TODO: use fscale */ if (d->channel[chan].kit) { int note = d->voice[v].sample->note_to_use; if (note>0 && d->drumvolume[chan][note]>=0) vol = d->drumvolume[chan][note]; } if (opt_expression_curve == 2) curved_expression = 127.0 * def_vol_table[expr]; else if (opt_expression_curve == 1) curved_expression = 127.0 * expr_table[expr]; else curved_expression = (FLOAT_T)expr; if (opt_volume_curve == 2) curved_volume = 127.0 * def_vol_table[vol]; else if (opt_volume_curve == 1) curved_volume = 127.0 * expr_table[vol]; else curved_volume = (FLOAT_T)vol; tempamp= (int32)((FLOAT_T)vel * curved_volume * curved_expression); /* 21 bits */ if (!(play_mode->encoding & PE_MONO)) { /*if (d->voice[v].panning > 60 && d->voice[v].panning < 68)*/ if (d->voice[v].panning > 62 && d->voice[v].panning < 66) { d->voice[v].panned=PANNED_CENTER; d->voice[v].left_amp= FRSCALENEG((double)(tempamp) * d->voice[v].volume * d->master_volume, 21); } else if (d->voice[v].panning<5) { d->voice[v].panned = PANNED_LEFT; d->voice[v].left_amp= FRSCALENEG((double)(tempamp) * d->voice[v].volume * d->master_volume, 20); } else if (d->voice[v].panning>123) { d->voice[v].panned = PANNED_RIGHT; d->voice[v].left_amp= /* left_amp will be used */ FRSCALENEG((double)(tempamp) * d->voice[v].volume * d->master_volume, 20); } else { d->voice[v].panned = PANNED_MYSTERY; d->voice[v].left_amp= FRSCALENEG((double)(tempamp) * d->voice[v].volume * d->master_volume, 27); d->voice[v].right_amp=d->voice[v].left_amp * (d->voice[v].panning); d->voice[v].left_amp *= (double)(127-d->voice[v].panning); } } else { d->voice[v].panned=PANNED_CENTER; d->voice[v].left_amp= FRSCALENEG((double)(tempamp) * d->voice[v].volume * d->master_volume, 21); } } #define NOT_CLONE 0 #define STEREO_CLONE 1 #define REVERB_CLONE 2 #define CHORUS_CLONE 3 /* just a variant of note_on() */ static int vc_alloc(int j, struct md *d) { int i=d->voices; while (i--) { if (i == j) continue; if (d->voice[i].status & VOICE_FREE) { return i; } } return -1; } static void kill_others(/*MidiEvent *e,*/ int i, struct md *d) { int j=d->voices; /*if (!d->voice[i].sample->exclusiveClass) return; */ while (j--) { if (d->voice[j].status & (VOICE_FREE|VOICE_OFF|VOICE_DIE)) continue; if (i == j) continue; if (d->voice[i].channel != d->voice[j].channel) continue; if (d->voice[j].sample->note_to_use) { /* if (d->voice[j].sample->note_to_use != d->voice[i].sample->note_to_use) continue; */ if (!d->voice[i].sample->exclusiveClass) continue; if (d->voice[j].sample->exclusiveClass != d->voice[i].sample->exclusiveClass) continue; kill_note(j, d); } /* else if (d->voice[j].note != (e->a &0x07f)) continue; kill_note(j); */ } } static void clone_voice(Instrument *ip, int v, MidiEvent *e, int clone_type, int variationbank, struct md *d) { int w, k, played_note, chorus, reverb, milli; int chan = d->voice[v].channel; if (clone_type == STEREO_CLONE) { if (!d->voice[v].right_sample && variationbank != 3) return; if (variationbank == 6) return; } chorus = ip->sample->chorusdepth; reverb = ip->sample->reverberation; if (d->channel[chan].kit) { if ((k=d->drumreverberation[chan][d->voice[v].note]) >= 0) reverb = (reverb>k)? reverb : k; if ((k=d->drumchorusdepth[chan][d->voice[v].note]) >= 0) chorus = (chorus>k)? chorus : k; } else { if ((k=d->channel[chan].chorusdepth) >= 0) chorus = (chorus>k)? chorus : k; if ((k=d->channel[chan].reverberation) >= 0) reverb = (reverb>k)? reverb : k; } if (clone_type == REVERB_CLONE) chorus = 0; else if (clone_type == CHORUS_CLONE) reverb = 0; else if (clone_type == STEREO_CLONE) reverb = chorus = 0; if (reverb > 127) reverb = 127; if (chorus > 127) chorus = 127; if (clone_type == REVERB_CLONE) { if ( (reverb_options & OPT_REVERB_EXTRA) && reverb < global_echo) reverb = global_echo; if (/*reverb < 8 ||*/ d->dont_reverb) return; } if (clone_type == CHORUS_CLONE) { if (variationbank == 32) chorus = 30; else if (variationbank == 33) chorus = 60; else if (variationbank == 34) chorus = 90; if ( (reverb_options & OPT_CHORUS_EXTRA) && chorus < global_detune) chorus = global_detune; if (/*chorus < 4 ||*/ d->dont_chorus) return; } if (!d->voice[v].right_sample) { d->voice[v].right_sample = d->voice[v].sample; } else if (clone_type == STEREO_CLONE) variationbank = 0; /* don't try to fake a second patch if we have a real one */ if ( (w = vc_alloc(v, d)) < 0 ) return; if (clone_type==STEREO_CLONE) d->voice[v].clone_voice = w; d->voice[w].clone_voice = v; d->voice[w].clone_type = clone_type; d->voice[w].status = d->voice[v].status; d->voice[w].channel = d->voice[v].channel; d->voice[w].note = d->voice[v].note; d->voice[w].sample = d->voice[v].right_sample; /*d->voice[w].velocity= (e->b * (127 - d->voice[w].sample->attenuation)) / 127;*/ d->voice[w].velocity= e->b; d->voice[w].left_sample = d->voice[v].left_sample; d->voice[w].right_sample = d->voice[v].right_sample; d->voice[w].orig_frequency = d->voice[v].orig_frequency; d->voice[w].frequency = d->voice[v].frequency; d->voice[w].sample_offset = d->voice[v].sample_offset; d->voice[w].sample_increment = d->voice[v].sample_increment; d->voice[w].current_x0 = d->voice[w].current_x1 = d->voice[w].current_y0 = d->voice[w].current_y1 = 0; d->voice[w].echo_delay = d->voice[v].echo_delay; d->voice[w].starttime = d->voice[v].starttime; d->voice[w].envelope_volume = d->voice[v].envelope_volume; d->voice[w].envelope_target = d->voice[v].envelope_target; d->voice[w].envelope_increment = d->voice[v].envelope_increment; d->voice[w].modulation_volume = d->voice[v].modulation_volume; d->voice[w].modulation_target = d->voice[v].modulation_target; d->voice[w].modulation_increment = d->voice[v].modulation_increment; d->voice[w].tremolo_sweep = d->voice[w].sample->tremolo_sweep_increment; d->voice[w].tremolo_sweep_position = d->voice[v].tremolo_sweep_position; d->voice[w].tremolo_phase = d->voice[v].tremolo_phase; d->voice[w].tremolo_phase_increment = d->voice[w].sample->tremolo_phase_increment; d->voice[w].lfo_sweep = d->voice[w].sample->lfo_sweep_increment; d->voice[w].lfo_sweep_position = d->voice[v].lfo_sweep_position; d->voice[w].lfo_phase = d->voice[v].lfo_phase; d->voice[w].lfo_phase_increment = d->voice[w].sample->lfo_phase_increment; d->voice[w].modLfoToFilterFc=d->voice[w].sample->modLfoToFilterFc; d->voice[w].modEnvToFilterFc=d->voice[w].sample->modEnvToFilterFc; d->voice[w].vibrato_sweep = d->voice[w].sample->vibrato_sweep_increment; d->voice[w].vibrato_sweep_position = d->voice[v].vibrato_sweep_position; d->voice[w].left_mix = d->voice[v].left_mix; d->voice[w].right_mix = d->voice[v].right_mix; d->voice[w].left_amp = d->voice[v].left_amp; d->voice[w].right_amp = d->voice[v].right_amp; d->voice[w].tremolo_volume = d->voice[v].tremolo_volume; d->voice[w].lfo_volume = d->voice[v].lfo_volume; for (k = 0; k < VIBRATO_SAMPLE_INCREMENTS; k++) d->voice[w].vibrato_sample_increment[k] = d->voice[v].vibrato_sample_increment[k]; for (k=ATTACK; kvoice[w].envelope_rate[k]=d->voice[v].envelope_rate[k]; d->voice[w].envelope_offset[k]=d->voice[v].envelope_offset[k]; } d->voice[w].vibrato_phase = d->voice[v].vibrato_phase; d->voice[w].vibrato_depth = d->voice[w].sample->vibrato_depth; d->voice[w].vibrato_control_ratio = d->voice[w].sample->vibrato_control_ratio; d->voice[w].vibrato_control_counter = d->voice[v].vibrato_control_counter; d->voice[w].envelope_stage = d->voice[v].envelope_stage; d->voice[w].modulation_stage = d->voice[v].modulation_stage; d->voice[w].control_counter = d->voice[v].control_counter; d->voice[w].panning = d->voice[v].panning; if (d->voice[w].right_sample) d->voice[w].panning = d->voice[w].right_sample->panning; else d->voice[w].panning = 127; if (clone_type == STEREO_CLONE) { int left, right; int panrequest = d->voice[v].panning; if (variationbank == 3) { d->voice[v].panning = 0; d->voice[w].panning = 127; } else { if (d->voice[v].sample->panning > d->voice[w].sample->panning) { left = w; right = v; } else { left = v; right = w; } if (panrequest < 64) { if (opt_stereo_surround) { d->voice[left].panning = 0; d->voice[right].panning = panrequest; } else { if (d->voice[left].sample->panning < panrequest) d->voice[left].panning = d->voice[left].sample->panning; else d->voice[left].panning = panrequest; d->voice[right].panning = (d->voice[right].sample->panning + panrequest + 32) / 2; } } else { if (opt_stereo_surround) { d->voice[left].panning = panrequest; d->voice[right].panning = 127; } else { if (d->voice[right].sample->panning > panrequest) d->voice[right].panning = d->voice[right].sample->panning; else d->voice[right].panning = panrequest; d->voice[left].panning = (d->voice[left].sample->panning + panrequest - 32) / 2; } } } #ifdef DEBUG_CLONE_NOTES fprintf(stderr,"STEREO_CLONE v%d vol%f pan%d\n", w, d->voice[w].volume, d->voice[w].panning); #endif } #ifdef tplus d->voice[w].porta_control_ratio = d->voice[v].porta_control_ratio; d->voice[w].porta_dpb = d->voice[v].porta_dpb; d->voice[w].porta_pb = d->voice[v].porta_pb; /* ?? d->voice[w].vibrato_delay = 0; */ d->voice[w].vibrato_delay = d->voice[w].sample->vibrato_delay; d->voice[w].modulation_delay = d->voice[w].sample->modulation_rate[DELAY]; #endif d->voice[w].volume = d->voice[w].sample->volume; milli = play_mode->rate/1000; if (reverb) { #if 0 if (d->voice[w].panning < 64) d->voice[w].panning = 127; else d->voice[w].panning = 0; #endif if (opt_stereo_surround) { if (d->voice[w].panning > 64) d->voice[w].panning = 127; else d->voice[w].panning = 0; } else { if (d->voice[v].panning < 64) d->voice[w].panning = 64 + reverb/2; else d->voice[w].panning = 64 - reverb/2; } #ifdef DEBUG_REVERBERATION printf("r=%d vol %f", reverb, d->voice[w].volume); #endif /* try 98->99 for melodic instruments ? (bit much for percussion) */ d->voice[w].volume *= d->vol_table[(127-reverb)/8 + 98]; #ifdef DEBUG_REVERBERATION printf(" -> vol %f", d->voice[w].volume); printf(" delay %d", d->voice[w].echo_delay); #endif /*d->voice[w].echo_delay += (reverb>>1) * milli;*/ d->voice[w].echo_delay += reverb * milli; #ifdef DEBUG_REVERBERATION printf(" -> delay %d\n", d->voice[w].echo_delay); #endif d->voice[w].envelope_rate[DECAY] *= 2; d->voice[w].envelope_rate[RELEASE] /= 2; if (d->XG_System_reverb_type >= 0) { int subtype = d->XG_System_reverb_type & 0x07; int rtype = d->XG_System_reverb_type >>3; switch (rtype) { case 0: /* no effect */ break; case 1: /* hall */ if (subtype) d->voice[w].echo_delay += 100 * milli; break; case 2: /* room */ d->voice[w].echo_delay /= 2; break; case 3: /* stage */ d->voice[w].velocity = d->voice[v].velocity; break; case 4: /* plate */ d->voice[w].panning = d->voice[v].panning; break; case 16: /* white room */ d->voice[w].echo_delay = 0; break; case 17: /* tunnel */ d->voice[w].echo_delay *= 2; d->voice[w].velocity /= 2; break; case 18: /* canyon */ d->voice[w].echo_delay *= 2; break; case 19: /* basement */ d->voice[w].velocity /= 2; break; default: break; } } #ifdef DEBUG_CLONE_NOTES fprintf(stderr,"REVERB_CLONE v%d vol=%f pan=%d reverb=%d delay=%dms\n", w, d->voice[w].volume, d->voice[w].panning, reverb, d->voice[w].echo_delay / milli); #endif } played_note = d->voice[w].sample->note_to_use; if (!played_note) { played_note = e->a & 0x7f; if (variationbank == 35) played_note += 12; else if (variationbank == 36) played_note -= 12; else if (variationbank == 37) played_note += 7; else if (variationbank == 36) played_note -= 7; } played_note = ( (played_note - d->voice[w].sample->freq_center) * d->voice[w].sample->freq_scale ) / 1024 + d->voice[w].sample->freq_center; d->voice[w].note = played_note; d->voice[w].orig_frequency = freq_table[played_note]; if (chorus) { /*d->voice[w].orig_frequency += (d->voice[w].orig_frequency/128) * chorus;*/ /*fprintf(stderr, "voice %d v sweep from %ld (cr %d, depth %d)", w, d->voice[w].vibrato_sweep, d->voice[w].vibrato_control_ratio, d->voice[w].vibrato_depth);*/ if (opt_stereo_surround) { if (d->voice[v].panning < 64) d->voice[w].panning = d->voice[v].panning + 32; else d->voice[w].panning = d->voice[v].panning - 32; } if (!d->voice[w].vibrato_control_ratio) { d->voice[w].vibrato_control_ratio = 100; d->voice[w].vibrato_depth = 6; d->voice[w].vibrato_sweep = 74; } /*d->voice[w].velocity = (d->voice[w].velocity * chorus) / 128;*/ #if 0 d->voice[w].velocity = (d->voice[w].velocity * chorus) / (128+96); d->voice[v].velocity = d->voice[w].velocity; d->voice[w].volume = (d->voice[w].volume * chorus) / (128+96); d->voice[v].volume = d->voice[w].volume; #endif /* d->voice[w].volume *= 0.9; */ d->voice[w].volume *= 0.40; d->voice[v].volume = d->voice[w].volume; recompute_amp(v, d); apply_envelope_to_amp(v, d); d->voice[w].vibrato_sweep = chorus/2; d->voice[w].vibrato_depth /= 2; if (!d->voice[w].vibrato_depth) d->voice[w].vibrato_depth = 2; d->voice[w].vibrato_control_ratio /= 2; /*d->voice[w].vibrato_control_ratio += chorus;*/ /*fprintf(stderr, " to %ld (cr %d, depth %d).\n", d->voice[w].vibrato_sweep, d->voice[w].vibrato_control_ratio, d->voice[w].vibrato_depth); d->voice[w].vibrato_phase = 20;*/ d->voice[w].echo_delay += 30 * milli; if (d->XG_System_chorus_type >= 0) { int subtype = d->XG_System_chorus_type & 0x07; int chtype = 0x0f & (d->XG_System_chorus_type >> 3); switch (chtype) { case 0: /* no effect */ break; case 1: /* chorus */ chorus /= 3; if(d->channel[ d->voice[w].channel ].pitchbend + chorus < 0x2000) d->voice[w].orig_frequency = (uint32)( (FLOAT_T)d->voice[w].orig_frequency * bend_fine[chorus] ); else d->voice[w].orig_frequency = (uint32)( (FLOAT_T)d->voice[w].orig_frequency / bend_fine[chorus] ); if (subtype) d->voice[w].vibrato_depth *= 2; break; case 2: /* celeste */ d->voice[w].orig_frequency += (d->voice[w].orig_frequency/128) * chorus; break; case 3: /* flanger */ d->voice[w].vibrato_control_ratio = 10; d->voice[w].vibrato_depth = 100; d->voice[w].vibrato_sweep = 8; d->voice[w].echo_delay += 200 * milli; break; case 4: /* symphonic : cf Children of the Night /128 bad, /1024 ok */ d->voice[w].orig_frequency += (d->voice[w].orig_frequency/512) * chorus; d->voice[v].orig_frequency -= (d->voice[v].orig_frequency/512) * chorus; recompute_freq(v, d); break; case 8: /* phaser */ break; default: break; } } else { chorus /= 3; if(d->channel[ d->voice[w].channel ].pitchbend + chorus < 0x2000) d->voice[w].orig_frequency = (uint32)( (FLOAT_T)d->voice[w].orig_frequency * bend_fine[chorus] ); else d->voice[w].orig_frequency = (uint32)( (FLOAT_T)d->voice[w].orig_frequency / bend_fine[chorus] ); } #ifdef DEBUG_CLONE_NOTES fprintf(stderr,"CHORUS_CLONE v%d vol%f pan%d chorus%d\n", w, d->voice[w].volume, d->voice[w].panning, chorus); #endif } d->voice[w].loop_start = d->voice[w].sample->loop_start; d->voice[w].loop_end = d->voice[w].sample->loop_end; d->voice[w].echo_delay_count = d->voice[w].echo_delay; if (reverb) d->voice[w].echo_delay *= 2; recompute_freq(w, d); recompute_amp(w, d); if (d->voice[w].sample->modes & MODES_ENVELOPE) { /* Ramp up from 0 */ d->voice[w].envelope_stage=ATTACK; d->voice[w].modulation_stage=ATTACK; d->voice[w].envelope_volume=0; d->voice[w].modulation_volume=0; d->voice[w].control_counter=0; d->voice[w].modulation_counter=0; recompute_envelope(w, d); if (d->voice[w].sample->cutoff_freq) d->voice[w].bw_index = 1 + (d->voice[w].sample->cutoff_freq+50) / 100; else d->voice[w].bw_index = 0; recompute_modulation(w, d); apply_envelope_to_amp(w, d); } else { d->voice[w].envelope_increment=0; d->voice[w].modulation_increment=0; apply_envelope_to_amp(w, d); } } static void xremap(int *banknumpt, int *this_notept, int this_kit) { int i, newmap; int banknum = *banknumpt; int this_note = *this_notept; int newbank, newnote; if (!this_kit) { if (banknum == SFXBANK && tonebank[120]) *banknumpt = 120; return; } if (this_kit != 127 && this_kit != 126) return; for (i = 0; i < XMAPMAX; i++) { newmap = xmap[i][0]; if (!newmap) return; if (this_kit == 127 && newmap != XGDRUM) continue; if (this_kit == 126 && newmap != SFXDRUM1) continue; if (xmap[i][1] != banknum) continue; if (xmap[i][3] != this_note) continue; newbank = xmap[i][2]; newnote = xmap[i][4]; if (newbank == banknum && newnote == this_note) return; if (!drumset[newbank]) return; if (!drumset[newbank]->tone[newnote].layer) return; if (drumset[newbank]->tone[newnote].layer == MAGIC_LOAD_INSTRUMENT) return; *banknumpt = newbank; *this_notept = newnote; return; } } static void start_note(MidiEvent *e, int i, struct md *d) { InstrumentLayer *lp; Instrument *ip; int j, banknum, ch=e->channel; int played_note, drumpan=NO_PANNING; int32 rt; int attacktime, releasetime, decaytime, variationbank; int brightness = d->channel[ch].brightness; int harmoniccontent = d->channel[ch].harmoniccontent; int this_note = e->a; int this_velocity = e->b; int drumsflag = d->channel[ch].kit; int this_prog = d->channel[ch].program; if (check_for_rc()) return; if (d->channel[ch].sfx) banknum=d->channel[ch].sfx; else banknum=d->channel[ch].bank; d->voice[i].velocity=this_velocity; #if 0 if (drumsflag) { if (!drumset[banknum]) fprintf(stderr,"before remap no drumset %d\n", banknum); else if (!drumset[banknum]->tone[this_note].layer) fprintf(stderr,"before remap no note %d layer for drumset %d\n", this_note, banknum); } else { if (!tonebank[banknum]) fprintf(stderr,"before remap no tonebank %d\n", banknum); else if (!tonebank[banknum]->tone[this_prog].layer) fprintf(stderr,"before remap no prog %d layer for tonebank %d\n", this_prog, banknum); } #endif if (d->XG_System_On) xremap(&banknum, &this_note, drumsflag); #if 0 if (drumsflag) { if (!drumset[banknum]) fprintf(stderr,"after xremap no drumset %d\n", banknum); else if (!drumset[banknum]->tone[this_note].layer) fprintf(stderr,"after xremap no note %d layer for drumset %d\n", this_note, banknum); } else { if (!tonebank[banknum]) fprintf(stderr,"after xremap no tonebank %d\n", banknum); else if (!tonebank[banknum]->tone[this_prog].layer) fprintf(stderr,"after xremap no prog %d layer for tonebank %d\n", this_prog, banknum); } #endif if (current_config_pc42b) pcmap(&banknum, &this_note, &this_prog, &drumsflag); #if 0 if (drumsflag) { if (!drumset[banknum]) fprintf(stderr,"after pcmap no drumset %d\n", banknum); else if (!drumset[banknum]->tone[this_note].layer) fprintf(stderr,"after pcmap no note %d layer for drumset %d\n", this_note, banknum); } else { if (!tonebank[banknum]) fprintf(stderr,"after pcmap no tonebank %d\n", banknum); else if (!tonebank[banknum]->tone[this_prog].layer) fprintf(stderr,"after pcmap no prog %d layer for tonebank %d\n", this_prog, banknum); } #endif if (drumsflag) { if (!(lp=drumset[banknum]->tone[this_note].layer)) { if (!(lp=drumset[0]->tone[this_note].layer)) return; /* No instrument? Then we can't play. */ } ip = lp->instrument; if (ip->type == INST_GUS && ip->samples != 1) { ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "Strange: percussion instrument with %d samples!", ip->samples); return; } if (ip->sample->note_to_use) /* Do we have a fixed pitch? */ { d->voice[i].orig_frequency=freq_table[(int)(ip->sample->note_to_use)]; drumpan=d->drumpanpot[ch][(int)ip->sample->note_to_use]; } else d->voice[i].orig_frequency=freq_table[this_note & 0x7F]; } else { if (this_prog==SPECIAL_PROGRAM) lp=default_instrument; else if (!(lp=tonebank[banknum]->tone[this_prog].layer)) { if (!(lp=tonebank[0]->tone[this_prog].layer)) return; /* No instrument? Then we can't play. */ } ip = lp->instrument; if (ip->sample->note_to_use) /* Fixed-pitch instrument? */ d->voice[i].orig_frequency=freq_table[(int)(ip->sample->note_to_use)]; else d->voice[i].orig_frequency=freq_table[this_note & 0x7F]; } /* not drum channel */ select_stereo_samples(i, lp, d); kill_others(/*e,*/ i, d); d->voice[i].starttime = e->time; played_note = d->voice[i].sample->note_to_use; /* for non-percussion, always use the note in the music (may be sfx bank) */ if (!played_note || !d->channel[ch].kit) played_note = this_note & 0x7f; played_note = ( (played_note - d->voice[i].sample->freq_center) * d->voice[i].sample->freq_scale ) / 1024 + d->voice[i].sample->freq_center; d->voice[i].note = played_note; d->voice[i].orig_frequency = freq_table[played_note]; d->voice[i].status=VOICE_ON; d->voice[i].channel=ch; /* Check this! */ /*d->voice[i].velocity= (this_velocity * (127 - d->voice[i].sample->attenuation)) / 127;*/ d->voice[i].velocity= this_velocity; d->voice[i].sample_offset=0; d->voice[i].sample_increment=0; /* make sure it isn't negative */ /* why am I copying loop points? */ d->voice[i].loop_start = d->voice[i].sample->loop_start; d->voice[i].loop_end = d->voice[i].sample->loop_end; d->voice[i].volume = d->voice[i].sample->volume; d->voice[i].current_x0 = d->voice[i].current_x1 = d->voice[i].current_y0 = d->voice[i].current_y1 = 0; #ifdef tplus d->voice[i].modulation_wheel=d->channel[ch].modulation_wheel; #endif d->voice[i].tremolo_phase=0; d->voice[i].tremolo_phase_increment=d->voice[i].sample->tremolo_phase_increment; d->voice[i].tremolo_sweep=d->voice[i].sample->tremolo_sweep_increment; d->voice[i].tremolo_sweep_position=0; d->voice[i].lfo_phase=0; d->voice[i].lfo_phase_increment=d->voice[i].sample->lfo_phase_increment; d->voice[i].lfo_sweep=d->voice[i].sample->lfo_sweep_increment; d->voice[i].lfo_sweep_position=0; d->voice[i].modLfoToFilterFc=d->voice[i].sample->modLfoToFilterFc; d->voice[i].modEnvToFilterFc=d->voice[i].sample->modEnvToFilterFc; d->voice[i].modulation_delay = d->voice[i].sample->modulation_rate[DELAY]; d->voice[i].vibrato_sweep=d->voice[i].sample->vibrato_sweep_increment; d->voice[i].vibrato_depth=d->voice[i].sample->vibrato_depth; d->voice[i].vibrato_sweep_position=0; d->voice[i].vibrato_control_ratio=d->voice[i].sample->vibrato_control_ratio; d->voice[i].vibrato_delay = d->voice[i].sample->vibrato_delay; #ifdef tplus if(d->channel[ch].vibrato_ratio && d->voice[i].vibrato_depth > 0) { d->voice[i].vibrato_control_ratio = d->channel[ch].vibrato_ratio; d->voice[i].vibrato_depth = d->channel[ch].vibrato_depth; d->voice[i].vibrato_delay = d->channel[ch].vibrato_delay; } else d->voice[i].vibrato_delay = 0; #endif d->voice[i].vibrato_control_counter=d->voice[i].vibrato_phase=0; for (j=0; jvoice[i].vibrato_sample_increment[j]=0; attacktime = d->channel[ch].attacktime; releasetime = d->channel[ch].releasetime; decaytime = 64; variationbank = d->channel[ch].variationbank; switch (variationbank) { case 8: attacktime = 64+32; break; case 12: decaytime = 64-32; break; case 16: brightness = 64+16; break; case 17: brightness = 64+32; break; case 18: brightness = 64-16; break; case 19: brightness = 64-32; break; case 20: harmoniccontent = 64+16; break; case 24: d->voice[i].modEnvToFilterFc=2.0; d->voice[i].sample->cutoff_freq = 800; break; case 25: d->voice[i].modEnvToFilterFc=-2.0; d->voice[i].sample->cutoff_freq = 800; break; case 27: d->voice[i].modLfoToFilterFc=2.0; d->voice[i].lfo_phase_increment=109; d->voice[i].lfo_sweep=122; d->voice[i].sample->cutoff_freq = 800; break; case 28: d->voice[i].modLfoToFilterFc=-2.0; d->voice[i].lfo_phase_increment=109; d->voice[i].lfo_sweep=122; d->voice[i].sample->cutoff_freq = 800; break; default: break; } #ifdef RATE_ADJUST_DEBUG { int e_debug=0, f_debug=0; int32 r; if (releasetime!=64) e_debug=1; if (attacktime!=64) f_debug=1; if (e_debug) printf("ADJ release time by %d on %d\n", releasetime -64, ch); if (f_debug) printf("ADJ attack time by %d on %d\n", attacktime -64, ch); #endif for (j=ATTACK; jvoice[i].envelope_rate[j]=d->voice[i].sample->envelope_rate[j]; d->voice[i].envelope_offset[j]=d->voice[i].sample->envelope_offset[j]; #ifdef RATE_ADJUST_DEBUG if (f_debug) printf("\trate %d = %ld; offset = %ld\n", j, d->voice[i].envelope_rate[j], d->voice[i].envelope_offset[j]); #endif } if (d->voice[i].sample->keyToVolEnvHold) { FLOAT_T rate_adjust; rate_adjust = pow(2.0, (60 - d->voice[i].note) * d->voice[i].sample->keyToVolEnvHold / 1200.0); d->voice[i].envelope_rate[HOLD] = (uint32)( (FLOAT_T)d->voice[i].envelope_rate[HOLD] / rate_adjust ); } if (d->voice[i].sample->keyToVolEnvDecay) { FLOAT_T rate_adjust; rate_adjust = pow(2.0, (60 - d->voice[i].note) * d->voice[i].sample->keyToVolEnvDecay / 1200.0); d->voice[i].envelope_rate[DECAY] = (uint32)( (FLOAT_T)d->voice[i].envelope_rate[DECAY] / rate_adjust ); } d->voice[i].echo_delay=d->voice[i].envelope_rate[DELAY]; d->voice[i].echo_delay_count = d->voice[i].echo_delay; #ifdef RATE_ADJUST_DEBUG if (e_debug) { printf("(old rel time = %ld)\n", (d->voice[i].envelope_offset[2] - d->voice[i].envelope_offset[3]) / d->voice[i].envelope_rate[3]); r = d->voice[i].envelope_rate[3]; r = r + ( (64-releasetime)*r ) / 100; d->voice[i].envelope_rate[3] = r; printf("(new rel time = %ld)\n", (d->voice[i].envelope_offset[2] - d->voice[i].envelope_offset[3]) / d->voice[i].envelope_rate[3]); } } #endif if (attacktime!=64) { rt = d->voice[i].envelope_rate[ATTACK]; rt = rt + ( (64-attacktime)*rt ) / 100; if (rt > 1000) d->voice[i].envelope_rate[ATTACK] = rt; } if (releasetime!=64) { rt = d->voice[i].envelope_rate[RELEASE]; rt = rt + ( (64-releasetime)*rt ) / 100; if (rt > 1000) d->voice[i].envelope_rate[RELEASE] = rt; } if (decaytime!=64) { rt = d->voice[i].envelope_rate[DECAY]; rt = rt + ( (64-decaytime)*rt ) / 100; if (rt > 1000) d->voice[i].envelope_rate[DECAY] = rt; } if (d->channel[ch].panning != NO_PANNING) d->voice[i].panning=d->channel[ch].panning; else d->voice[i].panning=d->voice[i].sample->panning; if (drumpan != NO_PANNING) d->voice[i].panning=drumpan; #ifdef tplus d->voice[i].porta_control_counter = 0; if(d->channel[ch].portamento && !d->channel[ch].porta_control_ratio) update_portamento_controls(ch, d); if(d->channel[ch].porta_control_ratio) { if(d->channel[ch].last_note_fine == -1) { /* first on */ d->channel[ch].last_note_fine = d->voice[i].note * 256; d->channel[ch].porta_control_ratio = 0; } else { d->voice[i].porta_control_ratio = d->channel[ch].porta_control_ratio; d->voice[i].porta_dpb = d->channel[ch].porta_dpb; d->voice[i].porta_pb = d->channel[ch].last_note_fine - d->voice[i].note * 256; if(d->voice[i].porta_pb == 0) d->voice[i].porta_control_ratio = 0; } } /* What "cnt"? if(cnt == 0) d->channel[ch].last_note_fine = d->voice[i].note * 256; */ #endif if (d->voice[i].sample->sample_rate) { if (brightness >= 0 && brightness != 64) { int32 fq = d->voice[i].sample->cutoff_freq; if (brightness > 64) { if (!fq || fq > 8000) fq = 0; else fq += (brightness - 64) * (fq / 80); } else { if (!fq) fq = 6400 + (brightness - 64) * 80; else fq += (brightness - 64) * (fq / 80); } if (fq && fq < 349) fq = 349; else if (fq > 19912) fq = 19912; d->voice[i].sample->cutoff_freq = fq; } if (harmoniccontent >= 0 && harmoniccontent != 64) { d->voice[i].sample->resonance = harmoniccontent / 256.0; } } if (reverb_options & OPT_STEREO_EXTRA || variationbank == 1) { int pan = d->voice[i].panning; int disturb = 0; /* If they're close up (no reverb) and you are behind the pianist, * high notes come from the right, so we'll spread piano etc. notes * out horizontally according to their pitches. */ if (this_prog < 21) { int n = d->voice[i].velocity - 32; if (n < 0) n = 0; if (n > 64) n = 64; pan = pan/2 + n; } /* For other types of instruments, the music sounds more alive if * notes come from slightly different directions. However, instruments * do drift around in a sometimes disconcerting way, so the following * might not be such a good idea. */ else disturb = (d->voice[i].velocity/32 % 8) + (d->voice[i].note % 8); /* /16? */ if (pan < 64) pan += disturb; else pan -= disturb; if (pan < 0) pan = 0; else if (pan > 127) pan = 127; d->voice[i].panning = pan; } recompute_freq(i, d); recompute_amp(i, d); if (d->voice[i].sample->modes & MODES_ENVELOPE) { /* Ramp up from 0 */ d->voice[i].envelope_stage=ATTACK; d->voice[i].envelope_volume=0; d->voice[i].control_counter=0; d->voice[i].modulation_stage=ATTACK; d->voice[i].modulation_volume=0; d->voice[i].modulation_counter=0; if (d->voice[i].sample->cutoff_freq) d->voice[i].bw_index = 1 + (d->voice[i].sample->cutoff_freq+50) / 100; else d->voice[i].bw_index = 0; recompute_envelope(i, d); recompute_modulation(i, d); apply_envelope_to_amp(i, d); } else { d->voice[i].envelope_increment=0; apply_envelope_to_amp(i, d); } d->voice[i].clone_voice = -1; d->voice[i].clone_type = NOT_CLONE; #ifdef DEBUG_CLONE_NOTES fprintf(stderr,"NOT_CLONE v%d vol%f pan%d\n", i, d->voice[i].volume, d->voice[i].panning); #endif if (reverb_options & OPT_STEREO_VOICE) clone_voice(ip, i, e, STEREO_CLONE, variationbank, d); if (reverb_options & OPT_CHORUS_VOICE || (d->XG_System_chorus_type >> 3) == 3) clone_voice(ip, i, e, CHORUS_CLONE, variationbank, d); if (reverb_options & OPT_REVERB_VOICE) clone_voice(ip, i, e, REVERB_CLONE, variationbank, d); ctl->note(i); played_notes++; } /* changed from VOICE_DIE: the trouble with ramping out dying voices in mix.c is that the dying time is just a coincidence of how near a buffer end we happen to be. */ static void kill_note(int i, struct md *d) { d->voice[i].status=VOICE_DIE; if (d->voice[i].clone_voice >= 0) d->voice[ d->voice[i].clone_voice ].status=VOICE_DIE; ctl->note(i); } static int reduce_polyphony_by_one(struct md *d) { int i=d->voices, lowest=-1; int32 lv=0x7FFFFFFF, v=0x7FFFFFFF, vr; int32 duration; /* Look for the decaying note with the lowest volume */ /* Leave drums, sustains. */ i=d->voices; while (i--) { if (d->voice[i].status==VOICE_FREE || !d->voice[i].sample->sample_rate /* idea from Eric Welsh */ || d->voice[i].sample->note_to_use) continue; if (d->voice[i].status & ~(VOICE_ON | VOICE_DIE | VOICE_SUSTAINED)) { v=d->voice[i].left_mix; if ((d->voice[i].panned==PANNED_MYSTERY) && (d->voice[i].right_mix>v)) v=d->voice[i].right_mix; if (vvoices; while (i--) { if (d->voice[i].status==VOICE_FREE || !d->voice[i].sample->sample_rate /* idea from Eric Welsh */ || d->voice[i].sample->note_to_use) continue; if (d->voice[i].status & ~(VOICE_ON | VOICE_DIE)) { v=d->voice[i].left_mix; if ((d->voice[i].panned==PANNED_MYSTERY) && (d->voice[i].right_mix>v)) v=d->voice[i].right_mix; if (vvoices; while (i--) { if (d->voice[i].status==VOICE_FREE || !d->voice[i].sample->sample_rate /* idea from Eric Welsh */ || d->voice[i].sample->note_to_use) continue; if (d->voice[i].status & ~(VOICE_ON | VOICE_DIE | VOICE_SUSTAINED)) { /* Choose note with longest decay time remaining */ /* This frees more CPU than choosing lowest volume */ if (!d->voice[i].envelope_increment) duration = 0; else duration = (d->voice[i].envelope_target - d->voice[i].envelope_volume) / d->voice[i].envelope_increment; if (vvoices; while (i--) { if (d->voice[i].status & (VOICE_FREE | VOICE_DIE)) continue; if(d->voice[i].sample->modes & ~MODES_LOOPING) { /* score notes based on both volume AND duration */ /* this scoring function needs some more tweaking... */ duration = d->voice[i].sample_offset; if (d->voice[i].sample_increment > 0) duration /= d->voice[i].sample_increment; v = d->voice[i].left_mix * duration; vr = d->voice[i].right_mix * duration; if(d->voice[i].panned == PANNED_MYSTERY && vr > v) v = vr; if (vvoices; while (i--) { if (d->voice[i].status & (VOICE_FREE | VOICE_DIE)) continue; if(d->voice[i].sample->modes & ~MODES_LOOPING) continue; /* score notes based on both volume AND duration */ /* this scoring function needs some more tweaking... */ duration = d->voice[i].sample_offset; if (d->voice[i].sample_increment > 0) duration /= d->voice[i].sample_increment; v = d->voice[i].left_mix * duration; vr = d->voice[i].right_mix * duration; if(d->voice[i].panned == PANNED_MYSTERY && vr > v) v = vr; if (voutput_buffer_full, retvalue = 1; int vcs = d->voices; int cpoly = d->current_polyphony; int rsv = 0, permitted, polyreduction; #ifdef QUALITY_DEBUG if (!debug_count) { if (d->dont_cspline) fprintf(stderr,"[%d-%d]", d->output_buffer_full, d->current_polyphony); else fprintf(stderr,"{%d-%d}", d->output_buffer_full, d->current_polyphony); debug_count = 30; } debug_count--; #endif #if 0 #ifdef POLYPHONY_COUNT if (d->current_polyphony < d->future_polyphony * 2) obf /= 2; #endif #endif permitted = vcs - 16; if (permitted < 0) permitted = 0; if (obf > 0) permitted = permitted * obf / 100; else permitted = 0; permitted += 16; rsv = vcs - permitted; d->voice_reserve = rsv; #if 0 if (!d->current_interpolation) d->dont_cspline = 1; else if (obf < 10) d->dont_cspline = 1; else if (obf > 40) d->dont_cspline = 0; if (obf < 5) d->dont_reverb = 1; else if (obf > 25) d->dont_reverb = 0; if (obf < 8) d->dont_chorus = 1; else if (obf > 60) d->dont_chorus = 0; if (opt_dry || obf < 6) d->dont_keep_looping = 1; else if (obf > 22) d->dont_keep_looping = 0; #endif /* if (obf < 20) dont_filter = 1; else if (obf > 80) dont_filter = 0; */ /* pool should be permitted/10 * present pool is permitted - cpoly * reduction = permitted/10 - (permitted - cpoly) */ polyreduction = cpoly - permitted; polyreduction += permitted / 10; /* fprintf(stderr,"\tred %d = cpoly %d - permitted %d + p/4 %d\n", polyreduction, cpoly, permitted, permitted / 4); */ /* polyreduction = permitted / 4 - (permitted - cpoly); if (polyreduction < 0) polyreduction = 0; */ /* * extra reduction if buffer is too low * (100 - obf)% of cpoly */ /* polyreduction += cpoly * (100 - obf) / 100; */ if (polyreduction>0) retvalue = reduce_polyphony(polyreduction, d); /* if (polyreduction>0) fprintf(stderr,"\tcpoly=%d: red ?%d->%d\n", cpoly, polyreduction, retvalue); */ retvalue = 1; if (command_cutoff_allowed) dont_filter_melodic = 0; else dont_filter_melodic = 1; dont_filter_drums = 0; return retvalue; } static void note_on(MidiEvent *e, struct md *d) { int i=d->voices, lowest=-1; int32 lv=0x7FFFFFFF, v; int cpoly = 0, cdie = 0, cfree = 0; while (i--) { if (d->voice[i].status == VOICE_FREE) { lowest=i; /* Can't get a lower volume than silence */ cfree++; } else if (d->voice[i].status == VOICE_DIE) cdie++; else cpoly++; } d->current_polyphony = cpoly; d->current_free_voices = cfree; d->current_dying_voices = cdie; if (!check_quality(d)) { d->lost_notes++; return; } if (lowest != -1) { /* Found a free voice. */ start_note(e,lowest, d); return; } /* Look for the decaying note with the lowest volume */ i=d->voices; while (i--) { if (d->voice[i].status & ~(VOICE_ON | VOICE_DIE | VOICE_FREE)) { v=d->voice[i].left_mix; if ((d->voice[i].panned==PANNED_MYSTERY) && (d->voice[i].right_mix>v)) v=d->voice[i].right_mix; if (vvoices; while (i--) { if ( (d->voice[i].status & ~(VOICE_ON | VOICE_DIE | VOICE_FREE)) && (!d->voice[i].clone_type)) { v=d->voice[i].left_mix; if ((d->voice[i].panned==PANNED_MYSTERY) && (d->voice[i].right_mix>v)) v=d->voice[i].right_mix; if (vvoice[lowest].clone_voice; /* This can still cause a click, but if we had a free voice to spare for ramping down this note, we wouldn't need to kill it in the first place... Still, this needs to be fixed. Perhaps we could use a reserve of d->voices to play dying notes only. */ cut_notes++; d->voice[lowest].status=VOICE_FREE; if (cl >= 0) { /** if (d->voice[lowest].velocity == d->voice[cl].velocity) **/ if (d->voice[cl].clone_type==STEREO_CLONE || (!d->voice[cl].clone_type && d->voice[lowest].clone_type==STEREO_CLONE)) d->voice[cl].status=VOICE_FREE; else if (d->voice[cl].clone_voice==lowest) d->voice[cl].clone_voice=-1; } ctl->note(lowest); start_note(e,lowest, d); } else d->lost_notes++; } static void finish_note(int i, struct md *d) { if (d->voice[i].status & (VOICE_FREE | VOICE_DIE | VOICE_OFF)) return; if (d->voice[i].sample->modes & MODES_ENVELOPE) { /* We need to get the envelope out of Sustain stage */ if (d->voice[i].envelope_stage < RELEASE) d->voice[i].envelope_stage=RELEASE; d->voice[i].status=VOICE_OFF; recompute_envelope(i, d); apply_envelope_to_amp(i, d); ctl->note(i); } else { /* Set status to OFF so resample_voice() will let this voice out of its loop, if any. In any case, this voice dies when it hits the end of its data (ofs>=data_length). */ d->voice[i].status=VOICE_OFF; ctl->note(i); } { int v; if ( (v=d->voice[i].clone_voice) >= 0) { d->voice[i].clone_voice = -1; finish_note(v, d); } } } static void note_off(MidiEvent *e, struct md *d) { int i=d->voices, v; while (i--) if (d->voice[i].status==VOICE_ON && d->voice[i].channel==e->channel && d->voice[i].note==e->a) { if (d->channel[e->channel].sustain) { d->voice[i].status=VOICE_SUSTAINED; ctl->note(i); if ( (v=d->voice[i].clone_voice) >= 0) { if (d->voice[v].status == VOICE_ON) d->voice[v].status=VOICE_SUSTAINED; } } else finish_note(i, d); } } /* Process the All Notes Off event */ static void all_notes_off(int c, struct md *d) { int i=d->voices; ctl->cmsg(CMSG_INFO, VERB_DEBUG, "All notes off on channel %d", c); while (i--) if (d->voice[i].status==VOICE_ON && d->voice[i].channel==c) { if (d->channel[c].sustain) { d->voice[i].status=VOICE_SUSTAINED; ctl->note(i); } else finish_note(i, d); } } /* Process the All Sounds Off event */ static void all_sounds_off(int c, struct md *d) { int i=d->voices; while (i--) if (d->voice[i].channel==c && d->voice[i].status != VOICE_FREE && d->voice[i].status != VOICE_DIE) { kill_note(i, d); } } static void adjust_pressure(MidiEvent *e, struct md *d) { int i=d->voices; while (i--) if (d->voice[i].status==VOICE_ON && d->voice[i].channel==e->channel && d->voice[i].note==e->a) { d->voice[i].velocity=e->b; recompute_amp(i, d); apply_envelope_to_amp(i, d); } } #ifdef tplus static void adjust_channel_pressure(MidiEvent *e, struct md *d) { #if 0 if(opt_channel_pressure) { #endif int i=d->voices; int ch, pressure; ch = e->channel; pressure = e->a; while (i--) if(d->voice[i].status == VOICE_ON && d->voice[i].channel == ch) { d->voice[i].velocity = pressure; recompute_amp(i, d); apply_envelope_to_amp(i, d); } #if 0 } #endif } #endif static void adjust_panning(int c, struct md *d) { int i=d->voices; while (i--) if ((d->voice[i].channel==c) && (d->voice[i].status & (VOICE_ON | VOICE_SUSTAINED)) ) { /* if (d->voice[i].clone_voice >= 0) continue; */ if (d->voice[i].clone_type != NOT_CLONE) continue; d->voice[i].panning=d->channel[c].panning; recompute_amp(i, d); apply_envelope_to_amp(i, d); } } static void drop_sustain(int c, struct md *d) { int i=d->voices; while (i--) if ( (d->voice[i].status & VOICE_SUSTAINED) && d->voice[i].channel==c) finish_note(i, d); } static void adjust_pitchbend(int c, struct md *d) { int i=d->voices; while (i--) if (d->voice[i].status!=VOICE_FREE && d->voice[i].channel==c) { recompute_freq(i, d); } } static void adjust_volume(int c, struct md *d) { int i=d->voices; while (i--) if (d->voice[i].channel==c && (d->voice[i].status==VOICE_ON || d->voice[i].status==VOICE_SUSTAINED)) { recompute_amp(i, d); apply_envelope_to_amp(i, d); ctl->note(i); } } #ifdef tplus static int32 midi_cnv_vib_rate(int rate) { return (int32)((double)play_mode->rate * MODULATION_WHEEL_RATE / (midi_time_table[rate] * 2.0 * VIBRATO_SAMPLE_INCREMENTS)); } static int midi_cnv_vib_depth(int depth) { return (int)(depth * VIBRATO_DEPTH_TUNING); } static int32 midi_cnv_vib_delay(int delay) { return (int32)(midi_time_table[delay]); } #endif #ifdef INFO_ONLY static int xmp_epoch = -1; static unsigned xxmp_epoch = 0; static unsigned time_expired = 0; static unsigned last_time_expired = 0; extern int gettimeofday(struct timeval *, struct timezone *); static struct timeval tv; static struct timezone tz; static void time_sync(uint32 resync, int dosync) { unsigned jiffies; if (dosync) { last_time_expired = resync; xmp_epoch = -1; xxmp_epoch = 0; time_expired = 0; /*return;*/ } gettimeofday (&tv, &tz); if (xmp_epoch < 0) { xxmp_epoch = tv.tv_sec; xmp_epoch = tv.tv_usec; } jiffies = (tv.tv_sec - xxmp_epoch)*100 + (tv.tv_usec - xmp_epoch)/10000; time_expired = (jiffies * play_mode->rate)/100 + last_time_expired; } static int got_a_lyric = 0; #define META_BUF_LEN 1024 static void show_markers(uint32 until_time, int dosync) { static struct meta_text_type *meta; char buf[META_BUF_LEN]; int i, j, len, lyriclen; if (!meta_text_list) return; if (dosync) { time_sync(until_time, 1); for (meta = meta_text_list; meta && meta->time < until_time; meta = meta->next) ; return; } if (!time_expired) meta = meta_text_list; time_sync(0, 0); buf[0] = '\0'; len = 0; while (meta) if (meta->time <= time_expired) { if (meta->type == 5) got_a_lyric = 1; if (!got_a_lyric || meta->type == 5) { lyriclen = strlen(meta->text); if (len + lyriclen + 1 < META_BUF_LEN) { len += lyriclen; strcat(buf, meta->text); } if (!meta->next) strcat(buf, " \n"); } meta = meta->next; } else break; len = strlen(buf); for (i = 0, j = 0; j < META_BUF_LEN && j < len; j++) if (buf[j] == '\n') { buf[j] = '\0'; if (j - i > 0) ctl->cmsg(CMSG_LYRIC, VERB_ALWAYS, buf + i); else ctl->cmsg(CMSG_LYRIC, VERB_ALWAYS, " "); i = j + 1; } if (i < j) ctl->cmsg(CMSG_LYRIC, VERB_ALWAYS, "~%s", buf + i); } #endif static void seek_forward(uint32 until_time, struct md *d) { reset_voices(d); #ifdef INFO_ONLY show_markers(until_time, 1); #endif while (d->current_event->time < until_time) { switch(d->current_event->type) { /* All notes stay off. Just handle the parameter changes. */ case ME_PITCH_SENS: d->channel[d->current_event->channel].pitchsens= d->current_event->a; d->channel[d->current_event->channel].pitchfactor=0; break; case ME_PITCHWHEEL: d->channel[d->current_event->channel].pitchbend= d->current_event->a + d->current_event->b * 128; d->channel[d->current_event->channel].pitchfactor=0; break; #ifdef tplus case ME_MODULATION_WHEEL: d->channel[d->current_event->channel].modulation_wheel = midi_cnv_vib_depth(d->current_event->a); break; case ME_PORTAMENTO_TIME_MSB: d->channel[d->current_event->channel].portamento_time_msb = d->current_event->a; break; case ME_PORTAMENTO_TIME_LSB: d->channel[d->current_event->channel].portamento_time_lsb = d->current_event->a; break; case ME_PORTAMENTO: d->channel[d->current_event->channel].portamento = (d->current_event->a >= 64); break; case ME_FINE_TUNING: d->channel[d->current_event->channel].tuning_lsb = d->current_event->a; break; case ME_COARSE_TUNING: d->channel[d->current_event->channel].tuning_msb = d->current_event->a; break; case ME_CHANNEL_PRESSURE: /*adjust_channel_pressure(d->current_event);*/ break; #endif case ME_MAINVOLUME: d->channel[d->current_event->channel].volume=d->current_event->a; break; case ME_MASTERVOLUME: adjust_master_volume(d->current_event->a + (d->current_event->b <<7), d); break; case ME_PAN: d->channel[d->current_event->channel].panning=d->current_event->a; break; case ME_EXPRESSION: d->channel[d->current_event->channel].expression=d->current_event->a; break; case ME_PROGRAM: if (d->channel[d->current_event->channel].kit) /* Change drum set */ d->channel[d->current_event->channel].bank=d->current_event->a; else d->channel[d->current_event->channel].program=d->current_event->a; break; case ME_SUSTAIN: d->channel[d->current_event->channel].sustain=d->current_event->a; break; case ME_REVERBERATION: if (global_reverb > d->current_event->a) break; #ifdef CHANNEL_EFFECT if (opt_effect_reverb) effect_ctrl_change( d->current_event, d ) ; else #endif d->channel[d->current_event->channel].reverberation=d->current_event->a; break; case ME_CHORUSDEPTH: if (global_chorus > d->current_event->a) break; #ifdef CHANNEL_EFFECT if (opt_effect) effect_ctrl_change( d->current_event, d ) ; else #endif d->channel[d->current_event->channel].chorusdepth=d->current_event->a; break; #ifdef CHANNEL_EFFECT case ME_CELESTE: if (opt_effect) effect_ctrl_change( d->current_event, d ) ; break; case ME_PHASER: if (opt_effect) effect_ctrl_change( d->current_event, d ) ; break; #endif case ME_HARMONICCONTENT: d->channel[d->current_event->channel].harmoniccontent=d->current_event->a; break; case ME_RELEASETIME: d->channel[d->current_event->channel].releasetime=d->current_event->a; break; case ME_ATTACKTIME: d->channel[d->current_event->channel].attacktime=d->current_event->a; break; #ifdef tplus case ME_VIBRATO_RATE: d->channel[d->current_event->channel].vibrato_ratio=midi_cnv_vib_rate(d->current_event->a); break; case ME_VIBRATO_DEPTH: d->channel[d->current_event->channel].vibrato_depth=midi_cnv_vib_depth(d->current_event->a); break; case ME_VIBRATO_DELAY: d->channel[d->current_event->channel].vibrato_delay=midi_cnv_vib_delay(d->current_event->a); break; #endif case ME_BRIGHTNESS: d->channel[d->current_event->channel].brightness=d->current_event->a; break; case ME_RESET_CONTROLLERS: reset_controllers(d->current_event->channel, d); break; case ME_TONE_BANK: d->channel[d->current_event->channel].bank=d->current_event->a; break; case ME_TONE_KIT: if (d->current_event->a==SFX_BANKTYPE) { d->channel[d->current_event->channel].sfx=SFXBANK; d->channel[d->current_event->channel].kit=0; } else { d->channel[d->current_event->channel].sfx=0; d->channel[d->current_event->channel].kit=d->current_event->a; } break; case ME_EOT: d->current_sample=d->current_event->time; return; } d->current_event++; } /*d->current_sample=d->current_event->time;*/ if (d->current_event != d->event) d->current_event--; d->current_sample=until_time; } int skip_to(uint32 until_time, struct md *d) { if (d->current_sample > until_time) d->current_sample=0; if (!d->event) return 0; reset_midi(d); d->buffered_count=0; d->buffer_pointer=d->common_buffer; d->current_event=d->event; if (until_time) seek_forward(until_time, d); #ifdef INFO_ONLY else show_markers(until_time, 1); #endif ctl->reset(); return 1; } static int apply_controls(struct md *d) { int rc, i, did_skip=0; int32 val; /* ASCII renditions of CD player pictograms indicate approximate effect */ do switch(rc=ctl->read(&val)) { case RC_QUIT: /* [] */ case RC_LOAD_FILE: case RC_NEXT: /* >>| */ case RC_REALLY_PREVIOUS: /* |<< */ case RC_PATCHCHANGE: case RC_CHANGE_VOICES: case RC_STOP: play_mode->purge_output(d); return rc; case RC_CHANGE_VOLUME: if (val>0 || d->amplification > -val) d->amplification += val; else d->amplification=0; if (d->amplification > MAX_AMPLIFICATION) d->amplification=MAX_AMPLIFICATION; adjust_amplification(d); for (i=0; ivoices; i++) if (d->voice[i].status != VOICE_FREE) { recompute_amp(i, d); apply_envelope_to_amp(i, d); } ctl->master_volume(d->amplification); break; case RC_PREVIOUS: /* |<< */ play_mode->purge_output(d); if (d->current_sample < 2*play_mode->rate) return RC_REALLY_PREVIOUS; return RC_RESTART; case RC_RESTART: /* |<< */ skip_to(0, d); play_mode->purge_output(d); did_skip=1; break; case RC_JUMP: play_mode->purge_output(d); if (val >= (int32)d->sample_count) return RC_NEXT; skip_to((uint32)val, d); return rc; case RC_FORWARD: /* >> */ /*play_mode->purge_output();*/ if (val+d->current_sample >= d->sample_count) return RC_NEXT; skip_to(val+d->current_sample, d); did_skip=1; break; case RC_BACK: /* << */ /*play_mode->purge_output();*/ if (d->current_sample > (uint32)val) skip_to(d->current_sample-(uint32)val, d); else skip_to(0, d); /* We can't seek to end of previous song. */ did_skip=1; break; } while (rc!= RC_NONE); /* Advertise the skip so that we stop computing the audio buffer */ if (did_skip) return RC_JUMP; else return rc; } #ifdef CHANNEL_EFFECT extern void (*do_compute_data)(uint32, struct md *) ; #else static void do_compute_data(uint32 count, struct md *d) { int i; if (!count) return; /* (gl) */ memset(d->buffer_pointer, 0, (play_mode->encoding & PE_MONO) ? (count * 4) : (count * 8)); for (i=0; ivoices; i++) { if(d->voice[i].status != VOICE_FREE) { if (!d->voice[i].sample_offset && d->voice[i].echo_delay_count) { if (d->voice[i].echo_delay_count >= count) d->voice[i].echo_delay_count -= count; else { mix_voice(d->buffer_pointer+d->voice[i].echo_delay_count, i, count-d->voice[i].echo_delay_count, d); d->voice[i].echo_delay_count = 0; } } else mix_voice(d->buffer_pointer, i, count, d); } } d->current_sample += count; } #endif /*CHANNEL_EFFECT*/ /* count=0 means flush remaining buffered data to output device, then flush the device itself */ static int compute_data(uint32 count, struct md *d) { int rc; d->super_buffer_count = 0; if (!count) { if (d->buffered_count) play_mode->output_data(d->common_buffer, d->buffered_count, d); play_mode->flush_output(d); d->buffer_pointer=d->common_buffer; d->buffered_count=0; return RC_NONE; } while ((count+d->buffered_count) >= AUDIO_BUFFER_SIZE) { if (d->bbcount + AUDIO_BUFFER_SIZE * 2 >= BB_SIZE - output_fragsize) { d->super_buffer_count = count; return 0; } if (d->flushing_output_device && d->bbcount >= output_fragsize * 2) { d->super_buffer_count = count; return 0; } do_compute_data(AUDIO_BUFFER_SIZE-d->buffered_count, d); count -= AUDIO_BUFFER_SIZE-d->buffered_count; play_mode->output_data(d->common_buffer, AUDIO_BUFFER_SIZE, d); d->buffer_pointer=d->common_buffer; d->buffered_count=0; ctl->current_time(d->current_sample); #ifdef INFO_ONLY show_markers(0, 0); #endif if ((rc=apply_controls(d))!=RC_NONE) return rc; } if (count>0) { do_compute_data(count, d); d->buffered_count += count; d->buffer_pointer += (play_mode->encoding & PE_MONO) ? count : count*2; } return RC_NONE; } #ifdef tplus static void update_modulation_wheel(int ch, uint32 val, struct md *d) { int i, uv = /*upper_*/d->voices; for(i = 0; i < uv; i++) if(d->voice[i].status != VOICE_FREE && d->voice[i].channel == ch && d->voice[i].modulation_wheel != val) { /* Set/Reset mod-wheel */ d->voice[i].modulation_wheel = val; d->voice[i].vibrato_delay = 0; recompute_freq(i, d); } } static void drop_portamento(int ch, struct md *d) { int i, uv = /*upper_*/d->voices; d->channel[ch].porta_control_ratio = 0; for(i = 0; i < uv; i++) if(d->voice[i].status != VOICE_FREE && d->voice[i].channel == ch && d->voice[i].porta_control_ratio) { d->voice[i].porta_control_ratio = 0; recompute_freq(i, d); } d->channel[ch].last_note_fine = -1; } static void update_portamento_controls(int ch, struct md *d) { if(!d->channel[ch].portamento || (d->channel[ch].portamento_time_msb | d->channel[ch].portamento_time_lsb) == 0) drop_portamento(ch, d); else { double mt, dc; int di; mt = midi_time_table[d->channel[ch].portamento_time_msb & 0x7F] * midi_time_table2[d->channel[ch].portamento_time_lsb & 0x7F] * PORTAMENTO_TIME_TUNING; dc = play_mode->rate * mt; di = (int)(1.0 / (mt * PORTAMENTO_CONTROL_RATIO)); di++; d->channel[ch].porta_control_ratio = (int)(di * dc + 0.5); d->channel[ch].porta_dpb = di; } } static void update_portamento_time(int ch, struct md *d) { int i, uv = /*upper_*/d->voices; int dpb; int32 ratio; update_portamento_controls(ch, d); dpb = d->channel[ch].porta_dpb; ratio = d->channel[ch].porta_control_ratio; for(i = 0; i < uv; i++) { if(d->voice[i].status != VOICE_FREE && d->voice[i].channel == ch && d->voice[i].porta_control_ratio) { d->voice[i].porta_control_ratio = ratio; d->voice[i].porta_dpb = dpb; recompute_freq(i, d); } } } static void update_channel_freq(int ch, struct md *d) { int i, uv = /*upper_*/d->voices; for(i = 0; i < uv; i++) if(d->voice[i].status != VOICE_FREE && d->voice[i].channel == ch) recompute_freq(i, d); } #endif /*static uint32 event_count = 0;*/ static int play_midi(struct md *d) { adjust_amplification(d); d->lost_notes=cut_notes=played_notes=output_clips=0; skip_to(0, d); return 0; } int play_some_midi(struct md *d) { int rc, basecount; basecount = d->bbcount; for (;;) { if (d->super_buffer_count) { compute_data(d->super_buffer_count, d); return 0; } /* if (d->flushing_output_device && d->bbcount >= output_fragsize) { return 0; } */ if (d->flushing_output_device) { compute_data(0, d); return RC_TUNE_END; } /* Handle all events that should happen at this time */ while (d->current_event->time <= d->current_sample) { #ifdef POLYPHONY_COUNT d->future_polyphony = d->current_event->polyphony; #endif switch(d->current_event->type) { /* Effects affecting a single note */ case ME_NOTEON: #ifdef tplus #if 0 if (d->channel[d->current_event->channel].portamento && d->current_event->b && (d->channel[d->current_event->channel].portamento_time_msb| d->channel[d->current_event->channel].portamento_time_lsb )) break; #endif #endif d->current_event->a += d->channel[d->current_event->channel].transpose; if (!(d->current_event->b)) /* Velocity 0? */ note_off(d->current_event, d); else note_on(d->current_event, d); break; case ME_NOTEOFF: d->current_event->a += d->channel[d->current_event->channel].transpose; note_off(d->current_event, d); break; case ME_KEYPRESSURE: adjust_pressure(d->current_event, d); break; /* Effects affecting a single channel */ case ME_PITCH_SENS: d->channel[d->current_event->channel].pitchsens= d->current_event->a; d->channel[d->current_event->channel].pitchfactor=0; break; case ME_PITCHWHEEL: d->channel[d->current_event->channel].pitchbend= d->current_event->a + d->current_event->b * 128; d->channel[d->current_event->channel].pitchfactor=0; /* Adjust pitch for notes already playing */ adjust_pitchbend(d->current_event->channel, d); ctl->pitch_bend(d->current_event->channel, d->channel[d->current_event->channel].pitchbend); break; #ifdef tplus case ME_MODULATION_WHEEL: d->channel[d->current_event->channel].modulation_wheel = midi_cnv_vib_depth(d->current_event->a); update_modulation_wheel(d->current_event->channel, d->channel[d->current_event->channel].modulation_wheel, d); /*ctl_mode_event(CTLE_MOD_WHEEL, 1, d->current_event->channel, d->channel[d->current_event->channel].modulation_wheel);*/ /*ctl->cmsg(CMSG_INFO, VERB_NORMAL, "~m%u", midi_cnv_vib_depth(d->current_event->a));*/ break; case ME_PORTAMENTO_TIME_MSB: d->channel[d->current_event->channel].portamento_time_msb = d->current_event->a; update_portamento_time(d->current_event->channel, d); break; case ME_PORTAMENTO_TIME_LSB: d->channel[d->current_event->channel].portamento_time_lsb = d->current_event->a; update_portamento_time(d->current_event->channel, d); break; case ME_PORTAMENTO: d->channel[d->current_event->channel].portamento = (d->current_event->a >= 64); if(!d->channel[d->current_event->channel].portamento) drop_portamento(d->current_event->channel, d); /*ctl->cmsg(CMSG_INFO, VERB_NORMAL, "~P%d",d->current_event->a);*/ break; case ME_FINE_TUNING: d->channel[d->current_event->channel].tuning_lsb = d->current_event->a; /*ctl->cmsg(CMSG_INFO, VERB_NORMAL, "~t");*/ break; case ME_COARSE_TUNING: d->channel[d->current_event->channel].tuning_msb = d->current_event->a; /*ctl->cmsg(CMSG_INFO, VERB_NORMAL, "~T");*/ break; case ME_CHANNEL_PRESSURE: adjust_channel_pressure(d->current_event, d); break; #endif case ME_MAINVOLUME: d->channel[d->current_event->channel].volume=d->current_event->a; adjust_volume(d->current_event->channel, d); ctl->volume(d->current_event->channel, d->current_event->a); break; case ME_MASTERVOLUME: adjust_master_volume(d->current_event->a + (d->current_event->b <<7), d); break; case ME_REVERBERATION: if (global_reverb > d->current_event->a) break; #ifdef CHANNEL_EFFECT if (opt_effect_reverb) effect_ctrl_change( d->current_event, d ) ; else #endif d->channel[d->current_event->channel].reverberation=d->current_event->a; break; case ME_CHORUSDEPTH: if (global_chorus > d->current_event->a) break; #ifdef CHANNEL_EFFECT if (opt_effect) { if (XG_effect_chorus_is_celeste_flag) d->current_event->type = ME_CELESTE; else if (XG_effect_chorus_is_phaser_flag) d->current_event->type = ME_PHASER; effect_ctrl_change( d->current_event, d ) ; } else #endif d->channel[d->current_event->channel].chorusdepth=d->current_event->a; break; #ifdef CHANNEL_EFFECT case ME_CELESTE: if (opt_effect) effect_ctrl_change( d->current_event, d ) ; break; case ME_PHASER: if (opt_effect) effect_ctrl_change( d->current_event, d ) ; break; #endif case ME_PAN: d->channel[d->current_event->channel].panning=d->current_event->a; if (d->adjust_panning_immediately) adjust_panning(d->current_event->channel, d); ctl->panning(d->current_event->channel, d->current_event->a); break; case ME_EXPRESSION: d->channel[d->current_event->channel].expression=d->current_event->a; adjust_volume(d->current_event->channel, d); ctl->expression(d->current_event->channel, d->current_event->a); break; case ME_PROGRAM: if (d->channel[d->current_event->channel].kit) { /* Change drum set */ /* if (d->channel[d->current_event->channel].kit==126) d->channel[d->current_event->channel].bank=57; else */ d->channel[d->current_event->channel].bank=d->current_event->a; /* ctl->program(d->current_event->channel, d->current_event->a, d->channel[d->current_event->channel].name); */ ctl->program(d->current_event->channel, d->current_event->a, drumset[d->channel[d->current_event->channel].bank]->name); } else { d->channel[d->current_event->channel].program=d->current_event->a; ctl->program(d->current_event->channel, d->current_event->a, tonebank[d->channel[d->current_event->channel].bank]-> tone[d->current_event->a].name); } break; case ME_SUSTAIN: d->channel[d->current_event->channel].sustain=d->current_event->a; if (!d->current_event->a) drop_sustain(d->current_event->channel, d); ctl->sustain(d->current_event->channel, d->current_event->a); break; case ME_RESET_CONTROLLERS: reset_controllers(d->current_event->channel, d); redraw_controllers(d->current_event->channel, d); break; case ME_ALL_NOTES_OFF: all_notes_off(d->current_event->channel, d); break; case ME_ALL_SOUNDS_OFF: all_sounds_off(d->current_event->channel, d); break; case ME_HARMONICCONTENT: d->channel[d->current_event->channel].harmoniccontent=d->current_event->a; break; case ME_RELEASETIME: d->channel[d->current_event->channel].releasetime=d->current_event->a; /* if (d->current_event->a != 64) printf("release time %d on channel %d\n", d->channel[d->current_event->channel].releasetime, d->current_event->channel); */ break; case ME_ATTACKTIME: d->channel[d->current_event->channel].attacktime=d->current_event->a; /* if (d->current_event->a != 64) printf("attack time %d on channel %d\n", d->channel[d->current_event->channel].attacktime, d->current_event->channel); */ break; #ifdef tplus case ME_VIBRATO_RATE: d->channel[d->current_event->channel].vibrato_ratio=midi_cnv_vib_rate(d->current_event->a); update_channel_freq(d->current_event->channel, d); break; case ME_VIBRATO_DEPTH: d->channel[d->current_event->channel].vibrato_depth=midi_cnv_vib_depth(d->current_event->a); update_channel_freq(d->current_event->channel, d); /*ctl->cmsg(CMSG_INFO, VERB_NORMAL, "~v%u", midi_cnv_vib_depth(d->current_event->a));*/ break; case ME_VIBRATO_DELAY: d->channel[d->current_event->channel].vibrato_delay=midi_cnv_vib_delay(d->current_event->a); update_channel_freq(d->current_event->channel, d); break; #endif case ME_BRIGHTNESS: d->channel[d->current_event->channel].brightness=d->current_event->a; break; case ME_TONE_BANK: d->channel[d->current_event->channel].bank=d->current_event->a; break; case ME_TONE_KIT: if (d->current_event->a==SFX_BANKTYPE) { d->channel[d->current_event->channel].sfx=SFXBANK; d->channel[d->current_event->channel].kit=0; } else { d->channel[d->current_event->channel].sfx=0; d->channel[d->current_event->channel].kit=d->current_event->a; } break; case ME_EOT: /* fprintf(stderr,"midi end of tune\n"); */ d->flushing_output_device = TRUE; /* Give the last notes a couple of seconds to decay */ compute_data(play_mode->rate * 2, d); /* fprintf(stderr,"filled 2 sec\n"); */ if (!d->super_buffer_count) compute_data(0, d); /* flush buffer to device */ /* fprintf(stderr,"flushed\n"); */ ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Playing time: ~%d seconds", d->current_sample/play_mode->rate+2); ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Notes played: %d", played_notes); ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Samples clipped: %d", output_clips); ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Notes cut: %d", cut_notes); ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Notes lost totally: %d", d->lost_notes); ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Current memory used: %d", current_patch_memory); /* fprintf(stderr,"end of tune\n"); */ if (d->super_buffer_count) return 0; return RC_TUNE_END; } d->current_event++; /*event_count--;*/ } rc=compute_data(d->current_event->time - d->current_sample, d); /* fprintf(stderr,"d->current_sample=%d d->current_event=%x, %ld left, d->bbcount=%d of %d\n", d->current_sample, d->current_event, event_count, d->bbcount, BB_SIZE); */ /*fprintf(stderr,"Z\n");*/ ctl->refresh(); if ( (rc!=RC_NONE) && (rc!=RC_JUMP)) { fprintf(stderr,"play_some returning %d\n", rc); return rc; } if (d->bbcount - basecount > output_fragsize && !d->flushing_output_device && d->current_sample < d->sample_count) return 0; } } int play_midi_file(struct md *d) { int rc; int32 val; ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "MIDI file: %s", d->midi_path_name); /* if (!(d->fp=open_file(d->midi_path_name, 1, OF_VERBOSE, 0))) return RC_ERROR; */ if (!(d->fp=fopen(d->midi_path_name, "r"))) return RC_ERROR; ctl->file_name(d->midi_name); d->is_open = TRUE; read_midi_file(d); close_file(d->fp); if (!d->event) return RC_ERROR; ctl->cmsg(CMSG_INFO, VERB_NOISY, "%d supported events, %d samples", d->event_count, d->sample_count); ctl->total_time(d->sample_count); ctl->master_volume(d->amplification); load_missing_instruments(); if (check_for_rc()) return ctl->read(&val); #ifdef tplus d->dont_cspline = 0; #endif if (command_cutoff_allowed) dont_filter_melodic = 0; else dont_filter_melodic = 1; #ifdef INFO_ONLY got_a_lyric = 0; #endif #ifdef POLYPHONY_COUNT d->future_polyphony = 0; #endif d->current_polyphony = 0; rc=play_midi(d); /* if (free_instruments_afterwards) free_instruments(); free(event); */ if (!rc) d->is_playing = TRUE; return rc; } void play_midi_finish(struct md *d) { #ifdef CHANNEL_EFFECT int i; #endif compute_data(0, d); #ifdef CHANNEL_EFFECT if (opt_effect) for (i=0; ievent) free(d->event); d->event = 0; d->sample_count = 0; } alsaplayer-0.99.82/attic/midi/playmidi.h000066400000000000000000000165001466261456500200700ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . playmidi.h */ /*#define POLYPHONY_COUNT*/ #ifdef POLYPHONY_COUNT typedef struct { uint32 time; uint8 channel, type, a, b, polyphony; } MidiEvent; #else typedef struct { uint32 time; uint8 channel, type, a, b; } MidiEvent; #endif /* Midi events */ #define ME_NONE 0 #define ME_NOTEON 1 #define ME_NOTEOFF 2 #define ME_KEYPRESSURE 3 #define ME_MAINVOLUME 4 #define ME_PAN 5 #define ME_SUSTAIN 6 #define ME_EXPRESSION 7 #define ME_PITCHWHEEL 8 #define ME_PROGRAM 9 #define ME_TEMPO 10 #define ME_PITCH_SENS 11 #define ME_ALL_SOUNDS_OFF 12 #define ME_RESET_CONTROLLERS 13 #define ME_ALL_NOTES_OFF 14 #define ME_TONE_BANK 15 #define ME_LYRIC 16 #define ME_TONE_KIT 17 #define ME_MASTERVOLUME 18 #define ME_CHANNEL_PRESSURE 19 #define ME_HARMONICCONTENT 71 #define ME_RELEASETIME 72 #define ME_ATTACKTIME 73 #define ME_BRIGHTNESS 74 #define ME_REVERBERATION 91 #define ME_CHORUSDEPTH 93 #ifdef CHANNEL_EFFECT #define ME_CELESTE 94 #define ME_PHASER 95 #endif #define ME_EOT 99 #ifdef tplus #define ME_PORTAMENTO_TIME_MSB 100 #define ME_PORTAMENTO_TIME_LSB 101 #define ME_PORTAMENTO 102 #define ME_MODULATION_WHEEL 103 #define ME_VIBRATO_RATE 104 #define ME_VIBRATO_DEPTH 105 #define ME_VIBRATO_DELAY 106 #define ME_FINE_TUNING 107 #define ME_COARSE_TUNING 108 #endif #define SFX_BANKTYPE 64 typedef struct { int bank, kit, sfx, program, volume, sustain, panning, pitchbend, expression, variationbank, mono, /* one note only on this channel -- not implemented yet */ #ifdef tplus portamento, #endif reverberation, chorusdepth, harmoniccontent, releasetime, attacktime, brightness, pitchsens; #ifdef tplus uint32 modulation_wheel; #endif /* chorus, reverb... Coming soon to a 300-MHz, eight-way superscalar processor near you */ FLOAT_T pitchfactor; /* precomputed pitch bend factor to save some fdiv's */ #ifdef tplus /* For portamento */ uint8 portamento_time_msb, portamento_time_lsb; uint8 tuning_msb, tuning_lsb; int porta_control_ratio, porta_dpb; int32 last_note_fine; /* For vibrato */ int32 vibrato_ratio, vibrato_delay; int vibrato_depth; #endif char transpose; const char *name; } Channel; /* Causes the instrument's default panning to be used. */ #define NO_PANNING -1 #define MAXPOINT 7 typedef struct { uint8 status, channel, note, velocity, clone_type; Sample *sample; Sample *left_sample; Sample *right_sample; int32 clone_voice; uint32 orig_frequency, frequency, sample_offset, loop_start, loop_end; int32 envelope_volume, modulation_volume; uint32 envelope_target, modulation_target; uint32 tremolo_sweep, tremolo_sweep_position, tremolo_phase, lfo_sweep, lfo_sweep_position, lfo_phase, vibrato_sweep, vibrato_sweep_position, vibrato_depth, starttime, echo_delay_count; int32 echo_delay, sample_increment, envelope_increment, modulation_increment, tremolo_phase_increment, lfo_phase_increment; final_volume_t left_mix, right_mix; FLOAT_T volume, left_amp, right_amp, tremolo_volume, lfo_volume, modEnvToFilterFc, modLfoToFilterFc, current_x0, current_x1, current_y0, current_y1; int32 vibrato_sample_increment[VIBRATO_SAMPLE_INCREMENTS]; uint32 envelope_rate[MAXPOINT], envelope_offset[MAXPOINT]; uint32 vibrato_phase, vibrato_control_ratio, vibrato_control_counter, #ifdef tplus vibrato_delay, orig_vibrato_control_ratio, modulation_wheel, #endif envelope_stage, modulation_stage, control_counter, modulation_delay, modulation_counter, bw_index, panning, panned; #ifdef tplus /* for portamento */ int porta_control_ratio, porta_control_counter, porta_dpb; int32 porta_pb; #endif } Voice; /* Voice status options: */ #define VOICE_FREE (1<<0) #define VOICE_ON (1<<1) #define VOICE_SUSTAINED (1<<2) #define VOICE_OFF (1<<3) #define VOICE_DIE (1<<4) /* Voice panned options: */ #define PANNED_MYSTERY 0 #define PANNED_LEFT 1 #define PANNED_RIGHT 2 #define PANNED_CENTER 3 /* Anything but PANNED_MYSTERY only uses the left volume */ /* Envelope stages: */ #define ATTACK 0 #define HOLD 1 #define DECAY 2 #define RELEASE 3 #define RELEASEB 4 #define RELEASEC 5 #define DELAY 6 /* Voice effects options: */ #define OPT_STEREO_VOICE 1 #define OPT_REVERB_VOICE 2 #define OPT_CHORUS_VOICE 4 #define OPT_STEREO_EXTRA 16 #define OPT_REVERB_EXTRA 32 #define OPT_CHORUS_EXTRA 64 #define MAXCHAN 64 #define MAXNOTE 128 typedef struct { MidiEvent event; void *next; } MidiEventList; /*extern Channel channel[MAXCHAN];*/ /*extern signed char drumvolume[MAXCHAN][MAXNOTE];*/ /*extern signed char drumpanpot[MAXCHAN][MAXNOTE];*/ /*extern signed char drumreverberation[MAXCHAN][MAXNOTE];*/ /*extern signed char drumchorusdepth[MAXCHAN][MAXNOTE];*/ /*extern Voice voice[MAX_VOICES];*/ extern int32 control_ratio; /*extern int32 amplification;*/ /*extern int32 drumchannels;*/ /*extern int adjust_panning_immediately;*/ extern int config_voices; extern int config_amplification; #ifdef tplus extern int note_key_offset; extern FLOAT_T midi_time_ratio; extern int opt_modulation_wheel; extern int opt_portamento; extern int opt_nrpn_vibrato; extern int opt_reverb_control; extern int opt_chorus_control; extern int opt_channel_pressure; extern int opt_overlap_voice_allow; /*extern void recompute_freq(int v, struct md *d);*/ extern int dont_cspline; #endif extern int opt_dry; extern int opt_expression_curve; extern int opt_volume_curve; extern int opt_stereo_surround; extern int dont_filter_melodic; extern int dont_filter_drums; extern int command_cutoff_allowed; /*extern int dont_chorus;*/ /*extern int dont_reverb;*/ /*extern int current_interpolation;*/ extern int config_interpolation; /*extern int dont_keep_looping;*/ /*extern int GM_System_On;*/ /*extern int XG_System_On;*/ /*extern int GS_System_On;*/ /*extern int XG_System_reverb_type;*/ /*extern int XG_System_chorus_type;*/ /*extern int XG_System_variation_type;*/ #define ISDRUMCHANNEL(c) ((d->drumchannels & (1<<(c%16)))) #if 0 extern int play_midi_file(struct md *d); extern int play_some_midi_file(struct md *d); extern int skip_to(uint32 until_time, struct md *d); #endif extern int read_config_file(const char *name, int prescanning); extern char *current_config_file; extern int current_config_pc42b; extern int reverb_options; extern int global_reverb; extern int global_chorus; extern int global_echo; extern int global_detune; extern int cfg_select; extern void clear_config(void); extern void effect_activate( int iSwitch ); extern int have_commandline_midis; alsaplayer-0.99.82/attic/midi/readmidi.c000066400000000000000000001173721466261456500200420ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include #include #include #ifndef NO_STRING_H # include #else #include #endif #ifndef __WIN32__ #include #endif #include #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "readmidi.h" #include "output.h" #include "controls.h" #include "tables.h" static int32 quietchannels=0; #if MAXCHAN <= 16 #define MERGE_CHANNEL_PORT(ch) ((int)(ch)) #else #define MERGE_CHANNEL_PORT(ch) ((int)(ch) | (d->midi_port_number << 4)) #endif /* These would both fit into 32 bits, but they are often added in large multiples, so it's simpler to have two roomy ints */ /*static int32 sample_increment, sample_correction;*/ /*samples per MIDI delta-t*/ #ifdef SFXDRUMOLD /* I seem not to be using these tables ... */ static unsigned char sfxdrum1[100] = { 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,48,49,47,50, 0,46,0,0,0,0,0,0,0,0, 0,0,44,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,79,80, 81,82,83,84,0,0,0,0,0,0, 0,0,0,0,76,77,78,0,0,0, 0,0,0,0,0,0,0,0,0,0 }; static unsigned char sfxdrum2[100] = { 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,59,60,41, 42,46,0,0,0,0,0,0,0,0, 0,0,63,64,65,66,67,68,69,69, 72,70,0,0,0,0,0,0,52,53, 54,56,57,58,0,0,0,0,0,0, 0,0,0,0,73,74,75,71,0,0, 0,0,0,0,0,0,0,0,0,0 }; #endif /* Computes how many (fractional) samples one MIDI delta-time unit contains */ static void compute_sample_increment(int32 tempo, int32 divisions, struct md *d) { double a; a = (double) (tempo) * (double) (play_mode->rate) * (65536.0/1000000.0) / (double)(divisions); d->sample_correction = (int32)(a) & 0xFFFF; d->sample_increment = (int32)(a) >> 16; ctl->cmsg(CMSG_INFO, VERB_DEBUG, "Samples per delta-t: %d (correction %d)", d->sample_increment, d->sample_correction); } #ifdef tplus static int tf_getc(struct md *d) { uint8 b; if (fread(&b,1,1,d->fp) != 1) return EOF; return (uint8)b; } /* Read variable-length number (7 bits per byte, MSB first) */ static int32 getvl(struct md *d) { int32 l; int c; errno = 0; l = 0; /* 1 */ if((c = tf_getc(d)) == EOF) goto eof; if(!(c & 0x80)) return l | c; l = (l | (c & 0x7f)) << 7; /* 2 */ if((c = tf_getc(d)) == EOF) goto eof; if(!(c & 0x80)) return l | c; l = (l | (c & 0x7f)) << 7; /* 3 */ if((c = tf_getc(d)) == EOF) goto eof; if(!(c & 0x80)) return l | c; l = (l | (c & 0x7f)) << 7; /* 4 */ if((c = tf_getc(d)) == EOF) goto eof; if(!(c & 0x80)) return l | c; /* Error */ ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Illegal Variable-length quantity format.", d->midi_name); return -2; eof: if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return -1; } #else /* Read variable-length number (7 bits per byte, MSB first) */ static uint32 getvl(struct md *d) { uint32 l=0; uint8 c; for (;;) { fread(&c,1,1,d->fp); l += (c & 0x7f); if (!(c & 0x80)) return l; l<<=7; } } #endif /**********************************/ #ifdef INFO_ONLY struct meta_text_type *meta_text_list = NULL; static void free_metatext() { struct meta_text_type *meta; while (meta_text_list) { meta = meta_text_list; meta_text_list = meta->next; free(meta->text); meta->text = NULL; free(meta); meta = NULL; } } static int metatext(int type, uint32 leng, char *mess, struct md *d) { static int continued_flag = 0; int c; uint32 n; unsigned char *p = (unsigned char *)mess; struct meta_text_type *meta, *mlast; char *meta_string; /* if (d->at > 0 && (type == 1||type == 5||type == 6||type == 7)) { */ if (type==5 || ( d->at > 0 && (type==1||type==6||type==7) )) { meta = (struct meta_text_type *)safe_malloc(sizeof(struct meta_text_type)); if (leng > 72) leng = 72; meta_string = (char *)safe_malloc(leng+8); if (!leng) { continued_flag = 1; meta_string[leng++] = '\012'; } else for (n = 0; n < leng; n++) { c = *p++; if (!n && (c == '/' || c == '\\')) { continued_flag = 1; meta_string[0] = '\012'; if (c == '/') { meta_string[1] = ' '; meta_string[2] = ' '; meta_string[3] = ' '; meta_string[4] = ' '; leng += 4; n += 4; } } else { /*meta_string[n] = (isprint(c) || isspace(c)) ? c : '.';*/ meta_string[n] = ((c > 0x7f) || isprint(c) || isspace(c)) ? c : '.'; if (c == '\012' || c == '\015') continued_flag = 1; if (c == '\015') meta_string[n] = '\012'; } } if (!continued_flag) { meta_string[leng++] = '\012'; } meta_string[leng] = '\0'; meta->type = type; meta->text = meta_string; meta->time = d->at; meta->next = NULL; /* while d->at==0 1. head = meta1; head->next = NULL 2. for ...: mlast = head if ...: not < else ...: meta2->next = NULL head->next = meta2 so: (meta1, meta2) 3. for ...: mlast = meta2 if ...: else: meta3->next = NULL meta2->next = meta3 so: (meta1, meta2, meta3) */ if (meta_text_list == NULL) { meta->next = meta_text_list; meta_text_list = meta; } else { for (mlast = meta_text_list; mlast->next != NULL; mlast = mlast->next) if (mlast->next->time > meta->time) break; if (mlast == meta_text_list && meta->time < mlast->time) { meta->next = meta_text_list; meta_text_list = meta; } else { meta->next = mlast->next; mlast->next = meta; } } return 1; } else return 0; } #endif static int sysex(uint32 len, uint8 *syschan, uint8 *sysa, uint8 *sysb, struct md *d) { unsigned char *s=(unsigned char *)safe_malloc(len); int id, model, ch, port, adhi, adlo, cd, dta, dtb, dtc; if (len != fread(s, 1, len, d->fp)) { free(s); return 0; } if (len<5) { free(s); return 0; } if (d->curr_track == d->curr_title_track && d->track_info > 1) d->title[0] = '\0'; id=s[0]; port=s[1]; model=s[2]; adhi=s[3]; adlo=s[4]; if (id==0x7e && port==0x7f && model==0x09 && adhi==0x01) { ctl->cmsg(CMSG_TEXT, VERB_VERBOSE, "GM System On", len); d->GM_System_On=1; free(s); return 0; } ch = adlo & 0x0f; *syschan=(uint8)ch; if (id==0x7f && len==7 && port==0x7f && model==0x04 && adhi==0x01) { ctl->cmsg(CMSG_TEXT, VERB_DEBUG, "Master Volume %d", s[4]+(s[5]<<7)); free(s); *sysa = s[4]; *sysb = s[5]; return ME_MASTERVOLUME; /** return s[4]+(s[5]<<7); **/ } if (len<8) { free(s); return 0; } port &=0x0f; ch = (adlo & 0x0f) | ((port & 0x03) << 4); *syschan=(uint8)ch; cd=s[5]; dta=s[6]; if (len >= 8) dtb=s[7]; else dtb=-1; if (len >= 9) dtc=s[8]; else dtc=-1; free(s); if (id==0x43 && model==0x4c) { if (!adhi && !adlo && cd==0x7e && !dta) { ctl->cmsg(CMSG_TEXT, VERB_VERBOSE, "XG System On", len); d->XG_System_On=1; #ifdef tplus d->vol_table = xg_vol_table; #endif } else if (adhi == 2 && adlo == 1) { if (dtb==8) dtb=3; switch (cd) { case 0x00: d->XG_System_reverb_type=(dta<<3)+dtb; break; case 0x20: d->XG_System_chorus_type=((dta-64)<<3)+dtb; break; case 0x40: d->XG_System_variation_type=dta; break; case 0x5a: /* dta==0 Insertion; dta==1 System */ break; default: break; } } else if (adhi == 8 && cd <= 40) { *sysa = dta & 0x7f; switch (cd) { case 0x01: /* bank select MSB */ return ME_TONE_KIT; break; case 0x02: /* bank select LSB */ return ME_TONE_BANK; break; case 0x03: /* program number */ /** MIDIEVENT(d->at, ME_PROGRAM, lastchan, a, 0); **/ return ME_PROGRAM; break; case 0x08: /* */ /* d->channel[adlo&0x0f].transpose = (char)(dta-64); */ d->channel[ch].transpose = (char)(dta-64); ctl->cmsg(CMSG_TEXT, VERB_DEBUG, "transpose channel %d by %d", (adlo&0x0f)+1, dta-64); break; case 0x0b: /* volume */ return ME_MAINVOLUME; break; case 0x0e: /* pan */ return ME_PAN; break; case 0x12: /* chorus send */ return ME_CHORUSDEPTH; break; case 0x13: /* reverb send */ return ME_REVERBERATION; break; case 0x14: /* variation send */ break; case 0x18: /* filter cutoff */ return ME_BRIGHTNESS; break; case 0x19: /* filter resonance */ return ME_HARMONICCONTENT; break; default: break; } } return 0; } else if (id==0x41 && model==0x42 && adhi==0x12 && adlo==0x40) { if (dtc<0) return 0; if (!cd && dta==0x7f && !dtb && dtc==0x41) { ctl->cmsg(CMSG_TEXT, VERB_VERBOSE, "GS System On", len); d->GS_System_On=1; #ifdef tplus d->vol_table = gs_vol_table; #endif } else if (dta==0x15 && (cd&0xf0)==0x10) { int chan=cd&0x0f; if (!chan) chan=9; else if (chan<10) chan--; chan = MERGE_CHANNEL_PORT(chan); d->channel[chan].kit=dtb; } else if (cd==0x01) switch(dta) { case 0x30: switch(dtb) { case 0: d->XG_System_reverb_type=16+0; break; case 1: d->XG_System_reverb_type=16+1; break; case 2: d->XG_System_reverb_type=16+2; break; case 3: d->XG_System_reverb_type= 8+0; break; case 4: d->XG_System_reverb_type= 8+1; break; case 5: d->XG_System_reverb_type=32+0; break; case 6: d->XG_System_reverb_type=8*17; break; case 7: d->XG_System_reverb_type=8*18; break; } break; case 0x38: switch(dtb) { case 0: d->XG_System_chorus_type= 8+0; break; case 1: d->XG_System_chorus_type= 8+1; break; case 2: d->XG_System_chorus_type= 8+2; break; case 3: d->XG_System_chorus_type= 8+4; break; case 4: d->XG_System_chorus_type= -1; break; case 5: d->XG_System_chorus_type= 8*3; break; case 6: d->XG_System_chorus_type= -1; break; case 7: d->XG_System_chorus_type= -1; break; } break; } return 0; } return 0; } /**********************************/ /* Print a string from the file, followed by a newline. Any non-ASCII or unprintable characters will be converted to periods. */ static int dumpstring(uint32 len, const char *label, int type, struct md *d) { char *s=(char *)safe_malloc(len+1); if (len != fread(s, 1, len, d->fp)) { free(s); return -1; } s[len]='\0'; #ifdef INFO_ONLY if (!metatext(type, len, s, d)) #else if ( !(type==5 || ( d->at > 0 && (type==1||type==6||type==7) )) ) #endif { while (len--) { if (s[len]<32) s[len]='.'; } ctl->cmsg(CMSG_TEXT, VERB_VERBOSE, "%s%s", label, s); if (type != 3 && d->is_open && len > 10 && strstr(s, " by ") && !strstr(s, "opyright") && !strstr(s, "(C)")) { if (!d->artist[0]) strncpy(d->artist, s, 40); } if (type == 3 && len > 6 && d->curr_track == 0 && !d->title[0] && !strstr(s, "untitled")) { strncpy(d->title, s, 80); d->curr_title_track = d->curr_track; } } free(s); return 0; } #ifdef POLYPHONY_COUNT #define MIDIEVENT(at,t,ch,pa,pb) \ newev=(MidiEventList *)safe_malloc(sizeof(MidiEventList)); \ newev->event.time=at; newev->event.type=t; newev->event.channel=ch; \ newev->event.a=pa; newev->event.b=pb; newev->next=0; newev->event.polyphony = 0; \ return newev; #else #define MIDIEVENT(at,t,ch,pa,pb) \ newev=(MidiEventList *)safe_malloc(sizeof(MidiEventList)); \ newev->event.time=at; newev->event.type=t; newev->event.channel=ch; \ newev->event.a=pa; newev->event.b=pb; newev->next=0; \ return newev; #endif #define MAGIC_EOT ((MidiEventList *)(-1)) /* Read a MIDI event, returning a freshly allocated element that can be linked to the event list */ static MidiEventList *read_midi_event(struct md *d) { static uint8 laststatus, lastchan; static uint8 nrpn=0, rpn_msb[MAXCHAN], rpn_lsb[MAXCHAN]; /* one per channel */ uint8 me, type, a,b,c; int32 len, i; MidiEventList *newev; for (;;) { #ifdef tplus if ( (len=getvl(d)) < 0) return 0; d->at+= len; #else d->at+=getvl(d); #endif #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } me = (uint8)i; #else if (fread(&me,1,1,d->fp)!=1) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, sys_errlist[errno]); return 0; } #endif if(me==0xF0 || me == 0xF7) /* SysEx event */ { int32 sret; uint8 sysa=0, sysb=0, syschan=0; #ifdef tplus if ( (len=getvl(d)) < 0) return 0; #else len=getvl(d); #endif sret=sysex(len, &syschan, &sysa, &sysb, d); if (sret) { MIDIEVENT(d->at, sret, syschan, sysa, sysb); } } else if(me==0xFF) /* Meta event */ { #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } type = (uint8)i; #else fread(&type,1,1,d->fp); #endif #ifdef tplus if ( (len=getvl(d)) < 0) return 0; #else len=getvl(d); #endif if (type>0 && type<16) { static const char *label[]={ "text: ", "text: ", "Copyright: ", "track: ", "instrument: ", "lyric: ", "marker: ", "cue point: "}; dumpstring(len, label[(type>7) ? 0 : type], type, d); } else switch(type) { case 0x21: /* MIDI port number */ if(len == 1) { fread(&d->midi_port_number,1,1,d->fp); if(d->midi_port_number == EOF) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } d->midi_port_number &= 0x0f; if (d->midi_port_number) ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "(MIDI port number %d)", d->midi_port_number); d->midi_port_number &= 0x03; } else skip(d->fp, len); break; case 0x2F: /* End of Track */ return MAGIC_EOT; case 0x51: /* Tempo */ #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } a = (uint8)i; if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } b = (uint8)i; if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } c = (uint8)i; #else fread(&a,1,1,d->fp); fread(&b,1,1,d->fp); fread(&c,1,1,d->fp); #endif MIDIEVENT(d->at, ME_TEMPO, c, a, b); default: ctl->cmsg(CMSG_INFO, VERB_DEBUG, "(Meta event type 0x%02x, length %ld)", type, len); skip(d->fp, len); break; } } else { a=me; if (a & 0x80) /* status byte */ { lastchan = MERGE_CHANNEL_PORT(a & 0x0F); laststatus=(a>>4) & 0x07; #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } a = (uint8)i; #else fread(&a, 1,1, d->fp); #endif a &= 0x7F; } switch(laststatus) { case 0: /* Note off */ #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } b = (uint8)i; #else fread(&b, 1,1, d->fp); #endif b &= 0x7F; /*MIDIEVENT(d->at, ME_NOTEOFF, lastchan, a,b);*/ MIDIEVENT(d->at, ME_NOTEON, lastchan, a,0); case 1: /* Note on */ #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } b = (uint8)i; #else fread(&b, 1,1, d->fp); #endif b &= 0x7F; MIDIEVENT(d->at, ME_NOTEON, lastchan, a,b); if (d->curr_track == d->curr_title_track && d->track_info > 1) d->title[0] = '\0'; case 2: /* Key Pressure */ #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } b = (uint8)i; #else fread(&b, 1,1, d->fp); #endif b &= 0x7F; MIDIEVENT(d->at, ME_KEYPRESSURE, lastchan, a, b); case 3: /* Control change */ #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } b = (uint8)i; #else fread(&b, 1,1, d->fp); #endif b &= 0x7F; { int control=255; switch(a) { #ifdef tplus case 1: control=ME_MODULATION_WHEEL; break; case 5: control=ME_PORTAMENTO_TIME_MSB; break; case 37: control=ME_PORTAMENTO_TIME_LSB; break; case 65: control=ME_PORTAMENTO; break; #endif case 7: control=ME_MAINVOLUME; break; case 10: control=ME_PAN; break; case 11: control=ME_EXPRESSION; break; #ifdef tplus case 64: control=ME_SUSTAIN; b = (b >= 64); break; #else case 64: control=ME_SUSTAIN; break; #endif case 71: control=ME_HARMONICCONTENT; break; case 72: control=ME_RELEASETIME; break; case 73: control=ME_ATTACKTIME; break; case 74: control=ME_BRIGHTNESS; break; case 91: control=ME_REVERBERATION; break; case 93: control=ME_CHORUSDEPTH; break; #ifdef CHANNEL_EFFECT case 94: control=ME_CELESTE; break; ctl->cmsg(CMSG_INFO, VERB_NORMAL, "CELESTE"); case 95: control=ME_PHASER; break; ctl->cmsg(CMSG_INFO, VERB_NORMAL, "PHASER"); #endif case 120: control=ME_ALL_SOUNDS_OFF; break; case 121: control=ME_RESET_CONTROLLERS; break; case 123: control=ME_ALL_NOTES_OFF; break; /* These should be the SCC-1 tone bank switch commands. I don't know why there are two, or why the latter only allows switching to bank 0. Also, some MIDI files use 0 as some sort of continuous controller. This will cause lots of warnings about undefined tone banks. */ case 0: if (d->XG_System_On) control=ME_TONE_KIT; else control=ME_TONE_BANK; break; case 32: if (d->XG_System_On) control=ME_TONE_BANK; break; case 100: nrpn=0; rpn_msb[lastchan]=b; break; case 101: nrpn=0; rpn_lsb[lastchan]=b; break; case 98: nrpn=1; rpn_lsb[lastchan]=b; break; case 99: nrpn=1; rpn_msb[lastchan]=b; break; case 6: if (nrpn) { if (rpn_msb[lastchan]==1) switch (rpn_lsb[lastchan]) { #ifdef tplus case 0x08: control=ME_VIBRATO_RATE; break; case 0x09: control=ME_VIBRATO_DEPTH; break; case 0x0a: control=ME_VIBRATO_DELAY; break; #endif case 0x20: control=ME_BRIGHTNESS; break; case 0x21: control=ME_HARMONICCONTENT; break; /* case 0x63: envelope attack rate case 0x64: envelope decay rate case 0x66: envelope release rate */ } else switch (rpn_msb[lastchan]) { /* case 0x14: filter cutoff frequency case 0x15: filter resonance case 0x16: envelope attack rate case 0x17: envelope decay rate case 0x18: pitch coarse case 0x19: pitch fine */ case 0x1a: d->drumvolume[lastchan][0x7f & rpn_lsb[lastchan]] = b; break; case 0x1c: if (!b) b=(int) (127.0*rand()/(RAND_MAX)); d->drumpanpot[lastchan][0x7f & rpn_lsb[lastchan]] = b; break; case 0x1d: d->drumreverberation[lastchan][0x7f & rpn_lsb[lastchan]] = b; break; case 0x1e: d->drumchorusdepth[lastchan][0x7f & rpn_lsb[lastchan]] = b; break; /* case 0x1f: variation send level */ } ctl->cmsg(CMSG_INFO, VERB_DEBUG, "(Data entry (MSB) for NRPN %02x,%02x: %ld)", rpn_msb[lastchan], rpn_lsb[lastchan], b); break; } switch((rpn_msb[lastchan]<<8) | rpn_lsb[lastchan]) { case 0x0000: /* Pitch bend sensitivity */ control=ME_PITCH_SENS; break; #ifdef tplus case 0x0001: control=ME_FINE_TUNING; break; case 0x0002: control=ME_COARSE_TUNING; break; #endif case 0x7F7F: /* RPN reset */ /* reset pitch bend sensitivity to 2 */ MIDIEVENT(d->at, ME_PITCH_SENS, lastchan, 2, 0); default: ctl->cmsg(CMSG_INFO, VERB_DEBUG, "(Data entry (MSB) for RPN %02x,%02x: %ld)", rpn_msb[lastchan], rpn_lsb[lastchan], b); break; } break; default: ctl->cmsg(CMSG_INFO, VERB_DEBUG, "(Control %d: %d)", a, b); break; } if (control != 255) { MIDIEVENT(d->at, control, lastchan, b, 0); } } break; case 4: /* Program change */ a &= 0x7f; MIDIEVENT(d->at, ME_PROGRAM, lastchan, a, 0); #ifdef tplus case 5: /* Channel pressure */ MIDIEVENT(d->at, ME_CHANNEL_PRESSURE, lastchan, a, 0); #else case 5: /* Channel pressure - NOT IMPLEMENTED */ break; #endif case 6: /* Pitch wheel */ #ifdef tplus if((i = tf_getc(d)) == EOF) { if(errno) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": read_midi_event: %s", d->midi_name, strerror(errno)); else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Warning: \"%s\": Short midi file.", d->midi_name); return 0; } b = (uint8)i; #else fread(&b, 1,1, d->fp); #endif b &= 0x7F; MIDIEVENT(d->at, ME_PITCHWHEEL, lastchan, a, b); case 7: break; default: ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "*** Can't happen: status 0x%02X, channel 0x%02X", laststatus, lastchan); break; } } } return newev; } #undef MIDIEVENT /* Read a midi track into the linked list, either merging with any previous tracks or appending to them. */ static int read_track(int append, struct md *d) { MidiEventList *meep; MidiEventList *next, *newev; int32 len; char tmp[4]; d->midi_port_number = 0; meep=d->evlist; if (append && meep) { /* find the last event in the list */ for (; meep->next; meep=(MidiEventList *)meep->next) ; d->at=meep->event.time; } else d->at=0; /* Check the formalities */ if ((fread(tmp,1,4,d->fp) != 4) || (fread(&len,4,1,d->fp) != 1)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Can't read track header.", d->midi_name); return -1; } len=BE_LONG(len); if (memcmp(tmp, "MTrk", 4)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Corrupt MIDI file.", d->midi_name); return -2; } for (;;) { if (!(newev=read_midi_event(d))) /* Some kind of error */ return -2; if (newev==MAGIC_EOT) /* End-of-track Hack. */ { return 0; } next=(MidiEventList *)meep->next; while (next && (next->event.time < newev->event.time)) { meep=next; next=(MidiEventList *)meep->next; } newev->next=next; meep->next=newev; d->event_count++; /* Count the event. (About one?) */ meep=newev; } } /* Free the linked event list from memory. */ static void free_midi_list(struct md *d) { MidiEventList *meep, *next; if (!(meep=d->evlist)) return; while (meep) { next=(MidiEventList *)meep->next; free(meep); meep=next; } d->evlist=0; } static void xremap_percussion(int *banknumpt, int *this_notept, int this_kit) { int i, newmap; int banknum = *banknumpt; int this_note = *this_notept; int newbank, newnote; if (this_kit != 127 && this_kit != 126) return; for (i = 0; i < XMAPMAX; i++) { newmap = xmap[i][0]; if (!newmap) return; if (this_kit == 127 && newmap != XGDRUM) continue; if (this_kit == 126 && newmap != SFXDRUM1) continue; if (xmap[i][1] != banknum) continue; if (xmap[i][3] != this_note) continue; newbank = xmap[i][2]; newnote = xmap[i][4]; if (newbank == banknum && newnote == this_note) return; if (!drumset[newbank]) return; *banknumpt = newbank; *this_notept = newnote; return; } } /* Allocate an array of MidiEvents and fill it from the linked list of events, marking used instruments for loading. Convert event times to samples: handle tempo changes. Strip unnecessary events from the list. Free the linked list. */ static void groom_list(int32 divisions, struct md *d) { MidiEvent *groomed_list, *lp; MidiEventList *meep; int32 i, our_event_count, tempo, skip_this_event, new_value=0; #ifdef POLYPHONY_COUNT uint32 current_polyphony, future_interval; MidiEvent *hind_list; #endif int32 sample_cum, samples_to_do, st, dt, counting_time; uint32 our_at; #ifdef INFO_ONLY struct meta_text_type *meta = meta_text_list; #endif int current_bank[MAXCHAN], current_banktype[MAXCHAN], current_set[MAXCHAN], current_kit[MAXCHAN], current_program[MAXCHAN]; int dset, dnote, drumsflag, mprog; /* Or should each bank have its own current program? */ for (i=0; ichannel[i].kit; current_program[i]=default_program; } tempo=500000; compute_sample_increment(tempo, divisions, d); /* This may allocate a bit more than we need */ groomed_list=lp=(MidiEvent *)safe_malloc(sizeof(MidiEvent) * (d->event_count+1)); meep=d->evlist; our_event_count=0; st=our_at=sample_cum=0; counting_time=2; /* We strip any silence before the first NOTE ON. */ #ifdef POLYPHONY_COUNT current_polyphony = 0; hind_list = lp; /*future_interval = play_mode->rate / 2;*/ future_interval = play_mode->rate / 4; #endif for (i=0; ievent_count; i++) { skip_this_event=0; ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY, "%6d: ch %2d: event %d (%d,%d)", meep->event.time, meep->event.channel + 1, meep->event.type, meep->event.a, meep->event.b); #ifdef INFO_ONLY while (meta && meta->time <= our_at) { meta->time = st; meta = meta->next; } #endif if (meep->event.type==ME_TEMPO) { #ifndef tplus tempo= meep->event.channel + meep->event.b * 256 + meep->event.a * 65536; compute_sample_increment(tempo, divisions, d); #endif skip_this_event=1; } else if ((quietchannels & (1<event.channel))) skip_this_event=1; else switch (meep->event.type) { case ME_PROGRAM: if (!d->is_open) { skip_this_event=1; break; } if (current_kit[meep->event.channel]) { dset = meep->event.a; if (current_kit[meep->event.channel]==126) { /* note request for 2nd sfx rhythm kit */ if (dset && drumset[SFXDRUM2]) { current_kit[meep->event.channel]=125; current_set[meep->event.channel]=SFXDRUM2; dset=new_value=SFXDRUM2; } else if (!dset && drumset[SFXDRUM1]) { current_set[meep->event.channel]=SFXDRUM1; dset=new_value=SFXDRUM1; } else { ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "XG SFX drum set is undefined"); skip_this_event=1; break; } } if (drumset[dset]) /* Is this a defined drumset? */ new_value=dset; else { ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "Drum set %d is undefined", dset); if (drumset[0]) new_value=meep->event.a=0; else { skip_this_event=1; break; } } if (current_set[meep->event.channel] != new_value) current_set[meep->event.channel]=new_value; else skip_this_event=1; } else /* not percussion channel */ { new_value=meep->event.a; #if 0 if ((current_program[meep->event.channel] != SPECIAL_PROGRAM) && (current_program[meep->event.channel] != new_value)) #endif if (current_program[meep->event.channel] != new_value) current_program[meep->event.channel] = new_value; else skip_this_event=1; } break; case ME_NOTEON: #ifdef POLYPHONY_COUNT if (meep->event.b) current_polyphony++; else current_polyphony--; #endif if (counting_time) counting_time=1; #if 0 /* trying to play canyon.mid, but this doesn't work */ if (meep->event.channel == 15 && current_program[15] == SPECIAL_PROGRAM) d->channel[15].kit = current_kit[15] = 127; #endif if (!d->is_open) break; drumsflag = current_kit[meep->event.channel]; if (drumsflag) /* percussion channel? */ { dset = current_set[meep->event.channel]; dnote=meep->event.a; #ifdef SFXDRUMOLD if (dnote>99) dnote=0; if (current_kit[meep->event.channel]==125) dnote=meep->event.a=sfxdrum2[dnote]; else if (current_kit[meep->event.channel]==126) dnote=meep->event.a=sfxdrum1[dnote]; #endif if (d->XG_System_On) xremap_percussion(&dset, &dnote, current_kit[meep->event.channel]); if (current_config_pc42b) pcmap(&dset, &dnote, &mprog, &drumsflag); if (drumsflag) { /* Mark this instrument to be loaded */ if (!(drumset[dset]->tone[dnote].layer)) { drumset[dset]->tone[dnote].layer= MAGIC_LOAD_INSTRUMENT; } else drumset[dset]->tone[dnote].last_used = current_tune_number; if (!d->channel[meep->event.channel].name) d->channel[meep->event.channel].name= drumset[dset]->name; } } if (!drumsflag) /* not percussion */ { int chan=meep->event.channel; int banknum; if (current_banktype[chan]) banknum=SFXBANK; else banknum=current_bank[chan]; mprog = current_program[chan]; if (mprog==SPECIAL_PROGRAM) break; if (d->XG_System_On && banknum==SFXBANK && tonebank[120]) banknum = 120; if (current_config_pc42b) pcmap(&banknum, &dnote, &mprog, &drumsflag); if (drumsflag) { /* Mark this instrument to be loaded */ if (!(drumset[dset]->tone[dnote].layer)) { drumset[dset]->tone[dnote].layer= MAGIC_LOAD_INSTRUMENT; } else drumset[dset]->tone[dnote].last_used = current_tune_number; if (!d->channel[meep->event.channel].name) d->channel[meep->event.channel].name= drumset[dset]->name; } if (!drumsflag) { /* Mark this instrument to be loaded */ if (!(tonebank[banknum]->tone[mprog].layer)) { tonebank[banknum]->tone[mprog].layer= MAGIC_LOAD_INSTRUMENT; } else tonebank[banknum]->tone[mprog].last_used = current_tune_number; if (!d->channel[meep->event.channel].name) d->channel[meep->event.channel].name= tonebank[banknum]->tone[mprog].name; } } break; case ME_TONE_KIT: if (!meep->event.a || meep->event.a == 127) { new_value=meep->event.a; if (current_kit[meep->event.channel] != new_value) current_kit[meep->event.channel]=new_value; else skip_this_event=1; break; } else if (meep->event.a == 126) { if (d->is_open) { if (drumset[SFXDRUM1]) /* Is this a defined tone bank? */ new_value=126; else { ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "XG rhythm kit %d is undefined", meep->event.a); skip_this_event=1; break; } } current_set[meep->event.channel]=SFXDRUM1; current_kit[meep->event.channel]=new_value; break; } else if (meep->event.a != SFX_BANKTYPE) { ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "XG kit %d is impossible", meep->event.a); skip_this_event=1; break; } if (current_kit[meep->event.channel]) { skip_this_event=1; break; } if (d->is_open) { if (tonebank[SFXBANK]) /* Is this a defined tone bank? */ new_value=SFX_BANKTYPE; else { ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "XG Sfx bank is undefined"); skip_this_event=1; break; } } if (current_banktype[meep->event.channel]!=new_value) current_banktype[meep->event.channel]=new_value; else skip_this_event=1; break; case ME_TONE_BANK: if (current_kit[meep->event.channel] || !d->is_open) { skip_this_event=1; break; } if (d->XG_System_On && meep->event.a > 0 && meep->event.a < 48) { d->channel[meep->event.channel].variationbank=meep->event.a; ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "XG variation bank %d", meep->event.a); new_value=meep->event.a=0; } else if (tonebank[meep->event.a]) /* Is this a defined tone bank? */ new_value=meep->event.a; else { ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "Tone bank %d is undefined", meep->event.a); new_value=meep->event.a=0; } if (current_bank[meep->event.channel]!=new_value) current_bank[meep->event.channel]=new_value; else skip_this_event=1; break; case ME_HARMONICCONTENT: d->channel[meep->event.channel].harmoniccontent=meep->event.a; break; case ME_BRIGHTNESS: d->channel[meep->event.channel].brightness=meep->event.a; break; } /* Recompute time in samples*/ if ((dt=meep->event.time - our_at) && !counting_time) { samples_to_do=d->sample_increment * dt; sample_cum += d->sample_correction * dt; if (sample_cum & 0xFFFF0000) { samples_to_do += ((sample_cum >> 16) & 0xFFFF); sample_cum &= 0x0000FFFF; } st += samples_to_do; } else if (counting_time==1) counting_time=0; #ifdef tplus if (meep->event.type==ME_TEMPO) { tempo= meep->event.channel + meep->event.b * 256 + meep->event.a * 65536; compute_sample_increment(tempo, divisions, d); } #endif if (!skip_this_event) { /* Add the event to the list */ *lp=meep->event; lp->time=st; #ifdef POLYPHONY_COUNT lp->polyphony = current_polyphony; while (hind_list < lp && hind_list->time <= st - future_interval) { hind_list->polyphony = 128 + current_polyphony - hind_list->polyphony; hind_list++; } #endif lp++; our_event_count++; } our_at=meep->event.time; meep=(MidiEventList *)meep->next; } /* Add an End-of-Track event */ lp->time=st; lp->type=ME_EOT; our_event_count++; free_midi_list(d); /**eventsp=our_event_count;*/ d->event_count = our_event_count; d->sample_count = st; d->event = groomed_list; } void read_midi_file(struct md *d) { uint32 len; int32 divisions; int16 format, tracks, divisions_tmp; int i; char tmp[4]; d->event_count=0; d->at=0; d->evlist=0; #ifdef INFO_ONLY free_metatext(); #endif d->GM_System_On=d->GS_System_On=d->XG_System_On=0; d->vol_table = def_vol_table; d->XG_System_reverb_type=d->XG_System_chorus_type=d->XG_System_variation_type=0; memset(&d->drumvolume,-1,sizeof(d->drumvolume)); memset(&d->drumchorusdepth,-1,sizeof(d->drumchorusdepth)); memset(&d->drumreverberation,-1,sizeof(d->drumreverberation)); memset(&d->drumpanpot,NO_PANNING,sizeof(d->drumpanpot)); for (i=0; ichannel[i].transpose = 0; if (ISDRUMCHANNEL(i)) d->channel[i].kit = 127; else d->channel[i].kit = 0; d->channel[i].brightness = 64; d->channel[i].harmoniccontent = 64; d->channel[i].variationbank = 0; d->channel[i].chorusdepth = 0; d->channel[i].reverberation = 0; d->channel[i].name = 0; } if ((fread(tmp,1,4,d->fp) != 4) || (fread(&len,4,1,d->fp) != 1)) { if (ferror(d->fp)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": %s", d->midi_name, sys_errlist[errno]); } else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Not a MIDI file!", d->midi_name); return; } len=BE_LONG(len); if (memcmp(tmp, "MThd", 4) || len < 6) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Not a MIDI file!", d->midi_name); return; } if ( fread(&format, 2, 1, d->fp) != 1 ) { if (ferror(d->fp)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": %s", d->midi_name, sys_errlist[errno]); } else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Not a MIDI file!", d->midi_name); return; } if ( fread(&tracks, 2, 1, d->fp) != 1 ) { if (ferror(d->fp)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": %s", d->midi_name, sys_errlist[errno]); } else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Not a MIDI file!", d->midi_name); return; } if ( fread(&divisions_tmp, 2, 1, d->fp) != 1 ) { if (ferror(d->fp)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": %s", d->midi_name, sys_errlist[errno]); } else ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Not a MIDI file!", d->midi_name); return; } /* fread(&divisions_tmp, 2, 1, d->fp); */ format=BE_SHORT(format); tracks=BE_SHORT(tracks); d->track_info = tracks; d->curr_track = 0; d->curr_title_track = -1; divisions_tmp=BE_SHORT(divisions_tmp); if (divisions_tmp<0) { /* SMPTE time -- totally untested. Got a MIDI file that uses this? */ divisions= (int32)(-(divisions_tmp/256)) * (int32)(divisions_tmp & 0xFF); } else divisions=(int32)(divisions_tmp); if (len > 6) { ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "%s: MIDI file header size %ld bytes", d->midi_name, len); skip(d->fp, len-6); /* skip the excess */ } if (format<0 || format >2) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "\"%s\": Unknown MIDI file format %d", d->midi_name, format); return; } ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Format: %d Tracks: %d Divisions: %d", format, tracks, divisions); /* Put a do-nothing event first in the list for easier processing */ d->evlist=(MidiEventList *)safe_malloc(sizeof(MidiEventList)); d->evlist->event.time=0; d->evlist->event.type=ME_NONE; d->evlist->next=0; d->event_count++; switch(format) { case 0: if (read_track(0, d)) { free_midi_list(d); return; } break; case 1: for (i=0; icurr_track++; break; case 2: /* We simply play the tracks sequentially */ for (i=0; icurr_track++; break; } groom_list(divisions, d); } alsaplayer-0.99.82/attic/midi/readmidi.h000066400000000000000000000023541466261456500200400ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . readmidi.h */ /* typedef struct { MidiEvent event; void *next; } MidiEventList; */ /*extern int32 quietchannels;*/ extern void read_midi_file(struct md *d); #ifdef INFO_ONLY struct meta_text_type { unsigned long time; unsigned char type; char *text; struct meta_text_type *next; }; extern struct meta_text_type *meta_text_list; #endif alsaplayer-0.99.82/attic/midi/readsbk.c000066400000000000000000000261341466261456500176720ustar00rootroot00000000000000/*================================================================ * readsbk.c: * read soundfont file * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . *================================================================*/ #include #include #include #include "gtim.h" #include "sbk.h" /*---------------------------------------------------------------- * function prototypes *----------------------------------------------------------------*/ #define NEW(type,nums) (type*)malloc(sizeof(type) * (nums)) static int READCHUNK(tchunk *vp, FILE *fd) { if (fread(vp, 8, 1, fd) != 1) return -1; vp->size = LE_LONG(vp->size); return 1; } static int READDW(uint32 *vp, FILE *fd) { if (fread(vp, 4, 1, fd) != 1) return -1; *vp = LE_LONG(*vp); return 1; } static int READW(uint16 *vp, FILE *fd) { if (fread(vp, 2, 1, fd) != 1) return -1; *vp = LE_SHORT(*vp); return 1; } #define READSTR(var,fd) fread(var, 20, 1, fd) #if 0 static int READSTR(char *str, FILE *fd) { int n; if(fread(str, 20, 1, fd) != 1) return -1; str[20] = '\0'; n = strlen(str); while(n > 0 && str[n - 1] == ' ') n--; str[n] = '\0'; return n; } #endif #define READID(var,fd) fread(var, 1, 4, fd) #define READB(var,fd) fread(var, 1, 1, fd) #define SKIPB(fd) {uint8 dummy; fread(&dummy, 1, 1, fd);} #define SKIPW(fd) {uint16 dummy; fread(&dummy, 2, 1, fd);} #define SKIPDW(fd) {uint32 dummy; fread(&dummy, 4, 1, fd);} static int getchunk(const char *id); static void process_chunk(int id, int s, SFInfo *sf, FILE *fd); static void load_sample_names(int size, SFInfo *sf, FILE *fd); static void load_preset_header(int size, SFInfo *sf, FILE *fd); static void load_inst_header(int size, SFInfo *sf, FILE *fd); static void load_bag(int size, SFInfo *sf, FILE *fd, int *totalp, unsigned short **bufp); static void load_gen(int size, SFInfo *sf, FILE *fd, int *totalp, tgenrec **bufp); static void load_sample_info(int size, SFInfo *sf, FILE *fd); enum { /* level 0 */ UNKN_ID, RIFF_ID, LIST_ID, /* level 1 */ INFO_ID, SDTA_ID, PDTA_ID, /* info stuff */ IFIL_ID, ISNG_ID, IROM_ID, INAM_ID, IVER_ID, IPRD_ID, ICOP_ID, #ifdef tplussbk ICRD_ID, IENG_ID, ISFT_ID, ICMT_ID, #endif /* sample data stuff */ SNAM_ID, SMPL_ID, /* preset stuff */ PHDR_ID, PBAG_ID, PMOD_ID, PGEN_ID, /* inst stuff */ INST_ID, IBAG_ID, IMOD_ID, IGEN_ID, /* sample header */ SHDR_ID }; /*---------------------------------------------------------------- * debug routine *----------------------------------------------------------------*/ #if 0 static void debugid(char *tag, char *p) { char buf[5]; strncpy(buf, p, 4); buf[4]=0; fprintf(stderr,"[%s:%s]\n", tag, buf); } static void debugname(char *tag, char *p) { char buf[21]; strncpy(buf, p, 20); buf[20]=0; fprintf(stderr,"[%s:%s]\n", tag, buf); } static void debugval(char *tag, int v) { fprintf(stderr, "[%s:%d]\n", tag, v); } #else #define debugid(t,s) /**/ #define debugname(t,s) /**/ #define debugval(t,v) /**/ #endif /*---------------------------------------------------------------- * load sbk file *----------------------------------------------------------------*/ void load_sbk(FILE *fd, SFInfo *sf) { tchunk chunk, subchunk; READID(sf->sbkh.riff, fd); READDW(&sf->sbkh.size, fd); READID(sf->sbkh.sfbk, fd); sf->in_rom = 1; while (! feof(fd)) { READID(chunk.id, fd); switch (getchunk(chunk.id)) { case LIST_ID: READDW(&chunk.size, fd); READID(subchunk.id, fd); process_chunk(getchunk(subchunk.id), chunk.size - 4, sf, fd); break; } } } /*---------------------------------------------------------------- * free buffer *----------------------------------------------------------------*/ void free_sbk(SFInfo *sf) { free(sf->samplenames); free(sf->presethdr); free(sf->sampleinfo); free(sf->insthdr); free(sf->presetbag); free(sf->instbag); free(sf->presetgen); free(sf->instgen); /* if (sf->sf_name) free(sf->sf_name); */ memset(sf, 0, sizeof(*sf)); } /*---------------------------------------------------------------- * get id value *----------------------------------------------------------------*/ static int getchunk(const char *id) { static struct idstring { const char *str; int id; } idlist[] = { {"LIST", LIST_ID}, #ifdef tplussbk {"sfbk", SFBK_ID}, #endif {"INFO", INFO_ID}, {"sdta", SDTA_ID}, {"snam", SNAM_ID}, {"smpl", SMPL_ID}, {"pdta", PDTA_ID}, {"phdr", PHDR_ID}, {"pbag", PBAG_ID}, {"pmod", PMOD_ID}, {"pgen", PGEN_ID}, {"inst", INST_ID}, {"ibag", IBAG_ID}, {"imod", IMOD_ID}, {"igen", IGEN_ID}, {"shdr", SHDR_ID}, {"ifil", IFIL_ID}, {"isng", ISNG_ID}, {"irom", IROM_ID}, {"iver", IVER_ID}, {"INAM", INAM_ID}, {"IPRD", IPRD_ID}, {"ICOP", ICOP_ID}, #ifdef tplussbk {"ICRD", ICRD_ID}, {"IENG", IENG_ID}, {"ISFT", ISFT_ID}, {"ICMT", ICMT_ID}, #endif }; unsigned int i; for (i = 0; i < sizeof(idlist)/sizeof(idlist[0]); i++) { if (strncmp(id, idlist[i].str, 4) == 0) { debugid("ok", id); return idlist[i].id; } } debugid("xx", id); return UNKN_ID; } static void load_sample_names(int size, SFInfo *sf, FILE *fd) { int i; sf->nrsamples = size / 20; sf->samplenames = NEW(tsamplenames, sf->nrsamples); for (i = 0; i < sf->nrsamples; i++) { READSTR(sf->samplenames[i].name, fd); sf->samplenames[i].name[20] = 0; } } static void load_preset_header(int size, SFInfo *sf, FILE *fd) { int i; sf->nrpresets = size / 38; sf->presethdr = NEW(tpresethdr, sf->nrpresets); for (i = 0; i < sf->nrpresets; i++) { READSTR(sf->presethdr[i].name, fd); READW(&sf->presethdr[i].preset, fd); sf->presethdr[i].sub_preset = sf->presethdr[i].preset; READW(&sf->presethdr[i].bank, fd); sf->presethdr[i].sub_bank = sf->presethdr[i].bank; READW(&sf->presethdr[i].bagNdx, fd); SKIPDW(fd); /* lib */ SKIPDW(fd); /* genre */ SKIPDW(fd); /* morph */ } } static void load_inst_header(int size, SFInfo *sf, FILE *fd) { int i; sf->nrinsts = size / 22; sf->insthdr = NEW(tinsthdr, sf->nrinsts); for (i = 0; i < sf->nrinsts; i++) { READSTR(sf->insthdr[i].name, fd); READW(&sf->insthdr[i].bagNdx, fd); } } static void load_bag(int size, SFInfo *sf, FILE *fd, int *totalp, unsigned short **bufp) { unsigned short *buf; int i; debugval("bagsize", size); size /= 4; buf = NEW(unsigned short, size); for (i = 0; i < size; i++) { READW(&buf[i], fd); SKIPW(fd); /* mod */ } *totalp = size; *bufp = buf; } static void load_gen(int size, SFInfo *sf, FILE *fd, int *totalp, tgenrec **bufp) { tgenrec *buf; int i; debugval("gensize", size); size /= 4; buf = NEW(tgenrec, size); for (i = 0; i < size; i++) { READW(&buf[i].oper, fd); READW(&buf[i].amount, fd); } *totalp = size; *bufp = buf; } static void load_sample_info(int size, SFInfo *sf, FILE *fd) { int i; debugval("infosize", size); if (sf->version > 1) { sf->nrinfos = size / 46; sf->nrsamples = sf->nrinfos; sf->sampleinfo = NEW(tsampleinfo, sf->nrinfos); sf->samplenames = NEW(tsamplenames, sf->nrsamples); } else { sf->nrinfos = size / 16; sf->sampleinfo = NEW(tsampleinfo, sf->nrinfos); } for (i = 0; i < sf->nrinfos; i++) { if (sf->version > 1) READSTR(sf->samplenames[i].name, fd); READDW(&sf->sampleinfo[i].startsample, fd); READDW(&sf->sampleinfo[i].endsample, fd); READDW(&sf->sampleinfo[i].startloop, fd); READDW(&sf->sampleinfo[i].endloop, fd); if (sf->version > 1) { READDW(&sf->sampleinfo[i].samplerate, fd); READB(&sf->sampleinfo[i].originalPitch, fd); READB(&sf->sampleinfo[i].pitchCorrection, fd); READW(&sf->sampleinfo[i].samplelink, fd); READW(&sf->sampleinfo[i].sampletype, fd); } else { if (sf->sampleinfo[i].startsample == 0) sf->in_rom = 0; sf->sampleinfo[i].startloop++; sf->sampleinfo[i].endloop += 2; sf->sampleinfo[i].samplerate = 44100; sf->sampleinfo[i].originalPitch = 60; sf->sampleinfo[i].pitchCorrection = 0; sf->sampleinfo[i].samplelink = 0; if (sf->in_rom) sf->sampleinfo[i].sampletype = 0x8001; else sf->sampleinfo[i].sampletype = 1; } } } /* */ static void process_chunk(int id, int s, SFInfo *sf, FILE *fd) { int cid; tchunk subchunk; switch (id) { case INFO_ID: READCHUNK(&subchunk, fd); while ((cid = getchunk(subchunk.id)) != LIST_ID) { switch (cid) { case IFIL_ID: READW(&sf->version, fd); READW(&sf->minorversion, fd); break; /* case INAM_ID: sf->sf_name = (char*)malloc(subchunk.size); if (sf->sf_name == NULL) { fprintf(stderr, "can't malloc\n"); exit(1); } fread(sf->sf_name, 1, subchunk.size, fd); break; */ default: fseek(fd, subchunk.size, SEEK_CUR); break; } READCHUNK(&subchunk, fd); if (feof(fd)) return; } fseek(fd, -8, SEEK_CUR); /* seek back */ break; case SDTA_ID: READCHUNK(&subchunk, fd); while ((cid = getchunk(subchunk.id)) != LIST_ID) { switch (cid) { case SNAM_ID: if (sf->version > 1) { printf("**** version 2 has obsolete format??\n"); fseek(fd, subchunk.size, SEEK_CUR); } else load_sample_names(subchunk.size, sf, fd); break; case SMPL_ID: sf->samplepos = ftell(fd); sf->samplesize = subchunk.size; fseek(fd, subchunk.size, SEEK_CUR); } READCHUNK(&subchunk, fd); if (feof(fd)) return; } fseek(fd, -8, SEEK_CUR); /* seek back */ break; case PDTA_ID: READCHUNK(&subchunk, fd); while ((cid = getchunk(subchunk.id)) != LIST_ID) { switch (cid) { case PHDR_ID: load_preset_header(subchunk.size, sf, fd); break; case PBAG_ID: load_bag(subchunk.size, sf, fd, &sf->nrpbags, &sf->presetbag); break; case PMOD_ID: /* ignored */ fseek(fd, subchunk.size, SEEK_CUR); break; case PGEN_ID: load_gen(subchunk.size, sf, fd, &sf->nrpgens, &sf->presetgen); break; case INST_ID: load_inst_header(subchunk.size, sf, fd); break; case IBAG_ID: load_bag(subchunk.size, sf, fd, &sf->nribags, &sf->instbag); break; case IMOD_ID: /* ingored */ fseek(fd, subchunk.size, SEEK_CUR); break; case IGEN_ID: load_gen(subchunk.size, sf, fd, &sf->nrigens, &sf->instgen); break; case SHDR_ID: load_sample_info(subchunk.size, sf, fd); break; default: fprintf(stderr, "unknown id\n"); fseek(fd, subchunk.size, SEEK_CUR); break; } READCHUNK(&subchunk, fd); if (feof(fd)) { debugid("file", "EOF"); return; } } fseek(fd, -8, SEEK_CUR); /* rewind */ break; } } alsaplayer-0.99.82/attic/midi/resample.c000066400000000000000000001070311466261456500200630ustar00rootroot00000000000000/* $Id$ TiMidity++ -- MIDI to WAVE converter and player Copyright (C) 1999 Masanao Izumo Copyright (C) 1995 Tuukka Toivonen * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include #include #ifdef __FreeBSD__ #include #else #include #endif #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "controls.h" #include "tables.h" #include "resample.h" #define LINEAR_INTERPOLATION #define CSPLINE_INTERPOLATION #define ENVELOPE_PITCH_MODULATION #ifdef LOOKUP_HACK #define MAX_DATAVAL 127 #define MIN_DATAVAL -128 #else #define MAX_DATAVAL 32767 #define MIN_DATAVAL -32768 #endif #define OVERSHOOT_STEP 50 #define WAVE_ONE (1L<>FRACTION_BITS) #define WAVE(a) ((a)<voice[v].modulation_stage; if (stage>5) { /* Envelope ran out. */ d->voice[v].modulation_increment = 0; return 1; } if ((d->voice[v].sample->modes & MODES_ENVELOPE) && (d->voice[v].sample->modes & MODES_SUSTAIN)) { if (d->voice[v].status & (VOICE_ON | VOICE_SUSTAINED)) { if (stage>2) { /* Freeze modulation until note turns off. Trumpets want this. */ d->voice[v].modulation_increment=0; return 0; } } } d->voice[v].modulation_stage=stage+1; #ifdef tplus if (d->voice[v].modulation_volume==(int)d->voice[v].sample->modulation_offset[stage] || (stage > 2 && d->voice[v].modulation_volume < (int)d->voice[v].sample->modulation_offset[stage])) #else if (d->voice[v].modulation_volume==d->voice[v].sample->modulation_offset[stage]) #endif return recompute_modulation(v, d); d->voice[v].modulation_target=d->voice[v].sample->modulation_offset[stage]; d->voice[v].modulation_increment = d->voice[v].sample->modulation_rate[stage]; if ((int)d->voice[v].modulation_targetvoice[v].modulation_volume) d->voice[v].modulation_increment = -d->voice[v].modulation_increment; return 0; } int update_modulation(int v, struct md *d) { if (d->voice[v].modulation_delay > 0) { if (d->voice[v].modulation_delay > (unsigned)control_ratio) d->voice[v].modulation_delay -= control_ratio; else d->voice[v].modulation_delay = 0; if(d->voice[v].modulation_delay > 0) return 0; } d->voice[v].modulation_volume += d->voice[v].modulation_increment; if (d->voice[v].modulation_volume < 0) d->voice[v].modulation_volume = 0; /* Why is there no ^^ operator?? */ if (((d->voice[v].modulation_increment < 0) && (d->voice[v].modulation_volume <= (int)d->voice[v].modulation_target)) || ((d->voice[v].modulation_increment > 0) && (d->voice[v].modulation_volume >= (int)d->voice[v].modulation_target))) { d->voice[v].modulation_volume = d->voice[v].modulation_target; if (recompute_modulation(v, d)) return 1; } return 0; } /* Returns 1 if the note died */ int32 update_modulation_signal(int v, int32 incr, struct md *d) { if (d->voice[v].modulation_increment) { update_modulation(v, d); return calc_mod_freq(v, incr, d); } return incr; } /* modulation_volume has been set by above routine */ static int32 calc_mod_freq(int v, int32 incr, struct md *d) { FLOAT_T mod_amount; int32 freq; /* already done in update_vibrato ? */ if (d->voice[v].vibrato_control_ratio) return incr; if ((mod_amount=d->voice[v].sample->modEnvToPitch)<0.02) return incr; if (incr < 0) return incr; freq = d->voice[v].frequency; freq = (int32)( (double)freq*(1.0 + (mod_amount - 1.0) * (d->voice[v].modulation_volume>>22) / 255.0) ); return (int32) FRSCALE(((double)(d->voice[v].sample->sample_rate) * (double)(freq)) / ((double)(d->voice[v].sample->root_freq) * (double)(play_mode->rate)), FRACTION_BITS); } /*************** resampling with fixed increment *****************/ static sample_t *rs_plain(int v, uint32 *countptr, struct md *d) { /* Play sample until end, then free the voice. */ Voice *vp=&d->voice[v]; int32 ofsd, v0, v1, v2, v3, temp, overshoot; int offset; uint32 cc_count=vp->modulation_counter; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; int32 incr=vp->sample_increment; uint32 ofs=vp->sample_offset; #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) uint32 ls=0, le=vp->sample->data_length; #endif /* LAGRANGE_INTERPOLATION */ uint32 se=vp->sample->data_length; uint32 count=*countptr; if (!incr) return d->resample_buffer+d->resample_buffer_offset; /* --gl */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } if (!cc_count--) { cc_count = control_ratio - 1; incr = update_modulation_signal(v, incr, d); } ofs += incr; if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->sample_offset=ofs; /* Update offset */ vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_loop(int v, Voice *vp, uint32 *countptr, struct md *d) { /* Play sample until end-of-loop, skip back and continue. */ int32 ofsd, v0, v1, v2, v3, temp, overshoot; int offset; uint32 cc_count=vp->modulation_counter; int32 incr=vp->sample_increment; uint32 ofs=vp->sample_offset; uint32 le=vp->loop_end, #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) ls=vp->loop_start, #endif /* LAGRANGE_INTERPOLATION */ ll=le - vp->loop_start; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 se=vp->sample->data_length, count = *countptr; int flag_exit_loop; flag_exit_loop = (vp->status & (VOICE_FREE | VOICE_DIE)) || ((vp->status & VOICE_OFF) && (vp->sample->modes & MODES_FAST_RELEASE) ) || ((vp->status & VOICE_OFF) && d->dont_keep_looping ) ; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } if (!cc_count--) { cc_count = control_ratio - 1; incr = update_modulation_signal(v, incr, d); } ofs += incr; if (ofs>=le) { if (flag_exit_loop) { vp->echo_delay -= ll >> FRACTION_BITS; if (vp->echo_delay >= 0) ofs -= ll; } else ofs -= ll; /* Hopefully the loop is longer than an increment. */ } if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->sample_offset=ofs; /* Update offset */ vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_bidir(int v, Voice *vp, uint32 count, struct md *d) { int32 ofsd, v0, v1, v2, v3, temp, overshoot; int offset; int32 incr=vp->sample_increment; uint32 le=vp->loop_end, ls=vp->loop_start; uint32 ofs=vp->sample_offset, se=vp->sample->data_length; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; #ifdef USE_BIDIR_OVERSHOOT int32 le2 = le<<1, ls2 = ls<<1; #endif uint32 i, j; /* Play normally until inside the loop region */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; if (ofs <= ls) { /* NOTE: Assumes that incr > 0, which is NOT always the case when doing bidirectional looping. I have yet to see a case where both ofs <= ls AND incr < 0, however. */ if (incr < 0) i = ls - ofs; else i = (ls - ofs) / incr + 1; if (i > count) { i = count; count = 0; } else count -= i; for(j = 0; j < i; j++) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } ofs += incr; } } /* Then do the bidirectional looping */ while(count) { /* Precalc how many times we should go through the loop */ #if 1 i = ((incr > 0 ? le : ls) - ofs) / incr + 1; #else /* fix from M. Izumo */ i = ((incr > 0 ? le : ls) - ofs + incr - 1) / incr; #endif if (i > count) { i = count; count = 0; } else count -= i; for(j = 0; j < i && ofs < se; j++) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } ofs += incr; } #ifdef USE_BIDIR_OVERSHOOT if (ofs>=le) { /* fold the overshoot back in */ ofs = le2 - ofs; incr *= -1; } else if (ofs <= ls) { ofs = ls2 - ofs; incr *= -1; } #else incr *= -1; #endif } vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } /*********************** vibrato versions ***************************/ /* We only need to compute one half of the vibrato sine cycle */ static uint32 vib_phase_to_inc_ptr(uint32 phase) { if (phase < VIBRATO_SAMPLE_INCREMENTS/2) return VIBRATO_SAMPLE_INCREMENTS/2-1-phase; else if (phase >= 3*VIBRATO_SAMPLE_INCREMENTS/2) return 5*VIBRATO_SAMPLE_INCREMENTS/2-1-phase; else return phase-VIBRATO_SAMPLE_INCREMENTS/2; } static int32 update_vibrato(int v, Voice *vp, int sign, struct md *d) { uint32 depth, freq=vp->frequency; #ifdef ENVELOPE_PITCH_MODULATION FLOAT_T mod_amount=vp->sample->modEnvToPitch; #endif uint32 phase; int pb; double a; if(vp->vibrato_delay > 0) { vp->vibrato_delay -= vp->vibrato_control_ratio; if(vp->vibrato_delay > 0) return vp->sample_increment; } if (vp->vibrato_phase++ >= 2*VIBRATO_SAMPLE_INCREMENTS-1) vp->vibrato_phase=0; phase=vib_phase_to_inc_ptr(vp->vibrato_phase); if (vp->vibrato_sample_increment[phase]) { if (sign) return -vp->vibrato_sample_increment[phase]; else return vp->vibrato_sample_increment[phase]; } /* Need to compute this sample increment. */ depth = vp->vibrato_depth; if(depth < vp->modulation_wheel) depth = vp->modulation_wheel; depth <<= 7; if (vp->vibrato_sweep && !vp->modulation_wheel) { /* Need to update sweep */ vp->vibrato_sweep_position += vp->vibrato_sweep; if (vp->vibrato_sweep_position >= (1<vibrato_sweep=0; else { /* Adjust depth */ depth *= vp->vibrato_sweep_position; depth >>= SWEEP_SHIFT; } } #ifdef ENVELOPE_PITCH_MODULATION if (vp->modulation_increment && mod_amount > 0.0) { update_modulation(v, d); if (vp->modulation_volume) { freq = (int32)( (double)freq*(1.0 + (mod_amount - 1.0) * (double)(vp->modulation_volume>>22) / 255.0) ); } } #endif pb=(int)((sine(vp->vibrato_phase * (SINE_CYCLE_LENGTH/(2*VIBRATO_SAMPLE_INCREMENTS))) * (double)(depth) * VIBRATO_AMPLITUDE_TUNING)); a = FRSCALE(((double)(vp->sample->sample_rate) * (double)(freq)) / ((double)(vp->sample->root_freq) * (double)(play_mode->rate)), FRACTION_BITS); if(pb<0) { pb = -pb; a /= bend_fine[(pb>>5) & 0xFF] * bend_coarse[pb>>13]; } else a *= bend_fine[(pb>>5) & 0xFF] * bend_coarse[pb>>13]; a += 0.5; /* If the sweep's over, we can store the newly computed sample_increment */ if (!vp->vibrato_sweep || vp->modulation_wheel) vp->vibrato_sample_increment[phase]=(int32) a; if (sign) a = -a; /* need to preserve the loop direction */ return (int32) a; } static sample_t *rs_vib_plain(int v, uint32 *countptr, struct md *d) { /* Play sample until end, then free the voice. */ Voice *vp=&d->voice[v]; int32 ofsd, v0, v1, v2, v3, temp, overshoot; int offset; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; int32 incr=vp->sample_increment; /*WHY int32??*/ #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) uint32 ls=0, le=vp->sample->data_length; #endif /* LAGRANGE_INTERPOLATION */ uint32 ofs=vp->sample_offset, se=vp->sample->data_length, count=*countptr; uint32 cc=vp->vibrato_control_counter; /* This has never been tested */ if (incr<0) incr = -incr; /* In case we're coming out of a bidir loop */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { if (!cc--) { cc=vp->vibrato_control_ratio; incr=update_vibrato(v, vp, 0, d); } offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } ofs += incr; if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_vib_loop(int v, Voice *vp, uint32 *countptr, struct md *d) { /* Play sample until end-of-loop, skip back and continue. */ int32 ofsd, v0, v1, v2, v3, temp, overshoot; int offset; int32 incr=vp->sample_increment; /*WHY int32??*/ uint32 #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) ls=vp->loop_start, #endif /* LAGRANGE_INTERPOLATION */ le=vp->loop_end, ll=le - vp->loop_start; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 ofs=vp->sample_offset, se=vp->sample->data_length, count = *countptr; uint32 cc=vp->vibrato_control_counter; int flag_exit_loop; flag_exit_loop = (vp->status & (VOICE_FREE | VOICE_DIE)) || ((vp->status & VOICE_OFF) && (vp->sample->modes & MODES_FAST_RELEASE) ) || ((vp->status & VOICE_OFF) && d->dont_keep_looping ) ; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { if (!cc--) { cc=vp->vibrato_control_ratio; incr=update_vibrato(v, vp, 0, d); } offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } ofs += incr; if (ofs>=le) { if (flag_exit_loop) { vp->echo_delay -= ll >> FRACTION_BITS; if (vp->echo_delay >= 0) ofs -= ll; } else ofs -= ll; /* Hopefully the loop is longer than an increment. */ } if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_vib_bidir(int v, Voice *vp, uint32 count, struct md *d) { int32 ofsd, v0, v1, v2, v3, temp, overshoot; int offset; int32 incr=vp->sample_increment; /*WHY int32??*/ uint32 le=vp->loop_end, ls=vp->loop_start; uint32 ofs=vp->sample_offset, se=vp->sample->data_length; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 cc=vp->vibrato_control_counter; #ifdef USE_BIDIR_OVERSHOOT uint32 le2=le<<1, ls2=ls<<1; #endif uint32 i, j; int vibflag = 0; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; /* Play normally until inside the loop region */ while (count && (ofs <= ls)) { i = (ls - ofs) / incr + 1; if (i > count) i = count; if (i > cc) { i = cc; vibflag = 1; } else cc -= i; count -= i; for(j = 0; j < i; j++) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } ofs += incr; } if (vibflag) { cc = vp->vibrato_control_ratio; incr = update_vibrato(v, vp, 0, d); vibflag = 0; } } /* Then do the bidirectional looping */ while (count) { /* Precalc how many times we should go through the loop */ #if 1 i = ((incr > 0 ? le : ls) - ofs) / incr + 1; #else /* fix from M. Izumo */ i = ((incr > 0 ? le : ls) - ofs + incr - 1) / incr; #endif if(i > count) i = count; if(i > cc) { i = cc; vibflag = 1; } else cc -= i; count -= i; while (i-- && ofs < se) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (int32)((ofs - se)>>FRACTION_BITS) ; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ *dest++ = (sample_t)(v1 + ((int32)((v2-v1) * (int32)(ofs & FRACTION_MASK)) >> FRACTION_BITS)); }else{ ofsd=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + (((( ( (5*v3 - 11*v2 + 7*v1 - v0)* (int32)ofs) >>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* (int32)ofs)>>FRACTION_BITS)*(int32)ofs)>>(FRACTION_BITS+2))-1))*(int32)ofs; v1 = (v1 + v2)/(6L< MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); ofs=ofsd; } ofs += incr; } if (vibflag) { cc = vp->vibrato_control_ratio; incr = update_vibrato(v, vp, (incr < 0), d); vibflag = 0; } if (ofs >= le) { #ifdef USE_BIDIR_OVERSHOOT /* fold the overshoot back in */ ofs = le2 - ofs; #endif incr *= -1; } else if (ofs <= ls) { #ifdef USE_BIDIR_OVERSHOOT ofs = ls2 - ofs; #endif incr *= -1; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } static int rs_update_porta(int v, struct md *d) { Voice *vp=&d->voice[v]; int32 db; db = vp->porta_dpb; if(vp->porta_pb < 0) { if(db > -vp->porta_pb) db = -vp->porta_pb; } else { if(db > vp->porta_pb) db = -vp->porta_pb; else db = -db; } vp->porta_pb += db; if(vp->porta_pb == 0) { vp->porta_control_ratio = 0; vp->porta_pb = 0; } recompute_freq(v, d); return vp->porta_control_ratio; } static sample_t *porta_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp=&d->voice[v]; uint32 n = *countptr; uint32 i; sample_t *(* resampler)(int, uint32 *, int, struct md *); int cc = vp->porta_control_counter; int loop; if(vp->vibrato_control_ratio) resampler = vib_resample_voice; else resampler = normal_resample_voice; if(mode != 1) loop = 1; else loop = 0; /* vp->cache = NULL; */ d->resample_buffer_offset = 0; while(d->resample_buffer_offset < n) { if(cc == 0) { if((cc = rs_update_porta(v, d)) == 0) { i = n - d->resample_buffer_offset; resampler(v, &i, mode, d); d->resample_buffer_offset += i; break; } } i = n - d->resample_buffer_offset; if(i > (uint32)cc) i = (uint32)cc; resampler(v, &i, mode, d); d->resample_buffer_offset += i; /* if(!loop && vp->status == VOICE_FREE) */ if(vp->status == VOICE_FREE) break; cc -= (int)i; } *countptr = d->resample_buffer_offset; d->resample_buffer_offset = 0; vp->porta_control_counter = cc; return d->resample_buffer; } static sample_t *vib_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp = &d->voice[v]; /* vp->cache = NULL; */ if(mode == 0) return rs_vib_loop(v, vp, countptr, d); if(mode == 1) return rs_vib_plain(v, countptr, d); return rs_vib_bidir(v, vp, *countptr, d); } static sample_t *normal_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp = &d->voice[v]; if(mode == 0) return rs_loop(v, vp, countptr, d); if(mode == 1) return rs_plain(v, countptr, d); return rs_bidir(v, vp, *countptr, d); } sample_t *resample_voice(int v, uint32 *countptr, struct md *d) { Voice *vp=&d->voice[v]; int mode; d->resample_buffer_offset = 0; if(!(vp->sample->sample_rate)) { uint32 ofs; /* Pre-resampled data -- just update the offset and check if we're out of data. */ ofs=vp->sample_offset >> FRACTION_BITS; /* Kind of silly to use FRACTION_BITS here... */ if(*countptr >= (vp->sample->data_length>>FRACTION_BITS) - ofs) { /* Note finished. Free the voice. */ if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } /* Let the caller know how much data we had left */ *countptr = (vp->sample->data_length>>FRACTION_BITS) - ofs; } else vp->sample_offset += *countptr << FRACTION_BITS; return vp->sample->data+ofs; } if (d->current_interpolation == DO_LAGRANGE_INTERPOLATION) return resample_voice_lagrange(v, countptr, d); else if (d->current_interpolation == DO_FILTER_INTERPOLATION) return resample_voice_filter(v, countptr, d); mode = vp->sample->modes; if((mode & MODES_LOOPING) && ((mode & MODES_ENVELOPE) || (vp->status & (VOICE_ON | VOICE_SUSTAINED)))) { if(mode & MODES_PINGPONG) { /* vp->cache = NULL; */ mode = 2; } else mode = 0; } else mode = 1; if(vp->porta_control_ratio) return porta_resample_voice(v, countptr, mode, d); if(vp->vibrato_control_ratio) return vib_resample_voice(v, countptr, mode, d); return normal_resample_voice(v, countptr, mode, d); } #ifdef TOTALLY_LOCAL void do_lowpass(Sample *sample, uint32 srate, sample_t *buf, uint32 count, uint32 freq, FLOAT_T resonance) { double a0=0, a1=0, a2=0, b0=0, b1=0; double x0=0, x1=0, y0=0, y1=0; sample_t samp; double outsamp, insamp, mod_amount=0; uint32 findex, cc; uint32 current_freq; if (freq < 20) return; if (freq > srate * 2) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Lowpass: center must be < data rate*2"); return; } current_freq = freq; if (sample->modEnvToFilterFc) mod_amount = sample->modEnvToFilterFc; if (mod_amount < 0.02 && freq >= 13500) return; d->voice[0].sample = sample; /* Ramp up from 0 */ d->voice[0].modulation_stage=ATTACK; d->voice[0].modulation_volume=0; d->voice[0].modulation_delay=sample->modulation_rate[DELAY]; cc = d->voice[0].modulation_counter=0; #ifdef TOTALLY_LOCAL recompute_modulation(0, d); #endif /* start modulation loop here */ while (count--) { if (!cc) { if (mod_amount>0.02) { #ifdef TOTALLY_LOCAL if (update_modulation_signal(0, d)) mod_amount = 0; else current_freq = (uint32)( (double)freq*(1.0 + (mod_amount - 1.0) * (d->voice[0].modulation_volume>>22) / 255.0) ); #endif } cc = control_ratio; findex = 1 + (current_freq+50) / 100; if (findex > 100) findex = 100; a0 = butterworth[findex][0]; a1 = butterworth[findex][1]; a2 = butterworth[findex][2]; b0 = butterworth[findex][3]; b1 = butterworth[findex][4]; } if (mod_amount>0.02) cc--; samp = *buf; insamp = (double)samp; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; if (outsamp > MAX_DATAVAL) { outsamp = MAX_DATAVAL; } else if (outsamp < MIN_DATAVAL) { outsamp = MIN_DATAVAL; } *buf++ = (sample_t)outsamp; } } #endif void pre_resample(Sample * sp) { double a, xdiff; uint32 i, incr, ofs, newlen, count, overshoot; int16 *newdata, *dest, *src = (int16 *)sp->data, *vptr, *endptr; int32 v1, v2, v3, v4; static const char note_name[12][3] = { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * pre-resampling for note %d (%s%d)", sp->note_to_use, note_name[sp->note_to_use % 12], (sp->note_to_use & 0x7F) / 12); if (sp->sample_rate == play_mode->rate && sp->root_freq == freq_table[(int)(sp->note_to_use)]) { a = 1; } else a = ((double) (sp->sample_rate) * freq_table[(int) (sp->note_to_use)]) / ((double) (sp->root_freq) * play_mode->rate); /* if (a<1.0) return; */ if(sp->data_length / a >= 0x7fffffffL) { /* Too large to compute */ ctl->cmsg(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d", sp->note_to_use); return; } endptr = src + (sp->data_length >> FRACTION_BITS) - 1; if (*endptr < 0) overshoot = (uint32)(-(*endptr / OVERSHOOT_STEP)); else overshoot = (uint32)(*endptr / OVERSHOOT_STEP); if (overshoot < 2) overshoot = 0; newlen = (int32)(sp->data_length / a); count = (newlen >> FRACTION_BITS) - 1; ofs = incr = (sp->data_length - (1 << FRACTION_BITS)) / count; if((double)newlen + incr >= 0x7fffffffL) { /* Too large to compute */ ctl->cmsg(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d", sp->note_to_use); return; } dest = newdata = (int16 *)safe_malloc((newlen >> (FRACTION_BITS - 1)) + 2 + 2*overshoot); if (--count) *dest++ = src[0]; /* Since we're pre-processing and this doesn't have to be done in real-time, we go ahead and do the full sliding cubic interpolation. */ count--; for(i = 0; i < count + overshoot; i++) { vptr = src + (ofs >> FRACTION_BITS); if (i < count - 2 || !overshoot) { v1 = *(vptr - 1); v2 = *vptr; v3 = *(vptr + 1); v4 = *(vptr + 2); } else { if (i < count + 1) v1 = *(vptr - 1); else v1 = *endptr - (count-i+2) * *endptr / overshoot; if (i < count) v2 = *vptr; else v2 = *endptr - (count-i+1) * *endptr / overshoot; if (i < count - 1) v3 = *(vptr + 1); else v3 = *endptr - (count-i) * *endptr / overshoot; v4 = *endptr - (count-i-1) * *endptr / overshoot; } xdiff = FRSCALENEG((int32)(ofs & FRACTION_MASK), FRACTION_BITS); *dest++ = v2 + (xdiff / 6.0) * (-2 * v1 - 3 * v2 + 6 * v3 - v4 + xdiff * (3 * (v1 - 2 * v2 + v3) + xdiff * (-v1 + 3 * (v2 - v3) + v4))); ofs += incr; } if (!overshoot) { if ((int32)(ofs & FRACTION_MASK)) { v1 = src[ofs >> FRACTION_BITS]; v2 = src[(ofs >> FRACTION_BITS) + 1]; *dest++ = (int16)(v1 + ((int32)((v2 - v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); } else *dest++ = src[ofs >> FRACTION_BITS]; *dest++ = *(dest - 1) / 2; *dest++ = *(dest - 1) / 2; } sp->data_length = newlen + (overshoot << FRACTION_BITS); sp->loop_start = (int32)(sp->loop_start / a); sp->loop_end = (int32)(sp->loop_end / a); free(sp->data); sp->data = (sample_t *) newdata; sp->sample_rate = 0; } alsaplayer-0.99.82/attic/midi/resample.h000066400000000000000000000033611466261456500200710ustar00rootroot00000000000000/* TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . resample.h */ #define DO_LINEAR_INTERPOLATION 0 #define DO_CSPLINE_INTERPOLATION 1 #define DO_LAGRANGE_INTERPOLATION 2 #define DO_FILTER_INTERPOLATION 3 extern sample_t *resample_voice(int v, uint32 *countptr, struct md *d); extern sample_t *resample_voice_lagrange(int v, uint32 *countptr, struct md *d); extern sample_t *resample_voice_filter(int v, uint32 *countptr, struct md *d); extern void pre_resample(Sample *sp); extern void do_lowpass(Sample *sample, uint32 srate, sample_t *buf, uint32 count, uint32 freq, FLOAT_T resonance); extern int recompute_modulation(int v, struct md *d); /*extern sample_t resample_buffer[AUDIO_BUFFER_SIZE+100];*/ /*extern uint32 resample_buffer_offset;*/ extern int update_modulation(int v, struct md *d); extern int32 update_modulation_signal(int v, int32 incr, struct md *d); /*extern int32 calc_mod_freq(int v, int32 incr, struct md *d);*/ alsaplayer-0.99.82/attic/midi/resample_f.c000066400000000000000000001254211466261456500203730ustar00rootroot00000000000000/* $Id$ TiMidity++ -- MIDI to WAVE converter and player Copyright (C) 1999 Masanao Izumo Copyright (C) 1995 Tuukka Toivonen * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include #include #ifdef __FreeBSD__ #include #else #include #endif #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "controls.h" #include "tables.h" #include "resample.h" #define LINEAR_INTERPOLATION #define CSPLINE_INTERPOLATION #define FILTER_INTERPOLATION #define ENVELOPE_PITCH_MODULATION #ifdef LOOKUP_HACK #define MAX_DATAVAL 127 #define MIN_DATAVAL -128 #else #define MAX_DATAVAL 32767 #define MIN_DATAVAL -32768 #endif #define OVERSHOOT_STEP 50 #define WAVE_ONE (1L<>FRACTION_BITS) #define WAVE(a) ((a)<voice[v].modLfoToFilterFc; if (d->voice[v].lfo_sweep) { /* Update sweep position */ d->voice[v].lfo_sweep_position += d->voice[v].lfo_sweep; if (d->voice[v].lfo_sweep_position>=(1<voice[v].lfo_sweep=0; /* Swept to max amplitude */ else { /* Need to adjust depth */ depth *= (FLOAT_T)d->voice[v].lfo_sweep_position / (FLOAT_T)(1<voice[v].lfo_phase += d->voice[v].lfo_phase_increment; d->voice[v].lfo_volume = depth; } static int calc_bw_index(int v, struct md *d) { FLOAT_T mod_amount=d->voice[v].modEnvToFilterFc; int32 freq = d->voice[v].sample->cutoff_freq; int ix; if (d->voice[v].lfo_phase_increment) update_lfo(v, d); #if 0 /* FIXME */ if (!d->voice[v].lfo_phase_increment && update_modulation_signal(v, d)) return 0; #endif /* printf("mod_amount %f ", mod_amount); */ if (d->voice[v].lfo_volume>0.001) { if (mod_amount) mod_amount *= d->voice[v].lfo_volume; else mod_amount = d->voice[v].lfo_volume; /* printf("lfo %f -> mod %f ", d->voice[v].lfo_volume, mod_amount); */ } if (mod_amount > 0.001) { if (d->voice[v].modulation_volume) freq = (int32)( (double)freq*(1.0 + (mod_amount - 1.0) * (d->voice[v].modulation_volume>>22) / 255.0) ); else freq = (int32)( (double)freq*mod_amount ); /* printf("v%d freq %d (was %d), modvol %d, mod_amount %f\n", v, (int)freq, (int)d->voice[v].sample->cutoff_freq, (int)d->voice[v].modulation_volume>>22, mod_amount); */ ix = 1 + (freq+50) / 100; if (ix > 100) ix = 100; d->voice[v].bw_index = ix; return 1; } d->voice[v].bw_index = 1 + (freq+50) / 100; return 0; } /*************** resampling with fixed increment *****************/ static sample_t *rs_plain(int v, uint32 *countptr, struct md *d) { /* Play sample until end, then free the voice. */ Voice *vp=&d->voice[v]; int32 v0, v1, v2, v3, temp, overshoot; int offset; FLOAT_T insamp, outsamp, a0, a1, a2, b0, b1, x0=vp->current_x0, x1=vp->current_x1, y0=vp->current_y0, y1=vp->current_y1; uint32 cc_count=vp->modulation_counter, bw_index=vp->bw_index, ofsdu; sample_t newsample; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; int32 incr=vp->sample_increment; uint32 ofs=vp->sample_offset; #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) uint32 ls=0, le=vp->sample->data_length; #endif /* LAGRANGE_INTERPOLATION */ uint32 se=vp->sample->data_length; uint32 count=*countptr; if (!incr) return d->resample_buffer+d->resample_buffer_offset; /* --gl */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; while (count--) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->sample_offset=ofs; /* Update offset */ vp->current_x0=x0; vp->current_x1=x1; vp->current_y0=y0; vp->current_y1=y1; vp->bw_index=bw_index; vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_loop(int v, Voice *vp, uint32 *countptr, struct md *d) { /* Play sample until end-of-loop, skip back and continue. */ int32 v0, v1, v2, v3, temp, overshoot; int offset; FLOAT_T insamp, outsamp, a0, a1, a2, b0, b1, x0=vp->current_x0, x1=vp->current_x1, y0=vp->current_y0, y1=vp->current_y1; uint32 cc_count=vp->modulation_counter, bw_index=vp->bw_index, ofsdu; sample_t newsample; int32 incr=vp->sample_increment; uint32 ofs=vp->sample_offset; uint32 le=vp->loop_end, #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) ls=vp->loop_start, #endif /* LAGRANGE_INTERPOLATION */ ll=le - vp->loop_start; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 se=vp->sample->data_length, count = *countptr; int flag_exit_loop; flag_exit_loop = (vp->status & (VOICE_FREE | VOICE_DIE)) || ((vp->status & VOICE_OFF) && (vp->sample->modes & MODES_FAST_RELEASE) ) || ((vp->status & VOICE_OFF) && d->dont_keep_looping ) ; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; while (count--) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; if (ofs>=le) { if (flag_exit_loop) { vp->echo_delay -= ll >> FRACTION_BITS; if (vp->echo_delay >= 0) ofs -= ll; } else ofs -= ll; /* Hopefully the loop is longer than an increment. */ } if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->sample_offset=ofs; /* Update offset */ vp->current_x0=x0; vp->current_x1=x1; vp->current_y0=y0; vp->current_y1=y1; vp->bw_index=bw_index; vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_bidir(int v, Voice *vp, uint32 count, struct md *d) { int32 v0, v1, v2, v3, temp, overshoot; int offset; FLOAT_T insamp, outsamp, a0, a1, a2, b0, b1, x0=vp->current_x0, x1=vp->current_x1, y0=vp->current_y0, y1=vp->current_y1; uint32 cc_count=vp->modulation_counter, bw_index=vp->bw_index, ofsdu; sample_t newsample; int32 incr=vp->sample_increment; uint32 le=vp->loop_end, ls=vp->loop_start; uint32 ofs=vp->sample_offset, se=vp->sample->data_length; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; #ifdef USE_BIDIR_OVERSHOOT int32 le2 = le<<1, ls2 = ls<<1; #endif uint32 i, j; /* Play normally until inside the loop region */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; if (ofs <= ls) { /* NOTE: Assumes that incr > 0, which is NOT always the case when doing bidirectional looping. I have yet to see a case where both ofs <= ls AND incr < 0, however. */ if (incr < 0) i = ls - ofs; else i = (ls - ofs) / incr + 1; if (i > count) { i = count; count = 0; } else count -= i; for(j = 0; j < i; j++) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; } } /* Then do the bidirectional looping */ while(count) { /* Precalc how many times we should go through the loop */ #if 1 i = ((incr > 0 ? le : ls) - ofs) / incr + 1; #else /* fix from M. Izumo */ i = ((incr > 0 ? le : ls) - ofs + incr - 1) / incr; #endif if (i > count) { i = count; count = 0; } else count -= i; for(j = 0; j < i && ofs < se; j++) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; } #ifdef USE_BIDIR_OVERSHOOT if (ofs>=le) { /* fold the overshoot back in */ ofs = le2 - ofs; incr *= -1; } else if (ofs <= ls) { ofs = ls2 - ofs; incr *= -1; } #else incr *= -1; #endif } vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ vp->current_x0=x0; vp->current_x1=x1; vp->current_y0=y0; vp->current_y1=y1; vp->bw_index=bw_index; vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } /*********************** vibrato versions ***************************/ /* We only need to compute one half of the vibrato sine cycle */ static uint32 vib_phase_to_inc_ptr(uint32 phase) { if (phase < VIBRATO_SAMPLE_INCREMENTS/2) return VIBRATO_SAMPLE_INCREMENTS/2-1-phase; else if (phase >= 3*VIBRATO_SAMPLE_INCREMENTS/2) return 5*VIBRATO_SAMPLE_INCREMENTS/2-1-phase; else return phase-VIBRATO_SAMPLE_INCREMENTS/2; } static int32 update_vibrato(int v, Voice *vp, int sign, struct md *d) { uint32 depth, freq=vp->frequency; #ifdef ENVELOPE_PITCH_MODULATION FLOAT_T mod_amount=vp->sample->modEnvToPitch; #endif uint32 phase; int pb; double a; if(vp->vibrato_delay > 0) { vp->vibrato_delay -= vp->vibrato_control_ratio; if(vp->vibrato_delay > 0) return vp->sample_increment; } if (vp->vibrato_phase++ >= 2*VIBRATO_SAMPLE_INCREMENTS-1) vp->vibrato_phase=0; phase=vib_phase_to_inc_ptr(vp->vibrato_phase); if (vp->vibrato_sample_increment[phase]) { if (sign) return -vp->vibrato_sample_increment[phase]; else return vp->vibrato_sample_increment[phase]; } /* Need to compute this sample increment. */ depth = vp->vibrato_depth; if(depth < vp->modulation_wheel) depth = vp->modulation_wheel; depth <<= 7; if (vp->vibrato_sweep && !vp->modulation_wheel) { /* Need to update sweep */ vp->vibrato_sweep_position += vp->vibrato_sweep; if (vp->vibrato_sweep_position >= (1<vibrato_sweep=0; else { /* Adjust depth */ depth *= vp->vibrato_sweep_position; depth >>= SWEEP_SHIFT; } } #ifdef ENVELOPE_PITCH_MODULATION if (vp->modulation_increment && mod_amount > 0.0) { update_modulation(v, d); if (vp->modulation_volume) { freq = (int32)( (double)freq*(1.0 + (mod_amount - 1.0) * (double)(vp->modulation_volume>>22) / 255.0) ); } } #endif pb=(int)((sine(vp->vibrato_phase * (SINE_CYCLE_LENGTH/(2*VIBRATO_SAMPLE_INCREMENTS))) * (double)(depth) * VIBRATO_AMPLITUDE_TUNING)); a = FRSCALE(((double)(vp->sample->sample_rate) * (double)(freq)) / ((double)(vp->sample->root_freq) * (double)(play_mode->rate)), FRACTION_BITS); if(pb<0) { pb = -pb; a /= bend_fine[(pb>>5) & 0xFF] * bend_coarse[pb>>13]; } else a *= bend_fine[(pb>>5) & 0xFF] * bend_coarse[pb>>13]; a += 0.5; /* If the sweep's over, we can store the newly computed sample_increment */ if (!vp->vibrato_sweep || vp->modulation_wheel) vp->vibrato_sample_increment[phase]=(int32) a; if (sign) a = -a; /* need to preserve the loop direction */ return (int32) a; } static sample_t *rs_vib_plain(int v, uint32 *countptr, struct md *d) { /* Play sample until end, then free the voice. */ Voice *vp=&d->voice[v]; int32 v0, v1, v2, v3, temp, overshoot; int offset; FLOAT_T insamp, outsamp, a0, a1, a2, b0, b1, x0=vp->current_x0, x1=vp->current_x1, y0=vp->current_y0, y1=vp->current_y1; uint32 cc_count=vp->modulation_counter, bw_index=vp->bw_index, ofsdu; sample_t newsample; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; int32 incr=vp->sample_increment; /*WHY int32??*/ #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) uint32 ls=0, le=vp->sample->data_length; #endif /* LAGRANGE_INTERPOLATION */ uint32 ofs=vp->sample_offset, se=vp->sample->data_length, count=*countptr; uint32 cc=vp->vibrato_control_counter; /* This has never been tested */ if (incr<0) incr = -incr; /* In case we're coming out of a bidir loop */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; while (count--) { if (!cc--) { cc=vp->vibrato_control_ratio; incr=update_vibrato(v, vp, 0, d); } offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ vp->current_x0=x0; vp->current_x1=x1; vp->current_y0=y0; vp->current_y1=y1; vp->bw_index=bw_index; vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_vib_loop(int v, Voice *vp, uint32 *countptr, struct md *d) { /* Play sample until end-of-loop, skip back and continue. */ int32 v0, v1, v2, v3, temp, overshoot; int offset; FLOAT_T insamp, outsamp, a0, a1, a2, b0, b1, x0=vp->current_x0, x1=vp->current_x1, y0=vp->current_y0, y1=vp->current_y1; uint32 cc_count=vp->modulation_counter, bw_index=vp->bw_index, ofsdu; sample_t newsample; int32 incr=vp->sample_increment; /*WHY int32??*/ uint32 #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) ls=vp->loop_start, #endif /* LAGRANGE_INTERPOLATION */ le=vp->loop_end, ll=le - vp->loop_start; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 ofs=vp->sample_offset, se=vp->sample->data_length, count = *countptr; uint32 cc=vp->vibrato_control_counter; int flag_exit_loop; flag_exit_loop = (vp->status & (VOICE_FREE | VOICE_DIE)) || ((vp->status & VOICE_OFF) && (vp->sample->modes & MODES_FAST_RELEASE) ) || ((vp->status & VOICE_OFF) && d->dont_keep_looping ) ; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; while (count--) { if (!cc--) { cc=vp->vibrato_control_ratio; incr=update_vibrato(v, vp, 0, d); } offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; if (ofs>=le) { if (flag_exit_loop) { vp->echo_delay -= ll >> FRACTION_BITS; if (vp->echo_delay >= 0) ofs -= ll; } else ofs -= ll; /* Hopefully the loop is longer than an increment. */ } if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ vp->current_x0=x0; vp->current_x1=x1; vp->current_y0=y0; vp->current_y1=y1; vp->bw_index=bw_index; vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_vib_bidir(int v, Voice *vp, uint32 count, struct md *d) { int32 v0, v1, v2, v3, temp, overshoot; int offset; FLOAT_T insamp, outsamp, a0, a1, a2, b0, b1, x0=vp->current_x0, x1=vp->current_x1, y0=vp->current_y0, y1=vp->current_y1; uint32 cc_count=vp->modulation_counter, bw_index=vp->bw_index, ofsdu; sample_t newsample; int32 incr=vp->sample_increment; /*WHY int32??*/ uint32 le=vp->loop_end, ls=vp->loop_start; uint32 ofs=vp->sample_offset, se=vp->sample->data_length; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 cc=vp->vibrato_control_counter; #ifdef USE_BIDIR_OVERSHOOT uint32 le2=le<<1, ls2=ls<<1; #endif uint32 i, j; int vibflag = 0; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; /* Play normally until inside the loop region */ while (count && (ofs <= ls)) { i = (ls - ofs) / incr + 1; if (i > count) i = count; if (i > cc) { i = cc; vibflag = 1; } else cc -= i; count -= i; for(j = 0; j < i; j++) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; } if (vibflag) { cc = vp->vibrato_control_ratio; incr = update_vibrato(v, vp, 0, d); vibflag = 0; } } /* Then do the bidirectional looping */ while (count) { /* Precalc how many times we should go through the loop */ #if 1 i = ((incr > 0 ? le : ls) - ofs) / incr + 1; #else /* fix from M. Izumo */ i = ((incr > 0 ? le : ls) - ofs + incr - 1) / incr; #endif if(i > count) i = count; if(i > cc) { i = cc; vibflag = 1; } else cc -= i; count -= i; while (i-- && ofs < se) { offset = ofs >> FRACTION_BITS; if (ofs >= se) { int32 delta = (ofs - se)>>FRACTION_BITS; v1 = (int32)src[(int)(se>>FRACTION_BITS)-1]; v1 -= (delta+1) * v1 / overshoot; }else v1 = (int32)src[offset]; if (ofs + (1L<= se) { v2 = v1; }else v2 = (int32)src[offset+1]; if(d->dont_cspline || ((ofs-(1L<le)){ #if 0 /* FIXME */ if (!cc_count--) { cc_count = control_ratio - 1; if (calc_bw_index(v, d)) { bw_index = vp->bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (sample_t)(v1 + ((int32)((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp); } }else{ ofsdu=ofs; v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofs &= FRACTION_MASK; temp=v2; v2 = (6*v2 + ((((((5*v3 - 11*v2 + 7*v1 - v0)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; ofs = (1L << FRACTION_BITS) - ofs; v1 = (6*v1 + ((((((5*v0 - 11*v1 + 7*temp - v3)* ofs)>>FRACTION_BITS)*ofs)>>(FRACTION_BITS+2))-1))*ofs; v1 = (v1 + v2)/(6L<bw_index; a0 = butterworth[bw_index][0]; a1 = butterworth[bw_index][1]; a2 = butterworth[bw_index][2]; b0 = butterworth[bw_index][3]; b1 = butterworth[bw_index][4]; } incr = calc_mod_freq(v, incr, d); } #endif if (dont_filter_melodic) bw_index = 0; newsample = (v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)v1); if (bw_index) { insamp = (FLOAT_T)newsample; outsamp = a0 * insamp + a1 * x0 + a2 * x1 - b0 * y0 - b1 * y1; x1 = x0; x0 = insamp; y1 = y0; y0 = outsamp; newsample = (sample_t)( (outsamp > MAX_DATAVAL)? MAX_DATAVAL: ((outsamp < MIN_DATAVAL)? MIN_DATAVAL: (sample_t)outsamp) ); } ofs=ofsdu; } *dest++ = newsample; ofs += incr; } if (vibflag) { cc = vp->vibrato_control_ratio; incr = update_vibrato(v, vp, (incr < 0), d); vibflag = 0; } if (ofs >= le) { #ifdef USE_BIDIR_OVERSHOOT /* fold the overshoot back in */ ofs = le2 - ofs; #endif incr *= -1; } else if (ofs <= ls) { #ifdef USE_BIDIR_OVERSHOOT ofs = ls2 - ofs; #endif incr *= -1; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ vp->current_x0=x0; vp->current_x1=x1; vp->current_y0=y0; vp->current_y1=y1; vp->bw_index=bw_index; vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static int rs_update_porta(int v, struct md *d) { Voice *vp=&d->voice[v]; int32 db; db = vp->porta_dpb; if(vp->porta_pb < 0) { if(db > -vp->porta_pb) db = -vp->porta_pb; } else { if(db > vp->porta_pb) db = -vp->porta_pb; else db = -db; } vp->porta_pb += db; if(vp->porta_pb == 0) { vp->porta_control_ratio = 0; vp->porta_pb = 0; } recompute_freq(v, d); return vp->porta_control_ratio; } static sample_t *porta_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp=&d->voice[v]; uint32 n = *countptr; uint32 i; sample_t *(* resampler)(int, uint32 *, int, struct md *); int cc = vp->porta_control_counter; int loop; if(vp->vibrato_control_ratio) resampler = vib_resample_voice; else resampler = normal_resample_voice; if(mode != 1) loop = 1; else loop = 0; /* vp->cache = NULL; */ d->resample_buffer_offset = 0; while(d->resample_buffer_offset < n) { if(cc == 0) { if((cc = rs_update_porta(v, d)) == 0) { i = n - d->resample_buffer_offset; resampler(v, &i, mode, d); d->resample_buffer_offset += i; break; } } i = n - d->resample_buffer_offset; if(i > (uint32)cc) i = (uint32)cc; resampler(v, &i, mode, d); d->resample_buffer_offset += i; /* if(!loop && vp->status == VOICE_FREE) */ if(vp->status == VOICE_FREE) break; cc -= (int)i; } *countptr = d->resample_buffer_offset; d->resample_buffer_offset = 0; vp->porta_control_counter = cc; return d->resample_buffer; } static sample_t *vib_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp = &d->voice[v]; /* vp->cache = NULL; */ if(mode == 0) return rs_vib_loop(v, vp, countptr, d); if(mode == 1) return rs_vib_plain(v, countptr, d); return rs_vib_bidir(v, vp, *countptr, d); } static sample_t *normal_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp = &d->voice[v]; if(mode == 0) return rs_loop(v, vp, countptr, d); if(mode == 1) return rs_plain(v, countptr, d); return rs_bidir(v, vp, *countptr, d); } sample_t *resample_voice_filter(int v, uint32 *countptr, struct md *d) { Voice *vp=&d->voice[v]; int mode; mode = vp->sample->modes; if((mode & MODES_LOOPING) && ((mode & MODES_ENVELOPE) || (vp->status & (VOICE_ON | VOICE_SUSTAINED)))) { if(mode & MODES_PINGPONG) { /* vp->cache = NULL; */ mode = 2; } else mode = 0; } else mode = 1; if(vp->porta_control_ratio) return porta_resample_voice(v, countptr, mode, d); if(vp->vibrato_control_ratio) return vib_resample_voice(v, countptr, mode, d); return normal_resample_voice(v, countptr, mode, d); } alsaplayer-0.99.82/attic/midi/resample_l.c000066400000000000000000000726761466261456500204160ustar00rootroot00000000000000/* $Id$ TiMidity++ -- MIDI to WAVE converter and player Copyright (C) 1999 Masanao Izumo Copyright (C) 1995 Tuukka Toivonen * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include #include #ifdef __FreeBSD__ #include #else #include #endif #include "gtim.h" #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" #include "controls.h" #include "tables.h" #include "resample.h" #define LINEAR_INTERPOLATION #define LAGRANGE_INTERPOLATION #define ENVELOPE_PITCH_MODULATION #ifdef LOOKUP_HACK #define MAX_DATAVAL 127 #define MIN_DATAVAL -128 #else #define MAX_DATAVAL 32767 #define MIN_DATAVAL -32768 #endif #define OVERSHOOT_STEP 50 #define WAVE_ONE (1L<>FRACTION_BITS) #define WAVE(a) ((a)<voice[v].modLfoToFilterFc; if (d->voice[v].lfo_sweep) { /* Update sweep position */ d->voice[v].lfo_sweep_position += d->voice[v].lfo_sweep; if (d->voice[v].lfo_sweep_position>=(1<voice[v].lfo_sweep=0; /* Swept to max amplitude */ else { /* Need to adjust depth */ depth *= (FLOAT_T)d->voice[v].lfo_sweep_position / (FLOAT_T)(1<voice[v].lfo_phase += d->voice[v].lfo_phase_increment; d->voice[v].lfo_volume = depth; } #endif #ifdef FILTER_INTERPOLATION static int calc_bw_index(int v, struct md *d) { FLOAT_T mod_amount=d->voice[v].modEnvToFilterFc; int32 freq = d->voice[v].sample->cutoff_freq; int ix; if (d->voice[v].lfo_phase_increment) update_lfo(v, d); if (!d->voice[v].lfo_phase_increment && update_modulation_signal(v, d)) return 0; /* printf("mod_amount %f ", mod_amount); */ if (d->voice[v].lfo_volume>0.001) { if (mod_amount) mod_amount *= d->voice[v].lfo_volume; else mod_amount = d->voice[v].lfo_volume; /* printf("lfo %f -> mod %f ", d->voice[v].lfo_volume, mod_amount); */ } if (mod_amount > 0.001) { if (d->voice[v].modulation_volume) freq = (int32)( (double)freq*(1.0 + (mod_amount - 1.0) * (d->voice[v].modulation_volume>>22) / 255.0) ); else freq = (int32)( (double)freq*mod_amount ); /* printf("v%d freq %d (was %d), modvol %d, mod_amount %f\n", v, (int)freq, (int)d->voice[v].sample->cutoff_freq, (int)d->voice[v].modulation_volume>>22, mod_amount); */ ix = 1 + (freq+50) / 100; if (ix > 100) ix = 100; d->voice[v].bw_index = ix; return 1; } d->voice[v].bw_index = 1 + (freq+50) / 100; return 0; } #endif /*************** resampling with fixed increment *****************/ static sample_t *rs_plain(int v, uint32 *countptr, struct md *d) { /* Play sample until end, then free the voice. */ Voice *vp=&d->voice[v]; int32 ofsd, v0, v1, v2, v3, overshoot; int offset; uint32 cc_count=vp->modulation_counter; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; int32 incr=vp->sample_increment; uint32 ofs=vp->sample_offset; #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) uint32 ls=0, le=vp->sample->data_length; #endif /* LAGRANGE_INTERPOLATION */ uint32 se=vp->sample->data_length; uint32 count=*countptr; if (!incr) return d->resample_buffer+d->resample_buffer_offset; /* --gl */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } if (!cc_count--) { cc_count = control_ratio - 1; incr = update_modulation_signal(v, incr, d); } ofs += incr; if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->sample_offset=ofs; /* Update offset */ vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_loop(int v, Voice *vp, uint32 *countptr, struct md *d) { /* Play sample until end-of-loop, skip back and continue. */ int32 ofsd, v0, v1, v2, v3, overshoot; int offset; uint32 cc_count=vp->modulation_counter; int32 incr=vp->sample_increment; uint32 ofs=vp->sample_offset; uint32 le=vp->loop_end, #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) ls=vp->loop_start, #endif /* LAGRANGE_INTERPOLATION */ ll=le - vp->loop_start; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 se=vp->sample->data_length, count = *countptr; int flag_exit_loop; flag_exit_loop = (vp->status & (VOICE_FREE | VOICE_DIE)) || ((vp->status & VOICE_OFF) && (vp->sample->modes & MODES_FAST_RELEASE) ) || ((vp->status & VOICE_OFF) && d->dont_keep_looping ) ; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } if (!cc_count--) { cc_count = control_ratio - 1; incr = update_modulation_signal(v, incr, d); } ofs += incr; if (ofs>=le) { if (flag_exit_loop) { vp->echo_delay -= ll >> FRACTION_BITS; if (vp->echo_delay >= 0) ofs -= ll; } else ofs -= ll; /* Hopefully the loop is longer than an increment. */ } if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->sample_offset=ofs; /* Update offset */ vp->modulation_counter=cc_count; return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_bidir(int v, Voice *vp, uint32 count, struct md *d) { int32 ofsd, v0, v1, v2, v3, overshoot; int offset; int32 incr=vp->sample_increment; uint32 le=vp->loop_end, ls=vp->loop_start; uint32 ofs=vp->sample_offset, se=vp->sample->data_length; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; #ifdef USE_BIDIR_OVERSHOOT int32 le2 = le<<1, ls2 = ls<<1; #endif uint32 i, j; /* Play normally until inside the loop region */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; if (ofs <= ls) { /* NOTE: Assumes that incr > 0, which is NOT always the case when doing bidirectional looping. I have yet to see a case where both ofs <= ls AND incr < 0, however. */ if (incr < 0) i = ls - ofs; else i = (ls - ofs) / incr + 1; if (i > count) { i = count; count = 0; } else count -= i; for(j = 0; j < i; j++) { offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } ofs += incr; } } /* Then do the bidirectional looping */ while(count) { /* Precalc how many times we should go through the loop */ #if 1 i = ((incr > 0 ? le : ls) - ofs) / incr + 1; #else /* fix from M. Izumo */ i = ((incr > 0 ? le : ls) - ofs + incr - 1) / incr; #endif if (i > count) { i = count; count = 0; } else count -= i; for(j = 0; j < i && ofs < se; j++) { offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } ofs += incr; } #ifdef USE_BIDIR_OVERSHOOT if (ofs>=le) { /* fold the overshoot back in */ ofs = le2 - ofs; incr *= -1; } else if (ofs <= ls) { ofs = ls2 - ofs; incr *= -1; } #else incr *= -1; #endif } vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } /*********************** vibrato versions ***************************/ /* We only need to compute one half of the vibrato sine cycle */ static uint32 vib_phase_to_inc_ptr(uint32 phase) { if (phase < VIBRATO_SAMPLE_INCREMENTS/2) return VIBRATO_SAMPLE_INCREMENTS/2-1-phase; else if (phase >= 3*VIBRATO_SAMPLE_INCREMENTS/2) return 5*VIBRATO_SAMPLE_INCREMENTS/2-1-phase; else return phase-VIBRATO_SAMPLE_INCREMENTS/2; } static int32 update_vibrato(int v, Voice *vp, int sign, struct md *d) { uint32 depth, freq=vp->frequency; #ifdef ENVELOPE_PITCH_MODULATION FLOAT_T mod_amount=vp->sample->modEnvToPitch; #endif uint32 phase; int pb; double a; if(vp->vibrato_delay > 0) { vp->vibrato_delay -= vp->vibrato_control_ratio; if(vp->vibrato_delay > 0) return vp->sample_increment; } if (vp->vibrato_phase++ >= 2*VIBRATO_SAMPLE_INCREMENTS-1) vp->vibrato_phase=0; phase=vib_phase_to_inc_ptr(vp->vibrato_phase); if (vp->vibrato_sample_increment[phase]) { if (sign) return -vp->vibrato_sample_increment[phase]; else return vp->vibrato_sample_increment[phase]; } /* Need to compute this sample increment. */ depth = vp->vibrato_depth; if(depth < vp->modulation_wheel) depth = vp->modulation_wheel; depth <<= 7; if (vp->vibrato_sweep && !vp->modulation_wheel) { /* Need to update sweep */ vp->vibrato_sweep_position += vp->vibrato_sweep; if (vp->vibrato_sweep_position >= (1<vibrato_sweep=0; else { /* Adjust depth */ depth *= vp->vibrato_sweep_position; depth >>= SWEEP_SHIFT; } } #ifdef ENVELOPE_PITCH_MODULATION if (vp->modulation_increment && mod_amount > 0.0) { update_modulation(v, d); if (vp->modulation_volume) { freq = (int32)( (double)freq*(1.0 + (mod_amount - 1.0) * (double)(vp->modulation_volume>>22) / 255.0) ); } } #endif pb=(int)((sine(vp->vibrato_phase * (SINE_CYCLE_LENGTH/(2*VIBRATO_SAMPLE_INCREMENTS))) * (double)(depth) * VIBRATO_AMPLITUDE_TUNING)); a = FRSCALE(((double)(vp->sample->sample_rate) * (double)(freq)) / ((double)(vp->sample->root_freq) * (double)(play_mode->rate)), FRACTION_BITS); if(pb<0) { pb = -pb; a /= bend_fine[(pb>>5) & 0xFF] * bend_coarse[pb>>13]; } else a *= bend_fine[(pb>>5) & 0xFF] * bend_coarse[pb>>13]; a += 0.5; /* If the sweep's over, we can store the newly computed sample_increment */ if (!vp->vibrato_sweep || vp->modulation_wheel) vp->vibrato_sample_increment[phase]=(int32) a; if (sign) a = -a; /* need to preserve the loop direction */ return (int32) a; } static sample_t *rs_vib_plain(int v, uint32 *countptr, struct md *d) { /* Play sample until end, then free the voice. */ Voice *vp=&d->voice[v]; int32 ofsd, v0, v1, v2, v3, overshoot; int offset; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; int32 incr=vp->sample_increment; /*WHY int32??*/ #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) uint32 ls=0, le=vp->sample->data_length; #endif /* LAGRANGE_INTERPOLATION */ uint32 ofs=vp->sample_offset, se=vp->sample->data_length, count=*countptr; uint32 cc=vp->vibrato_control_counter; /* This has never been tested */ if (incr<0) incr = -incr; /* In case we're coming out of a bidir loop */ overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { if (!cc--) { cc=vp->vibrato_control_ratio; incr=update_vibrato(v, vp, 0, d); } offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } ofs += incr; if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_vib_loop(int v, Voice *vp, uint32 *countptr, struct md *d) { /* Play sample until end-of-loop, skip back and continue. */ int32 ofsd, v0, v1, v2, v3, overshoot; int offset; int32 incr=vp->sample_increment; /*WHY int32??*/ uint32 #if defined(LAGRANGE_INTERPOLATION) || defined(CSPLINE_INTERPOLATION) ls=vp->loop_start, #endif /* LAGRANGE_INTERPOLATION */ le=vp->loop_end, ll=le - vp->loop_start; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 ofs=vp->sample_offset, se=vp->sample->data_length, count = *countptr; uint32 cc=vp->vibrato_control_counter; int flag_exit_loop; flag_exit_loop = (vp->status & (VOICE_FREE | VOICE_DIE)) || ((vp->status & VOICE_OFF) && (vp->sample->modes & MODES_FAST_RELEASE) ) || ((vp->status & VOICE_OFF) && d->dont_keep_looping ) ; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; while (count--) { if (!cc--) { cc=vp->vibrato_control_ratio; incr=update_vibrato(v, vp, 0, d); } offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } ofs += incr; if (ofs>=le) { if (flag_exit_loop) { vp->echo_delay -= ll >> FRACTION_BITS; if (vp->echo_delay >= 0) ofs -= ll; } else ofs -= ll; /* Hopefully the loop is longer than an increment. */ } if (ofs >= se + (overshoot << FRACTION_BITS)) { if (!(vp->status&VOICE_FREE)) { vp->status=VOICE_FREE; ctl->note(v); } *countptr-=count+1; break; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } static sample_t *rs_vib_bidir(int v, Voice *vp, uint32 count, struct md *d) { int32 ofsd, v0, v1, v2, v3, overshoot; int offset; int32 incr=vp->sample_increment; /*WHY int32??*/ uint32 le=vp->loop_end, ls=vp->loop_start; uint32 ofs=vp->sample_offset, se=vp->sample->data_length; sample_t *dest=d->resample_buffer+d->resample_buffer_offset, *src=vp->sample->data; uint32 cc=vp->vibrato_control_counter; #ifdef USE_BIDIR_OVERSHOOT uint32 le2=le<<1, ls2=ls<<1; #endif uint32 i, j; int vibflag = 0; overshoot = src[(se>>FRACTION_BITS)-1] / OVERSHOOT_STEP; if (overshoot < 0) overshoot = -overshoot; /* Play normally until inside the loop region */ while (count && (ofs <= ls)) { i = (ls - ofs) / incr + 1; if (i > count) i = count; if (i > cc) { i = cc; vibflag = 1; } else cc -= i; count -= i; for(j = 0; j < i; j++) { offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } ofs += incr; } if (vibflag) { cc = vp->vibrato_control_ratio; incr = update_vibrato(v, vp, 0, d); vibflag = 0; } } /* Then do the bidirectional looping */ while (count) { /* Precalc how many times we should go through the loop */ #if 1 i = ((incr > 0 ? le : ls) - ofs) / incr + 1; #else /* fix from M. Izumo */ i = ((incr > 0 ? le : ls) - ofs + incr - 1) / incr; #endif if(i > count) i = count; if(i > cc) { i = cc; vibflag = 1; } else cc -= i; count -= i; while (i-- && ofs < se) { offset = SAMP(ofs); if (ofs >= se) { int32 delta = SAMP(ofs - se); v1 = (int32)src[(int)SAMP(se)-1]; v1 -= (delta+1) * v1 / overshoot; } else v1 = (int32)src[offset]; if (ofs + WAVE_ONE >= se) { v2 = v1; } else v2 = (int32)src[offset+1]; if ( d->dont_cspline || ((ofs - WAVE_ONE) < ls) || ((ofs + WAVE_TWO) > le) ) { *dest++ = (sample_t)( v1 + ( (int32)( (v2-v1) * (ofs & FRACTION_MASK) ) >> FRACTION_BITS ) ); } else { v0 = (int32)src[offset-1]; v3 = (int32)src[offset+2]; ofsd = (int32)(ofs & FRACTION_MASK) + WAVE_ONE; v1 = v1 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v2 = v2 * SAMP(ofsd); v3 = v3 * SAMP(ofsd); ofsd -= WAVE_ONE; v0 = v0 * SAMP(ofsd); v1 = v1 * SAMP(ofsd); v3 = v3 * ofsd; ofsd -= WAVE_ONE; v0 = (v3 - v0 * ofsd) / WAVE_SIX; v1 = (v1 - v2) * ofsd>>(FRACTION_BITS+1); v1 += v0; *dest++ = (sample_t)((v1 > MAX_DATAVAL)? MAX_DATAVAL: ((v1 < MIN_DATAVAL)? MIN_DATAVAL: v1)); } ofs += incr; } if (vibflag) { cc = vp->vibrato_control_ratio; incr = update_vibrato(v, vp, (incr < 0), d); vibflag = 0; } if (ofs >= le) { #ifdef USE_BIDIR_OVERSHOOT /* fold the overshoot back in */ ofs = le2 - ofs; #endif incr *= -1; } else if (ofs <= ls) { #ifdef USE_BIDIR_OVERSHOOT ofs = ls2 - ofs; #endif incr *= -1; } } vp->vibrato_control_counter=cc; vp->sample_increment=incr; vp->sample_offset=ofs; /* Update offset */ return d->resample_buffer+d->resample_buffer_offset; } static int rs_update_porta(int v, struct md *d) { Voice *vp=&d->voice[v]; int32 db; db = vp->porta_dpb; if(vp->porta_pb < 0) { if(db > -vp->porta_pb) db = -vp->porta_pb; } else { if(db > vp->porta_pb) db = -vp->porta_pb; else db = -db; } vp->porta_pb += db; if(vp->porta_pb == 0) { vp->porta_control_ratio = 0; vp->porta_pb = 0; } recompute_freq(v, d); return vp->porta_control_ratio; } static sample_t *porta_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp=&d->voice[v]; uint32 n = *countptr; uint32 i; sample_t *(* resampler)(int, uint32 *, int, struct md *); int cc = vp->porta_control_counter; int loop; if(vp->vibrato_control_ratio) resampler = vib_resample_voice; else resampler = normal_resample_voice; if(mode != 1) loop = 1; else loop = 0; /* vp->cache = NULL; */ d->resample_buffer_offset = 0; while(d->resample_buffer_offset < n) { if(cc == 0) { if((cc = rs_update_porta(v, d)) == 0) { i = n - d->resample_buffer_offset; resampler(v, &i, mode, d); d->resample_buffer_offset += i; break; } } i = n - d->resample_buffer_offset; if(i > (uint32)cc) i = (uint32)cc; resampler(v, &i, mode, d); d->resample_buffer_offset += i; /* if(!loop && vp->status == VOICE_FREE) */ if(vp->status == VOICE_FREE) break; cc -= (int)i; } *countptr = d->resample_buffer_offset; d->resample_buffer_offset = 0; vp->porta_control_counter = cc; return d->resample_buffer; } static sample_t *vib_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp = &d->voice[v]; /* vp->cache = NULL; */ if(mode == 0) return rs_vib_loop(v, vp, countptr, d); if(mode == 1) return rs_vib_plain(v, countptr, d); return rs_vib_bidir(v, vp, *countptr, d); } static sample_t *normal_resample_voice(int v, uint32 *countptr, int mode, struct md *d) { Voice *vp = &d->voice[v]; if(mode == 0) return rs_loop(v, vp, countptr, d); if(mode == 1) return rs_plain(v, countptr, d); return rs_bidir(v, vp, *countptr, d); } sample_t *resample_voice_lagrange(int v, uint32 *countptr, struct md *d) { Voice *vp=&d->voice[v]; int mode; mode = vp->sample->modes; if((mode & MODES_LOOPING) && ((mode & MODES_ENVELOPE) || (vp->status & (VOICE_ON | VOICE_SUSTAINED)))) { if(mode & MODES_PINGPONG) { /* vp->cache = NULL; */ mode = 2; } else mode = 0; } else mode = 1; if(vp->porta_control_ratio) return porta_resample_voice(v, countptr, mode, d); if(vp->vibrato_control_ratio) return vib_resample_voice(v, countptr, mode, d); return normal_resample_voice(v, countptr, mode, d); } alsaplayer-0.99.82/attic/midi/reverb_e.c000066400000000000000000000250221466261456500200430ustar00rootroot00000000000000/* * reverb_e.c * experimental channel effects processing * provided under GNU General Public License * contents : reverb ( controller 91 ) effect processing * Nicolas Witczak juillet 1998 * witczak@geocities.com * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include "gtim.h" #ifdef CHANNEL_EFFECT #ifndef NO_STRING_H #include #else #include #endif #include #ifndef __WIN32__ #include #endif #include #include "common.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "output.h" /**************************************************************************/ /** reverb_effect structure definition * formula : * * early reflections * * left * yel(n) = G1 * xl( n - d1 ) + G2 * xr( n - d2 ) + G3 * xl( n - d3 ) * * right * yer(n) = G1 * xr( n - d1 ) + G2 * xl( n - d2 ) + G3 * xr( n - d3 ) * * ambient reverb with embedded filter * left * yal = xl( n ) + G4 * xl( n - d4 ) + G5 * xl( n - d5 ) + G6 * xl( n - d6 ) + G7 * ( yal( n - d7 ) - m ) * * right * yar = xr( n ) + G4 * xl( n - d4 ) + G6 * xr( n - d6 ) + G7 * ( yal( n - d7 ) - m ) * * m : average : used for hight pass filter * * outup signal * s(n) = x(n) + Ge * ye(n) + Ga * ya(n) */ /* >> choice of the day >> */ /** G_BIT and G : denominator size */ #define G_BITS 10 #define G ((int32)( 1 << G_BITS )) /** max die reverb time in ms */ #define DIE_TIME 2300 /** delays in ms */ #define D1 15 #define D2 30 #define D3 54 #define D4 70 #define D5 154 #define D6 250 #define D7 220 /** gains*/ #define G1 0.78 #define G2 (-0.79) #define G3 0.4 #define G4 0.87 #define G5 0.67 #define G6 0.48 #define G7 0.7 /** gain variation between left and right channels in stereo mode */ #define DG 0.05 /** relative min gain for echos */ #define G_MIN 0.1 /** for early and ambient echo gain tuning */ #define GE_MAX 0.31 #define GA_MAX 0.056 /** averaging hight filter cutoff frequency in Hz */ #define FILTER_FREQU 300 /** averaging hight filter impulsionnal response size in samples*/ static int delay_flt = 0 ; /** time param normalized to sampling rate*/ static int32 d1 , d2 , d3 , d4 , d5 , d6 , d7; static uint32 dieTime; /** gain param normalized to G */ static int32 g1 = (int32)(G * G1); static int32 g2 = (int32)(G * G2); static int32 g3 = (int32)(G * G3); static int32 g4 = (int32)(G * G4); static int32 g5 = (int32)(G * G5); static int32 g6 = (int32)(G * G6); static int32 g7 = (int32)(G * G7); static int32 gm ; typedef struct { /*---------------------------------------------------*/ /* Effect base implementation */ void *m_pfnActionMono ; void *m_pfnActionStereo ; void *m_pfnCtrlChange ; void *m_pfnCtrlReset ; void *m_pfnName ; void *m_pfnDestruct ; /*---------------------------------------------------*/ /* additionnal parameters */ /** m_uiNullCount : number of last null samples or 0 */ uint32 m_uiNullCount ; /** l/rX/Y past samples circular buffer for x and ya left(or mono) and right */ cirbuff leftX , leftYa , rightX , rightYa ; /** gain param normalized to G : if ge == 0 inactivated */ int32 ge , ga; /** average value of last 128 x samples */ int32 m_left , m_right ; } reverb_effect ; /**************************************************************************/ /** reverb_effect function overriding */ static void ActionMono( reverb_effect* pThis , int32* pMonoBuffer, int32 count , int* pbSignal ) { if( pThis->ge == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pMonoBuffer; int32* pEnd = pMonoBuffer + count ; int x ,ye, ya ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G ; ye = ( ( (pThis->leftX.m_pCur)[d1] * g1 ) + ( (pThis->leftX.m_pCur)[d2] * g2 ) + ( (pThis->leftX.m_pCur)[d3] * g3 ) ) / G ; ya = ( ( (pThis->leftX.m_pCur)[d4] * g4 ) + ( (pThis->leftX.m_pCur)[d5] * g5 ) + ( (pThis->leftX.m_pCur)[d6] * g6 ) + ( (pThis->leftYa.m_pCur)[d7] * g7 ) - ( pThis->m_left * gm ) ) / G ; *pCur = x * G + ( ye * pThis->ge ) + ( ya * pThis->ga ) ; pThis->m_left += (pThis->leftYa.m_pCur)[ d7 ] ; pThis->m_left -= (pThis->leftYa.m_pCur)[ d7 - delay_flt ] ; pushval_cirbuff( &(pThis->leftX) , x ) ; pushval_cirbuff( &(pThis->leftYa) , ya ) ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->leftYa ) , pThis->m_uiNullCount ) ; pThis->m_left = 0 ; } } static void ActionStereo( reverb_effect* pThis , int32* pStereoBuffer , int32 count , int* pbSignal ) { /* int32 test = G ; */ if( pThis->ge == 0 ) return ; if( *pbSignal ) pThis->m_uiNullCount = 0 ; else pThis->m_uiNullCount += count ; if( pThis->m_uiNullCount < dieTime ) { int32* pCur = pStereoBuffer; int32* pEnd = pStereoBuffer + 2 * count ; int x , ye , ya ; for( ; pCur != pEnd ; ++ pCur ) { x = *pCur / G ; ye = ( ( (pThis->leftX.m_pCur)[d1] * g1 ) + ( (pThis->rightX.m_pCur)[d2] * g2 ) + ( (pThis->leftX.m_pCur)[d3] * g3 ) ) / G ; ya = ( ( (pThis->leftX.m_pCur)[d4] * g4 ) + ( (pThis->leftX.m_pCur)[d5] * g5 ) + ( (pThis->leftX.m_pCur)[d6] * g6 ) + ( (pThis->leftYa.m_pCur)[d7] * g7 ) - ( pThis->m_left * gm ) ) / G ; *pCur = x * G + ( ye * pThis->ge ) + ( ya * pThis->ga ) ; pThis->m_left += (pThis->leftYa.m_pCur)[ d7 ] ; pThis->m_left -= (pThis->leftYa.m_pCur)[ d7 - delay_flt ] ; pushval_cirbuff( &(pThis->leftX) , x ) ; pushval_cirbuff( &(pThis->leftYa) , ya ) ; ++pCur ; x = *pCur / G ; ye = ( ( (pThis->rightX.m_pCur)[d1] * g1 ) + ( (pThis->leftX.m_pCur)[d2] * g2 ) + ( (pThis->rightX.m_pCur)[d3] * g3 ) ) / G ; ya = ( ( (pThis->rightX.m_pCur)[d4] * g4 ) + ( (pThis->rightX.m_pCur)[d5] * g5 ) + ( (pThis->rightX.m_pCur)[d6] * g6 ) + ( (pThis->rightYa.m_pCur)[d7] * g7 ) - ( pThis->m_right * gm ) ) / G ; *pCur = x * G + ( ye * pThis->ge ) + ( ya * pThis->ga ) ; pThis->m_right += (pThis->rightYa.m_pCur)[ d7 ] ; pThis->m_right -= (pThis->rightYa.m_pCur)[ d7 - delay_flt ] ; pushval_cirbuff( &(pThis->rightX) , x ) ; pushval_cirbuff( &(pThis->rightYa) , ya ) ; } *pbSignal = 1 ; } else { shift_cirbuff( &( pThis->leftX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->leftYa ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->rightX ) , pThis->m_uiNullCount ) ; shift_cirbuff( &( pThis->rightYa ) , pThis->m_uiNullCount ) ; pThis->m_left = 0 ; pThis->m_right = 0 ; } } static void CtrlReset( reverb_effect* pThis ) { if (!opt_effect_reverb) return; pThis->m_uiNullCount = 0 ; redim_cirbuff( &( pThis->leftX ) , 0 ) ; redim_cirbuff( &( pThis->leftYa ) , 0 ) ; redim_cirbuff( &( pThis->rightX ) , 0 ) ; redim_cirbuff( &( pThis->rightYa ) , 0 ) ; d1 = 1 - ( ( D1 * play_mode->rate ) / 1000 ) ; d2 = 1 - ( ( D2 * play_mode->rate ) / 1000 ) ; d3 = 1 - ( ( D3 * play_mode->rate ) / 1000 ) ; d4 = 1 - ( ( D4 * play_mode->rate ) / 1000 ) ; d5 = 1 - ( ( D5 * play_mode->rate ) / 1000 ) ; d6 = 1 - ( ( D6 * play_mode->rate ) / 1000 ) ; d7 = 1 - ( ( D7 * play_mode->rate ) / 1000 ) ; dieTime = ( DIE_TIME * play_mode->rate ) / 1000 ; delay_flt = play_mode->rate / FILTER_FREQU ; gm = g7 / delay_flt ; pThis->ge = 0 ; pThis->ga = 0 ; pThis->m_left = 0 ; pThis->m_right = 0 ; } static void CtrlChange( reverb_effect* pThis , MidiEvent* pCurrentEvent ) { int amount = pCurrentEvent->a; if (!opt_effect_reverb) return; if (amount < global_reverb) amount = global_reverb; if (!opt_effect_reverb) return; if( pCurrentEvent->type == ME_REVERBERATION ) { if( amount != 0 ) { if ( 1-d6 < 0 ) fprintf(stderr,"Check reverb_e.c!\n"); redim_cirbuff( &( pThis->leftX ) , (uint32)(1 - d6) ) ; if ( 1+delay_flt-d6 < 0 ) fprintf(stderr,"Check reverb_e.c!\n"); redim_cirbuff( &( pThis->leftYa ) , (uint32)(1 + delay_flt - d6) ) ; if( ! ( play_mode->encoding & PE_MONO ) ) { if ( 1-d6 < 0 ) fprintf(stderr,"Check reverb_e.c!\n"); redim_cirbuff( &( pThis->rightX ) , (uint32)(1 - d6) ) ; if ( 1+delay_flt-d6 < 0 ) fprintf(stderr,"Check reverb_e.c!\n"); redim_cirbuff( &( pThis->rightYa) , (uint32)(1 + delay_flt - d6) ) ; } pThis->ge = (int32)( G * ( ( GE_MAX * G_MIN ) + ( GE_MAX * ( 1.0 - G_MIN ) / 126.0 ) * ( amount - 1 ) ) ); pThis->ga = (int32)( G * ( ( GA_MAX * G_MIN ) + ( GA_MAX * ( 1.0 - G_MIN ) / 126.0 ) * ( amount - 1 ) ) ); } else CtrlReset( pThis ) ; } } static void Name( char* pszBuff ) { strcpy( pszBuff , "reverb" ); } static void Destruct( reverb_effect* pThis ) { if (!opt_effect_reverb) return; delete_cirbuff( &( pThis->leftX ) ) ; delete_cirbuff( &( pThis->leftYa ) ) ; delete_cirbuff( &( pThis->rightX ) ) ; delete_cirbuff( &( pThis->rightYa ) ) ; memset( pThis , 0 , sizeof( reverb_effect ) ) ; free( pThis ) ; } /**************************************************************************/ /** reverb_effect construction function prototype */ Effect* ReverbCtor() { reverb_effect* pReturn = 0 ; if (!opt_effect_reverb) return ( Effect* )pReturn ; pReturn =(reverb_effect*) malloc( sizeof( reverb_effect ) ) ; memset( pReturn , 0 , sizeof( reverb_effect ) ) ; pReturn->m_pfnActionMono = (void*)&ActionMono ; pReturn->m_pfnActionStereo = (void*)&ActionStereo ; pReturn->m_pfnCtrlChange = (void*)&CtrlChange ; pReturn->m_pfnCtrlReset = (void*)&CtrlReset ; pReturn->m_pfnName = (void*)&Name ; pReturn->m_pfnDestruct = (void*)&Destruct ; create_cirbuff( &( pReturn->leftX ) , 0 ) ; create_cirbuff( &( pReturn->leftYa ) , 0 ) ; create_cirbuff( &( pReturn->rightX ) , 0 ) ; create_cirbuff( &( pReturn->rightYa ) , 0 ) ; CtrlReset( pReturn ) ; return ( Effect* )pReturn ; } #endif /* CHANNEL_EFFECT */ alsaplayer-0.99.82/attic/midi/sbk.h000066400000000000000000000050571466261456500170440ustar00rootroot00000000000000/*================================================================ * SoundFont(tm) file format * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . *================================================================*/ #ifndef SBK_H_DEF #define SBK_H_DEF typedef struct _tchunk { char id[4]; uint32 size; } tchunk; typedef struct _tsbkheader { char riff[4]; /* RIFF */ uint32 size; /* size of sbk after there bytes */ char sfbk[4]; /* sfbk id */ } tsbkheader; typedef struct _tsamplenames { char name[21]; } tsamplenames; typedef struct _tpresethdr { char name[20]; uint16 preset, sub_preset, bank, sub_bank, bagNdx; /*int lib, genre, morphology;*/ /* reserved */ } tpresethdr; typedef struct _tsampleinfo { uint32 startsample, endsample; uint32 startloop, endloop; /* ver.2 additional info */ uint32 samplerate; uint8 originalPitch; uint8 pitchCorrection; uint16 samplelink; uint16 sampletype; /*1=mono, 2=right, 4=left, 8=linked, $8000=ROM*/ } tsampleinfo; typedef struct _tinsthdr { char name[20]; uint16 bagNdx; } tinsthdr; typedef struct _tgenrec { uint16 oper; uint16 amount; } tgenrec; /* * */ typedef struct _SFInfo { uint16 version, minorversion; uint32 samplepos, samplesize; int nrsamples; tsamplenames *samplenames; int nrpresets; tpresethdr *presethdr; int nrinfos; tsampleinfo *sampleinfo; int nrinsts; tinsthdr *insthdr; int nrpbags, nribags; uint16 *presetbag, *instbag; int nrpgens, nrigens; tgenrec *presetgen, *instgen; tsbkheader sbkh; /*char *sf_name;*/ int in_rom; } SFInfo; /*---------------------------------------------------------------- * functions *----------------------------------------------------------------*/ extern void load_sbk(FILE *fp, SFInfo *sf); extern void free_sbk(SFInfo *sf); extern void sbk_to_text(char *text, int type, int val, SFInfo *sf); extern void autocfg(); #endif alsaplayer-0.99.82/attic/midi/sf2cfg.c000066400000000000000000000117261466261456500174320ustar00rootroot00000000000000/*================================================================ * sbk2cfg -- extracts info from sf2/sbk font and constructs * a TiMidity cfg file. Greg Lee, lee@hawaii.edu, 5/98. * The code is adapted from "sbktext" by Takashi Iwai, which contained * the following notice: *================================================================ * Copyright (C) 1996,1997 Takashi Iwai * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . *================================================================*/ #include #include #include #include "gtim.h" #include "sbk.h" #include "sflayer.h" static SFInfo sfinfo; static char *getname(char *p); static void print_sbk(SFInfo *sf, FILE *fout); static int check_sbk(SFInfo *sf); int sf2cfg(char *sffname, char *outname) { FILE *fp; int all_ok; if ((fp = fopen(sffname, "r")) == NULL) { return 0; } all_ok = 1; load_sbk(fp, &sfinfo); fclose(fp); if (!check_sbk(&sfinfo)) return 0; if ((fp = fopen(outname, "w")) == NULL) { return 0; } print_sbk(&sfinfo, fp); fprintf(fp, "\nsf \"%s\"\n", sffname); free_sbk(&sfinfo); fclose(fp); return 1; } static char *getname(char *p) { int i; static char buf[21]; strncpy(buf, p, 20); buf[20] = 0; for (i = 19; i > 4 && buf[i]==' '; i--) { buf[i] = 0; } for (i = 0; buf[i]; i++) { if (buf[i] == ' ') buf[i] = '_'; if (buf[i] == '#') buf[i] = '@'; } return buf; } static int check_sbk(SFInfo *sf) { if (sf->version != 2) return 0; return 1; } static void print_sbk(SFInfo *sf, FILE *fout) { int i, bank, preset, lastpatch; int lastbank = -1; tpresethdr *ip; tinsthdr *tp; fprintf(fout, "# ** SoundFont: %d %d\n", sf->version, sf->minorversion); fprintf(fout, "# ** SampleData: %d %d\n", (int)sf->samplepos, (int)sf->samplesize); fprintf(fout, "#\n# ** Presets: %d\n", sf->nrpresets-1); for (bank = 0; bank <= 128; bank++) { for (preset = 0; preset <= 127; preset++) { lastpatch = -1; for (i = 0, ip = sf->presethdr; i < sf->nrpresets-1; i++) { int b, g, inst, sm_idx; if (ip[i].bank != bank) continue; if (ip[i].preset != preset) continue; inst = -1; for (b = ip[i].bagNdx; b < ip[i+1].bagNdx; b++) { for (g = sf->presetbag[b]; g < sf->presetbag[b+1]; g++) if (sf->presetgen[g].oper == SF_instrument) { inst = sf->presetgen[g].amount; break; } } if (inst < 0) continue; tp = sf->insthdr; if (bank != 128) { int realwaves = 0; if (bank != lastbank) { fprintf(fout, "\nbank %d sf\n", bank); lastbank = bank; } for (b = tp[inst].bagNdx; b < tp[inst+1].bagNdx; b++) { sm_idx = -1; for (g = sf->instbag[b]; g < sf->instbag[b+1]; g++) { if (sf->instgen[g].oper == SF_sampleId) sm_idx = sf->instgen[g].amount; } if (sm_idx >= 0 && sf->sampleinfo[sm_idx].sampletype < 0x8000) realwaves++; } if (realwaves && ip[i].preset != lastpatch) { fprintf(fout, "\t%3d %s\n", ip[i].preset, getname(ip[i].name)); lastpatch = ip[i].preset; } } else { int keynote, c, dpreset; fprintf(fout, "\ndrumset %d sf\t%s\n", ip[i].preset, getname(ip[i].name)); for (dpreset = 0; dpreset < 128; dpreset++) for (c = ip[i].bagNdx; c < ip[i+1].bagNdx; c++) { inst = -1; for (g = sf->presetbag[c]; g < sf->presetbag[c+1]; g++) if (sf->presetgen[g].oper == SF_instrument) { inst = sf->presetgen[g].amount; break; } if (inst >= 0) for (b = tp[inst].bagNdx; b < tp[inst+1].bagNdx; b++) { int hikeynote = -1; sm_idx = keynote = -1; for (g = sf->instbag[b]; g < sf->instbag[b+1]; g++) { if (sf->instgen[g].oper == SF_sampleId) sm_idx = sf->instgen[g].amount; else if (sf->instgen[g].oper == SF_keyRange) { keynote = sf->instgen[g].amount & 0xff; hikeynote = (sf->instgen[g].amount >> 8) & 0xff; } } if (sm_idx < 0) continue; if (sf->sampleinfo[sm_idx].sampletype >= 0x8000) continue; /*if (keynote != dpreset) continue;*/ if (dpreset < keynote) continue; if (dpreset > hikeynote) continue; if (sm_idx >= 0 && keynote >= 0 && dpreset != lastpatch) { fprintf(fout, "\t%3d %s\n", dpreset, getname( sf->samplenames[sm_idx].name )); lastpatch = dpreset; } } } } } } } } alsaplayer-0.99.82/attic/midi/sflayer.h000066400000000000000000000100231466261456500177170ustar00rootroot00000000000000/*================================================================ * $Id$ * sflayer.h * SoundFont layer structure * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . *================================================================*/ #ifndef SFLAYER_H_DEF #define SFLAYER_H_DEF enum { SF_startAddrs, /* 0 sample start address -4 (0 to * 0xffffff) */ SF_endAddrs, /* 1 */ SF_startloopAddrs, /* 2 loop start address -4 (0 to * 0xffffff) */ SF_endloopAddrs, /* 3 loop end address -3 (0 to * 0xffffff) */ SF_startAddrsHi, /* 4 high word of startAddrs */ SF_lfo1ToPitch, /* 5 main fm: lfo1-> pitch */ SF_lfo2ToPitch, /* 6 aux fm: lfo2-> pitch */ SF_env1ToPitch, /* 7 pitch env: env1(aux)-> pitch */ SF_initialFilterFc, /* 8 initial filter cutoff */ SF_initialFilterQ, /* 9 filter Q */ SF_lfo1ToFilterFc, /* 10 filter modulation: lfo1 -> filter * cutoff */ SF_env1ToFilterFc, /* 11 filter env: env1(aux)-> filter * cutoff */ SF_endAddrsHi, /* 12 high word of endAddrs */ SF_lfo1ToVolume, /* 13 tremolo: lfo1-> volume */ SF_env2ToVolume, /* 14 unused1 : ?? Env2Depth: env2-> volume */ SF_chorusEffectsSend, /* 15 chorus */ SF_reverbEffectsSend, /* 16 reverb */ SF_panEffectsSend, /* 17 pan */ SF_auxEffectsSend, /* 18 unused2 : ?? pan auxdata (internal) */ SF_sampleVolume, /* 19 unused3 : ?? used internally */ SF_unused3, /* 20 */ SF_delayLfo1, /* 21 delay 0x8000-n*(725us) */ SF_freqLfo1, /* 22 frequency */ SF_delayLfo2, /* 23 delay 0x8000-n*(725us) */ SF_freqLfo2, /* 24 frequency */ SF_delayEnv1, /* 25 delay 0x8000 - n(725us) */ SF_attackEnv1, /* 26 attack */ SF_holdEnv1, /* 27 hold */ SF_decayEnv1, /* 28 decay */ SF_sustainEnv1, /* 29 sustain */ SF_releaseEnv1, /* 30 release */ SF_autoHoldEnv1, /* 31 */ SF_autoDecayEnv1, /* 32 */ SF_delayEnv2, /* 33 delay 0x8000 - n(725us) */ SF_attackEnv2, /* 34 attack */ SF_holdEnv2, /* 35 hold */ SF_decayEnv2, /* 36 decay */ SF_sustainEnv2, /* 37 sustain */ SF_releaseEnv2, /* 38 release */ SF_autoHoldEnv2, /* 39 */ SF_autoDecayEnv2, /* 40 */ SF_instrument, /* 41 */ SF_nop, /* 42 */ SF_keyRange, /* 43 */ SF_velRange, /* 44 */ SF_startloopAddrsHi, /* 45 high word of startloopAddrs */ SF_keynum, /* 46 */ SF_velocity, /* 47 */ SF_instVol, /* 48 */ SF_keyTuning, /* 49 reserved2 */ SF_endloopAddrsHi, /* 50 high word of endloopAddrs */ SF_coarseTune, /* 51 */ SF_fineTune, /* 52 */ SF_sampleId, /* 53 */ SF_sampleFlags, /* 54 */ SF_samplePitch, /* 55 SF1 only */ SF_scaleTuning, /* 56 */ SF_keyExclusiveClass, /* 57 */ SF_rootKey, /* 58 */ SF_EOF, /* 59 */ SF_EOF2 /* 60 */ }; #define PARM_SIZE SF_EOF2 #endif alsaplayer-0.99.82/attic/midi/sndfont.c000066400000000000000000002007771466261456500177410ustar00rootroot00000000000000/*================================================================ * SoundFont file extension * written by Takashi Iwai * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . *================================================================*/ #include #include #include #include #include "gtim.h" #ifdef LITTLE_ENDIAN #define USE_POSIX_MAPPED_FILES #endif #define READ_WHOLE_SF_FILE #ifdef READ_WHOLE_SF_FILE #include #endif #ifdef USE_POSIX_MAPPED_FILES #include #endif #include "common.h" #include "tables.h" #include "instrum.h" #include "playmidi.h" #include "effects.h" #include "md.h" #include "controls.h" #include "sbk.h" #include "sflayer.h" #include "output.h" #include "filter.h" #include "resample.h" /*---------------------------------------------------------------- * compile flags *----------------------------------------------------------------*/ /* use some modifications from TiMidity++ */ #define tplussbkuse /*#define GREGSTEST*/ #ifdef ADAGIO #define SF_SUPPRESS_VIBRATO #endif /*---------------------------------------------------------------- * local parameters *----------------------------------------------------------------*/ typedef struct _Layer { int16 val[PARM_SIZE]; int8 set[PARM_SIZE]; } Layer; typedef struct _SampleList { Sample v; struct _SampleList *next; uint32 startsample, endsample; uint32 cutoff_freq; FLOAT_T resonance; } SampleList; typedef struct _InstList { int bank, preset, keynote; int inum, velrange; int samples, rsamples; int already_loaded; char *fname; FILE *fd; #ifdef READ_WHOLE_SF_FILE unsigned char *contents; int size_of_contents; #endif SampleList *slist, *rslist; struct _InstList *next; } InstList; typedef struct SFInsts { char *fname; FILE *fd; uint16 version, minorversion; int32 samplepos, samplesize; #ifdef READ_WHOLE_SF_FILE unsigned char *contents; int size_of_contents; #endif InstList *instlist; } SFInsts; /*----------------------------------------------------------------*/ static int load_one_side(SFInsts *rec, SampleList *sp, int sample_count, Sample *base_sample, int amp); static Instrument *load_from_file(SFInsts *rec, InstList *ip, int amp); static void parse_preset(SFInsts *rec, SFInfo *sf, int preset); static void parse_gen(Layer *lay, tgenrec *gen); static void parse_preset_layer(Layer *lay, SFInfo *sf, int idx); static void merge_layer(Layer *dst, Layer *src); static int search_inst(Layer *lay); static void parse_inst(SFInsts *rec, Layer *pr_lay, SFInfo *sf, int preset, int inst, int inum, int num_i); static void parse_inst_layer(Layer *lay, SFInfo *sf, int idx); static int search_sample(Layer *lay); static void append_layer(Layer *dst, Layer *src, SFInfo *sf); static void make_inst(SFInsts *rec, Layer *lay, SFInfo *sf, int pr_idx, int in_idx, int inum, uint16 pk_range, uint16 pv_range, int num_i, int program); static int32 calc_root_pitch(Layer *lay, SFInfo *sf, SampleList *sp, int32 cfg_tuning); static void convert_volume_envelope(Layer *lay, SFInfo *sf, SampleList *sp, int banknum, int preset); static void convert_modulation_envelope(Layer *lay, SFInfo *sf, SampleList *sp, int banknum, int preset); static uint32 to_offset(uint32 offset); static uint32 calc_rate(uint32 diff, double msec); static double to_msec(Layer *lay, SFInfo *sf, int index); static FLOAT_T calc_volume(Layer *lay, SFInfo *sf); static uint32 calc_sustain(Layer *lay, SFInfo *sf, int banknum, int preset); static uint32 calc_modulation_sustain(Layer *lay, SFInfo *sf, int banknum, int preset); #ifndef SF_SUPPRESS_TREMOLO static void convert_tremolo(Layer *lay, SFInfo *sf, SampleList *sp); static void convert_lfo(Layer *lay, SFInfo *sf, SampleList *sp); #endif #ifndef SF_SUPPRESS_VIBRATO static void convert_vibrato(Layer *lay, SFInfo *sf, SampleList *sp); #endif static void calc_cutoff(Layer *lay, SFInfo *sf, SampleList *sp); static void calc_filterQ(Layer *lay, SFInfo *sf, SampleList *sp); /*----------------------------------------------------------------*/ #define MAX_SF_FILES 40 static int current_sf_index = 0; static int last_sf_index = 0; static SFInsts sfrec[MAX_SF_FILES]; int cutoff_allowed = 0; int command_cutoff_allowed = 0; #ifdef GREGSTEST static char *getname(char *p) { static char buf[21]; strncpy(buf, p, 20); buf[20] = 0; return buf; } #endif static SFInfo sfinfo; #ifdef READ_WHOLE_SF_FILE static int sf_size_of_contents; #ifndef USE_POSIX_MAPPED_FILES static unsigned char *read_whole_sf(FILE *fd) { #else static unsigned char *read_whole_sf() { #endif struct stat info; unsigned char *sf_contents; sf_size_of_contents = 0; #ifndef LITTLE_ENDIAN return 0; #else #ifndef USE_POSIX_MAPPED_FILES #ifndef KMIDI if (have_commandline_midis < 3) return 0; #endif #endif if (stat(current_filename, &info)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Can't find file `%s'.", current_filename); return 0; } /* check here if size less than what we are allowed */ if (info.st_size + current_patch_memory > max_patch_memory) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "File `%s' at %d bytes is too big to read all at once.", current_filename, info.st_size); ctl->cmsg(CMSG_ERROR, VERB_NORMAL, " (I will try to read it one patch at a time.)"); return 0; } #ifdef USE_POSIX_MAPPED_FILES sf_contents = (unsigned char *)mmap(0, info.st_size, PROT_READ, MAP_SHARED, current_filedescriptor, 0); if (sf_contents == (unsigned char *)(-1)) { ctl->cmsg(CMSG_INFO, VERB_NOISY, "Couldn't mmap `%s'.", current_filename); return 0; } #else sf_contents = (unsigned char *)malloc(info.st_size); if (!sf_contents) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Couldn't get memory for entire file `%s'.", current_filename); ctl->cmsg(CMSG_ERROR, VERB_NORMAL, " (I will try to read it one patch at a time.)"); return 0; } rewind(fd); if (!fread(sf_contents, info.st_size, 1, fd)) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Couldn't read `%s'.", current_filename); free(sf_contents); return 0; } #endif sf_size_of_contents = info.st_size; current_patch_memory += info.st_size; ctl->cmsg(CMSG_INFO, VERB_NOISY, "File `%s' required %d bytes of memory.", current_filename, sf_size_of_contents); return sf_contents; #endif } #endif /* * init_soundfont * fname: name of soundfont file * newbank: toneset # or, if >255, drumset # + 256 * oldbank: same as newbank unless cfg file has "sf oldbank=", * in which case oldbank= * level: nesting level of cfg file (what is this for?) */ int init_soundfont(char *fname, int oldbank, int newbank, int level) { int i; InstList *ip; #ifdef READ_WHOLE_SF_FILE unsigned char *sf_contents = 0; int whole_sf_already_read = 0; #endif ctl->cmsg(CMSG_INFO, VERB_NOISY, "init soundfont `%s'", fname); current_sf_index = -1; for (i = 0; i < last_sf_index; i++) if (sfrec[i].fname && !strcmp(sfrec[i].fname, fname)) { current_sf_index = i; rewind(sfrec[i].fd); #ifdef READ_WHOLE_SF_FILE whole_sf_already_read = 1; #endif break; } if (current_sf_index == -1) { if (last_sf_index >= MAX_SF_FILES) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Too many soundfont files to load %s.", fname); return FALSE; } current_sf_index = last_sf_index; if ((sfrec[current_sf_index].fd = open_file(fname, 1, OF_VERBOSE, level)) == NULL) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Can't open soundfont file %s.", fname); return FALSE; } last_sf_index++; sfrec[current_sf_index].fname = strcpy((char*)safe_malloc(strlen(fname)+1), fname); } load_sbk(sfrec[current_sf_index].fd, &sfinfo); for (i = 0; i < sfinfo.nrpresets-1; i++) { /* if substituting banks, only parse matching bank */ if (oldbank != newbank) { int bank = sfinfo.presethdr[i].bank; int preset = sfinfo.presethdr[i].preset; /* is it a matching percussion preset? */ if (newbank >= 256 && bank == 128 && preset == oldbank) { preset = sfinfo.presethdr[i].sub_preset = newbank - 256; parse_preset(&sfrec[current_sf_index], &sfinfo, i); } /* is it a matching melodic bank? */ else if (bank == oldbank) { bank = sfinfo.presethdr[i].sub_bank = newbank; parse_preset(&sfrec[current_sf_index], &sfinfo, i); } } /* but if not substituting banks, parse them all */ else parse_preset(&sfrec[current_sf_index], &sfinfo, i); } /* copy header info */ sfrec[current_sf_index].version = sfinfo.version; sfrec[current_sf_index].minorversion = sfinfo.minorversion; sfrec[current_sf_index].samplepos = sfinfo.samplepos; sfrec[current_sf_index].samplesize = sfinfo.samplesize; free_sbk(&sfinfo); #ifdef READ_WHOLE_SF_FILE if (whole_sf_already_read) { sf_contents = sfrec[current_sf_index].contents; sf_size_of_contents = sfrec[current_sf_index].size_of_contents; } else #ifndef USE_POSIX_MAPPED_FILES sf_contents = read_whole_sf(sfrec[current_sf_index].fd); #else sf_contents = read_whole_sf(); #endif if (!sf_contents) return FALSE; sfrec[current_sf_index].contents = sf_contents; sfrec[current_sf_index].size_of_contents = sf_size_of_contents; for (ip = sfrec[current_sf_index].instlist; ip; ip = ip->next) { if (!ip->already_loaded) { ip->contents = sf_contents; ip->size_of_contents = sf_size_of_contents; } ip->already_loaded = 10000000; } #else /* mark instruments as loaded so they won't be loaded again if we're re-called */ for (ip = sfrec[current_sf_index].instlist; ip; ip = ip->next) ip->already_loaded = 10000000; #endif return TRUE; } void end_soundfont(void) { InstList *ip, *next; FILE *still_open; char *still_not_free; unsigned char *contents_not_free; int contents_size = 0; current_sf_index = 0; while (current_sf_index < last_sf_index) { if (!sfrec[current_sf_index].instlist) continue; still_open = NULL; still_not_free = NULL; contents_not_free = NULL; while (1) { for (ip = sfrec[current_sf_index].instlist; ip; ip = next) { next = ip->next; if (!still_open && ip->fd) { still_open = ip->fd; still_not_free = ip->fname; contents_not_free = ip->contents; contents_size = ip->size_of_contents; } if (still_open && ip->fd == still_open) ip->fd = NULL; } if (still_open) { fclose(still_open); still_open = NULL; if (still_not_free) free(still_not_free); still_not_free = NULL; if (contents_not_free) { #ifdef USE_POSIX_MAPPED_FILES munmap(contents_not_free, contents_size); #else free(contents_not_free); #endif current_patch_memory -= contents_size; } contents_not_free = NULL; contents_size = 0; } else break; } for (ip = sfrec[current_sf_index].instlist; ip; ip = next) { next = ip->next; free(ip); } sfrec[current_sf_index].version = sfrec[current_sf_index].minorversion = sfrec[current_sf_index].samplepos = sfrec[current_sf_index].samplesize = 0; sfrec[current_sf_index].instlist = NULL; sfrec[current_sf_index].fd = NULL; current_sf_index++; } current_sf_index = last_sf_index = 0; } /*---------------------------------------------------------------- * get converted instrument info and load the wave data from file *----------------------------------------------------------------*/ /* two (high/low) 8 bit values in 16 bit parameter */ #define LO_VAL(val) ((val) & 0xff) #define HI_VAL(val) (((val) >> 8) & 0xff) #define SET_LO(vp,val) ((vp) = ((vp) & 0xff00) | (val)) #define SET_HI(vp,val) ((vp) = ((vp) & 0xff) | ((val) << 8)) static int patch_memory; #ifdef ADAGIO InstrumentLayer *load_sbk_patch(int gm_num, int tpgm, int reverb, int main_volume) { extern int next_wave_prog; char *name; int percussion, amp=-1, keynote, strip_loop, strip_envelope, strip_tail, bank, newmode; #else InstrumentLayer *load_sbk_patch(const char *name, int gm_num, int bank, int percussion, int panning, int amp, int keynote, int sf_ix) { #endif int preset; int not_done, load_index=0; InstList *ip; InstrumentLayer *lp, *nlp; Instrument *inst = NULL; preset = gm_num; if (gm_num >= 128) preset -= 128; #ifdef ADAGIO if (!(gus_voice[tpgm].keep & SBK_FLAG)) return(0); bank = gus_voice[tpgm].bank & 0x7f; newmode = gus_voice[tpgm].modes; strip_loop = strip_envelope = strip_tail = amp = -1; percussion = (gm_num >= 128); name = gus_voice[tpgm].vname; /* if (very_verbose) printf("load_sbk_patch(%s:bank=%d,preset=%d,tpgm=%d,reverb=%d,main_volume=%d) keep 0x%02X\n", name,bank,preset,tpgm,reverb,main_volume, gus_voice[tpgm].keep); */ #endif if (percussion) { keynote = preset; preset = bank; bank = 128; } else keynote = -1; if (sf_ix < 0 || sf_ix >= MAX_SF_FILES) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Indexing non-existent soundfont %d.", sf_ix); return 0; } if (!sfrec[sf_ix].fname || !sfrec[sf_ix].instlist) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Indexing uninitialized soundfont %d.", sf_ix); return 0; } cutoff_allowed = command_cutoff_allowed; patch_memory = 0; not_done = 1; lp = 0; while (not_done) { for (ip = sfrec[sf_ix].instlist; ip; ip = ip->next) { if (ip->bank == bank && ip->preset == preset && ip->already_loaded > load_index && (keynote < 0 || keynote == ip->keynote)) break; } inst = 0; if (ip && (ip->samples || ip->rsamples)) { if (!load_index) load_index = ip->already_loaded - 1; ip->already_loaded = load_index; sfrec[sf_ix].fname = ip->fname; #ifdef READ_WHOLE_SF_FILE sfrec[sf_ix].contents = ip->contents; #endif ctl->cmsg(CMSG_INFO, VERB_NOISY, "%s%s[%d,%d] %s%s (%d-%d)", (percussion)? " ":"", name, (percussion)? keynote : preset, (percussion)? preset : bank, (ip->rsamples)? "(2) " : "", sfrec[sf_ix].fname, LO_VAL(ip->velrange), HI_VAL(ip->velrange)? HI_VAL(ip->velrange) : 127 ); sfrec[sf_ix].fd = ip->fd; inst = load_from_file(&sfrec[sf_ix], ip, amp); #ifdef READ_WHOLE_SF_FILE if (inst) inst->contents = ip->contents; #endif } else { ip = 0; not_done = 0; if (!lp) { ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Can't find %s %s[%d,%d] in %s.", (percussion)? "drum":"instrument", name, (percussion)? keynote : preset, (percussion)? preset : bank, sfrec[sf_ix].fname); return 0; } } #ifdef ADAGIO if (inst) { gus_voice[tpgm].loaded |= DSP_MASK; gus_voice[tpgm].prog = next_wave_prog++; } #endif if (inst) { nlp = lp; lp=(InstrumentLayer*) safe_malloc(sizeof(InstrumentLayer)); patch_memory += sizeof(InstrumentLayer); lp->lo = LO_VAL(ip->velrange); lp->hi = HI_VAL(ip->velrange); lp->instrument = inst; lp->next = nlp; } lp->size = patch_memory; if (check_for_rc()) return lp; if (patch_memory + current_patch_memory > max_patch_memory) return lp; } /* while (not_done) */ lp->size = patch_memory; return lp; } static Instrument *load_from_file(SFInsts *rec, InstList *ip, int amp) { Instrument *inst; int r_amp = amp; /* ctl->cmsg(CMSG_INFO, VERB_NOISY, "Loading SF bank %d prg %d note %d from %s", ip->bank, ip->preset, ip->keynote, rec->fname); */ inst = (Instrument *)safe_malloc(sizeof(Instrument)); patch_memory += sizeof(Instrument); inst->type = INST_SF2; /* we could have set up right samples but no left ones */ if (!ip->samples && ip->rsamples && ip->rslist) { ip->samples = ip->rsamples; ip->slist = ip->rslist; ip->rsamples = 0; ip->rslist = 0; } inst->samples = ip->samples; inst->sample = (Sample *)safe_malloc(sizeof(Sample)*ip->samples); patch_memory += sizeof(Sample)*ip->samples; inst->left_samples = inst->samples; inst->left_sample = inst->sample; inst->right_samples = ip->rsamples; /*#define PSEUDO_STEREO*/ #ifdef PSEUDO_STEREO if (!ip->rsamples && ip->keynote >= 0) { ip->rsamples = ip->samples; ip->rslist = ip->slist; if (ip->keynote % 2) r_amp = -2; else r_amp = -3; } #endif if (ip->rsamples) inst->right_sample = (Sample *)safe_malloc(sizeof(Sample)*ip->rsamples); else inst->right_sample = 0; if (load_one_side(rec, ip->slist, ip->samples, inst->sample, amp) && load_one_side(rec, ip->rslist, ip->rsamples, inst->right_sample, r_amp)) return inst; if (inst->right_sample) free(inst->right_sample); free(inst->sample); free(inst); return 0; } static int load_one_side(SFInsts *rec, SampleList *sp, int sample_count, Sample *base_sample, int amp) { int i; uint32 samplerate_save; for (i = 0; i < sample_count && sp; i++, sp = sp->next) { Sample *sample = base_sample + i; #ifndef LITTLE_ENDIAN int32 j; int16 *tmp, s; #endif memcpy(sample, &sp->v, sizeof(Sample)); /* here, if we read whole file, sample->data = rec.contents + sp->startsample */ #ifdef READ_WHOLE_SF_FILE if (rec->contents) sample->data = (sample_t *)(rec->contents + sp->startsample); else #endif sample->data = (sample_t *) safe_malloc(sp->endsample); #ifndef READ_WHOLE_SF_FILE patch_memory += sp->endsample; #else if (!rec->contents) #endif if (fseek(rec->fd, (int)sp->startsample, SEEK_SET)) { ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Can't find sample in file!\n"); return 0; } #ifdef READ_WHOLE_SF_FILE if (!rec->contents) #endif if (!fread(sample->data, sp->endsample, 1, rec->fd)) { ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Can't read sample from file!\n"); return 0; } #ifndef LITTLE_ENDIAN /* NOTE: only do this once for all samples when first loaded ?? */ tmp = (int16*)sample->data; for (j = 0; j < sp->endsample/2; j++) { s = LE_SHORT(*tmp); *tmp++ = s; } #endif /* Note: _One_ thing that keeps this from working right is that, apparently, zero-crossing points change so loops give clicks; Another problem is that have to reload voices between songs. The filter really ought to be in resample.c. */ /* do some filtering if necessary */ /* (moved below -- should it be here?) */ #ifdef PSEUDO_STEREO if (amp<-1) { if (sp->v.panning >= 64) sp->v.panning = 0; else sp->v.panning = 127; if (amp==-3) sp->v.panning = 127 - sp->v.panning; /*amp = 80;*/ amp = -1; } #endif #ifdef ADJUST_SAMPLE_VOLUMES if (amp!=-1) sample->volume=(double)(amp) / 100.0; else { /* Try to determine a volume scaling factor for the sample. This is a very crude adjustment, but things sound more balanced with it. Still, this should be a runtime option. */ uint32 i, numsamps=sp->endsample/2; uint32 higher=0, highcount=0; int16 maxamp=0,a; int16 *tmp=(int16 *)sample->data; i = numsamps; while (i--) { a=*tmp++; if (a<0) a=-a; if (a>maxamp) maxamp=a; } tmp=(int16 *)sample->data; i = numsamps; while (i--) { a=*tmp++; if (a<0) a=-a; if (a > 3*maxamp/4) { higher += a; highcount++; } } if (highcount) higher /= highcount; else higher = 10000; sample->volume = (32768.0 * 0.875) / (double)higher ; ctl->cmsg(CMSG_INFO, VERB_DEBUG, " * volume comp: %f", sample->volume); } #else if (amp!=-1) sample->volume=(double)(amp) / 100.0; else sample->volume=1.0; #endif if (antialiasing_allowed) { /* restore the normal value */ sample->data_length >>= FRACTION_BITS; antialiasing(sample, play_mode->rate); /* convert again to the fractional value */ sample->data_length <<= FRACTION_BITS; } /* resample it if possible */ samplerate_save = sample->sample_rate; /* trim off zero data at end */ { int ls = sample->loop_start>>FRACTION_BITS; int le = sample->loop_end>>FRACTION_BITS; int se = sample->data_length>>FRACTION_BITS; while (se > 1 && !sample->data[se-1]) se--; if (le > se) le = se; if (ls >= le) sample->modes &= ~MODES_LOOPING; sample->loop_end = le<data_length = se<note_to_use && !(sample->modes & MODES_LOOPING)) pre_resample(sample); #endif /*fprintf(stderr,"sample %d, note_to_use %d\n", i, sample->note_to_use);*/ #ifdef LOOKUP_HACK /* squash the 16-bit data into 8 bits. */ { uint8 *gulp,*ulp; int16 *swp; int l = sample->data_length >> FRACTION_BITS; gulp = ulp = safe_malloc(l + 1); swp = (int16 *)sample->data; while (l--) *ulp++ = (*swp++ >> 8) & 0xFF; free(sample->data); sample->data=(sample_t *)gulp; } #endif if (!sample->sample_rate && !dont_filter_drums) { if (!i) ctl->cmsg(CMSG_INFO, VERB_DEBUG, "cutoff = %ld ; resonance = %g", sp->cutoff_freq, sp->resonance); #ifdef TOTALLY_LOCAL do_lowpass(sample, samplerate_save, sample->data, sample->data_length >> FRACTION_BITS, sp->cutoff_freq, sp->resonance); #endif } /* printf("loop start %ld, loop end %ld, len %d\n", sample->loop_start>>FRACTION_BITS, sample->loop_end>>FRACTION_BITS, sample->data_length >> FRACTION_BITS); */ /* #define HANNU_CLICK_REMOVAL */ /*#define DEBUG_CLICK*/ #ifdef HANNU_CLICK_REMOVAL if ((sample->modes & MODES_LOOPING)) { int nls = sample->loop_start>>FRACTION_BITS; int nle = sample->loop_end>>FRACTION_BITS; int ipt = 0, ips = 0; int v1, v2, inls, inle; inls = nls; inle = nle; while (!ipt) { v1 = sample->data[nle-1]; v2 = sample->data[nle]; if (v2==0) { if (v1 < 0) ipt = 1; else if (v1 > 0) ipt = 2; } else { if (v1 <= 0 && v2 > 0) ipt = 1; else if (v1 >= 0 && v2 < 0) ipt = 2; } if (!ipt) nle--; if (nle <= inls) break; } if (ipt && nls > 0) while (!ips) { v1 = sample->data[nls-1]; v2 = sample->data[nls]; if (v2==0) { if (ipt == 1 && v1 < 0) ips = 1; else if (ipt == 2 && v1 > 0) ips = 2; } else { if (ipt == 1 && v1 <= 0 && v2 > 0) ips = 1; else if (ipt == 2 && v1 >= 0 && v2 < 0) ips = 2; } if (!ips) nls--; if (nls < 1) break; } if (ipt && ips && ipt == ips && (nle-nls) == (inle-inls)) { #ifdef DEBUG_CLICK printf("changing loop start from %d to %d, loop end from %d to %d, len %d to %d\n", inls, nls, inle, nle, inle-inls, nle-nls); #endif sample->loop_start = nls<loop_end = nle<presethdr[preset].bagNdx; to_ndx = sf->presethdr[preset+1].bagNdx; num_i = to_ndx - from_ndx; #ifdef GREGSTEST if (to_ndx - from_ndx > 1) { fprintf(stderr,"Preset #%d (%s) has %d(-1) instruments.\n", preset, getname(sf->presethdr[preset].name), to_ndx - from_ndx); } #endif memset(&glay, 0, sizeof(glay)); for (i = from_ndx, inum = 0; i < to_ndx; i++) { memset(&lay, 0, sizeof(Layer)); parse_preset_layer(&lay, sf, i); inst = search_inst(&lay); if (inst < 0) {/* global layer */ memcpy(&glay, &lay, sizeof(Layer)); num_i--; } else { /* append_layer(&lay, &glay, sf); */ merge_layer(&lay, &glay); parse_inst(rec, &lay, sf, preset, inst, inum, num_i); inum++; } } } /* map a generator operation to the layer structure */ static void parse_gen(Layer *lay, tgenrec *gen) { lay->set[gen->oper] = 1; lay->val[gen->oper] = gen->amount; } /* parse preset generator layers */ static void parse_preset_layer(Layer *lay, SFInfo *sf, int idx) { int i; for (i = sf->presetbag[idx]; i < sf->presetbag[idx+1]; i++) parse_gen(lay, sf->presetgen + i); } /* merge two layers; never overrides on the destination */ static void merge_layer(Layer *dst, Layer *src) { int i; for (i = 0; i < PARM_SIZE; i++) { if (src->set[i] && !dst->set[i]) { dst->val[i] = src->val[i]; dst->set[i] = 1; } } } /* search instrument id from the layer */ static int search_inst(Layer *lay) { if (lay->set[SF_instrument]) return lay->val[SF_instrument]; else return -1; } /* parse an instrument */ static void parse_inst(SFInsts *rec, Layer *pr_lay, SFInfo *sf, int preset, int inst, int inum, int num_i) { int from_ndx, to_ndx; int i, sample; uint16 pv_range=0, pk_range=0; Layer lay, glay; from_ndx = sf->insthdr[inst].bagNdx; to_ndx = sf->insthdr[inst+1].bagNdx; if (pr_lay->set[SF_velRange]) pv_range = pr_lay->val[SF_velRange]; if (pr_lay->set[SF_keyRange]) pk_range = pr_lay->val[SF_keyRange]; memcpy(&glay, pr_lay, sizeof(Layer)); for (i = from_ndx; i < to_ndx; i++) { memset(&lay, 0, sizeof(Layer)); parse_inst_layer(&lay, sf, i); sample = search_sample(&lay); if (sample < 0) /* global layer */ append_layer(&glay, &lay, sf); else { /* append_layer(&lay, &glay, sf); */ merge_layer(&lay, &glay); make_inst(rec, &lay, sf, preset, inst, inum, pk_range, pv_range, num_i, -1); } } } /* parse instrument generator layers */ static void parse_inst_layer(Layer *lay, SFInfo *sf, int idx) { int i; for (i = sf->instbag[idx]; i < sf->instbag[idx+1]; i++) parse_gen(lay, sf->instgen + i); } /* search a sample id from instrument layers */ static int search_sample(Layer *lay) { if (lay->set[SF_sampleId]) return lay->val[SF_sampleId]; else return -1; } /* append two layers; parameters are added to the original value */ static void append_layer(Layer *dst, Layer *src, SFInfo *sf) { int i; for (i = 0; i < PARM_SIZE; i++) { if (src->set[i]) { if (sf->version == 1 && i == SF_instVol) dst->val[i] = (src->val[i] * 127) / 127; else if (i == SF_keyRange || i == SF_velRange) { /* high limit */ if (HI_VAL(dst->val[i]) > HI_VAL(src->val[i])) SET_HI(dst->val[i], HI_VAL(src->val[i])); /* low limit */ if (LO_VAL(dst->val[i]) < LO_VAL(src->val[i])) SET_LO(dst->val[i], LO_VAL(src->val[i])); } else dst->val[i] += src->val[i]; dst->set[i] = 1; } } } static char kvec[2][128]; static void clear_kvec() { int i; for (i=0; i<128; i++) { kvec[0][i] = kvec[1][i] = 0; } } static void new_kvec(int lr) { int i; for (i=0; i<128; i++) { kvec[lr][i] = 0; } } static void union_kvec(int lr, int kr) { int i; if (!kr || kr<0) return; for (i=0; i<128; i++) if (i >= LO_VAL(kr) && i <= HI_VAL(kr)) kvec[lr][i] = 1; } static int intersect_kvec(int lr, int kr) { int i; if (!kr || kr<0) return 0; for (i=0; i<128; i++) if (i >= LO_VAL(kr) && i <= HI_VAL(kr) && kvec[lr][i]) return 1; return 0; } static int subset_kvec(int lr, int kr) { int i; if (!kr || kr<0) return 0; for (i=0; i<128; i++) if (i >= LO_VAL(kr) && i <= HI_VAL(kr) && !kvec[lr][i]) return 0; return 1; } static char vvec[2][128]; static void clear_vvec() { int i; for (i=0; i<128; i++) { vvec[0][i] = vvec[1][i] = 0; } } static void union_vvec(int lr, int vr) { int i; if (!vr || vr<0) return; for (i=0; i<128; i++) if (i >= LO_VAL(vr) && i <= HI_VAL(vr)) vvec[lr][i] = 1; } static int intersect_vvec(int lr, int vr) { int i; if (!vr || vr<0) return 0; for (i=0; i<128; i++) if (i >= LO_VAL(vr) && i <= HI_VAL(vr) && vvec[lr][i]) return 1; return 0; } static char rvec[2][128]; static void clear_rvec() { int i; for (i=0; i<128; i++) { rvec[0][i] = rvec[1][i] = 0; } } static void union_rvec(int lr, int kr) { int i; if (!kr || kr<0) return; for (i=0; i<128; i++) if (i >= LO_VAL(kr) && i <= HI_VAL(kr)) rvec[lr][i] = 1; } static int subset_rvec(int lr, int kr) { int i; if (!kr || kr<0) return 0; for (i=0; i<128; i++) if (i >= LO_VAL(kr) && i <= HI_VAL(kr) && !rvec[lr][i]) return 0; return 1; } static int intersect_rvec(int lr, int kr) { int i; if (!kr || kr<0) return 0; for (i=0; i<128; i++) if (i >= LO_VAL(kr) && i <= HI_VAL(kr) && rvec[lr][i]) return 1; return 0; } /* convert layer info to timidity instrument strucutre */ static void make_inst(SFInsts *rec, Layer *lay, SFInfo *sf, int pr_idx, int in_idx, int inum, uint16 pk_range, uint16 pv_range, int num_i, int program) { int banknum = sf->presethdr[pr_idx].bank; int preset = sf->presethdr[pr_idx].preset; int sub_banknum = sf->presethdr[pr_idx].sub_bank; int sub_preset = sf->presethdr[pr_idx].sub_preset; int keynote, truebank, note_to_use, velrange; int strip_loop = 0, strip_envelope = 0, strip_tail = 0, panning = 0, cfg_tuning = 0; #ifndef ADAGIO ToneBank *bank=0; const char **namep; #endif InstList *ip; tsampleinfo *sample; SampleList *sp; #ifdef DO_LINKED_WAVES int linked_wave; #endif int sampleFlags, stereo_chan = 0, keyrange, x_chan = 0; static int lastpreset = -1; static int lastbanknum = -1; static int lastvelrange = -1; static int lastrange = -1; static int last_chan = -1; static int lastinum = -1; static int laststereo_chan = 0; static int lastpk_range = 0; if (pk_range) velrange = 0; else if (pv_range) velrange = pv_range; else if (lay->set[SF_velRange]) velrange = lay->val[SF_velRange]; else velrange = 0; #ifdef GREGSTEST if (velrange) fprintf(stderr,"bank %d, preset %d, inum %d, lo %d, hi %d\n", banknum, preset, inum, LO_VAL(velrange), HI_VAL(velrange)); #endif sample = &sf->sampleinfo[lay->val[SF_sampleId]]; #ifdef DO_LINKED_WAVES linked_wave = sample->samplelink; if (linked_wave && linked_wave < sfinfo.nrinfos) { if (inum == -1) sample = &sf->sampleinfo[linked_wave - 1]; else make_inst(rec, lay, sf, pr_idx, in_idx, -1, pk_range, velrange, num_i, -1); } #endif if (sample->sampletype & 0x8000) /* is ROM sample? */ return; if (lay->set[SF_keyRange]) keyrange = lay->val[SF_keyRange]; else keyrange = 0; /* Were we called to do later notes of a percussion range? */ if (program >= 0) keyrange = (program << 8) | program; else if (banknum == 128 && LO_VAL(keyrange) < HI_VAL(keyrange)) { int drumkey = LO_VAL(keyrange); int lastdkey = HI_VAL(keyrange); keyrange = (drumkey << 8) | drumkey; drumkey++; /* Do later notes of percussion key range. */ for ( ; drumkey <= lastdkey; drumkey++) make_inst(rec, lay, sf, pr_idx, in_idx, inum, pk_range, pv_range, num_i, drumkey); } /* set bank/preset name */ if (banknum == 128) { truebank = sub_preset; if (program == -1) program = keynote = LO_VAL(keyrange); else keynote = program; #ifndef ADAGIO bank = drumset[truebank]; #endif } else { keynote = -1; truebank = sub_banknum; program = preset; #ifndef ADAGIO bank = tonebank[truebank]; #endif } #ifdef GREGSTEST fprintf(stderr,"Adding keynote #%d preset %d to %s (%d), bank %d (=? %d).\n", keynote, preset, getname(sf->insthdr[in_idx].name), in_idx, banknum, truebank); #endif #ifndef ADAGIO if (!bank) return; namep = &bank->tone[program].name; #ifdef GREGSTEST if (*namep) fprintf(stderr,"cfg name is %s\n", *namep); else printf("NO CFG NAME!\n"); #endif /* if not declared, we don't load it */ if (*namep == 0) return; /* could be a GUS patch */ if (bank->tone[program].font_type != FONT_SBK) return; /* note we're loading this preset from a certain soundfont */ if (bank->tone[program].sf_ix == -1) bank->tone[program].sf_ix = current_sf_index; /* has it been loaded already from a different soundfont? */ else if (bank->tone[program].sf_ix != current_sf_index) return; panning = bank->tone[program].pan; strip_loop = bank->tone[program].strip_loop; strip_envelope = bank->tone[program].strip_envelope; strip_tail = bank->tone[program].strip_tail; note_to_use = bank->tone[program].note; cfg_tuning = bank->tone[program].tuning; /*if (!strip_envelope) strip_envelope = (banknum == 128);*/ #endif /* search current instrument list */ for (ip = rec->instlist; ip; ip = ip->next) { if (ip->bank == sub_banknum && ip->preset == sub_preset && (keynote < 0 || keynote == ip->keynote)) break; } /* don't append sample when instrument completely specified */ if (ip && ip->already_loaded) return; /* search current instrument list */ for (ip = rec->instlist; ip; ip = ip->next) { if (ip->bank == sub_banknum && ip->preset == sub_preset && ip->velrange == velrange && (keynote < 0 || keynote == ip->keynote)) break; } /* This doesn't work for Industry Standard G. Piano, which is mono but pans to the right for higher notes. if (!lay->set[SF_panEffectsSend] || lay->val[SF_panEffectsSend] <= 0) stereo_chan = 0; else stereo_chan = 1; */ /* earlier if (lay->set[SF_keyRange]) keyrange = lay->val[SF_keyRange]; else keyrange = 0; */ if (lastbanknum != banknum || lastpreset != preset) { lastbanknum = banknum; lastpreset = preset; lastvelrange = velrange; lastrange = -1; clear_rvec(); clear_vvec(); clear_kvec(); } if (lastvelrange != velrange) { lastvelrange = velrange; clear_rvec(); } if (inum != lastinum) { lastrange = -1; clear_rvec(); lastinum = inum; } if (banknum < 128 && pv_range && !pk_range) { if (pv_range == lastrange) x_chan = last_chan; else if (!intersect_vvec(0, pv_range)) x_chan = 0; else if (!intersect_vvec(1, pv_range)) x_chan = 1; else { ctl->cmsg(CMSG_INFO, VERB_NOISY, "sndfont: invalid velocity range in bank %d preset %d: low %d, high %d", banknum, preset, LO_VAL(pv_range), HI_VAL(pv_range)); return; } if (pv_range != lastrange) { #if 0 ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "sndfont: x_chan %d vel range in bank %d preset %d: low %d, high %d", x_chan, banknum, preset, LO_VAL(pv_range), HI_VAL(pv_range)); #endif last_chan = x_chan; clear_rvec(); union_vvec(x_chan, pv_range); lastrange = pv_range; } #if 0 else if (intersect_rvec(x_chan, keyrange)) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "sndfont: invalid layered key range in bank %d preset %d: low %d, high %d", banknum, preset, LO_VAL(keyrange), HI_VAL(keyrange)); #endif } #if 0 if (x_chan != 0) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "sndfont: ignoring 2nd layered key range in bank %d preset %d: low %d, high %d", banknum, preset, LO_VAL(keyrange), HI_VAL(keyrange)); #endif /* duplicated key ranges at preset level would require more than two patches per note */ if (x_chan != 0) return; if (banknum == 128 && num_i > 1 && pk_range) { /* * keyranges at the preset level are to fill in for missing * patches, so if we have a patch, skip the fill in */ if (ip) return; /* * the preset keyrange says which fill ins are to be taken from the * current instrument */ if (LO_VAL(keyrange) < LO_VAL(pk_range) || HI_VAL(keyrange) > HI_VAL(pk_range)) return; } /* melodic preset with multiple instruments */ if (banknum < 128 && num_i > 1 && (!pv_range || pk_range)) { /* if no preset keyrange to tell us, put just first instrument at left */ if (!pk_range) { if (inum == 0) stereo_chan = 0; else stereo_chan = 1; } else if (pk_range == lastpk_range) { stereo_chan = laststereo_chan; if (!subset_kvec(stereo_chan, keyrange)) return; } else { if (!intersect_kvec(0, pk_range)) stereo_chan = 0; else { stereo_chan = 1; new_kvec(stereo_chan); } #if 0 else { ctl->cmsg(CMSG_INFO, VERB_NOISY, "sndfont: invalid preset key range in bank %d preset %d: low %d, high %d", banknum, preset, LO_VAL(pk_range), HI_VAL(pk_range)); return; } #endif laststereo_chan = stereo_chan; lastpk_range = pk_range; union_kvec(stereo_chan, pk_range); if (!subset_kvec(stereo_chan, keyrange)) return; } } else if (!intersect_rvec(0, keyrange)) stereo_chan = 0; else if (!intersect_rvec(1, keyrange)) stereo_chan = 1; else if (!subset_rvec(0, keyrange)) stereo_chan = 0; else if (!subset_rvec(1, keyrange)) stereo_chan = 1; else { ctl->cmsg(CMSG_INFO, VERB_DEBUG, "sndfont: invalid key range in bank %d preset %d: low %d, high %d", banknum, preset, LO_VAL(keyrange), HI_VAL(keyrange)); return; } union_rvec(stereo_chan, keyrange); #if 0 if (pk_range) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "adding chan %d in bank %d preset %d: low %d, high %d (preset low %d high %d; vel lo %d hi %d)", stereo_chan, banknum, preset, LO_VAL(keyrange), HI_VAL(keyrange), LO_VAL(pk_range), HI_VAL(pk_range), LO_VAL(velrange), HI_VAL(velrange)); #endif if (ip == NULL) { ip = (InstList*)safe_malloc(sizeof(InstList)); ip->bank = sub_banknum; ip->preset = sub_preset; ip->keynote = keynote; ip->inum = inum; ip->velrange = velrange; ip->already_loaded = 0; ip->samples = 0; ip->rsamples = 0; ip->slist = NULL; ip->rslist = NULL; ip->fd = rec->fd; ip->fname = rec->fname; ip->next = rec->instlist; rec->instlist = ip; } /* add a sample */ sp = (SampleList*)safe_malloc(sizeof(SampleList)); /* fix to check sample type for left vs. right? */ if (stereo_chan == 0) { /* if (inum == ip->inum) { */ sp->next = ip->slist; ip->slist = sp; ip->samples++; } else { sp->next = ip->rslist; ip->rslist = sp; ip->rsamples++; } /* set sample position */ sp->startsample = ((short)lay->val[SF_startAddrsHi] * 32768) + (short)lay->val[SF_startAddrs] + sample->startsample; sp->endsample = ((short)lay->val[SF_endAddrsHi] * 32768) + (short)lay->val[SF_endAddrs] + sample->endsample - sp->startsample; if (sp->endsample > (1 << (32-FRACTION_BITS))) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "sndfont: patch size %ld greater than max (%ld)", sp->endsample, 1<<(32-FRACTION_BITS)); /* set loop position */ sp->v.loop_start = ((short)lay->val[SF_startloopAddrsHi] * 32768) + (short)lay->val[SF_startloopAddrs] + sample->startloop - sp->startsample; sp->v.loop_end = ((short)lay->val[SF_endloopAddrsHi] * 32768) + (short)lay->val[SF_endloopAddrs] + sample->endloop - sp->startsample; sp->v.data_length = sp->endsample; #if 0 /* debug loop point calculation */ { int32 xloop_start = sample->startloop - sp->startsample; int32 xloop_end = sample->endloop - sp->startsample; int yloop_start = (lay->val[SF_startloopAddrsHi] << 15) + lay->val[SF_startloopAddrs]; int yloop_end = (lay->val[SF_endloopAddrsHi] << 15) + lay->val[SF_endloopAddrs]; xloop_start += yloop_start; xloop_end += yloop_end; if (xloop_start > xloop_end) { fprintf(stderr,"start %ld > end %ld\n", xloop_start, xloop_end); fprintf(stderr,"\tstart %ld = orig %lu + yloop_start %d\n", xloop_start, sp->v.loop_start, yloop_start); fprintf(stderr,"\t\tyloop_start 0x%x = high 0x%x + low 0x%x\n", yloop_start, (lay->val[SF_startloopAddrsHi] << 15), lay->val[SF_startloopAddrs]); fprintf(stderr,"\t\tend %ld = orig %lu + yloop_end %d\n", xloop_end, sp->v.loop_end, yloop_end); fprintf(stderr,"\tlen %lu, startsample %lu sample startloop %lu endsample %lu\n", sample->endsample - sample->startsample, sample->startsample, sample->startloop, sample->endsample); } if (xloop_end > sp->v.data_length) { fprintf(stderr,"end %ld > length %lu\n", xloop_end, sp->v.data_length); fprintf(stderr,"\tend %ld = orig %lu + yloop_end %d\n", xloop_end, sp->v.loop_end, yloop_end); fprintf(stderr,"\t\tyloop_end 0x%x = high 0x%x + low 0x%x\n", yloop_end, (lay->val[SF_endloopAddrsHi] << 15), lay->val[SF_endloopAddrs]); fprintf(stderr,"\tlen %lu, startsample %lu sample endloop %lu endsample %lu\n", sample->endsample - sample->startsample, sample->startsample, sample->endloop, sample->endsample); fprintf(stderr,"\t\tstart offset = high 0x%x + low 0x%x\n", (lay->val[SF_startAddrsHi] << 15), lay->val[SF_startAddrs]); fprintf(stderr,"\t\tend offset = high 0x%x + low 0x%x\n", (lay->val[SF_endAddrsHi] << 15), lay->val[SF_endAddrs]); } } #endif #if 0 if (sp->v.loop_start < 0) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Negative loop pointer: removing loop"); strip_loop = 1; } #endif if (sp->v.loop_start > sp->v.loop_end) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Illegal loop position: removing loop"); strip_loop = 1; } if (sp->v.loop_end > sp->v.data_length) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Illegal loop end or data size: adjusting loop"); if (sp->v.loop_end - sp->v.data_length > 4) sp->v.loop_end = sp->v.data_length - 4; else sp->v.loop_end = sp->v.data_length; } /* debug */ #if 0 if (strip_loop == 1) { fprintf(stderr, "orig start sample %lu, endsample %lu\n", sample->startsample, sample->endsample); fprintf(stderr, "SF_startAddr %d, SF_endAddr %d\n", ((short)lay->val[SF_startAddrsHi] * 32768) + (short)lay->val[SF_startAddrs], ((short)lay->val[SF_endAddrsHi] * 32768) + (short)lay->val[SF_endAddrs] ); fprintf(stderr, "start sample %lu, length %lu\n", sp->startsample, sp->endsample); fprintf(stderr, "orig loop start %lu, loop end %lu\n", sample->startloop, sample->endloop); fprintf(stderr, "SF_startloopAddr %d, SF_endloopAddr %d\n", ((short)lay->val[SF_startloopAddrsHi] * 32768) + (short)lay->val[SF_startloopAddrs], ((short)lay->val[SF_endloopAddrsHi] * 32768) + (short)lay->val[SF_endloopAddrs] ); fprintf(stderr, "loop start %lu, loop end %lu\n", sp->v.loop_start, sp->v.loop_end); } #endif sp->v.sample_rate = sample->samplerate; if (lay->set[SF_keyRange]) { sp->v.low_freq = freq_table[LO_VAL(lay->val[SF_keyRange])]; sp->v.high_freq = freq_table[HI_VAL(lay->val[SF_keyRange])]; } else { sp->v.low_freq = freq_table[0]; sp->v.high_freq = freq_table[127]; } if (lay->set[SF_keyExclusiveClass]) sp->v.exclusiveClass = lay->val[SF_keyExclusiveClass]; else sp->v.exclusiveClass = 0; /* scale tuning: 0 - 100 */ sp->v.scale_tuning = 100; if (lay->set[SF_scaleTuning]) { if (sf->version == 1) sp->v.scale_tuning = lay->val[SF_scaleTuning] ? 50 : 100; else sp->v.scale_tuning = lay->val[SF_scaleTuning]; } /** --gl **/ #if 0 sp->v.freq_scale = 1024; sp->v.freq_center = 60; #endif if (sp->v.scale_tuning == 100) sp->v.freq_scale = 1024; else sp->v.freq_scale = (sp->v.scale_tuning * 1024) / 100; /* sp->v.freq_center = 60; set in calc_root_pitch */ sp->v.attenuation = 0; /** **/ /* root pitch */ sp->v.root_freq = calc_root_pitch(lay, sf, sp, cfg_tuning); /* * if (banknum < 128 && (preset == 11 || preset == 42)) fprintf(stderr, "preset %d, root_freq %ld (scale tune %d, freq scale %d, center %d)\n", preset, sp->v.root_freq, sp->v.scale_tuning, sp->v.freq_scale, sp->v.freq_center); * */ /* volume envelope & total volume */ sp->v.volume = 1.0; /* was calc_volume(lay,sf) */ if (lay->set[SF_sampleFlags]) sampleFlags = lay->val[SF_sampleFlags]; else sampleFlags = 0; sp->v.modes = MODES_16BIT | MODES_ENVELOPE; if (sampleFlags == 3) sp->v.modes |= MODES_FAST_RELEASE; /* arbitrary adjustments (look at sustain of vol envelope? ) */ if (sampleFlags && lay->val[SF_sustainEnv2] == 0) sampleFlags = 3; else if (sampleFlags && lay->val[SF_sustainEnv2] >= 1000) sampleFlags = 1; else if (banknum != 128) { /* organs, accordians */ if (program >= 16 && program <= 23) sampleFlags = 3; /* strings */ else if (program >= 40 && program <= 44) sampleFlags = 3; /* strings, voice */ else if (program >= 48 && program <= 54) sampleFlags = 3; /* horns, woodwinds */ else if (program >= 56 && program <= 79) sampleFlags = 3; /* lead, pad, fx */ else if (program >= 80 && program <=103) sampleFlags = 3; /* bagpipe, fiddle, shanai */ else if (program >=109 && program <=111) sampleFlags = 3; /* breath noise, ... telephone, helicopter */ else if (program >=121 && program <=125) sampleFlags = 3; /* applause */ else if (program ==126) sampleFlags = 3; } if (sampleFlags == 2) sampleFlags = 0; if (sampleFlags == 1 || sampleFlags == 3) sp->v.modes |= MODES_LOOPING; if (sampleFlags == 3) sp->v.modes |= MODES_SUSTAIN; convert_volume_envelope(lay, sf, sp, banknum, program); convert_modulation_envelope(lay, sf, sp, banknum, program); if (strip_tail == 1) sp->v.data_length = sp->v.loop_end + 1; /* Strip any loops and envelopes we're permitted to */ if ((strip_loop==1) && (sp->v.modes & (MODES_SUSTAIN | MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE))) { ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Removing loop and/or sustain"); sp->v.modes &=~(MODES_SUSTAIN | MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE); } if (strip_envelope==1) { if (sp->v.modes & MODES_ENVELOPE) ctl->cmsg(CMSG_INFO, VERB_DEBUG, " - Removing envelope"); sp->v.modes &= ~MODES_ENVELOPE; } /* if (banknum == 128 && !(sp->v.modes&(MODES_LOOPING|MODES_SUSTAIN))) sp->v.modes |= MODES_FAST_RELEASE; */ /* panning position: 0 to 127 */ if (panning != -1) sp->v.panning=(uint8)(panning & 0x7F); else if (lay->set[SF_panEffectsSend]) { #ifdef tplussbk int val; /* panning position: 0 to 127 */ val = (int)tbl->val[SF_panEffectsSend]; if(val <= -500) sp->v.panning = 0; else if(val >= 500) sp->v.panning = 127; else sp->v.panning = (int8)((val + 500) * 127 / 1000); #else if (sf->version == 1) sp->v.panning = (int8)lay->val[SF_panEffectsSend]; else sp->v.panning = (int8)(((int)lay->val[SF_panEffectsSend] + 500) * 127 / 1000); #endif } else sp->v.panning = 64; if (lay->set[SF_chorusEffectsSend]) { if (sf->version == 1) sp->v.chorusdepth = (int8)lay->val[SF_chorusEffectsSend]; else sp->v.chorusdepth = (int8)((int)lay->val[SF_chorusEffectsSend] * 127 / 1000); } else sp->v.chorusdepth = 0; if (lay->set[SF_reverbEffectsSend]) { if (sf->version == 1) sp->v.reverberation = (int8)lay->val[SF_reverbEffectsSend]; else sp->v.reverberation = (int8)((int)lay->val[SF_reverbEffectsSend] * 127 / 1000); } else sp->v.reverberation = 0; /* tremolo & vibrato */ sp->v.tremolo_sweep_increment = 0; sp->v.tremolo_phase_increment = 0; sp->v.tremolo_depth = 0; #ifndef SF_SUPPRESS_TREMOLO convert_tremolo(lay, sf, sp); #endif sp->v.lfo_sweep_increment = 0; sp->v.lfo_phase_increment = 0; sp->v.modLfoToFilterFc = 0; #ifndef SF_SUPPRESS_TREMOLO convert_lfo(lay, sf, sp); #endif sp->v.vibrato_sweep_increment = 0; sp->v.vibrato_control_ratio = 0; sp->v.vibrato_depth = 0; sp->v.vibrato_delay = 0; #ifndef SF_SUPPRESS_VIBRATO convert_vibrato(lay, sf, sp); #endif /* set note to use for drum voices */ if (note_to_use!=-1) sp->v.note_to_use = (uint8)note_to_use; else if (banknum == 128) sp->v.note_to_use = keynote; else sp->v.note_to_use = 0; /* convert to fractional samples */ sp->v.data_length <<= FRACTION_BITS; sp->v.loop_start <<= FRACTION_BITS; sp->v.loop_end <<= FRACTION_BITS; /* point to the file position */ sp->startsample = sp->startsample * 2 + sf->samplepos; sp->endsample *= 2; /*printf("%s: bank %d, preset %d\n", *namep, banknum, preset);*/ /* set cutoff frequency */ /*if (lay->set[SF_initialFilterFc] || lay->set[SF_env1ToFilterFc])*/ calc_cutoff(lay, sf, sp); /*else sp->cutoff_freq = 0;*/ /* if (sp->cutoff_freq) printf("bank %d, program %d, f= %d (%d)\n", banknum, program, sp->cutoff_freq, lay->val[SF_initialFilterFc]); */ if (lay->set[SF_initialFilterQ]) calc_filterQ(lay, sf, sp); sp->v.cutoff_freq = sp->cutoff_freq; sp->v.resonance = sp->resonance; } /* calculate root pitch */ static int32 calc_root_pitch(Layer *lay, SFInfo *sf, SampleList *sp, int32 cfg_tuning) { int32 root, tune; tsampleinfo *sample; sample = &sf->sampleinfo[lay->val[SF_sampleId]]; root = sample->originalPitch; /* sp->v.freq_center = root; */ tune = sample->pitchCorrection; if (sf->version == 1) { if (lay->set[SF_samplePitch]) { root = lay->val[SF_samplePitch] / 100; tune = -lay->val[SF_samplePitch] % 100; if (tune <= -50) { root++; tune = 100 + tune; } if (sp->v.scale_tuning == 50) tune /= 2; } /* orverride root key */ if (lay->set[SF_rootKey]) root += lay->val[SF_rootKey] - 60; /* tuning */ tune += lay->val[SF_coarseTune] * sp->v.scale_tuning + lay->val[SF_fineTune] * sp->v.scale_tuning / 100; } else { /* override root key */ if (lay->set[SF_rootKey]) root = lay->val[SF_rootKey]; /* tuning */ #ifdef tplussbk tune += lay->val[SF_coarseTune] * sp->v.scale_tuning + (int)lay->val[SF_fineTune] * (int)sp->v.scale_tuning / 100; #else tune += lay->val[SF_coarseTune] * 100 + lay->val[SF_fineTune]; #endif } tune += cfg_tuning; /* it's too high.. */ if (lay->set[SF_keyRange] && root >= HI_VAL(lay->val[SF_keyRange]) + 60) root -= 60; while (tune <= -100) { root++; tune += 100; } while (tune > 0) { root--; tune -= 100; } if (root > 0) sp->v.freq_center = root; else sp->v.freq_center = 60; /* have to adjust for rate ... */ /* sp->v.sample_rate */ /* play_mode->rate */ #ifdef tplussbkuse /* -100 < tune <= 0 */ tune = (-tune * 256) / 100; /* 256 > tune >= 0 */ /* 1.059 >= bend_fine[tune] >= 1.0 */ if(root > 127) return (int32)((FLOAT_T)freq_table[127] * bend_coarse[root - 127] * bend_fine[tune]); else if(root < 0) return (int32)((FLOAT_T)freq_table[0] / bend_coarse[-root] * bend_fine[tune]); else return (int32)((FLOAT_T)freq_table[root] * bend_fine[tune]); #else return (int32)((double)freq_table[root] * bend_fine[(-tune*255)/100]); #endif } /*#define EXAMINE_SOME_ENVELOPES*/ /*---------------------------------------------------------------- * convert volume envelope *----------------------------------------------------------------*/ static void convert_volume_envelope(Layer *lay, SFInfo *sf, SampleList *sp, int banknum, int preset) { uint32 sustain = calc_sustain(lay, sf, banknum, preset); double delay = to_msec(lay, sf, SF_delayEnv2); double attack = to_msec(lay, sf, SF_attackEnv2); double hold = to_msec(lay, sf, SF_holdEnv2); double decay = to_msec(lay, sf, SF_decayEnv2); double release = to_msec(lay, sf, SF_releaseEnv2); FLOAT_T vol = calc_volume(lay,sf); uint32 volume; /* int milli = play_mode->rate/1000; */ #ifdef EXAMINE_SOME_ENVELOPES static int no_shown = 0; no_shown = banknum==128 && (preset == 57 || preset == 56); if (no_shown) { printf("PRESET %d\n",preset); printf("vol %f sustainEnv2 %d delayEnv2 %d attackEnv2 %d holdEnv2 %d decayEnv2 %d releaseEnv2 %d\n", vol, lay->val[SF_sustainEnv2], lay->val[SF_delayEnv2], lay->val[SF_attackEnv2], lay->val[SF_holdEnv2], lay->val[SF_decayEnv2], lay->val[SF_releaseEnv2] ); printf("attack %f hold %f sustain %ld decay %f release %f delay %f\n", attack, hold, sustain, decay, release, delay); } #endif if (vol > 255.0) volume = 255; else if (vol < 1.0) volume = 0; else volume = (uint32)vol; if (!lay->set[SF_releaseEnv2] && banknum < 128) release = 400; if (!lay->set[SF_decayEnv2] && banknum < 128) decay = 400; #define HOLD_EXCURSION 1 #define ENV_BOTTOM 0 /* ramp from 0 to in msecs */ sp->v.envelope_offset[ATTACK] = to_offset(volume); sp->v.envelope_rate[ATTACK] = calc_rate(volume, attack); /* ramp down HOLD_EXCURSION in msecs */ sp->v.envelope_offset[HOLD] = to_offset(volume-HOLD_EXCURSION); sp->v.envelope_rate[HOLD] = calc_rate(HOLD_EXCURSION, hold); /* ramp down by in msecs */ if(sustain <= ENV_BOTTOM) sustain = ENV_BOTTOM; if(sustain > volume - HOLD_EXCURSION) sustain = volume - HOLD_EXCURSION; sp->v.envelope_offset[DECAY] = to_offset(sustain); sp->v.envelope_rate[DECAY] = calc_rate(volume - HOLD_EXCURSION - sustain, decay); if (fast_decay) sp->v.envelope_rate[DECAY] *= 2; /* ramp to ENV_BOTTOM in ?? msec */ sp->v.envelope_offset[RELEASE] = to_offset(ENV_BOTTOM); sp->v.envelope_rate[RELEASE] = calc_rate(255, release); if (fast_decay) sp->v.envelope_rate[RELEASE] *= 2; sp->v.envelope_offset[RELEASEB] = to_offset(ENV_BOTTOM); sp->v.envelope_rate[RELEASEB] = to_offset(200); sp->v.envelope_offset[RELEASEC] = to_offset(ENV_BOTTOM); sp->v.envelope_rate[RELEASEC] = to_offset(200); /* pc400.sf2 has bad delay times for soprano sax */ if (delay > 5) delay = 5; sp->v.envelope_rate[DELAY] = (int32)( (delay*play_mode->rate) / 1000 ); sp->v.modes |= MODES_ENVELOPE; #ifdef EXAMINE_SOME_ENVELOPES if (no_shown) { /*no_shown++;*/ printf(" attack(0): off %ld rate %ld\n", sp->v.envelope_offset[0] >>(7+15), sp->v.envelope_rate[0] >>(7+15)); printf(" hold(1): off %ld rate %ld\n", sp->v.envelope_offset[1] >>(7+15), sp->v.envelope_rate[1] >>(7+15)); printf("sustain(2): off %ld rate %ld\n", sp->v.envelope_offset[2] >>(7+15), sp->v.envelope_rate[2] >>(7+15)); printf("release(3): off %ld rate %ld\n", sp->v.envelope_offset[3] >>(7+15), sp->v.envelope_rate[3] >>(7+15)); printf(" decay(4): off %ld rate %ld\n", sp->v.envelope_offset[4] >>(7+15), sp->v.envelope_rate[4] >>(7+15)); printf(" die(5): off %ld rate %ld\n", sp->v.envelope_offset[5] >>(7+15), sp->v.envelope_rate[5] >>(7+15)); printf(" delay(6): off %ld rate %ld\n", sp->v.envelope_offset[6], sp->v.envelope_rate[6]); } #endif } static void convert_modulation_envelope(Layer *lay, SFInfo *sf, SampleList *sp, int banknum, int preset) { uint32 sustain = calc_modulation_sustain(lay, sf, banknum, preset); double delay = to_msec(lay, sf, SF_delayEnv1); double attack = to_msec(lay, sf, SF_attackEnv1); double hold = to_msec(lay, sf, SF_holdEnv1); double decay = to_msec(lay, sf, SF_decayEnv1); double release = to_msec(lay, sf, SF_releaseEnv1); FLOAT_T vol = calc_volume(lay,sf); uint32 volume; #ifdef EXAMINE_SOME_ENVELOPES static int no_shown = 0; no_shown = banknum==0 && (preset == 11 || preset == 64); if (no_shown) { printf("PRESET %d\n",preset); printf("sustainEnv1 %d delayEnv1 %d attackEnv1 %d holdEnv1 %d decayEnv1 %d releaseEnv1 %d\n", lay->val[SF_sustainEnv1], lay->val[SF_delayEnv1], lay->val[SF_attackEnv1], lay->val[SF_holdEnv1], lay->val[SF_decayEnv1], lay->val[SF_releaseEnv1] ); printf("attack %f hold %f sustain %ld decay %f release %f delay %f\n", attack, hold, sustain, decay, release, delay); } #endif if (vol > 255.0) volume = 255; else if (vol < 1.0) volume = 0; else volume = (uint32)vol; /* ramp from 0 to in msecs */ sp->v.modulation_offset[ATTACK] = to_offset(volume); sp->v.modulation_rate[ATTACK] = calc_rate(volume, attack); /* ramp down HOLD_EXCURSION in msecs */ sp->v.modulation_offset[HOLD] = to_offset(volume-HOLD_EXCURSION); sp->v.modulation_rate[HOLD] = calc_rate(HOLD_EXCURSION, hold); /* ramp down by in msecs */ if(sustain <= ENV_BOTTOM) sustain = ENV_BOTTOM; if(sustain > volume - HOLD_EXCURSION) sustain = volume - HOLD_EXCURSION; sp->v.modulation_offset[DECAY] = to_offset(sustain); sp->v.modulation_rate[DECAY] = calc_rate(volume - HOLD_EXCURSION - sustain, decay); if (fast_decay) sp->v.modulation_rate[DECAY] *= 2; /* ramp to ENV_BOTTOM in ?? msec */ sp->v.modulation_offset[RELEASE] = to_offset(ENV_BOTTOM); sp->v.modulation_rate[RELEASE] = calc_rate(255, release); if (fast_decay) sp->v.modulation_rate[RELEASE] *= 2; sp->v.modulation_offset[RELEASEB] = to_offset(ENV_BOTTOM); sp->v.modulation_rate[RELEASEB] = to_offset(200); sp->v.modulation_offset[RELEASEC] = to_offset(ENV_BOTTOM); sp->v.modulation_rate[RELEASEC] = to_offset(200); if (delay > 5) delay = 5; sp->v.modulation_rate[DELAY] = (int32)( (delay*play_mode->rate) / 1000 ); #ifdef EXAMINE_SOME_ENVELOPES if (no_shown) { /*no_shown++;*/ printf(" attack(0): off %ld rate %ld\n", sp->v.modulation_offset[0] >>(7+15), sp->v.modulation_rate[0] >>(7+15)); printf(" hold(1): off %ld rate %ld\n", sp->v.modulation_offset[1] >>(7+15), sp->v.modulation_rate[1] >>(7+15)); printf("sustain(2): off %ld rate %ld\n", sp->v.modulation_offset[2] >>(7+15), sp->v.modulation_rate[2] >>(7+15)); printf("release(3): off %ld rate %ld\n", sp->v.modulation_offset[3] >>(7+15), sp->v.modulation_rate[3] >>(7+15)); printf(" decay(4): off %ld rate %ld\n", sp->v.modulation_offset[4] >>(7+15), sp->v.modulation_rate[4] >>(7+15)); printf(" die(5): off %ld rate %ld\n", sp->v.modulation_offset[5] >>(7+15), sp->v.modulation_rate[5] >>(7+15)); printf(" delay(6): off %ld rate %ld\n", sp->v.modulation_offset[6], sp->v.modulation_rate[6]); } #endif } /* convert from 8bit value to fractional offset (15.15) */ static uint32 to_offset(uint32 offset) { if (offset >255) return 255 << (7+15); return (uint32)offset << (7+15); } /* calculate ramp rate in fractional unit; * diff = 8bit, time = msec */ static uint32 calc_rate(uint32 diff, double msec) { double rate; diff <<= (7+15); /* rate = ((double)diff / play_mode->rate) * control_ratio * 1000.0 / msec; */ /** rate = ( (double)diff * 1000.0 ) / (msec * CONTROLS_PER_SECOND); **/ /** rate = ( (double)diff * 1000.0 ) / CONTROLS_PER_SECOND; **/ rate = ( (double)diff * 1000.0 ) / (msec * CONTROLS_PER_SECOND); /* rate *= 2; ad hoc adjustment ?? */ if (rate < 10.0) return 10; return (uint32)rate; /* * control_ratio = play_mode->rate / CONTROLS_PER_SECOND; * samples per control = (samples per sec) / (controls per sec) * rate is amp-change per control * diff per msec * diff*1000 per sec * (diff*1000 per sec) / (controls per sec) = amp change per control * diff/(msec/1000) = (diff * 1000) / msec = amp change per sec * ((diff * 1000)/msec) / CONTROLS_PER_SECOND = amp change per control * = (diff * 1000) / (msec * CONTROLS_PER_SECOND) */ } #define TO_MSEC(tcents) (int32)(1000 * pow(2.0, (double)(tcents) / 1200.0)) #define TO_MHZ(abscents) (int32)(8176.0 * pow(2.0,(double)(abscents)/1200.0)) #define TO_HZ(abscents) (int32)(8.176 * pow(2.0,(double)(abscents)/1200.0)) /* #define TO_HZ(abscents) (int32)(8176 * pow(2.0,(double)(abscents)/12000.0)) */ #define TO_LINEAR(centibel) pow(10.0, -(double)(centibel)/200.0) /* #define TO_VOLUME(centibel) (uint8)(255 * (1.0 - (centibel) / (1200.0 * log10(2.0)))); */ #define TO_VOLUME(centibel) (uint8)(255 * pow(10.0, -(double)(centibel)/200.0)) /* convert the value to milisecs */ static double to_msec(Layer *lay, SFInfo *sf, int index) { int16 value; double msec; if (sf->version == 1) { if (! lay->set[index]) return 1.0; /* 6msec minimum */ value = lay->val[index]; return (double)value; } if (lay->set[index]) value = lay->val[index]; else value = -12000; if (index == SF_attackEnv2 && value > 1000) value = -12000; msec = (double)(1000 * pow(2.0, (double)( value ) / 1200.0)); /*if (msec > 1000.0) return 1.0;*/ return msec; } #define CB_TO_VOLUME(centibel) (255 * (1.0 - ((double)(centibel)/100.0) / (1200.0 * log10(2.0)) )) /* convert peak volume to linear volume (0-255) */ static FLOAT_T calc_volume(Layer *lay, SFInfo *sf) { if (sf->version == 1) return (FLOAT_T)(lay->val[SF_instVol] * 2) / 255.0; else return CB_TO_VOLUME((double)lay->val[SF_instVol]); } /* convert sustain volume to linear volume */ static uint32 calc_sustain(Layer *lay, SFInfo *sf, int banknum, int preset) { int32 level; if (!lay->set[SF_sustainEnv2]) return 250; level = lay->val[SF_sustainEnv2]; if (sf->version == 1) { if (level < 96) level = 1000 * (96 - level) / 96; else return 0; } return TO_VOLUME(level); } /* convert sustain volume to linear volume */ static uint32 calc_modulation_sustain(Layer *lay, SFInfo *sf, int banknum, int preset) { int32 level; if (!lay->set[SF_sustainEnv1]) return 250; level = lay->val[SF_sustainEnv1]; if (sf->version == 1) { if (level < 96) level = 1000 * (96 - level) / 96; else return 0; } return TO_VOLUME(level); } #ifndef SF_SUPPRESS_TREMOLO /*---------------------------------------------------------------- * tremolo (LFO1) conversion *----------------------------------------------------------------*/ static void convert_tremolo(Layer *lay, SFInfo *sf, SampleList *sp) { int32 level; uint32 freq; if (!lay->set[SF_lfo1ToVolume]) return; level = lay->val[SF_lfo1ToVolume]; if (!level) return; #if 0 printf("(lev=%d", (int)level); #endif if (level < 0) level = -level; if (sf->version == 1) level = (120 * level) / 64; /* to centibel */ /* else level = TO_VOLUME((double)level); */ else level = 255 - (uint8)(255 * (1.0 - (level) / (1200.0 * log10(2.0)))); sp->v.tremolo_depth = level; /* frequency in mHz */ if (! lay->set[SF_freqLfo1]) { if (sf->version == 1) freq = TO_MHZ(-725); else freq = 8; } else { freq = lay->val[SF_freqLfo1]; #if 0 printf(" freq=%d)", (int)freq); #endif if (freq > 0 && sf->version == 1) freq = (int)(3986.0 * log10((double)freq) - 7925.0); else freq = TO_HZ(freq); } #if 0 printf(" depth=%d freq=%d\n", (int)level, (int)freq); #endif if (freq < 1) freq = 1; freq *= 20; if (freq > 255) freq = 255; sp->v.tremolo_phase_increment = convert_tremolo_rate((uint8)freq); sp->v.tremolo_sweep_increment = convert_tremolo_sweep((uint8)(freq/5)); } static void convert_lfo(Layer *lay, SFInfo *sf, SampleList *sp) { int32 freq=0, level; if (sf->version == 1) return; if (!lay->set[SF_lfo1ToFilterFc] || !lay->set[SF_initialFilterFc]) return; level = lay->val[SF_lfo1ToFilterFc]; if (!level) return; /* FIXME: delay not yet implemented */ #ifdef DEBUG_CONVERT_LFO printf("(lev=%d", (int)level); #endif sp->v.modLfoToFilterFc = pow(2.0, ((FLOAT_T)level/1200.0)); /* frequency in mHz */ if (lay->set[SF_freqLfo1]) freq = lay->val[SF_freqLfo1]; #ifdef DEBUG_CONVERT_LFO printf(" freq=%d)", (int)freq); #endif if (!freq) freq = 8; else freq = TO_HZ(freq); #ifdef DEBUG_CONVERT_LFO printf(" depth=%f freq=%d\n", sp->modLfoToFilterFc, (int)freq); #endif if (freq < 1) freq = 1; freq *= 20; if (freq > 255) freq = 255; sp->v.lfo_phase_increment = convert_tremolo_rate((uint8)freq); sp->v.lfo_sweep_increment = convert_tremolo_sweep((uint8)(freq/5)); } #endif #ifndef SF_SUPPRESS_VIBRATO /*---------------------------------------------------------------- * vibrato (LFO2) conversion * (note: my changes to Takashi's code are unprincipled --gl) *----------------------------------------------------------------*/ static void convert_vibrato(Layer *lay, SFInfo *sf, SampleList *sp) { int32 shift=0, freq=0, delay=0; if (lay->set[SF_lfo2ToPitch]) { shift = lay->set[SF_lfo2ToPitch]; if (lay->set[SF_freqLfo2]) freq = lay->val[SF_freqLfo2]; #if 0 printf("modLfo=%d freq=%d",(int)shift, (int)freq); #endif if (lay->set[SF_delayLfo2]) delay = (int32)to_msec(lay, sf, SF_delayLfo2); } else if (lay->set[SF_lfo1ToPitch]) { shift = lay->set[SF_lfo1ToPitch]; if (lay->set[SF_freqLfo1]) freq = lay->val[SF_freqLfo1]; #if 0 printf("vibLfo=%d freq=%d",(int)shift, (int)freq); #endif if (lay->set[SF_delayLfo1]) delay = (int32)to_msec(lay, sf, SF_delayLfo1); } /* else if (lay->set[SF_freqLfo2]) { freq = lay->val[SF_freqLfo2]; shift = 1; } */ if (!shift) return; /* pitch shift in cents (= 1/100 semitone) */ if (sf->version == 1) shift = (1200 * shift / 64 + 1) / 2; /* cents to linear; 400cents = 256 */ /*sp->v.vibrato_depth = (int8)((int32)shift * 256 / 400);*/ /** sp->v.vibrato_depth = shift * 400 / 64; **/ sp->v.vibrato_depth = (int32)(pow(2.0, ((FLOAT_T)shift/1200.0)) * VIBRATO_RATE_TUNING); /* frequency in mHz */ if (!freq) { if (sf->version == 1) freq = TO_HZ(-725); else freq = 8; } else { if (sf->version == 1) freq = (int32)(3986.0 * log10((double)freq) - 7925.0); else freq = TO_HZ(freq); } if (freq < 1) freq = 1; freq *= 20; if (freq > 255) freq = 255; sp->v.vibrato_control_ratio = convert_vibrato_rate((uint8)freq); /* convert mHz to control ratio */ #if 0 sp->v.vibrato_control_ratio = freq * (VIBRATO_RATE_TUNING * play_mode->rate) / (2 * CONTROLS_PER_SECOND * VIBRATO_SAMPLE_INCREMENTS); #endif #if 0 printf(" f=%d depth=%d (shift %d)\n", (int)freq, (int)sp->v.vibrato_depth, (int)shift); #endif /* sp->v.vibrato_sweep_increment = 74; */ sp->v.vibrato_sweep_increment = convert_vibrato_sweep((uint8)(freq/5), sp->v.vibrato_control_ratio); sp->v.vibrato_delay = delay * control_ratio; } #endif /* calculate cutoff/resonance frequency */ static void calc_cutoff(Layer *lay, SFInfo *sf, SampleList *sp) { int16 val; if (! lay->set[SF_initialFilterFc]) { val = 13500; } else { val = lay->val[SF_initialFilterFc]; if (sf->version == 1) { if (val == 127) val = 14400; else if (val > 0) val = 50 * val + 4366; } } if (lay->set[SF_env1ToFilterFc] && lay->set[SF_initialFilterFc]) { sp->v.modEnvToFilterFc = pow(2.0, ((FLOAT_T)lay->val[SF_env1ToFilterFc]/1200.0)); /* sp->v.modEnvToFilterFc = pow(2.0, ((FLOAT_T)lay->val[SF_env1ToFilterFc]/12000.0)); */ /* printf("val %d -> %f\n", (int)lay->val[SF_env1ToFilterFc], sp->v.modEnvToFilterFc); */ } else sp->v.modEnvToFilterFc = 0; if (lay->set[SF_env1ToPitch]) { sp->v.modEnvToPitch = pow(2.0, ((FLOAT_T)lay->val[SF_env1ToPitch]/1200.0)); /* printf("mE %d -> %f\n", (int)lay->val[SF_env1ToPitch], sp->v.modEnvToPitch);*/ } else sp->v.modEnvToPitch = 0; sp->cutoff_freq = TO_HZ(val); if (lay->set[SF_autoHoldEnv1]) sp->v.keyToModEnvHold=lay->val[SF_autoHoldEnv1]; else sp->v.keyToModEnvHold=0; if (lay->set[SF_autoDecayEnv1]) sp->v.keyToModEnvDecay=lay->val[SF_autoDecayEnv1]; else sp->v.keyToModEnvDecay=0; if (lay->set[SF_autoHoldEnv2]) sp->v.keyToVolEnvHold=lay->val[SF_autoHoldEnv2]; else sp->v.keyToVolEnvHold=0; if (lay->set[SF_autoDecayEnv2]) sp->v.keyToVolEnvDecay=lay->val[SF_autoDecayEnv2]; else sp->v.keyToVolEnvDecay=0; } static void calc_filterQ(Layer *lay, SFInfo *sf, SampleList *sp) { int16 val = lay->val[SF_initialFilterQ]; if (sf->version == 1) val = val * 3 / 2; /* to centibels */ sp->resonance = pow(10.0, (double)val / 2.0 / 200.0) - 1; if (sp->resonance < 0) sp->resonance = 0; } alsaplayer-0.99.82/attic/midi/tables.c000066400000000000000000002647131466261456500175400ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . The 8-bit uLaw to 16-bit PCM and the 13-bit-PCM to 8-bit uLaw tables were lifted from the rsynth-2.0 sources. The README says: > > This is a text to speech system produced by integrating various pieces > of code and tables of data, which are all (I believe) in the public domain. > > The bulk of the intergration was done by myself, that is Nick Ing-Simmons. > I can be reached via my employer at nik@tiuk.ti.com. > */ #include #include "gtim.h" #include "common.h" #include "tables.h" uint32 freq_table[128]= { 8176, 8662, 9177, 9723, 10301, 10913, 11562, 12250, 12978, 13750, 14568, 15434, 16352, 17324, 18354, 19445, 20602, 21827, 23125, 24500, 25957, 27500, 29135, 30868, 32703, 34648, 36708, 38891, 41203, 43654, 46249, 48999, 51913, 55000, 58270, 61735, 65406, 69296, 73416, 77782, 82407, 87307, 92499, 97999, 103826, 110000, 116541, 123471, 130813, 138591, 146832, 155563, 164814, 174614, 184997, 195998, 207652, 220000, 233082, 246942, 261626, 277183, 293665, 311127, 329628, 349228, 369994, 391995, 415305, 440000, 466164, 493883, 523251, 554365, 587330, 622254, 659255, 698456, 739989, 783991, 830609, 880000, 932328, 987767, 1046502, 1108731, 1174659, 1244508, 1318510, 1396913, 1479978, 1567982, 1661219, 1760000, 1864655, 1975533, 2093005, 2217461, 2349318, 2489016, 2637020, 2793826, 2959955, 3135963, 3322438, 3520000, 3729310, 3951066, 4186009, 4434922, 4698636, 4978032, 5274041, 5587652, 5919911, 6271927, 6644875, 7040000, 7458620, 7902133, 8372018, 8869844, 9397273, 9956063, 10548082, 11175303, 11839822, 12543854 }; /* v=2.^((x/127-1) * 6) */ #ifdef tplus FLOAT_T def_vol_table[128] = #else FLOAT_T vol_table[128] = #endif { 0.015625, 0.016145143728351113, 0.016682602624583379, 0.017237953096759438, 0.017811790741104401, 0.01840473098076444, 0.019017409725829021, 0.019650484055324921, 0.020304632921913132, 0.020980557880044631, 0.021678983838355849, 0.02240065983711079, 0.023146359851523596, 0.023916883621822989, 0.024713057510949051, 0.025535735390801884, 0.026385799557992876, 0.027264161680080529, 0.028171763773305786, 0.029109579212875332, 0.030078613776876421, 0.031079906724942836, 0.032114531912828696, 0.033183598944085631, 0.034288254360078256, 0.035429682869614412, 0.036609108619508737, 0.037827796507442342, 0.039087053538526394, 0.040388230227024875, 0.041732722044739302, 0.043121970917609151, 0.044557466772132896, 0.046040749133268132, 0.047573408775524545, 0.049157089429020417, 0.050793489542332405, 0.05248436410402918, 0.054231526524842463, 0.056036850582493913, 0.057902272431264008, 0.059829792678457581, 0.061821478529993396, 0.063879466007418645, 0.066005962238725971, 0.068203247825430205, 0.070473679288442961, 0.072819691595368496, 0.075243800771931268, 0.077748606600335793, 0.080336795407452768, 0.083011142945821612, 0.085774517370559328, 0.088629882315368294, 0.091580300070941839, 0.094628934869176312, 0.097779056276712184, 0.10103404270144323, 0.1043973850157546, 0.1078726903003755, 0.11146368571286204, 0.11517422248485852, 0.11900828005242428, 0.12296997032385605, 0.12706354208958254, 0.13129338557886089, 0.13566403716816194, 0.14018018424629392, 0.14484667024148207, 0.14966849981579558, 0.15465084423249356, 0.15979904690204472, 0.16511862911277009, 0.17061529595225433, 0.17629494242587571, 0.18216365977901747, 0.18822774202974024, 0.19449369271892172, 0.20096823188510385, 0.20765830327152621, 0.21457108177307616, 0.22171398113114205, 0.2290946618846218, 0.23672103958561411, 0.2446012932886038, 0.25274387432224471, 0.26115751535314891, 0.26985123975140174, 0.27883437126784744, 0.28811654403352405, 0.29770771289197112, 0.30761816407549192, 0.31785852623682015, 0.32843978184802081, 0.33937327897885317, 0.3506707434672246, 0.36234429149478936, 0.37440644258117928, 0.38687013301080181, 0.39974872970660535, 0.41305604456569134, 0.42680634927214656, 0.44101439060298442, 0.45569540624360722, 0.47086514112975281, 0.48653986433345225, 0.50273638651110641, 0.51947207793239625, 0.53676488710936021, 0.55463336004561792, 0.57309666012638816, 0.59217458867062556, 0.61188760616732485, 0.63225685421876243, 0.65330417821421161, 0.67505215075844849, 0.69752409588017272, 0.72074411404630734, 0.74473710800900605, 0.76952880951308478, 0.79514580689252357, 0.82161557358563286, 0.84896649759946774, 0.87722791195508854, 0.90643012614631979, 0.93660445864574493, 0.96778327049280244, 1 }; #ifdef tplus /* v=2.^((x/127-1) * 8) */ FLOAT_T gs_vol_table[128] = { 0.0039062500000000, 0.0040805861773930, 0.0042627029890894, 0.0044529476852761, 0.0046516830139370, 0.0048592879125210, 0.0050761582304783, 0.0053027074840446, 0.0055393676447105, 0.0057865899628809, 0.0060448458282938, 0.0063146276688402, 0.0065964498894982, 0.0068908498531716, 0.0071983889053037, 0.0075196534442191, 0.0078552560392360, 0.0082058365986788, 0.0085720635900196, 0.0089546353144748, 0.0093542812384872, 0.0097717633846316, 0.0102078777845971, 0.0106634559970159, 0.0111393666930332, 0.0116365173126407, 0.0121558557949326, 0.0126983723855831, 0.0132651015249917, 0.0138571238206964, 0.0144755681078160, 0.0151216136014500, 0.0157964921451403, 0.0165014905596815, 0.0172379530967594, 0.0180072840020952, 0.0188109501929828, 0.0196504840553249, 0.0205274863655013, 0.0214436293426398, 0.0224006598371108, 0.0234004026613237, 0.0244447640691781, 0.0255357353908019, 0.0266753968295092, 0.0278659214282155, 0.0291095792128753, 0.0304087415208408, 0.0317658855223956, 0.0331835989440856, 0.0346645850028511, 0.0362116675603705, 0.0378277965074423, 0.0395160533886726, 0.0412796572781925, 0.0431219709176092, 0.0450465071278942, 0.0470569355074350, 0.0491570894290204, 0.0513509733491021, 0.0536427704432691, 0.0560368505824939, 0.0585377786653591, 0.0611503233221510, 0.0638794660074186, 0.0667304104983335, 0.0697085928169619, 0.0728196915953685, 0.0760696389033161, 0.0794646315592050, 0.0830111429458216, 0.0867159353534234, 0.0905860728736973, 0.0946289348691763, 0.0988522300437961, 0.1032640111414228, 0.1078726903003755, 0.1126870550932231, 0.1177162852824382, 0.1229699703238561, 0.1284581276513148, 0.1341912217773400, 0.1401801842462939, 0.1464364344780349, 0.1529719015418313, 0.1597990469020447, 0.1669308881789572, 0.1743810239700432, 0.1821636597790175, 0.1902936351020982, 0.1987864517231309, 0.2076583032715261, 0.2169261060993699, 0.2266075315365799, 0.2367210395856142, 0.2472859141199736, 0.2583222996536178, 0.2698512397514017, 0.2818947171537718, 0.2944756956922309, 0.3076181640754921, 0.3213471816298112, 0.3356889260807141, 0.3506707434672246, 0.3663212002837674, 0.3826701379491676, 0.3997487297066054, 0.4175895400630182, 0.4362265868812885, 0.4556954062436073, 0.4760331202096971, 0.4972785075990854, 0.5194720779323964, 0.5426561486726478, 0.5668749259138306, 0.5921745886706254, 0.6186033769299742, 0.6462116836323980, 0.6750521507584486, 0.7051797697035029, 0.7366519861322902, 0.7695288095130848, 0.8038729275404152, 0.8397498256644669, 0.8772279119550889, 0.9163786475384874, 0.9572766828553213, 1.0000000000000000 }; FLOAT_T *xg_vol_table = gs_vol_table; FLOAT_T *vol_table = def_vol_table; #endif /* v=2.^((x/127-1) * 4) */ FLOAT_T expr_table[128] = { 0.062500000000000000, 0.063879466007418617, 0.065289378838287213, 0.066730410498333517, 0.068203247825430205, 0.069708592816961873, 0.071247162964417632, 0.072819691595368496, 0.074426928222992794, 0.076069638903316056, 0.077748606600335793, 0.079464631559205010, 0.081218531687652529, 0.083011142945821639, 0.084843319744713291, 0.086715935353423396, 0.088629882315368322, 0.090586072873697340, 0.092585439406094330, 0.094628934869176312, 0.096717533252700480, 0.098852230043796174, 0.101034042701443255, 0.103264011141422821, 0.105543198231971461, 0.107872690300375454, 0.110253597650746091, 0.112687055093223104, 0.115174222484858521, 0.117716285282438229, 0.120314455107505686, 0.122969970323856051, 0.125684096627776631, 0.128458127651314785, 0.131293385578860888, 0.134191221777339997, 0.137153017440313080, 0.140180184246293943, 0.143274165031597039, 0.146436434478035005, 0.149668499815795553, 0.152971901541831212, 0.156348214154105547, 0.159799046902044661, 0.163326044553552957, 0.166930888178957210, 0.170615295952254331, 0.174381023970043153, 0.178229867088531585, 0.182163659779017467, 0.186184277002251486, 0.190293635102098180, 0.194493692718921724, 0.198786451723130919, 0.203173958169329677, 0.207658303271526207, 0.212241624399866963, 0.216926106099369798, 0.221713981131142046, 0.226607531536579865, 0.231609089725056033, 0.236721039585614190, 0.241945817623200610, 0.247285914119973582, 0.252743874322244710, 0.258322299653617804, 0.264023848954903828, 0.269851239751401739, 0.275807249548151001, 0.281894717153771790, 0.288116544033524102, 0.294475695692230921, 0.300975203087725074, 0.307618164075491973, 0.314407744885198681, 0.321347181629811129, 0.328439781848020751, 0.335688926080714045, 0.343098069482237422, 0.350670743467224599, 0.358410557393772644, 0.366321200283767356, 0.374406442581179333, 0.382670137949167655, 0.391116225106848792, 0.399748729706605410, 0.408571766252830038, 0.417589540063018294, 0.426806349272146446, 0.436226586881288292, 0.445854742851448105, 0.455695406243607215, 0.465753267406005200, 0.476033120209697069, 0.486539864333452310, 0.497278507599085373, 0.508254168358330150, 0.519472077932396359, 0.530937583105370092, 0.542656148672647887, 0.554633360045617918, 0.566874925913830707, 0.579386680965928047, 0.592174588670625557, 0.605244744119077360, 0.618603376929974136, 0.632256854218762432, 0.646211683632397893, 0.660474516451080240, 0.675052150758448599, 0.689951534681746304, 0.705179769703502823, 0.720744114046307338, 0.736651986132290215, 0.752910968118960744, 0.769528809513084777, 0.786513430864326790, 0.803872927540415394, 0.821615573585632974, 0.839749825664467098, 0.858284327092304622, 0.877227911955088646, 0.896589609319902503, 0.916378647538487301, 0.936604458645744820, 0.957276682855321193, 0.978405173154415220, 1.000000000000000000 }; FLOAT_T bend_fine[256] = { 1, 1.0002256593050698, 1.0004513695322617, 1.0006771306930664, 1.0009029427989777, 1.0011288058614922, 1.0013547198921082, 1.0015806849023274, 1.0018067009036538, 1.002032767907594, 1.0022588859256572, 1.0024850549693551, 1.0027112750502025, 1.0029375461797159, 1.0031638683694153, 1.0033902416308227, 1.0036166659754628, 1.0038431414148634, 1.0040696679605541, 1.0042962456240678, 1.0045228744169397, 1.0047495543507072, 1.0049762854369111, 1.0052030676870944, 1.0054299011128027, 1.0056567857255843, 1.00588372153699, 1.006110708558573, 1.0063377468018897, 1.0065648362784985, 1.0067919769999607, 1.0070191689778405, 1.0072464122237039, 1.0074737067491204, 1.0077010525656616, 1.0079284496849015, 1.0081558981184175, 1.008383397877789, 1.008610948974598, 1.0088385514204294, 1.0090662052268706, 1.0092939104055114, 1.0095216669679448, 1.0097494749257656, 1.009977334290572, 1.0102052450739643, 1.0104332072875455, 1.0106612209429215, 1.0108892860517005, 1.0111174026254934, 1.0113455706759138, 1.0115737902145781, 1.0118020612531047, 1.0120303838031153, 1.0122587578762337, 1.012487183484087, 1.0127156606383041, 1.0129441893505169, 1.0131727696323602, 1.0134014014954713, 1.0136300849514894, 1.0138588200120575, 1.0140876066888203, 1.0143164449934257, 1.0145453349375237, 1.0147742765327674, 1.0150032697908125, 1.0152323147233171, 1.015461411341942, 1.0156905596583505, 1.0159197596842091, 1.0161490114311862, 1.0163783149109531, 1.0166076701351838, 1.0168370771155553, 1.0170665358637463, 1.0172960463914391, 1.0175256087103179, 1.0177552228320703, 1.0179848887683858, 1.0182146065309567, 1.0184443761314785, 1.0186741975816487, 1.0189040708931674, 1.0191339960777379, 1.0193639731470658, 1.0195940021128593, 1.0198240829868295, 1.0200542157806898, 1.0202844005061564, 1.0205146371749483, 1.0207449257987866, 1.0209752663893958, 1.0212056589585028, 1.0214361035178368, 1.0216666000791297, 1.0218971486541166, 1.0221277492545349, 1.0223584018921241, 1.0225891065786274, 1.0228198633257899, 1.0230506721453596, 1.023281533049087, 1.0235124460487257, 1.0237434111560313, 1.0239744283827625, 1.0242054977406807, 1.0244366192415495, 1.0246677928971357, 1.0248990187192082, 1.025130296719539, 1.0253616269099028, 1.0255930093020766, 1.0258244439078401, 1.0260559307389761, 1.0262874698072693, 1.0265190611245079, 1.0267507047024822, 1.0269824005529853, 1.027214148687813, 1.0274459491187637, 1.0276778018576387, 1.0279097069162415, 1.0281416643063788, 1.0283736740398595, 1.0286057361284953, 1.0288378505841009, 1.0290700174184932, 1.0293022366434921, 1.0295345082709197, 1.0297668323126017, 1.0299992087803651, 1.030231637686041, 1.0304641190414621, 1.0306966528584645, 1.0309292391488862, 1.0311618779245688, 1.0313945691973556, 1.0316273129790936, 1.0318601092816313, 1.0320929581168212, 1.0323258594965172, 1.0325588134325767, 1.0327918199368598, 1.0330248790212284, 1.0332579906975481, 1.0334911549776868, 1.033724371873515, 1.0339576413969056, 1.0341909635597348, 1.0344243383738811, 1.0346577658512259, 1.034891246003653, 1.0351247788430489, 1.0353583643813031, 1.0355920026303078, 1.0358256936019572, 1.0360594373081489, 1.0362932337607829, 1.0365270829717617, 1.0367609849529913, 1.0369949397163791, 1.0372289472738365, 1.0374630076372766, 1.0376971208186156, 1.0379312868297725, 1.0381655056826686, 1.0383997773892284, 1.0386341019613787, 1.0388684794110492, 1.0391029097501721, 1.0393373929906822, 1.0395719291445176, 1.0398065182236185, 1.0400411602399278, 1.0402758552053915, 1.0405106031319582, 1.0407454040315787, 1.0409802579162071, 1.0412151647977996, 1.0414501246883161, 1.0416851375997183, 1.0419202035439705, 1.0421553225330404, 1.042390494578898, 1.042625719693516, 1.0428609978888699, 1.043096329176938, 1.0433317135697009, 1.0435671510791424, 1.0438026417172486, 1.0440381854960086, 1.0442737824274138, 1.044509432523459, 1.044745135796141, 1.0449808922574599, 1.0452167019194181, 1.0454525647940205, 1.0456884808932754, 1.0459244502291931, 1.0461604728137874, 1.0463965486590741, 1.046632677777072, 1.0468688601798024, 1.0471050958792898, 1.047341384887561, 1.0475777272166455, 1.047814122878576, 1.048050571885387, 1.0482870742491166, 1.0485236299818055, 1.0487602390954964, 1.0489969016022356, 1.0492336175140715, 1.0494703868430555, 1.0497072096012419, 1.0499440858006872, 1.0501810154534512, 1.050417998571596, 1.0506550351671864, 1.0508921252522903, 1.0511292688389782, 1.0513664659393229, 1.0516037165654004, 1.0518410207292894, 1.0520783784430709, 1.0523157897188296, 1.0525532545686513, 1.0527907730046264, 1.0530283450388465, 1.0532659706834067, 1.0535036499504049, 1.0537413828519411, 1.0539791694001188, 1.0542170096070436, 1.0544549034848243, 1.0546928510455722, 1.0549308523014012, 1.0551689072644284, 1.0554070159467728, 1.0556451783605572, 1.0558833945179062, 1.0561216644309479, 1.0563599881118126, 1.0565983655726334, 1.0568367968255465, 1.0570752818826903, 1.0573138207562065, 1.057552413458239, 1.0577910600009348, 1.0580297603964437, 1.058268514656918, 1.0585073227945128, 1.0587461848213857, 1.058985100749698, 1.0592240705916123 }; FLOAT_T bend_coarse[128] = { 1, 1.0594630943592953, 1.122462048309373, 1.189207115002721, 1.2599210498948732, 1.3348398541700344, 1.4142135623730951, 1.4983070768766815, 1.5874010519681994, 1.681792830507429, 1.7817974362806785, 1.8877486253633868, 2, 2.1189261887185906, 2.244924096618746, 2.3784142300054421, 2.5198420997897464, 2.6696797083400687, 2.8284271247461903, 2.996614153753363, 3.1748021039363992, 3.363585661014858, 3.5635948725613571, 3.7754972507267741, 4, 4.2378523774371812, 4.4898481932374912, 4.7568284600108841, 5.0396841995794928, 5.3393594166801366, 5.6568542494923806, 5.993228307506727, 6.3496042078727974, 6.727171322029716, 7.1271897451227151, 7.5509945014535473, 8, 8.4757047548743625, 8.9796963864749824, 9.5136569200217682, 10.079368399158986, 10.678718833360273, 11.313708498984761, 11.986456615013454, 12.699208415745595, 13.454342644059432, 14.25437949024543, 15.101989002907095, 16, 16.951409509748721, 17.959392772949972, 19.027313840043536, 20.158736798317967, 21.357437666720553, 22.627416997969522, 23.972913230026901, 25.398416831491197, 26.908685288118864, 28.508758980490853, 30.203978005814196, 32, 33.902819019497443, 35.918785545899944, 38.054627680087073, 40.317473596635935, 42.714875333441107, 45.254833995939045, 47.945826460053802, 50.796833662982394, 53.817370576237728, 57.017517960981706, 60.407956011628393, 64, 67.805638038994886, 71.837571091799887, 76.109255360174146, 80.63494719327187, 85.429750666882214, 90.509667991878089, 95.891652920107603, 101.59366732596479, 107.63474115247546, 114.03503592196341, 120.81591202325679, 128, 135.61127607798977, 143.67514218359977, 152.21851072034829, 161.26989438654374, 170.85950133376443, 181.01933598375618, 191.78330584021521, 203.18733465192958, 215.26948230495091, 228.07007184392683, 241.63182404651357, 256, 271.22255215597971, 287.35028436719938, 304.43702144069658, 322.53978877308765, 341.71900266752868, 362.03867196751236, 383.56661168043064, 406.37466930385892, 430.53896460990183, 456.14014368785394, 483.26364809302686, 512, 542.44510431195943, 574.70056873439876, 608.87404288139317, 645.0795775461753, 683.43800533505737, 724.07734393502471, 767.13322336086128, 812.74933860771785, 861.07792921980365, 912.28028737570787, 966.52729618605372, 1024, 1084.8902086239189, 1149.4011374687975, 1217.7480857627863, 1290.1591550923506, 1366.8760106701147, 1448.1546878700494, 1534.2664467217226 }; #ifdef tplus /* * midi_time_table(x + 16y) = midi_time_table(x) * (2^y) * midi_time_table(64) = 1 * then, * midi_time_table(x) := (2^(x/16))/16 */ FLOAT_T midi_time_table[128] = { 0.06250, 0.06527, 0.06816, 0.07117, 0.07433, 0.07762, 0.08105, 0.08464, 0.08839, 0.09230, 0.09639, 0.10066, 0.10511, 0.10977, 0.11463, 0.11970, 0.12500, 0.13053, 0.13631, 0.14235, 0.14865, 0.15523, 0.16210, 0.16928, 0.17678, 0.18460, 0.19278, 0.20131, 0.21022, 0.21953, 0.22925, 0.23940, 0.25000, 0.26107, 0.27263, 0.28470, 0.29730, 0.31046, 0.32421, 0.33856, 0.35355, 0.36921, 0.38555, 0.40262, 0.42045, 0.43906, 0.45850, 0.47880, 0.50000, 0.52214, 0.54525, 0.56939, 0.59460, 0.62093, 0.64842, 0.67713, 0.70711, 0.73841, 0.77111, 0.80525, 0.84090, 0.87813, 0.91700, 0.95760, 1.00000, 1.04427, 1.09051, 1.13879, 1.18921, 1.24186, 1.29684, 1.35426, 1.41421, 1.47683, 1.54221, 1.61049, 1.68179, 1.75625, 1.83401, 1.91521, 2.00000, 2.08855, 2.18102, 2.27758, 2.37841, 2.48372, 2.59368, 2.70851, 2.82843, 2.95365, 3.08442, 3.22098, 3.36359, 3.51250, 3.66802, 3.83041, 4.00000, 4.17710, 4.36203, 4.55515, 4.75683, 4.96743, 5.18736, 5.41702, 5.65685, 5.90730, 6.16884, 6.44196, 6.72717, 7.02501, 7.33603, 7.66083, 8.00000, 8.35419, 8.72406, 9.11031, 9.51366, 9.93486,10.37472,10.83404, 11.31371,11.81461,12.33769,12.88392,13.45434,14.05002,14.67206,15.32165 }; /* * midi_time_table2(x) := 2^(x/16/128) (for lsb tunning) */ FLOAT_T midi_time_table2[128] = { 1.00000, 1.00034, 1.00068, 1.00102, 1.00135, 1.00169, 1.00203, 1.00237, 1.00271, 1.00305, 1.00339, 1.00373, 1.00407, 1.00441, 1.00475, 1.00509, 1.00543, 1.00577, 1.00611, 1.00645, 1.00679, 1.00713, 1.00747, 1.00781, 1.00816, 1.00850, 1.00884, 1.00918, 1.00952, 1.00986, 1.01021, 1.01055, 1.01089, 1.01123, 1.01157, 1.01192, 1.01226, 1.01260, 1.01294, 1.01329, 1.01363, 1.01397, 1.01432, 1.01466, 1.01500, 1.01535, 1.01569, 1.01603, 1.01638, 1.01672, 1.01707, 1.01741, 1.01776, 1.01810, 1.01844, 1.01879, 1.01913, 1.01948, 1.01982, 1.02017, 1.02051, 1.02086, 1.02121, 1.02155, 1.02190, 1.02224, 1.02259, 1.02294, 1.02328, 1.02363, 1.02397, 1.02432, 1.02467, 1.02501, 1.02536, 1.02571, 1.02606, 1.02640, 1.02675, 1.02710, 1.02745, 1.02779, 1.02814, 1.02849, 1.02884, 1.02919, 1.02953, 1.02988, 1.03023, 1.03058, 1.03093, 1.03128, 1.03163, 1.03198, 1.03233, 1.03268, 1.03302, 1.03337, 1.03372, 1.03407, 1.03442, 1.03477, 1.03512, 1.03548, 1.03583, 1.03618, 1.03653, 1.03688, 1.03723, 1.03758, 1.03793, 1.03828, 1.03863, 1.03899, 1.03934, 1.03969, 1.04004, 1.04039, 1.04075, 1.04110, 1.04145, 1.04180, 1.04216, 1.04251, 1.04286, 1.04321, 1.04357, 1.04392 }; #endif #ifdef LOOKUP_SINE static FLOAT_T sine_table[257]= { 0, 0.0061358846491544753, 0.012271538285719925, 0.01840672990580482, 0.024541228522912288, 0.030674803176636626, 0.036807222941358832, 0.04293825693494082, 0.049067674327418015, 0.055195244349689934, 0.061320736302208578, 0.067443919563664051, 0.073564563599667426, 0.079682437971430126, 0.085797312344439894, 0.091908956497132724, 0.098017140329560604, 0.10412163387205459, 0.11022220729388306, 0.11631863091190475, 0.1224106751992162, 0.12849811079379317, 0.13458070850712617, 0.14065823933284921, 0.14673047445536175, 0.15279718525844344, 0.15885814333386145, 0.16491312048996989, 0.17096188876030122, 0.17700422041214875, 0.18303988795514095, 0.18906866414980619, 0.19509032201612825, 0.2011046348420919, 0.20711137619221856, 0.21311031991609136, 0.2191012401568698, 0.22508391135979283, 0.23105810828067111, 0.2370236059943672, 0.24298017990326387, 0.24892760574572015, 0.25486565960451457, 0.26079411791527551, 0.26671275747489837, 0.27262135544994898, 0.27851968938505306, 0.28440753721127188, 0.29028467725446233, 0.29615088824362379, 0.30200594931922808, 0.30784964004153487, 0.31368174039889152, 0.31950203081601569, 0.32531029216226293, 0.33110630575987643, 0.33688985339222005, 0.34266071731199438, 0.34841868024943456, 0.35416352542049034, 0.35989503653498811, 0.36561299780477385, 0.37131719395183754, 0.37700741021641826, 0.38268343236508978, 0.38834504669882625, 0.3939920400610481, 0.39962419984564679, 0.40524131400498986, 0.41084317105790391, 0.41642956009763715, 0.42200027079979968, 0.42755509343028208, 0.43309381885315196, 0.43861623853852766, 0.4441221445704292, 0.44961132965460654, 0.45508358712634384, 0.46053871095824001, 0.46597649576796618, 0.47139673682599764, 0.47679923006332209, 0.48218377207912272, 0.487550160148436, 0.49289819222978404, 0.49822766697278187, 0.50353838372571758, 0.50883014254310699, 0.51410274419322166, 0.51935599016558964, 0.52458968267846895, 0.52980362468629461, 0.53499761988709715, 0.54017147272989285, 0.54532498842204646, 0.55045797293660481, 0.55557023301960218, 0.56066157619733603, 0.56573181078361312, 0.57078074588696726, 0.57580819141784534, 0.58081395809576453, 0.58579785745643886, 0.59075970185887416, 0.59569930449243336, 0.60061647938386897, 0.60551104140432555, 0.61038280627630948, 0.61523159058062682, 0.6200572117632891, 0.62485948814238634, 0.62963823891492698, 0.63439328416364549, 0.63912444486377573, 0.64383154288979139, 0.64851440102211244, 0.65317284295377676, 0.65780669329707864, 0.66241577759017178, 0.66699992230363747, 0.67155895484701833, 0.67609270357531592, 0.68060099779545302, 0.68508366777270036, 0.68954054473706683, 0.693971460889654, 0.69837624940897292, 0.7027547444572253, 0.70710678118654746, 0.71143219574521643, 0.71573082528381859, 0.72000250796138165, 0.72424708295146689, 0.7284643904482252, 0.73265427167241282, 0.73681656887736979, 0.74095112535495911, 0.74505778544146595, 0.74913639452345926, 0.75318679904361241, 0.75720884650648446, 0.76120238548426178, 0.76516726562245896, 0.76910333764557959, 0.77301045336273699, 0.77688846567323244, 0.78073722857209438, 0.78455659715557524, 0.78834642762660623, 0.79210657730021239, 0.79583690460888346, 0.79953726910790501, 0.80320753148064483, 0.80684755354379922, 0.81045719825259477, 0.8140363297059483, 0.81758481315158371, 0.82110251499110465, 0.82458930278502529, 0.8280450452577558, 0.83146961230254524, 0.83486287498638001, 0.83822470555483797, 0.84155497743689833, 0.84485356524970701, 0.84812034480329712, 0.8513551931052652, 0.85455798836540053, 0.85772861000027212, 0.86086693863776731, 0.8639728561215867, 0.86704624551569265, 0.87008699110871135, 0.87309497841829009, 0.8760700941954066, 0.87901222642863341, 0.88192126434835494, 0.88479709843093779, 0.88763962040285393, 0.89044872324475788, 0.89322430119551532, 0.89596624975618511, 0.89867446569395382, 0.90134884704602203, 0.90398929312344334, 0.90659570451491533, 0.90916798309052227, 0.91170603200542988, 0.91420975570353069, 0.9166790599210427, 0.91911385169005777, 0.9215140393420419, 0.92387953251128674, 0.92621024213831127, 0.92850608047321548, 0.93076696107898371, 0.93299279883473885, 0.9351835099389475, 0.93733901191257496, 0.93945922360218992, 0.94154406518302081, 0.94359345816196039, 0.94560732538052128, 0.94758559101774109, 0.94952818059303667, 0.95143502096900834, 0.95330604035419375, 0.95514116830577067, 0.95694033573220894, 0.9587034748958716, 0.96043051941556579, 0.96212140426904158, 0.96377606579543984, 0.9653944416976894, 0.96697647104485207, 0.96852209427441727, 0.97003125319454397, 0.97150389098625178, 0.97293995220556007, 0.97433938278557586, 0.97570213003852857, 0.97702814265775439, 0.97831737071962765, 0.97956976568544052, 0.98078528040323043, 0.98196386910955524, 0.98310548743121629, 0.98421009238692903, 0.98527764238894122, 0.98630809724459867, 0.98730141815785843, 0.98825756773074946, 0.98917650996478101, 0.99005821026229712, 0.99090263542778001, 0.99170975366909953, 0.99247953459870997, 0.9932119492347945, 0.99390697000235606, 0.99456457073425542, 0.99518472667219682, 0.99576741446765982, 0.996312612182778, 0.99682029929116567, 0.99729045667869021, 0.99772306664419164, 0.99811811290014918, 0.99847558057329477, 0.99879545620517241, 0.99907772775264536, 0.99932238458834954, 0.99952941750109314, 0.99969881869620425, 0.9998305817958234, 0.9999247018391445, 0.99998117528260111, 1 }; /* looks up sin(2 * Pi * x / 1024) */ FLOAT_T sine(int x) { int xx = x & 0xFF; switch ((x>>8) & 0x03) { default: /* just to shut gcc up. */ case 0: return sine_table[xx]; case 1: return sine_table[0x100 - xx]; case 2: return -sine_table[xx]; case 3: return -sine_table[0x100 - xx]; } } #endif /* LOOKUP_SINE */ FLOAT_T butterworth[101][5] = { {/* dummy entry */ 0, 0, 0, 0, 0}, /* a0 a1 a2 b0 b1 */ {/* f= 100 */ 0.000050, 0.000100, 0.000050, -1.979852, 0.980053 }, {/* f= 300 */ 0.000443, 0.000887, 0.000443, -1.939570, 0.941343 }, {/* f= 500 */ 0.001207, 0.002415, 0.001207, -1.899333, 0.904163 }, {/* f= 700 */ 0.002321, 0.004642, 0.002321, -1.859167, 0.868451 }, {/* f= 900 */ 0.003765, 0.007529, 0.003765, -1.819093, 0.834151 }, {/* f= 1100 */ 0.005519, 0.011038, 0.005519, -1.779131, 0.801206 }, {/* f= 1300 */ 0.007567, 0.015133, 0.007567, -1.739298, 0.769564 }, {/* f= 1500 */ 0.009892, 0.019783, 0.009892, -1.699608, 0.739175 }, {/* f= 1700 */ 0.012478, 0.024957, 0.012478, -1.660076, 0.709989 }, {/* f= 1900 */ 0.015313, 0.030626, 0.015313, -1.620710, 0.681962 }, {/* f= 2100 */ 0.018382, 0.036765, 0.018382, -1.581520, 0.655049 }, {/* f= 2300 */ 0.021674, 0.043348, 0.021674, -1.542513, 0.629208 }, {/* f= 2500 */ 0.025176, 0.050352, 0.025176, -1.503695, 0.604400 }, {/* f= 2700 */ 0.028879, 0.057757, 0.028879, -1.465071, 0.580586 }, {/* f= 2900 */ 0.032771, 0.065543, 0.032771, -1.426644, 0.557729 }, {/* f= 3100 */ 0.036845, 0.073690, 0.036845, -1.388417, 0.535796 }, {/* f= 3300 */ 0.041091, 0.082182, 0.041091, -1.350390, 0.514754 }, {/* f= 3500 */ 0.045502, 0.091003, 0.045502, -1.312565, 0.494571 }, {/* f= 3700 */ 0.050069, 0.100139, 0.050069, -1.274940, 0.475217 }, {/* f= 3900 */ 0.054787, 0.109574, 0.054787, -1.237517, 0.456665 }, {/* f= 4100 */ 0.059649, 0.119298, 0.059649, -1.200292, 0.438887 }, {/* f= 4300 */ 0.064649, 0.129297, 0.064649, -1.163263, 0.421857 }, {/* f= 4500 */ 0.069781, 0.139562, 0.069781, -1.126429, 0.405552 }, {/* f= 4700 */ 0.075041, 0.150082, 0.075041, -1.089786, 0.389949 }, {/* f= 4900 */ 0.080424, 0.160847, 0.080424, -1.053330, 0.375025 }, {/* f= 5100 */ 0.085925, 0.171851, 0.085925, -1.017058, 0.360759 }, {/* f= 5300 */ 0.091542, 0.183083, 0.091542, -0.980965, 0.347132 }, {/* f= 5500 */ 0.097269, 0.194539, 0.097269, -0.945048, 0.334126 }, {/* f= 5700 */ 0.103105, 0.206211, 0.103105, -0.909301, 0.321722 }, {/* f= 5900 */ 0.109046, 0.218092, 0.109046, -0.873720, 0.309905 }, {/* f= 6100 */ 0.115090, 0.230179, 0.115090, -0.838299, 0.298657 }, {/* f= 6300 */ 0.121233, 0.242466, 0.121233, -0.803032, 0.287964 }, {/* f= 6500 */ 0.127474, 0.254948, 0.127474, -0.767916, 0.277812 }, {/* f= 6700 */ 0.133811, 0.267623, 0.133811, -0.732943, 0.268188 }, {/* f= 6900 */ 0.140243, 0.280486, 0.140243, -0.698108, 0.259080 }, {/* f= 7100 */ 0.146767, 0.293534, 0.146767, -0.663406, 0.250474 }, {/* f= 7300 */ 0.153383, 0.306766, 0.153383, -0.628829, 0.242361 }, {/* f= 7500 */ 0.160089, 0.320178, 0.160089, -0.594373, 0.234730 }, {/* f= 7700 */ 0.166885, 0.333770, 0.166885, -0.560031, 0.227570 }, {/* f= 7900 */ 0.173770, 0.347539, 0.173770, -0.525796, 0.220875 }, {/* f= 8100 */ 0.180743, 0.361485, 0.180743, -0.491663, 0.214633 }, {/* f= 8300 */ 0.187803, 0.375607, 0.187803, -0.457626, 0.208839 }, {/* f= 8500 */ 0.194952, 0.389904, 0.194952, -0.423677, 0.203485 }, {/* f= 8700 */ 0.202188, 0.404376, 0.202188, -0.389810, 0.198563 }, {/* f= 8900 */ 0.209512, 0.419024, 0.209512, -0.356020, 0.194069 }, {/* f= 9100 */ 0.216924, 0.433848, 0.216924, -0.322299, 0.189996 }, {/* f= 9300 */ 0.224425, 0.448849, 0.224425, -0.288641, 0.186339 }, {/* f= 9500 */ 0.232014, 0.464027, 0.232014, -0.255040, 0.183095 }, {/* f= 9700 */ 0.239692, 0.479385, 0.239692, -0.221489, 0.180258 }, {/* f= 9900 */ 0.247461, 0.494923, 0.247461, -0.187981, 0.177827 }, {/* f=10100 */ 0.255322, 0.510643, 0.255322, -0.154510, 0.175796 }, {/* f=10300 */ 0.263274, 0.526548, 0.263274, -0.121070, 0.174165 }, {/* f=10500 */ 0.271320, 0.542639, 0.271320, -0.087653, 0.172931 }, {/* f=10700 */ 0.279460, 0.558920, 0.279460, -0.054254, 0.172093 }, {/* f=10900 */ 0.287696, 0.575392, 0.287696, -0.020865, 0.171650 }, {/* f=11100 */ 0.296030, 0.592060, 0.296030, 0.012519, 0.171601 }, {/* f=11300 */ 0.304463, 0.608926, 0.304463, 0.045906, 0.171945 }, {/* f=11500 */ 0.312997, 0.625993, 0.312997, 0.079302, 0.172685 }, {/* f=11700 */ 0.321633, 0.643267, 0.321633, 0.112714, 0.173820 }, {/* f=11900 */ 0.330375, 0.660749, 0.330375, 0.146148, 0.175351 }, {/* f=12100 */ 0.339223, 0.678446, 0.339223, 0.179610, 0.177281 }, {/* f=12300 */ 0.348180, 0.696360, 0.348180, 0.213108, 0.179613 }, {/* f=12500 */ 0.357249, 0.714498, 0.357249, 0.246648, 0.182348 }, {/* f=12700 */ 0.366431, 0.732863, 0.366431, 0.280236, 0.185490 }, {/* f=12900 */ 0.375730, 0.751461, 0.375730, 0.313879, 0.189043 }, {/* f=13100 */ 0.385149, 0.770297, 0.385149, 0.347583, 0.193011 }, {/* f=13300 */ 0.394689, 0.789378, 0.394689, 0.381356, 0.197400 }, {/* f=13500 */ 0.404354, 0.808708, 0.404354, 0.415203, 0.202214 }, {/* f=13700 */ 0.414147, 0.828295, 0.414147, 0.449130, 0.207460 }, {/* f=13900 */ 0.424072, 0.848144, 0.424072, 0.483145, 0.213143 }, {/* f=14100 */ 0.434131, 0.868263, 0.434131, 0.517254, 0.219272 }, {/* f=14300 */ 0.444329, 0.888658, 0.444329, 0.551462, 0.225853 }, {/* f=14500 */ 0.454668, 0.909336, 0.454668, 0.585777, 0.232896 }, {/* f=14700 */ 0.465153, 0.930306, 0.465153, 0.620204, 0.240408 }, {/* f=14900 */ 0.475787, 0.951575, 0.475787, 0.654750, 0.248400 }, {/* f=15100 */ 0.486575, 0.973151, 0.486575, 0.689420, 0.256881 }, {/* f=15300 */ 0.497521, 0.995042, 0.497521, 0.724222, 0.265863 }, {/* f=15500 */ 0.508629, 1.017258, 0.508629, 0.759159, 0.275357 }, {/* f=15700 */ 0.519904, 1.039808, 0.519904, 0.794239, 0.285376 }, {/* f=15900 */ 0.531350, 1.062700, 0.531350, 0.829468, 0.295932 }, {/* f=16100 */ 0.542972, 1.085945, 0.542972, 0.864850, 0.307040 }, {/* f=16300 */ 0.554776, 1.109552, 0.554776, 0.900391, 0.318714 }, {/* f=16500 */ 0.566766, 1.133532, 0.566766, 0.936096, 0.330969 }, {/* f=16700 */ 0.578948, 1.157897, 0.578948, 0.971970, 0.343823 }, {/* f=16900 */ 0.591328, 1.182656, 0.591328, 1.008018, 0.357293 }, {/* f=17100 */ 0.603911, 1.207821, 0.603911, 1.044245, 0.371397 }, {/* f=17300 */ 0.616702, 1.233405, 0.616702, 1.080654, 0.386155 }, {/* f=17500 */ 0.629709, 1.259418, 0.629709, 1.117250, 0.401587 }, {/* f=17700 */ 0.642938, 1.285875, 0.642938, 1.154037, 0.417714 }, {/* f=17900 */ 0.656394, 1.312788, 0.656394, 1.191016, 0.434560 }, {/* f=18100 */ 0.670085, 1.340170, 0.670085, 1.228192, 0.452149 }, {/* f=18300 */ 0.684018, 1.368036, 0.684018, 1.265566, 0.470505 }, {/* f=18500 */ 0.698199, 1.396398, 0.698199, 1.303140, 0.489656 }, {/* f=18700 */ 0.712636, 1.425272, 0.712636, 1.340915, 0.509629 }, {/* f=18900 */ 0.727336, 1.454672, 0.727336, 1.378891, 0.530454 }, {/* f=19100 */ 0.742307, 1.484615, 0.742307, 1.417069, 0.552161 }, {/* f=19300 */ 0.757557, 1.515114, 0.757557, 1.455446, 0.574783 }, {/* f=19500 */ 0.773094, 1.546188, 0.773094, 1.494021, 0.598354 }, {/* f=19700 */ 0.788925, 1.577851, 0.788925, 1.532791, 0.622911 }, {/* f=19900 */ 0.805060, 1.610120, 0.805060, 1.571751, 0.648490 } }; #ifdef LOOKUP_HACK int16 _u2l[] = { -32256, -31228, -30200, -29172, -28143, -27115, -26087, -25059, -24031, -23002, -21974, -20946, -19918, -18889, -17861, -16833, -16062, -15548, -15033, -14519, -14005, -13491, -12977, -12463, -11949, -11435, -10920, -10406, -9892, -9378, -8864, -8350, -7964, -7707, -7450, -7193, -6936, -6679, -6422, -6165, -5908, -5651, -5394, -5137, -4880, -4623, -4365, -4108, -3916, -3787, -3659, -3530, -3402, -3273, -3144, -3016, -2887, -2759, -2630, -2502, -2373, -2245, -2116, -1988, -1891, -1827, -1763, -1698, -1634, -1570, -1506, -1441, -1377, -1313, -1249, -1184, -1120, -1056, -992, -927, -879, -847, -815, -783, -751, -718, -686, -654, -622, -590, -558, -526, -494, -461, -429, -397, -373, -357, -341, -325, -309, -293, -277, -261, -245, -228, -212, -196, -180, -164, -148, -132, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32256, 31228, 30200, 29172, 28143, 27115, 26087, 25059, 24031, 23002, 21974, 20946, 19918, 18889, 17861, 16833, 16062, 15548, 15033, 14519, 14005, 13491, 12977, 12463, 11949, 11435, 10920, 10406, 9892, 9378, 8864, 8350, 7964, 7707, 7450, 7193, 6936, 6679, 6422, 6165, 5908, 5651, 5394, 5137, 4880, 4623, 4365, 4108, 3916, 3787, 3659, 3530, 3402, 3273, 3144, 3016, 2887, 2759, 2630, 2502, 2373, 2245, 2116, 1988, 1891, 1827, 1763, 1698, 1634, 1570, 1506, 1441, 1377, 1313, 1249, 1184, 1120, 1056, 992, 927, 879, 847, 815, 783, 751, 718, 686, 654, 622, 590, 558, 526, 494, 461, 429, 397, 373, 357, 341, 325, 309, 293, 277, 261, 245, 228, 212, 196, 180, 164, 148, 132, 120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0 }; int32 *mixup; #ifdef LOOKUP_INTERPOLATION int8 *iplookup; #endif #endif void init_tables(void) { #ifdef LOOKUP_HACK int i,j,v; mixup=safe_malloc(1<<(7+8+2)); /* Give your cache a workout! */ for (i=0; i<128; i++) { v=_u2l[255-i]; for (j=-128; j<128; j++) { mixup[ ((i & 0x7F)<<8) | (j & 0xFF)] = (v * j) << MIXUP_SHIFT; } } #ifdef LOOKUP_INTERPOLATION iplookup=safe_malloc(1<<(9+5)); for (i=-256; i<256; i++) for(j=0; j<32; j++) iplookup[((i<<5) & 0x3FE0) | j] = (i * j)>>5; /* I don't know. Quantum bits? Magick? */ #endif #endif } uint8 _l2u_[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3A, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x4A, 0x4A, 0x4A, 0x4A, 0x4A, 0x4A, 0x4A, 0x4A, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4E, 0x4E, 0x4E, 0x4E, 0x4E, 0x4E, 0x4E, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x50, 0x50, 0x50, 0x50, 0x51, 0x51, 0x51, 0x51, 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x56, 0x56, 0x56, 0x56, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, 0x58, 0x58, 0x59, 0x59, 0x59, 0x59, 0x5A, 0x5A, 0x5A, 0x5A, 0x5B, 0x5B, 0x5B, 0x5B, 0x5C, 0x5C, 0x5C, 0x5C, 0x5D, 0x5D, 0x5D, 0x5D, 0x5E, 0x5E, 0x5E, 0x5E, 0x5F, 0x5F, 0x5F, 0x5F, 0x60, 0x60, 0x61, 0x61, 0x62, 0x62, 0x63, 0x63, 0x64, 0x64, 0x65, 0x65, 0x66, 0x66, 0x67, 0x67, 0x68, 0x68, 0x68, 0x69, 0x69, 0x6A, 0x6A, 0x6B, 0x6B, 0x6C, 0x6C, 0x6D, 0x6D, 0x6E, 0x6E, 0x6F, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xEF, 0xEF, 0xEE, 0xEE, 0xED, 0xED, 0xEC, 0xEC, 0xEB, 0xEB, 0xEA, 0xEA, 0xE9, 0xE9, 0xE8, 0xE8, 0xE7, 0xE7, 0xE6, 0xE6, 0xE5, 0xE5, 0xE4, 0xE4, 0xE3, 0xE3, 0xE2, 0xE2, 0xE1, 0xE1, 0xE0, 0xE0, 0xDF, 0xDF, 0xDF, 0xDF, 0xDE, 0xDE, 0xDE, 0xDE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDC, 0xDC, 0xDC, 0xDC, 0xDB, 0xDB, 0xDB, 0xDB, 0xDA, 0xDA, 0xDA, 0xDA, 0xD9, 0xD9, 0xD9, 0xD9, 0xD8, 0xD8, 0xD8, 0xD8, 0xD7, 0xD7, 0xD7, 0xD7, 0xD6, 0xD6, 0xD6, 0xD6, 0xD5, 0xD5, 0xD5, 0xD5, 0xD4, 0xD4, 0xD4, 0xD4, 0xD3, 0xD3, 0xD3, 0xD3, 0xD2, 0xD2, 0xD2, 0xD2, 0xD1, 0xD1, 0xD1, 0xD1, 0xD0, 0xD0, 0xD0, 0xD0, 0xCF, 0xCF, 0xCF, 0xCF, 0xCF, 0xCF, 0xCF, 0xCF, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC7, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC5, 0xC5, 0xC5, 0xC5, 0xC5, 0xC5, 0xC5, 0xC5, 0xC4, 0xC4, 0xC4, 0xC4, 0xC4, 0xC4, 0xC4, 0xC4, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB7, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB5, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB4, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB3, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB2, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB1, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAC, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA9, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA8, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA7, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA3, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8D, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; uint8 *_l2u = _l2u_ + 4096; /* * names and info for general-midi instruments */ struct short_voice_type gm_voice[256] = { /* 0*/ { "Acoustic Grand Piano",0 }, /* 1*/ { "Bright Acoustic Grand",0 }, /* 2*/ { "Electric Grand Piano",0 }, /* 3*/ { "Honky-tonk Piano", 0 }, /* 4*/ { "Rhodes Piano", 0 }, /* 2*/ { "Chorused Piano", 0 }, /* 6*/ { "Harpsichord", 0 }, /* 7*/ { "Clavinet", 0 }, /* 8*/ { "Celesta", 0 }, /* 9*/ { "Glockenspiel", 0 }, /* 10*/ { "Musicbox", 0 }, /* 11*/ { "Vibraphone", 0 }, /* 12*/ { "Marimba", 0 }, /* 13*/ { "Xylophone", 0 }, /* 14*/ { "Tubular Bells", 0 }, /* 15*/ { "Dulcimer", 0 }, /* 16*/ { "Hammond Organ", 0 }, /* 17*/ { "Percussive Organ", 0 }, /* 18*/ { "Rock Organ", 0 }, /* 19*/ { "Church Organ", 0 }, /* 20*/ { "Reed Organ", 0 }, /* 21*/ { "Accordion", 0 }, /* 22*/ { "Harmonica", 1 }, /* 23*/ { "Tango Accordion", 0 }, /* 24*/ { "Nylon Guitar", 0 }, /* 25*/ { "Steel Guitar", 0 }, /* 26*/ { "Jazz Guitar", 1 }, /* 27*/ { "Clean Guitar", 0 }, /* 28*/ { "Muted Guitar", 1 }, /* 29*/ { "Overdriven Guitar", 0 }, /* 30*/ { "Distortion Guitar", 0 }, /* 31*/ { "Guitar Harmonics", 0 }, /* 32*/ { "Acoustic Bass", 0 }, /* 33*/ { "Finger Bass", 0 }, /* 34*/ { "Pick Bass", 0 }, /* 35*/ { "Fretless Bass", 0 }, /* 36*/ { "Slap Bass 1", 0 }, /* 37*/ { "Slap Bass 2", 0 }, /* 38*/ { "Synth Bass 1", 0 }, /* 39*/ { "Synth Bass 2", 0 }, /* 40*/ { "Violin", 0 }, /* 41*/ { "Viola", 0 }, /* 42*/ { "Cello", 0 }, /* 43*/ { "Contrabass", 0 }, /* 44*/ { "Tremolo Strings", 0 }, /* 45*/ { "Pizzicato String", 0 }, /* 46*/ { "Orchestral Harp", 0 }, /* 47*/ { "Timpani", 1 }, /* 48*/ { "String Ensemble 1", 0 }, /* 49*/ { "String Ensemble 2", 0 }, /* 50*/ { "Synth Strings 1", 0 }, /* 51*/ { "Synth Strings 2", 0 }, /* 52*/ { "Choir Aahs", 0 }, /* 53*/ { "Voice Oohs", 0 }, /* 54*/ { "Synth Voice", 0 }, /* 55*/ { "Orchestra Hit", 0 }, /* 56*/ { "Trumpet", 1 }, /* 57*/ { "Trombone", 1 }, /* 58*/ { "Tuba", 1 }, /* 59*/ { "Muted Trumpet", 1 }, /* 60*/ { "French Horn", 0 }, /* 61*/ { "Brass Section", 0 }, /* 62*/ { "Synth Brass 1", 0 }, /* 63*/ { "Synth Brass 2", 0 }, /* 64*/ { "Soprano Sax", 1 }, /* 65*/ { "Alto Sax", 1 }, /* 66*/ { "Tenor Sax", 1 }, /* 67*/ { "Baritone Sax", 1 }, /* 68*/ { "Oboe", 1 }, /* 69*/ { "English Horn", 1 }, /* 70*/ { "Bassoon", 1 }, /* 71*/ { "Clarinet", 1 }, /* 72*/ { "Piccolo", 1 }, /* 73*/ { "Flute", 1 }, /* 74*/ { "Recorder", 1 }, /* 75*/ { "Pan Flute", 1 }, /* 76*/ { "Bottle Blow", 1 }, /* 77*/ { "Shakuhachi", 1 }, /* 78*/ { "Whistle", 1 }, /* 79*/ { "Ocarina", 1 }, /* 80*/ { "Lead1 squareea", 0 }, /* 81*/ { "Lead2 sawtooth", 0 }, /* 82*/ { "Lead3 calliope", 0 }, /* 83*/ { "Lead4 chiff", 0 }, /* 84*/ { "Lead5 charang", 0 }, /* 85*/ { "Lead6 voice", 0 }, /* 86*/ { "Lead7 fifths", 0 }, /* 87*/ { "Lead8 brass+ld", 0 }, /* 88*/ { "Pad1 newage", 0 }, /* 89*/ { "Pad2 warm", 0 }, /* 90*/ { "Pad3 polysynth", 0 }, /* 91*/ { "Pad4 choir", 0 }, /* 92*/ { "Pad5 bowed", 0 }, /* 93*/ { "Pad6 metallic", 0 }, /* 94*/ { "Pad7 halo", 0 }, /* 95*/ { "Pad8 sweep", 0 }, /* 96*/ { "FX1 rain", 0 }, /* 97*/ { "FX2 soundtrack", 0 }, /* 98*/ { "FX3 crystal", 1 }, /* 99*/ { "FX4 atmosphere", 1 }, /*100*/ { "FX5 brightness", 1 }, /*101*/ { "FX6 goblins", 1 }, /*102*/ { "FX7 echoes", 0 }, /*103*/ { "FX8 sci-fi", 1 }, /*104*/ { "Sitar", 0 }, /*105*/ { "Banjo", 0 }, /*106*/ { "Shamisen", 0 }, /*107*/ { "Koto", 0 }, /*108*/ { "Kalimba", 0 }, /*109*/ { "Bagpipe", 0 }, /*110*/ { "Fiddle", 0 }, /*111*/ { "Shanai", 0 }, /*112*/ { "Tinkle Bell", 1 }, /*113*/ { "Agogo Bells", 1 }, /*114*/ { "Steel Drums", 1 }, /*115*/ { "Woodblock", 1 }, /*116*/ { "Taiko Drum", 1 }, /*117*/ { "Melodic Tom", 1 }, /*118*/ { "Synth Drum", 1 }, /*119*/ { "Reverse Cymbal", 1 }, /*120*/ { "Guitar Fret Noise", 1 }, /*121*/ { "Breath Noise", 1 }, /*122*/ { "Seashore", 1 }, /*123*/ { "Bird Tweet", 1 }, /*124*/ { "Telephone Ring", 1 }, /*125*/ { "Helicopter Blade", 1 }, /*126*/ { "Applause/Noise", 1 }, /*127*/ { "Gunshot", 1 }, /*128+000*/{ NULL, 0 }, /*128+001*/{ NULL, 0 }, /*128+002*/{ NULL, 0 }, /*128+003*/{ NULL, 0 }, /*128+004*/{ NULL, 0 }, /*128+005*/{ NULL, 0 }, /*128+006*/{ NULL, 0 }, /*128+007*/{ NULL, 0 }, /*128+008*/{ NULL, 0 }, /*128+009*/{ NULL, 0 }, /*128+010*/{ NULL, 0 }, /*128+011*/{ NULL, 0 }, /*128+012*/{ NULL, 0 }, /*128+013*/{ NULL, 0 }, /*128+014*/{ NULL, 0 }, /*128+015*/{ NULL, 0 }, /*128+016*/{ NULL, 0 }, /*128+017*/{ NULL, 0 }, /*128+018*/{ NULL, 0 }, /*128+019*/{ NULL, 0 }, /*128+020*/{ NULL, 0 }, /*128+021*/{ NULL, 0 }, /*128+022*/{ NULL, 0 }, /*128+023*/{ NULL, 0 }, /*128+024*/{ NULL, 0 }, /*128+025*/{ NULL, 0 }, /*128+026*/{ NULL, 0 }, /*128+027*/{ NULL, 0 }, /*128+028*/{ NULL, 0 }, /*128+029*/{ NULL, 0 }, /*128+030*/{ NULL, 0 }, /*128+031*/{ NULL, 0 }, /*128+032*/{ NULL, 0 }, /*128+033*/{ NULL, 0 }, /*128+034*/{ NULL, 0 }, /*128+035*/{ "Acoustic Bass Drum",0 }, /*128+036*/{ "Bass Drum 1", 0 }, /*128+037*/{ "Side Stick", 0 }, /*128+038*/{ "Acoustic Snare", 0 }, /*128+039*/{ "Hand Clap", 0 }, /*128+040*/{ "Electric Snare", 0 }, /*128+041*/{ "Low Floor Tom", 0 }, /*128+042*/{ "Closed High Hat", 0 }, /*128+043*/{ "Hi Floor Tom", 0 }, /*128+044*/{ "Pedal High Hat", 0 }, /*128+045*/{ "Low Tom", 0 }, /*128+046*/{ "Open High Hat", 0 }, /*128+047*/{ "Low-Mid Tom", 0 }, /*128+048*/{ "High-Mid Tom", 0 }, /*128+049*/{ "Crash Cymbal 1", 0 }, /*128+050*/{ "High Tom", 0 }, /*128+051*/{ "Ride Cymbal 1", 0 }, /*128+052*/{ "Chinese Cymbal", 0 }, /*128+053*/{ "Ride Bell", 0 }, /*128+054*/{ "Tambourine", 0 }, /*128+055*/{ "Splash Cymbal", 0 }, /*128+056*/{ "Cow Bell", 0 }, /*128+057*/{ "Crash Cymbal 2", 0 }, /*128+058*/{ "Vibraslap", 0 }, /*128+059*/{ "Ride Cymbal 2", 0 }, /*128+060*/{ "High Bongo", 0 }, /*128+061*/{ "Low Bongo", 0 }, /*128+062*/{ "Mute High Conga", 0 }, /*128+063*/{ "Open High Conga", 0 }, /*128+064*/{ "Low Conga", 0 }, /*128+065*/{ "High Timbale", 0 }, /*128+066*/{ "Low Timbale", 0 }, /*128+067*/{ "High Agogo", 0 }, /*128+068*/{ "Low Agogo", 0 }, /*128+069*/{ "Cabasa", 0 }, /*128+070*/{ "Maraccas", 0 }, /*128+071*/{ "Short Whistle", 0 }, /*128+072*/{ "Long Whistle", 0 }, /*128+073*/{ "Short Guiro", 0 }, /*128+074*/{ "Long Guiro", 0 }, /*128+075*/{ "Claves", 0 }, /*128+076*/{ "High Wood Block", 0 }, /*128+077*/{ "Low Wood Block", 0 }, /*128+078*/{ "Mute Cuica", 0 }, /*128+079*/{ "Open Cuica", 0 }, /*128+080*/{ "Mute Triangle", 0 }, /*128+081*/{ "Open Triangle", 0 } }; alsaplayer-0.99.82/attic/midi/tables.h000066400000000000000000000035401466261456500175320ustar00rootroot00000000000000/* $Id$ TiMidity -- Experimental MIDI to WAVE converter Copyright (C) 1995 Tuukka Toivonen * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . tables.h */ #ifdef LOOKUP_SINE extern FLOAT_T sine(int x); #else #include #ifndef PI # define PI M_PI #endif #define sine(x) (sin((2*PI/1024.0) * (x))) #endif #define SINE_CYCLE_LENGTH 1024 extern uint32 freq_table[]; #ifdef tplus /*extern FLOAT_T *vol_table;*/ extern FLOAT_T def_vol_table[]; extern FLOAT_T gs_vol_table[]; extern FLOAT_T *xg_vol_table; /* == gs_vol_table */ #else extern FLOAT_T vol_table[]; #endif extern FLOAT_T expr_table[]; extern FLOAT_T bend_fine[]; extern FLOAT_T bend_coarse[]; #ifdef tplus extern FLOAT_T midi_time_table[], midi_time_table2[]; #endif extern FLOAT_T butterworth[101][5]; extern uint8 *_l2u; /* 13-bit PCM to 8-bit u-law */ extern uint8 _l2u_[]; /* used in LOOKUP_HACK */ #ifdef LOOKUP_HACK extern int16 _u2l[]; extern int32 *mixup; #ifdef LOOKUP_INTERPOLATION extern int8 *iplookup; #endif #endif extern void init_tables(void); extern struct short_voice_type { const char *vname; #define SOLO_MASK 1 char flags; } gm_voice[]; alsaplayer-0.99.82/attic/midi/version.h000066400000000000000000000016261466261456500177500ustar00rootroot00000000000000/* version.h * * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #define KMIDIVERSION "1.3-alpha" #define TIMID_VERSION "0.2i" alsaplayer-0.99.82/attic/midi/xmap.h000066400000000000000000000143621466261456500172310ustar00rootroot00000000000000/* xmap.h * * Copyright (C) 2002 Greg Lee * * This file is part of the MIDI input plugin for AlsaPlayer. * * The MIDI input plugin for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The MIDI input plugin for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * $Id$ Greg Lee */ int xmap[XMAPMAX][5] = { { SFXBANK, 0, 0, 120, 0 }, { SFXBANK, 0, 1, 120, 1 }, { SFXBANK, 0, 2, 120, 2 }, { SFXBANK, 0, 3, 120, 3 }, { SFXBANK, 0, 4, 120, 4 }, { SFXBANK, 0, 5, 120, 5 }, { SFXBANK, 0, 16, 120, 16 }, { SFXBANK, 0, 32, 120, 32 }, { SFXBANK, 0, 33, 120, 33 }, { SFXBANK, 0, 34, 120, 34 }, { SFXBANK, 0, 35, 120, 35 }, { SFXBANK, 0, 36, 120, 36 }, { SFXBANK, 0, 48, 120, 48 }, { SFXBANK, 0, 49, 120, 49 }, { SFXBANK, 0, 50, 120, 50 }, { SFXBANK, 0, 51, 120, 51 }, { SFXBANK, 0, 52, 120, 52 }, { SFXBANK, 0, 54, 120, 54 }, { SFXBANK, 0, 55, 120, 55 }, { SFXBANK, 0, 64, 120, 64 }, { SFXBANK, 0, 65, 120, 65 }, { SFXBANK, 0, 66, 120, 66 }, { SFXBANK, 0, 67, 120, 67 }, { SFXBANK, 0, 68, 120, 68 }, { SFXBANK, 0, 69, 120, 69 }, { SFXBANK, 0, 70, 120, 70 }, { SFXBANK, 0, 80, 120, 80 }, { SFXBANK, 0, 81, 120, 81 }, { SFXBANK, 0, 82, 120, 82 }, { SFXBANK, 0, 83, 120, 83 }, { SFXBANK, 0, 84, 120, 84 }, { SFXBANK, 0, 85, 120, 85 }, { SFXBANK, 0, 86, 120, 86 }, { SFXBANK, 0, 87, 120, 87 }, { SFXBANK, 0, 88, 120, 88 }, { SFXBANK, 0, 89, 120, 89 }, { SFXBANK, 0, 90, 120, 90 }, { SFXBANK, 0, 96, 120, 96 }, { SFXBANK, 0, 97, 120, 97 }, { SFXBANK, 0, 98, 120, 98 }, { SFXBANK, 0, 99, 120, 99 }, { SFXBANK, 0, 100, 120, 100 }, { SFXBANK, 0, 101, 120, 101 }, { SFXBANK, 0, 112, 120, 112 }, { SFXBANK, 0, 113, 120, 113 }, { SFXBANK, 0, 114, 120, 114 }, { SFXBANK, 0, 115, 120, 115 }, { SFXDRUM1, 0, 36, 121, 36 }, { SFXDRUM1, 0, 37, 121, 37 }, { SFXDRUM1, 0, 38, 121, 38 }, { SFXDRUM1, 0, 39, 121, 39 }, { SFXDRUM1, 0, 40, 121, 40 }, { SFXDRUM1, 0, 41, 121, 41 }, { SFXDRUM1, 0, 52, 121, 52 }, { SFXDRUM1, 0, 68, 121, 68 }, { SFXDRUM1, 0, 69, 121, 69 }, { SFXDRUM1, 0, 70, 121, 70 }, { SFXDRUM1, 0, 71, 121, 71 }, { SFXDRUM1, 0, 72, 121, 72 }, { SFXDRUM1, 0, 84, 121, 84 }, { SFXDRUM1, 0, 85, 121, 85 }, { SFXDRUM1, 0, 86, 121, 86 }, { SFXDRUM1, 0, 87, 121, 87 }, { SFXDRUM1, 0, 88, 121, 88 }, { SFXDRUM1, 0, 90, 121, 90 }, { SFXDRUM1, 0, 91, 121, 91 }, { SFXDRUM1, 1, 36, 122, 36 }, { SFXDRUM1, 1, 37, 122, 37 }, { SFXDRUM1, 1, 38, 122, 38 }, { SFXDRUM1, 1, 39, 122, 39 }, { SFXDRUM1, 1, 40, 122, 40 }, { SFXDRUM1, 1, 41, 122, 41 }, { SFXDRUM1, 1, 42, 122, 42 }, { SFXDRUM1, 1, 52, 122, 52 }, { SFXDRUM1, 1, 53, 122, 53 }, { SFXDRUM1, 1, 54, 122, 54 }, { SFXDRUM1, 1, 55, 122, 55 }, { SFXDRUM1, 1, 56, 122, 56 }, { SFXDRUM1, 1, 57, 122, 57 }, { SFXDRUM1, 1, 58, 122, 58 }, { SFXDRUM1, 1, 59, 122, 59 }, { SFXDRUM1, 1, 60, 122, 60 }, { SFXDRUM1, 1, 61, 122, 61 }, { SFXDRUM1, 1, 62, 122, 62 }, { SFXDRUM1, 1, 68, 122, 68 }, { SFXDRUM1, 1, 69, 122, 69 }, { SFXDRUM1, 1, 70, 122, 70 }, { SFXDRUM1, 1, 71, 122, 71 }, { SFXDRUM1, 1, 72, 122, 72 }, { SFXDRUM1, 1, 73, 122, 73 }, { SFXDRUM1, 1, 84, 122, 84 }, { SFXDRUM1, 1, 85, 122, 85 }, { SFXDRUM1, 1, 86, 122, 86 }, { SFXDRUM1, 1, 87, 122, 87 }, { XGDRUM, 0, 25, 40, 38 }, { XGDRUM, 0, 26, 40, 40 }, { XGDRUM, 0, 27, 40, 39 }, { XGDRUM, 0, 28, 40, 30 }, { XGDRUM, 0, 29, 0, 25 }, { XGDRUM, 0, 30, 0, 85 }, { XGDRUM, 0, 31, 0, 38 }, { XGDRUM, 0, 32, 0, 37 }, { XGDRUM, 0, 33, 0, 36 }, { XGDRUM, 0, 34, 0, 38 }, { XGDRUM, 0, 62, 0, 101 }, { XGDRUM, 0, 63, 0, 102 }, { XGDRUM, 0, 64, 0, 103 }, { XGDRUM, 8, 25, 40, 38 }, { XGDRUM, 8, 26, 40, 40 }, { XGDRUM, 8, 27, 40, 39 }, { XGDRUM, 8, 28, 40, 40 }, { XGDRUM, 8, 29, 8, 25 }, { XGDRUM, 8, 30, 8, 85 }, { XGDRUM, 8, 31, 8, 38 }, { XGDRUM, 8, 32, 8, 37 }, { XGDRUM, 8, 33, 8, 36 }, { XGDRUM, 8, 34, 8, 38 }, { XGDRUM, 8, 62, 8, 101 }, { XGDRUM, 8, 63, 8, 102 }, { XGDRUM, 8, 64, 8, 103 }, { XGDRUM, 16, 25, 40, 38 }, { XGDRUM, 16, 26, 40, 40 }, { XGDRUM, 16, 27, 40, 39 }, { XGDRUM, 16, 28, 40, 40 }, { XGDRUM, 16, 29, 16, 25 }, { XGDRUM, 16, 30, 16, 85 }, { XGDRUM, 16, 31, 16, 38 }, { XGDRUM, 16, 32, 16, 37 }, { XGDRUM, 16, 33, 16, 36 }, { XGDRUM, 16, 34, 16, 38 }, { XGDRUM, 16, 62, 16, 101 }, { XGDRUM, 16, 63, 16, 102 }, { XGDRUM, 16, 64, 16, 103 }, { XGDRUM, 24, 25, 40, 38 }, { XGDRUM, 24, 26, 40, 40 }, { XGDRUM, 24, 27, 40, 39 }, { XGDRUM, 24, 28, 24, 100 }, { XGDRUM, 24, 29, 24, 25 }, { XGDRUM, 24, 30, 24, 15 }, { XGDRUM, 24, 31, 24, 38 }, { XGDRUM, 24, 32, 24, 37 }, { XGDRUM, 24, 33, 24, 36 }, { XGDRUM, 24, 34, 24, 38 }, { XGDRUM, 24, 62, 24, 101 }, { XGDRUM, 24, 63, 24, 102 }, { XGDRUM, 24, 64, 24, 103 }, { XGDRUM, 24, 78, 0, 17 }, { XGDRUM, 24, 79, 0, 18 }, { XGDRUM, 25, 25, 40, 38 }, { XGDRUM, 25, 26, 40, 40 }, { XGDRUM, 25, 27, 40, 39 }, { XGDRUM, 25, 28, 25, 100 }, { XGDRUM, 25, 29, 25, 25 }, { XGDRUM, 25, 30, 25, 15 }, { XGDRUM, 25, 31, 25, 38 }, { XGDRUM, 25, 32, 25, 37 }, { XGDRUM, 25, 33, 25, 36 }, { XGDRUM, 25, 34, 25, 38 }, { XGDRUM, 25, 78, 0, 17 }, { XGDRUM, 25, 79, 0, 18 }, { XGDRUM, 32, 25, 40, 38 }, { XGDRUM, 32, 26, 40, 40 }, { XGDRUM, 32, 27, 40, 39 }, { XGDRUM, 32, 28, 40, 40 }, { XGDRUM, 32, 29, 32, 25 }, { XGDRUM, 32, 30, 32, 85 }, { XGDRUM, 32, 31, 32, 38 }, { XGDRUM, 32, 32, 32, 37 }, { XGDRUM, 32, 33, 32, 36 }, { XGDRUM, 32, 34, 32, 38 }, { XGDRUM, 32, 62, 32, 101 }, { XGDRUM, 32, 63, 32, 102 }, { XGDRUM, 32, 64, 32, 103 }, { XGDRUM, 40, 25, 40, 38 }, { XGDRUM, 40, 26, 40, 40 }, { XGDRUM, 40, 27, 40, 39 }, { XGDRUM, 40, 28, 40, 40 }, { XGDRUM, 40, 29, 40, 25 }, { XGDRUM, 40, 30, 40, 85 }, { XGDRUM, 40, 31, 40, 39 }, { XGDRUM, 40, 32, 40, 37 }, { XGDRUM, 40, 33, 40, 36 }, { XGDRUM, 40, 34, 40, 38 }, { XGDRUM, 40, 38, 40, 39 }, { XGDRUM, 40, 39, 0, 39 }, { XGDRUM, 40, 40, 40, 38 }, { XGDRUM, 40, 42, 0, 42 }, { XGDRUM, 40, 46, 0, 46 }, { XGDRUM, 40, 62, 40, 101 }, { XGDRUM, 40, 63, 40, 102 }, { XGDRUM, 40, 64, 40, 103 }, { XGDRUM, 40, 87, 40, 87 } }; alsaplayer-0.99.82/attic/python/000077500000000000000000000000001466261456500165045ustar00rootroot00000000000000alsaplayer-0.99.82/attic/python/AUTHORS000066400000000000000000000000521466261456500175510ustar00rootroot00000000000000Austin Bingham alsaplayer-0.99.82/attic/python/COPYING000066400000000000000000001043731466261456500175470ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . alsaplayer-0.99.82/attic/python/ChangeLog000066400000000000000000000003061466261456500202550ustar00rootroot00000000000000Thu Jul 12 2007 o Removed unneeded exception from the license file Mon Jul 09 2007 o Added COPYING file Sun Jul 08 2007 o Updated licence to GPL-v3 Sat Feb 10 07:59:09 CST 2007 o Initial revisionalsaplayer-0.99.82/attic/python/MANIFEST000066400000000000000000000000771466261456500176410ustar00rootroot00000000000000setup.py setup.cfg AUTHORS README ChangeLog gpl.txt control.cc alsaplayer-0.99.82/attic/python/README000066400000000000000000000015621466261456500173700ustar00rootroot00000000000000Introduction ------------ These are python bindings for the alsaplayer library. The intent is to provide a set of bindings that closely mirror the C library, leaving more complex functionality for purely python modules. Requirements ------------ * python [http://python.org] including development headers and library * boost [http://boost.org] with boost.python enabled * alsaplayer [http://alsaplayer.org] including development headers and library Building -------- In most cases, you should be able to build everything with this command: python setup.py build In the event that you have headers or libraries in non-standard locations, you can edit setup.cfg to add those directories to the appropriate build variables. Installation ------------ You can install the extension module by running: python setup.py install Note that you'll probably need to do this as root.alsaplayer-0.99.82/attic/python/control.cc000066400000000000000000000201301466261456500204670ustar00rootroot00000000000000/* control.cc * Copyright (C) 2006 Austin Bingham * * This file is part of the python bindings for AlsaPlayer. * * The python bindings for AlsaPlayer 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 3 of the License, or (at your option) * any later version. * * The python bindings for AlsaPlayer is distributed in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include #include #include #include #include using namespace boost::python; namespace { // This is how most of the functions communicate that they // have experienced an error. Instead of returning an // error code, this is thrown. struct APException { APException(int e, std::string msg = std::string()) : err(e), message(msg) {} int err; std::string message; }; void translator(APException const& e) { std::ostringstream oss; oss << "ALSAPlayerException: "; if (!e.message.empty()) oss << e.message << ", "; oss << "id=" << e.err; PyErr_SetString(PyExc_UserWarning, oss.str().c_str()); } /* The rest of these functions serve to put the alsaplayer interface into a more pythonic format. For instance, get-functions return values rather than modify paramters, they throw exceptions on error, they return bools rather than ints where appropriate, and so forth. Otherwise, these are basically a thin layer of the alsaplayer C API */ int find_session(const std::string& name) { int rval; int err = ap_find_session(const_cast(name.c_str()), &rval); if (err == 0) throw APException(err); return rval; } bool session_running(int sid) { return ap_session_running(sid); } template T get(int(*f)(int, T*), int sid) { T rval; int err = f(sid, &rval); if (0 == err) throw APException(err); return rval; } template std::string get_string(int(*f)(int, char*), int sid) { char result[MaxSize + 1]; int err = f(sid, result); if (0 == err) throw APException(err); return std::string(result); } // TODO: Consider using Boost.PP to simplify this repetition int get_playlist_length(int sid) { return get(&ap_get_playlist_length, sid); } float get_speed(int sid) { return get(&ap_get_speed, sid); } float get_volume(int sid) { return get(&ap_get_volume, sid); } float get_pan(int sid) { return get(&ap_get_pan, sid); } bool is_looping(int sid) { return get(&ap_is_looping, sid); } bool is_playlist_looping(int sid) { return get(&ap_is_playlist_looping, sid); } int get_tracks(int sid) { return get(&ap_get_tracks, sid); } std::string get_session_name(int sid) { return get_string(ap_get_session_name, sid); } std::string get_title(int sid) { return get_string(ap_get_title, sid); } std::string get_artist(int sid) { return get_string(ap_get_artist, sid); } std::string get_album(int sid) { return get_string(ap_get_album, sid); } std::string get_genre(int sid) { return get_string(ap_get_genre, sid); } std::string get_year(int sid) { return get_string(ap_get_year, sid); } std::string get_track_number(int sid) { return get_string(ap_get_track_number, sid); } std::string get_comment(int sid) { return get_string(ap_get_comment, sid); } std::string get_file_path(int sid) { return get_string(ap_get_file_path, sid); } int get_position(int sid) { return get(ap_get_position, sid); } int get_length(int sid) { return get(ap_get_length, sid); } int get_frame(int sid) { return get(ap_get_frame, sid); } int get_frames(int sid) { return get(ap_get_frames, sid); } std::string get_stream_type(int sid) { return get_string(ap_get_stream_type, sid); } std::string get_status(int sid) { return get_string(ap_get_status, sid); } bool is_playing(int sid) { return get(ap_is_playing, sid); } void sort(int sid, const std::string& sz) { int err = ap_sort(sid, const_cast(sz.c_str())); if (0 == err) throw APException(err); } int get_playlist_position(int sid) { return get(ap_get_playlist_position, sid); } std::string get_file_path_for_track(int sid, int pos) { char path[AP_FILE_PATH_MAX + 1]; int err = ap_get_file_path_for_track(sid, path, pos); if (0 == err) throw APException(err); return std::string(path); } void insert(int sid, const std::string& sz, int pos) { int err = ap_insert(sid, const_cast(sz.c_str()), pos); if (0 == err) throw APException(err); } list get_playlist(int sid) { int length; char** playlist; int err = ap_get_playlist(sid, &length, &playlist); if (0 == err) throw APException(err); list rval; for (int idx = 0; idx < length; ++idx) { rval.append(str(std::string(playlist[idx]))); free(playlist[idx]); } free(playlist); return rval; } } /* This defines the actual alsaplayer module */ BOOST_PYTHON_MODULE(alsaplayer) { register_exception_translator< ::APException >(::translator); def("find_session", ::find_session); def("session_running", ::session_running); def("version", ap_version); def("play", ap_play); def("stop", ap_stop); def("pause", ap_pause); def("unpause", ap_unpause); def("next", ap_next); def("prev", ap_prev); def("ping", ap_ping); def("quit", ap_quit); def("clear_playlist", ap_clear_playlist); def("add_path", ap_add_path); def("add_and_play", ap_add_and_play); def("add_playlist", ap_add_playlist); def("shuffle_playlist", ap_shuffle_playlist); def("save_playlist", ap_save_playlist); def("get_playlist_length", ::get_playlist_length); def("set_speed", ap_set_speed); def("get_speed", ::get_speed); def("set_volume", ap_set_volume); def("get_volume", ::get_volume); def("set_pan", ap_set_pan); def("get_pan", ::get_pan); def("set_looping", ap_set_looping); def("is_looping", ::is_looping); def("set_playlist_looping", ap_set_playlist_looping); def("is_playlist_looping", ::is_playlist_looping); def("get_tracks", ::get_tracks); def("get_session_name", ::get_session_name); def("get_title", ::get_title); def("get_artist", ::get_artist); def("get_album", ::get_album); def("get_genre", ::get_genre); def("get_year", ::get_year); def("get_track_number", ::get_track_number); def("get_comment", ::get_comment); def("get_file_path", ::get_file_path); def("set_position", ap_set_position); def("get_position", ::get_position); def("set_position_relative", ap_set_position_relative); def("get_length", ::get_length); def("set_frame", ap_set_frame); def("get_frame", ::get_frame); def("get_frames", ::get_frames); def("get_stream_type", ::get_stream_type); def("get_status", ::get_status); def("is_playing", ::is_playing); def("sort", ::sort); def("jump_to", ap_jump_to); def("get_playlist_position", ::get_playlist_position); def("get_file_path_for_track", ::get_file_path_for_track); def("insert", ::insert); def("remove", ap_remove); def("set_current", ap_set_current); def("get_playlist", ::get_playlist); } alsaplayer-0.99.82/attic/python/gpl.txt000066400000000000000000001051251466261456500200330ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . EXCEPTION: This software can be installed on SGI system. The GPL forbid to distribute programs linked on a SGI system. In consequence, you are granted the permission to distribute this software for SGI systems as long that you agree with the other conditions of the GNU General Public License version 3 or later and that you respect them. alsaplayer-0.99.82/attic/python/setup.cfg000066400000000000000000000004061466261456500203250ustar00rootroot00000000000000[build_ext] # a colon-delimited list of directories in which # the linker looks for libraries library_dirs=/usr/lib:/usr/local/lib # a colon-delmited list of directories in which # the compiler looks for header files include_dirs=/usr/include:/usr/local/includealsaplayer-0.99.82/attic/python/setup.py000066400000000000000000000021621466261456500202170ustar00rootroot00000000000000#!/usr/bin/env python from distutils.core import setup, Extension long_description=''' A set of python bindings for the alsaplayer libraries. These are written in C++ using boost.python and are intended to provide a minimal level of abstraction over the C libraries. Higher-level abstractions and functionality can then be written purely in python. ''' classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Public License', 'Programming Language :: C++' ] setup(name='python_alsaplayer', version='0.3.1', description='Python extension for alsaplayer', author='Austin Bingham', author_email='austin.bingham@gmail.com', url='http://www.alsaplayer.org', license='gpl', long_description=long_description, classifiers=classifiers, ext_modules=[Extension('alsaplayer', ['control.cc'], include_dirs=[], library_dirs=[], libraries=['alsaplayer', 'boost_python']) ] ) alsaplayer-0.99.82/autogen.sh000077500000000000000000000005261466261456500160630ustar00rootroot00000000000000#! /bin/sh run_cmd() { echo -n "running $* ... " if ! $*; then echo "failed!" exit 1 fi echo "ok" } run_cmd intltoolize --force --automake run_cmd aclocal -I m4 run_cmd autoheader run_cmd libtoolize --automake run_cmd automake --add-missing run_cmd autoconf echo echo "Now type './configure' to configure AlsaPlayer" echo alsaplayer-0.99.82/config.rpath000077500000000000000000000440121466261456500163700ustar00rootroot00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2010 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <=1.1.3 dnl ======================== AC_CHECK_LIB(FLAC, [FLAC__stream_decoder_init_ogg_stream], have_libFLAC_113=yes, have_libFLAC_113=no) dnl =========== dnl MAD library dnl =========== AC_CHECK_LIB(mad, mad_stream_init, MAD_LDADD=-lmad; have_libmad=yes; AC_DEFINE(HAVE_LIBMAD, 1, [Define if you have MAD library (-lmad)]), have_libmad=no; MAD_LDADD=, -lmad) AC_ARG_ENABLE(mad, AS_HELP_STRING([--enable-mad],[Enable MAD plugin (default=yes)]), [if test "$enableval" = "no" ; then if test "$have_libmad" = "yes" ; then have_libmad=no ; fi fi]) dnl ============== dnl id3tab library dnl ============== oldcflags=$CFLAGS CFLAGS="$CFLAGS -lz" AC_CHECK_LIB(id3tag, id3_file_open, FLC_LDADD="$FLC_LDADD -lid3tag -lz"; use_libid3tag=yes; AC_DEFINE(HAVE_LIBID3TAG, 1, [Define if you have libid3tag library (-lid3tag)]), use_libid3tag=no) AC_ARG_ENABLE(id3tag, AS_HELP_STRING([--enable-id3tag],[Enable libid3tag support (default=yes)]), [if test "$enableval" = "no" ; then if test "$use_libid3tag" = "yes" ; then use_libid3tag=no ; fi fi]) CFLAGS=$oldcflags AC_SUBST(FLC_LDADD) AC_SUBST(MAD_LDADD) dnl ========== dnl JACK stuff dnl ========== PKG_CHECK_MODULES(JACK, jack >= 0.118.0, have_jack=yes, have_jack=no) AC_SUBST(JACK_LIBS) AC_SUBST(JACK_CFLAGS) dnl ========== dnl XOSD stuff dnl nb.: by checking for "xosd_create" instead of "xosd_init", we dnl implicitely require xosd 2.x instead of 1.x dnl (which is exactly what we want) dnl ========== AC_CHECK_LIB(xosd, xosd_create, XOSD_LDADD=-lxosd; have_xosd=yes; AC_DEFINE(HAVE_LIBXOSD, 1, [Define if you have XOSD library (-lxosd)]), have_xosd=no; XOSD_LDADD=, -lxosd) AM_CONDITIONAL(HAVE_XOSD, test "x$have_xosd" = xyes) dnl ========== dnl glib stuff dnl ========== PKG_CHECK_MODULES(GLIB2, glib-2.0, have_glib2=yes, have_glib2=no) AC_SUBST(GLIB2_LIBS) AC_SUBST(GLIB2_CFLAGS) dnl ========== dnl GTK2 stuff dnl ========== PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.8.0 gthread-2.0 >= 2.0.3 pango, have_gtk2=yes, have_gtk2=no) AC_SUBST(GTK2_LIBS) AC_SUBST(GTK2_CFLAGS) dnl ================ dnl GTK2 for systray dnl ================ PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.10.0 gthread-2.0 >= 2.0.3 pango, can_systray=yes, can_systray=no) AC_ARG_ENABLE(systray, AS_HELP_STRING([--enable-systray],[Enable SysTray icon (default=no)]),, enable_systray=no) if test "x$enable_systray" = xyes ; then if test "$can_systray" = "yes" ; then have_systray=yes else have_systray=no fi else have_systray=no fi AM_CONDITIONAL(HAVE_SYSTRAY,test "x$have_systray" = "xyes") if test "$enable_systray" = yes; then if test "$have_systray" = no; then echo Systray support need gtk+>=2.10.n else echo Experimental systray support will be compiled fi fi AP_DEFINE_CONDITIONAL(HAVE_SYSTRAY, test "$have_systray" = "yes", [Define if we have the systray icon]) dnl ================== dnl libsndfile library dnl ================== have_sndfile=no PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.4, have_sndfile=yes, have_sndfile=no) AC_SUBST(SNDFILE_LIBS) AC_SUBST(SNDFILE_CFLAGS) AM_CONDITIONAL(HAVE_SNDFILE, test "x$have_sndfile" = xyes) dnl ========== dnl ALSA stuff dnl ========== PKG_CHECK_MODULES(ALSA, alsa >= 1.0.4, have_alsa=yes, have_alsa=no) AC_SUBST(ALSA_LIBS) # Clean up ALSA_CFLAGS. # For some insane reason, the ALSA people think its a good idea to provide a # trailing '/alsa' to their include path, but most people know the only # sensible way to access the package specific headers is via the namespaced # path, eg #include for the alsa headers. # # Therefore we outright remove '-I/usr/include/alsa' because its completely # un-necessary and then with whats left, remove the '/alsa' components. ALSA_CFLAGS=$(echo $ALSA_CFLAGS | sed 's|-I/usr/include/alsa||g' | sed 's|/alsa||g') AC_SUBST(ALSA_CFLAGS) AM_CONDITIONAL(HAVE_ALSA, test "x$have_alsa" = xyes) dnl ========= dnl ESD stuff dnl ========= AM_PATH_ESD(0.2.4, have_esd=yes, have_esd=no) dnl =========== dnl SPARC stuff dnl =========== if test "$ac_cv_header_sys_audioio_h" = "yes" ; then have_sparc=yes else have_sparc=no fi dnl ========= dnl OSS stuff dnl ========= if test "$ac_cv_header_sys_soundcard_h" = "yes" ; then have_oss=yes else have_oss=no fi dnl ========= dnl SGI stuff dnl ========= AC_CHECK_LIB(audio, alOpenPort, [have_sgi=yes SGI_LIBS=-laudio], have_sgi=no) AC_SUBST(SGI_LIBS) dnl ========= dnl NAS stuff dnl ========= oldcflags=$CFLAGS CFLAGS="$CFLAGS -I$x_includes -L$x_libraries -lXt" AC_CHECK_LIB(audio,AuStartFlow, [have_nas=yes NAS_LIB="-L$x_libraries -laudio -lXt"], have_nas=no) CFLAGS=$oldcflags AC_SUBST(NAS_LIB) dnl ===================================================== dnl Sound output stuff. This will go away once everything dnl is really modular dnl ===================================================== AC_ARG_ENABLE(jack, AS_HELP_STRING([--enable-jack],[Enable jack support (default=yes)]), [if test "$enableval" = "no" ; then have_jack=no ; fi]) AC_ARG_ENABLE(alsa, AS_HELP_STRING([--enable-alsa],[Enable ALSA (default=yes)]), [if test "$enableval" = "no" ; then have_alsa=no ; fi]) AC_ARG_ENABLE(esd, AS_HELP_STRING([--enable-esd],[Enable esd driver (default=yes)]), [if test "$enableval" = "no" ; then have_esd=no ; fi]) AC_ARG_ENABLE(sparc, AS_HELP_STRING([--enable-sparc],[Enable SPARC driver (default=yes)]), [if test "$enableval" = "no" ; then have_sparc=no ; fi]) AC_ARG_ENABLE(oss, AS_HELP_STRING([--enable-oss],[Enable OSS driver (default=yes)]), [if test "$enableval" = "no" ; then have_oss=no ; fi]) AC_ARG_ENABLE(sgi, AS_HELP_STRING([--enable-sgi],[Enable SGI driver (default=yes)]), [if test "$enableval" = "no" ; then have_sgi=no ; fi]) AC_ARG_ENABLE(gtk2, AS_HELP_STRING([--enable-gtk2],[Enable GTK2 graphical interface (default=yes)]), [if test "$enableval" = "no" ; then have_gtk2=no ; fi]) AC_ARG_ENABLE(nas, AS_HELP_STRING([--enable-nas],[Enable NAS driver (default=yes)]), [if test "$enableval" = "no" ; then have_nas=no ; fi]) if test "x$ac_cv_header_mad_h" = "xno" ; then have_libmad=no fi if test "x$ac_cv_header_id3tag_h" = "xno" ; then use_libid3tag=no fi AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN) AM_CONDITIONAL(HAVE_LIBMAD,test "x$have_libmad" = xyes) AM_CONDITIONAL(USE_LIBID3TAG, test "x$use_libid3tag" = xyes) AM_CONDITIONAL(HAVE_FLC, test "x$have_flac" = xyes) AM_CONDITIONAL(HAVE_JACK, test "x$have_jack" = xyes) AM_CONDITIONAL(HAVE_ALSA, test "x$have_alsa" = xyes) AM_CONDITIONAL(HAVE_OSS, test "x$have_oss" = xyes) AM_CONDITIONAL(HAVE_ESD, test "x$have_esd" = xyes) AM_CONDITIONAL(HAVE_SPARC, test "x$have_sparc" = xyes) AM_CONDITIONAL(HAVE_SGI, test "x$have_sgi" = xyes) AM_CONDITIONAL(HAVE_NAS, test "x$have_nas" = xyes) AM_CONDITIONAL(HAVE_LINUX_CDROM,test "x$ac_cv_header_linux_cdrom_h" = xyes) AM_CONDITIONAL(HAVE_GLIB2, test "x$have_glib2" = xyes) AM_CONDITIONAL(HAVE_GTK2, test "x$have_gtk2" = xyes) AM_CONDITIONAL(HAVE_MIKMOD,test "x$have_mikmod" = xyes) AM_CONDITIONAL(HAVE_SYSTRAY,test "x$have_systray" = xyes) dnl ============ dnl Machine type dnl ============ AC_MSG_CHECKING(machine architecture) AC_SUBST(ARCH_TYPE) ARCH_TYPE=`uname -m` AC_MSG_RESULT($ARCH_TYPE) AM_CONDITIONAL(ARCH_X86,test "$ARCH_TYPE" = "i486" || test "$ARCH_TYPE" = "i586" || test "$ARCH_TYPE" = "i686" ) AM_CONDITIONAL(ARCH_486,test "$ARCH_TYPE" = "i486") AM_CONDITIONAL(ARCH_586,test "$ARCH_TYPE" = "i586") AM_CONDITIONAL(ARCH_686,test "$ARCH_TYPE" = "i686") AM_CONDITIONAL(ARCH_PPC,test "$ARCH_TYPE" = "ppc") AM_CONDITIONAL(ARCH_ULTRA,test "$ARCH_TYPE" = "sun4u") dnl cruft to satisfy gtk2s Makefile. Leave it in for now AM_CONDITIONAL(BUILD_EXTERNAL, test "a" = "b") test_cflags="-O2 -funroll-loops -finline-functions -ffast-math -Wall -Wextra -Wshadow" for f in $test_cflags ; do AP_ADD_CFLAGS($f) done AP_ADD_CFLAGS([-Wunused-variable]) AP_ADD_CFLAGS([-Wmissing-prototypes]) AP_ADD_CFLAGS([-Wstrict-prototypes]) AC_LANG_PUSH([C++]) for f in $test_cflags ; do AP_ADD_CXXFLAGS($f) done AC_LANG_POP AP_DEFINE_CONDITIONAL(HAVE_GLIB2, test "$have_glib2" = "yes", [Define if we have glib2]) AP_DEFINE_CONDITIONAL(HAVE_GTK2, test "$have_gtk2" = "yes", [Define if we have gtk2]) dnl =============== dnl Debugging stuff dnl =============== AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[Enable debugging (default=no)]),, enable_debug=no) if test "$enable_debug" = yes; then DFLAGS="$DFLAGS -g" AP_ADD_CFLAGS(-fstack-protector) AC_LANG_PUSH([C++]) AP_ADD_CXXFLAGS(-fstack-protector) AC_LANG_POP fi AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling],[Enable profiling (-pg)]),, enable_profiling=no) if test "$enable_profiling" = yes; then DFLAGS="$DFLAGS -pg" fi AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[enable -Werror in all Makefiles])) if test x$enable_werror = "xyes" ; then AP_ADD_CFLAGS([-Werror]) AC_LANG_PUSH([C++]) AP_ADD_CXXFLAGS([-Werror]) AC_LANG_POP fi dnl ================================================================ dnl Special assembly options. Note: Need to fix the above arch code! dnl ================================================================ AC_SUBST(DFLAGS) ADDON_DIR=${libdir}/$PACKAGE dnl ================ dnl Create Makefiles dnl ================ AC_SUBST(ALSA_LIB) AC_SUBST(ADDON_DIR) AC_SUBST(AS) AC_SUBST(ASFLAGS) AC_CONFIG_FILES([ po/Makefile.in Makefile alsaplayer.1 alsaplayer.pc alsaplayer.spec app/Makefile interface/Makefile interface/gtk2/Makefile interface/gtk2/pixmaps/Makefile interface/text/Makefile interface/daemon/Makefile interface/xosd/Makefile scopes2/Makefile scopes2/monoscope/Makefile scopes2/levelmeter/Makefile scopes2/spacescope/Makefile scopes2/logbarfft/Makefile scopes2/synaescope/Makefile scopes2/blurscope/Makefile scopes2/opengl_spectrum/Makefile output/Makefile output/alsa/Makefile output/jack/Makefile output/oss/Makefile output/esound/Makefile output/sgi/Makefile output/sparc/Makefile output/null/Makefile output/nas/Makefile input/Makefile input/mad/Makefile input/cdda/Makefile input/mikmod/Makefile input/vorbis/Makefile input/flac/Makefile input/sndfile/Makefile reader/Makefile reader/file/Makefile reader/http/Makefile alsaplayer/Makefile libalsaplayer/Makefile extra/Makefile examples/Makefile m4/Makefile docs/Makefile docs/reference.doxygen ]) AC_OUTPUT echo " Configuration: Install path: ${prefix} Use libmad shared library: ${have_libmad} Enable libid3tag support: ${use_libid3tag} Build GTK2 interface: ${have_gtk2} Build XOSD interface: ${have_xosd} Build OpenGL based visual plugins: ${have_opengl} Build alsa output plugin: ${have_alsa} Build jack output plugin: ${have_jack} Build oss output plugin: ${have_oss} Build esound output plugin: ${have_esd} Build sparc output plugin: ${have_sparc} Build sgi output plugin: ${have_sgi} Build nas output plugin: ${have_nas} Build vorbis input plugin: ${have_oggvorbis} Build cdda input plugin: ${ac_cv_header_linux_cdrom_h} Build mikmod input plugin: ${have_mikmod} Build FLAC input plugin: ${have_flac} Build sndfile input plugin: ${have_sndfile} Build systray icon: ${have_systray}" echo if test $have_jack = "no" -a $have_sparc = "no" -a $have_alsa = "no" -a $have_oss = "no" -a $have_esd = "no" -a $have_sgi = "no" -a $have_nas = "no" ; then echo " **WARNING**: NO OUTPUT MODULES selected. AlsaPlayer won't be **WARNING**: able to produce sound output unless you manually **WARNING**: add output modules to: **WARNING**: ${prefix}/alsaplayer/output/" echo fi echo Now type \'make\' to build AlsaPlayer. alsaplayer-0.99.82/docs/000077500000000000000000000000001466261456500150075ustar00rootroot00000000000000alsaplayer-0.99.82/docs/Makefile.am000066400000000000000000000032331466261456500170440ustar00rootroot00000000000000EXTRA_DIST = wishlist.txt donations.txt clean-local: rm -f *~ *.bak reference.doxygen.log || true if HAVE_DOXYGEN DOC_DIR=$(datadir)/doc/alsaplayer all-local: reference.doxygen.log reference.doxygen.log: reference.doxygen $(top_srcdir)/configure $(AM_V_GEN)doxygen reference.doxygen @UNDOCUMENTED=$$(cat $@); \ if test -n "$$UNDOCUMENTED" ; then \ echo "---------- UNDOCUMENTED CODE ----------"; \ echo "$$UNDOCUMENTED"; \ echo "---------------------------------------"; \ fi install-data-local: $(mkinstalldirs) $(DESTDIR)$(DOC_DIR)/reference/html (installfiles=`echo reference/html/*.html`; \ if test "$$installfiles" = 'reference/html/*.html'; \ then echo '-- Nothing to install' ; \ else \ for i in $$installfiles reference/html/doxygen.png reference/html/doxygen.css; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/reference/html; \ done; \ fi) # we need doxygen stuff built so we can know what to uninstall uninstall-local: reference.doxygen.log (installfiles=`echo reference/html/*.html`; \ if test "$$installfiles" = 'reference/html/*.html'; \ then echo '-- Nothing to uninstall' ; \ else \ for i in $$installfiles reference/html/doxygen.png reference/html/doxygen.css; do \ echo '-- Unstalling '$$i ; \ rm $(DOC_DIR)/$$i; \ done; \ fi) dist-check-doxygen: endif distclean-local: clean rm -f reference.doxygen.log || true if test -d reference; then rm -rf reference; fi dist-hook: dist-hook-local mkdir $(distdir)/reference mkdir $(distdir)/reference/html -cp reference/html/*.html reference/html/*.css \ reference/html/*.png $(distdir)/reference/html .PHONY : dist-hook-local alsaplayer-0.99.82/docs/donations.txt000066400000000000000000000003611466261456500175460ustar00rootroot00000000000000The following persons/entities graciously donated cash and/or hardware to further development of AlsaPlayer: * Christopher Gallant - CASH * Patrick Shirkey - CMI8738 soundcard * Crystal Software (Canada) Inc. - CASH * Joachim Bondo - CASH alsaplayer-0.99.82/docs/reference.doxygen.in000066400000000000000000003662011466261456500207610ustar00rootroot00000000000000# Doxyfile 1.10.0 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single 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 (\" \"). # # Note: # # Use doxygen to compare the used configuration file with the template # configuration file: # doxygen -x [configFile] # Use doxygen to compare the used configuration file with the template # configuration file without replacing the environment variables or CMake type # replacement variables: # doxygen -x_noenv [configFile] #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the configuration # file that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = AlsaPlayer # 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 = @PACKAGE_VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # With the PROJECT_ICON tag one can specify an icon that is included in the tabs # when the HTML document is shown. Doxygen will copy the logo to the output # directory. PROJECT_ICON = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. 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 = reference # If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 # sub-directories (in 2 levels) under the output directory of each output format # and will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to # control the number of sub-directories. # The default value is: NO. CREATE_SUBDIRS = NO # Controls the number of sub-directories that will be created when # CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every # level increment doubles the number of directories, resulting in 4096 # directories at level 8 which is the default and also the maximum value. The # sub-directories are organized in 2 levels, the first level always has a fixed # number of 16 directories. # Minimum value: 0, maximum value: 8, default value: 8. # This tag requires that the tag CREATE_SUBDIRS is set to YES. CREATE_SUBDIRS_LEVEL = 8 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # 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. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, # Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English # (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, # Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with # English messages), Korean, Korean-en (Korean with English messages), Latvian, # Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, # Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, # Swedish, Turkish, Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, 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. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, 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. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # 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. # The default value is: NO. 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. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, 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 # The default value is: YES. FULL_PATH_NAMES = NO # 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. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # 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. # The default value is: NO. SHORT_NAMES = NO # 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-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be # interpreted by doxygen. # The default value is: NO. JAVADOC_BANNER = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_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 behavior. 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 behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # By default Python docstrings are displayed as preformatted text and doxygen's # special commands cannot be used. By setting PYTHON_DOCSTRING to NO the # doxygen's special commands can be used and the contents of the docstring # documentation blocks is shown as doxygen documentation. # The default value is: YES. PYTHON_DOCSTRING = YES # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = 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. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:^^" # 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:". Note that you cannot put \n's in the value part of an alias # to insert newlines (in the resulting output). You can put ^^ in the value part # of an alias to insert a newline as if a physical newline was in the original # file. When you need a literal { or } or , in the value part of an alias you # have to escape them by means of a backslash (\), this can lead to conflicts # with the commands \{ and \} for these it is advised to use the version @{ and # @} or use a double escape (\\{ and \\}) ALIASES = # 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. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice # sources only. Doxygen will then generate output that is more tailored for that # language. For instance, namespaces will be presented as modules, types will be # separated into more groups, etc. # The default value is: NO. OPTIMIZE_OUTPUT_SLICE = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, # Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, # VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files # as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. When specifying no_extension you should add # * to the FILE_PATTERNS. # # Note see also the list of default file extension mappings. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 5 # The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to # generate identifiers for the Markdown headings. Note: Every identifier is # unique. # Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a # sequence number starting at 0 and GITHUB use the lower case version of title # with any whitespace replaced by '-' and punctuation characters removed. # The default value is: DOXYGEN. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. MARKDOWN_ID_STYLE = DOXYGEN # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = 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. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 # The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use # during processing. When set to 0 doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, # which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. NUM_PROC_THREADS = 1 # If the TIMESTAMP tag is set different from NO then each generated page will # contain the date or date and time when the page was generated. Setting this to # NO can help when comparing the output of multiple runs. # Possible values are: YES, NO, DATETIME and DATE. # The default value is: NO. TIMESTAMP = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # 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 respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. # The default value is: NO. EXTRACT_PRIV_VIRTUAL = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # 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. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If this flag is set to YES, the name of an unnamed parameter in a declaration # will be determined by the corresponding definition. By default unnamed # parameters remain unnamed in the output. # The default value is: YES. RESOLVE_UNNAMED_PARAMS = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO 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. # The default value is: NO. 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, these classes will be included in the various overviews. This option # will also hide undocumented C++ concepts if enabled. This option has no effect # if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # declarations. If set to NO, these declarations will be included in the # documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # With the correct setting of option CASE_SENSE_NAMES doxygen will better be # able to match the capabilities of the underlying filesystem. In case the # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that # are not case sensitive the option should be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On # Windows (including Cygwin) and MacOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. # Possible values are: SYSTEM, NO and YES. # The default value is: SYSTEM. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_HEADERFILE tag is set to YES then the documentation for a class # will show which file needs to be included to use the class. # The default value is: YES. SHOW_HEADERFILE = YES # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES 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. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # 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. # The default value is: YES. GENERATE_TODOLIST = NO # 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. # The default value is: YES. GENERATE_TESTLIST = NO # 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. # The default value is: YES. GENERATE_BUGLIST = NO # 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. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have 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 value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # 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. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. See also section "Changing the # layout of pages" for information. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag 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. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as documenting some parameters in # a documented function twice, or documenting parameters that don't exist or # using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete # function parameter documentation. If set to NO, doxygen will accept that some # parameters have no documentation without warning. # The default value is: YES. WARN_IF_INCOMPLETE_DOC = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong parameter # documentation, but not about the absence of documentation. If EXTRACT_ALL is # set to YES then this flag will automatically be disabled. See also # WARN_IF_INCOMPLETE_DOC # The default value is: NO. WARN_NO_PARAMDOC = NO # If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about # undocumented enumeration values. If set to NO, doxygen will accept # undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: NO. WARN_IF_UNDOC_ENUM_VAL = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS # then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but # at the end of the doxygen process doxygen will return with a non-zero status. # If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves # like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not # write the warning messages in between other messages but write them at the end # of a run, in case a WARN_LOGFILE is defined the warning messages will be # besides being in the defined file also be shown at the end of a run, unless # the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case # the behavior will remain as with the setting FAIL_ON_WARNINGS. # Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. # The default value is: NO. WARN_AS_ERROR = NO # 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. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # See also: WARN_LINE_FORMAT # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # In the $text part of the WARN_FORMAT command it is possible that a reference # to a more specific place is given. To make it easier to jump to this place # (outside of doxygen) the user can define a custom "cut" / "paste" string. # Example: # WARN_LINE_FORMAT = "'vi $file +$line'" # See also: WARN_FORMAT # The default value is: at line $line of file $file. WARN_LINE_FORMAT = "at line $line of file $file" # 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 standard # error (stderr). In case the file specified cannot be opened for writing the # warning and error messages are written to standard error. When as file - is # specified the warning and error messages are written to standard output # (stdout). WARN_LOGFILE = reference.doxygen.log #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is 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. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = @top_srcdir@/alsaplayer/input_plugin.h \ @top_srcdir@/alsaplayer/output_plugin.h \ @top_srcdir@/alsaplayer/interface_plugin.h \ @top_srcdir@/alsaplayer/scope_plugin.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. # See also: INPUT_FILE_ENCODING # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # This tag can be used to specify the character encoding of the source files # that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify # character encoding on a per file pattern basis. Doxygen will compare the file # name with each pattern and apply the encoding instead of the default # INPUT_ENCODING) if there is a match. The character encodings are a list of the # form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding # "INPUT_ENCODING" for further information on supported encodings. INPUT_FILE_ENCODING = # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # Note the list of default checked file patterns might differ from the list of # default file extension mappings. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm, # *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, # *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, # *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to # be provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # 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. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. 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. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # ANamespace::AClass, ANamespace::*Test EXCLUDE_SYMBOLS = # 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. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be 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: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that doxygen will use the data processed and written to standard output # for further processing, therefore nothing else, like debug statements or used # commands (so in case of a Windows batch file always use @echo OFF), should be # written to standard output. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = # The Fortran standard specifies that for fixed formatted Fortran code all # characters from position 72 are to be considered as comment. A common # extension is to allow longer lines before the automatic comment starts. The # setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can # be processed before the automatic comment starts. # Minimum value: 7, maximum value: 10000, default value: 72. FORTRAN_COMMENT_AFTER = 72 #--------------------------------------------------------------------------- # 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. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # multi-line macros, enums or list initialized variables directly into the # documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES 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. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = 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. # The default value is: YES. ALPHABETICAL_INDEX = NO # The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) # that should be ignored while generating the index headers. The IGNORE_PREFIX # tag works for classes, function and member names. The entity will be placed in # the alphabetical list under the first letter of the entity name that remains # after removing the prefix. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. 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. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. 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). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. 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 left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). # Note: Since the styling of scrollbars can currently not be overruled in # Webkit/Chromium, the styling will be left out of the default doxygen.css if # one or more extra stylesheets have been specified. So if scrollbar # customization is desired it has to be added explicitly. For an example see the # documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE tag can be used to specify if the generated HTML output # should be rendered with a dark or light theme. # Possible values are: LIGHT always generate light mode output, DARK always # generate dark mode output, AUTO_LIGHT automatically set the mode according to # the user preference, use light mode if no preference is set (the default), # AUTO_DARK automatically set the mode according to the user preference, use # dark mode if no preference is set and TOGGLE allow to user to switch between # light and dark mode via a button. # The default value is: AUTO_LIGHT. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE = AUTO_LIGHT # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a color-wheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use gray-scales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have JavaScript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be # dynamically folded and expanded in the generated HTML source code. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_CODE_FOLDING = YES # If the HTML_COPY_CLIPBOARD tag is set to YES then doxygen will show an icon in # the top right corner of code and text fragments that allows the user to copy # its content to the clipboard. Note this only works if supported by the browser # and the web page is served via a secure context (see: # https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file: # protocol. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COPY_CLIPBOARD = YES # Doxygen stores a couple of settings persistently in the browser (via e.g. # cookies). By default these settings apply to all HTML pages generated by # doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store # the settings under a project specific key, such that the user preferences will # be stored separately. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_PROJECT_COOKIE = # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: # https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To # create a documentation set, doxygen will generate a Makefile in the HTML # output directory. Running make will produce the docset in that directory and # running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag determines the URL of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDURL = # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # on Windows. In the beginning of 2021 Microsoft took the original page, with # a.o. the download links, offline the HTML help workshop was already many years # in maintenance mode). You can download the HTML help workshop from the web # archives at Installation executable (see: # http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo # ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # 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 directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # 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. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # 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. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # The SITEMAP_URL tag is used to specify the full URL of the place where the # generated documentation will be placed on the server by the user during the # deployment of the documentation. The generated sitemap is called sitemap.xml # and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL # is specified no sitemap is generated. For information about the sitemap # protocol see https://www.sitemaps.org # This tag requires that the tag GENERATE_HTML is set to YES. SITEMAP_URL = # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location (absolute path # including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to # run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value 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, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine tune the look of the index (see "Fine-tuning the output"). As an # example, the default style sheet generated by doxygen has an example that # shows how to put an image at the root of the tree instead of the PROJECT_NAME. # Since the tree basically has the same information as the tab index, you could # consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the # FULL_SIDEBAR option determines if the side bar is limited to only the treeview # area (value NO) or if it should extend to the full height of the window (value # YES). Setting this to YES gives a layout similar to # https://docs.readthedocs.io with more room for contents, but less room for the # project logo, title, and description. If either GENERATE_TREEVIEW or # DISABLE_INDEX is set to NO, this option has no effect. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. FULL_SIDEBAR = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # 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. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email # addresses. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. OBFUSCATE_EMAILS = YES # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for # the HTML output. These images will generally look nicer at scaled resolutions. # Possible values are: png (the default) and svg (looks nicer but requires the # pdf2svg or inkscape tool). # The default value is: png. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FORMULA_FORMAT = png # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. FORMULA_MACROFILE = # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # With MATHJAX_VERSION it is possible to specify the MathJax version to be used. # Note that the different versions of MathJax have different requirements with # regards to the different settings, so it is possible that also other MathJax # settings have to be changed when switching between the different MathJax # versions. # Possible values are: MathJax_2 and MathJax_3. # The default value is: MathJax_2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_VERSION = MathJax_2 # When MathJax is enabled you can set the default output format to be used for # the MathJax output. For more details about the output format see MathJax # version 2 (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 # (see: # http://docs.mathjax.org/en/latest/web/components/output.html). # Possible values are: HTML-CSS (which is slower, but has the best # compatibility. This is the name for Mathjax version 2, for MathJax version 3 # this will be translated into chtml), NativeMML (i.e. MathML. Only supported # for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This # is the name for Mathjax version 3, for MathJax version 2 this will be # translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. The default value is: # - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 # - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # for MathJax version 2 (see # https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # For example for MathJax version 3 (see # http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): # MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /