aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-31 02:31:55 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-31 02:31:55 +0000
commit5d392c70cbea09d81e6e5bb7f0a0bd075fcd6f8d (patch)
tree214e7ad2ff7d9cc351357a341239d2d190fc9654 /src/inputPlugins
parent97fe75a0bf4ce5a0769a7509f758eda3f52fd6b3 (diff)
downloadmpd-5d392c70cbea09d81e6e5bb7f0a0bd075fcd6f8d.tar.gz
mpd-5d392c70cbea09d81e6e5bb7f0a0bd075fcd6f8d.tar.xz
mpd-5d392c70cbea09d81e6e5bb7f0a0bd075fcd6f8d.zip
audiofile_plugin
git-svn-id: https://svn.musicpd.org/mpd/trunk@1248 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/audiofile_plugin.c (renamed from src/audiofile_decode.c)51
1 files changed, 44 insertions, 7 deletions
diff --git a/src/audiofile_decode.c b/src/inputPlugins/audiofile_plugin.c
index 8e6c779b9..8c1089e1b 100644
--- a/src/audiofile_decode.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -18,15 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "audiofile_decode.h"
+#include "../inputPlugin.h"
#ifdef HAVE_AUDIOFILE
-#include "command.h"
-#include "utils.h"
-#include "audio.h"
-#include "log.h"
-#include "pcm_utils.h"
+#include "../utils.h"
+#include "../audio.h"
+#include "../log.h"
+#include "../pcm_utils.h"
+#include "../playerData.h"
#include <stdio.h>
#include <unistd.h>
@@ -139,5 +139,42 @@ int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) {
return 0;
}
+MpdTag * audiofileTagDup(char * file) {
+ MpdTag * ret = NULL;
+ int time = getAudiofileTotalTime(file);
+
+ if (time>=0) {
+ if(!ret) ret = newMpdTag();
+ ret->time = time;
+ }
+
+ return ret;
+}
+
+char * audiofileSuffixes[] = {"wav", NULL};
+
+InputPlugin audiofilePlugin =
+{
+ "audiofile",
+ NULL,
+ audiofile_decode,
+ audiofileTagDup,
+ INPUT_PLUGIN_STREAM_FILE,
+ audiofileSuffixes,
+ NULL
+};
+
+#else
+
+InputPlugin audiofilePlugin =
+{
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ 0,
+ NULL,
+ NULL
+};
+
#endif /* HAVE_AUDIOFILE */
-/* vim:set shiftwidth=4 tabstop=8 expandtab: */