general: whitespace cleanup

Remove trailing whitespace found by this command:
find -name '*.[ch]' | xargs grep "[[:space:]]$"
This commit is contained in:
Thomas Jansen 2011-02-04 10:39:21 +01:00 committed by Max Kellermann
parent e776c605ad
commit 948b8f35e6
9 changed files with 29 additions and 29 deletions

View File

@ -16,16 +16,16 @@
struct Compressor { struct Compressor {
//! The compressor's preferences //! The compressor's preferences
struct CompressorConfig prefs; struct CompressorConfig prefs;
//! History of the peak values //! History of the peak values
int *peaks; int *peaks;
//! History of the gain values //! History of the gain values
int *gain; int *gain;
//! History of clip amounts //! History of clip amounts
int *clipped; int *clipped;
unsigned int pos; unsigned int pos;
unsigned int bufsz; unsigned int bufsz;
}; };
@ -41,9 +41,9 @@ struct Compressor *Compressor_new(unsigned int history)
obj->peaks = obj->gain = obj->clipped = NULL; obj->peaks = obj->gain = obj->clipped = NULL;
obj->bufsz = 0; obj->bufsz = 0;
obj->pos = 0; obj->pos = 0;
Compressor_setHistory(obj, history); Compressor_setHistory(obj, history);
return obj; return obj;
} }
@ -70,7 +70,7 @@ void Compressor_setHistory(struct Compressor *obj, unsigned int history)
{ {
if (!history) if (!history)
history = BUCKETS; history = BUCKETS;
obj->peaks = resizeArray(obj->peaks, history, obj->bufsz); obj->peaks = resizeArray(obj->peaks, history, obj->bufsz);
obj->gain = resizeArray(obj->gain, history, obj->bufsz); obj->gain = resizeArray(obj->gain, history, obj->bufsz);
obj->clipped = resizeArray(obj->clipped, history, obj->bufsz); obj->clipped = resizeArray(obj->clipped, history, obj->bufsz);
@ -82,7 +82,7 @@ struct CompressorConfig *Compressor_getConfig(struct Compressor *obj)
return &obj->prefs; return &obj->prefs;
} }
void Compressor_Process_int16(struct Compressor *obj, int16_t *audio, void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
unsigned int count) unsigned int count)
{ {
struct CompressorConfig *prefs = Compressor_getConfig(obj); struct CompressorConfig *prefs = Compressor_getConfig(obj);
@ -97,7 +97,7 @@ void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
int *clipped = obj->clipped + slot; int *clipped = obj->clipped + slot;
unsigned int ramp = count; unsigned int ramp = count;
int delta; int delta;
ap = audio; ap = audio;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
@ -124,15 +124,15 @@ void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
//! Determine target gain //! Determine target gain
newGain = (1 << 10)*prefs->target/peakVal; newGain = (1 << 10)*prefs->target/peakVal;
//! Adjust the gain with inertia from the previous gain value //! Adjust the gain with inertia from the previous gain value
newGain = (curGain*((1 << prefs->smooth) - 1) + newGain) newGain = (curGain*((1 << prefs->smooth) - 1) + newGain)
>> prefs->smooth; >> prefs->smooth;
//! Make sure it's no more than the maximum gain value //! Make sure it's no more than the maximum gain value
if (newGain > (prefs->maxgain << 10)) if (newGain > (prefs->maxgain << 10))
newGain = prefs->maxgain << 10; newGain = prefs->maxgain << 10;
//! Make sure it's no less than 1:1 //! Make sure it's no less than 1:1
if (newGain < (1 << 10)) if (newGain < (1 << 10))
newGain = 1 << 10; newGain = 1 << 10;
@ -144,7 +144,7 @@ void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
//! Truncate the ramp time //! Truncate the ramp time
ramp = peakPos; ramp = peakPos;
} }
//! Record the new gain //! Record the new gain
obj->gain[slot] = newGain; obj->gain[slot] = newGain;

View File

@ -244,7 +244,7 @@ static const char *const audiofile_suffixes[] = {
static const char *const audiofile_mime_types[] = { static const char *const audiofile_mime_types[] = {
"audio/x-wav", "audio/x-wav",
"audio/x-aiff", "audio/x-aiff",
NULL NULL
}; };
const struct decoder_plugin audiofile_decoder_plugin = { const struct decoder_plugin audiofile_decoder_plugin = {

View File

@ -55,7 +55,7 @@ static bool
flac_encoder_configure(struct flac_encoder *encoder, flac_encoder_configure(struct flac_encoder *encoder,
const struct config_param *param, G_GNUC_UNUSED GError **error) const struct config_param *param, G_GNUC_UNUSED GError **error)
{ {
encoder->compression = config_get_block_unsigned(param, encoder->compression = config_get_block_unsigned(param,
"compression", 5); "compression", 5);
return true; return true;
@ -218,7 +218,7 @@ flac_encoder_open(struct encoder *_encoder, struct audio_format *audio_format,
if (init_status != FLAC__STREAM_ENCODER_OK) { if (init_status != FLAC__STREAM_ENCODER_OK) {
g_set_error(error, flac_encoder_quark(), 0, g_set_error(error, flac_encoder_quark(), 0,
"failed to initialize encoder: %s\n", "failed to initialize encoder: %s\n",
FLAC__StreamEncoderStateString[init_status]); FLAC__StreamEncoderStateString[init_status]);
flac_encoder_close(_encoder); flac_encoder_close(_encoder);
return false; return false;
@ -234,7 +234,7 @@ flac_encoder_open(struct encoder *_encoder, struct audio_format *audio_format,
if(init_status != FLAC__STREAM_ENCODER_INIT_STATUS_OK) { if(init_status != FLAC__STREAM_ENCODER_INIT_STATUS_OK) {
g_set_error(error, flac_encoder_quark(), 0, g_set_error(error, flac_encoder_quark(), 0,
"failed to initialize encoder: %s\n", "failed to initialize encoder: %s\n",
FLAC__StreamEncoderInitStatusString[init_status]); FLAC__StreamEncoderInitStatusString[init_status]);
flac_encoder_close(_encoder); flac_encoder_close(_encoder);
return false; return false;

View File

@ -58,7 +58,7 @@ wave_encoder_quark(void)
} }
static void static void
fill_wave_header(struct wave_header *header, int channels, int bits, fill_wave_header(struct wave_header *header, int channels, int bits,
int freq, int block_size) int freq, int block_size)
{ {
int data_size = 0x0FFFFFFF; int data_size = 0x0FFFFFFF;
@ -142,7 +142,7 @@ wave_encoder_open(struct encoder *_encoder,
buffer = pcm_buffer_get(&encoder->buffer, sizeof(struct wave_header) ); buffer = pcm_buffer_get(&encoder->buffer, sizeof(struct wave_header) );
/* create PCM wave header in initial buffer */ /* create PCM wave header in initial buffer */
fill_wave_header((struct wave_header *) buffer, fill_wave_header((struct wave_header *) buffer,
audio_format->channels, audio_format->channels,
encoder->bits, encoder->bits,
audio_format->sample_rate, audio_format->sample_rate,

View File

@ -58,11 +58,11 @@ winmm_mixer_init(void *ao, G_GNUC_UNUSED const struct config_param *param,
G_GNUC_UNUSED GError **error_r) G_GNUC_UNUSED GError **error_r)
{ {
assert(ao != NULL); assert(ao != NULL);
struct winmm_mixer *wm = g_new(struct winmm_mixer, 1); struct winmm_mixer *wm = g_new(struct winmm_mixer, 1);
mixer_init(&wm->base, &winmm_mixer_plugin); mixer_init(&wm->base, &winmm_mixer_plugin);
wm->output = (struct winmm_output *) ao; wm->output = (struct winmm_output *) ao;
return &wm->base; return &wm->base;
} }
@ -79,13 +79,13 @@ winmm_mixer_get_volume(struct mixer *mixer, GError **error_r)
DWORD volume; DWORD volume;
HWAVEOUT handle = winmm_output_get_handle(wm->output); HWAVEOUT handle = winmm_output_get_handle(wm->output);
MMRESULT result = waveOutGetVolume(handle, &volume); MMRESULT result = waveOutGetVolume(handle, &volume);
if (result != MMSYSERR_NOERROR) { if (result != MMSYSERR_NOERROR) {
g_set_error(error_r, 0, winmm_mixer_quark(), g_set_error(error_r, 0, winmm_mixer_quark(),
"Failed to get winmm volume"); "Failed to get winmm volume");
return -1; return -1;
} }
return winmm_volume_decode(volume); return winmm_volume_decode(volume);
} }
@ -102,7 +102,7 @@ winmm_mixer_set_volume(struct mixer *mixer, unsigned volume, GError **error_r)
"Failed to set winmm volume"); "Failed to set winmm volume");
return false; return false;
} }
return true; return true;
} }

View File

@ -111,7 +111,7 @@ struct httpd_output {
char buffer[32768]; char buffer[32768];
/** /**
* The maximum and current number of clients connected * The maximum and current number of clients connected
* at the same time. * at the same time.
*/ */
guint clients_max, clients_cnt; guint clients_max, clients_cnt;

View File

@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
/* /*
* Media MVP audio output based on code from MVPMC project: * Media MVP audio output based on code from MVPMC project:
* http://mvpmc.sourceforge.net/ * http://mvpmc.sourceforge.net/
*/ */

View File

@ -347,7 +347,7 @@ oss_setup_sample_rate(int fd, struct audio_format *audio_format,
case SUCCESS: case SUCCESS:
if (!audio_valid_sample_rate(sample_rate)) if (!audio_valid_sample_rate(sample_rate))
break; break;
audio_format->sample_rate = sample_rate; audio_format->sample_rate = sample_rate;
return true; return true;

View File

@ -49,7 +49,7 @@ const int16_t *pcm_byteswap_16(struct pcm_buffer *buffer,
static inline uint32_t swab32(uint32_t x) static inline uint32_t swab32(uint32_t x)
{ {
return (x << 24) | return (x << 24) |
((x & 0xff00) << 8) | ((x & 0xff00) << 8) |
((x & 0xff0000) >> 8) | ((x & 0xff0000) >> 8) |
(x >> 24); (x >> 24);