Commit 36db4684 authored by Benjamin Drung's avatar Benjamin Drung

Imported Upstream version 2.4.0

parent 5f9ace4b
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for audacious-plugins 2.4-rc2.
# Generated by GNU Autoconf 2.65 for audacious-plugins 2.4.0.
#
# Report bugs to <bugs+audacious-plugins@atheme.org>.
#
......@@ -552,8 +552,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='audacious-plugins'
PACKAGE_TARNAME='audacious-plugins'
PACKAGE_VERSION='2.4-rc2'
PACKAGE_STRING='audacious-plugins 2.4-rc2'
PACKAGE_VERSION='2.4.0'
PACKAGE_STRING='audacious-plugins 2.4.0'
PACKAGE_BUGREPORT='bugs+audacious-plugins@atheme.org'
PACKAGE_URL=''
......@@ -1569,7 +1569,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures audacious-plugins 2.4-rc2 to adapt to many kinds of systems.
\`configure' configures audacious-plugins 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1636,7 +1636,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of audacious-plugins 2.4-rc2:";;
short | recursive ) echo "Configuration of audacious-plugins 2.4.0:";;
esac
cat <<\_ACEOF
......@@ -1927,7 +1927,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
audacious-plugins configure 2.4-rc2
audacious-plugins configure 2.4.0
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
......@@ -2458,7 +2458,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by audacious-plugins $as_me 2.4-rc2, which was
It was created by audacious-plugins $as_me 2.4.0, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
......@@ -2943,8 +2943,6 @@ test -n "$target_alias" &&
ac_config_headers="$ac_config_headers config.h"
LDFLAGS="$LDFLAGS -z defs"
if test -d "/usr/X11R6/include"; then
CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
fi
......@@ -2955,7 +2953,7 @@ fi
PACKAGE=audacious-plugins
VERSION=2.4-rc2
VERSION=2.4.0
......@@ -7113,20 +7111,20 @@ pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AUDACIOUS" >&5
$as_echo_n "checking for AUDACIOUS... " >&6; }
if test "x$PKG_CONFIG" != "x"; then
if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"audacious >= 2.3\""; } >&5
($PKG_CONFIG --exists --print-errors "audacious >= 2.3") 2>&5
if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"audacious >= 2.4\""; } >&5
($PKG_CONFIG --exists --print-errors "audacious >= 2.4") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test "x${AUDACIOUS_CFLAGS}" != "x"; then
pkg_cv_AUDACIOUS_CFLAGS="${AUDACIOUS_CFLAGS}"
else
pkg_cv_AUDACIOUS_CFLAGS=`$PKG_CONFIG --cflags "audacious >= 2.3" 2>/dev/null`
pkg_cv_AUDACIOUS_CFLAGS=`$PKG_CONFIG --cflags "audacious >= 2.4" 2>/dev/null`
fi
if test "x${AUDACIOUS_LIBS}" != "x"; then
pkg_cv_AUDACIOUS_LIBS="${AUDACIOUS_LIBS}"
else
pkg_cv_AUDACIOUS_LIBS=`$PKG_CONFIG --libs "audacious >= 2.3" 2>/dev/null`
pkg_cv_AUDACIOUS_LIBS=`$PKG_CONFIG --libs "audacious >= 2.4" 2>/dev/null`
fi
else
pkg_failed="yes"
......@@ -7138,17 +7136,17 @@ fi
if test "x$pkg_failed" = "xyes"; then
if test "x$_pkg_short_errors_supported" = "xyes"; then
AUDACIOUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "audacious >= 2.3" 2>&1`
AUDACIOUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "audacious >= 2.4" 2>&1`
else
AUDACIOUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "audacious >= 2.3" 2>&1`
AUDACIOUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "audacious >= 2.4" 2>&1`
fi
echo "$AUDACIOUS_PKG_ERRORS" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error "Cannot find Audacious 2.3 or later, have you installed audacious yet?" "$LINENO" 5
as_fn_error "Cannot find Audacious 2.4 or later, have you installed audacious yet?" "$LINENO" 5
elif test "x$pkg_failed" = "xuntried"; then
as_fn_error "Cannot find Audacious 2.3 or later, have you installed audacious yet?" "$LINENO" 5
as_fn_error "Cannot find Audacious 2.4 or later, have you installed audacious yet?" "$LINENO" 5
else
AUDACIOUS_CFLAGS="$pkg_cv_AUDACIOUS_CFLAGS"
......@@ -7157,9 +7155,9 @@ else
$as_echo "yes" >&6; }
if test "x$PC_REQUIRES" = "x"; then
PC_REQUIRES="audacious >= 2.3"
PC_REQUIRES="audacious >= 2.4"
else
PC_REQUIRES="$PC_REQUIRES, audacious >= 2.3"
PC_REQUIRES="$PC_REQUIRES, audacious >= 2.4"
fi
......@@ -13944,7 +13942,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by audacious-plugins $as_me 2.4-rc2, which was
This file was extended by audacious-plugins $as_me 2.4.0, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -14010,7 +14008,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
audacious-plugins config.status 2.4-rc2
audacious-plugins config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
......
dnl Process this file with autoconf to produce a configure script.
AC_INIT([audacious-plugins], [2.4-rc2], [bugs+audacious-plugins@atheme.org])
AC_INIT([audacious-plugins], [2.4.0], [bugs+audacious-plugins@atheme.org])
AC_PREREQ([2.59])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_CONFIG_HEADERS([config.h])
dnl Build flags
dnl ===========
LDFLAGS="$LDFLAGS -z defs"
dnl XXX kludge for FreeBSD
if test -d "/usr/X11R6/include"; then
CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
......@@ -141,9 +137,9 @@ TRANSPORT_PLUGINS="unix-io"
dnl Check for Audacious
PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 2.3],
[ADD_PC_REQUIRES([audacious >= 2.3])],
[AC_MSG_ERROR([Cannot find Audacious 2.3 or later, have you installed audacious yet?])]
PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 2.4],
[ADD_PC_REQUIRES([audacious >= 2.4])],
[AC_MSG_ERROR([Cannot find Audacious 2.4 or later, have you installed audacious yet?])]
)
CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS"
......
......@@ -18,6 +18,7 @@ LOCALES = ca.po \
hu.po \
ja.po \
lv.po \
pl.po \
ro.po \
ru.po \
sk.po \
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -572,9 +572,22 @@ void alsa_pause (short pause)
CHECK (snd_pcm_pause, alsa_handle, pause);
}
FAILED:
pthread_cond_broadcast (& alsa_cond);
DONE:
if (! pause)
pthread_cond_broadcast (& alsa_cond);
pthread_mutex_unlock (& alsa_mutex);
return;
FAILED:
AUDDBG ("Trying to work around broken pause.\n");
if (pause)
snd_pcm_drop (alsa_handle);
else
snd_pcm_prepare (alsa_handle);
goto DONE;
}
void alsa_open_mixer (void)
......
......@@ -141,53 +141,51 @@ bscope_blur_8(guchar * ptr, gint w, gint h, gint bpl_)
sum -= 2;
*(iptr++) = sum;
}
}
void
generate_cmap(void)
{
guint32 colors[256], i, red, blue, green;
if (area) {
red = (guint32) (bscope_cfg.color / 0x10000);
green = (guint32) ((bscope_cfg.color % 0x10000) / 0x100);
blue = (guint32) (bscope_cfg.color % 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);
red = (guint32) (bscope_cfg.color / 0x10000);
green = (guint32) ((bscope_cfg.color % 0x10000) / 0x100);
blue = (guint32) (bscope_cfg.color % 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
bscope_init(void)
{
bscope_read_config();
if (area == NULL)
{
area = gtk_drawing_area_new();
gtk_widget_set_size_request(area, D_WIDTH, D_HEIGHT);
bscope_resize_video(D_WIDTH, D_HEIGHT);
gtk_widget_show(area);
}
generate_cmap();
g_signal_connect(G_OBJECT(area), "configure-event", G_CALLBACK(bscope_reconfigure), NULL);
}
/* static GtkWidget * bscope_get_widget (void) */
static void * bscope_get_widget (void)
{
if (area == NULL)
{
area = gtk_drawing_area_new ();
gtk_widget_set_size_request (area, D_WIDTH, D_HEIGHT);
bscope_resize_video (D_WIDTH, D_HEIGHT);
g_signal_connect (area, "configure-event", (GCallback)
bscope_reconfigure, NULL);
g_signal_connect (area, "destroy", (GCallback) gtk_widget_destroyed,
& area);
}
return area;
}
......@@ -243,7 +241,7 @@ bscope_render_pcm(gint16 data[2][512])
}
GDK_THREADS_ENTER();
if (GTK_WIDGET_REALIZED(area))
if (area != NULL)
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);
......
......@@ -25,7 +25,9 @@
#include "compressor.h"
float compressor_target = 0.5, compressor_strength = 0.5;
/* What is a "normal" target volume? Replay Gain stuff claims to use 89 dB, but
* what does that translate to in our PCM range? Does anybody even know? */
float compressor_target = 0.5, compressor_range = 0.5;
#define CHUNK_TIME 0.2 /* seconds */
#define CHUNKS 15
......@@ -75,8 +77,8 @@ static float calc_peak (float * data, int length)
static void do_ramp (float * data, int length, float peak_a, float peak_b)
{
float a = powf (compressor_target / peak_a, compressor_strength);
float b = powf (compressor_target / peak_b, compressor_strength);
float a = powf (peak_a / compressor_target, compressor_range - 1);
float b = powf (peak_b / compressor_target, compressor_range - 1);
int count;
for (count = 0; count < length; count ++)
......
......@@ -17,7 +17,7 @@
* the use of this software.
*/
extern float compressor_target, compressor_strength;
extern float compressor_target, compressor_range;
void compressor_config_load (void);
void compressor_config_save (void);
......
......@@ -34,8 +34,7 @@ void compressor_config_load (void)
mcs_handle_t * database = aud_cfg_db_open ();
aud_cfg_db_get_float (database, "compressor", "target", & compressor_target);
aud_cfg_db_get_float (database, "compressor", "strength",
& compressor_strength);
aud_cfg_db_get_float (database, "compressor", "range", & compressor_range);
aud_cfg_db_close (database);
}
......@@ -45,8 +44,7 @@ void compressor_config_save (void)
mcs_handle_t * database = aud_cfg_db_open ();
aud_cfg_db_set_float (database, "compressor", "target", compressor_target);
aud_cfg_db_set_float (database, "compressor", "strength",
compressor_strength);
aud_cfg_db_set_float (database, "compressor", "range", compressor_range);
aud_cfg_db_close (database);
}
......@@ -101,9 +99,9 @@ static void compressor_configure (void)
gtk_box_pack_start ((GtkBox *) vbox, hbox, FALSE, FALSE, 0);
gtk_box_pack_start ((GtkBox *) hbox, gtk_label_new (_("Target "
"volume:")), TRUE, FALSE, 0);
"volume:")), FALSE, FALSE, 0);
slider = gtk_hscale_new_with_range (0.0, 1.0, 0.1);
slider = gtk_hscale_new_with_range (0.1, 1.0, 0.1);
gtk_range_set_value ((GtkRange *) slider, compressor_target);
gtk_widget_set_size_request (slider, 100, -1);
gtk_box_pack_start ((GtkBox *) hbox, slider, FALSE, FALSE, 0);
......@@ -113,15 +111,15 @@ static void compressor_configure (void)
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start ((GtkBox *) vbox, hbox, FALSE, FALSE, 0);
gtk_box_pack_start ((GtkBox *) hbox, gtk_label_new (_("Effect "
"strength:")), TRUE, FALSE, 0);
gtk_box_pack_start ((GtkBox *) hbox, gtk_label_new (_("Dynamic "
"range:")), FALSE, FALSE, 0);
slider = gtk_hscale_new_with_range (0.0, 1.0, 0.1);
gtk_range_set_value ((GtkRange *) slider, compressor_strength);
gtk_widget_set_size_request (slider, 100, -1);
slider = gtk_hscale_new_with_range (0.0, 3.0, 0.1);
gtk_range_set_value ((GtkRange *) slider, compressor_range);
gtk_widget_set_size_request (slider, 250, -1);
gtk_box_pack_start ((GtkBox *) hbox, slider, FALSE, FALSE, 0);
g_signal_connect (slider, "value-changed", (GCallback) value_changed,
& compressor_strength);
& compressor_range);
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start ((GtkBox *) vbox, hbox, FALSE, FALSE, 0);
......
......@@ -270,18 +270,7 @@ static GdkPixbuf * get_current_album_art (void)
gint playlist = aud_playlist_get_playing ();
const gchar * filename = aud_playlist_entry_get_filename (playlist,
aud_playlist_get_position (playlist));
InputPlugin * decoder = aud_file_find_decoder (filename, FALSE);
void * data;
gint size;
GdkPixbuf * pixbuf;
if (filename == NULL || decoder == NULL || ! aud_file_read_image (filename,
decoder, & data, & size))
return NULL;
pixbuf = audgui_pixbuf_from_data (data, size);
g_free (data);
return pixbuf;
return audgui_pixbuf_for_file (filename);
}
void ui_infoarea_draw_album_art (UIInfoArea * area)
......
......@@ -111,7 +111,7 @@ give_up:
GMatchInfo *match_info;
GRegex *reg;
reg = g_regex_new("<(lyrics?)>(.*)</\\1>", (G_REGEX_MULTILINE | G_REGEX_DOTALL), 0, NULL);
reg = g_regex_new("<(lyrics?)>(.*)</\\1>", (G_REGEX_MULTILINE | G_REGEX_DOTALL | G_REGEX_UNGREEDY), 0, NULL);
g_regex_match(reg, (gchar *) lyric, G_REGEX_MATCH_NEWLINE_ANY, &match_info);
ret = g_match_info_fetch(match_info, 2);
......@@ -276,17 +276,6 @@ build_widget(void)
return window;
}
void
clear_lyrics_window(void)
{
GtkTextIter iter1, iter2;
gtk_text_buffer_get_start_iter(GTK_TEXT_BUFFER(textbuffer), &iter1);
gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(textbuffer), &iter2);
gtk_text_buffer_delete(GTK_TEXT_BUFFER(textbuffer), &iter1, &iter2);
}
void
update_lyrics_window(const Tuple *tu, const gchar *lyrics)
{
......@@ -298,7 +287,7 @@ update_lyrics_window(const Tuple *tu, const gchar *lyrics)
if (textbuffer == NULL)
return;
clear_lyrics_window();
gtk_text_buffer_set_text(GTK_TEXT_BUFFER(textbuffer), "", -1);
gtk_text_buffer_get_start_iter(GTK_TEXT_BUFFER(textbuffer), &iter);
......@@ -337,6 +326,9 @@ update_lyrics_window(const Tuple *tu, const gchar *lyrics)
real_lyrics = lyrics != NULL ? lyrics : _("\nNo lyrics were found.");
gtk_text_buffer_insert(GTK_TEXT_BUFFER(textbuffer), &iter, real_lyrics, strlen(real_lyrics));
gtk_text_buffer_get_start_iter(GTK_TEXT_BUFFER(textbuffer), &iter);
gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(textview), &iter, 0, TRUE, 0, 0);
}
void
......
......@@ -64,6 +64,7 @@ void show_dialog(const gchar* message)
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
"%s",
message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_show(dialog);
......@@ -314,7 +315,9 @@ void mtp_init(void)
gtk_widget_show (mtp_root_menuitem);
aud_menu_plugin_item_add(AUDACIOUS_MENU_MAIN, mtp_root_menuitem);
aud_menu_plugin_item_add(AUDACIOUS_MENU_PLAYLIST_RCLICK, mtp_root_menuitem);
g_signal_connect (G_OBJECT (mtp_submenu_item_up), "button_press_event",G_CALLBACK (mtp_press), NULL);
g_signal_connect (G_OBJECT (mtp_submenu_item_free), "button_press_event",G_CALLBACK (free_device), NULL);
......@@ -352,7 +355,9 @@ void mtp_cleanup(void)
if(mtp_initialised)
g_print("The MTP mutex has been unlocked\n");
#endif
aud_menu_plugin_item_remove(AUDACIOUS_MENU_MAIN, mtp_root_menuitem);
aud_menu_plugin_item_remove(AUDACIOUS_MENU_PLAYLIST_RCLICK, mtp_root_menuitem);
gtk_widget_destroy(mtp_submenu_item_up);
gtk_widget_destroy(mtp_submenu_item_up);
......
PLUGIN = psf2${PLUGIN_SUFFIX}
SRCS = corlett.c \
plugin.c \
psx.c \
psx_hw.c \
eng_psf.c \
eng_psf2.c \
eng_spx.c \
peops/spu.c \
peops2/dma.c \
peops2/registers.c \
peops2/spu.c \
include ../../buildsys.mk
include ../../extra.mk
plugindir := ${plugindir}/${INPUT_PLUGIN_DIR}
CFLAGS += ${PLUGIN_CFLAGS} -O0
CPPFLAGS += ${PLUGIN_CPPFLAGS} ${MOWGLI_CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS} -I../.. -Ispu/ -I.
LIBS += ${GTK_LIBS} ${GLIB_LIBS} ${MOWGLI_LIBS} -lz
psf2 plugin
-----------
What is this?
It's a PSF2 plugin based on:
* UPSE
* Audio Overload
* Highly Experimental
It's under the BSD license, mostly, but it uses code from PeOPS, so it's
probably GPL.
Does it work?
Yes. But there's bugs. See http://audacious-media-player.org/?title=Audacious2/PSF2Plugin
for suggestions on things you can do.
//
// Audio Overload SDK
//
// Fake ao.h to set up the general Audio Overload style environment
//
#include "../../config.h"
#ifndef __AO_H
#define __AO_H
#define AO_SUCCESS 1
#define AO_FAIL 0
#define AO_FAIL_DECOMPRESSION -1
#define MAX_DISP_INFO_LENGTH 256
#define AUDIO_RATE (44100)
enum
{
COMMAND_NONE = 0,
COMMAND_PREV,
COMMAND_NEXT,
COMMAND_RESTART,
COMMAND_HAS_PREV,
COMMAND_HAS_NEXT,
COMMAND_GET_MIN,
COMMAND_GET_MAX,
COMMAND_JUMP
};
/* Compiler defines for Xcode */
#ifndef WORDS_BIGENDIAN
#define LSB_FIRST 1
#endif
typedef unsigned char ao_bool;
#ifdef __GNUC__
#include <stddef.h> // get NULL
#include <stdbool.h>
#ifndef nil
#define nil NULL
#endif
#ifndef TRUE
#define TRUE (1)
#endif
#ifndef FALSE
#define FALSE (0)
#endif
#define xmalloc(a) malloc(a)
#endif
#ifdef _MSC_VER
#include <stddef.h> // get NULL
#include <wchar.h> // for off_t
#ifndef nil
#define nil NULL
#endif
#ifndef TRUE
#define TRUE (1)
#endif
#ifndef FALSE
#define FALSE (0)
#endif
#define true (1)
#define false (0)
#define xmalloc(a) malloc(a)
#define strcasecmp _strcmpi
#endif
#ifndef PATH_MAX
#define PATH_MAX 2048
#endif
typedef unsigned char uint8;
typedef unsigned char UINT8;
typedef signed char int8;
typedef signed char INT8;
typedef unsigned short uint16;
typedef unsigned short UINT16;
typedef signed short int16;
typedef signed short INT16;
typedef signed int int32;
typedef unsigned int uint32;
#ifdef LONG_IS_64BIT
typedef signed long int64;
typedef unsigned long uint64;
#else
typedef signed long long int64;
typedef unsigned long long uint64;
#endif
#ifdef WIN32
#ifndef _BASETSD_H
typedef signed int INT32;
typedef unsigned int UINT32;
typedef signed long long INT64;
typedef unsigned long long UINT64;
#endif
#else
typedef signed int INT32;
typedef unsigned int UINT32;
#ifdef LONG_IS_64BIT
typedef signed long INT64;
typedef unsigned long UINT64;
#else
typedef signed long long INT64;
typedef unsigned long long UINT64;
#endif
#endif
#ifndef INLINE
#if defined(_MSC_VER)
#define INLINE __forceinline
#elif defined(__GNUC__)
#define INLINE __inline__
#elif defined(_MWERKS_)
#define INLINE inline
#elif defined(__powerc)
#define INLINE inline
#else
#define INLINE
#endif
#endif
#if LSB_FIRST
#define LE16(x) (x)
#define LE32(x) (x)
#ifndef __ENDIAN__ /* Mac OS X Endian header has this function in it */
static unsigned long INLINE Endian32_Swap(unsigned long addr)
{
unsigned long res = (((addr&0xff000000)>>24) |
((addr&0x00ff0000)>>8) |
((addr&0x0000ff00)<<8) |
((addr&0x000000ff)<<24));
return res;
}
#endif
#else
static unsigned short INLINE LE16(unsigned short x)
{
unsigned short res = (((x & 0xFF00) >> 8) | ((x & 0xFF) << 8));
return res;
}
static unsigned long INLINE LE32(unsigned long addr)
{
unsigned long res = (((addr&0xff000000)>>24) |
((addr&0x00ff0000)>>8) |
((addr&0x0000ff00)<<8) |
((addr&0x000000ff)<<24));
return res;
}
#endif
int ao_get_lib(char *filename, uint8 **buffer, uint64 *length);
#endif // AO_H
This diff is collapsed.
//
// Audio Overload
// Emulated music player
//
// (C) 2000-2008 Richard F. Bannister
//
// corlett.h
#define MAX_UNKNOWN_TAGS 32
typedef struct {
char lib[256];
char libaux[8][256];
char inf_title[256];
char inf_copy[256];
char inf_artist[256];
char inf_game[256];
char inf_year[256];
char inf_length[256];
char inf_fade[256];