* WAV/LPCM handling tweaks.

This commit is contained in:
Justin Maggard 2009-05-28 08:22:39 +00:00
parent abf80e59d7
commit 029928569a
2 changed files with 6 additions and 6 deletions

View File

@ -164,9 +164,9 @@ _get_wavtags(char *filename, struct song_metadata *psong)
//DEBUG DPRINTF(E_DEBUG,L_SCANNER,"Song length: %d\n", psong->song_length);
//DEBUG DPRINTF(E_DEBUG,L_SCANNER,"Bit rate: %d\n", psong->bitrate);
#if 0 // Wrong MIME type? PS3 doesn't like it; it wants audio/x-wav.
// PS3 doesn't like this; it wants audio/x-wav. I wonder why?
asprintf(&(psong->mime), "audio/L16;rate=%d;channels=%d", psong->samplerate, psong->channels);
#endif
return 0;
}

View File

@ -513,8 +513,8 @@ callback(void *args, int argc, char **argv, char **azColName)
if( strncmp(class, "item", 4) == 0 )
{
/* We may need special handling for MIME types */
if( strncmp(mime, "video", 5) == 0 )
/* We may need special handling for certain MIME types */
if( *mime == 'v' )
{
switch( passed_args->client )
{
@ -544,9 +544,9 @@ callback(void *args, int argc, char **argv, char **azColName)
}
}
}
else if( !(passed_args->flags & FLAG_DLNA) )
else if( strncmp(mime+6, "L16", 3) == 0 )
{
if( strncmp(mime, "audio/L16", 9) == 0 )
if( !(passed_args->flags & FLAG_DLNA) || (passed_args->client == EPS3) )
{
strcpy(mime+6, "x-wav");
}