Mercurial > audlegacy-plugins
changeset 912:5bd17596c7e9 trunk
[svn] - patches from upstream TTA author. see http://boards.nenolod.net/viewtopic.php?t=375
author | nenolod |
---|---|
date | Wed, 04 Apr 2007 10:52:15 -0700 |
parents | 0010163f8e25 |
children | 4fbe6bd78021 |
files | ChangeLog src/tta/aud-tta.c src/tta/crc32.h src/tta/ttadec.c src/tta/ttadec.h src/tta/ttaid3tag.h |
diffstat | 6 files changed, 25 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Apr 04 07:48:53 2007 -0700 +++ b/ChangeLog Wed Apr 04 10:52:15 2007 -0700 @@ -1,3 +1,17 @@ +2007-04-04 14:48:53 +0000 Giacomo Lozito <james@develia.org> + revision [1922] + - aosd: added support to detect whether a composite manager is running (either standard with _NET_WM_CM_Sn or xcompmgr) + trunk/src/aosd/aosd.c | 1 + trunk/src/aosd/aosd_cfg.c | 2 - + trunk/src/aosd/aosd_common.h | 2 - + trunk/src/aosd/aosd_osd.c | 57 ++++++++++++++++++++++++++++++++++-- + trunk/src/aosd/aosd_osd.h | 3 + + trunk/src/aosd/aosd_ui.c | 67 +++++++++++++++++++++++++++++++++++++++++-- + trunk/src/aosd/ghosd.c | 31 ++++++++++++++++--- + trunk/src/aosd/ghosd.h | 3 + + 8 files changed, 151 insertions(+), 15 deletions(-) + + 2007-04-02 20:54:59 +0000 Giacomo Lozito <james@develia.org> revision [1920] rootvis: do not call cleanup routines if the plugin was not initted
--- a/src/tta/aud-tta.c Wed Apr 04 07:48:53 2007 -0700 +++ b/src/tta/aud-tta.c Wed Apr 04 10:52:15 2007 -0700 @@ -58,7 +58,6 @@ #define PLUGIN_VERSION "1.2" #define PROJECT_URL "<http://www.true-audio.com>" -#pragma pack (1) #include "ttalib.h" #define OUTPUT_ERROR (MEMORY_ERROR+1) @@ -127,7 +126,7 @@ static GThread *decode_thread; static char sample_buffer[PCM_BUFFER_LENGTH * MAX_BSIZE * MAX_NCH]; static tta_info info; // currently playing file info -static long seek_position = -1; +static int seek_position = -1; static int playing = FALSE; static int read_samples = -1; @@ -504,7 +503,7 @@ { char *filename = playback->filename; char *title; - long datasize, origsize, bitrate; + int datasize, origsize, bitrate; g_mutex_lock(play_mutex); playing = FALSE; @@ -559,7 +558,7 @@ datasize = file_size(filename) - info.DATAPOS; origsize = info.DATALENGTH * info.BSIZE * info.NCH; - bitrate = (long) ((float) datasize / origsize * + bitrate = (int) ((float) datasize / origsize * (info.SAMPLERATE * info.NCH * info.BPS)); tta_ip.set_info (title, 1000 * info.LENGTH, bitrate, info.SAMPLERATE, info.NCH);
--- a/src/tta/crc32.h Wed Apr 04 07:48:53 2007 -0700 +++ b/src/tta/crc32.h Wed Apr 04 10:52:15 2007 -0700 @@ -31,7 +31,7 @@ #ifndef CRC32_H #define CRC32_H -const unsigned int crc32_table[256] = { +const __uint32_t crc32_table[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, @@ -101,7 +101,7 @@ #define UPDATE_CRC32(x, crc) crc = \ (((crc>>8) & 0x00FFFFFF) ^ crc32_table[(crc^x) & 0xFF]) -static unsigned int +static __uint32_t crc32 (unsigned char *buffer, unsigned int len) { unsigned int i; unsigned int crc = 0xFFFFFFFF;
--- a/src/tta/ttadec.c Wed Apr 04 07:48:53 2007 -0700 +++ b/src/tta/ttadec.c Wed Apr 04 10:52:15 2007 -0700 @@ -32,8 +32,8 @@ #include <stdio.h> #include <string.h> +#include "ttadec.h" #include "ttalib.h" -#include "ttadec.h" #include "crc32.h" #include "filters.h" @@ -58,9 +58,9 @@ static unsigned int *seek_table; // the playing position table static unsigned int st_state; //seek table status -static unsigned int frame_crc32; -static unsigned int bit_count; -static unsigned int bit_cache; +static __uint32_t frame_crc32; +static __uint32_t bit_count; +static __uint32_t bit_cache; static unsigned char *bitpos; static unsigned int bitrate;
--- a/src/tta/ttadec.h Wed Apr 04 07:48:53 2007 -0700 +++ b/src/tta/ttadec.h Wed Apr 04 10:52:15 2007 -0700 @@ -46,12 +46,6 @@ #define WAVE_FORMAT_PCM 1 #endif -#ifdef _WIN32 - typedef unsigned __int64 uint64; -#else - typedef unsigned long long uint64; -#endif - const unsigned int bit_mask[] = { 0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, @@ -97,7 +91,7 @@ if (bsize > 2) *out++ = (byte)(*x >> 16); } #endif -#define PREDICTOR1(x, k) ((long)((((uint64)x << k) - x) >> k)) +#define PREDICTOR1(x, k) ((int)((((__uint64_t)x << k) - x) >> k)) #define DEC(x) (((x)&1)?(++(x)>>1):(-(x)>>1)) typedef struct {