From 6376169cf7895aee11c3b403b055c12f1fb2441a Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 21 Mar 2001 22:59:07 +0000 Subject: [PATCH] cleanup whitespace --- src/libFLAC/include/private/lpc.h | 2 +- src/libFLAC/md5.c | 2 +- src/metaflac/main.c | 2 +- src/plugin_winamp2/in2.h | 20 ++++---- src/plugin_winamp2/out.h | 20 ++++---- src/plugin_winamp3/core_api.h | 96 +++++++++++++++++++-------------------- src/plugin_winamp3/in_flac.cpp | 6 +-- 7 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/libFLAC/include/private/lpc.h b/src/libFLAC/include/private/lpc.h index 069d459..fcf8462 100644 --- a/src/libFLAC/include/private/lpc.h +++ b/src/libFLAC/include/private/lpc.h @@ -51,7 +51,7 @@ void FLAC__lpc_compute_autocorrelation(const real data[], unsigned data_len, uns * *** IMPORTANT: * *** lp_coeff[0,max_order-1][max_order,FLAC__MAX_LPC_ORDER-1] are untouched * OUT error[0,max_order-1] error for each order - * + * * Example: if max_order is 9, the LP coefficients for order 9 will be * in lp_coeff[8][0,8], the LP coefficients for order 8 will be * in lp_coeff[7][0,7], etc. diff --git a/src/libFLAC/md5.c b/src/libFLAC/md5.c index 7938cd0..85330f9 100644 --- a/src/libFLAC/md5.c +++ b/src/libFLAC/md5.c @@ -147,7 +147,7 @@ FLAC__MD5Accumulate(struct MD5Context *ctx, const int32 *signal[], unsigned chan } /* - * Final wrapup - pad to 64-byte boundary with the bit pattern + * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ void diff --git a/src/metaflac/main.c b/src/metaflac/main.c index b13a805..5562db9 100644 --- a/src/metaflac/main.c +++ b/src/metaflac/main.c @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* +/* * WATCHOUT - this is meant to be very lightweight an not even dependent * on libFLAC, so there are a couple places where FLAC__* variables are * duplicated here. Look for 'DUPLICATE:' in comments. diff --git a/src/plugin_winamp2/in2.h b/src/plugin_winamp2/in2.h index dcac5ba..8886027 100644 --- a/src/plugin_winamp2/in2.h +++ b/src/plugin_winamp2/in2.h @@ -7,7 +7,7 @@ #define IN_VER 0x100 -typedef struct +typedef struct { int version; // module type (IN_VER) char *description; // description of module, with version string @@ -17,8 +17,8 @@ typedef struct char *FileExtensions; // "mp3\0Layer 3 MPEG\0mp2\0Layer 2 MPEG\0mpg\0Layer 1 MPEG\0" // May be altered from Config, so the user can select what they want - - int is_seekable; // is this stream seekable? + + int is_seekable; // is this stream seekable? int UsesOutputPlug; // does this plug-in use the output plug-ins? (musn't ever change, ever :) void (*Config)(HWND hwndParent); // configuration dialog @@ -29,7 +29,7 @@ typedef struct void (*GetFileInfo)(char *file, char *title, int *length_in_ms); // if file == NULL, current playing is used int (*InfoBox)(char *file, HWND hwndParent); - + int (*IsOurFile)(char *fn); // called before extension checks, to allow detection of mms://, etc // playback stuff int (*Play)(char *fn); // return zero on success, -1 on file-not-found, some other value on other (stopping winamp) error @@ -46,7 +46,7 @@ typedef struct // volume stuff void (*SetVolume)(int volume); // from 0 to 255.. usually just call outMod->SetVolume void (*SetPan)(int pan); // from -127 to 127.. usually just call outMod->SetPan - + // in-window builtin vis stuff void (*SAVSAInit)(int maxlatency_in_ms, int srate); // call once in Play(). maxlatency_in_ms should be the value returned from outMod->Open() @@ -55,7 +55,7 @@ typedef struct // simple vis supplying mode - void (*SAAddPCMData)(void *PCMData, int nch, int bps, int timestamp); + void (*SAAddPCMData)(void *PCMData, int nch, int bps, int timestamp); // sets the spec data directly from PCM data // quick and easy way to get vis working :) // needs at least 576 samples :) @@ -77,19 +77,19 @@ typedef struct void (*VSAAdd)(void *data, int timestamp); // filled in by winamp, called by plug-in - // call this in Play() to tell the vis plug-ins the current output params. + // call this in Play() to tell the vis plug-ins the current output params. void (*VSASetInfo)(int nch, int srate); - // dsp plug-in processing: + // dsp plug-in processing: // (filled in by winamp, called by input plug) // returns 1 if active (which means that the number of samples returned by dsp_dosamples // could be greater than went in.. Use it to estimate if you'll have enough room in the // output buffer - int (*dsp_isactive)(); + int (*dsp_isactive)(); - // returns number of samples to output. This can be as much as twice numsamples. + // returns number of samples to output. This can be as much as twice numsamples. // be sure to allocate enough buffer for samples, then. int (*dsp_dosamples)(short int *samples, int numsamples, int bps, int nch, int srate); diff --git a/src/plugin_winamp2/out.h b/src/plugin_winamp2/out.h index f82708a..e8ad412 100644 --- a/src/plugin_winamp2/out.h +++ b/src/plugin_winamp2/out.h @@ -3,37 +3,37 @@ #define OUT_VER 0x10 -typedef struct +typedef struct { int version; // module version (OUT_VER) char *description; // description of module, with version string int id; // module id. each input module gets its own. non-nullsoft modules should - // be >= 65536. + // be >= 65536. HWND hMainWindow; // winamp's main window (filled in by winamp) HINSTANCE hDllInstance; // DLL instance handle (filled in by winamp) - void (*Config)(HWND hwndParent); // configuration dialog + void (*Config)(HWND hwndParent); // configuration dialog void (*About)(HWND hwndParent); // about dialog void (*Init)(); // called when loaded void (*Quit)(); // called when unloaded - int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms); + int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms); // returns >=0 on success, <0 on failure - // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins. + // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins. // ... so don't expect the max latency returned to be what you asked for. // returns max latency in ms (0 for diskwriters, etc) - // bufferlenms and prebufferms must be in ms. 0 to use defaults. + // bufferlenms and prebufferms must be in ms. 0 to use defaults. // prebufferms must be <= bufferlenms void (*Close)(); // close the ol' output device. - int (*Write)(char *buf, int len); - // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data. + int (*Write)(char *buf, int len); + // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data. // 1 returns not able to write (yet). Non-blocking, always. - int (*CanWrite)(); // returns number of bytes possible to write at a given time. + int (*CanWrite)(); // returns number of bytes possible to write at a given time. // Never will decrease unless you call Write (or Close, heh) int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be @@ -44,7 +44,7 @@ typedef struct void (*SetVolume)(int volume); // volume is 0-255 void (*SetPan)(int pan); // pan is -128 to 128 - void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms) + void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms) // (used for seeking) int (*GetOutputTime)(); // returns played time in MS diff --git a/src/plugin_winamp3/core_api.h b/src/plugin_winamp3/core_api.h index b26531e..c627726 100644 --- a/src/plugin_winamp3/core_api.h +++ b/src/plugin_winamp3/core_api.h @@ -1,10 +1,10 @@ /* Winamp 3 Player core api v0.1 ** (c)2000 nullsoft jcf/ct/dk -** Notes: -** Keep in mind that this header file is subject to change prior to the -** release of Winamp 3. The ability to configure plug-ins has yet to be -** added and is the first and foremost concern of the engineering team. +** Notes: +** Keep in mind that this header file is subject to change prior to the +** release of Winamp 3. The ability to configure plug-ins has yet to be +** added and is the first and foremost concern of the engineering team. */ #ifndef __CORE_API_H @@ -71,7 +71,7 @@ class WPlayer_callback { public: /* GetReader - ** Allows your Input Source and Output Filter plugins to request a reader from Winamp, + ** Allows your Input Source and Output Filter plugins to request a reader from Winamp, ** so you don't have to worry about opening files or streams */ virtual WReader *GetReader(char *url)=0; @@ -152,7 +152,7 @@ class WInputInfo ** the useful information into member elements for quick access by other functions */ virtual int Open(char *url) { return 1; } - + /* GetTitle ** Called by Winamp to get the decoded title about the file opened ** i.e. id3 title name, etc... @@ -170,17 +170,17 @@ class WInputInfo ** returns -1 if length is undefined/infinite */ virtual int GetLength(void) { return -1; }; - + /* GetMetaData ** Fetches metadata by attribute name (Artist, Album, Bitrate, etc...) ** attribute names are non case-sensitive. ** returns size of data */ - virtual int GetMetaData(char *name, char *data, int data_len) { if (data&&data_len>0) *data=0; return 0; } - + virtual int GetMetaData(char *name, char *data, int data_len) { if (data&&data_len>0) *data=0; return 0; } + /* ~WInputInfo ** WInputInfo virtual destructor - */ + */ virtual ~WInputInfo() { }; }; @@ -191,19 +191,19 @@ class WInputInfo -/* WINAMP Output Filter NOTIFY MESSAGES +/* WINAMP Output Filter NOTIFY MESSAGES ** Messages returned to notify Output Filter plug-ins of events */ typedef enum { - + /* WOFNM_FILETITLECHANGE - ** Sent when the song changes + ** Sent when the song changes ** param1=new filename song ** param2=new title song */ WOFNM_FILETITLECHANGE=1024, - + /* WOFNM_ENDOFDECODE ** Sent when decoding ends */ @@ -214,12 +214,12 @@ typedef enum { -class WOutputFilter +class WOutputFilter { protected: /* WOutputFilter ** WOutputFilter constructor - */ + */ WOutputFilter() { m_next=NULL; }; public: @@ -262,17 +262,17 @@ class WOutputFilter /* FlushSamples ** Flushes output buffers so that all is written */ - virtual void FlushSamples(bool *killswitch) { }; + virtual void FlushSamples(bool *killswitch) { }; /* Restart ** Called by Winamp after a seek */ - virtual void Restart(void) { } + virtual void Restart(void) { } /* GetLatency ** Returns < 0 for a final output latency, > 0 for an additive */ - virtual int GetLatency(void) { return 0; } + virtual int GetLatency(void) { return 0; } /* Pause ** Suspends output @@ -290,7 +290,7 @@ class WOutputFilter ** Sets the volume (0 to 255) ** return 1 if volume successfully modified */ - virtual int SetVolume(int volume) { return 0; } + virtual int SetVolume(int volume) { return 0; } /* SetPan ** Sets Left-Right sound balance (-127 to 127) @@ -358,7 +358,7 @@ class WInputSource ** Sets the volume (0 to 255) ** Return 1 if volume has been set */ - virtual int SetVolume(int volume) { return 0; }; + virtual int SetVolume(int volume) { return 0; }; /* SetPan ** Sets Left-Right sound balance (-127 to 127) @@ -369,7 +369,7 @@ class WInputSource /* SetPosition ** Sets position in ms. returns 0 on success, 1 if seek impossible */ - virtual int SetPosition(int)=0; + virtual int SetPosition(int)=0; /* Pause ** Suspends input @@ -408,7 +408,7 @@ class WInputSource -class WReader +class WReader { protected: @@ -416,7 +416,7 @@ class WReader ** WReader constructor */ WReader() { } - + public: /* m_player @@ -432,28 +432,28 @@ class WReader /* Open ** Used to open a file, return 0 on success */ - virtual int Open(char *url, bool *killswitch)=0; + virtual int Open(char *url, bool *killswitch)=0; /* Read ** Returns number of BYTES read (if < length then eof or killswitch) */ - virtual int Read(char *buffer, int length, bool *killswitch)=0; - + virtual int Read(char *buffer, int length, bool *killswitch)=0; + /* GetLength ** Returns length of the entire file in BYTES, return -1 on unknown/infinite (as for a stream) */ - virtual int GetLength(void)=0; - + virtual int GetLength(void)=0; + /* CanSeek ** Returns 1 if you can skip ahead in the file, 0 if not */ virtual int CanSeek(void)=0; - + /* Seek ** Jump to a certain absolute position */ virtual int Seek(int position, bool *killswitch)=0; - + /* GetHeader ** Retrieve header. Used in read_http to retrieve the HTTP header */ @@ -475,83 +475,83 @@ class WReader #define OF_VER 0x100 -typedef struct +typedef struct { /* version ** Version revision number */ int version; - + /* description ** Text description of the reader plug-in */ char *description; - + /* create ** Function pointer to create a reader module */ WReader *(*create)(); - + /* ismine ** Determines whether or not a file should be read by this plug-in */ int (*ismine)(char *url); - + } reader_source; -typedef struct +typedef struct { /* version ** Version revision number - */ + */ int version; /* description ** Text description of the input plug-in - */ + */ char *description; /* extension_list ** Defines all the supported filetypes by this input plug-in ** In semicolon delimited format ("ext;desc;ext;desc" etc). - */ - char *extension_list; + */ + char *extension_list; /* ismine ** called before extension checks, to allow detection of tone://,http://, etc ** Determines whether or not a file type should be decoded by this plug-in - */ + */ int (*ismine)(char *filename); /* create ** Function pointer to create a decoder module - */ + */ WInputSource *(*create)(void); /* createinfo ** Function pointer to create a decoder module information - */ + */ WInputInfo *(*createinfo)(void); } input_source; -typedef struct +typedef struct { /* version ** Version revision number */ int version; - + /* description ** Text description of the output plug-in - */ + */ char *description; - + /* create ** Function pointer to create an Output Filter */ diff --git a/src/plugin_winamp3/in_flac.cpp b/src/plugin_winamp3/in_flac.cpp index b6eb0bc..d93e43f 100644 --- a/src/plugin_winamp3/in_flac.cpp +++ b/src/plugin_winamp3/in_flac.cpp @@ -266,7 +266,7 @@ void FLAC_Source::cleanup() file_info_.length_in_msec = -1; } - + /*********************************************************************** * local routines **********************************************************************/ @@ -384,14 +384,14 @@ void error_callback_(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorS file_info->abort_flag = true; } - + /*********************************************************************** * C-level interface **********************************************************************/ static int C_level__FLAC_is_mine_(char *filename) { - return 0; + return 0; } static WInputSource *C_level__FLAC_create_() -- 2.7.4