# HG changeset patch # User ib # Date 1385993627 0 # Node ID 72438f81faabb01c8ff847dc5d8c56321b76bb82 # Parent 3a192d8ecc5632e6df27ba6fb0a17187cdb75935 Add new stream control command STREAM_CTRL_GET_CURRENT_TITLE for CDDA. diff -r 3a192d8ecc56 -r 72438f81faab stream/stream_cdda.c --- a/stream/stream_cdda.c Mon Dec 02 13:53:03 2013 +0000 +++ b/stream/stream_cdda.c Mon Dec 02 14:13:47 2013 +0000 @@ -279,6 +279,13 @@ return STREAM_OK; break; } + case STREAM_CTRL_GET_CURRENT_TITLE: + { + int cur_track = get_track_by_sector(p, p->sector); + if (cur_track == -1) return STREAM_ERROR; + *(unsigned int *)arg = cur_track; + return STREAM_OK; + } case STREAM_CTRL_GET_CURRENT_CHAPTER: { int start_track = get_track_by_sector(p, p->start_sector);