icynames are now copied to title of streams

git-svn-id: https://svn.musicpd.org/mpd/trunk@1258 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes
2004-05-31 11:42:46 +00:00
parent b4a91d574f
commit 000e053ce7
17 changed files with 169 additions and 91 deletions

View File

@@ -51,21 +51,21 @@ int getAudiofileTotalTime(char * file)
return time;
}
int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) {
int audiofile_decode(OutputBuffer * cb, DecoderControl * dc, char * path) {
int fs, frame_count;
AFfilehandle af_fp;
int bits;
mpd_uint16 bitRate;
struct stat st;
if(stat(dc->file,&st) < 0) {
ERROR("failed to stat: %s\n",dc->file);
if(stat(path, &st) < 0) {
ERROR("failed to stat: %s\n", path);
return -1;
}
af_fp = afOpenFile(dc->file,"r", NULL);
af_fp = afOpenFile(path, "r", NULL);
if(af_fp == AF_NULL_FILEHANDLE) {
ERROR("failed to open: %s\n",dc->file);
ERROR("failed to open: %s\n", path);
return -1;
}
@@ -83,7 +83,7 @@ int audiofile_decode(OutputBuffer * cb, DecoderControl * dc) {
if (dc->audioFormat.bits != 8 && dc->audioFormat.bits != 16) {
ERROR("Only 8 and 16-bit files are supported. %s is %i-bit\n",
dc->file,dc->audioFormat.bits);
path, dc->audioFormat.bits);
afCloseFile(af_fp);
return -1;
}