diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-05-04 20:53:29 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-05-04 20:53:29 +0200 |
commit | d24480e491075150634c04c52d2c9efef9244492 (patch) | |
tree | 9d14041cb141e35381a4d179e1d0c383562f8000 /src | |
parent | 0fda775ebd32b230179c200b89ebd520d9a9e4a2 (diff) | |
download | pianobar-windows-d24480e491075150634c04c52d2c9efef9244492.tar.gz pianobar-windows-d24480e491075150634c04c52d2c9efef9244492.tar.bz2 pianobar-windows-d24480e491075150634c04c52d2c9efef9244492.zip |
Lofi AAC support
32kbit/s. Closes #233.
Diffstat (limited to 'src')
-rw-r--r-- | src/libpiano/piano.h | 3 | ||||
-rw-r--r-- | src/libpiano/request.c | 4 | ||||
-rw-r--r-- | src/player.c | 2 | ||||
-rw-r--r-- | src/settings.c | 2 |
4 files changed, 10 insertions, 1 deletions
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h index c8c01db..249061b 100644 --- a/src/libpiano/piano.h +++ b/src/libpiano/piano.h @@ -65,7 +65,8 @@ typedef enum { PIANO_AF_UNKNOWN = 0, PIANO_AF_AACPLUS = 1, PIANO_AF_MP3 = 2, - PIANO_AF_MP3_HI = 3 + PIANO_AF_MP3_HI = 3, + PIANO_AF_AACPLUS_LO = 4, } PianoAudioFormat_t; typedef struct PianoSong { diff --git a/src/libpiano/request.c b/src/libpiano/request.c index 427cc2d..2e17872 100644 --- a/src/libpiano/request.c +++ b/src/libpiano/request.c @@ -42,6 +42,10 @@ THE SOFTWARE. */ static const char *PianoAudioFormatToString (PianoAudioFormat_t format) { switch (format) { + case PIANO_AF_AACPLUS_LO: + return "HTTP_32_AACPLUS"; + break; + case PIANO_AF_AACPLUS: return "HTTP_64_AACPLUS"; break; diff --git a/src/player.c b/src/player.c index 9a2306a..733a315 100644 --- a/src/player.c +++ b/src/player.c @@ -429,6 +429,7 @@ void *BarPlayerThread (void *data) { switch (player->audioFormat) { #ifdef ENABLE_FAAD + case PIANO_AF_AACPLUS_LO: case PIANO_AF_AACPLUS: player->aacHandle = NeAACDecOpen(); /* set aac conf */ @@ -472,6 +473,7 @@ void *BarPlayerThread (void *data) { switch (player->audioFormat) { #ifdef ENABLE_FAAD + case PIANO_AF_AACPLUS_LO: case PIANO_AF_AACPLUS: NeAACDecClose(player->aacHandle); free (player->sampleSize); diff --git a/src/settings.c b/src/settings.c index 1eeec50..19c07f5 100644 --- a/src/settings.c +++ b/src/settings.c @@ -222,6 +222,8 @@ void BarSettingsRead (BarSettings_t *settings) { } else if (streq ("audio_format", key)) { if (streq (val, "aacplus")) { settings->audioFormat = PIANO_AF_AACPLUS; + } else if (streq (val, "aacplus-lofi")) { + settings->audioFormat = PIANO_AF_AACPLUS_LO; } else if (streq (val, "mp3")) { settings->audioFormat = PIANO_AF_MP3; } else if (streq (val, "mp3-hifi")) { |