Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
948b8f35
Commit
948b8f35
authored
Feb 04, 2011
by
Thomas Jansen
Committed by
Max Kellermann
Feb 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general: whitespace cleanup
Remove trailing whitespace found by this command: find -name '*.[ch]' | xargs grep "[[:space:]]$"
parent
e776c605
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
29 additions
and
29 deletions
+29
-29
compress.c
src/AudioCompress/compress.c
+14
-14
audiofile_decoder_plugin.c
src/decoder/audiofile_decoder_plugin.c
+1
-1
flac_encoder.c
src/encoder/flac_encoder.c
+3
-3
wave_encoder.c
src/encoder/wave_encoder.c
+2
-2
winmm_mixer_plugin.c
src/mixer/winmm_mixer_plugin.c
+5
-5
httpd_internal.h
src/output/httpd_internal.h
+1
-1
mvp_plugin.c
src/output/mvp_plugin.c
+1
-1
oss_plugin.c
src/output/oss_plugin.c
+1
-1
pcm_byteswap.c
src/pcm_byteswap.c
+1
-1
No files found.
src/AudioCompress/compress.c
View file @
948b8f35
...
...
@@ -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
;
...
...
src/decoder/audiofile_decoder_plugin.c
View file @
948b8f35
...
...
@@ -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
=
{
...
...
src/encoder/flac_encoder.c
View file @
948b8f35
...
...
@@ -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
;
...
...
src/encoder/wave_encoder.c
View file @
948b8f35
...
...
@@ -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
,
...
...
src/mixer/winmm_mixer_plugin.c
View file @
948b8f35
...
...
@@ -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
;
}
...
...
src/output/httpd_internal.h
View file @
948b8f35
...
...
@@ -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
;
...
...
src/output/mvp_plugin.c
View file @
948b8f35
...
...
@@ -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/
*/
...
...
src/output/oss_plugin.c
View file @
948b8f35
...
...
@@ -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
;
...
...
src/pcm_byteswap.c
View file @
948b8f35
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment