From a195a94be7aa14d839c77275814a52d2ee6b8b6f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 8 Jul 2009 20:51:10 +0200 Subject: Initial pandora one support (higher mp3 bitrates) Time display should be fixed. I need feedback! --- libpiano/src/main.c | 4 ++++ libpiano/src/piano.h | 4 ++-- libpiano/src/xml.c | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'libpiano') diff --git a/libpiano/src/main.c b/libpiano/src/main.c index bb282fb..380fbed 100644 --- a/libpiano/src/main.c +++ b/libpiano/src/main.c @@ -885,6 +885,10 @@ const char *PianoAudioFormatToString (PianoAudioFormat_t format) { return "mp3"; break; + case PIANO_AF_MP3_HI: + return "mp3-hifi"; + break; + default: return NULL; break; diff --git a/libpiano/src/piano.h b/libpiano/src/piano.h index 7ed5394..caee1b7 100644 --- a/libpiano/src/piano.h +++ b/libpiano/src/piano.h @@ -50,8 +50,8 @@ typedef enum {PIANO_RATE_BAN, PIANO_RATE_LOVE, PIANO_RATE_NONE} PianoSongRating_t; /* UNKNOWN should be 0, because memset sets audio format to 0 */ -typedef enum {PIANO_AF_UNKNOWN = 0, PIANO_AF_AACPLUS, PIANO_AF_MP3} - PianoAudioFormat_t; +typedef enum {PIANO_AF_UNKNOWN = 0, PIANO_AF_AACPLUS, PIANO_AF_MP3, + PIANO_AF_MP3_HI} PianoAudioFormat_t; typedef struct PianoSong { char *artist; diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 6d3d35a..591e5be 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -108,7 +108,7 @@ PianoReturn_t PianoXmlIsFault (const xmlNode *docRoot) { PianoReturn_t ret; /* FIXME: we could get into troubles when fault is not the first child - * (pandora yould add whitespace e.g.) */ + * (pandora could add whitespace e.g.) */ if (docRoot->children != NULL && docRoot->children->type == XML_ELEMENT_NODE && xmlStrEqual (docRoot->children->name, (xmlChar *) "fault")) { @@ -298,6 +298,8 @@ void PianoXmlParsePlaylistCb (const char *key, const xmlNode *value, song->audioFormat = PIANO_AF_AACPLUS; } else if (strcmp (valueStr, "mp3") == 0) { song->audioFormat = PIANO_AF_MP3; + } else if (strcmp (valueStr, "mp3-hifi") == 0) { + song->audioFormat = PIANO_AF_MP3_HI; } } } @@ -801,3 +803,4 @@ PianoReturn_t PianoXmlParseNarrative (const char *xml, char **retNarrative) { return ret; } + -- cgit v1.2.3