mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-21 05:57:39 -04:00
File properties plugin: Add bitrate.
Change-Id: I6160c50685ce1615ef295a472f25cb608b2e6feb
This commit is contained in:
parent
a9d3e09611
commit
78f0dc8175
2 changed files with 19 additions and 1 deletions
|
@ -16066,3 +16066,17 @@
|
||||||
*: "Frequency"
|
*: "Frequency"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_PROPERTIES_BITRATE
|
||||||
|
desc: in properties plugin
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: "[Bitrate]"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "[Bitrate]"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Bit rate"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
|
|
@ -43,6 +43,7 @@ char str_year[MAX_PATH];
|
||||||
char str_discnum[MAX_PATH];
|
char str_discnum[MAX_PATH];
|
||||||
char str_tracknum[MAX_PATH];
|
char str_tracknum[MAX_PATH];
|
||||||
char str_duration[32];
|
char str_duration[32];
|
||||||
|
char str_bitrate[32];
|
||||||
char str_frequency[32];
|
char str_frequency[32];
|
||||||
|
|
||||||
unsigned nseconds;
|
unsigned nseconds;
|
||||||
|
@ -70,6 +71,7 @@ static const unsigned char* const props_file[] =
|
||||||
ID2P(LANG_PROPERTIES_DISCNUM), str_discnum,
|
ID2P(LANG_PROPERTIES_DISCNUM), str_discnum,
|
||||||
ID2P(LANG_PROPERTIES_TRACKNUM), str_tracknum,
|
ID2P(LANG_PROPERTIES_TRACKNUM), str_tracknum,
|
||||||
ID2P(LANG_PROPERTIES_DURATION), str_duration,
|
ID2P(LANG_PROPERTIES_DURATION), str_duration,
|
||||||
|
ID2P(LANG_PROPERTIES_BITRATE), str_bitrate,
|
||||||
ID2P(LANG_PROPERTIES_FREQUENCY), str_frequency,
|
ID2P(LANG_PROPERTIES_FREQUENCY), str_frequency,
|
||||||
};
|
};
|
||||||
static const unsigned char* const props_dir[] =
|
static const unsigned char* const props_dir[] =
|
||||||
|
@ -153,9 +155,11 @@ static bool file_properties(const char* selected_file)
|
||||||
"%s", id3.disc_string ? id3.disc_string : "");
|
"%s", id3.disc_string ? id3.disc_string : "");
|
||||||
rb->snprintf(str_tracknum, sizeof str_tracknum,
|
rb->snprintf(str_tracknum, sizeof str_tracknum,
|
||||||
"%s", id3.track_string ? id3.track_string : "");
|
"%s", id3.track_string ? id3.track_string : "");
|
||||||
|
rb->snprintf(str_bitrate, sizeof str_bitrate,
|
||||||
|
"%d kbps", id3.bitrate ? : 0);
|
||||||
rb->snprintf(str_frequency, sizeof str_frequency,
|
rb->snprintf(str_frequency, sizeof str_frequency,
|
||||||
"%ld Hz", id3.frequency ? : 0);
|
"%ld Hz", id3.frequency ? : 0);
|
||||||
num_properties += 11;
|
num_properties += 12;
|
||||||
|
|
||||||
if (dur > 0)
|
if (dur > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue