summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/player.c6
-rw-r--r--src/audio/player.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/audio/player.c b/src/audio/player.c
index 5b9d0103..07f41f01 100644
--- a/src/audio/player.c
+++ b/src/audio/player.c
@@ -563,3 +563,9 @@ float streamProgress_Player(const iPlayer *d) {
563 } 563 }
564 return 0; 564 return 0;
565} 565}
566
567iString *metadataLabel_Player(const iPlayer *d) {
568 return newFormat_String("%d-bit %s %d Hz", SDL_AUDIO_BITSIZE(d->decoder->inputFormat),
569 SDL_AUDIO_ISFLOAT(d->decoder->inputFormat) ? "float" : "integer",
570 d->spec.freq);
571}
diff --git a/src/audio/player.h b/src/audio/player.h
index c3552640..fe6717b0 100644
--- a/src/audio/player.h
+++ b/src/audio/player.h
@@ -45,3 +45,5 @@ iBool isPaused_Player (const iPlayer *);
45float time_Player (const iPlayer *); 45float time_Player (const iPlayer *);
46float duration_Player (const iPlayer *); 46float duration_Player (const iPlayer *);
47float streamProgress_Player (const iPlayer *); /* normalized 0...1 */ 47float streamProgress_Player (const iPlayer *); /* normalized 0...1 */
48
49iString * metadataLabel_Player (const iPlayer *);