diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-22 23:11:36 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-22 23:11:36 +0000 |
commit | 407497c40a34ae299cca56de1bd7c92e5724c54a (patch) | |
tree | deadb344cb967157fd97e3a80dac525bb3f651d8 /src/pcm_utils.h | |
parent | e6d7663b10242d1cb9ad0411dbb45502db154b76 (diff) | |
download | mpd-407497c40a34ae299cca56de1bd7c92e5724c54a.tar.gz mpd-407497c40a34ae299cca56de1bd7c92e5724c54a.tar.xz mpd-407497c40a34ae299cca56de1bd7c92e5724c54a.zip |
Split pcm_convertAudioFormat into separate functions for bitrate, channel,
and samplerate conversion. This makes the code much easier to read, and
fixes a few bugs that were previously there.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6224 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/pcm_utils.h')
-rw-r--r-- | src/pcm_utils.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pcm_utils.h b/src/pcm_utils.h index 85ec9e3e3..5142db17b 100644 --- a/src/pcm_utils.h +++ b/src/pcm_utils.h @@ -26,15 +26,14 @@ #include <stdlib.h> void pcm_volumeChange(char *buffer, int bufferSize, AudioFormat * format, - int volume); + int volume); void pcm_mix(char *buffer1, char *buffer2, size_t bufferSize1, - size_t bufferSize2, AudioFormat * format, float portion1); + size_t bufferSize2, AudioFormat * format, float portion1); void pcm_convertAudioFormat(AudioFormat * inFormat, char *inBuffer, size_t - inSize, AudioFormat * outFormat, char *outBuffer); + inSize, AudioFormat * outFormat, char *outBuffer); -size_t pcm_sizeOfOutputBufferForAudioFormatConversion(AudioFormat * inFormat, - size_t inSize, - AudioFormat * outFormat); +size_t pcm_sizeOfConvBuffer(AudioFormat * inFormat, size_t inSize, + AudioFormat * outFormat); #endif |