Skip to content

Commit

Permalink
Added player methods for printing metadata and setting the artwork im…
Browse files Browse the repository at this point in the history
…age.
  • Loading branch information
Benjamin Maus authored and abrasive committed Jul 1, 2014
1 parent 11f1398 commit 6e33309
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions player.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,20 @@ void player_volume(double f) {
pthread_mutex_unlock(&vol_mutex);
}
}

void player_metadata(metadata *meta) {
printf("Metadata Artist: %s Title: %s Album: %s Genre: %s Comment: %s\n",
meta->artist, meta->title, meta->album, meta->genre, meta->comment);
}

void player_cover_image(char *buf, int len, char *ext) {
printf("Cover Art set\n");
}

void player_cover_clear() {
printf("Cover Art cleared\n");
}

void player_flush(void) {
pthread_mutex_lock(&ab_mutex);
ab_resync();
Expand Down
4 changes: 4 additions & 0 deletions player.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _PLAYER_H

#include "audio.h"
#include "metadata.h"

typedef struct {
uint8_t aesiv[16], aeskey[16];
Expand All @@ -20,6 +21,9 @@ int player_play(stream_cfg *cfg);
void player_stop(void);

void player_volume(double f);
void player_metadata(metadata *meta);
void player_cover_image(char *buf, int len, char *ext);
void player_cover_clear();
void player_flush(void);
void player_resync(void);

Expand Down

0 comments on commit 6e33309

Please sign in to comment.