diff options
Diffstat (limited to 'src/inputPlugins')
-rw-r--r-- | src/inputPlugins/_flac_common.c | 4 | ||||
-rw-r--r-- | src/inputPlugins/aac_plugin.c | 4 | ||||
-rw-r--r-- | src/inputPlugins/audiofile_plugin.c | 8 | ||||
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 10 | ||||
-rw-r--r-- | src/inputPlugins/mp4_plugin.c | 2 | ||||
-rw-r--r-- | src/inputPlugins/mpc_plugin.c | 10 |
6 files changed, 19 insertions, 19 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c index beff5d431..546f5c192 100644 --- a/src/inputPlugins/_flac_common.c +++ b/src/inputPlugins/_flac_common.c @@ -159,9 +159,9 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block, switch (block->type) { case FLAC__METADATA_TYPE_STREAMINFO: - dc.audio_format.bits = (mpd_sint8)si->bits_per_sample; + dc.audio_format.bits = (int8_t)si->bits_per_sample; dc.audio_format.sampleRate = si->sample_rate; - dc.audio_format.channels = (mpd_sint8)si->channels; + dc.audio_format.channels = (int8_t)si->channels; dc.total_time = ((float)si->total_samples) / (si->sample_rate); break; case FLAC__METADATA_TYPE_VORBIS_COMMENT: diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c index dc97c1e08..2e5df8f48 100644 --- a/src/inputPlugins/aac_plugin.c +++ b/src/inputPlugins/aac_plugin.c @@ -313,7 +313,7 @@ static int aac_stream_decode(InputStream *inStream) unsigned int sampleCount; char *sampleBuffer; size_t sampleBufferLen; - mpd_uint16 bitRate = 0; + uint16_t bitRate = 0; AacBuffer b; initAacBuffer(inStream, &b); @@ -442,7 +442,7 @@ static int aac_decode(char *path) /*float * seekTable; long seekTableEnd = -1; int seekPositionFound = 0; */ - mpd_uint16 bitRate = 0; + uint16_t bitRate = 0; AacBuffer b; InputStream inStream; diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c index 6fcc98239..858b71229 100644 --- a/src/inputPlugins/audiofile_plugin.c +++ b/src/inputPlugins/audiofile_plugin.c @@ -45,7 +45,7 @@ static int audiofile_decode(char *path) int fs, frame_count; AFfilehandle af_fp; int bits; - mpd_uint16 bitRate; + uint16_t bitRate; struct stat st; int ret, current = 0; char chunk[CHUNK_SIZE]; @@ -64,18 +64,18 @@ static int audiofile_decode(char *path) afSetVirtualSampleFormat(af_fp, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16); afGetVirtualSampleFormat(af_fp, AF_DEFAULT_TRACK, &fs, &bits); - dc.audio_format.bits = (mpd_uint8)bits; + dc.audio_format.bits = (uint8_t)bits; dc.audio_format.sampleRate = (unsigned int)afGetRate(af_fp, AF_DEFAULT_TRACK); dc.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); dc.total_time = ((float)frame_count / (float)dc.audio_format.sampleRate); - bitRate = (mpd_uint16)(st.st_size * 8.0 / dc.total_time / 1000.0 + 0.5); + bitRate = (uint16_t)(st.st_size * 8.0 / dc.total_time / 1000.0 + 0.5); if (dc.audio_format.bits != 8 && dc.audio_format.bits != 16) { ERROR("Only 8 and 16-bit files are supported. %s is %i-bit\n", diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 1d6333fd6..0d664b020 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -65,7 +65,7 @@ static unsigned long prng(unsigned long state) return (state * 0x0019660dL + 0x3c6ef35fL) & 0xffffffffL; } -static mpd_sint16 audio_linear_dither(unsigned int bits, mad_fixed_t sample, +static int16_t audio_linear_dither(unsigned int bits, mad_fixed_t sample, struct audio_dither *dither) { unsigned int scalebits; @@ -107,15 +107,15 @@ static mpd_sint16 audio_linear_dither(unsigned int bits, mad_fixed_t sample, dither->error[0] = sample - output; - return (mpd_sint16)(output >> scalebits); + return (int16_t)(output >> scalebits); } -static unsigned dither_buffer(mpd_sint16 *dest0, const struct mad_synth *synth, +static unsigned dither_buffer(int16_t *dest0, const struct mad_synth *synth, struct audio_dither *dither, unsigned int start, unsigned int end, unsigned int num_channels) { - mpd_sint16 *dest = dest0; + int16_t *dest = dest0; unsigned int i; for (i = start; i < end; ++i) { @@ -153,7 +153,7 @@ typedef struct _mp3DecodeData { struct mad_synth synth; mad_timer_t timer; unsigned char readBuffer[READ_BUFFER_SIZE]; - mpd_sint16 outputBuffer[MP3_DATA_OUTPUT_BUFFER_SIZE]; + int16_t outputBuffer[MP3_DATA_OUTPUT_BUFFER_SIZE]; float totalTime; float elapsedTime; enum muteframe muteFrame; diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c index 1e65f6667..0763c6c12 100644 --- a/src/inputPlugins/mp4_plugin.c +++ b/src/inputPlugins/mp4_plugin.c @@ -103,7 +103,7 @@ static int mp4_decode(InputStream * inStream) long seekTableEnd = -1; int seekPositionFound = 0; long offset; - mpd_uint16 bitRate = 0; + uint16_t bitRate = 0; int seeking = 0; mp4cb = xmalloc(sizeof(mp4ff_callback_t)); diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c index e5502a2f0..735916cdc 100644 --- a/src/inputPlugins/mpc_plugin.c +++ b/src/inputPlugins/mpc_plugin.c @@ -74,10 +74,10 @@ static mpc_int32_t mpc_getsize_cb(void *vdata) } /* this _looks_ performance-critical, don't de-inline -- eric */ -static inline mpd_sint16 convertSample(MPC_SAMPLE_FORMAT sample) +static inline int16_t convertSample(MPC_SAMPLE_FORMAT sample) { /* only doing 16-bit audio for now */ - mpd_sint32 val; + int32_t val; const int clip_min = -1 << (16 - 1); const int clip_max = (1 << (16 - 1)) - 1; @@ -121,7 +121,7 @@ static int mpc_decode(InputStream * inStream) char chunk[MPC_CHUNK_SIZE]; int chunkpos = 0; long bitRate = 0; - mpd_sint16 *s16 = (mpd_sint16 *) chunk; + int16_t *s16 = (int16_t *) chunk; unsigned long samplePos = 0; mpc_uint32_t vbrUpdateAcc; mpc_uint32_t vbrUpdateBits; @@ -175,7 +175,7 @@ static int mpc_decode(InputStream * inStream) dc_action_begin(); samplePos = dc.seek_where * dc.audio_format.sampleRate; if (mpc_decoder_seek_sample(&decoder, samplePos)) { - s16 = (mpd_sint16 *) chunk; + s16 = (int16_t *) chunk; chunkpos = 0; } else dc.seek_where = DC_SEEK_ERROR; @@ -214,7 +214,7 @@ static int mpc_decode(InputStream * inStream) bitRate, replayGainInfo); chunkpos = 0; - s16 = (mpd_sint16 *) chunk; + s16 = (int16_t *) chunk; if (dc_intr()) { eof = 1; break; |