Mark unused vars as comment

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@104 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
mws
2009-12-21 16:23:09 +00:00
parent 7b87012631
commit 1b13da2617
87 changed files with 1685 additions and 1684 deletions

View File

@@ -43,7 +43,7 @@
#include <global.h>
#include <neutrino.h>
#include <zapit/client/zapittools.h>
#include <zapit/client/zapittools.h>
unsigned int CBaseDec::mSamplerate=0;
@@ -194,7 +194,7 @@ bool CBaseDec::GetMetaDataBase(CAudiofile* const in, const bool nice)
bool CBaseDec::SetDSP(int soundfd, int fmt, unsigned int dsp_speed, unsigned int channels)
{
bool crit_error=false;
if (::ioctl(soundfd, SNDCTL_DSP_RESET))
printf("reset failed\n");
if(::ioctl(soundfd, SNDCTL_DSP_SETFMT, &fmt))
@@ -219,7 +219,7 @@ bool CBaseDec::SetDSP(int soundfd, int fmt, unsigned int dsp_speed, unsigned int
// disable iec aka digi out (avia reset enables it again)
//g_Zapit->IecOff();
#endif
}
}
//usleep(400000);
//if (!was_muted)
// avs_mute(false);
@@ -229,7 +229,7 @@ bool CBaseDec::SetDSP(int soundfd, int fmt, unsigned int dsp_speed, unsigned int
return crit_error;
}
bool CBaseDec::avs_mute(bool mute)
bool CBaseDec::avs_mute(bool /*mute*/)
{
return true;
}

View File

@@ -274,7 +274,7 @@ int iscale(int value, int numer, int denom)
/*
fix_dot() - dot product of two fixed arrays
*/
fixed fix_dot(fixed *hpa, fixed *pb, int n)
fixed fix_dot(fixed */*hpa*/, fixed *pb, int n)
{
fixed *pa = NULL;
long sum;

View File

@@ -3,7 +3,7 @@
Copyright (C) 2002 Bjoern Kalkbrenner <terminar@cyberphoria.org>
(C) 2002,2003,2004 Zwen <Zwen@tuxbox.org>
libmad MP3 low-level core
Homepage: http://www.cyberphoria.org/
@@ -90,7 +90,7 @@ void id3_finish_file(struct id3_file* file);
}
// Frames to skip in ff/rev mode
#define FRAMES_TO_SKIP 50 // 75
#define FRAMES_TO_SKIP 50 // 75
// nr of frames to play after skipping in rev/ff mode
#define FRAMES_TO_PLAY 5
@@ -267,7 +267,7 @@ inline signed short CMP3Dec::MadFixedToSShort(const mad_fixed_t Fixed)
return 32767;
else if (Fixed < -MAD_F_ONE)
return -32768;
return (signed short)(Fixed >> (MAD_F_FRACBITS + 1 - 16));
}
#endif
@@ -367,7 +367,7 @@ void CMP3Dec::CreateInfo(CAudioMetaData* m, int FrameNumber)
#define INPUT_BUFFER_SIZE (2*8192) //(5*8192) /* enough to skip big id3 tags */
#define OUTPUT_BUFFER_SIZE 8192
#define SPECTRUM_CNT 4
CBaseDec::RetCode CMP3Dec::Decoder(FILE *InputFp, const int OutputFd,
CBaseDec::RetCode CMP3Dec::Decoder(FILE *InputFp, const int /*OutputFd*/,
State* const state,
CAudioMetaData* meta_data,
time_t* const time_played,
@@ -458,7 +458,7 @@ CBaseDec::RetCode CMP3Dec::Decoder(FILE *InputFp, const int OutputFd,
ReadSize=INPUT_BUFFER_SIZE,
ReadStart=InputBuffer,
Remaining=0;
/* Fill-in the buffer. If an error occurs print a message
* and leave the decoding loop. If the end of stream is
* reached we also leave the loop but the return status is
@@ -523,19 +523,19 @@ q * next mad_frame_decode() invocation. (See the comments marked
* this case one can call again mad_frame_decode() in order to
* skip the faulty part and re-sync to the next frame.
*/
// decode 'FRAMES_TO_PLAY' frames each 'FRAMES_TO_SKIP' frames in ff/rev mode
if( (*state!=FF &&
*state!=REV) ||
// decode 'FRAMES_TO_PLAY' frames each 'FRAMES_TO_SKIP' frames in ff/rev mode
if( (*state!=FF &&
*state!=REV) ||
FrameCount % actFramesToSkip < FRAMES_TO_PLAY )
ret=mad_frame_decode(&Frame,&Stream);
else if(*state==FF) // in FF mode just decode the header, this sets bufferptr to next frame and also gives stats about the frame for totals
if (secondsToJump != 0 && !jumpDone)
{
{
jumpDone=true;
// jump forwards
long bytesForward = (Stream.bufend - Stream.this_frame) + ((ftell(InputFp)+Stream.this_frame-Stream.bufend) / FrameCount)*(actFramesToSkip + FRAMES_TO_PLAY);
//printf("jump forwards by %d secs and %ld bytes",secondsToJump, bytesForward);
if (fseek(InputFp, bytesForward, SEEK_CUR)!=0)
{
// Reached end, do nothing
@@ -568,12 +568,12 @@ q * next mad_frame_decode() invocation. (See the comments marked
*state=PLAY;
continue;
} else
{
{
ret=mad_header_decode(&Frame.header,&Stream);
}
else
{ //REV
// Jump back
// Jump back
long bytesBack = (Stream.bufend - Stream.this_frame) + ((ftell(InputFp)+Stream.this_frame-Stream.bufend) / FrameCount)*(actFramesToSkip + FRAMES_TO_PLAY);
if (secondsToJump!=0)
@@ -626,7 +626,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
if(MAD_RECOVERABLE(Stream.error))
{
// no errrors in FF mode
if(*state!=FF &&
if(*state!=FF &&
*state!=REV)
{
fprintf(stderr,"%s: recoverable frame level error (%s)\n",
@@ -696,7 +696,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
mad_timer_reset(&Timer);
Timer.seconds = *time_played;
}
/* Accounting. The computed frame duration is in the frame
* header structure. It is expressed as a fixed point number
* whole data type is mad_timer_t. It is different from the
@@ -711,17 +711,17 @@ q * next mad_frame_decode() invocation. (See the comments marked
// MAD_UNITS_MINUTES,MAD_UNITS_MILLISECONDS,0);
*time_played = Timer.seconds;
// decode 5 frames each 75 frames in ff mode
if( *state!=FF || FrameCount % actFramesToSkip < FRAMES_TO_PLAY)
{
/* Once decoded the frame is synthesized to PCM samples. No errors
* are reported by mad_synth_frame();
*/
mad_synth_frame(&Synth, &Frame);
/* Synthesized samples must be converted from mad's fixed
* point number to the consumer format. Here we use signed
* 16 bit native endian integers on two channels. Integer samples
@@ -733,7 +733,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
{
mad_fixed_t * leftchannel = Synth.pcm.samples[0];
mad_fixed_t * rightchannel = Synth.pcm.samples[1];
while (Synth.pcm.length-- > 0)
{
ll = MadFixedToSShort(*(leftchannel++), true);
@@ -746,7 +746,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
#define DDIFF 0
if(g_settings.spectrum) {
#if HAVE_DBOX2
if(scnt == SPECTRUM_CNT-2)
if(scnt == SPECTRUM_CNT-2)
#endif
{
j += 4;
@@ -759,7 +759,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
}
}
#endif
/* Flush the buffer if it is full. */
if (OutputPtr == OutputBufferEnd)
{
@@ -770,7 +770,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
Status = WRITE_ERR;
break;
}
OutputPtr = OutputBuffer;
#ifdef SPECTRUM
if(g_settings.spectrum) {
@@ -784,7 +784,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
//sanalyzer_render_vu(data);
scnt++;
#if HAVE_DBOX2
if(scnt >= SPECTRUM_CNT)
if(scnt >= SPECTRUM_CNT)
#endif
{
scnt = 0;
@@ -798,7 +798,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
else
{
mad_fixed_t * leftchannel = Synth.pcm.samples[0];
while (Synth.pcm.length-- > 0)
{
/* Left channel => copy to right channel */
@@ -807,13 +807,13 @@ q * next mad_frame_decode() invocation. (See the comments marked
ll = MadFixedToSShort(*(leftchannel++), false);
rr = ll;
*(((signed short *)OutputPtr) + 1) = *((signed short *)OutputPtr) = ll;
OutputPtr += 4;
#ifdef SPECTRUM
#define DDIFF 1024
if(g_settings.spectrum) {
#if HAVE_DBOX2
if(scnt == SPECTRUM_CNT-2)
if(scnt == SPECTRUM_CNT-2)
#endif
{
j += 4;
@@ -826,7 +826,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
}
}
#endif
/* Flush the buffer if it is full. */
if (OutputPtr == OutputBufferEnd)
{
@@ -837,7 +837,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
Status = WRITE_ERR;
break;
}
OutputPtr = OutputBuffer;
#ifdef SPECTRUM
if(g_settings.spectrum) {
@@ -849,7 +849,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
//int ms = (tv2.tv_sec - tv1.tv_sec) * 1000 + (tv2.tv_usec - tv1.tv_usec) / 1000;
//if(ms)printf("Write takes %dms\n", ms);
#if HAVE_DBOX2
if(scnt >= SPECTRUM_CNT)
if(scnt >= SPECTRUM_CNT)
#endif
{
sanalyzer_render_freq(data);
@@ -860,7 +860,7 @@ q * next mad_frame_decode() invocation. (See the comments marked
}
}
}
// if a custom value was set we only jump once
if ((*state==FF || *state==REV) && secondsToJump != 0 && !jumpDone) {
jumpDone=true;
@@ -1165,12 +1165,12 @@ void CMP3Dec::GetID3(FILE* in, CAudioMetaData* const m)
id3_ucs4_t const *ucs4;
id3_utf8_t *utf8;
char const spaces[] = " ";
struct
struct
{
char const *id;
char const *name;
} const info[] =
} const info[] =
{
{ ID3_FRAME_TITLE, "Title"},
{ "TIT3", 0}, /* Subtitle */
@@ -1345,7 +1345,7 @@ void CMP3Dec::GetID3(FILE* in, CAudioMetaData* const m)
void id3_finish_file(struct id3_file* file)
{
unsigned int i;
if (file->path)
free(file->path);
@@ -1353,20 +1353,20 @@ void id3_finish_file(struct id3_file* file)
id3_tag_delref(file->primary);
id3_tag_delete(file->primary);
}
for (i = 0; i < file->ntags; ++i) {
struct id3_tag *tag;
tag = file->tags[i].tag;
if (tag) {
id3_tag_delref(tag);
id3_tag_delete(tag);
}
}
if (file->tags)
free(file->tags);
free(file);
}
free(file);
}

View File

@@ -2,14 +2,14 @@
Neutrino-GUI - DBoxII-Project
Copyright (C) 2004 Sania, Zwen
Homepage: http://www.dbox2.info/
Kommentar:
ogg vorbis audio decoder
uses tremor libvorbisidec
License: GPL
This program is free software; you can redistribute it and/or modify
@@ -59,7 +59,7 @@ int ogg_seek(void *data, ogg_int64_t offset, int whence)
return fseek((FILE*)data, (long)offset, whence);
}
int ogg_close(void *data)
int ogg_close(void */*data*/)
{
return 0;
}
@@ -91,7 +91,7 @@ CBaseDec::RetCode COggDec::Decoder(FILE *in, const int OutputFd, State* const st
SetMetaData(&vf, meta_data);
audioDecoder->PrepareClipPlay(ov_info(&vf,0)->channels, ov_info(&vf,0)->rate, 16, 1);
/* up and away ... */
mSlotSize = MAX_OUTPUT_SAMPLES * 2 * ov_info(&vf,0)->channels;
for(int i = 0 ; i < DECODE_SLOTS ; i++)
@@ -201,7 +201,7 @@ CBaseDec::RetCode COggDec::Decoder(FILE *in, const int OutputFd, State* const st
/* clean up the junk from the party */
ov_clear(&vf);
/* and drive home ;) */
return Status;
}
@@ -230,7 +230,7 @@ void* COggDec::OutputDsp(void * arg)
return NULL;
}
bool COggDec::GetMetaData(FILE *in, const bool nice, CAudioMetaData* m)
bool COggDec::GetMetaData(FILE *in, const bool /*nice*/, CAudioMetaData* m)
{
OggVorbis_File vf;
if (!Open(in, &vf))
@@ -306,7 +306,7 @@ bool COggDec::Open(FILE* in, OggVorbis_File* vf)
/* the netfile layer hooked in here. If we would not */
/* provide callbacks, the tremor lib and the netfile */
/* layer would clash and steal each other the data */
/* from the stream ! */
/* from the stream ! */
cb.read_func = ogg_read;
cb.seek_func = ogg_seek;
@@ -339,10 +339,10 @@ bool COggDec::Open(FILE* in, OggVorbis_File* vf)
/* finish the opening and ignite the joint */
//ov_test_open(vf);
if(ov_seekable(vf))
if(ov_seekable(vf))
mSeekable = true;
else
mSeekable = false;
return true;
}

View File

@@ -41,7 +41,7 @@ static gdouble scale = 0;
static gint xscale128[] = { 0, 1, 2, 3, 4, 6, 8, 9, 10, 14, 20, 27, 37, 50, 67, 94, 127 };
static gint xscale256[] = { 0, 1, 2, 3, 5, 7, 10, 14, 20, 28, 40, 54, 74, 101, 137, 187, 255 };
static gint xscale512[] = { 0, 2, 4, 6, 10, 14, 20, 28, 40, 56, 80, 108, 148, 202, 274, 374, 510 };
#endif
#endif
//#define DEBUG
#if HAVE_DBOX2
#define SAMPLES 256
@@ -65,7 +65,7 @@ static void do_fft(gint16 out_data[], gint16 in_data[])
}
#endif
//static int threshold = -60;
void sanalyzer_render_freq (gint16 in_data[])
void sanalyzer_render_freq (gint16 /*in_data*/[])
{
#if 0
gint i, c;

View File

@@ -2,13 +2,13 @@
Neutrino-GUI - DBoxII-Project
Copyright (C) 2004 Zwen
Homepage: http://www.dbox2.info/
Kommentar:
wav audio decoder
License: GPL
This program is free software; you can redistribute it and/or modify
@@ -78,7 +78,7 @@ int endianTest=1;
CBaseDec::RetCode CWavDec::Decoder(FILE *in, int OutputFd, State* state, CAudioMetaData* meta_data, time_t* time_played, unsigned int* secondsToSkip)
{
char* buffer;
RetCode Status=OK;
RetCode Status=OK;
if (!SetMetaData(in, meta_data))
{
@@ -116,7 +116,7 @@ CBaseDec::RetCode CWavDec::Decoder(FILE *in, int OutputFd, State* state, CAudioM
{
while(*state==PAUSE)
usleep(10000);
if(*state==FF || *state==REV)
{
if (oldSecsToSkip != *secondsToSkip)
@@ -158,14 +158,14 @@ CBaseDec::RetCode CWavDec::Decoder(FILE *in, int OutputFd, State* state, CAudioM
{
fprintf(stderr,"%s: PCM write error (%s).\n", ProgName, strerror(errno));
Status=WRITE_ERR;
}
}
*time_played = (meta_data->bitrate!=0) ? (ftell(in)-header_size)*8/meta_data->bitrate : 0;
} while (bytes > 0 && *state!=STOP_REQ && Status==OK);
free(buffer);
return Status;
}
bool CWavDec::GetMetaData(FILE *in, const bool nice, CAudioMetaData* m)
bool CWavDec::GetMetaData(FILE *in, const bool /*nice*/, CAudioMetaData* m)
{
return SetMetaData(in, m);
}
@@ -186,7 +186,7 @@ bool CWavDec::SetMetaData(FILE* in, CAudioMetaData* m)
struct WavHeader wh;
header_size = 44;
fseek(in, 0, SEEK_END);
int filesize = ftell(in);
fseek(in, 0, SEEK_SET);