summaryrefslogtreecommitdiff
path: root/modules/rst/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rst/audio.c')
-rw-r--r--modules/rst/audio.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/modules/rst/audio.c b/modules/rst/audio.c
index 0a12640..9fbfe26 100644
--- a/modules/rst/audio.c
+++ b/modules/rst/audio.c
@@ -76,8 +76,8 @@ static void *play_thread(void *arg)
continue;
#if 1
if (now > ts + 100) {
- re_printf("rst: cpu lagging behind (%u ms)\n",
- now - ts);
+ debug("rst: cpu lagging behind (%u ms)\n",
+ now - ts);
}
#endif
@@ -110,8 +110,8 @@ static inline int decode(struct ausrc_st *st)
case MPG123_NEW_FORMAT:
mpg123_getformat(st->mp3, &srate, &ch, &encoding);
- re_printf("rst: new format: %i hz, %i ch, encoding 0x%04x\n",
- srate, ch, encoding);
+ info("rst: new format: %i hz, %i ch, encoding 0x%04x\n",
+ srate, ch, encoding);
/*@fallthrough@*/
case MPG123_OK:
@@ -122,8 +122,8 @@ static inline int decode(struct ausrc_st *st)
break;
default:
- re_printf("rst: mpg123_read error: %s\n",
- mpg123_plain_strerror(err));
+ warning("rst: mpg123_read error: %s\n",
+ mpg123_plain_strerror(err));
break;
}
@@ -177,8 +177,8 @@ static int alloc_handler(struct ausrc_st **stp, struct ausrc *as,
err = mpg123_open_feed(st->mp3);
if (err != MPG123_OK) {
- re_printf("rst: mpg123_open_feed: %s\n",
- mpg123_strerror(st->mp3));
+ warning("rst: mpg123_open_feed: %s\n",
+ mpg123_strerror(st->mp3));
err = ENODEV;
goto out;
}
@@ -192,10 +192,10 @@ static int alloc_handler(struct ausrc_st **stp, struct ausrc *as,
st->ptime = prm->ptime;
- re_printf("rst: audio ptime=%u sampc=%zu aubuf=[%u:%u]\n",
- st->ptime, st->sampc,
- prm->srate * prm->ch * 2,
- prm->srate * prm->ch * 40);
+ info("rst: audio ptime=%u sampc=%zu aubuf=[%u:%u]\n",
+ st->ptime, st->sampc,
+ prm->srate * prm->ch * 2,
+ prm->srate * prm->ch * 40);
/* 1 - 20 seconds of audio */
err = aubuf_alloc(&st->aubuf,
@@ -242,8 +242,7 @@ int rst_audio_init(void)
err = mpg123_init();
if (err != MPG123_OK) {
- re_printf("rst: mpg123_init: %s\n",
- mpg123_plain_strerror(err));
+ warning("rst: mpg123_init: %s\n", mpg123_plain_strerror(err));
return ENODEV;
}