summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-02-01 13:35:50 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-02-01 13:35:50 +0100
commitc9e23f4e29f08fc53b2306311fa70b1cf4b78b0c (patch)
treecc0f87e31f8528d5eca1b2882449a7071d3cb92e /src/main.c
parent516bc854369243b2f1ba4f1c019aca06cbbd736e (diff)
downloadpianobar-c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c.tar.gz
pianobar-c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c.tar.bz2
pianobar-c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c.zip
mp3 playback support
Now libfaad and/or libmad are used for playback. There's currently no remaining time displayed for mp3 playback.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index b44330a..33ece10 100644
--- a/src/main.c
+++ b/src/main.c
@@ -52,7 +52,7 @@ inline float BarSamplesToSeconds (float samplerate, float channels,
int main (int argc, char **argv) {
PianoHandle_t ph;
- struct aacPlayer player;
+ static struct audioPlayer player;
BarSettings_t settings;
PianoSong_t *curSong = NULL;
PianoStation_t *curStation = NULL;
@@ -165,7 +165,7 @@ int main (int argc, char **argv) {
BarUiMsg ("Receiving new playlist... ");
PianoDestroyPlaylist (&ph);
if (BarUiPrintPianoStatus (PianoGetPlaylist (&ph,
- curStation->id, PIANO_AF_AACPLUS)) !=
+ curStation->id, settings.audioFormat)) !=
PIANO_RET_OK) {
curStation = NULL;
} else {
@@ -198,6 +198,7 @@ int main (int argc, char **argv) {
memset (&player, 0, sizeof (player));
player.url = strdup (curSong->audioUrl);
player.gain = curSong->fileGain;
+ player.audioFormat = curSong->audioFormat;
/* start player */
pthread_create (&playerThread, NULL, BarPlayerThread,