Projects
Multimedia
audacious-plugins
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 35
View file
audacious-plugins.changes
Changed
@@ -1,4 +1,8 @@ -------------------------------------------------------------------- +Sun Nov 06 00:00:00 UTC 2011 - detlef@links2linux.de + +- new upstream version <3.0.3> + +-------------------------------------------------------------------------------------------------------------------------------------- Sat Aug 28 00:00:00 UTC 2011 - detlef@links2linux.de - new upstream version <3.0.2>
View file
audacious-plugins.spec
Changed
@@ -3,7 +3,7 @@ %define grp Productivity/Multimedia/Sound/Players Name: audacious-plugins -Version: 3.0.2 +Version: 3.0.3 Release: 1 Summary: Plugins for Audacious @@ -11,17 +11,18 @@ Group: %{grp} URL: http://audacious-media-player.org/ -Source0: http://distfiles.atheme.org/%{name}-%{version}.tar.gz +Source0: http://distfiles.atheme.org/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: audacious-devel = %{version} -BuildRequires: bluez-devel bs2b-devel esound-devel flac-devel gtkglext-devel libbinio-devel -BuildRequires: libcddb-devel libcdio-devel libcue-devel libcurl-devel libfaad-devel -BuildRequires: libffmpeg_oldabi-devel libfluidsynth-devel libmad-devel libmms-devel +BuildRequires: bluez-devel bs2b-devel esound-devel flac-devel gtkglext-devel +BuildRequires: libbinio-devel libcddb-devel libcdio-devel libcue-devel +BuildRequires: libcurl-devel libfaad-devel libffmpeg_oldabi-devel +BuildRequires: libfluidsynth-devel libmad-devel libmms-devel libmodplug-devel BuildRequires: libmp3lame-devel libmpcdec-devel libmtp-devel libnotify-devel -BuildRequires: libprojectM-devel libshout-devel libusb-devel wavpack-devel -BuildRequires: lirc-devel neon-devel SDL-devel libsndfile-devel libtag-devel +BuildRequires: libprojectM-devel libshout-devel libsmbclient-devel libusb-devel +BuildRequires: wavpack-devel neon-devel SDL-devel libsndfile-devel libtag-devel BuildRequires: update-desktop-files libmpg123-devel %if %suse_version >= 1120 @@ -73,14 +74,6 @@ Fluidsynth MIDI support plugins for Audacious. -#%package control-lirc -#Summary: LIRc control support for Audacious -#Group: %{grp} -# -#%description control-lirc -#Infrared Remote Control support for Audacious. - - %package transport-mms Summary: MMS protocol transport support for Audacious Group: %{grp} @@ -98,20 +91,12 @@ neon library. -#%package visualization-paranormal -#Summary: Paranormal Visualization Plugin for Audacious -#Group: %{grp} -# -#%description visualization-paranormal -#"Paranormal" visualization plugin for Audacious, requires SDL. - +%package transport-smb +Summary: SMB protocol transport support for Audacious +Group: %{grp} -#%package visualization-projectM -#Summary: ProjectM Visualization Plugin for Audacious -#Group: %{grp} -# -#%description visualization-projectM -#"ProjectM" visualization plugin for Audacious. +%description transport-smb +SMB protocol transport support for Audacious, using the smbclient library. %prep @@ -122,12 +107,11 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -%__sed -i -e "s|_mm_setzero_pd|ichwilleinfachkeinssedasgehtnichtaufathlonxp|g" configure +%__sed -i -e "s|_mm_setzero_pd|ssegehtnichtaufathlonxp|g" configure %configure \ --disable-rpath \ --enable-debug \ - --disable-jack \ --disable-filewriter_vorbis \ --enable-amidiplug \ %if %suse_version <= 1110 @@ -165,18 +149,15 @@ %{_libdir}/audacious/Effect/crystalizer.so %{_libdir}/audacious/Effect/bs2b.so %{_libdir}/audacious/Effect/echo.so -#%{_libdir}/audacious/Effect/ladspa.so %{_libdir}/audacious/Effect/mixdown.so %{_libdir}/audacious/Effect/resample.so %{_libdir}/audacious/Effect/sndstretch.so %{_libdir}/audacious/Effect/stereo.so %{_libdir}/audacious/Effect/voice_removal.so %dir %{_libdir}/audacious/General -#%{_libdir}/audacious/General/alarm.so %{_libdir}/audacious/General/albumart.so %{_libdir}/audacious/General/aosd.so %{_libdir}/audacious/General/cd-menu-items.so -#%{_libdir}/audacious/General/evdev-plug.so %{_libdir}/audacious/General/gnomeshortcuts.so %{_libdir}/audacious/General/gtkui.so %{_libdir}/audacious/General/hotkey.so @@ -189,7 +170,6 @@ %{_libdir}/audacious/General/statusicon.so %endif %{_libdir}/audacious/General/skins.so -#%{_libdir}/audacious/General/streambrowser.so %{_libdir}/audacious/Input/aac.so %{_libdir}/audacious/Input/amidi-plug.so %dir %{_libdir}/audacious/Input/amidi-plug @@ -212,21 +192,16 @@ %{_libdir}/audacious/Output/OSS.so %{_libdir}/audacious/Output/alsa.so %{_libdir}/audacious/Output/filewriter.so -#%{_libdir}/audacious/Output/jackout.so %{_libdir}/audacious/Output/null.so %{_libdir}/audacious/Output/sdlout.so %dir %{_libdir}/audacious/Transport -#%{_libdir}/audacious/Transport/gio.so %{_libdir}/audacious/Transport/unix-io.so %dir %{_libdir}/audacious/Visualization %{_libdir}/audacious/Visualization/cairo-spectrum.so %{_libdir}/audacious/Visualization/blur_scope.so %{_libdir}/audacious/Visualization/moodbar.so %{_libdir}/audacious/Visualization/rocklight.so -#%{_libdir}/audacious/Visualization/spectrum.so %dir %{_datadir}/audacious/ -#%dir %{_datadir}/audacious/images -#%{_datadir}/audacious/images/* %dir %{_datadir}/audacious/Skins %dir %{_datadir}/audacious/Skins/Classic %{_datadir}/audacious/Skins/Classic/* @@ -265,11 +240,6 @@ %dir %{_libdir}/audacious/Input %{_libdir}/audacious/Input/amidi-plug/ap-fluidsynth.so -#%files control-lirc -#%defattr(-,root,root) -#%dir %{_libdir}/audacious/General -#%{_libdir}/audacious/General/lirc.so - %files transport-mms %defattr(-,root,root) %{_libdir}/audacious/Transport/mms.so @@ -279,17 +249,10 @@ %dir %{_libdir}/audacious/Transport %{_libdir}/audacious/Transport/neon.so -#%files visualization-paranormal -#%defattr(-,root,root) -#%dir %{_libdir}/audacious/Visualization -#%{_libdir}/audacious/Visualization/paranormal.so -#%dir %{_datadir}/audacious/paranormal -#%dir %{_datadir}/audacious/paranormal/Presets -#%config %{_datadir}/audacious/paranormal/Presets/* - -#%files visualization-projectM -#%defattr(-,root,root) -#%{_libdir}/audacious/Visualization/projectm-1.0.so +%files transport-smb +%defattr(-,root,root) +%dir %{_libdir}/audacious/Transport +%{_libdir}/audacious/Transport/smb.so %changelog
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/fastmix.cxx
Deleted
@@ -1,1852 +0,0 @@ -/* - * This program is free software; you can redistribute it and 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. - * - * Authors: Olivier Lapicque <olivierl@jps.net> - * Markus Fick <webmaster@mark-f.de> spline + fir-resampler -*/ - -#include "stdafx.h" -#include "sndfile.h" -#include <math.h> - -// Front Mix Buffer (Also room for interleaved rear mix) -int MixSoundBuffer[MIXBUFFERSIZE*4]; - -// Reverb Mix Buffer -#ifndef MODPLUG_NO_REVERB -int MixReverbBuffer[MIXBUFFERSIZE*2]; -extern UINT gnReverbSend; -#endif - -int MixRearBuffer[MIXBUFFERSIZE*2]; -float MixFloatBuffer[MIXBUFFERSIZE*2]; - - -extern LONG gnDryROfsVol; -extern LONG gnDryLOfsVol; -extern LONG gnRvbROfsVol; -extern LONG gnRvbLOfsVol; - -// 4x256 taps polyphase FIR resampling filter -extern short int gFastSinc[]; -extern short int gKaiserSinc[]; // 8-taps polyphase -/* - ----------------------------------------------------------------------------- - cubic spline interpolation doc, - (derived from "digital image warping", g. wolberg) - - interpolation polynomial: f(x) = A3*(x-floor(x))**3 + A2*(x-floor(x))**2 + A1*(x-floor(x)) + A0 - - with Y = equispaced data points (dist=1), YD = first derivates of data points and IP = floor(x) - the A[0..3] can be found by solving - A0 = Y[IP] - A1 = YD[IP] - A2 = 3*(Y[IP+1]-Y[IP])-2.0*YD[IP]-YD[IP+1] - A3 = -2.0 * (Y[IP+1]-Y[IP]) + YD[IP] - YD[IP+1] - - with the first derivates as - YD[IP] = 0.5 * (Y[IP+1] - Y[IP-1]); - YD[IP+1] = 0.5 * (Y[IP+2] - Y[IP]) - - the coefs becomes - A0 = Y[IP] - A1 = YD[IP] - = 0.5 * (Y[IP+1] - Y[IP-1]); - A2 = 3.0 * (Y[IP+1]-Y[IP])-2.0*YD[IP]-YD[IP+1] - = 3.0 * (Y[IP+1] - Y[IP]) - 0.5 * 2.0 * (Y[IP+1] - Y[IP-1]) - 0.5 * (Y[IP+2] - Y[IP]) - = 3.0 * Y[IP+1] - 3.0 * Y[IP] - Y[IP+1] + Y[IP-1] - 0.5 * Y[IP+2] + 0.5 * Y[IP] - = -0.5 * Y[IP+2] + 2.0 * Y[IP+1] - 2.5 * Y[IP] + Y[IP-1] - = Y[IP-1] + 2 * Y[IP+1] - 0.5 * (5.0 * Y[IP] + Y[IP+2]) - A3 = -2.0 * (Y[IP+1]-Y[IP]) + YD[IP] + YD[IP+1] - = -2.0 * Y[IP+1] + 2.0 * Y[IP] + 0.5 * (Y[IP+1] - Y[IP-1]) + 0.5 * (Y[IP+2] - Y[IP]) - = -2.0 * Y[IP+1] + 2.0 * Y[IP] + 0.5 * Y[IP+1] - 0.5 * Y[IP-1] + 0.5 * Y[IP+2] - 0.5 * Y[IP] - = 0.5 * Y[IP+2] - 1.5 * Y[IP+1] + 1.5 * Y[IP] - 0.5 * Y[IP-1] - = 0.5 * (3.0 * (Y[IP] - Y[IP+1]) - Y[IP-1] + YP[IP+2]) - - then interpolated data value is (horner rule) - out = (((A3*x)+A2)*x+A1)*x+A0 - - this gives parts of data points Y[IP-1] to Y[IP+2] of - part x**3 x**2 x**1 x**0 - Y[IP-1] -0.5 1 -0.5 0 - Y[IP] 1.5 -2.5 0 1 - Y[IP+1] -1.5 2 0.5 0 - Y[IP+2] 0.5 -0.5 0 0 - ----------------------------------------------------------------------------- -*/ -// number of bits used to scale spline coefs -#define SPLINE_QUANTBITS 14 -#define SPLINE_QUANTSCALE (1L<<SPLINE_QUANTBITS) -#define SPLINE_8SHIFT (SPLINE_QUANTBITS-8) -#define SPLINE_16SHIFT (SPLINE_QUANTBITS) -// forces coefsset to unity gain -#define SPLINE_CLAMPFORUNITY -// log2(number) of precalculated splines (range is [4..14]) -#define SPLINE_FRACBITS 10 -#define SPLINE_LUTLEN (1L<<SPLINE_FRACBITS) - -class CzCUBICSPLINE -{ public: - CzCUBICSPLINE( ); - ~CzCUBICSPLINE( ); - static signed short lut[4*(1L<<SPLINE_FRACBITS)]; -}; - -signed short CzCUBICSPLINE::lut[4*(1L<<SPLINE_FRACBITS)]; - -CzCUBICSPLINE::CzCUBICSPLINE( ) -{ int _LIi; - int _LLen = (1L<<SPLINE_FRACBITS); - float _LFlen = 1.0f / (float)_LLen; - float _LScale = (float)SPLINE_QUANTSCALE; - for(_LIi=0;_LIi<_LLen;_LIi++) - { float _LCm1, _LC0, _LC1, _LC2; - float _LX = ((float)_LIi)*_LFlen; - int _LSum,_LIdx = _LIi<<2; - _LCm1 = (float)floor( 0.5 + _LScale * (-0.5*_LX*_LX*_LX + 1.0 * _LX*_LX - 0.5 * _LX ) ); - _LC0 = (float)floor( 0.5 + _LScale * ( 1.5*_LX*_LX*_LX - 2.5 * _LX*_LX + 1.0 ) ); - _LC1 = (float)floor( 0.5 + _LScale * (-1.5*_LX*_LX*_LX + 2.0 * _LX*_LX + 0.5 * _LX ) ); - _LC2 = (float)floor( 0.5 + _LScale * ( 0.5*_LX*_LX*_LX - 0.5 * _LX*_LX ) ); - lut[_LIdx+0] = (signed short)( (_LCm1 < -_LScale) ? -_LScale : ((_LCm1 > _LScale) ? _LScale : _LCm1) ); - lut[_LIdx+1] = (signed short)( (_LC0 < -_LScale) ? -_LScale : ((_LC0 > _LScale) ? _LScale : _LC0 ) ); - lut[_LIdx+2] = (signed short)( (_LC1 < -_LScale) ? -_LScale : ((_LC1 > _LScale) ? _LScale : _LC1 ) ); - lut[_LIdx+3] = (signed short)( (_LC2 < -_LScale) ? -_LScale : ((_LC2 > _LScale) ? _LScale : _LC2 ) ); -#ifdef SPLINE_CLAMPFORUNITY - _LSum = lut[_LIdx+0]+lut[_LIdx+1]+lut[_LIdx+2]+lut[_LIdx+3]; - if( _LSum != SPLINE_QUANTSCALE ) - { int _LMax = _LIdx; - if( lut[_LIdx+1]>lut[_LMax] ) _LMax = _LIdx+1; - if( lut[_LIdx+2]>lut[_LMax] ) _LMax = _LIdx+2; - if( lut[_LIdx+3]>lut[_LMax] ) _LMax = _LIdx+3; - lut[_LMax] += (SPLINE_QUANTSCALE-_LSum); - } -#endif - } -} - -CzCUBICSPLINE::~CzCUBICSPLINE( ) -{ // nothing todo -} - -CzCUBICSPLINE sspline; - -/* - ------------------------------------------------------------------------------------------------ - fir interpolation doc, - (derived from "an engineer's guide to fir digital filters", n.j. loy) - - calculate coefficients for ideal lowpass filter (with cutoff = fc in 0..1 (mapped to 0..nyquist)) - c[-N..N] = (i==0) ? fc : sin(fc*pi*i)/(pi*i) - - then apply selected window to coefficients - c[-N..N] *= w(0..N) - with n in 2*N and w(n) being a window function (see loy) - - then calculate gain and scale filter coefs to have unity gain. - ------------------------------------------------------------------------------------------------ -*/ -// quantizer scale of window coefs -#define WFIR_QUANTBITS 15 -#define WFIR_QUANTSCALE (1L<<WFIR_QUANTBITS) -#define WFIR_8SHIFT (WFIR_QUANTBITS-8) -#define WFIR_16BITSHIFT (WFIR_QUANTBITS) -// log2(number)-1 of precalculated taps range is [4..12] -#define WFIR_FRACBITS 10 -#define WFIR_LUTLEN ((1L<<(WFIR_FRACBITS+1))+1) -// number of samples in window -#define WFIR_LOG2WIDTH 3 -#define WFIR_WIDTH (1L<<WFIR_LOG2WIDTH) -#define WFIR_SMPSPERWING ((WFIR_WIDTH-1)>>1) -// cutoff (1.0 == pi/2) -#define WFIR_CUTOFF 0.90f -// wfir type -#define WFIR_HANN 0 -#define WFIR_HAMMING 1 -#define WFIR_BLACKMANEXACT 2 -#define WFIR_BLACKMAN3T61 3 -#define WFIR_BLACKMAN3T67 4 -#define WFIR_BLACKMAN4T92 5 -#define WFIR_BLACKMAN4T74 6 -#define WFIR_KAISER4T 7 -#define WFIR_TYPE WFIR_BLACKMANEXACT -// wfir help -#ifndef M_zPI -#define M_zPI 3.1415926535897932384626433832795 -#endif -#define M_zEPS 1e-8 -#define M_zBESSELEPS 1e-21 - -class CzWINDOWEDFIR -{ -public: - CzWINDOWEDFIR( ); - ~CzWINDOWEDFIR( ); - float coef( int _PCnr, float _POfs, float _PCut, int _PWidth, int _PType ) //float _PPos, float _PFc, int _PLen ) - { - double _LWidthM1 = _PWidth-1; - double _LWidthM1Half = 0.5*_LWidthM1; - double _LPosU = ((double)_PCnr - _POfs); - double _LPos = _LPosU-_LWidthM1Half; - double _LPIdl = 2.0*M_zPI/_LWidthM1; - double _LWc,_LSi; - if( fabs(_LPos)<M_zEPS ) { - _LWc = 1.0; - _LSi = _PCut; - } else { - switch( _PType )
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/it_defs.h
Deleted
@@ -1,135 +0,0 @@ -#ifndef _ITDEFS_H_ -#define _ITDEFS_H_ - -#pragma pack(1) - -typedef struct tagITFILEHEADER -{ - DWORD id; // 0x4D504D49 - CHAR songname[26]; - BYTE hilight_minor; - BYTE hilight_major; - WORD ordnum; - WORD insnum; - WORD smpnum; - WORD patnum; - WORD cwtv; - WORD cmwt; - WORD flags; - WORD special; - BYTE globalvol; - BYTE mv; - BYTE speed; - BYTE tempo; - BYTE sep; - BYTE pwd; - WORD msglength; - DWORD msgoffset; - DWORD reserved2; - BYTE chnpan[64]; - BYTE chnvol[64]; -} ITFILEHEADER; - - -typedef struct tagITENVELOPE -{ - BYTE flags; - BYTE num; - BYTE lpb; - BYTE lpe; - BYTE slb; - BYTE sle; - BYTE data[25*3]; - BYTE reserved; -} ITENVELOPE; - -// Old Impulse Instrument Format (cmwt < 0x200) -typedef struct tagITOLDINSTRUMENT -{ - DWORD id; // IMPI = 0x49504D49 - CHAR filename[12]; // DOS file name - BYTE zero; - BYTE flags; - BYTE vls; - BYTE vle; - BYTE sls; - BYTE sle; - WORD reserved1; - WORD fadeout; - BYTE nna; - BYTE dnc; - WORD trkvers; - BYTE nos; - BYTE reserved2; - CHAR name[26]; - WORD reserved3[3]; - BYTE keyboard[240]; - BYTE volenv[200]; - BYTE nodes[50]; -} ITOLDINSTRUMENT; - - -// Impulse Instrument Format -typedef struct tagITINSTRUMENT -{ - DWORD id; - CHAR filename[12]; - BYTE zero; - BYTE nna; - BYTE dct; - BYTE dca; - WORD fadeout; - signed char pps; - BYTE ppc; - BYTE gbv; - BYTE dfp; - BYTE rv; - BYTE rp; - WORD trkvers; - BYTE nos; - BYTE reserved1; - CHAR name[26]; - BYTE ifc; - BYTE ifr; - BYTE mch; - BYTE mpr; - WORD mbank; - BYTE keyboard[240]; - ITENVELOPE volenv; - ITENVELOPE panenv; - ITENVELOPE pitchenv; - BYTE dummy[4]; // was 7, but IT v2.17 saves 554 bytes -} ITINSTRUMENT; - - -// IT Sample Format -typedef struct ITSAMPLESTRUCT -{ - DWORD id; // 0x53504D49 - CHAR filename[12]; - BYTE zero; - BYTE gvl; - BYTE flags; - BYTE vol; - CHAR name[26]; - BYTE cvt; - BYTE dfp; - DWORD length; - DWORD loopbegin; - DWORD loopend; - DWORD C5Speed; - DWORD susloopbegin; - DWORD susloopend; - DWORD samplepointer; - BYTE vis; - BYTE vid; - BYTE vir; - BYTE vit; -} ITSAMPLESTRUCT; - -#pragma pack() - -extern BYTE autovibit2xm[8]; -extern BYTE autovibxm2it[8]; - -#endif
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_669.cxx
Deleted
@@ -1,193 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -//////////////////////////////////////////////////////////// -// 669 Composer / UNIS 669 module loader -//////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -typedef struct tagFILEHEADER669 -{ - WORD sig; // 'if' or 'JN' - signed char songmessage[108]; // Song Message - BYTE samples; // number of samples (1-64) - BYTE patterns; // number of patterns (1-128) - BYTE restartpos; - BYTE orders[128]; - BYTE tempolist[128]; - BYTE breaks[128]; -} FILEHEADER669; - - -typedef struct tagSAMPLE669 -{ - BYTE filename[13]; - BYTE length[4]; // when will somebody think about DWORD align ??? - BYTE loopstart[4]; - BYTE loopend[4]; -} SAMPLE669; - -DWORD lengthArrayToDWORD(const BYTE length[4]) { - DWORD len = (length[3] << 24) + - (length[2] << 16) + - (length[1] << 8) + - (length[0]); - - return(len); -} - - -BOOL CSoundFile::Read669(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - const FILEHEADER669 *pfh = (const FILEHEADER669 *)lpStream; - const SAMPLE669 *psmp = (const SAMPLE669 *)(lpStream + 0x1F1); - DWORD dwMemPos = 0; - - if ((!lpStream) || (dwMemLength < sizeof(FILEHEADER669))) return FALSE; - if ((bswapLE16(pfh->sig) != 0x6669) && (bswapLE16(pfh->sig) != 0x4E4A)) return FALSE; - if ((!pfh->samples) || (pfh->samples > 64) || (pfh->restartpos >= 128) - || (!pfh->patterns) || (pfh->patterns > 128)) return FALSE; - DWORD dontfuckwithme = 0x1F1 + pfh->samples * sizeof(SAMPLE669) + pfh->patterns * 0x600; - if (dontfuckwithme > dwMemLength) return FALSE; - for (UINT ichk=0; ichk<pfh->samples; ichk++) - { - DWORD len = lengthArrayToDWORD(psmp[ichk].length); - dontfuckwithme += len; - } - if (dontfuckwithme > dwMemLength) return FALSE; - // That should be enough checking: this must be a 669 module. - m_nType = MOD_TYPE_669; - m_dwSongFlags |= SONG_LINEARSLIDES; - m_nMinPeriod = 28 << 2; - m_nMaxPeriod = 1712 << 3; - m_nDefaultTempo = 125; - m_nDefaultSpeed = 6; - m_nChannels = 8; - memcpy(m_szNames[0], pfh->songmessage, 16); - m_nSamples = pfh->samples; - for (UINT nins=1; nins<=m_nSamples; nins++, psmp++) - { - DWORD len = lengthArrayToDWORD(psmp->length); - DWORD loopstart = lengthArrayToDWORD(psmp->loopstart); - DWORD loopend = lengthArrayToDWORD(psmp->loopend); - if (len > MAX_SAMPLE_LENGTH) len = MAX_SAMPLE_LENGTH; - if ((loopend > len) && (!loopstart)) loopend = 0; - if (loopend > len) loopend = len; - if (loopstart + 4 >= loopend) loopstart = loopend = 0; - Ins[nins].nLength = len; - Ins[nins].nLoopStart = loopstart; - Ins[nins].nLoopEnd = loopend; - if (loopend) Ins[nins].uFlags |= CHN_LOOP; - memcpy(m_szNames[nins], psmp->filename, 13); - Ins[nins].nVolume = 256; - Ins[nins].nGlobalVol = 64; - Ins[nins].nPan = 128; - } - // Song Message - m_lpszSongComments = new char[109]; - memcpy(m_lpszSongComments, pfh->songmessage, 108); - m_lpszSongComments[108] = 0; - // Reading Orders - memcpy(Order, pfh->orders, 128); - m_nRestartPos = pfh->restartpos; - if (Order[m_nRestartPos] >= pfh->patterns) m_nRestartPos = 0; - // Reading Pattern Break Locations - for (UINT npan=0; npan<8; npan++) - { - ChnSettings[npan].nPan = (npan & 1) ? 0x30 : 0xD0; - ChnSettings[npan].nVolume = 64; - } - // Reading Patterns - dwMemPos = 0x1F1 + pfh->samples * 25; - for (UINT npat=0; npat<pfh->patterns; npat++) - { - Patterns[npat] = AllocatePattern(64, m_nChannels); - if (!Patterns[npat]) break; - PatternSize[npat] = 64; - MODCOMMAND *m = Patterns[npat]; - const BYTE *p = lpStream + dwMemPos; - for (UINT row=0; row<64; row++) - { - MODCOMMAND *mspeed = m; - if ((row == pfh->breaks[npat]) && (row != 63)) - { - for (UINT i=0; i<8; i++) - { - m[i].command = CMD_PATTERNBREAK; - m[i].param = 0; - } - } - for (UINT n=0; n<8; n++, m++, p+=3) - { - UINT note = p[0] >> 2; - UINT instr = ((p[0] & 0x03) << 4) | (p[1] >> 4); - UINT vol = p[1] & 0x0F; - if (p[0] < 0xFE) - { - m->note = note + 37; - m->instr = instr + 1; - } - if (p[0] <= 0xFE) - { - m->volcmd = VOLCMD_VOLUME; - m->vol = (vol << 2) + 2; - } - if (p[2] != 0xFF) - { - UINT command = p[2] >> 4; - UINT param = p[2] & 0x0F; - switch(command) - { - case 0x00: command = CMD_PORTAMENTOUP; break; - case 0x01: command = CMD_PORTAMENTODOWN; break; - case 0x02: command = CMD_TONEPORTAMENTO; break; - case 0x03: command = CMD_MODCMDEX; param |= 0x50; break; - case 0x04: command = CMD_VIBRATO; param |= 0x40; break; - case 0x05: if (param) command = CMD_SPEED; else command = 0; param += 2; break; - case 0x06: if (param == 0) { command = CMD_PANNINGSLIDE; param = 0xFE; } else - if (param == 1) { command = CMD_PANNINGSLIDE; param = 0xEF; } else - command = 0; - break; - default: command = 0; - } - if (command) - { - if (command == CMD_SPEED) mspeed = NULL; - m->command = command; - m->param = param; - } - } - } - if ((!row) && (mspeed)) - { - for (UINT i=0; i<8; i++) if (!mspeed[i].command) - { - mspeed[i].command = CMD_SPEED; - mspeed[i].param = pfh->tempolist[npat] + 2; - break; - } - } - } - dwMemPos += 0x600; - } - // Reading Samples - for (UINT n=1; n<=m_nSamples; n++) - { - UINT len = Ins[n].nLength; - if (dwMemPos >= dwMemLength) break; - if (len > 4) ReadSample(&Ins[n], RS_PCM8U, (LPSTR)(lpStream+dwMemPos), dwMemLength - dwMemPos); - dwMemPos += len; - } - return TRUE; -} - -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_amf.cxx
Deleted
@@ -1,422 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -/////////////////////////////////////////////////// -// -// AMF module loader -// -// There is 2 types of AMF files: -// - ASYLUM Music Format -// - Advanced Music Format(DSM) -// -/////////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#define AMFLOG - -//#pragma warning(disable:4244) - -#pragma pack(1) - -typedef struct _AMFFILEHEADER -{ - UCHAR szAMF[3]; - UCHAR version; - CHAR title[32]; - UCHAR numsamples; - UCHAR numorders; - USHORT numtracks; - UCHAR numchannels; -} AMFFILEHEADER; - -typedef struct _AMFSAMPLE -{ - UCHAR type; - CHAR samplename[32]; - CHAR filename[13]; - ULONG offset; - ULONG length; - USHORT c2spd; - UCHAR volume; -} AMFSAMPLE; - - -#pragma pack() - - -#ifdef AMFLOG -extern void Log(LPCSTR, ...); -#endif - -VOID AMF_Unpack(MODCOMMAND *pPat, const BYTE *pTrack, UINT nRows, UINT nChannels) -//------------------------------------------------------------------------------- -{ - UINT lastinstr = 0; - UINT nTrkSize = bswapLE16(*(USHORT *)pTrack); - nTrkSize += (UINT)pTrack[2] << 16; - pTrack += 3; - while (nTrkSize--) - { - UINT row = pTrack[0]; - UINT cmd = pTrack[1]; - UINT arg = pTrack[2]; - if (row >= nRows) break; - MODCOMMAND *m = pPat + row * nChannels; - if (cmd < 0x7F) // note+vol - { - m->note = cmd+1; - if (!m->instr) m->instr = lastinstr; - m->volcmd = VOLCMD_VOLUME; - m->vol = arg; - } else - if (cmd == 0x7F) // duplicate row - { - signed char rdelta = (signed char)arg; - int rowsrc = (int)row + (int)rdelta; - if ((rowsrc >= 0) && (rowsrc < (int)nRows)) memcpy(m, &pPat[rowsrc*nChannels],sizeof(pPat[rowsrc*nChannels])); - } else - if (cmd == 0x80) // instrument - { - m->instr = arg+1; - lastinstr = m->instr; - } else - if (cmd == 0x83) // volume - { - m->volcmd = VOLCMD_VOLUME; - m->vol = arg; - } else - // effect - { - UINT command = cmd & 0x7F; - UINT param = arg; - switch(command) - { - // 0x01: Set Speed - case 0x01: command = CMD_SPEED; break; - // 0x02: Volume Slide - // 0x0A: Tone Porta + Vol Slide - // 0x0B: Vibrato + Vol Slide - case 0x02: command = CMD_VOLUMESLIDE; - case 0x0A: if (command == 0x0A) command = CMD_TONEPORTAVOL; - case 0x0B: if (command == 0x0B) command = CMD_VIBRATOVOL; - if (param & 0x80) param = (-(signed char)param)&0x0F; - else param = (param&0x0F)<<4; - break; - // 0x04: Porta Up/Down - case 0x04: if (param & 0x80) { command = CMD_PORTAMENTOUP; param = (-(signed char)param)&0x7F; } - else { command = CMD_PORTAMENTODOWN; } break; - // 0x06: Tone Portamento - case 0x06: command = CMD_TONEPORTAMENTO; break; - // 0x07: Tremor - case 0x07: command = CMD_TREMOR; break; - // 0x08: Arpeggio - case 0x08: command = CMD_ARPEGGIO; break; - // 0x09: Vibrato - case 0x09: command = CMD_VIBRATO; break; - // 0x0C: Pattern Break - case 0x0C: command = CMD_PATTERNBREAK; break; - // 0x0D: Position Jump - case 0x0D: command = CMD_POSITIONJUMP; break; - // 0x0F: Retrig - case 0x0F: command = CMD_RETRIG; break; - // 0x10: Offset - case 0x10: command = CMD_OFFSET; break; - // 0x11: Fine Volume Slide - case 0x11: if (param) { command = CMD_VOLUMESLIDE; - if (param & 0x80) param = 0xF0|((-(signed char)param)&0x0F); - else param = 0x0F|((param&0x0F)<<4); - } else command = 0; break; - // 0x12: Fine Portamento - // 0x16: Extra Fine Portamento - case 0x12: - case 0x16: if (param) { int mask = (command == 0x16) ? 0xE0 : 0xF0; - command = (param & 0x80) ? CMD_PORTAMENTOUP : CMD_PORTAMENTODOWN; - if (param & 0x80) param = mask|((-(signed char)param)&0x0F); - else param |= mask; - } else command = 0; break; - // 0x13: Note Delay - case 0x13: command = CMD_S3MCMDEX; param = 0xD0|(param & 0x0F); break; - // 0x14: Note Cut - case 0x14: command = CMD_S3MCMDEX; param = 0xC0|(param & 0x0F); break; - // 0x15: Set Tempo - case 0x15: command = CMD_TEMPO; break; - // 0x17: Panning - case 0x17: param = (param+64)&0x7F; - if (m->command) { if (!m->volcmd) { m->volcmd = VOLCMD_PANNING; m->vol = param/2; } command = 0; } - else { command = CMD_PANNING8; } - // Unknown effects - default: command = param = 0; - } - if (command) - { - m->command = command; - m->param = param; - } - } - pTrack += 3; - } -} - - - -BOOL CSoundFile::ReadAMF(LPCBYTE lpStream, const DWORD dwMemLength) -//----------------------------------------------------------- -{ - const AMFFILEHEADER *pfh = (AMFFILEHEADER *)lpStream; - DWORD dwMemPos; - - if ((!lpStream) || (dwMemLength < 2048)) return FALSE; - if ((!strncmp((LPCTSTR)lpStream, "ASYLUM Music Format V1.0", 25)) && (dwMemLength > 4096)) - { - UINT numorders, numpats, numsamples; - - dwMemPos = 32; - numpats = lpStream[dwMemPos+3]; - numorders = lpStream[dwMemPos+4]; - numsamples = 64; - dwMemPos += 6; - if ((!numpats) || (numpats > MAX_PATTERNS) || (!numorders) - || (numpats*64*32 + 294 + 37*64 >= dwMemLength)) return FALSE; - m_nType = MOD_TYPE_AMF0; - m_nChannels = 8; - m_nInstruments = 0; - m_nSamples = 31; - m_nDefaultTempo = 125; - m_nDefaultSpeed = 6; - for (UINT iOrd=0; iOrd<MAX_ORDERS; iOrd++) - { - Order[iOrd] = (iOrd < numorders) ? lpStream[dwMemPos+iOrd] : 0xFF; - } - dwMemPos = 294; // ??? - for (UINT iSmp=0; iSmp<numsamples; iSmp++) - { - MODINSTRUMENT *psmp = &Ins[iSmp+1]; - memcpy(m_szNames[iSmp+1], lpStream+dwMemPos, 22); - m_szNames[iSmp+1][21] = '\0';
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_ams.cxx
Deleted
@@ -1,629 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -////////////////////////////////////////////// -// AMS module loader // -////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -#pragma pack(1) - -typedef struct AMSFILEHEADER -{ - char szHeader[7]; // "Extreme" // changed from CHAR - BYTE verlo, verhi; // 0x??,0x01 - BYTE chncfg; - BYTE samples; - WORD patterns; - WORD orders; - BYTE vmidi; - WORD extra; -} AMSFILEHEADER; - -typedef struct AMSSAMPLEHEADER -{ - DWORD length; - DWORD loopstart; - DWORD loopend; - BYTE finetune_and_pan; - WORD samplerate; // C-2 = 8363 - BYTE volume; // 0-127 - BYTE infobyte; -} AMSSAMPLEHEADER; - - -#pragma pack() - - - -BOOL CSoundFile::ReadAMS(LPCBYTE lpStream, DWORD dwMemLength) -//----------------------------------------------------------- -{ - AMSFILEHEADER *pfh = (AMSFILEHEADER *)lpStream; - DWORD dwMemPos; - UINT tmp, tmp2; - - if ((!lpStream) || (dwMemLength < 1024)) return FALSE; - if ((pfh->verhi != 0x01) || (strncmp(pfh->szHeader, "Extreme", 7)) - || (!pfh->patterns) || (!pfh->orders) || (!pfh->samples) || (pfh->samples > MAX_SAMPLES) - || (pfh->patterns > MAX_PATTERNS) || (pfh->orders > MAX_ORDERS)) - { - return ReadAMS2(lpStream, dwMemLength); - } - dwMemPos = sizeof(AMSFILEHEADER) + pfh->extra; - if (dwMemPos + pfh->samples * sizeof(AMSSAMPLEHEADER) + 256 >= dwMemLength) return FALSE; - m_nType = MOD_TYPE_AMS; - m_nInstruments = 0; - m_nChannels = (pfh->chncfg & 0x1F) + 1; - m_nSamples = pfh->samples; - for (UINT nSmp=1; nSmp<=m_nSamples; nSmp++, dwMemPos += sizeof(AMSSAMPLEHEADER)) - { - AMSSAMPLEHEADER *psh = (AMSSAMPLEHEADER *)(lpStream + dwMemPos); - MODINSTRUMENT *pins = &Ins[nSmp]; - pins->nLength = psh->length; - pins->nLoopStart = psh->loopstart; - pins->nLoopEnd = psh->loopend; - pins->nGlobalVol = 64; - pins->nVolume = psh->volume << 1; - pins->nC4Speed = psh->samplerate; - pins->nPan = (psh->finetune_and_pan & 0xF0); - if (pins->nPan < 0x80) pins->nPan += 0x10; - pins->nFineTune = MOD2XMFineTune(psh->finetune_and_pan & 0x0F); - pins->uFlags = (psh->infobyte & 0x80) ? CHN_16BIT : 0; - if ((pins->nLoopEnd <= pins->nLength) && (pins->nLoopStart+4 <= pins->nLoopEnd)) pins->uFlags |= CHN_LOOP; - } - // Read Song Name - tmp = lpStream[dwMemPos++]; - if (dwMemPos + tmp + 1 >= dwMemLength) return TRUE; - tmp2 = (tmp < 32) ? tmp : 31; - if (tmp2) memcpy(m_szNames[0], lpStream+dwMemPos, tmp2); - m_szNames[0][tmp2] = 0; - dwMemPos += tmp; - // Read sample names - for (UINT sNam=1; sNam<=m_nSamples; sNam++) - { - if (dwMemPos + 32 >= dwMemLength) return TRUE; - tmp = lpStream[dwMemPos++]; - tmp2 = (tmp < 32) ? tmp : 31; - if (tmp2) memcpy(m_szNames[sNam], lpStream+dwMemPos, tmp2); - dwMemPos += tmp; - } - // Skip Channel names - for (UINT cNam=0; cNam<m_nChannels; cNam++) - { - if (dwMemPos + 32 >= dwMemLength) return TRUE; - tmp = lpStream[dwMemPos++]; - dwMemPos += tmp; - } - // Read Pattern Names - m_lpszPatternNames = new char[pfh->patterns * 32]; // changed from CHAR - if (!m_lpszPatternNames) return TRUE; - m_nPatternNames = pfh->patterns; - memset(m_lpszPatternNames, 0, m_nPatternNames * 32); - for (UINT pNam=0; pNam < m_nPatternNames; pNam++) - { - if (dwMemPos + 32 >= dwMemLength) return TRUE; - tmp = lpStream[dwMemPos++]; - tmp2 = (tmp < 32) ? tmp : 31; - if (tmp2) memcpy(m_lpszPatternNames+pNam*32, lpStream+dwMemPos, tmp2); - dwMemPos += tmp; - } - // Read Song Comments - tmp = *((WORD *)(lpStream+dwMemPos)); - dwMemPos += 2; - if (dwMemPos + tmp >= dwMemLength) return TRUE; - if (tmp) - { - m_lpszSongComments = new char[tmp+1]; // changed from CHAR - if (!m_lpszSongComments) return TRUE; - memset(m_lpszSongComments, 0, tmp+1); - memcpy(m_lpszSongComments, lpStream + dwMemPos, tmp); - dwMemPos += tmp; - } - // Read Order List - for (UINT iOrd=0; iOrd<pfh->orders; iOrd++, dwMemPos += 2) - { - UINT n = *((WORD *)(lpStream+dwMemPos)); - Order[iOrd] = (BYTE)n; - } - // Read Patterns - for (UINT iPat=0; iPat<pfh->patterns; iPat++) - { - if (dwMemPos + 4 >= dwMemLength) return TRUE; - UINT len = *((DWORD *)(lpStream + dwMemPos)); - dwMemPos += 4; - if ((len >= dwMemLength) || (dwMemPos + len > dwMemLength)) return TRUE; - PatternSize[iPat] = 64; - PatternAllocSize[iPat] = 64; - MODCOMMAND *m = AllocatePattern(PatternSize[iPat], m_nChannels); - if (!m) return TRUE; - Patterns[iPat] = m; - const BYTE *p = lpStream + dwMemPos; - UINT row = 0, i = 0; - while ((row < PatternSize[iPat]) && (i+2 < len)) - { - BYTE b0 = p[i++]; - BYTE b1 = p[i++]; - BYTE b2 = 0; - UINT ch = b0 & 0x3F; - // Note+Instr - if (!(b0 & 0x40)) - { - b2 = p[i++]; - if (ch < m_nChannels) - { - if (b1 & 0x7F) m[ch].note = (b1 & 0x7F) + 25; - m[ch].instr = b2; - } - if (b1 & 0x80) - { - b0 |= 0x40; - b1 = p[i++]; - } - } - // Effect - if (b0 & 0x40) - { - anothercommand: - if (b1 & 0x40) - { - if (ch < m_nChannels) - { - m[ch].volcmd = VOLCMD_VOLUME; - m[ch].vol = b1 & 0x3F; - } - } else - { - b2 = p[i++]; - if (ch < m_nChannels) - { - UINT cmd = b1 & 0x3F; - if (cmd == 0x0C) - { - m[ch].volcmd = VOLCMD_VOLUME; - m[ch].vol = b2 >> 1; - } else - if (cmd == 0x0E) - { - if (!m[ch].command) - { - UINT command = CMD_S3MCMDEX; - UINT param = b2; - switch(param & 0xF0) - {
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_dbm.cxx
Deleted
@@ -1,370 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -/////////////////////////////////////////////////////////////// -// -// DigiBooster Pro Module Loader (*.dbm) -// -// Note: this loader doesn't handle multiple songs -// -/////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -#define DBM_FILE_MAGIC 0x304d4244 -#define DBM_ID_NAME 0x454d414e -#define DBM_NAMELEN 0x2c000000 -#define DBM_ID_INFO 0x4f464e49 -#define DBM_INFOLEN 0x0a000000 -#define DBM_ID_SONG 0x474e4f53 -#define DBM_ID_INST 0x54534e49 -#define DBM_ID_VENV 0x564e4556 -#define DBM_ID_PATT 0x54544150 -#define DBM_ID_SMPL 0x4c504d53 - -#pragma pack(1) - -typedef struct DBMFILEHEADER -{ - DWORD dbm_id; // "DBM0" = 0x304d4244 - WORD trkver; // Tracker version: 02.15 - WORD reserved; - DWORD name_id; // "NAME" = 0x454d414e - DWORD name_len; // name length: always 44 - CHAR songname[44]; - DWORD info_id; // "INFO" = 0x4f464e49 - DWORD info_len; // 0x0a000000 - WORD instruments; - WORD samples; - WORD songs; - WORD patterns; - WORD channels; - DWORD song_id; // "SONG" = 0x474e4f53 - DWORD song_len; - CHAR songname2[44]; - WORD orders; -// WORD orderlist[0]; // orderlist[orders] in words -} DBMFILEHEADER; - -typedef struct DBMINSTRUMENT -{ - CHAR name[30]; - WORD sampleno; - WORD volume; - DWORD finetune; - DWORD loopstart; - DWORD looplen; - WORD panning; - WORD flags; -} DBMINSTRUMENT; - -typedef struct DBMENVELOPE -{ - WORD instrument; - BYTE flags; - BYTE numpoints; - BYTE sustain1; - BYTE loopbegin; - BYTE loopend; - BYTE sustain2; - WORD volenv[2*32]; -} DBMENVELOPE; - -typedef struct DBMPATTERN -{ - WORD rows; - DWORD packedsize; - BYTE patterndata[2]; // [packedsize] -} DBMPATTERN; - -typedef struct DBMSAMPLE -{ - DWORD flags; - DWORD samplesize; - BYTE sampledata[2]; // [samplesize] -} DBMSAMPLE; - -#pragma pack() - - -BOOL CSoundFile::ReadDBM(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - DBMFILEHEADER *pfh = (DBMFILEHEADER *)lpStream; - DWORD dwMemPos; - UINT nOrders, nSamples, nInstruments, nPatterns; - - if ((!lpStream) || (dwMemLength <= sizeof(DBMFILEHEADER)) || (!pfh->channels) - || (pfh->dbm_id != DBM_FILE_MAGIC) || (!pfh->songs) || (pfh->song_id != DBM_ID_SONG) - || (pfh->name_id != DBM_ID_NAME) || (pfh->name_len != DBM_NAMELEN) - || (pfh->info_id != DBM_ID_INFO) || (pfh->info_len != DBM_INFOLEN)) return FALSE; - dwMemPos = sizeof(DBMFILEHEADER); - nOrders = bswapBE16(pfh->orders); - if (dwMemPos + 2 * nOrders + 8*3 >= dwMemLength) return FALSE; - nInstruments = bswapBE16(pfh->instruments); - nSamples = bswapBE16(pfh->samples); - nPatterns = bswapBE16(pfh->patterns); - m_nType = MOD_TYPE_DBM; - m_nChannels = bswapBE16(pfh->channels); - if (m_nChannels < 4) m_nChannels = 4; - if (m_nChannels > 64) m_nChannels = 64; - memcpy(m_szNames[0], (pfh->songname[0]) ? pfh->songname : pfh->songname2, 32); - m_szNames[0][31] = 0; - for (UINT iOrd=0; iOrd < nOrders; iOrd++) - { - Order[iOrd] = lpStream[dwMemPos+iOrd*2+1]; - if (iOrd >= MAX_ORDERS-2) break; - } - dwMemPos += 2*nOrders; - while (dwMemPos + 10 < dwMemLength) - { - DWORD chunk_id = ((LPDWORD)(lpStream+dwMemPos))[0]; - DWORD chunk_size = bswapBE32(((LPDWORD)(lpStream+dwMemPos))[1]); - DWORD chunk_pos; - - dwMemPos += 8; - chunk_pos = dwMemPos; - if ((dwMemPos + chunk_size > dwMemLength) || (chunk_size > dwMemLength)) break; - dwMemPos += chunk_size; - // Instruments - if (chunk_id == DBM_ID_INST) - { - if (nInstruments >= MAX_INSTRUMENTS) nInstruments = MAX_INSTRUMENTS-1; - for (UINT iIns=0; iIns<nInstruments; iIns++) - { - MODINSTRUMENT *psmp; - INSTRUMENTHEADER *penv; - DBMINSTRUMENT *pih; - UINT nsmp; - - if (chunk_pos + sizeof(DBMINSTRUMENT) > dwMemPos) break; - if ((penv = new INSTRUMENTHEADER) == NULL) break; - pih = (DBMINSTRUMENT *)(lpStream+chunk_pos); - nsmp = bswapBE16(pih->sampleno); - psmp = ((nsmp) && (nsmp < MAX_SAMPLES)) ? &Ins[nsmp] : NULL; - memset(penv, 0, sizeof(INSTRUMENTHEADER)); - memcpy(penv->name, pih->name, 30); - if (psmp) - { - memcpy(m_szNames[nsmp], pih->name, 30); - m_szNames[nsmp][30] = 0; - } - Headers[iIns+1] = penv; - penv->nFadeOut = 1024; // ??? - penv->nGlobalVol = 128; - penv->nPan = bswapBE16(pih->panning); - if ((penv->nPan) && (penv->nPan < 256)) - penv->dwFlags = ENV_SETPANNING; - else - penv->nPan = 128; - penv->nPPC = 5*12; - for (UINT i=0; i<120; i++) - { - penv->Keyboard[i] = nsmp; - penv->NoteMap[i] = i+1; - } - // Sample Info - if (psmp) - { - DWORD sflags = bswapBE16(pih->flags); - psmp->nVolume = bswapBE16(pih->volume) * 4; - if ((!psmp->nVolume) || (psmp->nVolume > 256)) psmp->nVolume = 256; - psmp->nGlobalVol = 64; - psmp->nC4Speed = bswapBE32(pih->finetune); - int f2t = FrequencyToTranspose(psmp->nC4Speed); - psmp->RelativeTone = f2t >> 7; - psmp->nFineTune = f2t & 0x7F; - if ((pih->looplen) && (sflags & 3)) - { - psmp->nLoopStart = bswapBE32(pih->loopstart); - psmp->nLoopEnd = psmp->nLoopStart + bswapBE32(pih->looplen); - psmp->uFlags |= CHN_LOOP; - psmp->uFlags &= ~CHN_PINGPONGLOOP; - if (sflags & 2) psmp->uFlags |= CHN_PINGPONGLOOP; - } - } - chunk_pos += sizeof(DBMINSTRUMENT); - m_nInstruments = iIns+1; - } - m_dwSongFlags |= SONG_INSTRUMENTMODE; - } else - // Volume Envelopes - if (chunk_id == DBM_ID_VENV)
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_dmf.cxx
Deleted
@@ -1,607 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -/////////////////////////////////////////////////////// -// DMF DELUSION DIGITAL MUSIC FILEFORMAT (X-Tracker) // -/////////////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#define DMFLOG - -//#pragma warning(disable:4244) - -#pragma pack(1) - -typedef struct DMFHEADER -{ - DWORD id; // "DDMF" = 0x464d4444 - BYTE version; // 4 - CHAR trackername[8]; // "XTRACKER" - CHAR songname[30]; - CHAR composer[20]; - BYTE date[3]; -} DMFHEADER; - -typedef struct DMFINFO -{ - DWORD id; // "INFO" - DWORD infosize; -} DMFINFO; - -typedef struct DMFSEQU -{ - DWORD id; // "SEQU" - DWORD seqsize; - WORD loopstart; - WORD loopend; - WORD sequ[2]; -} DMFSEQU; - -typedef struct DMFPATT -{ - DWORD id; // "PATT" - DWORD patsize; - WORD numpat; // 1-1024 - BYTE tracks; - BYTE firstpatinfo; -} DMFPATT; - -typedef struct DMFTRACK -{ - BYTE tracks; - BYTE beat; // [hi|lo] -> hi=ticks per beat, lo=beats per measure - WORD ticks; // max 512 - DWORD jmpsize; -} DMFTRACK; - -typedef struct DMFSMPI -{ - DWORD id; - DWORD size; - BYTE samples; -} DMFSMPI; - -typedef struct DMFSAMPLE -{ - DWORD len; - DWORD loopstart; - DWORD loopend; - WORD c3speed; - BYTE volume; - BYTE flags; -} DMFSAMPLE; - -#pragma pack() - - -#ifdef DMFLOG -extern void Log(LPCSTR s, ...); -#endif - - -BOOL CSoundFile::ReadDMF(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - DMFHEADER *pfh = (DMFHEADER *)lpStream; - DMFINFO *psi; - DMFSEQU *sequ; - DWORD dwMemPos; - BYTE infobyte[32]; - BYTE smplflags[MAX_SAMPLES]; - - if ((!lpStream) || (dwMemLength < 1024)) return FALSE; - if ((pfh->id != 0x464d4444) || (!pfh->version) || (pfh->version & 0xF0)) return FALSE; - dwMemPos = 66; - memcpy(m_szNames[0], pfh->songname, 30); - m_szNames[0][30] = 0; - m_nType = MOD_TYPE_DMF; - m_nChannels = 0; -#ifdef DMFLOG - Log("DMF version %d: \"%s\": %d bytes (0x%04X)\n", pfh->version, m_szNames[0], dwMemLength, dwMemLength); -#endif - while (dwMemPos + 7 < dwMemLength) - { - DWORD id = *((LPDWORD)(lpStream+dwMemPos)); - - switch(id) - { - // "INFO" - case 0x4f464e49: - // "CMSG" - case 0x47534d43: - psi = (DMFINFO *)(lpStream+dwMemPos); - if (id == 0x47534d43) dwMemPos++; - if ((psi->infosize > dwMemLength) || (psi->infosize + dwMemPos + 8 > dwMemLength)) goto dmfexit; - if ((psi->infosize >= 8) && (!m_lpszSongComments)) - { - m_lpszSongComments = new char[psi->infosize]; // changed from CHAR - if (m_lpszSongComments) - { - for (UINT i=0; i<psi->infosize-1; i++) - { - CHAR c = lpStream[dwMemPos+8+i]; - if ((i % 40) == 39) - m_lpszSongComments[i] = 0x0d; - else - m_lpszSongComments[i] = (c < ' ') ? ' ' : c; - } - m_lpszSongComments[psi->infosize-1] = 0; - } - } - dwMemPos += psi->infosize + 8 - 1; - break; - - // "SEQU" - case 0x55514553: - sequ = (DMFSEQU *)(lpStream+dwMemPos); - if ((sequ->seqsize >= dwMemLength) || (dwMemPos + sequ->seqsize + 12 > dwMemLength)) goto dmfexit; - { - UINT nseq = sequ->seqsize >> 1; - if (nseq >= MAX_ORDERS-1) nseq = MAX_ORDERS-1; - if (sequ->loopstart < nseq) m_nRestartPos = sequ->loopstart; - for (UINT i=0; i<nseq; i++) Order[i] = (BYTE)sequ->sequ[i]; - } - dwMemPos += sequ->seqsize + 8; - break; - - // "PATT" - case 0x54544150: - if (!m_nChannels) - { - DMFPATT *patt = (DMFPATT *)(lpStream+dwMemPos); - UINT numpat; - DWORD dwPos = dwMemPos + 11; - if ((patt->patsize >= dwMemLength) || (dwMemPos + patt->patsize + 8 > dwMemLength)) goto dmfexit; - numpat = patt->numpat; - if (numpat > MAX_PATTERNS) numpat = MAX_PATTERNS; - m_nChannels = patt->tracks; - if (m_nChannels < patt->firstpatinfo) m_nChannels = patt->firstpatinfo; - if (m_nChannels > 32) m_nChannels = 32; - if (m_nChannels < 4) m_nChannels = 4; - for (UINT npat=0; npat<numpat; npat++) - { - DMFTRACK *pt = (DMFTRACK *)(lpStream+dwPos); - #ifdef DMFLOG - Log("Pattern #%d: %d tracks, %d rows\n", npat, pt->tracks, pt->ticks); - #endif - UINT tracks = pt->tracks; - if (tracks > 32) tracks = 32; - UINT ticks = pt->ticks; - if (ticks > 256) ticks = 256; - if (ticks < 16) ticks = 16; - dwPos += 8; - if ((pt->jmpsize >= dwMemLength) || (dwPos + pt->jmpsize + 4 >= dwMemLength)) break; - PatternSize[npat] = (WORD)ticks; - PatternAllocSize[npat] = (WORD)ticks; - MODCOMMAND *m = AllocatePattern(PatternSize[npat], m_nChannels); - if (!m) goto dmfexit; - Patterns[npat] = m; - DWORD d = dwPos; - dwPos += pt->jmpsize; - UINT ttype = 1; - UINT tempo = 125; - UINT glbinfobyte = 0; - UINT pbeat = (pt->beat & 0xf0) ? pt->beat>>4 : 8; - BOOL tempochange = (pt->beat & 0xf0) ? TRUE : FALSE; - memset(infobyte, 0, sizeof(infobyte)); - for (UINT row=0; row<ticks; row++) - { - MODCOMMAND *p = &m[row*m_nChannels]; - // Parse track global effects - if (!glbinfobyte) - { - BYTE info = lpStream[d++]; - BYTE infoval = 0; - if ((info & 0x80) && (d < dwPos)) glbinfobyte = lpStream[d++];
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_dsm.cxx
Deleted
@@ -1,237 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -////////////////////////////////////////////// -// DSIK Internal Format (DSM) module loader // -////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -#pragma pack(1) - -#define DSMID_RIFF 0x46464952 // "RIFF" -#define DSMID_DSMF 0x464d5344 // "DSMF" -#define DSMID_SONG 0x474e4f53 // "SONG" -#define DSMID_INST 0x54534e49 // "INST" -#define DSMID_PATT 0x54544150 // "PATT" - - -typedef struct DSMNOTE -{ - BYTE note,ins,vol,cmd,inf; -} DSMNOTE; - - -typedef struct DSMINST -{ - DWORD id_INST; - DWORD inst_len; - CHAR filename[13]; - BYTE flags; - BYTE flags2; - BYTE volume; - DWORD length; - DWORD loopstart; - DWORD loopend; - DWORD reserved1; - WORD c2spd; - WORD reserved2; - CHAR samplename[28]; -} DSMINST; - - -typedef struct DSMFILEHEADER -{ - DWORD id_RIFF; // "RIFF" - DWORD riff_len; - DWORD id_DSMF; // "DSMF" - DWORD id_SONG; // "SONG" - DWORD song_len; -} DSMFILEHEADER; - - -typedef struct DSMSONG -{ - CHAR songname[28]; - WORD reserved1; - WORD flags; - DWORD reserved2; - WORD numord; - WORD numsmp; - WORD numpat; - WORD numtrk; - BYTE globalvol; - BYTE mastervol; - BYTE speed; - BYTE bpm; - BYTE panpos[16]; - BYTE orders[128]; -} DSMSONG; - -typedef struct DSMPATT -{ - DWORD id_PATT; - DWORD patt_len; - BYTE dummy1; - BYTE dummy2; -} DSMPATT; - -#pragma pack() - - -BOOL CSoundFile::ReadDSM(LPCBYTE lpStream, DWORD dwMemLength) -//----------------------------------------------------------- -{ - DSMFILEHEADER *pfh = (DSMFILEHEADER *)lpStream; - DSMSONG *psong; - DWORD dwMemPos; - UINT nPat, nSmp; - - if ((!lpStream) || (dwMemLength < 1024) || (pfh->id_RIFF != DSMID_RIFF) - || (pfh->riff_len + 8 > dwMemLength) || (pfh->riff_len < 1024) - || (pfh->id_DSMF != DSMID_DSMF) || (pfh->id_SONG != DSMID_SONG) - || (pfh->song_len > dwMemLength)) return FALSE; - psong = (DSMSONG *)(lpStream + sizeof(DSMFILEHEADER)); - dwMemPos = sizeof(DSMFILEHEADER) + pfh->song_len; - m_nType = MOD_TYPE_DSM; - m_nChannels = psong->numtrk; - if (m_nChannels < 4) m_nChannels = 4; - if (m_nChannels > 16) m_nChannels = 16; - m_nSamples = psong->numsmp; - if (m_nSamples > MAX_SAMPLES) m_nSamples = MAX_SAMPLES; - m_nDefaultSpeed = psong->speed; - m_nDefaultTempo = psong->bpm; - m_nDefaultGlobalVolume = psong->globalvol << 2; - if ((!m_nDefaultGlobalVolume) || (m_nDefaultGlobalVolume > 256)) m_nDefaultGlobalVolume = 256; - m_nSongPreAmp = psong->mastervol & 0x7F; - for (UINT iOrd=0; iOrd<MAX_ORDERS; iOrd++) - { - Order[iOrd] = (BYTE)((iOrd < psong->numord) ? psong->orders[iOrd] : 0xFF); - } - for (UINT iPan=0; iPan<16; iPan++) - { - ChnSettings[iPan].nPan = 0x80; - if (psong->panpos[iPan] <= 0x80) - { - ChnSettings[iPan].nPan = psong->panpos[iPan] << 1; - } - } - memcpy(m_szNames[0], psong->songname, 28); - nPat = 0; - nSmp = 1; - while (dwMemPos < dwMemLength - 8) - { - DSMPATT *ppatt = (DSMPATT *)(lpStream + dwMemPos); - DSMINST *pins = (DSMINST *)(lpStream+dwMemPos); - // Reading Patterns - if (ppatt->id_PATT == DSMID_PATT) - { - dwMemPos += 8; - if (dwMemPos + ppatt->patt_len >= dwMemLength) break; - DWORD dwPos = dwMemPos; - dwMemPos += ppatt->patt_len; - MODCOMMAND *m = AllocatePattern(64, m_nChannels); - if (!m) break; - PatternSize[nPat] = 64; - PatternAllocSize[nPat] = 64; - Patterns[nPat] = m; - UINT row = 0; - while ((row < 64) && (dwPos + 2 <= dwMemPos)) - { - UINT flag = lpStream[dwPos++]; - if (flag) - { - UINT ch = (flag & 0x0F) % m_nChannels; - if (flag & 0x80) - { - UINT note = lpStream[dwPos++]; - if (note) - { - if (note <= 12*9) note += 12; - m[ch].note = (BYTE)note; - } - } - if (flag & 0x40) - { - m[ch].instr = lpStream[dwPos++]; - } - if (flag & 0x20) - { - m[ch].volcmd = VOLCMD_VOLUME; - m[ch].vol = lpStream[dwPos++]; - } - if (flag & 0x10) - { - UINT command = lpStream[dwPos++]; - UINT param = lpStream[dwPos++]; - switch(command) - { - // 4-bit Panning - case 0x08: - switch(param & 0xF0) - { - case 0x00: param <<= 4; break; - case 0x10: command = 0x0A; param = (param & 0x0F) << 4; break; - case 0x20: command = 0x0E; param = (param & 0x0F) | 0xA0; break; - case 0x30: command = 0x0E; param = (param & 0x0F) | 0x10; break; - case 0x40: command = 0x0E; param = (param & 0x0F) | 0x20; break; - default: command = 0; - } - break; - // Portamentos - case 0x11: - case 0x12: - command &= 0x0F; - break; - // 3D Sound (?) - case 0x13: - command = 'X' - 55; - param = 0x91; - break; - default: - // Volume + Offset (?) - command = ((command & 0xF0) == 0x20) ? 0x09 : 0; - } - m[ch].command = (BYTE)command; - m[ch].param = (BYTE)param;
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_far.cxx
Deleted
@@ -1,271 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -//////////////////////////////////////// -// Farandole (FAR) module loader // -//////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -#define FARFILEMAGIC 0xFE524146 // "FAR" - -#pragma pack(1) - -typedef struct FARHEADER1 -{ - DWORD id; // file magic FAR= - CHAR songname[40]; // songname - CHAR magic2[3]; // 13,10,26 - WORD headerlen; // remaining length of header in bytes - BYTE version; // 0xD1 - BYTE onoff[16]; - BYTE edit1[9]; - BYTE speed; - BYTE panning[16]; - BYTE edit2[4]; - WORD stlen; -} FARHEADER1; - -typedef struct FARHEADER2 -{ - BYTE orders[256]; - BYTE numpat; - BYTE snglen; - BYTE loopto; - WORD patsiz[256]; -} FARHEADER2; - -typedef struct FARSAMPLE -{ - CHAR samplename[32]; - DWORD length; - BYTE finetune; - BYTE volume; - DWORD reppos; - DWORD repend; - BYTE type; - BYTE loop; -} FARSAMPLE; - -#pragma pack() - - -BOOL CSoundFile::ReadFAR(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - FARHEADER1 *pmh1 = (FARHEADER1 *)lpStream; - FARHEADER2 *pmh2; - DWORD dwMemPos = sizeof(FARHEADER1); - UINT headerlen; - BYTE samplemap[8]; - - if ((!lpStream) || (dwMemLength < 1024) || (bswapLE32(pmh1->id) != FARFILEMAGIC) - || (pmh1->magic2[0] != 13) || (pmh1->magic2[1] != 10) || (pmh1->magic2[2] != 26)) return FALSE; - headerlen = bswapLE16(pmh1->headerlen); - pmh1->stlen = bswapLE16( pmh1->stlen ); /* inplace byteswap -- Toad */ - if ((headerlen >= dwMemLength) || (dwMemPos + pmh1->stlen + sizeof(FARHEADER2) >= dwMemLength)) return FALSE; - // Globals - m_nType = MOD_TYPE_FAR; - m_nChannels = 16; - m_nInstruments = 0; - m_nSamples = 0; - m_nSongPreAmp = 0x20; - m_nDefaultSpeed = pmh1->speed; - m_nDefaultTempo = 80; - m_nDefaultGlobalVolume = 256; - - memcpy(m_szNames[0], pmh1->songname, 32); - // Channel Setting - for (UINT nchpan=0; nchpan<16; nchpan++) - { - ChnSettings[nchpan].dwFlags = 0; - ChnSettings[nchpan].nPan = ((pmh1->panning[nchpan] & 0x0F) << 4) + 8; - ChnSettings[nchpan].nVolume = 64; - } - // Reading comment - if (pmh1->stlen) - { - UINT szLen = pmh1->stlen; - if (szLen > dwMemLength - dwMemPos) szLen = dwMemLength - dwMemPos; - if ((m_lpszSongComments = new char[szLen + 1]) != NULL) - { - memcpy(m_lpszSongComments, lpStream+dwMemPos, szLen); - m_lpszSongComments[szLen] = 0; - } - dwMemPos += pmh1->stlen; - } - // Reading orders - pmh2 = (FARHEADER2 *)(lpStream + dwMemPos); - dwMemPos += sizeof(FARHEADER2); - if (dwMemPos >= dwMemLength) return TRUE; - for (UINT iorder=0; iorder<MAX_ORDERS; iorder++) - { - Order[iorder] = (iorder <= pmh2->snglen) ? pmh2->orders[iorder] : 0xFF; - } - m_nRestartPos = pmh2->loopto; - // Reading Patterns - dwMemPos += headerlen - (869 + pmh1->stlen); - if (dwMemPos >= dwMemLength) return TRUE; - - // byteswap pattern data -- Toad - UINT psfix = 0 ; - while( psfix++ < 256 ) - { - pmh2->patsiz[psfix] = bswapLE16( pmh2->patsiz[psfix] ) ; - } - // end byteswap of pattern data - - WORD *patsiz = (WORD *)pmh2->patsiz; - for (UINT ipat=0; ipat<256; ipat++) if (patsiz[ipat]) - { - UINT patlen = patsiz[ipat]; - if ((ipat >= MAX_PATTERNS) || (patsiz[ipat] < 2)) - { - dwMemPos += patlen; - continue; - } - if (dwMemPos + patlen >= dwMemLength) return TRUE; - UINT rows = (patlen - 2) >> 6; - if (!rows) - { - dwMemPos += patlen; - continue; - } - if (rows > 256) rows = 256; - if (rows < 16) rows = 16; - PatternSize[ipat] = rows; - PatternAllocSize[ipat] = rows; - if ((Patterns[ipat] = AllocatePattern(rows, m_nChannels)) == NULL) return TRUE; - MODCOMMAND *m = Patterns[ipat]; - UINT patbrk = lpStream[dwMemPos]; - const BYTE *p = lpStream + dwMemPos + 2; - UINT max = rows*16*4; - if (max > patlen-2) max = patlen-2; - for (UINT len=0; len<max; len += 4, m++) - { - BYTE note = p[len]; - BYTE ins = p[len+1]; - BYTE vol = p[len+2]; - BYTE eff = p[len+3]; - if (note) - { - m->instr = ins + 1; - m->note = note + 36; - } - if (vol & 0x0F) - { - m->volcmd = VOLCMD_VOLUME; - m->vol = (vol & 0x0F) << 2; - if (m->vol <= 4) m->vol = 0; - } - switch(eff & 0xF0) - { - // 1.x: Portamento Up - case 0x10: - m->command = CMD_PORTAMENTOUP; - m->param = eff & 0x0F; - break; - // 2.x: Portamento Down - case 0x20: - m->command = CMD_PORTAMENTODOWN; - m->param = eff & 0x0F; - break; - // 3.x: Tone-Portamento - case 0x30: - m->command = CMD_TONEPORTAMENTO; - m->param = (eff & 0x0F) << 2; - break; - // 4.x: Retrigger - case 0x40: - m->command = CMD_RETRIG; - m->param = 6 / (1+(eff&0x0F)) + 1; - break; - // 5.x: Set Vibrato Depth - case 0x50: - m->command = CMD_VIBRATO; - m->param = (eff & 0x0F); - break; - // 6.x: Set Vibrato Speed - case 0x60: - m->command = CMD_VIBRATO; - m->param = (eff & 0x0F) << 4; - break; - // 7.x: Vol Slide Up - case 0x70:
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_it.cxx
Deleted
@@ -1,975 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#include "stdafx.h" -#include "sndfile.h" -#include "it_defs.h" - -/* blah, -mrsb. -this is a schism header */ -#include "midi.h" - -#ifdef MSC_VER -#pragma warning(disable:4244) -#endif - -BYTE autovibit2xm[8] = -{ 0, 3, 1, 4, 2, 0, 0, 0 }; - -BYTE autovibxm2it[8] = -{ 0, 2, 4, 1, 3, 0, 0, 0 }; - -////////////////////////////////////////////////////////// -// Impulse Tracker IT file support (import only) - - -static inline UINT ConvertVolParam(UINT value) -//-------------------------------------------- -{ - return (value > 9) ? 9 : value; -} - - -BOOL CSoundFile::ITInstrToMPT(const void *p, INSTRUMENTHEADER *penv, UINT trkvers) -//-------------------------------------------------------------------------------- -{ - if (trkvers < 0x0200) - { - const ITOLDINSTRUMENT *pis = (const ITOLDINSTRUMENT *)p; - memcpy(penv->name, pis->name, 26); - memcpy(penv->filename, pis->filename, 12); - penv->nFadeOut = bswapLE16(pis->fadeout) << 6; - penv->nGlobalVol = 128; - for (UINT j=0; j<120; j++) - { - UINT note = pis->keyboard[j*2]; - UINT ins = pis->keyboard[j*2+1]; - if (ins < MAX_SAMPLES) penv->Keyboard[j] = ins; - if (note < 128) penv->NoteMap[j] = note+1; - else if (note >= 0xFE) penv->NoteMap[j] = note; - } - if (pis->flags & 0x01) penv->dwFlags |= ENV_VOLUME; - if (pis->flags & 0x02) penv->dwFlags |= ENV_VOLLOOP; - if (pis->flags & 0x04) penv->dwFlags |= ENV_VOLSUSTAIN; - penv->VolEnv.nLoopStart = pis->vls; - penv->VolEnv.nLoopEnd = pis->vle; - penv->VolEnv.nSustainStart = pis->sls; - penv->VolEnv.nSustainEnd = pis->sle; - penv->VolEnv.nNodes = 25; - for (UINT ev=0; ev<25; ev++) - { - if ((penv->VolEnv.Ticks[ev] = pis->nodes[ev*2]) == 0xFF) - { - penv->VolEnv.nNodes = ev; - break; - } - penv->VolEnv.Values[ev] = pis->nodes[ev*2+1]; - } - penv->nNNA = pis->nna; - penv->nDCT = pis->dnc; - penv->nPan = 0x80; - } else - { - const ITINSTRUMENT *pis = (const ITINSTRUMENT *)p; - memcpy(penv->name, pis->name, 26); - memcpy(penv->filename, pis->filename, 12); - penv->nMidiProgram = pis->mpr; - penv->nMidiChannel = pis->mch; - penv->wMidiBank = bswapLE16(pis->mbank); - penv->nFadeOut = bswapLE16(pis->fadeout) << 5; - penv->nGlobalVol = pis->gbv; - if (penv->nGlobalVol > 128) penv->nGlobalVol = 128; - for (UINT j=0; j<120; j++) - { - UINT note = pis->keyboard[j*2]; - UINT ins = pis->keyboard[j*2+1]; - if (ins < MAX_SAMPLES) penv->Keyboard[j] = ins; - if (note < 128) penv->NoteMap[j] = note+1; - else if (note >= 0xFE) penv->NoteMap[j] = note; - } - // Volume Envelope - if (pis->volenv.flags & 1) penv->dwFlags |= ENV_VOLUME; - if (pis->volenv.flags & 2) penv->dwFlags |= ENV_VOLLOOP; - if (pis->volenv.flags & 4) penv->dwFlags |= ENV_VOLSUSTAIN; - if (pis->volenv.flags & 8) penv->dwFlags |= ENV_VOLCARRY; - penv->VolEnv.nNodes = pis->volenv.num; - if (penv->VolEnv.nNodes > 25) penv->VolEnv.nNodes = 25; - - penv->VolEnv.nLoopStart = pis->volenv.lpb; - penv->VolEnv.nLoopEnd = pis->volenv.lpe; - penv->VolEnv.nSustainStart = pis->volenv.slb; - penv->VolEnv.nSustainEnd = pis->volenv.sle; - // Panning Envelope - if (pis->panenv.flags & 1) penv->dwFlags |= ENV_PANNING; - if (pis->panenv.flags & 2) penv->dwFlags |= ENV_PANLOOP; - if (pis->panenv.flags & 4) penv->dwFlags |= ENV_PANSUSTAIN; - if (pis->panenv.flags & 8) penv->dwFlags |= ENV_PANCARRY; - penv->PanEnv.nNodes = pis->panenv.num; - if (penv->PanEnv.nNodes > 25) penv->PanEnv.nNodes = 25; - penv->PanEnv.nLoopStart = pis->panenv.lpb; - penv->PanEnv.nLoopEnd = pis->panenv.lpe; - penv->PanEnv.nSustainStart = pis->panenv.slb; - penv->PanEnv.nSustainEnd = pis->panenv.sle; - // Pitch Envelope - if (pis->pitchenv.flags & 1) penv->dwFlags |= ENV_PITCH; - if (pis->pitchenv.flags & 2) penv->dwFlags |= ENV_PITCHLOOP; - if (pis->pitchenv.flags & 4) penv->dwFlags |= ENV_PITCHSUSTAIN; - if (pis->pitchenv.flags & 8) penv->dwFlags |= ENV_PITCHCARRY; - if (pis->pitchenv.flags & 0x80) penv->dwFlags |= ENV_FILTER; - penv->PitchEnv.nNodes = pis->pitchenv.num; - if (penv->PitchEnv.nNodes > 25) penv->PitchEnv.nNodes = 25; - penv->PitchEnv.nLoopStart = pis->pitchenv.lpb; - penv->PitchEnv.nLoopEnd = pis->pitchenv.lpe; - penv->PitchEnv.nSustainStart = pis->pitchenv.slb; - penv->PitchEnv.nSustainEnd = pis->pitchenv.sle; - // Envelopes Data - for (UINT ev=0; ev<25; ev++) - { - penv->VolEnv.Values[ev] = pis->volenv.data[ev*3]; - penv->VolEnv.Ticks[ev] = (pis->volenv.data[ev*3+2] << 8) | (pis->volenv.data[ev*3+1]); - penv->PanEnv.Values[ev] = pis->panenv.data[ev*3] + 32; - penv->PanEnv.Ticks[ev] = (pis->panenv.data[ev*3+2] << 8) | (pis->panenv.data[ev*3+1]); - penv->PitchEnv.Values[ev] = pis->pitchenv.data[ev*3] + 32; - penv->PitchEnv.Ticks[ev] = (pis->pitchenv.data[ev*3+2] << 8) | (pis->pitchenv.data[ev*3+1]); - } - penv->nNNA = pis->nna % 4; - penv->nDCT = pis->dct % 4; - penv->nDNA = pis->dca % 3; - penv->nPPS = pis->pps; - penv->nPPC = pis->ppc; - penv->nIFC = pis->ifc; - penv->nIFR = pis->ifr; - penv->nVolSwing = pis->rv; - penv->nPanSwing = pis->rp; - penv->nPan = (pis->dfp & 0x7F) << 2; - if (penv->nPan > 256) penv->nPan = 128; - if (pis->dfp < 0x80) penv->dwFlags |= ENV_SETPANNING; - } - if ((penv->VolEnv.nLoopStart >= 25) || (penv->VolEnv.nLoopEnd >= 25)) penv->dwFlags &= ~ENV_VOLLOOP; - if ((penv->VolEnv.nSustainStart >= 25) || (penv->VolEnv.nSustainEnd >= 25)) penv->dwFlags &= ~ENV_VOLSUSTAIN; - return TRUE; -} - - -BOOL CSoundFile::ReadIT(const BYTE *lpStream, DWORD dwMemLength) -//-------------------------------------------------------------- -{ - ITFILEHEADER pifh = *(ITFILEHEADER *)lpStream; - DWORD dwMemPos = sizeof(ITFILEHEADER); - DWORD inspos[MAX_INSTRUMENTS]; - DWORD smppos[MAX_SAMPLES]; - DWORD patpos[MAX_PATTERNS]; - BYTE chnmask[64]; - MODCOMMAND lastvalue[64]; - - if ((!lpStream) || (dwMemLength < 0xc2)) return FALSE; - - pifh.id = bswapLE32(pifh.id); - if (pifh.id == 0x49504D49) { - if (dwMemLength < 554) return FALSE; - - WORD tv; - INSTRUMENTHEADER *zenv = new INSTRUMENTHEADER; - if (!zenv) return FALSE; - memset(zenv, 0, sizeof(INSTRUMENTHEADER)); - memcpy(&tv, lpStream+0x1C, 2); /* trkvers */ - if (!ITInstrToMPT(lpStream, zenv, tv)) { - delete zenv; - return FALSE; - } - - /* okay, we need samples now */ - unsigned int q = 554; - BYTE expect_samples = lpStream[0x1E]; - - m_nType = MOD_TYPE_IT; - m_nInstruments = 1; - m_nSamples = expect_samples; - m_dwSongFlags = SONG_INSTRUMENTMODE | SONG_LINEARSLIDES /* eh? */; - - memcpy(m_szNames[0], lpStream + 0x20, 26); - m_szNames[0][26] = 0; - - if (q+(80*expect_samples) >= dwMemLength) { - delete zenv; - return FALSE;
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_mdl.cxx
Deleted
@@ -1,538 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -////////////////////////////////////////////// -// DigiTracker (MDL) module loader // -////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -typedef struct MDLSONGHEADER -{ - DWORD id; // "DMDL" = 0x4C444D44 - BYTE version; -} MDLSONGHEADER; - - -typedef struct MDLINFOBLOCK -{ - CHAR songname[32]; - CHAR composer[20]; - WORD norders; - WORD repeatpos; - BYTE globalvol; - BYTE speed; - BYTE tempo; - BYTE channelinfo[32]; - BYTE seq[256]; -} MDLINFOBLOCK; - - -typedef struct MDLPATTERNDATA -{ - BYTE channels; - BYTE lastrow; // nrows = lastrow+1 - CHAR name[16]; - WORD data[1]; -} MDLPATTERNDATA; - - -void ConvertMDLCommand(MODCOMMAND *m, UINT eff, UINT data) -//-------------------------------------------------------- -{ - UINT command = 0, param = data; - switch(eff) - { - case 0x01: command = CMD_PORTAMENTOUP; break; - case 0x02: command = CMD_PORTAMENTODOWN; break; - case 0x03: command = CMD_TONEPORTAMENTO; break; - case 0x04: command = CMD_VIBRATO; break; - case 0x05: command = CMD_ARPEGGIO; break; - case 0x07: command = (param < 0x20) ? CMD_SPEED : CMD_TEMPO; break; - case 0x08: command = CMD_PANNING8; param <<= 1; break; - case 0x0B: command = CMD_POSITIONJUMP; break; - case 0x0C: command = CMD_GLOBALVOLUME; break; - case 0x0D: command = CMD_PATTERNBREAK; param = (data & 0x0F) + (data>>4)*10; break; - case 0x0E: - command = CMD_S3MCMDEX; - switch(data & 0xF0) - { - case 0x00: command = 0; break; // What is E0x in MDL (there is a bunch) ? - case 0x10: if (param & 0x0F) { param |= 0xF0; command = CMD_PANNINGSLIDE; } else command = 0; break; - case 0x20: if (param & 0x0F) { param = (param << 4) | 0x0F; command = CMD_PANNINGSLIDE; } else command = 0; break; - case 0x30: param = (data & 0x0F) | 0x10; break; // glissando - case 0x40: param = (data & 0x0F) | 0x30; break; // vibrato waveform - case 0x60: param = (data & 0x0F) | 0xB0; break; - case 0x70: param = (data & 0x0F) | 0x40; break; // tremolo waveform - case 0x90: command = CMD_RETRIG; param &= 0x0F; break; - case 0xA0: param = (data & 0x0F) << 4; command = CMD_GLOBALVOLSLIDE; break; - case 0xB0: param = data & 0x0F; command = CMD_GLOBALVOLSLIDE; break; - case 0xF0: param = ((data >> 8) & 0x0F) | 0xA0; break; - } - break; - case 0x0F: command = CMD_SPEED; break; - - case 0x10: - if ((param & 0xF0) != 0xE0) { - command = CMD_VOLUMESLIDE; - if ((param & 0xF0) == 0xF0) { - param = ((param << 4) | 0x0F); - } else { - param >>= 2; - if (param > 0xF) - param = 0xF; - param <<= 4; - } - } - break; - case 0x20: - if ((param & 0xF0) != 0xE0) { - command = CMD_VOLUMESLIDE; - if ((param & 0xF0) != 0xF0) { - param >>= 2; - if (param > 0xF) - param = 0xF; - } - } - break; - - case 0x30: command = CMD_RETRIG; break; - case 0x40: command = CMD_TREMOLO; break; - case 0x50: command = CMD_TREMOR; break; - case 0xEF: if (param > 0xFF) param = 0xFF; command = CMD_OFFSET; break; - } - if (command) - { - m->command = command; - m->param = param; - } -} - - -void UnpackMDLTrack(MODCOMMAND *pat, UINT nChannels, UINT nRows, UINT nTrack, const BYTE *lpTracks) -//------------------------------------------------------------------------------------------------- -{ - MODCOMMAND cmd, *m = pat; - UINT len = *((WORD *)lpTracks); - UINT pos = 0, row = 0, i; - lpTracks += 2; - for (UINT ntrk=1; ntrk<nTrack; ntrk++) - { - lpTracks += len; - len = *((WORD *)lpTracks); - lpTracks += 2; - } - cmd.note = cmd.instr = 0; - cmd.volcmd = cmd.vol = 0; - cmd.command = cmd.param = 0; - while ((row < nRows) && (pos < len)) - { - UINT xx; - BYTE b = lpTracks[pos++]; - xx = b >> 2; - switch(b & 0x03) - { - case 0x01: - for (i=0; i<=xx; i++) - { - if (row) *m = *(m-nChannels); - m += nChannels; - row++; - if (row >= nRows) break; - } - break; - - case 0x02: - if (xx < row) *m = pat[nChannels*xx]; - m += nChannels; - row++; - break; - - case 0x03: - { - cmd.note = (xx & 0x01) ? lpTracks[pos++] : 0; - cmd.instr = (xx & 0x02) ? lpTracks[pos++] : 0; - cmd.volcmd = cmd.vol = 0; - cmd.command = cmd.param = 0; - if ((cmd.note < 120-12) && (cmd.note)) cmd.note += 12; - UINT volume = (xx & 0x04) ? lpTracks[pos++] : 0; - UINT commands = (xx & 0x08) ? lpTracks[pos++] : 0; - UINT command1 = commands & 0x0F; - UINT command2 = commands & 0xF0; - UINT param1 = (xx & 0x10) ? lpTracks[pos++] : 0; - UINT param2 = (xx & 0x20) ? lpTracks[pos++] : 0; - if ((command1 == 0x0E) && ((param1 & 0xF0) == 0xF0) && (!command2)) - { - param1 = ((param1 & 0x0F) << 8) | param2; - command1 = 0xEF; - command2 = param2 = 0; - } - if (volume) - { - cmd.volcmd = VOLCMD_VOLUME; - cmd.vol = (volume+1) >> 2; - } - ConvertMDLCommand(&cmd, command1, param1); - if ((cmd.command != CMD_SPEED) - && (cmd.command != CMD_TEMPO) - && (cmd.command != CMD_PATTERNBREAK)) - ConvertMDLCommand(&cmd, command2, param2); - *m = cmd; - m += nChannels; - row++; - } - break; - - // Empty Slots - default: - row += xx+1; - m += (xx+1)*nChannels; - if (row >= nRows) break; - } - } -} -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_med.cxx
Deleted
@@ -1,919 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#include "stdafx.h" -#include "sndfile.h" - -//#define MED_LOG - -#ifdef MED_LOG -extern void Log(LPCSTR s, ...); -#endif - -////////////////////////////////////////////////////////// -// OctaMed MED file support (import only) - -// flags -#define MMD_FLAG_FILTERON 0x1 -#define MMD_FLAG_JUMPINGON 0x2 -#define MMD_FLAG_JUMP8TH 0x4 -#define MMD_FLAG_INSTRSATT 0x8 // instruments are attached (this is a module) -#define MMD_FLAG_VOLHEX 0x10 -#define MMD_FLAG_STSLIDE 0x20 // SoundTracker mode for slides -#define MMD_FLAG_8CHANNEL 0x40 // OctaMED 8 channel song -#define MMD_FLAG_SLOWHQ 0x80 // HQ slows playing speed (V2-V4 compatibility) -// flags2 -#define MMD_FLAG2_BMASK 0x1F -#define MMD_FLAG2_BPM 0x20 -#define MMD_FLAG2_MIX 0x80 // uses Mixing (V7+) -// flags3: -#define MMD_FLAG3_STEREO 0x1 // mixing in Stereo mode -#define MMD_FLAG3_FREEPAN 0x2 // free panning -#define MMD_FLAG3_GM 0x4 // module designed for GM/XG compatibility - - -// generic MMD tags -#define MMDTAG_END 0 -#define MMDTAG_PTR 0x80000000 // data needs relocation -#define MMDTAG_MUSTKNOW 0x40000000 // loader must fail if this isn't recognized -#define MMDTAG_MUSTWARN 0x20000000 // loader must warn if this isn't recognized - -// ExpData tags -// # of effect groups, including the global group (will -// override settings in MMDSong struct), default = 1 -#define MMDTAG_EXP_NUMFXGROUPS 1 -#define MMDTAG_TRK_NAME (MMDTAG_PTR|1) // trackinfo tags -#define MMDTAG_TRK_NAMELEN 2 // namelen includes zero term. -#define MMDTAG_TRK_FXGROUP 3 -// effectinfo tags -#define MMDTAG_FX_ECHOTYPE 1 -#define MMDTAG_FX_ECHOLEN 2 -#define MMDTAG_FX_ECHODEPTH 3 -#define MMDTAG_FX_STEREOSEP 4 -#define MMDTAG_FX_GROUPNAME (MMDTAG_PTR|5) // the Global Effects group shouldn't have name saved! -#define MMDTAG_FX_GRPNAMELEN 6 // namelen includes zero term. - -#pragma pack(1) - -typedef struct tagMEDMODULEHEADER -{ - DWORD id; // MMD1-MMD3 - DWORD modlen; // Size of file - DWORD song; // Position in file for this song - WORD psecnum; - WORD pseq; - DWORD blockarr; // Position in file for blocks - DWORD mmdflags; - DWORD smplarr; // Position in file for samples - DWORD reserved; - DWORD expdata; // Absolute offset in file for ExpData (0 if not present) - DWORD reserved2; - WORD pstate; - WORD pblock; - WORD pline; - WORD pseqnum; - WORD actplayline; - BYTE counter; - BYTE extra_songs; // # of songs - 1 -} MEDMODULEHEADER; - - -typedef struct tagMMD0SAMPLE -{ - WORD rep, replen; - BYTE midich; - BYTE midipreset; - BYTE svol; - signed char strans; -} MMD0SAMPLE; - - -// Sample header is immediately followed by sample data... -typedef struct tagMMDSAMPLEHEADER -{ - DWORD length; // length of *one* *unpacked* channel in *bytes* - WORD type; - // if non-negative - // bits 0-3 reserved for multi-octave instruments, not supported on the PC - // 0x10: 16 bit (otherwise 8 bit) - // 0x20: Stereo (otherwise mono) - // 0x40: Uses DeltaCode - // 0x80: Packed data - // -1: Synth - // -2: Hybrid - // if type indicates packed data, these fields follow, otherwise we go right to the data - WORD packtype; // Only 1 = ADPCM is supported - WORD subtype; // Packing subtype - // ADPCM subtype - // 1: g723_40 - // 2: g721 - // 3: g723_24 - BYTE commonflags; // flags common to all packtypes (none defined so far) - BYTE packerflags; // flags for the specific packtype - ULONG leftchlen; // packed length of left channel in bytes - ULONG rightchlen; // packed length of right channel in bytes (ONLY PRESENT IN STEREO SAMPLES) - BYTE SampleData[1]; // Sample Data -} MMDSAMPLEHEADER; - - -// MMD0/MMD1 song header -typedef struct tagMMD0SONGHEADER -{ - MMD0SAMPLE sample[63]; - WORD numblocks; // # of blocks - WORD songlen; // # of entries used in playseq - BYTE playseq[256]; // Play sequence - WORD deftempo; // BPM tempo - signed char playtransp; // Play transpose - BYTE flags; // 0x10: Hex Volumes | 0x20: ST/NT/PT Slides | 0x40: 8 Channels song - BYTE flags2; // [b4-b0]+1: Tempo LPB, 0x20: tempo mode, 0x80: mix_conv=on - BYTE tempo2; // tempo TPL - BYTE trkvol[16]; // track volumes - BYTE mastervol; // master volume - BYTE numsamples; // # of samples (max=63) -} MMD0SONGHEADER; - - -// MMD2/MMD3 song header -typedef struct tagMMD2SONGHEADER -{ - MMD0SAMPLE sample[63]; - WORD numblocks; // # of blocks - WORD numsections; // # of sections - DWORD playseqtable; // filepos of play sequence - DWORD sectiontable; // filepos of sections table (WORD array) - DWORD trackvols; // filepos of tracks volume (BYTE array) - WORD numtracks; // # of tracks (max 64) - WORD numpseqs; // # of play sequences - DWORD trackpans; // filepos of tracks pan values (BYTE array) - LONG flags3; // 0x1:stereo_mix, 0x2:free_panning, 0x4:GM/XG compatibility - WORD voladj; // vol_adjust (set to 100 if 0) - WORD channels; // # of channels (4 if =0) - BYTE mix_echotype; // 1:normal,2:xecho - BYTE mix_echodepth; // 1..6 - WORD mix_echolen; // > 0 - signed char mix_stereosep; // -4..4 - BYTE pad0[223]; - WORD deftempo; // BPM tempo - signed char playtransp; // play transpose - BYTE flags; // 0x1:filteron, 0x2:jumpingon, 0x4:jump8th, 0x8:instr_attached, 0x10:hex_vol, 0x20:PT_slides, 0x40:8ch_conv,0x80:hq slows playing speed - BYTE flags2; // 0x80:mix_conv=on, [b4-b0]+1:tempo LPB, 0x20:tempo_mode - BYTE tempo2; // tempo TPL - BYTE pad1[16]; - BYTE mastervol; // master volume - BYTE numsamples; // # of samples (max 63) -} MMD2SONGHEADER; - -// For MMD0 the note information is held in 3 bytes, byte0, byte1, byte2. For reference we -// number the bits in each byte 0..7, where 0 is the low bit. -// The note is held as bits 5..0 of byte0 -// The instrument is encoded in 6 bits, bits 7 and 6 of byte0 and bits 7,6,5,4 of byte1 -// The command number is bits 3,2,1,0 of byte1, command data is in byte2: -// For command 0, byte2 represents the second data byte, otherwise byte2 -// represents the first data byte. -typedef struct tagMMD0BLOCK -{ - BYTE numtracks; - BYTE lines; // File value is 1 less than actual, so 0 -> 1 line -} MMD0BLOCK; // BYTE data[lines+1][tracks][3]; - - -// For MMD1,MMD2,MMD3 the note information is carried in 4 bytes, byte0, byte1, -// byte2 and byte3 -// The note is held as byte0 (values above 0x84 are ignored) -// The instrument is held as byte1 -// The command number is held as byte2, command data is in byte3 -// For commands 0 and 0x19 byte3 represents the second data byte, -// otherwise byte2 represents the first data byte. -typedef struct tagMMD1BLOCK -{ - WORD numtracks; // Number of tracks, may be > 64, but then that data is skipped. - WORD lines; // Stored value is 1 less than actual, so 0 -> 1 line - DWORD info; // Offset of BlockInfo (if 0, no block_info is present) -} MMD1BLOCK; - -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_mod.cxx
Deleted
@@ -1,358 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -extern WORD ProTrackerPeriodTable[6*12]; - -////////////////////////////////////////////////////////// -// ProTracker / NoiseTracker MOD/NST file support - -void CSoundFile::ConvertModCommand(MODCOMMAND *m) const -//----------------------------------------------------- -{ - UINT command = m->command, param = m->param; - - switch(command) - { - case 0x00: if (param) command = CMD_ARPEGGIO; break; - case 0x01: command = CMD_PORTAMENTOUP; break; - case 0x02: command = CMD_PORTAMENTODOWN; break; - case 0x03: command = CMD_TONEPORTAMENTO; break; - case 0x04: command = CMD_VIBRATO; break; - case 0x05: command = CMD_TONEPORTAVOL; if (param & 0xF0) param &= 0xF0; break; - case 0x06: command = CMD_VIBRATOVOL; if (param & 0xF0) param &= 0xF0; break; - case 0x07: command = CMD_TREMOLO; break; - case 0x08: command = CMD_PANNING8; break; - case 0x09: command = CMD_OFFSET; break; - case 0x0A: command = CMD_VOLUMESLIDE; if (param & 0xF0) param &= 0xF0; break; - case 0x0B: command = CMD_POSITIONJUMP; break; - case 0x0C: command = CMD_VOLUME; break; - case 0x0D: command = CMD_PATTERNBREAK; param = ((param >> 4) * 10) + (param & 0x0F); break; - case 0x0E: command = CMD_MODCMDEX; break; - case 0x0F: command = (param <= (UINT)((m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) ? 0x1F : 0x20)) ? CMD_SPEED : CMD_TEMPO; - if ((param == 0xFF) && (m_nSamples == 15)) command = 0; break; - // Extension for XM extended effects - case 'G' - 55: command = CMD_GLOBALVOLUME; break; - case 'H' - 55: command = CMD_GLOBALVOLSLIDE; if (param & 0xF0) param &= 0xF0; break; - case 'K' - 55: command = CMD_KEYOFF; break; - case 'L' - 55: command = CMD_SETENVPOSITION; break; - case 'M' - 55: command = CMD_CHANNELVOLUME; break; - case 'N' - 55: command = CMD_CHANNELVOLSLIDE; break; - case 'P' - 55: command = CMD_PANNINGSLIDE; if (param & 0xF0) param &= 0xF0; break; - case 'R' - 55: command = CMD_RETRIG; break; - case 'T' - 55: command = CMD_TREMOR; break; - case 'X' - 55: command = CMD_XFINEPORTAUPDOWN; break; - case 'Y' - 55: command = CMD_PANBRELLO; break; - case 'Z' - 55: command = CMD_MIDI; break; - default: command = 0; - } - m->command = command; - m->param = param; -} - - -WORD CSoundFile::ModSaveCommand(const MODCOMMAND *m, BOOL bXM) const -//------------------------------------------------------------------ -{ - UINT command = m->command & 0x3F, param = m->param; - - switch(command) - { - case 0: command = param = 0; break; - case CMD_ARPEGGIO: command = 0; break; - case CMD_PORTAMENTOUP: - if (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_STM)) - { - if ((param & 0xF0) == 0xE0) { command=0x0E; param=((param & 0x0F) >> 2)|0x10; break; } - else if ((param & 0xF0) == 0xF0) { command=0x0E; param &= 0x0F; param|=0x10; break; } - } - command = 0x01; - break; - case CMD_PORTAMENTODOWN: - if (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_STM)) - { - if ((param & 0xF0) == 0xE0) { command=0x0E; param=((param & 0x0F) >> 2)|0x20; break; } - else if ((param & 0xF0) == 0xF0) { command=0x0E; param &= 0x0F; param|=0x20; break; } - } - command = 0x02; - break; - case CMD_TONEPORTAMENTO: command = 0x03; break; - case CMD_VIBRATO: command = 0x04; break; - case CMD_TONEPORTAVOL: command = 0x05; break; - case CMD_VIBRATOVOL: command = 0x06; break; - case CMD_TREMOLO: command = 0x07; break; - case CMD_PANNING8: - command = 0x08; - if (bXM) - { - if ((m_nType != MOD_TYPE_IT) && (m_nType != MOD_TYPE_XM) && (param <= 0x80)) - { - param <<= 1; - if (param > 255) param = 255; - } - } else - { - if ((m_nType == MOD_TYPE_IT) || (m_nType == MOD_TYPE_XM)) param >>= 1; - } - break; - case CMD_OFFSET: command = 0x09; break; - case CMD_VOLUMESLIDE: command = 0x0A; break; - case CMD_POSITIONJUMP: command = 0x0B; break; - case CMD_VOLUME: command = 0x0C; break; - case CMD_PATTERNBREAK: command = 0x0D; param = ((param / 10) << 4) | (param % 10); break; - case CMD_MODCMDEX: command = 0x0E; break; - case CMD_SPEED: command = 0x0F; if (param > 0x20) param = 0x20; break; - case CMD_TEMPO: if (param > 0x20) { command = 0x0F; break; } return 0; - case CMD_GLOBALVOLUME: command = 'G' - 55; break; - case CMD_GLOBALVOLSLIDE: command = 'H' - 55; break; - case CMD_KEYOFF: command = 'K' - 55; break; - case CMD_SETENVPOSITION: command = 'L' - 55; break; - case CMD_CHANNELVOLUME: command = 'M' - 55; break; - case CMD_CHANNELVOLSLIDE: command = 'N' - 55; break; - case CMD_PANNINGSLIDE: command = 'P' - 55; break; - case CMD_RETRIG: command = 'R' - 55; break; - case CMD_TREMOR: command = 'T' - 55; break; - case CMD_XFINEPORTAUPDOWN: command = 'X' - 55; break; - case CMD_PANBRELLO: command = 'Y' - 55; break; - case CMD_MIDI: command = 'Z' - 55; break; - case CMD_S3MCMDEX: - switch(param & 0xF0) - { - case 0x10: command = 0x0E; param = (param & 0x0F) | 0x30; break; - case 0x20: command = 0x0E; param = (param & 0x0F) | 0x50; break; - case 0x30: command = 0x0E; param = (param & 0x0F) | 0x40; break; - case 0x40: command = 0x0E; param = (param & 0x0F) | 0x70; break; - case 0x90: command = 'X' - 55; break; - case 0xB0: command = 0x0E; param = (param & 0x0F) | 0x60; break; - case 0xA0: - case 0x50: - case 0x70: - case 0x60: command = param = 0; break; - default: command = 0x0E; break; - } - break; - default: command = param = 0; - } - return (WORD)((command << 8) | (param)); -} - - -#pragma pack(1) - -typedef struct _MODSAMPLE -{ - CHAR name[22]; - WORD length; - BYTE finetune; - BYTE volume; - WORD loopstart; - WORD looplen; -} MODSAMPLE, *PMODSAMPLE; - -typedef struct _MODMAGIC -{ - BYTE nOrders; - BYTE nRestartPos; - BYTE Orders[128]; - char Magic[4]; // changed from CHAR -} MODMAGIC, *PMODMAGIC; - -#pragma pack() - -BOOL IsMagic(LPCSTR s1, LPCSTR s2) -{ - return ((*(DWORD *)s1) == (*(DWORD *)s2)) ? TRUE : FALSE; -} - - -BOOL CSoundFile::ReadMod(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - char s[1024]; // changed from CHAR - DWORD dwMemPos, dwTotalSampleLen; - PMODMAGIC pMagic; - UINT nErr; - - if ((!lpStream) || (dwMemLength < 0x600)) return FALSE; - dwMemPos = 20; - m_nSamples = 31; - m_nChannels = 4; - pMagic = (PMODMAGIC)(lpStream+dwMemPos+sizeof(MODSAMPLE)*31); - // Check Mod Magic - memcpy(s, pMagic->Magic, 4); - if ((IsMagic(s, "M.K.")) || (IsMagic(s, "M!K!")) - || (IsMagic(s, "M&K!")) || (IsMagic(s, "N.T."))) m_nChannels = 4; else - if ((IsMagic(s, "CD81")) || (IsMagic(s, "OKTA"))) m_nChannels = 8; else - if ((s[0]=='F') && (s[1]=='L') && (s[2]=='T') && (s[3]>='4') && (s[3]<='9')) m_nChannels = s[3] - '0'; else - if ((s[0]>='4') && (s[0]<='9') && (s[1]=='C') && (s[2]=='H') && (s[3]=='N')) m_nChannels = s[0] - '0'; else - if ((s[0]=='1') && (s[1]>='0') && (s[1]<='9') && (s[2]=='C') && (s[3]=='H')) m_nChannels = s[1] - '0' + 10; else - if ((s[0]=='2') && (s[1]>='0') && (s[1]<='9') && (s[2]=='C') && (s[3]=='H')) m_nChannels = s[1] - '0' + 20; else - if ((s[0]=='3') && (s[1]>='0') && (s[1]<='2') && (s[2]=='C') && (s[3]=='H')) m_nChannels = s[1] - '0' + 30; else - if ((s[0]=='T') && (s[1]=='D') && (s[2]=='Z') && (s[3]>='4') && (s[3]<='9')) m_nChannels = s[3] - '0'; else
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_mt2.cxx
Deleted
@@ -1,637 +0,0 @@ -#include "stdafx.h" -#include "sndfile.h" - -//#define MT2DEBUG - -#pragma pack(1) - -typedef struct _MT2FILEHEADER -{ - DWORD dwMT20; // 0x3032544D "MT20" - DWORD dwSpecial; - WORD wVersion; - CHAR szTrackerName[32]; // "MadTracker 2.0" - CHAR szSongName[64]; - WORD nOrders; - WORD wRestart; - WORD wPatterns; - WORD wChannels; - WORD wSamplesPerTick; - BYTE bTicksPerLine; - BYTE bLinesPerBeat; - DWORD fulFlags; // b0=packed patterns - WORD wInstruments; - WORD wSamples; - BYTE Orders[256]; -} MT2FILEHEADER; - -typedef struct _MT2PATTERN -{ - WORD wLines; - DWORD wDataLen; -} MT2PATTERN; - -typedef struct _MT2COMMAND -{ - BYTE note; // 0=nothing, 97=note off - BYTE instr; - BYTE vol; - BYTE pan; - BYTE fxcmd; - BYTE fxparam1; - BYTE fxparam2; -} MT2COMMAND; - -typedef struct _MT2DRUMSDATA -{ - WORD wDrumPatterns; - WORD wDrumSamples[8]; - BYTE DrumPatternOrder[256]; -} MT2DRUMSDATA; - -typedef struct _MT2AUTOMATION -{ - DWORD dwFlags; - DWORD dwEffectId; - DWORD nEnvPoints; -} MT2AUTOMATION; - -typedef struct _MT2INSTRUMENT -{ - CHAR szName[32]; - DWORD dwDataLen; - WORD wSamples; - BYTE GroupsMapping[96]; - BYTE bVibType; - BYTE bVibSweep; - BYTE bVibDepth; - BYTE bVibRate; - WORD wFadeOut; - WORD wNNA; - WORD wInstrFlags; - WORD wEnvFlags1; - WORD wEnvFlags2; -} MT2INSTRUMENT; - -typedef struct _MT2ENVELOPE -{ - BYTE nFlags; - BYTE nPoints; - BYTE nSustainPos; - BYTE nLoopStart; - BYTE nLoopEnd; - BYTE bReserved[3]; - BYTE EnvData[64]; -} MT2ENVELOPE; - -typedef struct _MT2SYNTH -{ - BYTE nSynthId; - BYTE nFxId; - WORD wCutOff; - BYTE nResonance; - BYTE nAttack; - BYTE nDecay; - BYTE bReserved[25]; -} MT2SYNTH; - -typedef struct _MT2SAMPLE -{ - CHAR szName[32]; - DWORD dwDataLen; - DWORD dwLength; - DWORD dwFrequency; - BYTE nQuality; - BYTE nChannels; - BYTE nFlags; - BYTE nLoop; - DWORD dwLoopStart; - DWORD dwLoopEnd; - WORD wVolume; - BYTE nPan; - BYTE nBaseNote; - WORD wSamplesPerBeat; -} MT2SAMPLE; - -typedef struct _MT2GROUP -{ - BYTE nSmpNo; - BYTE nVolume; // 0-128 - BYTE nFinePitch; - BYTE Reserved[5]; -} MT2GROUP; - -#pragma pack() - - -static VOID ConvertMT2Command(CSoundFile *that, MODCOMMAND *m, MT2COMMAND *p) -//--------------------------------------------------------------------------- -{ - // Note - m->note = 0; - if (p->note) m->note = (p->note > 96) ? 0xFF : p->note+12; - // Instrument - m->instr = p->instr; - // Volume Column - if ((p->vol >= 0x10) && (p->vol <= 0x90)) - { - m->volcmd = VOLCMD_VOLUME; - m->vol = (p->vol - 0x10) >> 1; - } else - if ((p->vol >= 0xA0) && (p->vol <= 0xAF)) - { - m->volcmd = VOLCMD_VOLSLIDEDOWN; - m->vol = (p->vol & 0x0f); - } else - if ((p->vol >= 0xB0) && (p->vol <= 0xBF)) - { - m->volcmd = VOLCMD_VOLSLIDEUP; - m->vol = (p->vol & 0x0f); - } else - if ((p->vol >= 0xC0) && (p->vol <= 0xCF)) - { - m->volcmd = VOLCMD_FINEVOLDOWN; - m->vol = (p->vol & 0x0f); - } else - if ((p->vol >= 0xD0) && (p->vol <= 0xDF)) - { - m->volcmd = VOLCMD_FINEVOLUP; - m->vol = (p->vol & 0x0f); - } else - { - m->volcmd = 0; - m->vol = 0; - } - // Effects - m->command = 0; - m->param = 0; - if ((p->fxcmd) || (p->fxparam1) || (p->fxparam2)) - { - if (!p->fxcmd) - { - m->command = p->fxparam2; - m->param = p->fxparam1; - that->ConvertModCommand(m); - } else - { - // TODO: MT2 Effects - } - } -} - - -BOOL CSoundFile::ReadMT2(LPCBYTE lpStream, DWORD dwMemLength) -//----------------------------------------------------------- -{ - MT2FILEHEADER *pfh = (MT2FILEHEADER *)lpStream; - DWORD dwMemPos, dwDrumDataPos, dwExtraDataPos; - UINT nDrumDataLen, nExtraDataLen; - MT2DRUMSDATA *pdd; - MT2INSTRUMENT *InstrMap[255]; - MT2SAMPLE *SampleMap[256]; - - if ((!lpStream) || (dwMemLength < sizeof(MT2FILEHEADER)) - || (pfh->dwMT20 != 0x3032544D) - || (pfh->wVersion < 0x0200) || (pfh->wVersion >= 0x0300) - || (pfh->wChannels < 4) || (pfh->wChannels > 64)) return FALSE; - pdd = NULL; - m_nType = MOD_TYPE_MT2; - m_nChannels = pfh->wChannels;
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_mtm.cxx
Deleted
@@ -1,165 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -////////////////////////////////////////////////////////// -// MTM file support (import only) - -#pragma pack(1) - - -typedef struct tagMTMSAMPLE -{ - char samplename[22]; // changed from CHAR - DWORD length; - DWORD reppos; - DWORD repend; - CHAR finetune; - BYTE volume; - BYTE attribute; -} MTMSAMPLE; - - -typedef struct tagMTMHEADER -{ - char id[4]; // MTM file marker + version // changed from CHAR - char songname[20]; // ASCIIZ songname // changed from CHAR - WORD numtracks; // number of tracks saved - BYTE lastpattern; // last pattern number saved - BYTE lastorder; // last order number to play (songlength-1) - WORD commentsize; // length of comment field - BYTE numsamples; // number of samples saved - BYTE attribute; // attribute byte (unused) - BYTE beatspertrack; - BYTE numchannels; // number of channels used - BYTE panpos[32]; // voice pan positions -} MTMHEADER; - - -#pragma pack() - - -BOOL CSoundFile::ReadMTM(LPCBYTE lpStream, DWORD dwMemLength) -//----------------------------------------------------------- -{ - MTMHEADER *pmh = (MTMHEADER *)lpStream; - DWORD dwMemPos = 66; - - if ((!lpStream) || (dwMemLength < 0x100)) return FALSE; - if ((strncmp(pmh->id, "MTM", 3)) || (pmh->numchannels > 32) - || (pmh->numsamples >= MAX_SAMPLES) || (!pmh->numsamples) - || (!pmh->numtracks) || (!pmh->numchannels) - || (!pmh->lastpattern) || (pmh->lastpattern > MAX_PATTERNS)) return FALSE; - strncpy(m_szNames[0], pmh->songname, 20); - m_szNames[0][20] = 0; - if (dwMemPos + 37*pmh->numsamples + 128 + 192*bswapLE16(pmh->numtracks) - + 64 * (pmh->lastpattern+1) + bswapLE16(pmh->commentsize) >= dwMemLength) return FALSE; - m_nType = MOD_TYPE_MTM; - m_nSamples = pmh->numsamples; - m_nChannels = pmh->numchannels; - // Reading instruments - for (UINT i=1; i<=m_nSamples; i++) - { - MTMSAMPLE *pms = (MTMSAMPLE *)(lpStream + dwMemPos); - strncpy(m_szNames[i], pms->samplename, 22); - m_szNames[i][22] = 0; - Ins[i].nVolume = pms->volume << 2; - Ins[i].nGlobalVol = 64; - DWORD len = bswapLE32(pms->length); - if ((len > 4) && (len <= MAX_SAMPLE_LENGTH)) - { - Ins[i].nLength = len; - Ins[i].nLoopStart = bswapLE32(pms->reppos); - Ins[i].nLoopEnd = bswapLE32(pms->repend); - if (Ins[i].nLoopEnd > Ins[i].nLength) Ins[i].nLoopEnd = Ins[i].nLength; - if (Ins[i].nLoopStart + 4 >= Ins[i].nLoopEnd) Ins[i].nLoopStart = Ins[i].nLoopEnd = 0; - if (Ins[i].nLoopEnd) Ins[i].uFlags |= CHN_LOOP; - Ins[i].nFineTune = MOD2XMFineTune(pms->finetune); - if (pms->attribute & 0x01) - { - Ins[i].uFlags |= CHN_16BIT; - Ins[i].nLength >>= 1; - Ins[i].nLoopStart >>= 1; - Ins[i].nLoopEnd >>= 1; - } - Ins[i].nPan = 128; - } - dwMemPos += 37; - } - // Setting Channel Pan Position - for (UINT ich=0; ich<m_nChannels; ich++) - { - ChnSettings[ich].nPan = ((pmh->panpos[ich] & 0x0F) << 4) + 8; - ChnSettings[ich].nVolume = 64; - } - // Reading pattern order - memcpy(Order, lpStream + dwMemPos, pmh->lastorder+1); - dwMemPos += 128; - // Reading Patterns - LPCBYTE pTracks = lpStream + dwMemPos; - dwMemPos += 192 * bswapLE16(pmh->numtracks); - LPWORD pSeq = (LPWORD)(lpStream + dwMemPos); - for (UINT pat=0; pat<=pmh->lastpattern; pat++) - { - PatternSize[pat] = 64; - PatternAllocSize[pat] = 64; - if ((Patterns[pat] = AllocatePattern(64, m_nChannels)) == NULL) break; - for (UINT n=0; n<32; n++) if ((pSeq[n]) && (pSeq[n] <= bswapLE16(pmh->numtracks)) && (n < m_nChannels)) - { - LPCBYTE p = pTracks + 192 * (pSeq[n]-1); - MODCOMMAND *m = Patterns[pat] + n; - for (UINT i=0; i<64; i++, m+=m_nChannels, p+=3) - { - if (p[0] & 0xFC) m->note = (p[0] >> 2) + 37; - m->instr = ((p[0] & 0x03) << 4) | (p[1] >> 4); - UINT cmd = p[1] & 0x0F; - UINT param = p[2]; - if (cmd == 0x0A) - { - if (param & 0xF0) param &= 0xF0; else param &= 0x0F; - } - m->command = cmd; - m->param = param; - if ((cmd) || (param)) ConvertModCommand(m); - } - } - pSeq += 32; - } - dwMemPos += 64*(pmh->lastpattern+1); - if (bswapLE16(pmh->commentsize) && (dwMemPos + bswapLE16(pmh->commentsize) < dwMemLength)) - { - UINT n = bswapLE16(pmh->commentsize); - m_lpszSongComments = new char[n+1]; - if (m_lpszSongComments) - { - memcpy(m_lpszSongComments, lpStream+dwMemPos, n); - m_lpszSongComments[n] = 0; - for (UINT i=0; i<n; i++) - { - if (!m_lpszSongComments[i]) - { - m_lpszSongComments[i] = ((i+1) % 40) ? 0x20 : 0x0D; - } - } - } - } - dwMemPos += bswapLE16(pmh->commentsize); - // Reading Samples - for (UINT ismp=1; ismp<=m_nSamples; ismp++) - { - if (dwMemPos >= dwMemLength) break; - dwMemPos += ReadSample(&Ins[ismp], (Ins[ismp].uFlags & CHN_16BIT) ? RS_PCM16U : RS_PCM8U, - (LPSTR)(lpStream + dwMemPos), dwMemLength - dwMemPos); - } - m_nMinPeriod = 64; - m_nMaxPeriod = 32767; - return TRUE; -} -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_okt.cxx
Deleted
@@ -1,197 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -////////////////////////////////////////////// -// Oktalyzer (OKT) module loader // -////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -typedef struct OKTFILEHEADER -{ - DWORD okta; // "OKTA" - DWORD song; // "SONG" - DWORD cmod; // "CMOD" - DWORD fixed8; - BYTE chnsetup[8]; - DWORD samp; // "SAMP" - DWORD samplen; -} OKTFILEHEADER; - - -typedef struct OKTSAMPLE -{ - CHAR name[20]; - DWORD length; - WORD loopstart; - WORD looplen; - BYTE pad1; - BYTE volume; - BYTE pad2; - BYTE pad3; -} OKTSAMPLE; - - -BOOL CSoundFile::ReadOKT(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - OKTFILEHEADER *pfh = (OKTFILEHEADER *)lpStream; - DWORD dwMemPos = sizeof(OKTFILEHEADER); - UINT nsamples = 0, norders = 0; - - if ((!lpStream) || (dwMemLength < 1024)) return FALSE; - if ((pfh->okta != 0x41544B4F) || (pfh->song != 0x474E4F53) - || (pfh->cmod != 0x444F4D43) || (pfh->chnsetup[0]) || (pfh->chnsetup[2]) - || (pfh->chnsetup[4]) || (pfh->chnsetup[6]) || (pfh->fixed8 != 0x08000000) - || (pfh->samp != 0x504D4153)) return FALSE; - m_nType = MOD_TYPE_OKT; - m_nChannels = 4 + pfh->chnsetup[1] + pfh->chnsetup[3] + pfh->chnsetup[5] + pfh->chnsetup[7]; - if (m_nChannels > MAX_CHANNELS) m_nChannels = MAX_CHANNELS; - nsamples = bswapBE32(pfh->samplen) >> 5; - m_nSamples = nsamples; - if (m_nSamples >= MAX_SAMPLES) m_nSamples = MAX_SAMPLES-1; - // Reading samples - for (UINT smp=1; smp <= nsamples; smp++) - { - if (dwMemPos >= dwMemLength) return TRUE; - if (smp < MAX_SAMPLES) - { - OKTSAMPLE *psmp = (OKTSAMPLE *)(lpStream + dwMemPos); - MODINSTRUMENT *pins = &Ins[smp]; - - memcpy(m_szNames[smp], psmp->name, 20); - pins->uFlags = 0; - pins->nLength = bswapBE32(psmp->length) & ~1; - pins->nLoopStart = bswapBE16(psmp->loopstart); - pins->nLoopEnd = pins->nLoopStart + bswapBE16(psmp->looplen); - if (pins->nLoopStart + 2 < pins->nLoopEnd) pins->uFlags |= CHN_LOOP; - pins->nGlobalVol = 64; - pins->nVolume = psmp->volume << 2; - pins->nC4Speed = 8363; - } - dwMemPos += sizeof(OKTSAMPLE); - } - // SPEE - if (dwMemPos >= dwMemLength) return TRUE; - if (*((DWORD *)(lpStream + dwMemPos)) == 0x45455053) - { - m_nDefaultSpeed = lpStream[dwMemPos+9]; - dwMemPos += bswapBE32(*((DWORD *)(lpStream + dwMemPos + 4))) + 8; - } - // SLEN - if (dwMemPos >= dwMemLength) return TRUE; - if (*((DWORD *)(lpStream + dwMemPos)) == 0x4E454C53) - { - dwMemPos += bswapBE32(*((DWORD *)(lpStream + dwMemPos + 4))) + 8; - } - // PLEN - if (dwMemPos >= dwMemLength) return TRUE; - if (*((DWORD *)(lpStream + dwMemPos)) == 0x4E454C50) - { - norders = lpStream[dwMemPos+9]; - dwMemPos += bswapBE32(*((DWORD *)(lpStream + dwMemPos + 4))) + 8; - } - // PATT - if (dwMemPos >= dwMemLength) return TRUE; - if (*((DWORD *)(lpStream + dwMemPos)) == 0x54544150) - { - UINT orderlen = norders; - if (orderlen >= MAX_ORDERS) orderlen = MAX_ORDERS-1; - for (UINT i=0; i<orderlen; i++) Order[i] = lpStream[dwMemPos+10+i]; - for (UINT j=orderlen; j>1; j--) { if (Order[j-1]) break; Order[j-1] = 0xFF; } - dwMemPos += bswapBE32(*((DWORD *)(lpStream + dwMemPos + 4))) + 8; - } - // PBOD - UINT npat = 0; - while ((dwMemPos+10 < dwMemLength) && (*((DWORD *)(lpStream + dwMemPos)) == 0x444F4250)) - { - DWORD dwPos = dwMemPos + 10; - UINT rows = lpStream[dwMemPos+9]; - if (!rows) rows = 64; - if (npat < MAX_PATTERNS) - { - if ((Patterns[npat] = AllocatePattern(rows, m_nChannels)) == NULL) return TRUE; - MODCOMMAND *m = Patterns[npat]; - PatternSize[npat] = rows; - PatternAllocSize[npat] = rows; - UINT imax = m_nChannels*rows; - for (UINT i=0; i<imax; i++, m++, dwPos+=4) - { - if (dwPos+4 > dwMemLength) break; - const BYTE *p = lpStream+dwPos; - UINT note = p[0]; - if (note) - { - m->note = note + 48; - m->instr = p[1] + 1; - } - UINT command = p[2]; - UINT param = p[3]; - m->param = param; - switch(command) - { - // 0: no effect - case 0: - break; - // 1: Portamento Up - case 1: - case 17: - case 30: - if (param) m->command = CMD_PORTAMENTOUP; - break; - // 2: Portamento Down - case 2: - case 13: - case 21: - if (param) m->command = CMD_PORTAMENTODOWN; - break; - // 10: Arpeggio - case 10: - case 11: - case 12: - m->command = CMD_ARPEGGIO; - break; - // 15: Filter - case 15: - m->command = CMD_MODCMDEX; - m->param = param & 0x0F; - break; - // 25: Position Jump - case 25: - m->command = CMD_POSITIONJUMP; - break; - // 28: Set Speed - case 28: - m->command = CMD_SPEED; - break; - // 31: Volume Control - case 31: - if (param <= 0x40) m->command = CMD_VOLUME; else - if (param <= 0x50) { m->command = CMD_VOLUMESLIDE; m->param &= 0x0F; if (!m->param) m->param = 0x0F; } else - if (param <= 0x60) { m->command = CMD_VOLUMESLIDE; m->param = (param & 0x0F) << 4; if (!m->param) m->param = 0xF0; } else - if (param <= 0x70) { m->command = CMD_MODCMDEX; m->param = 0xB0 | (param & 0x0F); if (!(param & 0x0F)) m->param = 0xBF; } else - if (param <= 0x80) { m->command = CMD_MODCMDEX; m->param = 0xA0 | (param & 0x0F); if (!(param & 0x0F)) m->param = 0xAF; } - break; - } - } - } - npat++; - dwMemPos += bswapBE32(*((DWORD *)(lpStream + dwMemPos + 4))) + 8; - } - // SBOD - UINT nsmp = 1; - while ((dwMemPos+10 < dwMemLength) && (*((DWORD *)(lpStream + dwMemPos)) == 0x444F4253)) - { - if (nsmp < MAX_SAMPLES) ReadSample(&Ins[nsmp], RS_PCM8S, (LPSTR)(lpStream+dwMemPos+8), dwMemLength-dwMemPos-8); - dwMemPos += bswapBE32(*((DWORD *)(lpStream + dwMemPos + 4))) + 8; - nsmp++; - } - return TRUE; -} -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_psm.cxx
Deleted
@@ -1,882 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - - -/////////////////////////////////////////////////// -// -// PSM module loader -// -/////////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#define PSM_LOG - -#define PSM_ID_NEW 0x204d5350 -#define PSM_ID_OLD 0xfe4d5350 -#define IFFID_FILE 0x454c4946 -#define IFFID_TITL 0x4c544954 -#define IFFID_SDFT 0x54464453 -#define IFFID_PBOD 0x444f4250 -#define IFFID_SONG 0x474e4f53 -#define IFFID_PATT 0x54544150 -#define IFFID_DSMP 0x504d5344 -#define IFFID_OPLH 0x484c504f - -#pragma pack(1) - -typedef struct _PSMCHUNK -{ - DWORD id; - DWORD len; - DWORD listid; -} PSMCHUNK; - -typedef struct _PSMSONGHDR -{ - CHAR songname[8]; // "MAINSONG" - BYTE reserved1; - BYTE reserved2; - BYTE channels; -} PSMSONGHDR; - -typedef struct _PSMPATTERN -{ - DWORD size; - DWORD name; - WORD rows; - WORD reserved1; - BYTE data[4]; -} PSMPATTERN; - -typedef struct _PSMSAMPLE -{ - BYTE flags; - CHAR songname[8]; - DWORD smpid; - CHAR samplename[34]; - DWORD reserved1; - BYTE reserved2; - BYTE insno; - BYTE reserved3; - DWORD length; - DWORD loopstart; - DWORD loopend; - WORD reserved4; - BYTE defvol; - DWORD reserved5; - DWORD samplerate; - BYTE reserved6[19]; -} PSMSAMPLE; - -#pragma pack() - - -BOOL CSoundFile::ReadPSM(LPCBYTE lpStream, DWORD dwMemLength) -//----------------------------------------------------------- -{ - PSMCHUNK *pfh = (PSMCHUNK *)lpStream; - DWORD dwMemPos, dwSongPos; - DWORD patptrs[MAX_PATTERNS]; - BYTE samplemap[MAX_SAMPLES]; - UINT nPatterns; - - // Chunk0: "PSM ",filesize,"FILE" - if (dwMemLength < 256) return FALSE; - if (bswapLE32(pfh->id) == PSM_ID_OLD) - { - #ifdef PSM_LOG - printf("Old PSM format not supported\n"); - #endif - return FALSE; - } - if ((bswapLE32(pfh->id) != PSM_ID_NEW) - || (bswapLE32(pfh->len)+12 > dwMemLength) - || (bswapLE32(pfh->listid) != IFFID_FILE)) return FALSE; - m_nType = MOD_TYPE_PSM; - m_nChannels = 16; - m_nSamples = 0; - nPatterns = 0; - dwMemPos = 12; - dwSongPos = 0; - for (UINT iChPan=0; iChPan<16; iChPan++) - { - UINT pan = (((iChPan & 3) == 1) || ((iChPan&3)==2)) ? 0xC0 : 0x40; - ChnSettings[iChPan].nPan = pan; - } - m_szNames[0][0]=0; - while (dwMemPos+8 < dwMemLength) - { - PSMCHUNK *pchunk = (PSMCHUNK *)(lpStream+dwMemPos); - if ((bswapLE32(pchunk->len) >= dwMemLength - 8) - || (dwMemPos + bswapLE32(pchunk->len) + 8 > dwMemLength)) break; - dwMemPos += 8; - PUCHAR pdata = (PUCHAR)(lpStream+dwMemPos); - ULONG len = bswapLE32(pchunk->len); - if (len) switch(bswapLE32(pchunk->id)) - { - // "TITL": Song title - case IFFID_TITL: - if (!pdata[0]) { pdata++; len--; } - memcpy(m_szNames[0], pdata, (len>31) ? 31 : len); - m_szNames[0][31] = 0; - break; - // "PBOD": Pattern - case IFFID_PBOD: - if ((len >= 12) && (nPatterns < MAX_PATTERNS)) - { - patptrs[nPatterns++] = dwMemPos-8; - } - break; - // "SONG": Song description - case IFFID_SONG: - if ((len >= sizeof(PSMSONGHDR)+8) && (!dwSongPos)) - { - dwSongPos = dwMemPos - 8; - } - break; - // "DSMP": Sample Data - case IFFID_DSMP: - if ((len >= sizeof(PSMSAMPLE)) && (m_nSamples+1 < MAX_SAMPLES)) - { - m_nSamples++; - MODINSTRUMENT *pins = &Ins[m_nSamples]; - PSMSAMPLE *psmp = (PSMSAMPLE *)pdata; - memcpy(m_szNames[m_nSamples], psmp->samplename, 31); - m_szNames[m_nSamples][31] = 0; - samplemap[m_nSamples-1] = (BYTE)m_nSamples; - // Init sample - pins->nGlobalVol = 0x40; - pins->nC4Speed = bswapLE32(psmp->samplerate); - pins->nLength = bswapLE32(psmp->length); - pins->nLoopStart = bswapLE32(psmp->loopstart); - pins->nLoopEnd = bswapLE32(psmp->loopend); - pins->nPan = 128; - pins->nVolume = (psmp->defvol+1) * 2; - pins->uFlags = (psmp->flags & 0x80) ? CHN_LOOP : 0; - if (pins->nLoopStart > 0) pins->nLoopStart--; - // Point to sample data - pdata += 0x60; - len -= 0x60; - // Load sample data - if ((pins->nLength > 3) && (len > 3)) - { - ReadSample(pins, RS_PCM8D, (LPCSTR)pdata, len); - } else - { - pins->nLength = 0; - } - } - break; - #if 0 - default: - { - CHAR s[8], s2[64]; - *(DWORD *)s = pchunk->id; - s[4] = 0; - wsprintf(s2, "%s: %4d bytes @ %4d\n", s, pchunk->len, dwMemPos); - OutputDebugString(s2); - } - #endif - } - dwMemPos += bswapLE32(pchunk->len); - } - // Step #1: convert song structure - PSMSONGHDR *pSong = (PSMSONGHDR *)(lpStream+dwSongPos+8); - if ((!dwSongPos) || (pSong->channels < 2) || (pSong->channels > 32)) return TRUE; - m_nChannels = pSong->channels; - // Valid song header -> convert attached chunks - { - DWORD dwSongEnd = dwSongPos + 8 + *(DWORD *)(lpStream+dwSongPos+4); - dwMemPos = dwSongPos + 8 + 11; // sizeof(PSMCHUNK)+sizeof(PSMSONGHDR) - while (dwMemPos + 8 < dwSongEnd) - { - PSMCHUNK *pchunk = (PSMCHUNK *)(lpStream+dwMemPos); - dwMemPos += 8; - if ((bswapLE32(pchunk->len) > dwSongEnd)
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_ptm.cxx
Deleted
@@ -1,208 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -////////////////////////////////////////////// -// PTM PolyTracker module loader // -////////////////////////////////////////////// -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -#pragma pack(1) - -typedef struct PTMFILEHEADER -{ - CHAR songname[28]; // name of song, asciiz string - CHAR eof; // 26 - BYTE version_lo; // 03 version of file, currently 0203h - BYTE version_hi; // 02 - BYTE reserved1; // reserved, set to 0 - WORD norders; // number of orders (0..256) - WORD nsamples; // number of instruments (1..255) - WORD npatterns; // number of patterns (1..128) - WORD nchannels; // number of channels (voices) used (1..32) - WORD fileflags; // set to 0 - WORD reserved2; // reserved, set to 0 - DWORD ptmf_id; // song identification, 'PTMF' or 0x464d5450 - BYTE reserved3[16]; // reserved, set to 0 - BYTE chnpan[32]; // channel panning settings, 0..15, 0 = left, 7 = middle, 15 = right - BYTE orders[256]; // order list, valid entries 0..nOrders-1 - WORD patseg[128]; // pattern offsets (*16) -} PTMFILEHEADER, *LPPTMFILEHEADER; - -#define SIZEOF_PTMFILEHEADER 608 - - -typedef struct PTMSAMPLE -{ - BYTE sampletype; // sample type (bit array) - CHAR filename[12]; // name of external sample file - BYTE volume; // default volume - WORD nC4Spd; // C4 speed - WORD sampleseg; // sample segment (used internally) - WORD fileofs[2]; // offset of sample data - WORD length[2]; // sample size (in bytes) - WORD loopbeg[2]; // start of loop - WORD loopend[2]; // end of loop - WORD gusdata[8]; - char samplename[28]; // name of sample, asciiz // changed from CHAR - DWORD ptms_id; // sample identification, 'PTMS' or 0x534d5450 -} PTMSAMPLE; - -#define SIZEOF_PTMSAMPLE 80 - -#pragma pack() - - -BOOL CSoundFile::ReadPTM(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - PTMFILEHEADER pfh = *(LPPTMFILEHEADER)lpStream; - DWORD dwMemPos; - UINT nOrders; - - pfh.norders = bswapLE16(pfh.norders); - pfh.nsamples = bswapLE16(pfh.nsamples); - pfh.npatterns = bswapLE16(pfh.npatterns); - pfh.nchannels = bswapLE16(pfh.nchannels); - pfh.fileflags = bswapLE16(pfh.fileflags); - pfh.reserved2 = bswapLE16(pfh.reserved2); - pfh.ptmf_id = bswapLE32(pfh.ptmf_id); - for (UINT j=0; j<128; j++) - { - pfh.patseg[j] = bswapLE16(pfh.patseg[j]); - } - - if ((!lpStream) || (dwMemLength < 1024)) return FALSE; - if ((pfh.ptmf_id != 0x464d5450) || (!pfh.nchannels) - || (pfh.nchannels > 32) - || (pfh.norders > 256) || (!pfh.norders) - || (!pfh.nsamples) || (pfh.nsamples > 255) - || (!pfh.npatterns) || (pfh.npatterns > 128) - || (SIZEOF_PTMFILEHEADER+pfh.nsamples*SIZEOF_PTMSAMPLE >= (int)dwMemLength)) return FALSE; - memcpy(m_szNames[0], pfh.songname, 28); - m_szNames[0][28] = 0; - m_nType = MOD_TYPE_PTM; - m_nChannels = pfh.nchannels; - m_nSamples = (pfh.nsamples < MAX_SAMPLES) ? pfh.nsamples : MAX_SAMPLES-1; - dwMemPos = SIZEOF_PTMFILEHEADER; - nOrders = (pfh.norders < MAX_ORDERS) ? pfh.norders : MAX_ORDERS-1; - memcpy(Order, pfh.orders, nOrders); - for (UINT ipan=0; ipan<m_nChannels; ipan++) - { - ChnSettings[ipan].nVolume = 64; - ChnSettings[ipan].nPan = ((pfh.chnpan[ipan] & 0x0F) << 4) + 4; - } - for (UINT ismp=0; ismp<m_nSamples; ismp++, dwMemPos += SIZEOF_PTMSAMPLE) - { - MODINSTRUMENT *pins = &Ins[ismp+1]; - PTMSAMPLE *psmp = (PTMSAMPLE *)(lpStream+dwMemPos); - - lstrcpyn(m_szNames[ismp+1], psmp->samplename, 28); - memcpy(pins->name, psmp->filename, 12); - pins->name[12] = 0; - pins->nGlobalVol = 64; - pins->nPan = 128; - pins->nVolume = psmp->volume << 2; - pins->nC4Speed = bswapLE16(psmp->nC4Spd) << 1; - pins->uFlags = 0; - if ((psmp->sampletype & 3) == 1) - { - UINT smpflg = RS_PCM8D; - DWORD samplepos; - pins->nLength = bswapLE32(*psmp->length); - pins->nLoopStart = bswapLE32(*psmp->loopbeg); - pins->nLoopEnd = bswapLE32(*psmp->loopend); - samplepos = bswapLE32(*psmp->fileofs); - if (psmp->sampletype & 4) pins->uFlags |= CHN_LOOP; - if (psmp->sampletype & 8) pins->uFlags |= CHN_PINGPONGLOOP; - if (psmp->sampletype & 16) - { - pins->uFlags |= CHN_16BIT; - pins->nLength >>= 1; - pins->nLoopStart >>= 1; - pins->nLoopEnd >>= 1; - smpflg = RS_PTM8DTO16; - } - if ((pins->nLength) && (samplepos) && (samplepos < dwMemLength)) - { - ReadSample(pins, smpflg, (LPSTR)(lpStream+samplepos), dwMemLength-samplepos); - } - } - } - // Reading Patterns - for (UINT ipat=0; ipat<pfh.npatterns; ipat++) - { - dwMemPos = ((UINT)pfh.patseg[ipat]) << 4; - if ((!dwMemPos) || (dwMemPos >= dwMemLength)) continue; - PatternSize[ipat] = 64; - PatternAllocSize[ipat] = 64; - if ((Patterns[ipat] = AllocatePattern(64, m_nChannels)) == NULL) break; - // - MODCOMMAND *m = Patterns[ipat]; - for (UINT row=0; ((row < 64) && (dwMemPos < dwMemLength)); ) - { - UINT b = lpStream[dwMemPos++]; - - if (dwMemPos >= dwMemLength) break; - if (b) - { - UINT nChn = b & 0x1F; - - if (b & 0x20) - { - if (dwMemPos + 2 > dwMemLength) break; - m[nChn].note = lpStream[dwMemPos++]; - m[nChn].instr = lpStream[dwMemPos++]; - } - if (b & 0x40) - { - if (dwMemPos + 2 > dwMemLength) break; - m[nChn].command = lpStream[dwMemPos++]; - m[nChn].param = lpStream[dwMemPos++]; - if ((m[nChn].command == 0x0E) && ((m[nChn].param & 0xF0) == 0x80)) - { - m[nChn].command = CMD_S3MCMDEX; - } else - if (m[nChn].command < 0x10) - { - ConvertModCommand(&m[nChn]); - } else - { - switch(m[nChn].command) - { - case 16: - m[nChn].command = CMD_GLOBALVOLUME; - break; - case 17: - m[nChn].command = CMD_RETRIG; - break; - case 18: - m[nChn].command = CMD_FINEVIBRATO; - break; - default: - m[nChn].command = 0; - } - } - } - if (b & 0x80) - { - if (dwMemPos >= dwMemLength) break; - m[nChn].volcmd = VOLCMD_VOLUME; - m[nChn].vol = lpStream[dwMemPos++]; - } - } else
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_s3m.cxx
Deleted
@@ -1,406 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -extern WORD S3MFineTuneTable[16]; - -////////////////////////////////////////////////////// -// ScreamTracker S3M file support - -typedef struct tagS3MSAMPLESTRUCT -{ - BYTE type; - CHAR dosname[12]; - BYTE hmem; - WORD memseg; - DWORD length; - DWORD loopbegin; - DWORD loopend; - BYTE vol; - BYTE bReserved; - BYTE pack; - BYTE flags; - DWORD finetune; - DWORD dwReserved; - WORD intgp; - WORD int512; - DWORD lastused; - CHAR name[28]; - CHAR scrs[4]; -} S3MSAMPLESTRUCT; - - -typedef struct tagS3MFILEHEADER -{ - CHAR name[28]; - BYTE b1A; - BYTE type; - WORD reserved1; - WORD ordnum; - WORD insnum; - WORD patnum; - WORD flags; - WORD cwtv; - WORD version; - DWORD scrm; // "SCRM" = 0x4D524353 - BYTE globalvol; - BYTE speed; - BYTE tempo; - BYTE mastervol; - BYTE ultraclicks; - BYTE panning_present; - BYTE reserved2[8]; - WORD special; - BYTE channels[32]; -} S3MFILEHEADER; - - -void CSoundFile::S3MConvert(MODCOMMAND *m, BOOL bIT) const -//-------------------------------------------------------- -{ - UINT command = m->command; - UINT param = m->param; - switch (command + 0x40) - { - case 'A': command = CMD_SPEED; break; - case 'B': command = CMD_POSITIONJUMP; break; - case 'C': command = CMD_PATTERNBREAK; if (!bIT) param = (param >> 4) * 10 + (param & 0x0F); break; - case 'D': command = CMD_VOLUMESLIDE; break; - case 'E': command = CMD_PORTAMENTODOWN; break; - case 'F': command = CMD_PORTAMENTOUP; break; - case 'G': command = CMD_TONEPORTAMENTO; break; - case 'H': command = CMD_VIBRATO; break; - case 'I': command = CMD_TREMOR; break; - case 'J': command = CMD_ARPEGGIO; break; - case 'K': command = CMD_VIBRATOVOL; break; - case 'L': command = CMD_TONEPORTAVOL; break; - case 'M': command = CMD_CHANNELVOLUME; break; - case 'N': command = CMD_CHANNELVOLSLIDE; break; - case 'O': command = CMD_OFFSET; break; - case 'P': command = CMD_PANNINGSLIDE; break; - case 'Q': command = CMD_RETRIG; break; - case 'R': command = CMD_TREMOLO; break; - case 'S': command = CMD_S3MCMDEX; break; - case 'T': command = CMD_TEMPO; break; - case 'U': command = CMD_FINEVIBRATO; break; - case 'V': command = CMD_GLOBALVOLUME; if (!bIT) param *= 2; break; - case 'W': command = CMD_GLOBALVOLSLIDE; break; - case 'X': command = CMD_PANNING8; break; - case 'Y': command = CMD_PANBRELLO; break; - case 'Z': command = CMD_MIDI; break; - default: command = 0; - } - m->command = command; - m->param = param; -} - - -void CSoundFile::S3MSaveConvert(UINT *pcmd, UINT *pprm, BOOL bIT) const -//--------------------------------------------------------------------- -{ - UINT command = *pcmd; - UINT param = *pprm; - switch(command) - { - case CMD_SPEED: command = 'A'; break; - case CMD_POSITIONJUMP: command = 'B'; break; - case CMD_PATTERNBREAK: command = 'C'; if (!bIT) param = ((param / 10) << 4) + (param % 10); break; - case CMD_VOLUMESLIDE: command = 'D'; break; - case CMD_PORTAMENTODOWN: command = 'E'; if ((param >= 0xE0) && (m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))) param = 0xDF; break; - case CMD_PORTAMENTOUP: command = 'F'; if ((param >= 0xE0) && (m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))) param = 0xDF; break; - case CMD_TONEPORTAMENTO: command = 'G'; break; - case CMD_VIBRATO: command = 'H'; break; - case CMD_TREMOR: command = 'I'; break; - case CMD_ARPEGGIO: command = 'J'; break; - case CMD_VIBRATOVOL: command = 'K'; break; - case CMD_TONEPORTAVOL: command = 'L'; break; - case CMD_CHANNELVOLUME: command = 'M'; break; - case CMD_CHANNELVOLSLIDE: command = 'N'; break; - case CMD_OFFSET: command = 'O'; break; - case CMD_PANNINGSLIDE: command = 'P'; break; - case CMD_RETRIG: command = 'Q'; break; - case CMD_TREMOLO: command = 'R'; break; - case CMD_S3MCMDEX: command = 'S'; break; - case CMD_TEMPO: command = 'T'; break; - case CMD_FINEVIBRATO: command = 'U'; break; - case CMD_GLOBALVOLUME: command = 'V'; if (!bIT) param >>= 1;break; - case CMD_GLOBALVOLSLIDE: command = 'W'; break; - case CMD_PANNING8: - command = 'X'; - if ((bIT) && (m_nType != MOD_TYPE_IT) && (m_nType != MOD_TYPE_XM)) - { - if (param == 0xA4) { command = 'S'; param = 0x91; } else - if (param <= 0x80) { param <<= 1; if (param > 255) param = 255; } else - command = param = 0; - } else - if ((!bIT) && ((m_nType == MOD_TYPE_IT) || (m_nType == MOD_TYPE_XM))) - { - param >>= 1; - } - break; - case CMD_PANBRELLO: command = 'Y'; break; - case CMD_MIDI: command = 'Z'; break; - case CMD_XFINEPORTAUPDOWN: - if (param & 0x0F) switch(param & 0xF0) - { - case 0x10: command = 'F'; param = (param & 0x0F) | 0xE0; break; - case 0x20: command = 'E'; param = (param & 0x0F) | 0xE0; break; - case 0x90: command = 'S'; break; - default: command = param = 0; - } else command = param = 0; - break; - case CMD_MODCMDEX: - command = 'S'; - switch(param & 0xF0) - { - case 0x00: command = param = 0; break; - case 0x10: command = 'F'; param |= 0xF0; break; - case 0x20: command = 'E'; param |= 0xF0; break; - case 0x30: param = (param & 0x0F) | 0x10; break; - case 0x40: param = (param & 0x0F) | 0x30; break; - case 0x50: param = (param & 0x0F) | 0x20; break; - case 0x60: param = (param & 0x0F) | 0xB0; break; - case 0x70: param = (param & 0x0F) | 0x40; break; - case 0x90: command = 'Q'; param &= 0x0F; break; - case 0xA0: if (param & 0x0F) { command = 'D'; param = (param << 4) | 0x0F; } else command=param=0; break; - case 0xB0: if (param & 0x0F) { command = 'D'; param |= 0xF0; } else command=param=0; break; - } - break; - default: command = param = 0; - } - command &= ~0x40; - *pcmd = command; - *pprm = param; -} - - -BOOL CSoundFile::ReadS3M(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - UINT insnum,patnum,nins,npat; - DWORD insfile[128]; - WORD ptr[256]; - BYTE s[1024]; - DWORD dwMemPos; - BYTE insflags[128], inspack[128]; - S3MFILEHEADER psfh = *(S3MFILEHEADER *)lpStream; - - psfh.reserved1 = bswapLE16(psfh.reserved1); - psfh.ordnum = bswapLE16(psfh.ordnum); - psfh.insnum = bswapLE16(psfh.insnum); - psfh.patnum = bswapLE16(psfh.patnum);
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_stm.cxx
Deleted
@@ -1,187 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -#pragma pack(1) - -typedef struct tagSTMNOTE -{ - BYTE note; - BYTE insvol; - BYTE volcmd; - BYTE cmdinf; -} STMNOTE; - - -// Raw STM sampleinfo struct: -typedef struct tagSTMSAMPLE -{ - CHAR filename[14]; // Can't have long comments - just filename comments :) - WORD reserved; // ISA in memory when in ST 2 - WORD length; // Sample length - WORD loopbeg; // Loop start point - WORD loopend; // Loop end point - BYTE volume; // Volume - BYTE reserved2; // More reserved crap - WORD c2spd; // Good old c2spd - BYTE reserved3[6]; // Yet more of PSi's reserved crap -} STMSAMPLE; - - -// Raw STM header struct: -typedef struct tagSTMHEADER -{ - char songname[20]; // changed from CHAR - char trackername[8]; // !SCREAM! for ST 2.xx // changed from CHAR - CHAR unused; // 0x1A - CHAR filetype; // 1=song, 2=module (only 2 is supported, of course) :) - CHAR ver_major; // Like 2 - CHAR ver_minor; // "ditto" - BYTE inittempo; // initspeed= stm inittempo>>4 - BYTE numpat; // number of patterns - BYTE globalvol; // <- WoW! a RiGHT TRiANGLE =8*) - BYTE reserved[13]; // More of PSi's internal crap - STMSAMPLE sample[31]; // STM sample data - BYTE patorder[128]; // Docs say 64 - actually 128 -} STMHEADER; - -#pragma pack() - - - -BOOL CSoundFile::ReadSTM(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - STMHEADER *phdr = (STMHEADER *)lpStream; - DWORD dwMemPos = 0; - - if ((!lpStream) || (dwMemLength < sizeof(STMHEADER))) return FALSE; - if ((phdr->filetype != 2) || (phdr->unused != 0x1A) - || ((strnicmp(phdr->trackername, "!SCREAM!", 8)) - && (strnicmp(phdr->trackername, "BMOD2STM", 8)))) return FALSE; - memcpy(m_szNames[0], phdr->songname, 20); - // Read STM header - m_nType = MOD_TYPE_STM; - m_nSamples = 31; - m_nChannels = 4; - m_nInstruments = 0; - m_nMinPeriod = 64; - m_nMaxPeriod = 0x7FFF; - m_nDefaultSpeed = phdr->inittempo >> 4; - if (m_nDefaultSpeed < 1) m_nDefaultSpeed = 1; - m_nDefaultTempo = 125; - m_nDefaultGlobalVolume = phdr->globalvol << 2; - if (m_nDefaultGlobalVolume > 256) m_nDefaultGlobalVolume = 256; - memcpy(Order, phdr->patorder, 128); - // Setting up channels - for (UINT nSet=0; nSet<4; nSet++) - { - ChnSettings[nSet].dwFlags = 0; - ChnSettings[nSet].nVolume = 64; - ChnSettings[nSet].nPan = (nSet & 1) ? 0x40 : 0xC0; - } - // Reading samples - for (UINT nIns=0; nIns<31; nIns++) - { - MODINSTRUMENT *pIns = &Ins[nIns+1]; - STMSAMPLE *pStm = &phdr->sample[nIns]; // STM sample data - memcpy(pIns->name, pStm->filename, 13); - memcpy(m_szNames[nIns+1], pStm->filename, 12); - pIns->nC4Speed = bswapLE16(pStm->c2spd); - pIns->nGlobalVol = 64; - pIns->nVolume = pStm->volume << 2; - if (pIns->nVolume > 256) pIns->nVolume = 256; - pIns->nLength = bswapLE16(pStm->length); - if ((pIns->nLength < 4) || (!pIns->nVolume)) pIns->nLength = 0; - pIns->nLoopStart = bswapLE16(pStm->loopbeg); - pIns->nLoopEnd = bswapLE16(pStm->loopend); - if ((pIns->nLoopEnd > pIns->nLoopStart) && (pIns->nLoopEnd != 0xFFFF)) pIns->uFlags |= CHN_LOOP; - } - dwMemPos = sizeof(STMHEADER); - for (UINT nOrd=0; nOrd<MAX_ORDERS; nOrd++) if (Order[nOrd] >= 99) Order[nOrd] = 0xFF; - UINT nPatterns = phdr->numpat; - for (UINT nPat=0; nPat<nPatterns; nPat++) - { - if (dwMemPos + 64*4*4 > dwMemLength) return TRUE; - PatternSize[nPat] = 64; - PatternAllocSize[nPat] = 64; - if ((Patterns[nPat] = AllocatePattern(64, m_nChannels)) == NULL) return TRUE; - MODCOMMAND *m = Patterns[nPat]; - STMNOTE *p = (STMNOTE *)(lpStream + dwMemPos); - for (UINT n=0; n<64*4; n++, p++, m++) - { - UINT note,ins,vol,cmd; - // extract the various information from the 4 bytes that - // make up a single note - note = p->note; - ins = p->insvol >> 3; - vol = (p->insvol & 0x07) + (p->volcmd >> 1); - cmd = p->volcmd & 0x0F; - if ((ins) && (ins < 32)) m->instr = ins; - // special values of [SBYTE0] are handled here -> - // we have no idea if these strange values will ever be encountered - // but it appears as though stms sound correct. - if ((note == 0xFE) || (note == 0xFC)) m->note = 0xFE; else - // if note < 251, then all three bytes are stored in the file - if (note < 0xFC) m->note = (note >> 4)*12 + (note&0xf) + 37; - if (vol <= 64) { m->volcmd = VOLCMD_VOLUME; m->vol = vol; } - m->param = p->cmdinf; - switch(cmd) - { - // Axx set speed to xx - case 1: m->command = CMD_SPEED; m->param >>= 4; break; - // Bxx position jump - case 2: m->command = CMD_POSITIONJUMP; break; - // Cxx patternbreak to row xx - case 3: m->command = CMD_PATTERNBREAK; m->param = (m->param & 0xF0) * 10 + (m->param & 0x0F); break; - // Dxy volumeslide - case 4: m->command = CMD_VOLUMESLIDE; break; - // Exy toneslide down - case 5: m->command = CMD_PORTAMENTODOWN; break; - // Fxy toneslide up - case 6: m->command = CMD_PORTAMENTOUP; break; - // Gxx Tone portamento,speed xx - case 7: m->command = CMD_TONEPORTAMENTO; break; - // Hxy vibrato - case 8: m->command = CMD_VIBRATO; break; - // Ixy tremor, ontime x, offtime y - case 9: m->command = CMD_TREMOR; break; - // Jxy arpeggio - case 10: m->command = CMD_ARPEGGIO; break; - // Kxy Dual command H00 & Dxy - case 11: m->command = CMD_VIBRATOVOL; break; - // Lxy Dual command G00 & Dxy - case 12: m->command = CMD_TONEPORTAVOL; break; - // Xxx amiga command 8xx - case 0x18: m->command = CMD_PANNING8; break; - default: - m->command = m->param = 0; - } - } - dwMemPos += 64*4*4; - } - // Reading Samples - for (UINT nSmp=1; nSmp<=31; nSmp++) - { - MODINSTRUMENT *pIns = &Ins[nSmp]; - dwMemPos = (dwMemPos + 15) & (~15); - if (pIns->nLength) - { - UINT nPos = ((UINT)phdr->sample[nSmp-1].reserved) << 4; - if ((nPos >= sizeof(STMHEADER)) && (nPos+pIns->nLength <= dwMemLength)) dwMemPos = nPos; - if (dwMemPos < dwMemLength) - { - dwMemPos += ReadSample(pIns, RS_PCM8S, (LPSTR)(lpStream+dwMemPos),dwMemLength-dwMemPos); - } - } - } - return TRUE; -} -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_ult.cxx
Deleted
@@ -1,223 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -//#pragma warning(disable:4244) - -#define ULT_16BIT 0x04 -#define ULT_LOOP 0x08 -#define ULT_BIDI 0x10 - -#pragma pack(1) - -// Raw ULT header struct: -typedef struct tagULTHEADER -{ - char id[15]; // changed from CHAR - char songtitle[32]; // changed from CHAR - BYTE reserved; -} ULTHEADER; - - -// Raw ULT sampleinfo struct: -typedef struct tagULTSAMPLE -{ - CHAR samplename[32]; - CHAR dosname[12]; - LONG loopstart; - LONG loopend; - LONG sizestart; - LONG sizeend; - BYTE volume; - BYTE flags; - WORD finetune; -} ULTSAMPLE; - -#pragma pack() - - -BOOL CSoundFile::ReadUlt(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - ULTHEADER *pmh = (ULTHEADER *)lpStream; - ULTSAMPLE *pus; - UINT nos, nop; - DWORD dwMemPos = 0; - - // try to read module header - if ((!lpStream) || (dwMemLength < 0x100)) return FALSE; - if (strncmp(pmh->id,"MAS_UTrack_V00",14)) return FALSE; - // Warning! Not supported ULT format, trying anyway - // if ((pmh->id[14] < '1') || (pmh->id[14] > '4')) return FALSE; - m_nType = MOD_TYPE_ULT; - m_nDefaultSpeed = 6; - m_nDefaultTempo = 125; - memcpy(m_szNames[0], pmh->songtitle, 32); - // read songtext - dwMemPos = sizeof(ULTHEADER); - if ((pmh->reserved) && (dwMemPos + pmh->reserved * 32 < dwMemLength)) - { - UINT len = pmh->reserved * 32; - m_lpszSongComments = new char[len + 1 + pmh->reserved]; - if (m_lpszSongComments) - { - for (UINT l=0; l<pmh->reserved; l++) - { - memcpy(m_lpszSongComments+l*33, lpStream+dwMemPos+l*32, 32); - m_lpszSongComments[l*33+32] = 0x0D; - } - m_lpszSongComments[len] = 0; - } - dwMemPos += len; - } - if (dwMemPos >= dwMemLength) return TRUE; - nos = lpStream[dwMemPos++]; - m_nSamples = nos; - if (m_nSamples >= MAX_SAMPLES) m_nSamples = MAX_SAMPLES-1; - UINT smpsize = 64; - if (pmh->id[14] >= '4') smpsize += 2; - if (dwMemPos + nos*smpsize + 256 + 2 > dwMemLength) return TRUE; - for (UINT ins=1; ins<=nos; ins++, dwMemPos+=smpsize) if (ins<=m_nSamples) - { - pus = (ULTSAMPLE *)(lpStream+dwMemPos); - MODINSTRUMENT *pins = &Ins[ins]; - memcpy(m_szNames[ins], pus->samplename, 32); - memcpy(pins->name, pus->dosname, 12); - pins->nLoopStart = pus->loopstart; - pins->nLoopEnd = pus->loopend; - pins->nLength = pus->sizeend - pus->sizestart; - pins->nVolume = pus->volume; - pins->nGlobalVol = 64; - pins->nC4Speed = 8363; - if (pmh->id[14] >= '4') - { - pins->nC4Speed = pus->finetune; - } - if (pus->flags & ULT_LOOP) pins->uFlags |= CHN_LOOP; - if (pus->flags & ULT_BIDI) pins->uFlags |= CHN_PINGPONGLOOP; - if (pus->flags & ULT_16BIT) - { - pins->uFlags |= CHN_16BIT; - pins->nLoopStart >>= 1; - pins->nLoopEnd >>= 1; - } - } - memcpy(Order, lpStream+dwMemPos, 256); - dwMemPos += 256; - m_nChannels = lpStream[dwMemPos] + 1; - nop = lpStream[dwMemPos+1] + 1; - dwMemPos += 2; - if (m_nChannels > 32) m_nChannels = 32; - // Default channel settings - for (UINT nSet=0; nSet<m_nChannels; nSet++) - { - ChnSettings[nSet].nVolume = 64; - ChnSettings[nSet].nPan = (nSet & 1) ? 0x40 : 0xC0; - } - // read pan position table for v1.5 and higher - if(pmh->id[14]>='3') - { - if (dwMemPos + m_nChannels > dwMemLength) return TRUE; - for(UINT t=0; t<m_nChannels; t++) - { - ChnSettings[t].nPan = (lpStream[dwMemPos++] << 4) + 8; - if (ChnSettings[t].nPan > 256) ChnSettings[t].nPan = 256; - } - } - // Allocating Patterns - for (UINT nAllocPat=0; nAllocPat<nop; nAllocPat++) - { - if (nAllocPat < MAX_PATTERNS) - { - PatternSize[nAllocPat] = 64; - PatternAllocSize[nAllocPat] = 64; - Patterns[nAllocPat] = AllocatePattern(64, m_nChannels); - } - } - // Reading Patterns - for (UINT nChn=0; nChn<m_nChannels; nChn++) - { - for (UINT nPat=0; nPat<nop; nPat++) - { - MODCOMMAND *pat = NULL; - - if (nPat < MAX_PATTERNS) - { - pat = Patterns[nPat]; - if (pat) pat += nChn; - } - UINT row = 0; - while (row < 64) - { - if (dwMemPos + 6 > dwMemLength) return TRUE; - UINT rep = 1; - UINT note = lpStream[dwMemPos++]; - if (note == 0xFC) - { - rep = lpStream[dwMemPos]; - note = lpStream[dwMemPos+1]; - dwMemPos += 2; - } - UINT instr = lpStream[dwMemPos++]; - UINT eff = lpStream[dwMemPos++]; - UINT dat1 = lpStream[dwMemPos++]; - UINT dat2 = lpStream[dwMemPos++]; - UINT cmd1 = eff & 0x0F; - UINT cmd2 = eff >> 4; - if (cmd1 == 0x0C) dat1 >>= 2; else - if (cmd1 == 0x0B) { cmd1 = dat1 = 0; } - if (cmd2 == 0x0C) dat2 >>= 2; else - if (cmd2 == 0x0B) { cmd2 = dat2 = 0; } - while ((rep != 0) && (row < 64)) - { - if (pat) - { - pat->instr = instr; - if (note) pat->note = note + 36; - if (cmd1 | dat1) - { - if (cmd1 == 0x0C) - { - pat->volcmd = VOLCMD_VOLUME; - pat->vol = dat1; - } else - { - pat->command = cmd1; - pat->param = dat1; - ConvertModCommand(pat); - } - } - if (cmd2 == 0x0C) - { - pat->volcmd = VOLCMD_VOLUME; - pat->vol = dat2; - } else
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_umx.cxx
Deleted
@@ -1,53 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -#define MODMAGIC_OFFSET (20+31*30+130) - - -BOOL CSoundFile::ReadUMX(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - if ((!lpStream) || (dwMemLength < 0x800)) return FALSE; - // Rip Mods from UMX - if ((bswapLE32(*((DWORD *)(lpStream+0x20))) < dwMemLength) - && (bswapLE32(*((DWORD *)(lpStream+0x18))) <= dwMemLength - 0x10) - && (bswapLE32(*((DWORD *)(lpStream+0x18))) >= dwMemLength - 0x200)) - { - for (UINT uscan=0x40; uscan<0x500; uscan++) - { - DWORD dwScan = bswapLE32(*((DWORD *)(lpStream+uscan))); - // IT - if (dwScan == 0x4D504D49) - { - DWORD dwRipOfs = uscan; - return ReadIT(lpStream + dwRipOfs, dwMemLength - dwRipOfs); - } - // S3M - if (dwScan == 0x4D524353) - { - DWORD dwRipOfs = uscan - 44; - return ReadS3M(lpStream + dwRipOfs, dwMemLength - dwRipOfs); - } - // XM - if (!strnicmp((LPCSTR)(lpStream+uscan), "Extended Module", 15)) - { - DWORD dwRipOfs = uscan; - return ReadXM(lpStream + dwRipOfs, dwMemLength - dwRipOfs); - } - // MOD - if ((uscan > MODMAGIC_OFFSET) && (dwScan == 0x2e4b2e4d)) - { - DWORD dwRipOfs = uscan - MODMAGIC_OFFSET; - return ReadMod(lpStream+dwRipOfs, dwMemLength-dwRipOfs); - } - } - } - return FALSE; -} -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_wav.cxx
Deleted
@@ -1,248 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -#ifndef WAVE_FORMAT_EXTENSIBLE -#define WAVE_FORMAT_EXTENSIBLE 0xFFFE -#endif - -///////////////////////////////////////////////////////////// -// WAV file support - -BOOL CSoundFile::ReadWav(const BYTE *lpStream, DWORD dwMemLength) -//--------------------------------------------------------------- -{ - DWORD dwMemPos = 0; - WAVEFILEHEADER phdr; - WAVEFORMATHEADER pfmt; - - if ((!lpStream) - || (dwMemLength < (DWORD)(sizeof(WAVEFORMATHEADER)+sizeof(WAVEFILEHEADER)))) - return FALSE; - - memcpy(&phdr, lpStream, sizeof(phdr)); - memcpy(&pfmt, lpStream+sizeof(phdr), sizeof(pfmt)); - - phdr.id_RIFF = bswapLE32(phdr.id_RIFF); - phdr.filesize = bswapLE32(phdr.filesize); - phdr.id_WAVE = bswapLE32(phdr.id_WAVE); - - pfmt.id_fmt = bswapLE32(pfmt.id_fmt); - pfmt.hdrlen = bswapLE32(pfmt.hdrlen); - pfmt.format = bswapLE16(pfmt.format); - pfmt.channels = bswapLE16(pfmt.channels); - pfmt.freqHz = bswapLE32(pfmt.freqHz); - pfmt.bytessec = bswapLE32(pfmt.bytessec); - pfmt.samplesize = bswapLE16(pfmt.samplesize); - pfmt.bitspersample = bswapLE16(pfmt.bitspersample); - - if ((phdr.id_RIFF != IFFID_RIFF) || (phdr.id_WAVE != IFFID_WAVE) - || (pfmt.id_fmt != IFFID_fmt)) return FALSE; - - dwMemPos = sizeof(WAVEFILEHEADER) + 8 + pfmt.hdrlen; - - if ((dwMemPos + 8 >= dwMemLength) - || ((pfmt.format != WAVE_FORMAT_PCM) && (pfmt.format != WAVE_FORMAT_EXTENSIBLE)) - || (pfmt.channels > 4) - || (!pfmt.channels) - || (!pfmt.freqHz) - || (pfmt.bitspersample & 7) - || (pfmt.bitspersample < 8) - || (pfmt.bitspersample > 32)) return FALSE; - - WAVEDATAHEADER pdata; - - for (;;) - { - memcpy(&pdata, lpStream+dwMemPos, sizeof(pdata)); - pdata.id_data = bswapLE32(pdata.id_data); - pdata.length = bswapLE32(pdata.length); - - if (pdata.id_data == IFFID_data) break; - dwMemPos += pdata.length + 8; - if (dwMemPos + 8 >= dwMemLength) return FALSE; - } - m_nType = MOD_TYPE_WAV; - m_nSamples = 0; - m_nInstruments = 0; - m_nChannels = 4; - m_nDefaultSpeed = 8; - m_nDefaultTempo = 125; - m_dwSongFlags |= SONG_LINEARSLIDES; // For no resampling - Order[0] = 0; - Order[1] = 0xFF; - PatternSize[0] = PatternSize[1] = 64; - PatternAllocSize[0] = PatternAllocSize[1] = 64; - if ((Patterns[0] = AllocatePattern(64, 4)) == NULL) return TRUE; - if ((Patterns[1] = AllocatePattern(64, 4)) == NULL) return TRUE; - UINT samplesize = (pfmt.channels * pfmt.bitspersample) >> 3; - UINT len = pdata.length, bytelen; - if (dwMemPos + len > dwMemLength - 8) len = dwMemLength - dwMemPos - 8; - len /= samplesize; - bytelen = len; - if (pfmt.bitspersample >= 16) bytelen *= 2; - if (len > MAX_SAMPLE_LENGTH) len = MAX_SAMPLE_LENGTH; - if (!len) return TRUE; - // Setting up module length - DWORD dwTime = ((len * 50) / pfmt.freqHz) + 1; - DWORD framesperrow = (dwTime + 63) / 63; - if (framesperrow < 4) framesperrow = 4; - UINT norders = 1; - while (framesperrow >= 0x20) - { - Order[norders++] = 1; - Order[norders] = 0xFF; - framesperrow = (dwTime + (64 * norders - 1)) / (64 * norders); - if (norders >= MAX_ORDERS-1) break; - } - m_nDefaultSpeed = framesperrow; - for (UINT iChn=0; iChn<4; iChn++) - { - ChnSettings[iChn].nPan = (iChn & 1) ? 256 : 0; - ChnSettings[iChn].nVolume = 64; - ChnSettings[iChn].dwFlags = 0; - } - // Setting up speed command - MODCOMMAND *pcmd = Patterns[0]; - pcmd[0].command = CMD_SPEED; - pcmd[0].param = (BYTE)m_nDefaultSpeed; - pcmd[0].note = 5*12+1; - pcmd[0].instr = 1; - pcmd[1].note = pcmd[0].note; - pcmd[1].instr = pcmd[0].instr; - m_nSamples = pfmt.channels; - // Support for Multichannel Wave - for (UINT nChn=0; nChn<m_nSamples; nChn++) - { - MODINSTRUMENT *pins = &Ins[nChn+1]; - pcmd[nChn].note = pcmd[0].note; - pcmd[nChn].instr = (BYTE)(nChn+1); - pins->nLength = len; - pins->nC4Speed = pfmt.freqHz; - pins->nVolume = 256; - pins->nPan = 128; - pins->nGlobalVol = 64; - pins->uFlags = (WORD)((pfmt.bitspersample >= 16) ? CHN_16BIT : 0); - pins->uFlags |= CHN_PANNING; - if (m_nSamples > 1) - { - switch(nChn) - { - case 0: pins->nPan = 0; break; - case 1: pins->nPan = 256; break; - case 2: pins->nPan = (WORD)((m_nSamples == 3) ? 128 : 64); pcmd[nChn].command = CMD_S3MCMDEX; pcmd[nChn].param = 0x91; break; - case 3: pins->nPan = 192; pcmd[nChn].command = CMD_S3MCMDEX; pcmd[nChn].param = 0x91; break; - default: pins->nPan = 128; break; - } - } - if ((pins->pSample = AllocateSample(bytelen+8)) == NULL) return TRUE; - if (pfmt.bitspersample >= 16) - { - int slsize = pfmt.bitspersample >> 3; - signed short *p = (signed short *)pins->pSample; - signed char *psrc = (signed char *)(lpStream+dwMemPos+8+nChn*slsize+slsize-2); - for (UINT i=0; i<len; i++) - { - p[i] = bswapLE16(*((signed short *)psrc)); - psrc += samplesize; - } - p[len+1] = p[len] = p[len-1]; - } else - { - signed char *p = (signed char *)pins->pSample; - signed char *psrc = (signed char *)(lpStream+dwMemPos+8+nChn); - for (UINT i=0; i<len; i++) - { - p[i] = (signed char)((*psrc) + 0x80); - psrc += samplesize; - } - p[len+1] = p[len] = p[len-1]; - } - } - return TRUE; -} - - -//////////////////////////////////////////////////////////////////////// -// IMA ADPCM Support - -#pragma pack(1) - -typedef struct IMAADPCMBLOCK -{ - WORD sample; - BYTE index; - BYTE Reserved; -} DVI_ADPCMBLOCKHEADER; - -#pragma pack() - -static const int gIMAUnpackTable[90] = -{ - 7, 8, 9, 10, 11, 12, 13, 14, - 16, 17, 19, 21, 23, 25, 28, 31, - 34, 37, 41, 45, 50, 55, 60, 66, - 73, 80, 88, 97, 107, 118, 130, 143, - 157, 173, 190, 209, 230, 253, 279, 307, - 337, 371, 408, 449, 494, 544, 598, 658, - 724, 796, 876, 963, 1060, 1166, 1282, 1411, - 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, - 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, - 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, - 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, - 32767, 0 -};
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/load_xm.cxx
Deleted
@@ -1,529 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#include "stdafx.h" -#include "sndfile.h" - -//////////////////////////////////////////////////////// -// FastTracker II XM file support - -#ifdef MSC_VER -#pragma warning(disable:4244) -#endif - -#pragma pack(1) -typedef struct tagXMFILEHEADER -{ - DWORD size; - WORD norder; - WORD restartpos; - WORD channels; - WORD patterns; - WORD instruments; - WORD flags; - WORD speed; - WORD tempo; - BYTE order[256]; -} XMFILEHEADER; - - -typedef struct tagXMINSTRUMENTHEADER -{ - DWORD size; - CHAR name[22]; - BYTE type; - BYTE samples; - BYTE samplesh; -} XMINSTRUMENTHEADER; - - -typedef struct tagXMSAMPLEHEADER -{ - DWORD shsize; - BYTE snum[96]; - WORD venv[24]; - WORD penv[24]; - BYTE vnum, pnum; - BYTE vsustain, vloops, vloope, psustain, ploops, ploope; - BYTE vtype, ptype; - BYTE vibtype, vibsweep, vibdepth, vibrate; - WORD volfade; - WORD res; - BYTE reserved1[20]; -} XMSAMPLEHEADER; - -typedef struct tagXMSAMPLESTRUCT -{ - DWORD samplen; - DWORD loopstart; - DWORD looplen; - BYTE vol; - signed char finetune; - BYTE type; - BYTE pan; - signed char relnote; - BYTE res; - char name[22]; -} XMSAMPLESTRUCT; -#pragma pack() - - -BOOL CSoundFile::ReadXM(const BYTE *lpStream, DWORD dwMemLength) -//-------------------------------------------------------------- -{ - XMSAMPLEHEADER xmsh; - XMSAMPLESTRUCT xmss; - DWORD dwMemPos, dwHdrSize; - WORD norders=0, restartpos=0, channels=0, patterns=0, instruments=0; - WORD xmflags=0, deftempo=125, defspeed=6; - BOOL InstUsed[256]; - BYTE channels_used[MAX_CHANNELS]; - BYTE pattern_map[256]; - BOOL samples_used[MAX_SAMPLES]; - UINT unused_samples; - - m_nChannels = 0; - if ((!lpStream) || (dwMemLength < 0x200)) return FALSE; - if (strnicmp((LPCSTR)lpStream, "Extended Module", 15)) return FALSE; - - memcpy(m_szNames[0], lpStream+17, 20); - dwHdrSize = bswapLE32(*((DWORD *)(lpStream+60))); - norders = bswapLE16(*((WORD *)(lpStream+64))); - if (norders > MAX_ORDERS) return FALSE; - restartpos = bswapLE16(*((WORD *)(lpStream+66))); - channels = bswapLE16(*((WORD *)(lpStream+68))); - if (channels > 64) return FALSE; - m_nType = MOD_TYPE_XM; - m_nMinPeriod = 27; - m_nMaxPeriod = 54784; - m_nChannels = channels; - if (restartpos < norders) m_nRestartPos = restartpos; - patterns = bswapLE16(*((WORD *)(lpStream+70))); - if (patterns > 256) patterns = 256; - instruments = bswapLE16(*((WORD *)(lpStream+72))); - if (instruments >= MAX_INSTRUMENTS) instruments = MAX_INSTRUMENTS-1; - m_nInstruments = instruments; - m_dwSongFlags |= SONG_INSTRUMENTMODE; - m_nSamples = 0; - memcpy(&xmflags, lpStream+74, 2); - xmflags = bswapLE16(xmflags); - if (xmflags & 1) m_dwSongFlags |= SONG_LINEARSLIDES; - if (xmflags & 0x1000) m_dwSongFlags |= SONG_EXFILTERRANGE; - defspeed = bswapLE16(*((WORD *)(lpStream+76))); - deftempo = bswapLE16(*((WORD *)(lpStream+78))); - if ((deftempo >= 32) && (deftempo < 256)) m_nDefaultTempo = deftempo; - if ((defspeed > 0) && (defspeed < 40)) m_nDefaultSpeed = defspeed; - memcpy(Order, lpStream+80, norders); - memset(InstUsed, 0, sizeof(InstUsed)); - if (patterns > MAX_PATTERNS) - { - UINT i, j; - for (i=0; i<norders; i++) - { - if (Order[i] < patterns) InstUsed[Order[i]] = TRUE; - } - j = 0; - for (i=0; i<256; i++) - { - if (InstUsed[i]) pattern_map[i] = j++; - } - for (i=0; i<256; i++) - { - if (!InstUsed[i]) - { - pattern_map[i] = (j < MAX_PATTERNS) ? j : 0xFE; - j++; - } - } - for (i=0; i<norders; i++) - { - Order[i] = pattern_map[Order[i]]; - } - } else - { - for (UINT i=0; i<256; i++) pattern_map[i] = i; - } - memset(InstUsed, 0, sizeof(InstUsed)); - dwMemPos = dwHdrSize + 60; - if (dwMemPos + 8 >= dwMemLength) return TRUE; - // Reading patterns - memset(channels_used, 0, sizeof(channels_used)); - for (UINT ipat=0; ipat<patterns; ipat++) - { - UINT ipatmap = pattern_map[ipat]; - DWORD dwSize = 0; - WORD rows=64, packsize=0; - dwSize = bswapLE32(*((DWORD *)(lpStream+dwMemPos))); - while ((dwMemPos + dwSize >= dwMemLength) || (dwSize & 0xFFFFFF00)) - { - if (dwMemPos + 4 >= dwMemLength) break; - dwMemPos++; - dwSize = bswapLE32(*((DWORD *)(lpStream+dwMemPos))); - } - rows = bswapLE16(*((WORD *)(lpStream+dwMemPos+5))); - if ((!rows) || (rows > 256)) rows = 64; - packsize = bswapLE16(*((WORD *)(lpStream+dwMemPos+7))); - if (dwMemPos + dwSize + 4 > dwMemLength) return TRUE; - dwMemPos += dwSize; - if (dwMemPos + packsize + 4 > dwMemLength) return TRUE; - MODCOMMAND *p; - if (ipatmap < MAX_PATTERNS) - { - PatternSize[ipatmap] = rows; - PatternAllocSize[ipatmap] = rows; - if ((Patterns[ipatmap] = AllocatePattern(rows, m_nChannels)) == NULL) return TRUE; - if (!packsize) continue; - p = Patterns[ipatmap]; - } else p = NULL; - const BYTE *src = lpStream+dwMemPos; - UINT j=0; - for (UINT row=0; row<rows; row++) - { - for (UINT chn=0; chn<m_nChannels; chn++) - { - if ((p) && (j < packsize)) - { - BYTE b = src[j++]; - UINT vol = 0; - if (b & 0x80) - { - if (b & 1) p->note = src[j++]; - if (b & 2) p->instr = src[j++]; - if (b & 4) vol = src[j++]; - if (b & 8) p->command = src[j++]; - if (b & 16) p->param = src[j++]; - } else
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/midi.h
Deleted
@@ -1,185 +0,0 @@ -/* - * Schism Tracker - a cross-platform Impulse Tracker clone - * copyright (c) 2003-2005 chisel <schism@chisel.cjb.net> - * copyright (c) 2005-2006 Mrs. Brisby <mrs.brisby@nimh.org> - * URL: http://nimh.org/schism/ - * URL: http://rigelseven.com/schism/ - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef MIDI_H -#define MIDI_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct midi_provider; -struct midi_port; - -struct midi_driver { - unsigned int flags; -#define MIDI_PORT_CAN_SCHEDULE 1 - - void (*poll)(struct midi_provider *m); - int (*thread)(struct midi_provider *m); - - int (*enable)(struct midi_port *d); - int (*disable)(struct midi_port *d); - - void (*send)(struct midi_port *d, - unsigned char *seq, unsigned int len, unsigned int delay); - void (*drain)(struct midi_port *d); -}; - -struct midi_provider { - const char *name; - void (*poll)(struct midi_provider *); - void *thread; /*actually SDL_Thread* */ - - struct midi_provider *next; - - /* forwarded; don't touch */ - int (*enable)(struct midi_port *d); - int (*disable)(struct midi_port *d); - - void (*send_now)(struct midi_port *d, - unsigned char *seq, unsigned int len, unsigned int delay); - void (*send_later)(struct midi_port *d, - unsigned char *seq, unsigned int len, unsigned int delay); - void (*drain)(struct midi_port *d); -}; -struct midi_port { - int io, iocap; -#define MIDI_INPUT 1 -#define MIDI_OUTPUT 2 - char *name; - int num; - - void *userdata; - int free_userdata; - int (*enable)(struct midi_port *d); - int (*disable)(struct midi_port *d); - void (*send_now)(struct midi_port *d, - unsigned char *seq, unsigned int len, unsigned int delay); - void (*send_later)(struct midi_port *d, - unsigned char *seq, unsigned int len, unsigned int delay); - void (*drain)(struct midi_port *d); - - struct midi_provider *provider; -}; - - -/* schism calls these directly */ -int midi_engine_start(void); -void midi_engine_reset(void); -void midi_engine_stop(void); -void midi_engine_poll_ports(void); - -/* some parts of schism call this; it means "immediately" */ -void midi_send_now(unsigned char *seq, unsigned int len); - -/* ... but the player calls this */ -void midi_send_buffer(unsigned char *data, unsigned int len, unsigned int pos); -void midi_send_flush(void); - -/* from the SDL event mechanism (x is really SDL_Event) */ -int midi_engine_handle_event(void *x); - -struct midi_port *midi_engine_port(int n, const char **name); -int midi_engine_port_count(void); - -/* midi engines register a provider (one each!) */ -struct midi_provider *midi_provider_register(const char *name, struct midi_driver *f); - - -/* midi engines list ports this way */ -int midi_port_register(struct midi_provider *p, -int inout, const char *name, void *userdata, int free_userdata); - -int midi_port_foreach(struct midi_provider *p, struct midi_port **cursor); -void midi_port_unregister(int num); - -/* only call these if the event isn't really MIDI but you want most of the system - to act like it is... - - midi drivers should never all these... -*/ -enum midi_note { - MIDI_NOTEOFF, - MIDI_NOTEON, - MIDI_KEYPRESS, -}; -void midi_event_note(enum midi_note mnstatus, int channel, int note, int velocity); -void midi_event_controller(int channel, int param, int value); -void midi_event_program(int channel, int value); -void midi_event_aftertouch(int channel, int value); -void midi_event_pitchbend(int channel, int value); -void midi_event_tick(void); -void midi_event_sysex(const unsigned char *data, unsigned int len); -void midi_event_system(int argv, int param); - -/* midi drivers call this when they received an event */ -void midi_received_cb(struct midi_port *src, unsigned char *data, unsigned int len); - - -#ifdef USE_NETWORK -int ip_midi_setup(void); -#endif -#ifdef USE_OSS -int oss_midi_setup(void); -#endif -#ifdef USE_ALSA -int alsa_midi_setup(void); -#endif -#ifdef USE_WIN32MM -int win32mm_midi_setup(void); -#endif -#ifdef MACOSX -int macosx_midi_setup(void); -#endif - - - -#define MIDI_TICK_QUANTIZE 0x00000001 -#define MIDI_BASE_PROGRAM1 0x00000002 -#define MIDI_RECORD_NOTEOFF 0x00000004 -#define MIDI_RECORD_VELOCITY 0x00000008 -#define MIDI_RECORD_AFTERTOUCH 0x00000010 -#define MIDI_CUT_NOTE_OFF 0x00000020 -#define MIDI_PITCH_BEND 0x00000040 -#define MIDI_EMBED_DATA 0x00000080 -#define MIDI_RECORD_SDX 0x00000100 -#define MIDI_DISABLE_RECORD 0x00010000 - -/* configurable midi stuff */ -int midi_flags = MIDI_TICK_QUANTIZE | MIDI_RECORD_NOTEOFF - | MIDI_RECORD_VELOCITY | MIDI_RECORD_AFTERTOUCH - | MIDI_PITCH_BEND; - -int midi_pitch_depth = 12; -int midi_amplification = 100; -int midi_c5note = 60; - -/* only available with networks */ -void ip_midi_setports(int n); -int ip_midi_getports(void); - -#ifdef __cplusplus -}; -#endif - -#endif
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/mmcmp.cxx
Deleted
@@ -1,406 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -BOOL PP20_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength); - -typedef struct MMCMPFILEHEADER -{ - DWORD id_ziRC; // "ziRC" - DWORD id_ONia; // "ONia" - WORD hdrsize; -} MMCMPFILEHEADER, *LPMMCMPFILEHEADER; - -typedef struct MMCMPHEADER -{ - WORD version; - WORD nblocks; - DWORD filesize; - DWORD blktable; - BYTE glb_comp; - BYTE fmt_comp; -} MMCMPHEADER, *LPMMCMPHEADER; - -typedef struct MMCMPBLOCK -{ - DWORD unpk_size; - DWORD pk_size; - DWORD xor_chk; - WORD sub_blk; - WORD flags; - WORD tt_entries; - WORD num_bits; -} MMCMPBLOCK, *LPMMCMPBLOCK; - -typedef struct MMCMPSUBBLOCK -{ - DWORD unpk_pos; - DWORD unpk_size; -} MMCMPSUBBLOCK, *LPMMCMPSUBBLOCK; - -#define MMCMP_COMP 0x0001 -#define MMCMP_DELTA 0x0002 -#define MMCMP_16BIT 0x0004 -#define MMCMP_STEREO 0x0100 -#define MMCMP_ABS16 0x0200 -#define MMCMP_ENDIAN 0x0400 - -typedef struct MMCMPBITBUFFER -{ - UINT bitcount; - DWORD bitbuffer; - LPCBYTE pSrc; - LPCBYTE pEnd; - - DWORD GetBits(UINT nBits); -} MMCMPBITBUFFER; - - -DWORD MMCMPBITBUFFER::GetBits(UINT nBits) -//--------------------------------------- -{ - DWORD d; - if (!nBits) return 0; - while (bitcount < 24) - { - bitbuffer |= ((pSrc < pEnd) ? *pSrc++ : 0) << bitcount; - bitcount += 8; - } - d = bitbuffer & ((1 << nBits) - 1); - bitbuffer >>= nBits; - bitcount -= nBits; - return d; -} - -//#define MMCMP_LOG - -#ifdef MMCMP_LOG -extern void Log(LPCSTR s, ...); -#endif - -const DWORD MMCMP8BitCommands[8] = -{ - 0x01, 0x03, 0x07, 0x0F, 0x1E, 0x3C, 0x78, 0xF8 -}; - -const UINT MMCMP8BitFetch[8] = -{ - 3, 3, 3, 3, 2, 1, 0, 0 -}; - -const DWORD MMCMP16BitCommands[16] = -{ - 0x01, 0x03, 0x07, 0x0F, 0x1E, 0x3C, 0x78, 0xF0, - 0x1F0, 0x3F0, 0x7F0, 0xFF0, 0x1FF0, 0x3FF0, 0x7FF0, 0xFFF0 -}; - -const UINT MMCMP16BitFetch[16] = -{ - 4, 4, 4, 4, 3, 2, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - - -BOOL MMCMP_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength) -//--------------------------------------------------------- -{ - DWORD dwMemLength = *pdwMemLength; - LPCBYTE lpMemFile = *ppMemFile; - LPBYTE pBuffer; - LPMMCMPFILEHEADER pmfh = (LPMMCMPFILEHEADER)(lpMemFile); - LPMMCMPHEADER pmmh = (LPMMCMPHEADER)(lpMemFile+10); - LPDWORD pblk_table; - DWORD dwFileSize; - - if (PP20_Unpack(ppMemFile, pdwMemLength)) - { - return TRUE; - } - if ((dwMemLength < 256) || (!pmfh) || (pmfh->id_ziRC != 0x4352697A) || (pmfh->id_ONia != 0x61694e4f) || (pmfh->hdrsize < 14) - || (!pmmh->nblocks) || (pmmh->filesize < 16) || (pmmh->filesize > 0x8000000) - || (pmmh->blktable >= dwMemLength) || (pmmh->blktable + 4*pmmh->nblocks > dwMemLength)) return FALSE; - dwFileSize = pmmh->filesize; - if ((pBuffer = (LPBYTE)GlobalAllocPtr(GHND, (dwFileSize + 31) & ~15)) == NULL) return FALSE; - pblk_table = (LPDWORD)(lpMemFile+pmmh->blktable); - for (UINT nBlock=0; nBlock<pmmh->nblocks; nBlock++) - { - DWORD dwMemPos = pblk_table[nBlock]; - LPMMCMPBLOCK pblk = (LPMMCMPBLOCK)(lpMemFile+dwMemPos); - LPMMCMPSUBBLOCK psubblk = (LPMMCMPSUBBLOCK)(lpMemFile+dwMemPos+20); - - if ((dwMemPos + 20 >= dwMemLength) || (dwMemPos + 20 + pblk->sub_blk*8 >= dwMemLength)) break; - dwMemPos += 20 + pblk->sub_blk*8; -#ifdef MMCMP_LOG - Log("block %d: flags=%04X sub_blocks=%d", nBlock, (UINT)pblk->flags, (UINT)pblk->sub_blk); - Log(" pksize=%d unpksize=%d", pblk->pk_size, pblk->unpk_size); - Log(" tt_entries=%d num_bits=%d\n", pblk->tt_entries, pblk->num_bits); -#endif - // Data is not packed - if (!(pblk->flags & MMCMP_COMP)) - { - for (UINT i=0; i<pblk->sub_blk; i++) - { - if ((psubblk->unpk_pos > dwFileSize) || (psubblk->unpk_pos + psubblk->unpk_size > dwFileSize)) break; -#ifdef MMCMP_LOG - Log(" Unpacked sub-block %d: offset %d, size=%d\n", i, psubblk->unpk_pos, psubblk->unpk_size); -#endif - memcpy(pBuffer+psubblk->unpk_pos, lpMemFile+dwMemPos, psubblk->unpk_size); - dwMemPos += psubblk->unpk_size; - psubblk++; - } - } else - // Data is 16-bit packed - if (pblk->flags & MMCMP_16BIT) - { - MMCMPBITBUFFER bb; - LPWORD pDest = (LPWORD)(pBuffer + psubblk->unpk_pos); - DWORD dwSize = psubblk->unpk_size >> 1; - DWORD dwPos = 0; - UINT numbits = pblk->num_bits; - UINT subblk = 0, oldval = 0; - -#ifdef MMCMP_LOG - Log(" 16-bit block: pos=%d size=%d ", psubblk->unpk_pos, psubblk->unpk_size); - if (pblk->flags & MMCMP_DELTA) Log("DELTA "); - if (pblk->flags & MMCMP_ABS16) Log("ABS16 "); - Log("\n"); -#endif - bb.bitcount = 0; - bb.bitbuffer = 0; - bb.pSrc = lpMemFile+dwMemPos+pblk->tt_entries; - bb.pEnd = lpMemFile+dwMemPos+pblk->pk_size; - while (subblk < pblk->sub_blk) - { - UINT newval = 0x10000; - DWORD d = bb.GetBits(numbits+1); - - if (d >= MMCMP16BitCommands[numbits]) - { - UINT nFetch = MMCMP16BitFetch[numbits]; - UINT newbits = bb.GetBits(nFetch) + ((d - MMCMP16BitCommands[numbits]) << nFetch); - if (newbits != numbits) - { - numbits = newbits & 0x0F; - } else - { - if ((d = bb.GetBits(4)) == 0x0F) - { - if (bb.GetBits(1)) break; - newval = 0xFFFF; - } else - { - newval = 0xFFF0 + d; - } - }
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/snd_dsp.cxx
Deleted
@@ -1,491 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -#ifdef MODPLUG_FASTSOUNDLIB -#define MODPLUG_NO_REVERB -#endif - - -// Delayed Surround Filters -#ifndef MODPLUG_FASTSOUNDLIB -#define nDolbyHiFltAttn 6 -#define nDolbyHiFltMask 3 -#define DOLBYATTNROUNDUP 31 -#else -#define nDolbyHiFltAttn 3 -#define nDolbyHiFltMask 3 -#define DOLBYATTNROUNDUP 3 -#endif - -// Bass Expansion -#define XBASS_DELAY 14 // 2.5 ms - -// Buffer Sizes -#define XBASSBUFFERSIZE 64 // 2 ms at 50KHz -#define FILTERBUFFERSIZE 64 // 1.25 ms -#define SURROUNDBUFFERSIZE ((MAX_SAMPLE_RATE * 50) / 1000) -#define REVERBBUFFERSIZE ((MAX_SAMPLE_RATE * 200) / 1000) -#define REVERBBUFFERSIZE2 ((REVERBBUFFERSIZE*13) / 17) -#define REVERBBUFFERSIZE3 ((REVERBBUFFERSIZE*7) / 13) -#define REVERBBUFFERSIZE4 ((REVERBBUFFERSIZE*7) / 19) - - -// DSP Effects: PUBLIC members -UINT CSoundFile::m_nXBassDepth = 6; -UINT CSoundFile::m_nXBassRange = XBASS_DELAY; -UINT CSoundFile::m_nReverbDepth = 1; -UINT CSoundFile::m_nReverbDelay = 100; -UINT CSoundFile::m_nProLogicDepth = 12; -UINT CSoundFile::m_nProLogicDelay = 20; - -void (*CSoundFile::_midi_out_note)(int chan, const MODCOMMAND *m) = NULL; -void (*CSoundFile::_midi_out_raw)(unsigned char *,unsigned int, unsigned int) = NULL; - -//////////////////////////////////////////////////////////////////// -// DSP Effects internal state - -// Bass Expansion: low-pass filter -static LONG nXBassSum = 0; -static LONG nXBassBufferPos = 0; -static LONG nXBassDlyPos = 0; -static LONG nXBassMask = 0; - -// Noise Reduction: simple low-pass filter -static LONG nLeftNR = 0; -static LONG nRightNR = 0; - -// Surround Encoding: 1 delay line + low-pass filter + high-pass filter -static LONG nSurroundSize = 0; -static LONG nSurroundPos = 0; -static LONG nDolbyDepth = 0; -static LONG nDolbyLoDlyPos = 0; -static LONG nDolbyLoFltPos = 0; -static LONG nDolbyLoFltSum = 0; -static LONG nDolbyHiFltPos = 0; -static LONG nDolbyHiFltSum = 0; - -// Reverb: 4 delay lines + high-pass filter + low-pass filter -#ifndef MODPLUG_NO_REVERB -static LONG nReverbSize = 0; -static LONG nReverbBufferPos = 0; -static LONG nReverbSize2 = 0; -static LONG nReverbBufferPos2 = 0; -static LONG nReverbSize3 = 0; -static LONG nReverbBufferPos3 = 0; -static LONG nReverbSize4 = 0; -static LONG nReverbBufferPos4 = 0; -static LONG nReverbLoFltSum = 0; -static LONG nReverbLoFltPos = 0; -static LONG nReverbLoDlyPos = 0; -static LONG nFilterAttn = 0; -static LONG gRvbLowPass[8]; -static LONG gRvbLPPos = 0; -static LONG gRvbLPSum = 0; -static LONG ReverbLoFilterBuffer[XBASSBUFFERSIZE]; -static LONG ReverbLoFilterDelay[XBASSBUFFERSIZE]; -static LONG ReverbBuffer[REVERBBUFFERSIZE]; -static LONG ReverbBuffer2[REVERBBUFFERSIZE2]; -static LONG ReverbBuffer3[REVERBBUFFERSIZE3]; -static LONG ReverbBuffer4[REVERBBUFFERSIZE4]; -#endif -static LONG XBassBuffer[XBASSBUFFERSIZE]; -static LONG XBassDelay[XBASSBUFFERSIZE]; -static LONG DolbyLoFilterBuffer[XBASSBUFFERSIZE]; -static LONG DolbyLoFilterDelay[XBASSBUFFERSIZE]; -static LONG DolbyHiFilterBuffer[FILTERBUFFERSIZE]; -static LONG SurroundBuffer[SURROUNDBUFFERSIZE]; - -// Access the main temporary mix buffer directly: avoids an extra pointer -extern int MixSoundBuffer[MIXBUFFERSIZE*2]; -//cextern int MixReverbBuffer[MIXBUFFERSIZE*2]; -extern int MixReverbBuffer[MIXBUFFERSIZE*2]; - -static UINT GetMaskFromSize(UINT len) -//----------------------------------- -{ - UINT n = 2; - while (n <= len) n <<= 1; - return ((n >> 1) - 1); -} - - -void CSoundFile::InitializeDSP(BOOL bReset) -//----------------------------------------- -{ - if (!m_nReverbDelay) m_nReverbDelay = 100; - if (!m_nXBassRange) m_nXBassRange = XBASS_DELAY; - if (!m_nProLogicDelay) m_nProLogicDelay = 20; - if (m_nXBassDepth > 8) m_nXBassDepth = 8; - if (m_nXBassDepth < 2) m_nXBassDepth = 2; - if (bReset) - { - // Noise Reduction - nLeftNR = nRightNR = 0; - } - // Pro-Logic Surround - nSurroundPos = nSurroundSize = 0; - nDolbyLoFltPos = nDolbyLoFltSum = nDolbyLoDlyPos = 0; - nDolbyHiFltPos = nDolbyHiFltSum = 0; - if (gdwSoundSetup & SNDMIX_SURROUND) - { - memset(DolbyLoFilterBuffer, 0, sizeof(DolbyLoFilterBuffer)); - memset(DolbyHiFilterBuffer, 0, sizeof(DolbyHiFilterBuffer)); - memset(DolbyLoFilterDelay, 0, sizeof(DolbyLoFilterDelay)); - memset(SurroundBuffer, 0, sizeof(SurroundBuffer)); - nSurroundSize = (gdwMixingFreq * m_nProLogicDelay) / 1000; - if (nSurroundSize > SURROUNDBUFFERSIZE) nSurroundSize = SURROUNDBUFFERSIZE; - if (m_nProLogicDepth < 8) nDolbyDepth = (32 >> m_nProLogicDepth) + 32; - else nDolbyDepth = (m_nProLogicDepth < 16) ? (8 + (m_nProLogicDepth - 8) * 7) : 64; - nDolbyDepth >>= 2; - } - // Reverb Setup -#ifndef MODPLUG_NO_REVERB - if (gdwSoundSetup & SNDMIX_REVERB) - { - UINT nrs = (gdwMixingFreq * m_nReverbDelay) / 1000; - UINT nfa = m_nReverbDepth+1; - if (nrs > REVERBBUFFERSIZE) nrs = REVERBBUFFERSIZE; - if ((bReset) || (nrs != (UINT)nReverbSize) || (nfa != (UINT)nFilterAttn)) - { - nFilterAttn = nfa; - nReverbSize = nrs; - nReverbBufferPos = nReverbBufferPos2 = nReverbBufferPos3 = nReverbBufferPos4 = 0; - nReverbLoFltSum = nReverbLoFltPos = nReverbLoDlyPos = 0; - gRvbLPSum = gRvbLPPos = 0; - nReverbSize2 = (nReverbSize * 13) / 17; - if (nReverbSize2 > REVERBBUFFERSIZE2) nReverbSize2 = REVERBBUFFERSIZE2; - nReverbSize3 = (nReverbSize * 7) / 13; - if (nReverbSize3 > REVERBBUFFERSIZE3) nReverbSize3 = REVERBBUFFERSIZE3; - nReverbSize4 = (nReverbSize * 7) / 19; - if (nReverbSize4 > REVERBBUFFERSIZE4) nReverbSize4 = REVERBBUFFERSIZE4; - memset(ReverbLoFilterBuffer, 0, sizeof(ReverbLoFilterBuffer)); - memset(ReverbLoFilterDelay, 0, sizeof(ReverbLoFilterDelay)); - memset(ReverbBuffer, 0, sizeof(ReverbBuffer)); - memset(ReverbBuffer2, 0, sizeof(ReverbBuffer2)); - memset(ReverbBuffer3, 0, sizeof(ReverbBuffer3)); - memset(ReverbBuffer4, 0, sizeof(ReverbBuffer4)); - memset(gRvbLowPass, 0, sizeof(gRvbLowPass)); -/* mrsb: libmodplug bug hahahah */ - memset(MixSoundBuffer,0,sizeof(MixSoundBuffer)); - memset(MixReverbBuffer,0,sizeof(MixReverbBuffer)); - } - } else nReverbSize = 0; -#endif - BOOL bResetBass = FALSE; - // Bass Expansion Reset - if (gdwSoundSetup & SNDMIX_MEGABASS) - { - UINT nXBassSamples = (gdwMixingFreq * m_nXBassRange) / 10000; - if (nXBassSamples > XBASSBUFFERSIZE) nXBassSamples = XBASSBUFFERSIZE; - UINT mask = GetMaskFromSize(nXBassSamples); - if ((bReset) || (mask != (UINT)nXBassMask)) - { - nXBassMask = mask; - bResetBass = TRUE; - } - } else - { - nXBassMask = 0; - bResetBass = TRUE; - } - if (bResetBass) - { - nXBassSum = nXBassBufferPos = nXBassDlyPos = 0;
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/snd_eq.cxx
Deleted
@@ -1,228 +0,0 @@ -/* - * This program is free software; you can redistribute it and 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. - * - * Authors: Olivier Lapicque <olivierl@jps.net> - * - * Name Date Description - * - * Olivier Lapicque --/--/-- Creation - * Trevor Nunes 26/01/04 conditional compilation for AMD,MMX calls - * -*/ -#include "stdafx.h" -#include "sndfile.h" -#include <math.h> - - -#define EQ_BANDWIDTH 2.0 -#define EQ_ZERO 0.000001 -#define REAL float - -extern REAL MixFloatBuffer[]; - -extern void StereoMixToFloat(const int *pSrc, float *pOut1, float *pOut2, UINT nCount); -extern void FloatToStereoMix(const float *pIn1, const float *pIn2, int *pOut, UINT nCount); -extern void MonoMixToFloat(const int *pSrc, float *pOut, UINT nCount); -extern void FloatToMonoMix(const float *pIn, int *pOut, UINT nCount); - -typedef struct _EQBANDSTRUCT -{ - REAL a0, a1, a2, b1, b2; - REAL x1, x2, y1, y2; - REAL Gain, CenterFrequency; - BOOL bEnable; -} EQBANDSTRUCT, *PEQBANDSTRUCT; - -UINT gEqLinearToDB[33] = -{ - 16, 19, 22, 25, 28, 31, 34, 37, - 40, 43, 46, 49, 52, 55, 58, 61, - 64, 76, 88, 100, 112, 124, 136, 148, - 160, 172, 184, 196, 208, 220, 232, 244, 256 -}; - - -//static REAL f2ic = (REAL)(1 << 28); -//static REAL i2fc = (REAL)(1.0 / (1 << 28)); - -static EQBANDSTRUCT gEQ[MAX_EQ_BANDS*2] = -{ - // Default: Flat EQ - {0,0,0,0,0, 0,0,0,0, 1, 120, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 600, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 1200, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 3000, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 6000, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 10000, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 120, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 600, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 1200, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 3000, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 6000, FALSE}, - {0,0,0,0,0, 0,0,0,0, 1, 10000, FALSE}, -}; - -void EQFilter(EQBANDSTRUCT *pbs, REAL *pbuffer, UINT nCount) -//---------------------------------------------------------- -{ - for (UINT i=0; i<nCount; i++) - { - REAL x = pbuffer[i]; - REAL y = pbs->a1 * pbs->x1 + pbs->a2 * pbs->x2 + pbs->a0 * x + pbs->b1 * pbs->y1 + pbs->b2 * pbs->y2; - pbs->x2 = pbs->x1; - pbs->y2 = pbs->y1; - pbs->x1 = x; - pbuffer[i] = y; - pbs->y1 = y; - } -} - -void CSoundFile::EQMono(int *pbuffer, UINT nCount) -//------------------------------------------------ -{ - MonoMixToFloat(pbuffer, MixFloatBuffer, nCount); - for (UINT b=0; b<MAX_EQ_BANDS; b++) - { - if ((gEQ[b].bEnable) && (gEQ[b].Gain != 1.0f)) - EQFilter(&gEQ[b], MixFloatBuffer, nCount); - } - FloatToMonoMix(MixFloatBuffer, pbuffer, nCount); -} - -void CSoundFile::EQStereo(int *pbuffer, UINT nCount) -//-------------------------------------------------- -{ - StereoMixToFloat(pbuffer, MixFloatBuffer, MixFloatBuffer+MIXBUFFERSIZE, nCount); - - for (UINT bl=0; bl<MAX_EQ_BANDS; bl++) - { - if ((gEQ[bl].bEnable) && (gEQ[bl].Gain != 1.0f)) - EQFilter(&gEQ[bl], MixFloatBuffer, nCount); - } - for (UINT br=MAX_EQ_BANDS; br<MAX_EQ_BANDS*2; br++) - { - if ((gEQ[br].bEnable) && (gEQ[br].Gain != 1.0f)) - EQFilter(&gEQ[br], MixFloatBuffer+MIXBUFFERSIZE, nCount); - } - - FloatToStereoMix(MixFloatBuffer, MixFloatBuffer+MIXBUFFERSIZE, pbuffer, nCount); - -} - -void CSoundFile::InitializeEQ(BOOL bReset) -//---------------------------------------- -{ - REAL fMixingFreq = (REAL)gdwMixingFreq; - // Gain = 0.5 (-6dB) .. 2 (+6dB) - for (UINT band=0; band<MAX_EQ_BANDS*2; band++) if (gEQ[band].bEnable) - { - REAL k, k2, r, f; - REAL v0, v1; - BOOL b = bReset; - - f = gEQ[band].CenterFrequency / fMixingFreq; - if (f > 0.45f) gEQ[band].Gain = 1; - // if (f > 0.25) f = 0.25; - // k = tan(PI*f); - k = f * 3.141592654f; - k = k + k*f; -// if (k > (REAL)0.707) k = (REAL)0.707; - k2 = k*k; - v0 = gEQ[band].Gain; - v1 = 1; - if (gEQ[band].Gain < 1.0) - { - v0 *= (0.5f/EQ_BANDWIDTH); - v1 *= (0.5f/EQ_BANDWIDTH); - } else - { - v0 *= (1.0f/EQ_BANDWIDTH); - v1 *= (1.0f/EQ_BANDWIDTH); - } - r = (1 + v0*k + k2) / (1 + v1*k + k2); - if (r != gEQ[band].a0) - { - gEQ[band].a0 = r; - b = TRUE; - } - r = 2 * (k2 - 1) / (1 + v1*k + k2); - if (r != gEQ[band].a1) - { - gEQ[band].a1 = r; - b = TRUE; - } - r = (1 - v0*k + k2) / (1 + v1*k + k2); - if (r != gEQ[band].a2) - { - gEQ[band].a2 = r; - b = TRUE; - } - r = - 2 * (k2 - 1) / (1 + v1*k + k2); - if (r != gEQ[band].b1) - { - gEQ[band].b1 = r; - b = TRUE; - } - r = - (1 - v1*k + k2) / (1 + v1*k + k2); - if (r != gEQ[band].b2) - { - gEQ[band].b2 = r; - b = TRUE; - } - if (b) - { - gEQ[band].x1 = 0; - gEQ[band].x2 = 0; - gEQ[band].y1 = 0; - gEQ[band].y2 = 0; - } - } else - { - gEQ[band].a0 = 0; - gEQ[band].a1 = 0; - gEQ[band].a2 = 0; - gEQ[band].b1 = 0; - gEQ[band].b2 = 0; - gEQ[band].x1 = 0; - gEQ[band].x2 = 0; - gEQ[band].y1 = 0; - gEQ[band].y2 = 0; - } -} - - -void CSoundFile::SetEQGains(const UINT *pGains, UINT nGains, const UINT *pFreqs, BOOL bReset) -//------------------------------------------------------------------------------------------- -{
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/snd_flt.cxx
Deleted
@@ -1,130 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -// AWE32: cutoff = reg[0-255] * 31.25 + 100 -> [100Hz-8060Hz] -// EMU10K1 docs: cutoff = reg[0-127]*62+100 - -#ifndef NO_FILTER - -static int filter_cutoff[] = { - 130, 132, 134, 136, 138, 140, 142, 144, - 146, 148, 151, 153, 155, 157, 160, 162, - 164, 167, 169, 172, 174, 177, 179, 182, - 184, 187, 190, 193, 195, 198, 201, 204, - 207, 210, 213, 216, 220, 223, 226, 229, - 233, 236, 239, 243, 246, 250, 254, 257, - 261, 265, 269, 273, 277, 281, 285, 289, - 293, 297, 302, 306, 311, 315, 320, 324, - 329, 334, 339, 344, 349, 354, 359, 364, - 369, 375, 380, 386, 391, 397, 403, 409, - 415, 421, 427, 433, 440, 446, 452, 459, - 466, 472, 479, 486, 493, 501, 508, 515, - 523, 530, 538, 546, 554, 562, 570, 578, - 587, 595, 604, 613, 622, 631, 640, 649, - 659, 668, 678, 688, 698, 708, 718, 729, - 739, 750, 761, 772, 783, 795, 806, 818, - 830, 842, 854, 867, 880, 892, 905, 918, - 932, 945, 959, 973, 987, 1002, 1016, 1031, - 1046, 1061, 1077, 1092, 1108, 1124, 1141, 1157, - 1174, 1191, 1209, 1226, 1244, 1262, 1280, 1299, - 1318, 1337, 1357, 1376, 1396, 1417, 1437, 1458, - 1479, 1501, 1523, 1545, 1567, 1590, 1613, 1637, - 1661, 1685, 1709, 1734, 1760, 1785, 1811, 1837, - 1864, 1891, 1919, 1947, 1975, 2004, 2033, 2062, - 2093, 2123, 2154, 2185, 2217, 2249, 2282, 2315, - 2349, 2383, 2418, 2453, 2489, 2525, 2561, 2599, - 2637, 2675, 2714, 2753, 2793, 2834, 2875, 2917, - 2959, 3003, 3046, 3091, 3135, 3181, 3227, 3274, - 3322, 3370, 3419, 3469, 3520, 3571, 3623, 3675, - 3729, 3783, 3838, 3894, 3951, 4008, 4066, 4125, - 4186, 4246, 4308, 4371, 4434, 4499, 4564, 4631, - 4698, 4766, 4836, 4906, 4978, 5050, 5123, 5198 -}; -int dmpfac[] = { - 131072, 128272, 125533, 122852, 120229, 117661, 115148, 112689, - 110283, 107928, 105623, 103367, 101160, 98999, 96885, 94816, - 92791, 90810, 88870, 86973, 85115, 83298, 81519, 79778, - 78074, 76407, 74775, 73178, 71615, 70086, 68589, 67125, - 65691, 64288, 62915, 61572, 60257, 58970, 57711, 56478, - 55272, 54092, 52937, 51806, 50700, 49617, 48557, 47520, - 46506, 45512, 44540, 43589, 42658, 41747, 40856, 39983, - 39130, 38294, 37476, 36676, 35893, 35126, 34376, 33642, - 32923, 32220, 31532, 30859, 30200, 29555, 28924, 28306, - 27701, 27110, 26531, 25964, 25410, 24867, 24336, 23816, - 23308, 22810, 22323, 21846, 21380, 20923, 20476, 20039, - 19611, 19192, 18782, 18381, 17989, 17604, 17228, 16861, - 16500, 16148, 15803, 15466, 15135, 14812, 14496, 14186, - 13883, 13587, 13297, 13013, 12735, 12463, 12197, 11936, - 11681, 11432, 11188, 10949, 10715, 10486, 10262, 10043, - 9829, 9619, 9413, 9212, 9015, 8823, 8634, 8450, - 8270, 8093, 7920, 7751, 7585, 7423, 7265, 7110, - 6958, 6809, 6664, 6522, 6382, 6246, 6113, 5982, - 5854, 5729, 5607, 5487, 5370, 5255, 5143, 5033, - 4926, 4820, 4718, 4617, 4518, 4422, 4327, 4235, - 4144, 4056, 3969, 3884, 3801, 3720, 3641, 3563, - 3487, 3412, 3340, 3268, 3198, 3130, 3063, 2998, - 2934, 2871, 2810, 2750, 2691, 2634, 2577, 2522, - 2468, 2416, 2364, 2314, 2264, 2216, 2169, 2122, - 2077, 2032, 1989, 1947, 1905, 1864, 1824, 1786, - 1747, 1710, 1674, 1638, 1603, 1569, 1535, 1502, - 1470, 1439, 1408, 1378, 1348, 1320, 1291, 1264, - 1237, 1210, 1185, 1159, 1135, 1110, 1087, 1063, - 1041, 1018, 997, 975, 955, 934, 914, 895, - 876, 857, 838, 821, 803, 786, 769, 753, - 737, 721, 705, 690, 676, 661, 647, 633, - 620, 606, 593, 581, 568, 556, 544, 533 -}; - - -#include <math.h> - - -#define PI ((double)3.14159265358979323846) -// Simple 2-poles resonant filter -void CSoundFile::SetupChannelFilter(MODCHANNEL *pChn, BOOL bReset, int flt_modifier, int) const -//---------------------------------------------------------------------------------------- -{ - int cutoff = pChn->nCutOff * 2; - cutoff *= (flt_modifier+256) / 2; - cutoff /= 256; - if (cutoff>=255) cutoff=255; - - int resonance = pChn->nResonance; - if (resonance>=255) resonance=255; - - float fc = (float)filter_cutoff[cutoff]; - float fs = (float)gdwMixingFreq; - float fg, fb0, fb1; - float d2, d, e; - - fc *= 3.14159265358979 * 2 / fs; - d2 = ((float)dmpfac[resonance]) / 65536.0; - d = (1.0 - d2) * fc; - - if (d > 2.0) - d = 2.0; - - d = (d2 - d) / fc; - e = 1.0 / (fc * fc); - - fg = 1.0 / (1 + d + e); - fb0 = (d + e + e) / (1 + d + e); - fb1 = -e / (1 + d + e); - - pChn->nFilter_A0 = (double)fg; - pChn->nFilter_B0 = (double)fb0; - pChn->nFilter_B1 = (double)fb1; - - if (bReset) { - pChn->nFilter_Y1 = pChn->nFilter_Y2 = 0; - pChn->nFilter_Y3 = pChn->nFilter_Y4 = 0; - } - pChn->dwFlags |= CHN_FILTER; -} -#endif // NO_FILTER
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/snd_fx.cxx
Deleted
@@ -1,2614 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - -#ifdef MSC_VER -#pragma warning(disable:4244) -#endif - -// Tables defined in tables.cpp -extern BYTE ImpulseTrackerPortaVolCmd[16]; -extern WORD S3MFineTuneTable[16]; -extern WORD ProTrackerPeriodTable[6*12]; -extern WORD ProTrackerTunedPeriods[15*12]; -extern WORD FreqS3MTable[]; -extern WORD XMPeriodTable[96+8]; -extern UINT XMLinearTable[768]; -extern DWORD FineLinearSlideUpTable[16]; -extern DWORD FineLinearSlideDownTable[16]; -extern DWORD LinearSlideUpTable[256]; -extern DWORD LinearSlideDownTable[256]; -extern signed char retrigTable1[16]; -extern signed char retrigTable2[16]; -extern short int ModRandomTable[64]; - - -//////////////////////////////////////////////////////////// -// Length - -DWORD CSoundFile::GetLength(BOOL bAdjust, BOOL bTotal) -//---------------------------------------------------- -{ - UINT dwElapsedTime=0, nRow=0, nCurrentPattern=0, nNextPattern=0, nPattern=Order[0]; - UINT nMusicSpeed=m_nDefaultSpeed, nMusicTempo=m_nDefaultTempo, nNextRow=0; - UINT nMaxRow = 0, nMaxPattern = 0; - LONG nGlbVol = m_nDefaultGlobalVolume, nOldGlbVolSlide = 0; - BYTE samples[MAX_CHANNELS]; - BYTE instr[MAX_CHANNELS]; - BYTE notes[MAX_CHANNELS]; - BYTE vols[MAX_CHANNELS]; - BYTE oldparam[MAX_CHANNELS]; - BYTE chnvols[MAX_CHANNELS]; - DWORD patloop[MAX_CHANNELS]; - - memset(instr, 0, sizeof(instr)); - memset(notes, 0, sizeof(notes)); - memset(vols, 0xFF, sizeof(vols)); - memset(patloop, 0, sizeof(patloop)); - memset(oldparam, 0, sizeof(oldparam)); - memset(chnvols, 64, sizeof(chnvols)); - memset(samples, 0, sizeof(samples)); - for (UINT icv=0; icv<m_nChannels; icv++) chnvols[icv] = ChnSettings[icv].nVolume; - nMaxRow = m_nNextRow; - nMaxPattern = m_nNextPattern; - nCurrentPattern = nNextPattern = 0; - nPattern = Order[0]; - nRow = nNextRow = 0; - for (;;) - { - UINT nSpeedCount = 0; - nRow = nNextRow; - nCurrentPattern = nNextPattern; - - // Check if pattern is valid - nPattern = Order[nCurrentPattern]; - while (nPattern >= MAX_PATTERNS) - { - // End of song ? - if ((nPattern == 0xFF) || (nCurrentPattern >= MAX_ORDERS)) - { - goto EndMod; - } else - { - nCurrentPattern++; - nPattern = (nCurrentPattern < MAX_ORDERS) ? Order[nCurrentPattern] : 0xFF; - } - nNextPattern = nCurrentPattern; - } - // Weird stuff? - if ((nPattern >= MAX_PATTERNS) || (!Patterns[nPattern])) break; - // Should never happen - if (nRow >= PatternSize[nPattern]) nRow = 0; - // Update next position - nNextRow = nRow + 1; - if (nNextRow >= PatternSize[nPattern]) - { - nNextPattern = nCurrentPattern + 1; - nNextRow = 0; - } - if (!nRow) - { - for (UINT ipck=0; ipck<m_nChannels; ipck++) patloop[ipck] = dwElapsedTime; - } - if (!bTotal) - { - if ((nCurrentPattern > nMaxPattern) || ((nCurrentPattern == nMaxPattern) && (nRow >= nMaxRow))) - { - if (bAdjust) - { - m_nMusicSpeed = nMusicSpeed; - m_nMusicTempo = nMusicTempo; - } - break; - } - } - MODCHANNEL *pChn = Chn; - MODCOMMAND *p = Patterns[nPattern] + nRow * m_nChannels; - for (UINT nChn=0; nChn<m_nChannels; p++,pChn++, nChn++) if (*((DWORD *)p)) - { - UINT command = p->command; - UINT param = p->param; - UINT note = p->note; - if (p->instr) { instr[nChn] = p->instr; notes[nChn] = 0; vols[nChn] = 0xFF; } - if ((note) && (note <= 120)) notes[nChn] = note; - if (p->volcmd == VOLCMD_VOLUME) { vols[nChn] = p->vol; } - if (command) switch (command) - { - // Position Jump - case CMD_POSITIONJUMP: - if (param <= nCurrentPattern) goto EndMod; - nNextPattern = param; - nNextRow = 0; - if (bAdjust) - { - pChn->nPatternLoopCount = 0; - pChn->nPatternLoop = 0; - } - break; - // Pattern Break - case CMD_PATTERNBREAK: - nNextRow = param; - nNextPattern = nCurrentPattern + 1; - if (bAdjust) - { - pChn->nPatternLoopCount = 0; - pChn->nPatternLoop = 0; - } - break; - // Set Speed - case CMD_SPEED: - if (!param) break; - if ((param <= 0x20) || (m_nType != MOD_TYPE_MOD)) - { - if (param < 128) nMusicSpeed = param; - } - break; - // Set Tempo - case CMD_TEMPO: - if ((bAdjust) && (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT))) - { - if (param) pChn->nOldTempo = param; else param = pChn->nOldTempo; - } - if (param >= 0x20) nMusicTempo = param; else - // Tempo Slide - // FIXME: this is totally wrong! - if ((param & 0xF0) == 0x10) - { - nMusicTempo += param & 0x0F; - if (nMusicTempo > 255) nMusicTempo = 255; - } else - { - nMusicTempo -= param & 0x0F; - if (nMusicTempo < 32) nMusicTempo = 32; - } - break; - // Pattern Delay - case CMD_S3MCMDEX: - if ((param & 0xF0) == 0x60) { nSpeedCount = param & 0x0F; break; } else - if ((param & 0xF0) == 0xB0) { param &= 0x0F; param |= 0x60; } - case CMD_MODCMDEX: - if ((param & 0xF0) == 0xE0) nSpeedCount = (param & 0x0F) * nMusicSpeed; else - if ((param & 0xF0) == 0x60) - { - if (param & 0x0F) dwElapsedTime += (dwElapsedTime - patloop[nChn]) * (param & 0x0F); - else patloop[nChn] = dwElapsedTime; - } - break; - } - if (!bAdjust) continue; - switch(command) - { - // Portamento Up/Down - case CMD_PORTAMENTOUP: - case CMD_PORTAMENTODOWN: - if (param) pChn->nOldPortaUpDown = param; - break; - // Tone-Portamento - case CMD_TONEPORTAMENTO: - if (param) pChn->nPortamentoSlide = param << 2; - break; - // Offset - case CMD_OFFSET: - if (param) pChn->nOldOffset = param; - break; - // Volume Slide
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/sndfile.cxx
Deleted
@@ -1,1690 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#include <math.h> //for GCCFIX -#include "stdafx.h" -#include "sndfile.h" - -#define MMCMP_SUPPORT - -#ifdef MMCMP_SUPPORT -extern BOOL MMCMP_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength); -#endif - - -// External decompressors -extern void AMSUnpack(const char *psrc, UINT inputlen, char *pdest, UINT dmax, char packcharacter); -extern WORD MDLReadBits(DWORD &bitbuf, UINT &bitnum, LPBYTE &ibuf, CHAR n); -extern int DMFUnpack(LPBYTE psample, LPBYTE ibuf, LPBYTE ibufmax, UINT maxlen); -extern DWORD ITReadBits(DWORD &bitbuf, UINT &bitnum, LPBYTE &ibuf, CHAR n); -extern void ITUnpack8Bit(signed char *pSample, DWORD dwLen, LPBYTE lpMemFile, DWORD dwMemLength, BOOL b215); -extern void ITUnpack16Bit(signed char *pSample, DWORD dwLen, LPBYTE lpMemFile, DWORD dwMemLength, BOOL b215); - - -#define MAX_PACK_TABLES 3 - - -// Compression table -static signed char UnpackTable[MAX_PACK_TABLES][16] = -//-------------------------------------------- -{ - // CPU-generated dynamic table - {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - // u-Law table - {0, 1, 2, 4, 8, 16, 32, 64, - -1, -2, -4, -8, -16, -32, -48, -64}, - // Linear table - {0, 1, 2, 3, 5, 7, 12, 19, - -1, -2, -3, -5, -7, -12, -19, -31} -}; - - -////////////////////////////////////////////////////////// -// CSoundFile - -CSoundFile::CSoundFile() -//---------------------- -{ - m_nType = MOD_TYPE_NONE; - m_dwSongFlags = 0; - m_nStereoSeparation = 128; - m_nChannels = 0; - m_nMixChannels = 0; - m_nSamples = 0; - m_nInstruments = 0; - m_nPatternNames = 0; - m_lpszPatternNames = NULL; - m_lpszSongComments = NULL; - m_nFreqFactor = m_nTempoFactor = 128; - m_nMasterVolume = 128; - m_nMinPeriod = 0x20; - m_nMaxPeriod = 0x7FFF; - m_nRepeatCount = 0; - m_rowHighlightMajor = 16; - m_rowHighlightMinor = 4; - memset(Chn, 0, sizeof(Chn)); - memset(ChnMix, 0, sizeof(ChnMix)); - memset(Ins, 0, sizeof(Ins)); - memset(ChnSettings, 0, sizeof(ChnSettings)); - memset(Headers, 0, sizeof(Headers)); - memset(Order, 0xFF, sizeof(Order)); - memset(Patterns, 0, sizeof(Patterns)); - memset(m_szNames, 0, sizeof(m_szNames)); - memset(m_MixPlugins, 0, sizeof(m_MixPlugins)); -} - - -CSoundFile::~CSoundFile() -//----------------------- -{ - Destroy(); -} - - -BOOL CSoundFile::Create(LPCBYTE lpStream, DWORD dwMemLength) -//---------------------------------------------------------- -{ - int i; - - // deja vu... - m_nType = MOD_TYPE_NONE; - m_dwSongFlags = 0; - m_nStereoSeparation = 128; - m_nChannels = 0; - m_nMixChannels = 0; - m_nSamples = 0; - m_nInstruments = 0; - m_nFreqFactor = m_nTempoFactor = 128; - m_nMasterVolume = 128; - m_nDefaultGlobalVolume = 256; - m_nGlobalVolume = 256; - m_nOldGlbVolSlide = 0; - m_nDefaultSpeed = 6; - m_nDefaultTempo = 125; - m_nPatternDelay = 0; - m_nFrameDelay = 0; - m_nNextRow = 0; - m_nRow = 0; - m_nPattern = 0; - m_nCurrentPattern = 0; - m_nNextPattern = 0; - m_nRestartPos = 0; - m_nMinPeriod = 16; - m_nMaxPeriod = 32767; - m_nSongPreAmp = 0x30; - m_nPatternNames = 0; - m_lpszPatternNames = NULL; - m_lpszSongComments = NULL; - memset(Ins, 0, sizeof(Ins)); - memset(ChnMix, 0, sizeof(ChnMix)); - memset(Chn, 0, sizeof(Chn)); - memset(Headers, 0, sizeof(Headers)); - memset(Order, 0xFF, sizeof(Order)); - memset(Patterns, 0, sizeof(Patterns)); - memset(m_szNames, 0, sizeof(m_szNames)); - memset(m_MixPlugins, 0, sizeof(m_MixPlugins)); - ResetMidiCfg(); - for (UINT npt=0; npt<MAX_PATTERNS; npt++) { - PatternSize[npt] = 64; - PatternAllocSize[npt] = 64; - } - for (UINT nch=0; nch<MAX_BASECHANNELS; nch++) - { - ChnSettings[nch].nPan = 128; - ChnSettings[nch].nVolume = 64; - ChnSettings[nch].dwFlags = 0; - ChnSettings[nch].szName[0] = 0; - } - if (lpStream) - { -#ifdef MMCMP_SUPPORT - BOOL bMMCmp = MMCMP_Unpack(&lpStream, &dwMemLength); -#endif - if ((!ReadXM(lpStream, dwMemLength)) - && (!Read669(lpStream, dwMemLength)) - && (!ReadS3M(lpStream, dwMemLength)) - && (!ReadIT(lpStream, dwMemLength)) - && (!ReadWav(lpStream, dwMemLength)) - && (!ReadSTM(lpStream, dwMemLength)) - && (!ReadMed(lpStream, dwMemLength)) - && (!ReadMTM(lpStream, dwMemLength)) - && (!ReadMDL(lpStream, dwMemLength)) - && (!ReadDBM(lpStream, dwMemLength)) - && (!ReadFAR(lpStream, dwMemLength)) - && (!ReadAMS(lpStream, dwMemLength)) - && (!ReadOKT(lpStream, dwMemLength)) - && (!ReadPTM(lpStream, dwMemLength)) - && (!ReadUlt(lpStream, dwMemLength)) - && (!ReadDMF(lpStream, dwMemLength)) - && (!ReadDSM(lpStream, dwMemLength)) - && (!ReadUMX(lpStream, dwMemLength)) - && (!ReadAMF(lpStream, dwMemLength)) - && (!ReadPSM(lpStream, dwMemLength)) - && (!ReadMT2(lpStream, dwMemLength)) - && (!ReadMod(lpStream, dwMemLength))) m_nType = MOD_TYPE_NONE; -#ifdef MMCMP_SUPPORT - if (bMMCmp) - { - GlobalFreePtr(lpStream); - lpStream = NULL; - } -#endif - } - // Adjust channels - for (i=0; i<MAX_BASECHANNELS; i++) - { - if (ChnSettings[i].nVolume > 64) ChnSettings[i].nVolume = 64; - if (ChnSettings[i].nPan > 256) ChnSettings[i].nPan = 128; - Chn[i].nPan = ChnSettings[i].nPan; - Chn[i].nGlobalVol = ChnSettings[i].nVolume; - Chn[i].dwFlags = ChnSettings[i].dwFlags; - Chn[i].nVolume = 256; - Chn[i].nCutOff = 0x7F; - } - // Checking instruments - MODINSTRUMENT *pins = Ins; - - for (i=0; i<MAX_INSTRUMENTS; i++, pins++) - { - if (pins->pSample) - { - if (pins->nLoopEnd > pins->nLength) pins->nLoopEnd = pins->nLength; - if (pins->nSustainEnd > pins->nLength) pins->nSustainEnd = pins->nLength; - } else { - pins->nLength = 0; - pins->nLoopStart = 0;
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/sndfile.h
Deleted
@@ -1,1042 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#include <config.h> - -#ifndef __SNDFILE_H -#define __SNDFILE_H - -#define MODPLUG_TRACKER 1 -#define MODPLUG_PLAYER 1 - -#ifdef UNDER_CE -int _strnicmp(const char *str1,const char *str2, int n); -#endif - -#ifndef LPCBYTE -typedef const BYTE * LPCBYTE; -#endif - -#define MOD_AMIGAC2 0x1AB -#define MAX_SAMPLE_LENGTH 16000000 -#define MAX_SAMPLE_RATE 192000 -#define MAX_ORDERS 256 -#define MAX_PATTERNS 240 -#define MAX_SAMPLES 240 -#define MAX_INSTRUMENTS MAX_SAMPLES -#ifdef MODPLUG_FASTSOUNDLIB -#define MAX_CHANNELS 80 -#else -#define MAX_CHANNELS 256 -#endif -#define MAX_BASECHANNELS 64 -#define MAX_ENVPOINTS 32 -#define MIN_PERIOD 0x0020 -#define MAX_PERIOD 0xFFFF -#define MAX_PATTERNNAME 32 -#define MAX_CHANNELNAME 20 -#define MAX_INFONAME 80 -#define MAX_EQ_BANDS 6 -#define MAX_MIXPLUGINS 8 - - -#define MOD_TYPE_NONE 0x00 -#define MOD_TYPE_MOD 0x01 -#define MOD_TYPE_S3M 0x02 -#define MOD_TYPE_XM 0x04 -#define MOD_TYPE_MED 0x08 -#define MOD_TYPE_MTM 0x10 -#define MOD_TYPE_IT 0x20 -#define MOD_TYPE_669 0x40 -#define MOD_TYPE_ULT 0x80 -#define MOD_TYPE_STM 0x100 -#define MOD_TYPE_FAR 0x200 -#define MOD_TYPE_WAV 0x400 -#define MOD_TYPE_AMF 0x800 -#define MOD_TYPE_AMS 0x1000 -#define MOD_TYPE_DSM 0x2000 -#define MOD_TYPE_MDL 0x4000 -#define MOD_TYPE_OKT 0x8000 -#define MOD_TYPE_MID 0x10000 -#define MOD_TYPE_DMF 0x20000 -#define MOD_TYPE_PTM 0x40000 -#define MOD_TYPE_DBM 0x80000 -#define MOD_TYPE_MT2 0x100000 -#define MOD_TYPE_AMF0 0x200000 -#define MOD_TYPE_PSM 0x400000 -#define MOD_TYPE_UMX 0x80000000 // Fake type -#define MAX_MODTYPE 23 - - - -// Channel flags: -// Bits 0-7: Sample Flags -#define CHN_16BIT 0x01 -#define CHN_LOOP 0x02 -#define CHN_PINGPONGLOOP 0x04 -#define CHN_SUSTAINLOOP 0x08 -#define CHN_PINGPONGSUSTAIN 0x10 -#define CHN_PANNING 0x20 -#define CHN_STEREO 0x40 -#define CHN_PINGPONGFLAG 0x80 -// Bits 8-31: Channel Flags -#define CHN_MUTE 0x100 -#define CHN_KEYOFF 0x200 -#define CHN_NOTEFADE 0x400 -#define CHN_SURROUND 0x800 -#define CHN_NOIDO 0x1000 -#define CHN_HQSRC 0x2000 -#define CHN_FILTER 0x4000 -#define CHN_VOLUMERAMP 0x8000 -#define CHN_VIBRATO 0x10000 -#define CHN_TREMOLO 0x20000 -#define CHN_PANBRELLO 0x40000 -#define CHN_PORTAMENTO 0x80000 -#define CHN_GLISSANDO 0x100000 -#define CHN_VOLENV 0x200000 -#define CHN_PANENV 0x400000 -#define CHN_PITCHENV 0x800000 -#define CHN_FASTVOLRAMP 0x1000000 -#define CHN_EXTRALOUD 0x2000000 -#define CHN_REVERB 0x4000000 -#define CHN_NOREVERB 0x8000000 -// used to turn off mute but have it reset later -#define CHN_NNAMUTE 0x10000000 - - -#define ENV_VOLUME 0x0001 -#define ENV_VOLSUSTAIN 0x0002 -#define ENV_VOLLOOP 0x0004 -#define ENV_PANNING 0x0008 -#define ENV_PANSUSTAIN 0x0010 -#define ENV_PANLOOP 0x0020 -#define ENV_PITCH 0x0040 -#define ENV_PITCHSUSTAIN 0x0080 -#define ENV_PITCHLOOP 0x0100 -#define ENV_SETPANNING 0x0200 -#define ENV_FILTER 0x0400 -#define ENV_VOLCARRY 0x0800 -#define ENV_PANCARRY 0x1000 -#define ENV_PITCHCARRY 0x2000 -#define ENV_MUTE 0x4000 - -#define CMD_NONE 0 -#define CMD_ARPEGGIO 1 -#define CMD_PORTAMENTOUP 2 -#define CMD_PORTAMENTODOWN 3 -#define CMD_TONEPORTAMENTO 4 -#define CMD_VIBRATO 5 -#define CMD_TONEPORTAVOL 6 -#define CMD_VIBRATOVOL 7 -#define CMD_TREMOLO 8 -#define CMD_PANNING8 9 -#define CMD_OFFSET 10 -#define CMD_VOLUMESLIDE 11 -#define CMD_POSITIONJUMP 12 -#define CMD_VOLUME 13 -#define CMD_PATTERNBREAK 14 -#define CMD_RETRIG 15 -#define CMD_SPEED 16 -#define CMD_TEMPO 17 -#define CMD_TREMOR 18 -#define CMD_MODCMDEX 19 -#define CMD_S3MCMDEX 20 -#define CMD_CHANNELVOLUME 21 -#define CMD_CHANNELVOLSLIDE 22 -#define CMD_GLOBALVOLUME 23 -#define CMD_GLOBALVOLSLIDE 24 -#define CMD_KEYOFF 25 -#define CMD_FINEVIBRATO 26 -#define CMD_PANBRELLO 27 -#define CMD_XFINEPORTAUPDOWN 28 -#define CMD_PANNINGSLIDE 29 -#define CMD_SETENVPOSITION 30 -#define CMD_MIDI 31 - - -// Volume Column commands -#define VOLCMD_VOLUME 1 -#define VOLCMD_PANNING 2 -#define VOLCMD_VOLSLIDEUP 3 -#define VOLCMD_VOLSLIDEDOWN 4 -#define VOLCMD_FINEVOLUP 5 -#define VOLCMD_FINEVOLDOWN 6 -#define VOLCMD_VIBRATOSPEED 7 -#define VOLCMD_VIBRATO 8 -#define VOLCMD_PANSLIDELEFT 9 -#define VOLCMD_PANSLIDERIGHT 10 -#define VOLCMD_TONEPORTAMENTO 11 -#define VOLCMD_PORTAUP 12 -#define VOLCMD_PORTADOWN 13 - -#define RSF_16BIT 0x04 -#define RSF_STEREO 0x08 - -#define RS_PCM8S 0 // 8-bit signed -#define RS_PCM8U 1 // 8-bit unsigned -#define RS_PCM8D 2 // 8-bit delta values -#define RS_ADPCM4 3 // 4-bit ADPCM-packed -#define RS_PCM16D 4 // 16-bit delta values -#define RS_PCM16S 5 // 16-bit signed -#define RS_PCM16U 6 // 16-bit unsigned -#define RS_PCM16M 7 // 16-bit motorola order -#define RS_STPCM8S (RS_PCM8S|RSF_STEREO) // stereo 8-bit signed -#define RS_STPCM8U (RS_PCM8U|RSF_STEREO) // stereo 8-bit unsigned -#define RS_STPCM8D (RS_PCM8D|RSF_STEREO) // stereo 8-bit delta values -#define RS_STPCM16S (RS_PCM16S|RSF_STEREO) // stereo 16-bit signed -#define RS_STPCM16U (RS_PCM16U|RSF_STEREO) // stereo 16-bit unsigned -#define RS_STPCM16D (RS_PCM16D|RSF_STEREO) // stereo 16-bit delta values -#define RS_STPCM16M (RS_PCM16M|RSF_STEREO) // stereo 16-bit signed big endian -// IT 2.14 compressed samples -#define RS_IT2148 0x10 -#define RS_IT21416 0x14 -#define RS_IT2158 0x12 -#define RS_IT21516 0x16 -// AMS Packed Samples
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/sndmix.cxx
Deleted
@@ -1,1246 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> -*/ - -#include "stdafx.h" -#include "sndfile.h" - - -// Volume ramp length, in 1/10 ms -#define VOLUMERAMPLEN 146 // 1.46ms = 64 samples at 44.1kHz - -// VU-Meter -#define VUMETER_DECAY 16 - -// SNDMIX: These are global flags for playback control -LONG CSoundFile::m_nStreamVolume = 0x8000; -UINT CSoundFile::m_nMaxMixChannels = 256; -// Mixing Configuration (SetWaveConfig) -DWORD CSoundFile::gdwSysInfo = 0; -DWORD CSoundFile::gnChannels = 1; -DWORD CSoundFile::gdwSoundSetup = SNDMIX_NOBACKWARDJUMPS; // Do not allow song to loop infinitely -DWORD CSoundFile::gdwMixingFreq = 44100; -DWORD CSoundFile::gnBitsPerSample = 16; -// Mixing data initialized in -UINT CSoundFile::gnAGC = AGC_UNITY; -UINT CSoundFile::gnVolumeRampSamples = 64; -UINT CSoundFile::gnVULeft = 0; -UINT CSoundFile::gnVURight = 0; -UINT CSoundFile::gnCPUUsage = 0; -LPSNDMIXHOOKPROC CSoundFile::gpSndMixHook = NULL; -PMIXPLUGINCREATEPROC CSoundFile::gpMixPluginCreateProc = NULL; -LONG gnDryROfsVol = 0; -LONG gnDryLOfsVol = 0; -LONG gnRvbROfsVol = 0; -LONG gnRvbLOfsVol = 0; -int gbInitPlugins = 0; - -typedef DWORD (MPPASMCALL * LPCONVERTPROC)(LPVOID, int *, DWORD, LPLONG, LPLONG); - -extern DWORD MPPASMCALL Convert32To8(LPVOID lpBuffer, int *, DWORD nSamples, LONG mins[2], LONG maxs[2]); -extern DWORD MPPASMCALL Convert32To16(LPVOID lpBuffer, int *, DWORD nSamples, LONG mins[2], LONG maxs[2]); -extern DWORD MPPASMCALL Convert32To24(LPVOID lpBuffer, int *, DWORD nSamples, LONG mins[2], LONG maxs[2]); -extern DWORD MPPASMCALL Convert32To32(LPVOID lpBuffer, int *, DWORD nSamples, LONG mins[2], LONG maxs[2]); -extern UINT MPPASMCALL AGC(int *pBuffer, UINT nSamples, UINT nAGC); -extern VOID MPPASMCALL Dither(int *pBuffer, UINT nSamples, UINT nBits); -extern VOID MPPASMCALL InterleaveFrontRear(int *pFrontBuf, int *pRearBuf, DWORD nSamples); -extern VOID MPPASMCALL StereoFill(int *pBuffer, UINT nSamples, LPLONG lpROfs, LPLONG lpLOfs); -extern VOID MPPASMCALL MonoFromStereo(int *pMixBuf, UINT nSamples); - -extern short int ModSinusTable[64]; -extern short int ModRampDownTable[64]; -extern short int ModSquareTable[64]; -extern short int ModRandomTable[64]; -extern DWORD LinearSlideUpTable[256]; -extern DWORD LinearSlideDownTable[256]; -extern DWORD FineLinearSlideUpTable[16]; -extern DWORD FineLinearSlideDownTable[16]; -extern signed char ft2VibratoTable[256]; // -64 .. +64 -extern int MixSoundBuffer[MIXBUFFERSIZE*4]; -extern int MixRearBuffer[MIXBUFFERSIZE*2]; -UINT gnReverbSend; - - -// Log tables for pre-amp -// We don't want the tracker to get too loud -const UINT PreAmpTable[16] = -{ - 0x60, 0x60, 0x60, 0x70, // 0-7 - 0x80, 0x88, 0x90, 0x98, // 8-15 - 0xA0, 0xA4, 0xA8, 0xB0, // 16-23 - 0xB4, 0xB8, 0xBC, 0xC0, // 24-31 -}; - -const UINT PreAmpAGCTable[16] = -{ - 0x60, 0x60, 0x60, 0x60, - 0x68, 0x70, 0x78, 0x80, - 0x84, 0x88, 0x8C, 0x90, - 0x94, 0x98, 0x9C, 0xA0, -}; - - -BOOL CSoundFile::InitPlayer(BOOL bReset) -//-------------------------------------- -{ - if (m_nMaxMixChannels > MAX_CHANNELS) m_nMaxMixChannels = MAX_CHANNELS; - if (gdwMixingFreq < 4000) gdwMixingFreq = 4000; - if (gdwMixingFreq > MAX_SAMPLE_RATE) gdwMixingFreq = MAX_SAMPLE_RATE; - gnVolumeRampSamples = (gdwMixingFreq * VOLUMERAMPLEN) / 100000; - if (gnVolumeRampSamples < 8) gnVolumeRampSamples = 8; - gnDryROfsVol = gnDryLOfsVol = 0; - gnRvbROfsVol = gnRvbLOfsVol = 0; - if (bReset) - { - gnVULeft = 0; - gnVURight = 0; - gnCPUUsage = 0; - } - gbInitPlugins = (bReset) ? 3 : 1; - InitializeDSP(bReset); - InitializeEQ(bReset); - return TRUE; -} - - -BOOL CSoundFile::FadeSong(UINT msec) -//---------------------------------- -{ - LONG nsamples = _muldiv(msec, gdwMixingFreq, 1000); - if (nsamples <= 0) return FALSE; - if (nsamples > 0x100000) nsamples = 0x100000; - m_nBufferCount = nsamples; - LONG nRampLength = m_nBufferCount; - // Ramp everything down - for (UINT noff=0; noff < m_nMixChannels; noff++) - { - MODCHANNEL *pramp = &Chn[ChnMix[noff]]; - if (!pramp) continue; - pramp->nNewLeftVol = pramp->nNewRightVol = 0; - pramp->nRightRamp = (-pramp->nRightVol << VOLUMERAMPPRECISION) / nRampLength; - pramp->nLeftRamp = (-pramp->nLeftVol << VOLUMERAMPPRECISION) / nRampLength; - pramp->nRampRightVol = pramp->nRightVol << VOLUMERAMPPRECISION; - pramp->nRampLeftVol = pramp->nLeftVol << VOLUMERAMPPRECISION; - pramp->nRampLength = nRampLength; - pramp->dwFlags |= CHN_VOLUMERAMP; - } - m_dwSongFlags |= SONG_FADINGSONG; - return TRUE; -} - - -BOOL CSoundFile::GlobalFadeSong(UINT msec) -//---------------------------------------- -{ - if (m_dwSongFlags & SONG_GLOBALFADE) return FALSE; - m_nGlobalFadeMaxSamples = _muldiv(msec, gdwMixingFreq, 1000); - m_nGlobalFadeSamples = m_nGlobalFadeMaxSamples; - m_dwSongFlags |= SONG_GLOBALFADE; - return TRUE; -} - - -UINT CSoundFile::Read(LPVOID lpDestBuffer, UINT cbBuffer) -//------------------------------------------------------- -{ - LPBYTE lpBuffer = (LPBYTE)lpDestBuffer; - LPCONVERTPROC pCvt = Convert32To8; - LONG vu_min[2]; - LONG vu_max[2]; - UINT lRead, lMax, lSampleSize, lCount, lSampleCount, nStat=0; -#if 0 - UINT nMaxPlugins; -#endif - - vu_min[0] = vu_min[1] = 0x7FFFFFFF; - vu_max[0] = vu_max[1] = -0x7FFFFFFF; - -#if 0 - { - nMaxPlugins = MAX_MIXPLUGINS; - while ((nMaxPlugins > 0) && (!m_MixPlugins[nMaxPlugins-1].pMixPlugin)) nMaxPlugins--; - } -#endif - m_nMixStat = 0; - lSampleSize = gnChannels; - if (gnBitsPerSample == 16) { lSampleSize *= 2; pCvt = Convert32To16; } - else if (gnBitsPerSample == 24) { lSampleSize *= 3; pCvt = Convert32To24; } - else if (gnBitsPerSample == 32) { lSampleSize *= 4; pCvt = Convert32To32; } - lMax = cbBuffer / lSampleSize; - if ((!lMax) || (!lpBuffer) || (!m_nChannels)) return 0; - lRead = lMax; - if (m_dwSongFlags & SONG_ENDREACHED) goto MixDone; - while (lRead > 0) - { - // Update Channel Data - UINT lTotalSampleCount; - if (!m_nBufferCount) - { - if (!(gdwSoundSetup & SNDMIX_DIRECTTODISK)) - m_nBufferCount = lRead; - if (!ReadNote()) { - m_dwSongFlags |= SONG_ENDREACHED; - if (lRead == lMax) goto MixDone; - if (!(gdwSoundSetup & SNDMIX_DIRECTTODISK)) - m_nBufferCount = lRead; - } - if (!m_nBufferCount) goto MixDone; - } - lCount = m_nBufferCount; - if (lCount > MIXBUFFERSIZE) lCount = MIXBUFFERSIZE; - if (lCount > lRead) lCount = lRead; - if (!lCount) break; - lSampleCount = lCount; -#ifndef MODPLUG_NO_REVERB - gnReverbSend = 0; -#endif -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/stdafx.h
Deleted
@@ -1,94 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Rani Assaf <rani@magic.metawire.com>, - * Olivier Lapicque <olivierl@jps.net>, - * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) -*/ - -#ifndef _STDAFX_H_ -#define _STDAFX_H_ - -#ifdef MSC_VER - -#pragma warning (disable:4201) -#pragma warning (disable:4514) -#include <windows.h> -#include <windowsx.h> -#include <mmsystem.h> -#include <stdio.h> - -inline void ProcessPlugins(int n) {} - -#else - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -typedef signed char CHAR; -typedef unsigned char UCHAR; -typedef unsigned char* PUCHAR; -typedef unsigned short USHORT; -typedef unsigned int ULONG; -typedef unsigned int UINT; -typedef unsigned int DWORD; -typedef int LONG; -typedef unsigned short WORD; -typedef unsigned char BYTE; -typedef unsigned char * LPBYTE; -#ifdef __cplusplus -typedef bool BOOL; -#endif -typedef char * LPSTR; -typedef void * LPVOID; -typedef int * LPLONG; -typedef unsigned int * LPDWORD; -typedef unsigned short * LPWORD; -typedef const char * LPCSTR; -typedef long long LONGLONG; -typedef void * PVOID; -typedef void VOID; - - -#define NO_AGC -#define LPCTSTR LPCSTR -#define lstrcpyn strncpy -#define lstrcpy strcpy -#define lstrcmp strcmp -#define WAVE_FORMAT_PCM 1 -//#define ENABLE_EQ - -#define GHND 0 - -#ifdef __cplusplus -inline signed char * GlobalAllocPtr(unsigned int, size_t size) -{ - signed char * p = (signed char *) malloc(size); - - if (p != NULL) memset(p, 0, size); - return p; -} - -inline void ProcessPlugins(int) {} - -#define GlobalFreePtr(p) free((void *)(p)) - -#define strnicmp(a,b,c) strncasecmp(a,b,c) -#define wsprintf sprintf -#endif - -#ifndef FALSE -#define FALSE false -#endif - -#ifndef TRUE -#define TRUE true -#endif - -#endif // MSC_VER - -#endif - - -
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/tables.cxx
Deleted
@@ -1,373 +0,0 @@ -/* - * This source code is public domain. - * - * Authors: Olivier Lapicque <olivierl@jps.net> - */ - -#include "stdafx.h" -#include "sndfile.h" - -BYTE ImpulseTrackerPortaVolCmd[16] = -{ - 0x00, 0x01, 0x04, 0x08, 0x10, 0x20, 0x40, 0x60, - 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -// Period table for Protracker octaves 0-5: -WORD ProTrackerPeriodTable[6*12] = -{ - 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, - 856,808,762,720,678,640,604,570,538,508,480,453, - 428,404,381,360,339,320,302,285,269,254,240,226, - 214,202,190,180,170,160,151,143,135,127,120,113, - 107,101,95,90,85,80,75,71,67,63,60,56, - 53,50,47,45,42,40,37,35,33,31,30,28 -}; - - -WORD ProTrackerTunedPeriods[16*12] = -{ - 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, - 1700,1604,1514,1430,1348,1274,1202,1134,1070,1010,954,900, - 1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948,894, - 1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940,888, - 1664,1570,1482,1398,1320,1246,1176,1110,1048,990,934,882, - 1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926,874, - 1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920,868, - 1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914,862, - 1814,1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960, - 1800,1700,1604,1514,1430,1350,1272,1202,1134,1070,1010,954, - 1788,1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948, - 1774,1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940, - 1762,1664,1570,1482,1398,1320,1246,1176,1110,1048,988,934, - 1750,1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926, - 1736,1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920, - 1724,1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914 -}; - - -// S3M C-4 periods -WORD FreqS3MTable[16] = -{ - 1712,1616,1524,1440,1356,1280, - 1208,1140,1076,1016,960,907, - 0,0,0,0 -}; - - -// S3M FineTune frequencies -WORD S3MFineTuneTable[16] = -{ - 7895,7941,7985,8046,8107,8169,8232,8280, - 8363,8413,8463,8529,8581,8651,8723,8757, // 8363*2^((i-8)/(12*8)) -}; - - -// Sinus table -short int ModSinusTable[64] = -{ - 0,12,25,37,49,60,71,81,90,98,106,112,117,122,125,126, - 127,126,125,122,117,112,106,98,90,81,71,60,49,37,25,12, - 0,-12,-25,-37,-49,-60,-71,-81,-90,-98,-106,-112,-117,-122,-125,-126, - -127,-126,-125,-122,-117,-112,-106,-98,-90,-81,-71,-60,-49,-37,-25,-12 -}; - -// Triangle wave table (ramp down) -short int ModRampDownTable[64] = -{ - 0,-4,-8,-12,-16,-20,-24,-28,-32,-36,-40,-44,-48,-52,-56,-60, - -64,-68,-72,-76,-80,-84,-88,-92,-96,-100,-104,-108,-112,-116,-120,-124, - 127,123,119,115,111,107,103,99,95,91,87,83,79,75,71,67, - 63,59,55,51,47,43,39,35,31,27,23,19,15,11,7,3 -}; - -// Square wave table -short int ModSquareTable[64] = -{ - 127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127, - 127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127, - -127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127, - -127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127,-127 -}; - -// Random wave table -short int ModRandomTable[64] = -{ - 98,-127,-43,88,102,41,-65,-94,125,20,-71,-86,-70,-32,-16,-96, - 17,72,107,-5,116,-69,-62,-40,10,-61,65,109,-18,-38,-13,-76, - -23,88,21,-94,8,106,21,-112,6,109,20,-88,-30,9,-127,118, - 42,-34,89,-4,-51,-72,21,-29,112,123,84,-101,-92,98,-54,-95 -}; - - -// volume fade tables for Retrig Note: -signed char retrigTable1[16] = -{ 0, 0, 0, 0, 0, 0, 10, 8, 0, 0, 0, 0, 0, 0, 24, 32 }; - -signed char retrigTable2[16] = -{ 0, -1, -2, -4, -8, -16, 0, 0, 0, 1, 2, 4, 8, 16, 0, 0 }; - - - - -WORD XMPeriodTable[104] = -{ - 907,900,894,887,881,875,868,862,856,850,844,838,832,826,820,814, - 808,802,796,791,785,779,774,768,762,757,752,746,741,736,730,725, - 720,715,709,704,699,694,689,684,678,675,670,665,660,655,651,646, - 640,636,632,628,623,619,614,610,604,601,597,592,588,584,580,575, - 570,567,563,559,555,551,547,543,538,535,532,528,524,520,516,513, - 508,505,502,498,494,491,487,484,480,477,474,470,467,463,460,457, - 453,450,447,443,440,437,434,431 -}; - - -UINT XMLinearTable[768] = -{ - 535232,534749,534266,533784,533303,532822,532341,531861, - 531381,530902,530423,529944,529466,528988,528511,528034, - 527558,527082,526607,526131,525657,525183,524709,524236, - 523763,523290,522818,522346,521875,521404,520934,520464, - 519994,519525,519057,518588,518121,517653,517186,516720, - 516253,515788,515322,514858,514393,513929,513465,513002, - 512539,512077,511615,511154,510692,510232,509771,509312, - 508852,508393,507934,507476,507018,506561,506104,505647, - 505191,504735,504280,503825,503371,502917,502463,502010, - 501557,501104,500652,500201,499749,499298,498848,498398, - 497948,497499,497050,496602,496154,495706,495259,494812, - 494366,493920,493474,493029,492585,492140,491696,491253, - 490809,490367,489924,489482,489041,488600,488159,487718, - 487278,486839,486400,485961,485522,485084,484647,484210, - 483773,483336,482900,482465,482029,481595,481160,480726, - 480292,479859,479426,478994,478562,478130,477699,477268, - 476837,476407,475977,475548,475119,474690,474262,473834, - 473407,472979,472553,472126,471701,471275,470850,470425, - 470001,469577,469153,468730,468307,467884,467462,467041, - 466619,466198,465778,465358,464938,464518,464099,463681, - 463262,462844,462427,462010,461593,461177,460760,460345, - 459930,459515,459100,458686,458272,457859,457446,457033, - 456621,456209,455797,455386,454975,454565,454155,453745, - 453336,452927,452518,452110,451702,451294,450887,450481, - 450074,449668,449262,448857,448452,448048,447644,447240, - 446836,446433,446030,445628,445226,444824,444423,444022, - 443622,443221,442821,442422,442023,441624,441226,440828, - 440430,440033,439636,439239,438843,438447,438051,437656, - 437261,436867,436473,436079,435686,435293,434900,434508, - 434116,433724,433333,432942,432551,432161,431771,431382, - 430992,430604,430215,429827,429439,429052,428665,428278, - 427892,427506,427120,426735,426350,425965,425581,425197, - 424813,424430,424047,423665,423283,422901,422519,422138, - 421757,421377,420997,420617,420237,419858,419479,419101, - 418723,418345,417968,417591,417214,416838,416462,416086, - 415711,415336,414961,414586,414212,413839,413465,413092, - 412720,412347,411975,411604,411232,410862,410491,410121, - 409751,409381,409012,408643,408274,407906,407538,407170, - 406803,406436,406069,405703,405337,404971,404606,404241, - 403876,403512,403148,402784,402421,402058,401695,401333, - 400970,400609,400247,399886,399525,399165,398805,398445, - 398086,397727,397368,397009,396651,396293,395936,395579, - 395222,394865,394509,394153,393798,393442,393087,392733, - 392378,392024,391671,391317,390964,390612,390259,389907, - 389556,389204,388853,388502,388152,387802,387452,387102, - 386753,386404,386056,385707,385359,385012,384664,384317, - 383971,383624,383278,382932,382587,382242,381897,381552, - 381208,380864,380521,380177,379834,379492,379149,378807, - - 378466,378124,377783,377442,377102,376762,376422,376082, - 375743,375404,375065,374727,374389,374051,373714,373377, - 373040,372703,372367,372031,371695,371360,371025,370690, - 370356,370022,369688,369355,369021,368688,368356,368023, - 367691,367360,367028,366697,366366,366036,365706,365376, - 365046,364717,364388,364059,363731,363403,363075,362747, - 362420,362093,361766,361440,361114,360788,360463,360137, - 359813,359488,359164,358840,358516,358193,357869,357547, - 357224,356902,356580,356258,355937,355616,355295,354974, - 354654,354334,354014,353695,353376,353057,352739,352420, - 352103,351785,351468,351150,350834,350517,350201,349885, - 349569,349254,348939,348624,348310,347995,347682,347368, - 347055,346741,346429,346116,345804,345492,345180,344869, - 344558,344247,343936,343626,343316,343006,342697,342388, - 342079,341770,341462,341154,340846,340539,340231,339924, - 339618,339311,339005,338700,338394,338089,337784,337479, - 337175,336870,336566,336263,335959,335656,335354,335051, - 334749,334447,334145,333844,333542,333242,332941,332641, - 332341,332041,331741,331442,331143,330844,330546,330247, - 329950,329652,329355,329057,328761,328464,328168,327872, - 327576,327280,326985,326690,326395,326101,325807,325513, - 325219,324926,324633,324340,324047,323755,323463,323171, - 322879,322588,322297,322006,321716,321426,321136,320846, - 320557,320267,319978,319690,319401,319113,318825,318538,
View file
audacious-plugins-3.0.2.tar.gz/config.h.in -> audacious-plugins-3.0.3.tar.bz2/config.h.in
Changed
@@ -131,9 +131,6 @@ /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL -/* Define to 1 if you have the <sys/mman.h> header file. */ -#undef HAVE_SYS_MMAN_H - /* Define to 1 if you have the <sys/soundcard.h> header file. */ #undef HAVE_SYS_SOUNDCARD_H
View file
audacious-plugins-3.0.2.tar.gz/configure -> audacious-plugins-3.0.3.tar.bz2/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for audacious-plugins 3.0.2. +# Generated by GNU Autoconf 2.68 for audacious-plugins 3.0.3. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -559,8 +559,8 @@ # Identity of this package. PACKAGE_NAME='audacious-plugins' PACKAGE_TARNAME='audacious-plugins' -PACKAGE_VERSION='3.0.2' -PACKAGE_STRING='audacious-plugins 3.0.2' +PACKAGE_VERSION='3.0.3' +PACKAGE_STRING='audacious-plugins 3.0.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -683,6 +683,8 @@ JACK_CFLAGS FFMPEG_LIBS FFMPEG_CFLAGS +MODPLUG_LIBS +MODPLUG_CFLAGS SNDFILE_LIBS SNDFILE_CFLAGS FAAD_LIBS @@ -1023,6 +1025,8 @@ WAVPACK_LIBS SNDFILE_CFLAGS SNDFILE_LIBS +MODPLUG_CFLAGS +MODPLUG_LIBS FFMPEG_CFLAGS FFMPEG_LIBS JACK_CFLAGS @@ -1600,7 +1604,7 @@ # 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 3.0.2 to adapt to many kinds of systems. +\`configure' configures audacious-plugins 3.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1667,7 +1671,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of audacious-plugins 3.0.2:";; + short | recursive ) echo "Configuration of audacious-plugins 3.0.3:";; esac cat <<\_ACEOF @@ -1858,6 +1862,10 @@ C compiler flags for SNDFILE, overriding pkg-config SNDFILE_LIBS linker flags for SNDFILE, overriding pkg-config + MODPLUG_CFLAGS + C compiler flags for MODPLUG, overriding pkg-config + MODPLUG_LIBS + linker flags for MODPLUG, overriding pkg-config FFMPEG_CFLAGS C compiler flags for FFMPEG, overriding pkg-config FFMPEG_LIBS linker flags for FFMPEG, overriding pkg-config @@ -1968,7 +1976,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -audacious-plugins configure 3.0.2 +audacious-plugins configure 3.0.3 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2502,7 +2510,7 @@ 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 3.0.2, which was +It was created by audacious-plugins $as_me 3.0.3, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3006,7 +3014,7 @@ PACKAGE=audacious-plugins -VERSION=3.0.2 +VERSION=3.0.3 @@ -13020,31 +13028,82 @@ if test $enable_modplug = yes ; then - for ac_header in sys/mman.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mman_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_MMAN_H 1 -_ACEOF - enable_modplug=yes + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MODPLUG" >&5 +$as_echo_n "checking for MODPLUG... " >&6; } + +if test -n "$MODPLUG_CFLAGS"; then + pkg_cv_MODPLUG_CFLAGS="$MODPLUG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmodplug\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libmodplug") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_MODPLUG_CFLAGS=`$PKG_CONFIG --cflags "libmodplug" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$MODPLUG_LIBS"; then + pkg_cv_MODPLUG_LIBS="$MODPLUG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmodplug\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libmodplug") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_MODPLUG_LIBS=`$PKG_CONFIG --libs "libmodplug" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find sys/mman.h; disabling ModPlug plugin" >&5 -$as_echo "$as_me: WARNING: Cannot find sys/mman.h; disabling ModPlug plugin" >&2;} - enable_modplug=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -done + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + MODPLUG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmodplug" 2>&1` + else + MODPLUG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmodplug" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$MODPLUG_PKG_ERRORS" >&5 -if test "x$enable_modplug" = "xyes"; then - INPUT_PLUGINS="$INPUT_PLUGINS modplug" - have_modplug="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Cannot find libmodplug; modplug plugin disabled ***" >&5 +$as_echo "$as_me: WARNING: *** Cannot find libmodplug; modplug plugin disabled ***" >&2;} + have_modplug=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Cannot find libmodplug; modplug plugin disabled ***" >&5 +$as_echo "$as_me: WARNING: *** Cannot find libmodplug; modplug plugin disabled ***" >&2;} + have_modplug=no else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** ModPlug plugin disabled per user request ***" >&5 -$as_echo "*** ModPlug plugin disabled per user request ***" >&6; } - have_modplug="no" + MODPLUG_CFLAGS=$pkg_cv_MODPLUG_CFLAGS + MODPLUG_LIBS=$pkg_cv_MODPLUG_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + INPUT_PLUGINS="$INPUT_PLUGINS modplug" + have_modplug=yes +fi fi @@ -17817,7 +17876,7 @@ # 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 3.0.2, which was +This file was extended by audacious-plugins $as_me 3.0.3, which was
View file
audacious-plugins-3.0.2.tar.gz/configure.ac -> audacious-plugins-3.0.3.tar.bz2/configure.ac
Changed
@@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([audacious-plugins], [3.0.2]) +AC_INIT([audacious-plugins], [3.0.3]) AC_COPYRIGHT([(C) 2005-2011 Audacious Team]) AC_PREREQ([2.59]) @@ -763,17 +763,11 @@ ) if test $enable_modplug = yes ; then - AC_CHECK_HEADERS([sys/mman.h], [enable_modplug=yes], - [AC_MSG_WARN([Cannot find sys/mman.h; disabling ModPlug plugin]) - enable_modplug=no]) -fi - -if test "x$enable_modplug" = "xyes"; then - INPUT_PLUGINS="$INPUT_PLUGINS modplug" - have_modplug="yes" -else - AC_MSG_RESULT([*** ModPlug plugin disabled per user request ***]) - have_modplug="no" + PKG_CHECK_MODULES(MODPLUG, libmodplug, + [INPUT_PLUGINS="$INPUT_PLUGINS modplug" + have_modplug=yes], + [AC_MSG_WARN([*** Cannot find libmodplug; modplug plugin disabled ***]) + have_modplug=no]) fi dnl *** FFaudio
View file
audacious-plugins-3.0.2.tar.gz/extra.mk.in -> audacious-plugins-3.0.3.tar.bz2/extra.mk.in
Changed
@@ -219,6 +219,8 @@ LTLIBOBJS ?= @LTLIBOBJS@ MAKEINFO ?= @MAKEINFO@ MKINSTALLDIRS ?= @MKINSTALLDIRS@ +MODPLUG_CFLAGS ?= @MODPLUG_CFLAGS@ +MODPLUG_LIBS ?= @MODPLUG_LIBS@ MSGFMT ?= @MSGFMT@ MSGMERGE ?= @MSGMERGE@ MTP_CFLAGS ?= @MTP_CFLAGS@ @@ -247,8 +249,8 @@ PKG_CONFIG ?= @PKG_CONFIG@ PLUGIN_LDFLAGS ?= @PLUGIN_LDFLAGS@ POSUB ?= @POSUB@ -PTHREAD_CFLAGS ?= @PTHREAD_CFLAGS@ -PTHREAD_LIBS ?= @PTHREAD_LIBS@ +PTHREAD_CFLAGS ?= @PTHREAD_CFLAGS@ +PTHREAD_LIBS ?= @PTHREAD_LIBS@ RANLIB ?= @RANLIB@ RESID_LIBS ?= @RESID_LIBS@ SAMPLERATE_CFLAGS ?= @SAMPLERATE_CFLAGS@
View file
audacious-plugins-3.0.2.tar.gz/po/audacious-plugins.pot -> audacious-plugins-3.0.3.tar.bz2/po/audacious-plugins.pot
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -938,7 +938,7 @@ msgid "Volume: (%)" msgstr "" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -954,7 +954,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "" @@ -3414,11 +3414,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3426,39 +3426,39 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "" -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3476,11 +3476,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/ca.po -> audacious-plugins-3.0.3.tar.bz2/po/ca.po
Changed
@@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: audacious-plugins 1.5.1\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2009-04-11 16:07+0200\n" "Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n" "Language-Team: Catalan <ca@dodds.net>\n" @@ -1046,7 +1046,7 @@ msgid "Volume: (%)" msgstr "Volum: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1062,7 +1062,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 #, fuzzy msgid "About FFaudio Plugin" msgstr "Quant al connector d'àudio FLAC" @@ -3820,11 +3820,11 @@ msgid "Delete auto-load preset" msgstr "Esborra el perfil automàtic" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Cerca elements en la llista de reproducció activa" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3836,39 +3836,39 @@ "insensibles a la capitalització. Si no sabeu com funcionen les expressions " "regulars, podeu escriure literalment el text que busqueu." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Títol: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Àlbum:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Artista: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Nom del fitxer: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Neteja la selecció anterior abans de cercar" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Posa o treu de la cua automàticament els elements trobats" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Crea una llista de reproducció nova amb els elements trobats" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Editor de llistes de l'Audacious" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3886,11 +3886,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "No s'ha pogut crear el directori (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "Quant al connector sndfile" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/cs.po -> audacious-plugins-3.0.3.tar.bz2/po/cs.po
Changed
@@ -21,7 +21,7 @@ msgstr "" "Project-Id-Version: audacious-plugins audacious-plugins-3.0-beta1\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-07-04 19:58+0200\n" "Last-Translator: Petr Písař <petr.pisar@atlas.cz>\n" "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n" @@ -1047,7 +1047,7 @@ msgid "Volume: (%)" msgstr "Hlasitost: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1074,7 +1074,7 @@ "libavformat %s (%s)\n" "libavutil %s (%s)\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "O modulu FFaudio" @@ -3719,11 +3719,11 @@ msgid "Delete auto-load preset" msgstr "Smazat souborovou předvolbu" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Vyhledat skladby v současném seznamu skladeb" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3735,40 +3735,40 @@ "regulárním výrazům nerozumíte, jednoduše vložte části textu, které chcete " "vyhledat." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Název: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Album: " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Umělec: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Jméno souboru: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Před hledáním vymazat předchozí výběr" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Shodující se položky automaticky zařadit/vyřadit z fronty" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Ze shodujících se položek vytvořit nový seznam skladeb" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Zobrazit editor seznamu skladeb" # FIXME: plural -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d z %d)" @@ -3786,11 +3786,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Adresář („%s“) nebylo možné vytvořit: %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "O modulu sndfile" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/cy.po -> audacious-plugins-3.0.3.tar.bz2/po/cy.po
Changed
@@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: audacious-plugins 1.3\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2007-02-12 03:37-0600\n" "Last-Translator: William Pitcock <nenolod@sacredspiral.co.uk>\n" "Language-Team: Welsh <i18n+cy@sacredspiral.co.uk>\n" @@ -1002,7 +1002,7 @@ msgid "Volume: (%)" msgstr "Sain:(%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1018,7 +1018,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 #, fuzzy msgid "About FFaudio Plugin" msgstr "Ategynnau Sain FLAC" @@ -3753,11 +3753,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3765,43 +3765,43 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 #, fuzzy msgid "Title: " msgstr "Teitl:" -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 #, fuzzy msgid "Album: " msgstr "Albwm:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 #, fuzzy msgid "Artist: " msgstr "Artist:" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 #, fuzzy msgid "Filename: " msgstr "Enw Defnyddiwr:" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3821,12 +3821,12 @@ "Methu gwirio'r cyfeiradur %s\n" "Gwall: %s" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 #, fuzzy msgid "About sndfile plugin" msgstr "Ategyn Sain WAV (sndfile)" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/de.po -> audacious-plugins-3.0.3.tar.bz2/po/de.po
Changed
@@ -2,8 +2,8 @@ msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" -"PO-Revision-Date: 2011-07-05 23:56+0100\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" +"PO-Revision-Date: 2011-09-06 23:54+0100\n" "Last-Translator: Thomas Lange\n" "Language-Team: german\n" "Language: \n" @@ -598,8 +598,8 @@ "manager otherwise the OSD won't work properly" msgstr "" "Composite-Manager nicht erkannt;\n" -"sofern ein solcher nicht doch aktiv ist, bitte einen solchen aktivieren, " -"sonst wird das OSD nicht funktionieren" +"Sofern ein solcher nicht doch aktiv ist, bitte einen solchen aktivieren, " +"ansonsten wird das OSD nicht funktionieren" #: src/aosd/aosd_ui.c:844 msgid "Composite manager not required for fake transparency" @@ -993,7 +993,7 @@ msgid "Volume: (%)" msgstr "Lautstärke: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1009,7 +1009,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "Über FFaudio Plugin" @@ -1441,7 +1441,7 @@ #: src/gtkui/menus.c:154 msgid "Jump to _Time ..." -msgstr "Zu Zeitangabe springen ..." +msgstr "Zu Z_eitangabe springen ..." #: src/gtkui/menus.c:155 msgid "_Jump to Song ..." @@ -1473,7 +1473,7 @@ #: src/gtkui/menus.c:164 msgid "By _Custom Title" -msgstr "Nach benutzerdefiniertem Titel" +msgstr "Nach _benutzerdefiniertem Titel" #: src/gtkui/menus.c:166 msgid "R_everse Order" @@ -1509,7 +1509,7 @@ #: src/gtkui/menus.c:180 msgid "_Playlist Manager ..." -msgstr "Wiedergabelisten-Manager ..." +msgstr "_Wiedergabelisten-Manager ..." #: src/gtkui/menus.c:183 msgid "Volume _Up" @@ -1884,14 +1884,12 @@ msgstr "MTP Gerät trennen" #: src/notify/libnotify-aosd_event.c:47 -#, fuzzy msgid "Stopped" -msgstr "Stopp" +msgstr "Gestoppt" #: src/notify/libnotify-aosd_event.c:47 -#, fuzzy msgid "Audacious is not playing." -msgstr "Fügt Dateien in Wiedergabeliste ein." +msgstr "Audacious spielt gerade nichts ab." #: src/null/null.c:64 msgid "Null output plugin " @@ -1946,6 +1944,7 @@ msgstr "Über OSS4-Plugin" #: src/oss4/plugin.c:52 +#, fuzzy msgid "" "OSS4 Output Plugin for Audacious\n" "Copyright 2010 Michał Lipski <tallica@o2.pl>\n" @@ -1966,6 +1965,25 @@ "You should have received a copy of the GNU General Public License along with " "this program. If not, see <http://www.gnu.org/licenses/>.\n" msgstr "" +"An Audacious angepasst von Tony Vroon <chainsaw@gentoo.org>\n" +"vom xmms_sndfile-Plugin:\n" +"Copyright (C) 2000, 2002 Erik de Castro Lopo\n" +"\n" +"This program is free software ; you can redistribute it and/or modify \n" +"it under the terms of the GNU General Public License as published by \n" +"the Free Software Foundation ; either version 2 of the License, or \n" +"(at your option) any later version. \n" +" \n" +"This program is distributed in the hope that it will be useful, \n" +"but WITHOUT ANY WARRANTY ; without even the implied warranty of \n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n" +"See the GNU General Public License for more details. \n" +"\n" +"You should have received a copy of the GNU General Public \n" +"License along with this program ; if not, write to \n" +"the Free Software Foundation, Inc., \n" +"51 Franklin Street, Fifth Floor, \n" +"Boston, MA 02110-1301 USA" #: src/oss4/utils.c:204 msgid "OSS4 error" @@ -2292,7 +2310,7 @@ #: src/sid/xs_interface.c:522 msgid "SIDPlay 1 (frame-based)" -msgstr "SIDPlay 1 (frame-basiert)" +msgstr "SIDPlay 1 (Frame-basiert)" #: src/sid/xs_interface.c:526 msgid "" @@ -2764,7 +2782,7 @@ #: src/skins/skins_cfg.c:254 msgid "_Player:" -msgstr "Hauptfenster:" +msgstr "_Hauptfenster:" #: src/skins/skins_cfg.c:254 msgid "Select main player window font:" @@ -2772,7 +2790,7 @@ #: src/skins/skins_cfg.c:255 msgid "_Playlist:" -msgstr "Wiedergabeliste:" +msgstr "_Wiedergabeliste:" #: src/skins/skins_cfg.c:255 msgid "Select playlist font:" @@ -2870,7 +2888,7 @@ #: src/skins/ui_main.c:828 #, c-format msgid "Volume: %d%%" -msgstr "Lautstärke: (%d%%)" +msgstr "Lautstaerke: (%d%%)" #: src/skins/ui_main.c:851 #, c-format @@ -3144,16 +3162,15 @@ msgstr "Ausgewählte Wiedergabelisten speichern." #: src/skins/ui_manager.c:229 +#, fuzzy msgid "Save All Playlists" -msgstr "Alle Wiedergabelisten speichern" +msgstr "Neue Wiedergabeliste" #: src/skins/ui_manager.c:230 msgid "" "Saves all the playlists that are open. Note that this is done automatically " "when Audacious quits." msgstr "" -"Alle geöffneten Playlisten speichern. Dies geschieht automatisch beim " -"Beenden von Audacious." #: src/skins/ui_manager.c:234 msgid "Refresh List" @@ -3164,12 +3181,14 @@ msgstr "Metadaten aktualisieren." #: src/skins/ui_manager.c:238 +#, fuzzy msgid "List Manager" -msgstr "Listenmanager" +msgstr "Wiedergabelisten-Manager" #: src/skins/ui_manager.c:239 +#, fuzzy msgid "Opens the playlist manager." -msgstr "Öffne Wiedergabelisten-Manager." +msgstr "Wiedergabeliste umkehren." #: src/skins/ui_manager.c:243 msgid "View" @@ -3207,7 +3226,7 @@ msgid "" "Searches the playlist and selects playlist entries based on specific " "criteria." -msgstr "Wiedergabeliste auf bestimmte Suchkriterien durchsuchen lassen" +msgstr "Wiedergabeliste nach bestimmte Suchkriterien durchsuchen lassen" #: src/skins/ui_manager.c:263 msgid "Invert Selection" @@ -3326,7 +3345,7 @@
View file
audacious-plugins-3.0.2.tar.gz/po/es.po -> audacious-plugins-3.0.3.tar.bz2/po/es.po
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Audacious\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: \n" "Last-Translator: Jorge Andrés <winninglero@gmail.com>\n" "Language-Team: \n" @@ -1023,7 +1023,7 @@ msgid "Volume: (%)" msgstr "Volumen: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, fuzzy, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1050,7 +1050,7 @@ " William Pitcock <nenolod@nenolod.net>,\n" " Matti Hämäläinen <ccr@tnsp.org>\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "Acerca del complemento FFaudio" @@ -3667,11 +3667,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3679,39 +3679,39 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Título: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Artista" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Nombre del archivo" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d de %d)" @@ -3729,11 +3729,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/et.po -> audacious-plugins-3.0.3.tar.bz2/po/et.po
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: audacious-plugins 1.4.2\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2007-12-30 17:49+0200\n" "Last-Translator: Ivar Smolin <okul@linux.ee>\n" "Language-Team: Estonian <et@li.org>\n" @@ -971,7 +971,7 @@ msgid "Volume: (%)" msgstr "Valjus: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -987,7 +987,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 #, fuzzy msgid "About FFaudio Plugin" msgstr "FLAC audiopluginast lähemalt" @@ -3647,11 +3647,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3659,43 +3659,43 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Pealkiri: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 #, fuzzy msgid "Album: " msgstr "Album:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 #, fuzzy msgid "Artist: " msgstr "Esitaja:" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 #, fuzzy msgid "Filename: " msgstr "Failinimi:" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 #, fuzzy msgid "Audacious Playlist Editor" msgstr "Esitusnimekirja andmed kiiresti" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3713,12 +3713,12 @@ msgid "Could not create directory (%s): %s\n" msgstr "" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 #, fuzzy msgid "About sndfile plugin" msgstr "ESounD'i pluginast lähemalt" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/eu.po -> audacious-plugins-3.0.3.tar.bz2/po/eu.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: audacious-plugins_eu\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2009-04-23 18:56+0200\n" "Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>\n" "Language-Team: Basque <itzulpena@euskalgnu.org>\n" @@ -1047,7 +1047,7 @@ msgid "Volume: (%)" msgstr "Bolumena (%):" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1063,7 +1063,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 #, fuzzy msgid "About FFaudio Plugin" msgstr "FLAC audioaren pluginari buruz" @@ -3825,11 +3825,11 @@ msgid "Delete auto-load preset" msgstr "Ezabatu autokargaren aurrezarpenak" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Bilatu sarrerak erreprodukzio-zerrenda aktiboan" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3841,39 +3841,39 @@ "minuskulak ez bereiztuz. Ez badakizu adierazpen erregularrak nola ibiltzen " "diren, sartu bilatzea nahi duzunaren zati literal bat." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Izenburua: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Albuma: " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Artista: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Fitxategi-izena: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Garbitu aurreko hautapena bilatu aurretik" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Txandakatu automatikoki ilara bat datozen sarrerentzako" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Sortu erreprodukzio-zerrenda berria bat datozen sarrerekin" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Audacious erreprodukzio-zerrendaren editorea" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3891,11 +3891,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Ezin izan da direktorioa (%s) sortu: %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "sndfile pluginari buruz" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/fr.po -> audacious-plugins-3.0.3.tar.bz2/po/fr.po
Changed
@@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Audacious-plugins 2.4\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-04-18 19:16+0200\n" "Last-Translator: Jean-Alexandre Anglès d'Auriac <jagw40k@free.fr>\n" "Language-Team: français <>\n" @@ -1066,7 +1066,7 @@ msgid "Volume: (%)" msgstr "Volume : (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, fuzzy, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1094,7 +1094,7 @@ "William Pitcock <nenolod@nenolod.net>\n" "Matti Hämäläinen <ccr@tnsp.org>\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "À propos du module « FFaudio »" @@ -3884,11 +3884,11 @@ msgid "Delete auto-load preset" msgstr "Efface un préréglage spécifique." -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Chercher des entrées dans la liste active" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3904,39 +3904,39 @@ "Si vous ne savez pas comment fonctionnent les expressions rationnelles, vous " "pouvez simplement indiquer une expression littérale de ce que vous cherchez." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Titre : " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Titre de l'album : " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Nom de l'artiste : " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Nom du fichier : " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Effacer la sélection précédente avant d'effectuer la recherche" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Mettre automatiquement dans la file d'attente les entrées trouvées" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Créer une nouvelle liste comportant les entrées trouvées" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Éditeur de la liste de lecture d'Audacious" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d sur %d)" @@ -3954,11 +3954,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Impossible de créer le répertoire (%s) : %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "À propos du module « sndfile »" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/hu.po -> audacious-plugins-3.0.3.tar.bz2/po/hu.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: audacious 2.4\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2010-08-23 12:00+0100\n" "Last-Translator: Peter Polonkai <polesz@nedudu.hu>\n" "Language-Team: Nedudu Team <nedudu@nedudu.hu>\n" @@ -967,7 +967,7 @@ msgid "Volume: (%)" msgstr "Hangerő: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -983,7 +983,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "FFaudio bővítmény névjegye" @@ -3528,11 +3528,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Elemek keresése az aktív lejátszólistában" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3540,39 +3540,39 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Cím:" -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Album:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Előadó:" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Fájlnév:" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Az előző kiválasztások törlése keresés előtt" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Automatikusan várólistára kerülnek a talált elemek" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Hozzon létre új lejátszólistát az egyező elemekből" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Audacious lejátszólista szerkesztő" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d / %d)" @@ -3590,11 +3590,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Nem lehet létrehozni a könyvtárat (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "sndfile bővítmény névjegye" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/ja.po -> audacious-plugins-3.0.3.tar.bz2/po/ja.po
Changed
@@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: audacious-plugins HEAD\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2008-07-08 13:10+0900\n" "Last-Translator: dai <d+po@vdr.jp>\n" "Language-Team: Japanese <ja@li.org>\n" @@ -1050,7 +1050,7 @@ msgid "Volume: (%)" msgstr "音量: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1066,7 +1066,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 #, fuzzy msgid "About FFaudio Plugin" msgstr "FLAC オーディオプラグインについて" @@ -3805,11 +3805,11 @@ msgid "Delete auto-load preset" msgstr "自動読み込みのプリセットの削除" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "有効になっているプレイリストのエントリを検索" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3820,39 +3820,39 @@ "正規表現が使え, 大文字と小文字を区別しません. 正規表現がどのように動作するか" "わからない場合は, 単純に検索しようとしているものの文字を入力します." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "タイトル: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "アルバム名: " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "アーティスト: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "ファイル名: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "検索前に以前の選択をクリア" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "マッチしたエントリのキューを自動的にトグル" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "マッチしたエントリで新しいプレイリストを作成" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Audacious プレイリストエディタ" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3870,11 +3870,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "ディレクトリ (%s) を作成できませんでした: %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "sndfile プラグインについて" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/lt.po -> audacious-plugins-3.0.3.tar.bz2/po/lt.po
Changed
@@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: audacious plugins 3.0\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-07-24 19:20+0300\n" "Last-Translator: gymka <gymka@mail.ru>\n" "Language-Team: Lietuvių <>\n" @@ -314,7 +314,8 @@ msgstr "derinta" #: src/amidi-plug/i_configure-fluidsynth.c:568 -msgid " Hz " +#, fuzzy +msgid "Hz " msgstr " Hz " #: src/amidi-plug/i_configure-fluidsynth.c:621 @@ -882,8 +883,9 @@ msgstr "" #: src/console/configure.c:235 src/sid/xs_interface.c:354 -msgid " Hz" -msgstr "" +#, fuzzy +msgid "Hz" +msgstr " Hz " #: src/console/configure.c:246 msgid "SPC" @@ -989,7 +991,7 @@ msgid "Volume: (%)" msgstr "" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1005,7 +1007,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "" @@ -1110,8 +1112,8 @@ msgstr "Išvesties samplerate:" #: src/filewriter/mp3.c:800 -msgid "( Hz)" -msgstr "( Hz)" +msgid "(Hz)" +msgstr "" #: src/filewriter/mp3.c:807 msgid "Bitrate / Compression ratio:" @@ -1931,6 +1933,7 @@ msgstr "" #: src/OSS/configure.c:146 +#, c-format msgid "Default (%s)" msgstr "" @@ -2088,6 +2091,7 @@ msgstr "" #: src/sid/xs_about.c:84 +#, c-format msgid "About %s" msgstr "" @@ -2125,7 +2129,7 @@ msgid "8-bit" msgstr "" -#: src/sid/xs_interface.c:270 +#: src/sid/xs_interface.c:277 msgid "16-bit" msgstr "16-bitų" @@ -2182,8 +2186,8 @@ #: src/sid/xs_interface.c:455 msgid "" -"PAL is the european TV standard, which uses 50 Hz vertical refresh " -"frequency. Most of SID-tunes have been made for PAL computers." +"PAL is the european TV standard, which uses 50Hz vertical refresh frequency. " +"Most of SID-tunes have been made for PAL computers." msgstr "" #: src/sid/xs_interface.c:459 @@ -2192,7 +2196,7 @@ #: src/sid/xs_interface.c:463 msgid "" -"NTSC is the TV standard with 60 Hz vertical refresh rate (and other features " +"NTSC is the TV standard with 60Hz vertical refresh rate (and other features " "that differ from PAL). It is mainly used in United States, Japan and certain " "other countries." msgstr "" @@ -2814,7 +2818,8 @@ msgstr "kbps" #: src/skins/ui_main.c:452 -msgid " kHz" +#, fuzzy +msgid "kHz" msgstr " kHz" #: src/skins/ui_main.c:459 @@ -3519,11 +3524,11 @@ msgid "Delete auto-load preset" msgstr "Ištrinti savaime įsikraunantį šabloną" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Ieškoti įrašų aktyviame grojaraštyje" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3535,39 +3540,39 @@ "nežinai kaip veikia regular expressions, paprasčiausiai įrašyk paraidžiui " "tai ko ieškai." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Pavadinimas:" -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Albumas:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Atlikėjas:" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Failo vardas:" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Išvalyti buvusius pasirinkimus prieš ieškant" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Automatiškai perjungti eilę atitinkantiem įrašam" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Sukuria naują grojaraštį iš surastų įrašų" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Audacious grojaraščio redaktorius" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d of %d)" @@ -3585,11 +3590,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Negaliu sukurt aplanko (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "Apie sndfile įsiepį" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n" @@ -3821,12 +3826,13 @@ msgstr "Apie Tonų Generatorių" #: src/tonegen/tonegen.c:50 +#, fuzzy msgid "" "Sinus tone generator by Haavard Kvaalen <havardk@xmms.org>\n" "Modified by Daniel J. Peng <danielpeng@bigfoot.com>\n"
View file
audacious-plugins-3.0.2.tar.gz/po/lv.po -> audacious-plugins-3.0.3.tar.bz2/po/lv.po
Changed
@@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: audacious-plugins2_22062009\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-06-27 04:01+0300\n" "Last-Translator: Einars Sprugis <einars8@gmail.com>\n" "Language-Team: Latvian <kde-i18n-doc@kde.org>\n" @@ -1029,7 +1029,7 @@ msgid "Volume: (%)" msgstr "Skaļums: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, fuzzy, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1054,7 +1054,7 @@ " William Pitcock <nenolod@nenolod.net>,\n" " Matti Hämäläinen <ccr@tnsp.org>\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "Par FFaudio spraudni" @@ -3700,11 +3700,11 @@ msgid "Delete auto-load preset" msgstr "Dzēst auto-ielādes sākumuzstādījumu" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Meklēt ierakstus aktīvajā repertuārā" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3715,39 +3715,39 @@ "jāizmanto regulāro izteiksmju sintakse, reģistrnejutīga. Ja neziniet, kā " "regulārās izteiksmes darbojas, vienkārši nosaukuma daļu tam, ko meklējat." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Nosaukums: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Albums: " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Izpildītājs: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Faila nosaukums: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Notīrīt iepriekšējo iezīmējumu pirms meklēšanas" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Automātiski pārslēgt ierindošanu atbilstošajiem ierakstiem" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Izveidot jaunu repertuāru no atbilstošajiem ierakstiem" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Audacious repertuāra redaktors" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d of %d)" @@ -3765,11 +3765,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Neizdevās izveidot mapi (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "Par sndfile spraudni" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/pl.po -> audacious-plugins-3.0.3.tar.bz2/po/pl.po
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Audacious Plugins\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-05-22 12:08+0200\n" "Last-Translator: Szymon Weihs <sz.weihs@gmail.com>\n" "Language-Team: \n" @@ -1028,7 +1028,7 @@ msgid "Volume: (%)" msgstr "Głośność: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, fuzzy, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1053,7 +1053,7 @@ " William Pitcock <nenolod@nenolod.net>,\n" " Matti Hämäläinen <ccr@tnsp.org>\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "O wtyczce FFaudio" @@ -3762,11 +3762,11 @@ msgid "Delete auto-load preset" msgstr "Usuń auto-ładowane ustawienia" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Wyszukaj wpisy w aktywnej playliście" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3778,39 +3778,39 @@ "Jeśli nie wiesz, jak działają wyrażenia regularne, po prostu wstawiaj części " "wyrazów tego, czego szukasz." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Tytuł: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Album:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Artysta:" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Nazwa pliku:" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Wyczyść poprzednie zaznaczenie przed szukaniem" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Automatycznie przełącz kolejkę dla pasujących wpisów" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Utwórz nową playlistę z pasującymi wpisami" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Edytor playlisty Audacious" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d z %d)" @@ -3828,11 +3828,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Nie można utworzyć katalogu (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "O wtyczce sndfile" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/ro.po -> audacious-plugins-3.0.3.tar.bz2/po/ro.po
Changed
@@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: audacious-plugins 1.4.0\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2007-08-28 20:44+0200\n" "Last-Translator: Daniel Patriche <m4st3rth0r@gmail.com>\n" "Language-Team: Romanian <audacious@atheme.org>\n" @@ -1038,7 +1038,7 @@ msgid "Volume: (%)" msgstr "Volum: %d%%" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1054,7 +1054,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 #, fuzzy msgid "About FFaudio Plugin" msgstr "Despre plugin-ul·Apple·Lossless·Audio" @@ -3801,11 +3801,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3813,43 +3813,43 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Titlu: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 #, fuzzy msgid "Album: " msgstr "Album" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 #, fuzzy msgid "Artist: " msgstr "Artist" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 #, fuzzy msgid "Filename: " msgstr "Fișier:" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 #, fuzzy msgid "Audacious Playlist Editor" msgstr "AdPlug·::·Informații despre fișier" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3867,12 +3867,12 @@ msgid "Could not create directory (%s): %s\n" msgstr "Nu s-a putut crea directorul (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 #, fuzzy msgid "About sndfile plugin" msgstr "Lista plugin-urilor _Generale" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/ru.po -> audacious-plugins-3.0.3.tar.bz2/po/ru.po
Changed
@@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: audacious-plugins 1.5\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2010-08-22 22:00+0400\n" "Last-Translator: Sergey V. Mironov <sergo@bk.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n" @@ -1047,7 +1047,7 @@ msgid "Volume: (%)" msgstr "Громкость (%):" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, fuzzy, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1072,7 +1072,7 @@ " William Pitcock <nenolod@nenolod.net>,\n" " Matti Hämäläinen <ccr@tnsp.org>\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "О модуле FFaudio" @@ -3819,11 +3819,11 @@ msgid "Delete auto-load preset" msgstr "Удалить автозагружаемую предустановку" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Поиск записей в активном списке воспроизведения" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3835,39 +3835,39 @@ "чувствительное к регистру. Если вы не знаете, как работают регулярные " "выражения, просто вставьте часть букв из слова, которые хотите найти." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Название: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Альбом: " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Исполнитель: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Имя файла: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Очистить предыдущий выбор до начала поиска" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Автоматически переключать поочерёдно на соответствующим записям" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Создать новый список воспроизведения с соответствующими записями" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Редактор списков воспроизведения Audacious" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d из %d)" @@ -3885,11 +3885,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Невозможно создать каталог (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "О модуле sndfile" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/sk.po -> audacious-plugins-3.0.3.tar.bz2/po/sk.po
Changed
@@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: sk\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-03-13 20:35+0100\n" "Last-Translator: Andrej Herceg <herceg.andrej@zoznam.sk>\n" "Language-Team: Slovak <Slovak <sk-i18n@lists.linux.sk>>\n" @@ -1034,7 +1034,7 @@ msgid "Volume: (%)" msgstr "Hlasitosť: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, fuzzy, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1059,7 +1059,7 @@ " William Pitcock <nenolod@nenolod.net>,\n" " Matti Hämäläinen <ccr@tnsp.org>\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "O module FFaudio" @@ -3757,11 +3757,11 @@ msgid "Delete auto-load preset" msgstr "Vymaže automaticky načítavané prednastavenia" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "Vyhľadať skladby v aktívnom zozname skladieb" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3773,39 +3773,39 @@ "regulárnym výrazom nerozumiete, jednoducho zadajte časť textu, ktorý chcete " "vyhľadať." -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Názov: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "Album: " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "Umelec: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "Názov súboru: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "Pred hľadaním vymazať predchádzajúci výber" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "Zhodujúce sa položky pridať do (odstrániť z) frontu" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "Zo zhodujúcich sa položiek vytvoriť nový zoznam skladieb" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Editor zoznamu skladieb" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "%s (%d z %d)" @@ -3823,11 +3823,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "Nepodarilo sa vytvoriť adresár (%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "Modul sndfile (WAV)" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/tr.po -> audacious-plugins-3.0.3.tar.bz2/po/tr.po
Changed
@@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: audacious-plugins\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2007-12-22 23:09+0200\n" "Last-Translator: Onur Küçük <onur@pardus.org.tr>\n" "Language-Team: Turkish\n" @@ -1054,7 +1054,7 @@ msgid "Volume: (%)" msgstr "Ses: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1070,7 +1070,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 #, fuzzy msgid "About FFaudio Plugin" msgstr "FLAC Ses Eklentisi Hakkında" @@ -3874,11 +3874,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3886,43 +3886,43 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "Başlık: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 #, fuzzy msgid "Album: " msgstr "Albüm:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 #, fuzzy msgid "Artist: " msgstr "Sanatçı:" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 #, fuzzy msgid "Filename: " msgstr "Dosya adı:" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 #, fuzzy msgid "Audacious Playlist Editor" msgstr "Hızlı Parça Listesi Bilgisi" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3940,12 +3940,12 @@ msgid "Could not create directory (%s): %s\n" msgstr "sidFilename ('%s') ayrılamadı\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 #, fuzzy msgid "About sndfile plugin" msgstr "sndfile WAV eklentisi" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/zh_CN.po -> audacious-plugins-3.0.3.tar.bz2/po/zh_CN.po
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Audacious-plugins 2.4\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-04-11 21:58+0800\n" "Last-Translator: Chasye <chasye@gmail.com>\n" "Language-Team: Chinese (simplified)\n" @@ -1012,7 +1012,7 @@ msgid "Volume: (%)" msgstr "音量:(%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, fuzzy, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -1037,7 +1037,7 @@ " William Pitcock <nenolod@nenolod.net>,\n" " Matti Hämäläinen <ccr@tnsp.org>\n" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "关于FFaudio插件" @@ -3594,11 +3594,11 @@ msgid "Delete auto-load preset" msgstr "删除自动加载预设" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "从当前播放列表中搜索条目" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3608,39 +3608,39 @@ "按部分字段搜索播放列表中的条目。各个字段都可以使用正则表达式,而且是不分大小" "字的。如果你不知道何为正则表达式,简单的输入部分你想搜索的文字亦可。" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "标题:" -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "专辑:" -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "艺术家:" -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "文件名" -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "搜索前清空之前的结果" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "自动为区配条目切换队列" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "用匹配的条目创建新的播放列表" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "Audacious播放列表编辑器" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3658,11 +3658,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "无法创建目录(%s): %s\n" -#: src/sndfile/plugin.c:438 +#: src/sndfile/plugin.c:454 msgid "About sndfile plugin" msgstr "关于sndfile插件" -#: src/sndfile/plugin.c:439 +#: src/sndfile/plugin.c:455 msgid "" "Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n" "from the xmms_sndfile plugin which is:\n"
View file
audacious-plugins-3.0.2.tar.gz/po/zh_TW.po -> audacious-plugins-3.0.3.tar.bz2/po/zh_TW.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: audacious-plugins 3.0\n" "Report-Msgid-Bugs-To: http://jira.atheme.org/\n" -"POT-Creation-Date: 2011-07-17 18:49-0400\n" +"POT-Creation-Date: 2011-09-18 14:13-0400\n" "PO-Revision-Date: 2011-07-27 10:39+0800\n" "Last-Translator: Ruei-Yuan Lu <RueiYuan.Lu@gmail.com>\n" "Language-Team: Chinese (traditional)\n" @@ -15,8 +15,8 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +# "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: src/aac/libmp4.c:256 #, c-format msgid "" @@ -28,7 +28,6 @@ "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com\n" "Copyright (c) 2005-2006 Audacious team" - #: src/aac/libmp4.c:261 msgid "About MP4 AAC decoder plugin" msgstr "關於 MP4 AAC 解碼器外掛" @@ -73,7 +72,8 @@ msgid "" "You have not selected any sequencer ports for MIDI playback. You can do so " "in the MIDI plugin preferences." -msgstr "您尚未選擇任何用於播放 MIDI 的編曲機連接埠。請到 MIDI 外掛偏好設定中設定。" +msgstr "" +"您尚未選擇任何用於播放 MIDI 的編曲機連接埠。請到 MIDI 外掛偏好設定中設定。" #: src/amidi-plug/backend-alsa/b-alsa.c:35 msgid "ALSA Backend " @@ -90,11 +90,13 @@ "hardware synth will be directly played.\n" "Backend written by Giacomo Lozito." msgstr "" -"這個後端會傳送 MIDI 事件到一組由使用者指定的 ALSA 編曲機連接埠。" -"ALSA 編曲機介面有很多功能,它不但可以提供連接埠給音效卡上的硬體編曲機 (如" -" emu10k1) 還可以給軟體合成器與外接裝置等。\n\n" -"這個後端本身並不產生音效,MIDI 事件直接由 ALSA 連接埠後的裝置或程式來處理;" -"舉例來說,MIDI 事件被送到硬體合成器以後將會被直接播放。\n\n" +"這個後端會傳送 MIDI 事件到一組由使用者指定的 ALSA 編曲機連接埠。ALSA 編曲機介" +"面有很多功能,它不但可以提供連接埠給音效卡上的硬體編曲機 (如 emu10k1) 還可以" +"給軟體合成器與外接裝置等。\n" +"\n" +"這個後端本身並不產生音效,MIDI 事件直接由 ALSA 連接埠後的裝置或程式來處理;舉" +"例來說,MIDI 事件被送到硬體合成器以後將會被直接播放。\n" +"\n" "作者:Giacomo Lozito" #: src/amidi-plug/backend-fluidsynth/b-fluidsynth.c:38 @@ -110,9 +112,11 @@ "by chosen ouput plugin.\n" "Backend written by Giacomo Lozito." msgstr "" -"這個後端會將 MIDI 事件傳送給 FluidSynth 並產生音效,FluidSynth 是一個基於 SoundFont2" -" 規格 (www.fluidsynth.org) 的即時軟體合成器。\n\n" -"產生的音效會被播放器的特效外掛與輸出外掛影響。\n\n" +"這個後端會將 MIDI 事件傳送給 FluidSynth 並產生音效,FluidSynth 是一個基於 " +"SoundFont2 規格 (www.fluidsynth.org) 的即時軟體合成器。\n" +"\n" +"產生的音效會被播放器的特效外掛與輸出外掛影響。\n" +"\n" "作者:Giacomo Lozito" #: src/amidi-plug/i_configure-alsa.c:228 @@ -159,7 +163,6 @@ "<span size=\"smaller\">ALSA\n" "後端</span>" - #: src/amidi-plug/i_configure-ap.c:59 msgid "AMIDI-Plug - backend information" msgstr "AMIDI-Plug - 後端資訊" @@ -900,8 +903,7 @@ #: src/crossfade/plugin.c:140 msgid "" "Crossfading failed because the songs had a different number of channels." -msgstr "" -"因為歌曲間的聲道數不同,無法使用 Crossfade。" +msgstr "因為歌曲間的聲道數不同,無法使用 Crossfade。" #: src/crossfade/plugin.c:148 msgid "" @@ -956,7 +958,7 @@ msgid "Volume: (%)" msgstr "音量: (%)" -#: src/ffaudio/ffaudio-core.c:763 +#: src/ffaudio/ffaudio-core.c:789 #, c-format msgid "" "Multi-format audio decoding plugin for Audacious based on\n" @@ -972,7 +974,7 @@ "libavutil %s (%s)\n" msgstr "" -#: src/ffaudio/ffaudio-core.c:777 +#: src/ffaudio/ffaudio-core.c:803 msgid "About FFaudio Plugin" msgstr "" @@ -1759,7 +1761,6 @@ "\n" "尋找歌詞中 ..." - #: src/lyricwiki/lyricwiki.c:249 msgid "" "\n" @@ -1768,7 +1769,6 @@ "\n" "連線到 lyrics.wikia.com..." - #: src/lyricwiki/lyricwiki.c:337 msgid "" "\n" @@ -3037,8 +3037,7 @@ msgid "" "Saves all the playlists that are open. Note that this is done automatically " "when Audacious quits." -msgstr "" -"儲存所有已開啟的播放清單。請注意,每當 Audacious 離開時會自動儲存。" +msgstr "儲存所有已開啟的播放清單。請注意,每當 Audacious 離開時會自動儲存。" #: src/skins/ui_manager.c:234 msgid "Refresh List" @@ -3443,11 +3442,11 @@ msgid "Delete auto-load preset" msgstr "" -#: src/skins/ui_playlist.c:244 +#: src/skins/ui_playlist.c:245 msgid "Search entries in active playlist" msgstr "" -#: src/skins/ui_playlist.c:252 +#: src/skins/ui_playlist.c:253 msgid "" "Select entries in playlist by filling one or more fields. Fields use regular " "expressions syntax, case-insensitive. If you don't know how regular " @@ -3455,39 +3454,39 @@ "for." msgstr "" -#: src/skins/ui_playlist.c:260 +#: src/skins/ui_playlist.c:261 msgid "Title: " msgstr "標題: " -#: src/skins/ui_playlist.c:267 +#: src/skins/ui_playlist.c:268 msgid "Album: " msgstr "專輯: " -#: src/skins/ui_playlist.c:274 +#: src/skins/ui_playlist.c:275 msgid "Artist: " msgstr "藝人: " -#: src/skins/ui_playlist.c:281 +#: src/skins/ui_playlist.c:282 msgid "Filename: " msgstr "檔名: " -#: src/skins/ui_playlist.c:289 +#: src/skins/ui_playlist.c:290 msgid "Clear previous selection before searching" msgstr "" -#: src/skins/ui_playlist.c:292 +#: src/skins/ui_playlist.c:293 msgid "Automatically toggle queue for matching entries" msgstr "" -#: src/skins/ui_playlist.c:295 +#: src/skins/ui_playlist.c:296 msgid "Create a new playlist with matching entries" msgstr "" -#: src/skins/ui_playlist.c:762 +#: src/skins/ui_playlist.c:763 msgid "Audacious Playlist Editor" msgstr "" -#: src/skins/ui_playlist.c:809 +#: src/skins/ui_playlist.c:810 #, c-format msgid "%s (%d of %d)" msgstr "" @@ -3505,11 +3504,11 @@ msgid "Could not create directory (%s): %s\n" msgstr "無法建立資料夾 (%s): %s\n"
View file
audacious-plugins-3.0.2.tar.gz/src/cairo-spectrum/Makefile -> audacious-plugins-3.0.3.tar.bz2/src/cairo-spectrum/Makefile
Changed
@@ -9,3 +9,4 @@ CFLAGS += -std=gnu99 ${PLUGIN_CFLAGS} CPPFLAGS += ${PLUGIN_CPPFLAGS} -I../.. +LIBS += -lm
View file
audacious-plugins-3.0.2.tar.gz/src/ffaudio/ffaudio-core.c -> audacious-plugins-3.0.3.tar.bz2/src/ffaudio/ffaudio-core.c
Changed
@@ -43,14 +43,36 @@ static gint64 seek_value = -1; static gboolean stop_flag = FALSE; +static GStaticMutex data_mutex = G_STATIC_MUTEX_INIT; static mowgli_patricia_t * extension_dict = NULL; +static gint lockmgr (void * * mutexp, enum AVLockOp op) +{ + switch (op) + { + case AV_LOCK_CREATE: + * mutexp = g_mutex_new (); + break; + case AV_LOCK_OBTAIN: + g_mutex_lock (* mutexp); + break; + case AV_LOCK_RELEASE: + g_mutex_unlock (* mutexp); + break; + case AV_LOCK_DESTROY: + g_mutex_free (* mutexp); + break; + } + + return 0; +} + static gboolean ffaudio_init (void) { avcodec_init(); av_register_all(); + av_lockmgr_register (lockmgr); - AUDDBG("creating seek mutex/cond\n"); ctrl_mutex = g_mutex_new(); ctrl_cond = g_cond_new(); @@ -70,6 +92,8 @@ if (extension_dict) mowgli_patricia_destroy (extension_dict, NULL, NULL); + + av_lockmgr_register (NULL); } static const gchar * ffaudio_strerror (gint error) @@ -116,11 +140,13 @@ return NULL; AUDDBG ("Get format by extension: %s\n", name); + g_static_mutex_lock (& data_mutex); if (! extension_dict) extension_dict = create_extension_dict (); AVInputFormat * f = mowgli_patricia_retrieve (extension_dict, ext); + g_static_mutex_unlock (& data_mutex); if (f) AUDDBG ("Format %s.\n", f->name);
View file
audacious-plugins-3.0.2.tar.gz/src/gtkui/Makefile -> audacious-plugins-3.0.3.tar.bz2/src/gtkui/Makefile
Changed
@@ -18,3 +18,4 @@ CFLAGS += -std=gnu99 ${PLUGIN_CFLAGS} CPPFLAGS += ${PLUGIN_CPPFLAGS} -I../.. +LIBS += -lm
View file
audacious-plugins-3.0.2.tar.gz/src/gtkui/layout.c -> audacious-plugins-3.0.3.tar.bz2/src/gtkui/layout.c
Changed
@@ -304,22 +304,6 @@ g_object_get_data ((GObject *) docks[item->dock], "mine"); } -static void item_save_size (Item * item) -{ - g_return_if_fail (item->widget && item->vbox); - - GtkAllocation rect; - gtk_widget_get_allocation (item->vbox, & rect); - item->w = rect.width; - item->h = rect.height; - - if (item->dock < 0) - { - g_return_if_fail (item->window); - gtk_window_get_position ((GtkWindow *) item->window, & item->x, & item->y); - } -} - static void item_add (Item * item) { g_return_if_fail (item->name && item->widget && item->vbox && ! item->paned @@ -360,7 +344,6 @@ swap = TRUE; where = item_get_prev (item); g_return_if_fail (where && ! where->paned); - item_save_size (where); } parent = item_get_parent (where); @@ -400,8 +383,6 @@ { g_return_if_fail (item->widget && item->vbox); - item_save_size (item); - if (item->dock < 0) { g_return_if_fail (item->window); @@ -453,6 +434,12 @@ } } +static void size_changed_cb (GtkWidget * widget, GdkRectangle * rect, Item * item) +{ + item->w = rect->width; + item->h = rect->height; +} + void layout_add (GtkWidget * widget, const gchar * name) { g_return_if_fail (layout && center && widget && name && strlen (name) <= 256 @@ -475,6 +462,8 @@ item->vbox = vbox_new (widget, name); NULL_ON_DESTROY (item->vbox); + g_signal_connect (item->vbox, "size-allocate", (GCallback) size_changed_cb, item); + item_add (item); } @@ -529,9 +518,6 @@ Item * item = node->data; g_return_if_fail (item && item->name); - if (item->widget) - item_save_size (item); - fprintf (handle, "item %s\npane %d\nx %d\ny %d\nw %d\nh %d\n", item->name, item->dock, item->x, item->y, item->w, item->h); }
View file
audacious-plugins-3.0.2.tar.gz/src/hotkey/plugin.c -> audacious-plugins-3.0.3.tar.bz2/src/hotkey/plugin.c
Changed
@@ -47,6 +47,7 @@ #include <audacious/i18n.h> #include <audacious/plugin.h> #include <libaudcore/hook.h> +#include <libaudcore/eventqueue.h> #include "plugin.h" #include "gui.h" @@ -239,7 +240,11 @@ /* Toggle Windows */ if (event == EVENT_TOGGLE_WIN) { - hook_call ("interface toggle visibility", NULL); + /* Workaround for AUD-369: + * When a hotkey is pressed, the interface temporarily loses keyboard + * focus. This causes "interface toggle visibility" to raise the window + * when it ought to hide it. The 1/10 second delay prevents this. */ + event_queue_timed (100, "interface toggle visibility", NULL); return TRUE; }
View file
audacious-plugins-3.0.2.tar.gz/src/modplug/Makefile -> audacious-plugins-3.0.3.tar.bz2/src/modplug/Makefile
Changed
@@ -1,41 +1,10 @@ PLUGIN = modplug${PLUGIN_SUFFIX} -SRCS = plugin.cxx \ - modplugbmp.cxx \ - tables.cxx \ - sndmix.cxx \ - sndfile.cxx \ - snd_eq.cxx \ - snd_fx.cxx \ - snd_flt.cxx \ - snd_dsp.cxx \ - fastmix.cxx \ - mmcmp.cxx \ - load_xm.cxx \ - load_wav.cxx \ - load_umx.cxx \ - load_ult.cxx \ - load_stm.cxx \ - load_s3m.cxx \ - load_ptm.cxx \ - load_okt.cxx \ - load_mtm.cxx \ - load_mod.cxx \ - load_med.cxx \ - load_mdl.cxx \ - load_it.cxx \ - load_far.cxx \ - load_dsm.cxx \ - load_dmf.cxx \ - load_dbm.cxx \ - load_ams.cxx \ - load_amf.cxx \ - load_669.cxx \ - load_mt2.cxx \ - load_psm.cxx \ - archive/archive.cxx \ - archive/open.cxx \ - archive/arch_raw.cxx \ +SRCS = archive/arch_raw.cxx \ + archive/archive.cxx \ + archive/open.cxx \ + plugin.cxx \ + modplugbmp.cxx \ plugin_main.c include ../../buildsys.mk @@ -46,5 +15,5 @@ LD = ${CXX} CFLAGS += ${PLUGIN_CFLAGS} CXXFLAGS += ${PLUGIN_CFLAGS} -CPPFLAGS += ${PLUGIN_CPPFLAGS} ${MOWGLI_CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS} -I.. -I../.. -I../../intl -LIBS += ${MOWGLI_LIBS} ${GTK_LIBS} ${GLIB_LIBS} -lstdc++ +CPPFLAGS += ${PLUGIN_CPPFLAGS} ${MOWGLI_CFLAGS} ${MODPLUG_CFLAGS} -I../.. +LIBS += ${MOWGLI_LIBS} ${MODPLUG_LIBS} -lstdc++
View file
audacious-plugins-3.0.2.tar.gz/src/mpg123/mpg123.c -> audacious-plugins-3.0.3.tar.bz2/src/mpg123/mpg123.c
Changed
@@ -450,7 +450,7 @@ } data->output->write_audio (outbuf, outbuf_size); - frames_played += outbuf_size / (2 * ctx.channels); + frames_played += outbuf_size / (sizeof outbuf[0] * ctx.channels); outbuf_size = 0; if (stop)
View file
audacious-plugins-3.0.2.tar.gz/src/notify/libnotify-aosd_event.c -> audacious-plugins-3.0.3.tar.bz2/src/notify/libnotify-aosd_event.c
Changed
@@ -75,6 +75,7 @@ if (! GPOINTER_TO_INT (explicit) && last_title && last_message && ! strcmp (title, last_title) && ! strcmp (message, last_message)) { + g_free (title); g_free (message); return; }
View file
audacious-plugins-3.0.2.tar.gz/src/skins/Makefile -> audacious-plugins-3.0.3.tar.bz2/src/skins/Makefile
Changed
@@ -161,3 +161,4 @@ CPPFLAGS += -std=gnu99 ${PLUGIN_CPPFLAGS} -I../.. CFLAGS += ${PLUGIN_CFLAGS} +LIBS += -lm
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.