aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorAndreas Claesson <andreas.claesson@gmail.com>2005-05-24 15:06:23 +0000
committerAndreas Claesson <andreas.claesson@gmail.com>2005-05-24 15:06:23 +0000
commit29cc42bf9781f2407cc7ccfe801329b07434e50b (patch)
tree7a7b61381e788880c03b99325cb7448d5b7f88cd /src/audio.c
parent422410c46de81cec8872a9b91d07a7c9eca96b82 (diff)
downloadmpd-29cc42bf9781f2407cc7ccfe801329b07434e50b.tar.gz
mpd-29cc42bf9781f2407cc7ccfe801329b07434e50b.tar.xz
mpd-29cc42bf9781f2407cc7ccfe801329b07434e50b.zip
Adding modifications for internal 1-3-28 bits integer samples. Only mp3 and mpc of the input plugins are modified. Resampling is NOT working!!
git-svn-id: https://svn.musicpd.org/mpd/branches/ancl@3281 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audio.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/audio.c b/src/audio.c
index 0fb2b3e2d..1bcd24de6 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -111,15 +111,9 @@ void getInternalAudioFormat(AudioFormat * inAudioFormat,
/* take the input format... */
copyAudioFormat(outAudioFormat,inAudioFormat);
-#ifdef MPD_FIXED_POINT
- /* .. change to 16 bit integer */
- outAudioFormat->bits = 16;
- outAudioFormat->floatSamples = 0;
-#else
- /* .. change to 32 bit float */
+ /* .. change to 32 bit integers with 28 bit resolution */
outAudioFormat->bits = 32;
- outAudioFormat->floatSamples = 1;
-#endif
+ outAudioFormat->fracBits = 28;
/* if forced output sample rate - use that as internal sample rate */
if(audio_configFormat && (audio_configFormat->sampleRate != 0))
outAudioFormat->sampleRate = audio_configFormat->sampleRate;
@@ -132,7 +126,7 @@ void getOutputAudioFormat(AudioFormat * inAudioFormat,
* for plugins who still use this we copy the format from in to out
* these plugin don't know about the floatSample flag so we set it
* for them - in both in and out */
- inAudioFormat->floatSamples = 0;
+ inAudioFormat->fracBits = 0;
copyAudioFormat(outAudioFormat,inAudioFormat);
}
@@ -214,8 +208,8 @@ int parseAudioConfig(AudioFormat * audioFormat, char * conf) {
return -1;
}
- /* audioFormat is never float */
- audioFormat->floatSamples = 0;
+ /* audioFormat is never shifted */
+ audioFormat->fracBits = 0;
return 0;
}