aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Jansen <mithi@mithi.net>2011-02-04 10:39:21 +0100
committerMax Kellermann <max@duempel.org>2011-02-09 22:42:31 +0100
commit948b8f35e6fc578c85a0cfc8e143e1325ce99043 (patch)
tree022148bcb71a123f151d05b5936bc66ca35d332a /src
parente776c605adeb984aae290cdff38c5f8dd0cd291e (diff)
downloadmpd-948b8f35e6fc578c85a0cfc8e143e1325ce99043.tar.gz
mpd-948b8f35e6fc578c85a0cfc8e143e1325ce99043.tar.xz
mpd-948b8f35e6fc578c85a0cfc8e143e1325ce99043.zip
general: whitespace cleanup
Remove trailing whitespace found by this command: find -name '*.[ch]' | xargs grep "[[:space:]]$"
Diffstat (limited to 'src')
-rw-r--r--src/AudioCompress/compress.c28
-rw-r--r--src/decoder/audiofile_decoder_plugin.c2
-rw-r--r--src/encoder/flac_encoder.c6
-rw-r--r--src/encoder/wave_encoder.c4
-rw-r--r--src/mixer/winmm_mixer_plugin.c10
-rw-r--r--src/output/httpd_internal.h2
-rw-r--r--src/output/mvp_plugin.c2
-rw-r--r--src/output/oss_plugin.c2
-rw-r--r--src/pcm_byteswap.c2
9 files changed, 29 insertions, 29 deletions
diff --git a/src/AudioCompress/compress.c b/src/AudioCompress/compress.c
index d5c08372c..36cdfd8dd 100644
--- a/src/AudioCompress/compress.c
+++ b/src/AudioCompress/compress.c
@@ -16,16 +16,16 @@
struct Compressor {
//! The compressor's preferences
struct CompressorConfig prefs;
-
+
//! History of the peak values
int *peaks;
-
+
//! History of the gain values
int *gain;
-
+
//! History of clip amounts
int *clipped;
-
+
unsigned int pos;
unsigned int bufsz;
};
@@ -41,9 +41,9 @@ struct Compressor *Compressor_new(unsigned int history)
obj->peaks = obj->gain = obj->clipped = NULL;
obj->bufsz = 0;
obj->pos = 0;
-
+
Compressor_setHistory(obj, history);
-
+
return obj;
}
@@ -70,7 +70,7 @@ void Compressor_setHistory(struct Compressor *obj, unsigned int history)
{
if (!history)
history = BUCKETS;
-
+
obj->peaks = resizeArray(obj->peaks, history, obj->bufsz);
obj->gain = resizeArray(obj->gain, 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;
}
-void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
+void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
unsigned int count)
{
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;
unsigned int ramp = count;
int delta;
-
+
ap = audio;
for (i = 0; i < count; i++)
{
@@ -124,15 +124,15 @@ void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
//! Determine target gain
newGain = (1 << 10)*prefs->target/peakVal;
-
+
//! 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;
-
+
//! Make sure it's no more than the maximum gain value
if (newGain > (prefs->maxgain << 10))
newGain = prefs->maxgain << 10;
-
+
//! Make sure it's no less than 1:1
if (newGain < (1 << 10))
newGain = 1 << 10;
@@ -144,7 +144,7 @@ void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
//! Truncate the ramp time
ramp = peakPos;
}
-
+
//! Record the new gain
obj->gain[slot] = newGain;
diff --git a/src/decoder/audiofile_decoder_plugin.c b/src/decoder/audiofile_decoder_plugin.c
index 3026f3cc7..b099cf706 100644
--- a/src/decoder/audiofile_decoder_plugin.c
+++ b/src/decoder/audiofile_decoder_plugin.c
@@ -244,7 +244,7 @@ static const char *const audiofile_suffixes[] = {
static const char *const audiofile_mime_types[] = {
"audio/x-wav",
"audio/x-aiff",
- NULL
+ NULL
};
const struct decoder_plugin audiofile_decoder_plugin = {
diff --git a/src/encoder/flac_encoder.c b/src/encoder/flac_encoder.c
index 73328fe81..c34faad00 100644
--- a/src/encoder/flac_encoder.c
+++ b/src/encoder/flac_encoder.c
@@ -55,7 +55,7 @@ static bool
flac_encoder_configure(struct flac_encoder *encoder,
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);
return true;
@@ -218,7 +218,7 @@ flac_encoder_open(struct encoder *_encoder, struct audio_format *audio_format,
if (init_status != FLAC__STREAM_ENCODER_OK) {
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_encoder_close(_encoder);
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) {
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_encoder_close(_encoder);
return false;
diff --git a/src/encoder/wave_encoder.c b/src/encoder/wave_encoder.c
index 7398b45c7..938be5e5e 100644
--- a/src/encoder/wave_encoder.c
+++ b/src/encoder/wave_encoder.c
@@ -58,7 +58,7 @@ wave_encoder_quark(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 data_size = 0x0FFFFFFF;
@@ -142,7 +142,7 @@ wave_encoder_open(struct encoder *_encoder,
buffer = pcm_buffer_get(&encoder->buffer, sizeof(struct wave_header) );
/* create PCM wave header in initial buffer */
- fill_wave_header((struct wave_header *) buffer,
+ fill_wave_header((struct wave_header *) buffer,
audio_format->channels,
encoder->bits,
audio_format->sample_rate,
diff --git a/src/mixer/winmm_mixer_plugin.c b/src/mixer/winmm_mixer_plugin.c
index e1e8a7a45..5ab3e7525 100644
--- a/src/mixer/winmm_mixer_plugin.c
+++ b/src/mixer/winmm_mixer_plugin.c
@@ -58,11 +58,11 @@ winmm_mixer_init(void *ao, G_GNUC_UNUSED const struct config_param *param,
G_GNUC_UNUSED GError **error_r)
{
assert(ao != NULL);
-
+
struct winmm_mixer *wm = g_new(struct winmm_mixer, 1);
mixer_init(&wm->base, &winmm_mixer_plugin);
wm->output = (struct winmm_output *) ao;
-
+
return &wm->base;
}
@@ -79,13 +79,13 @@ winmm_mixer_get_volume(struct mixer *mixer, GError **error_r)
DWORD volume;
HWAVEOUT handle = winmm_output_get_handle(wm->output);
MMRESULT result = waveOutGetVolume(handle, &volume);
-
+
if (result != MMSYSERR_NOERROR) {
g_set_error(error_r, 0, winmm_mixer_quark(),
"Failed to get winmm volume");
return -1;
}
-
+
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");
return false;
}
-
+
return true;
}
diff --git a/src/output/httpd_internal.h b/src/output/httpd_internal.h
index fee72c07f..277e70f11 100644
--- a/src/output/httpd_internal.h
+++ b/src/output/httpd_internal.h
@@ -111,7 +111,7 @@ struct httpd_output {
char buffer[32768];
/**
- * The maximum and current number of clients connected
+ * The maximum and current number of clients connected
* at the same time.
*/
guint clients_max, clients_cnt;
diff --git a/src/output/mvp_plugin.c b/src/output/mvp_plugin.c
index 20587f5c5..6cc8fa34e 100644
--- a/src/output/mvp_plugin.c
+++ b/src/output/mvp_plugin.c
@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/*
+/*
* Media MVP audio output based on code from MVPMC project:
* http://mvpmc.sourceforge.net/
*/
diff --git a/src/output/oss_plugin.c b/src/output/oss_plugin.c
index bb4164990..f5ae80e8c 100644
--- a/src/output/oss_plugin.c
+++ b/src/output/oss_plugin.c
@@ -347,7 +347,7 @@ oss_setup_sample_rate(int fd, struct audio_format *audio_format,
case SUCCESS:
if (!audio_valid_sample_rate(sample_rate))
break;
-
+
audio_format->sample_rate = sample_rate;
return true;
diff --git a/src/pcm_byteswap.c b/src/pcm_byteswap.c
index 967c574cb..6577319d4 100644
--- a/src/pcm_byteswap.c
+++ b/src/pcm_byteswap.c
@@ -49,7 +49,7 @@ const int16_t *pcm_byteswap_16(struct pcm_buffer *buffer,
static inline uint32_t swab32(uint32_t x)
{
- return (x << 24) |
+ return (x << 24) |
((x & 0xff00) << 8) |
((x & 0xff0000) >> 8) |
(x >> 24);