aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/audiofile_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-29 15:49:29 +0200
committerMax Kellermann <max@duempel.org>2008-09-29 15:49:29 +0200
commit226d52b36fe648215f367d352ad6e5eb38e116be (patch)
treea8dc789a0f3585b07da36f952a69ff554a1bf999 /src/inputPlugins/audiofile_plugin.c
parent0352766dca3da5266e4714124fea119be82c4188 (diff)
downloadmpd-226d52b36fe648215f367d352ad6e5eb38e116be.tar.gz
mpd-226d52b36fe648215f367d352ad6e5eb38e116be.tar.xz
mpd-226d52b36fe648215f367d352ad6e5eb38e116be.zip
switch to C99 types, part II
Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/audiofile_plugin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index a2fc39881..1dd488fb1 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -50,7 +50,7 @@ static int audiofile_decode(struct decoder * decoder, char *path)
int bits;
struct audio_format audio_format;
float total_time;
- mpd_uint16 bitRate;
+ uint16_t bitRate;
struct stat st;
int ret, current = 0;
char chunk[CHUNK_SIZE];
@@ -69,17 +69,17 @@ static int audiofile_decode(struct decoder * decoder, char *path)
afSetVirtualSampleFormat(af_fp, AF_DEFAULT_TRACK,
AF_SAMPFMT_TWOSCOMP, 16);
afGetVirtualSampleFormat(af_fp, AF_DEFAULT_TRACK, &fs, &bits);
- audio_format.bits = (mpd_uint8)bits;
+ audio_format.bits = (uint8_t)bits;
audio_format.sampleRate =
(unsigned int)afGetRate(af_fp, AF_DEFAULT_TRACK);
audio_format.channels =
- (mpd_uint8)afGetVirtualChannels(af_fp, AF_DEFAULT_TRACK);
+ (uint8_t)afGetVirtualChannels(af_fp, AF_DEFAULT_TRACK);
frame_count = afGetFrameCount(af_fp, AF_DEFAULT_TRACK);
total_time = ((float)frame_count / (float)audio_format.sampleRate);
- bitRate = (mpd_uint16)(st.st_size * 8.0 / total_time / 1000.0 + 0.5);
+ bitRate = (uint16_t)(st.st_size * 8.0 / total_time / 1000.0 + 0.5);
if (audio_format.bits != 8 && audio_format.bits != 16) {
ERROR("Only 8 and 16-bit files are supported. %s is %i-bit\n",