aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-10-23 12:58:59 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-10-23 12:58:59 +0000
commit23c59e8cdaa40bc1902893c9dae862024edac66a (patch)
treeb54d757fdc294a907b5682821517557d68295a10 /src
parent480023201aeaa198137c592eebcaff84bf59a5aa (diff)
downloadmpd-23c59e8cdaa40bc1902893c9dae862024edac66a.tar.gz
mpd-23c59e8cdaa40bc1902893c9dae862024edac66a.tar.xz
mpd-23c59e8cdaa40bc1902893c9dae862024edac66a.zip
wee found the audioFormatConversion bug, was actually a bug in shout plugin
git-svn-id: https://svn.musicpd.org/mpd/trunk@2311 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/audioOutput.h6
-rw-r--r--src/audioOutput_shout.c2
-rw-r--r--src/pcm_utils.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/src/audioOutput.h b/src/audioOutput.h
index 985b57797..92387b7da 100644
--- a/src/audioOutput.h
+++ b/src/audioOutput.h
@@ -40,6 +40,8 @@ typedef int (* AudioOutputPlayFunc) (AudioOutput * audioOutput,
typedef void (* AudioOutputCloseDeviceFunc) (AudioOutput * audioOutput);
+typedef int (* AudioOutputKeepAliveFunc) (AudioOutput * audioOutput, int ms);
+
struct _AudioOutput {
int open;
@@ -47,17 +49,20 @@ struct _AudioOutput {
AudioOutputOpenDeviceFunc openDeviceFunc;
AudioOutputPlayFunc playFunc;
AudioOutputCloseDeviceFunc closeDeviceFunc;
+ AudioOutputKeepAliveFunc keepAliveFunc;
void * data;
};
typedef struct _AudioOutputPlugin {
char * name;
+
AudioOutputInitDriverFunc initDriverFunc;
AudioOutputFinishDriverFunc finishDriverFunc;
AudioOutputOpenDeviceFunc openDeviceFunc;
AudioOutputPlayFunc playFunc;
AudioOutputCloseDeviceFunc closeDeviceFunc;
+ AudioOutputKeepAliveFunc keepAliveFunc;
} AudioOutputPlugin;
void initAudioOutputPlugins();
@@ -71,5 +76,6 @@ int openAudioOutput(AudioOutput * audioOutput, AudioFormat * audioFormat);
int playAudioOutput(AudioOutput * audioOutput, char * playChunk, int size);
void closeAudioOutput(AudioOutput * audioOutput);
void finishAudioOutput(AudioOutput * audioOutput);
+int keepAudioOutputAlive(AudioOutput * audioOutput, int ms);
#endif
diff --git a/src/audioOutput_shout.c b/src/audioOutput_shout.c
index 628483d21..3d3c332a3 100644
--- a/src/audioOutput_shout.c
+++ b/src/audioOutput_shout.c
@@ -321,7 +321,7 @@ static int shout_play(AudioOutput * audioOutput, char * playChunk, int size) {
}
}
- vorbis_analysis_wrote(&(sd->vd), size/4);
+ vorbis_analysis_wrote(&(sd->vd), samples);
while(1 == vorbis_analysis_blockout(&(sd->vd), &(sd->vb))) {
vorbis_analysis(&(sd->vb), NULL);
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index dffdbde8d..adcc90122 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -306,7 +306,7 @@ size_t pcm_sizeOfOutputBufferForAudioFormatConversion(AudioFormat * inFormat,
outSize = (outSize >> 1) << 2;
break;
case 2:
- //outSize >>= 1;
+ outSize >>= 1;
break;
}
}