Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#12490 - WPS tag for number of channels

Attached to Project: Rockbox
Opened by Frank Gevaerts (fg) - Tuesday, 27 December 2011, 22:54 GMT+2
Last edited by Frank Gevaerts (fg) - Tuesday, 27 December 2011, 22:54 GMT+2
Task Type Patches
Category ID3 / meta data
Status New
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

This patch adds a %ch tag that returns the number of channels in the current file.

Unfortunately, the large majority of codecs don't fill in this field in struct mp3entry. In the codecs covered by the rockbox testfiles collection, only atrac, cook and tta actually work.

I don't think it makes much sense to commit this with so few supported codecs, so help is appreciated on the codec side of things
   channels.diff (1.8 KiB)
 apps/gui/skin_engine/skin_tokens.c |    9 +++++++++
 lib/skin_parser/tag_table.c        |    1 +
 lib/skin_parser/tag_table.h        |    1 +
 3 files changed, 11 insertions(+)

This task depends upon

Comment by Frank Gevaerts (fg) - Tuesday, 27 December 2011, 23:21 GMT+2
This patch uses the DSP setup instead of the codec metadata. It should work for all codecs, but it won't know if a file has more than two channels and is downmixed.
   channels_v2.diff (2.3 KiB)
 apps/gui/skin_engine/skin_tokens.c |    6 ++++++
 apps/dsp.c                         |    5 +++++
 apps/dsp.h                         |    1 +
 lib/skin_parser/tag_table.c        |    1 +
 lib/skin_parser/tag_table.h        |    1 +
 5 files changed, 14 insertions(+)

Comment by Jonathan Gordon (jdgordon) - Wednesday, 28 December 2011, 00:51 GMT+2
wont it always show 2 channels then?
also, it should use i<something> instead of %ch to go along with all the other metadata related tags
Comment by Martin Sägmüller (dfkt) - Wednesday, 28 December 2011, 13:53 GMT+2
Isn't this more fitting into the %f-something file info category than into the metadata one? At least with the second patch, methinks.

Loading...