map

minimalist audio player
git clone https://git.porkepik.fr/map
Log | Files | Refs | README | LICENSE

commit 39b7e6d492714558693c84de8d60a90758dfbedf
parent b517d02b5b1c3bbc6d40bcdc728155c8c7fda470
Author: Thomas Philippe <dev@porkepik.fr>
Date:   Mon, 14 Sep 2020 20:45:21 +0200

fix track title staying bold after playing

Diffstat:
Malsa.c | 14--------------
Mmap.c | 3++-
2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/alsa.c b/alsa.c @@ -71,20 +71,6 @@ alsa_open(int bits, int rate, int channels) alsa_close(); alsa_init(); - /*switch (bits) { - case 16: - format = SND_PCM_FORMAT_S16; - break; - case 24: - format = SND_PCM_FORMAT_S24; - break; - case 32: - format = SND_PCM_FORMAT_S32; - break; - default: - return -1; - }*/ - format = SND_PCM_FORMAT_FLOAT; if (snd_pcm_open(&hdl, "default", SND_PCM_STREAM_PLAYBACK, 0) < 0) return -1; diff --git a/map.c b/map.c @@ -248,7 +248,7 @@ next: tracks[trackid]->current = 1; bufsize = opentrack(&curtrack); if (!gapless) - buf = malloc(bufsize * sizeof(long)); + buf = malloc(bufsize * sizeof(float)); print_playlist(tracks, toptrack, cursorid); print_info(curtrack); print_volume(volume); @@ -379,6 +379,7 @@ next: print_timer(timersec, curtrack.length); } while (done); + tracks[trackid]->current = 0; trackid++; endtrack: close_file();