IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

How to play HTOA in Foobar?
g0a
post Aug 29 2010, 16:19
Post #1





Group: Members
Posts: 76
Joined: 30-April 03
Member No.: 6299



Hi,

is there any option / component to detect and display HTOA as a separate track in a file with embedded cue sheet in Foobar? If not, what is commonly done to play HTOA in Foobar? Editing the embedded CUE to make the hidden track a non-hidden one? :)


Thanks a lot

This post has been edited by g0a: Aug 29 2010, 16:20
Go to the top of the page
+Quote Post
 
Start new topic
Replies
BrassDude
post Jun 19 2013, 03:46
Post #2





Group: Members
Posts: 42
Joined: 1-February 11
Member No.: 87835



Foosion: From your comment it looks that the "track list" is generated in one of the core functions of foobar2000 and this can not be modified by an extension/component, right? So maybe the main developers could implement this? I mean in pseudo code this would look pretty simple:

if (Time(T01.I01)-Time(T01.I00) > HTOALimit):
ListTrack(T01.I00,0)

Essentially just a simple if statement. The only new parameter would be the time limit HTOALimit that determines when a hidden track is long enough to be listed as track 0. The ListTrack function (I don't know how this is actually done in foobar2000) takes an index (here T01.I00) and assignes a track number (here 0).

So my guess is this might not be too difficult to implement for the main developers but might be a super-cool new feature smile.gif. Or do I miss something here?
Go to the top of the page
+Quote Post
foosion
post Jun 19 2013, 05:31
Post #3





Group: FB2K Moderator (Donating)
Posts: 4409
Joined: 24-February 03
Member No.: 5153



QUOTE (BrassDude @ Jun 19 2013, 03:46) *
From your comment it looks that the "track list" is generated in one of the core functions of foobar2000 and this can not be modified by an extension/component, right?
Not quite, the code for cue sheet parsing is contained in the SDK itself, more specifically in the foobar2000_sdk_helpers library. This code is compiled into each component that supports cue sheets. So even if this code is changed, every such component needs to be recompiled for the changes to take effect. On the other hand foo_input_std contains the support for cue sheet files and since this comes with the foobar2000 installer, it has to be updated by Peter.

I glanced over the cue sheet code in foobar2000_sdk_helpers and I think the change is not that trivial as you hope it would be. The reason is that the code is based on the design decision that every TRACK in the cue sheet is mapped to a track in foobar2000. Different indexes are represented as meta data in foobar2000 which can be retrieved in title formatting code via the $info() function. Specifically
  • INDEX 01 is available as $info(referenced_offset) if is greater than zero.
  • The difference between INDEX 01 and INDEX 00 is available as $info(pregap) if it is greater than zero.
  • INDEX 02 is available as $info(index 02), INDEX 03 as $info(index 03), etc.
I haven't tested it but it should be like that according to this code from cuesheet_index_list.cpp:
CODE
void t_cuesheet_index_list::to_infos(file_info & p_out) const
{
double base = m_positions[1];

if (base > 0) {
p_out.info_set("referenced_offset",cuesheet_format_index_time(base));
}

if (m_positions[0] < base)
p_out.info_set("pregap",cuesheet_format_index_time(base - m_positions[0]));
else
p_out.info_remove("pregap");

p_out.info_remove("index 00");
p_out.info_remove("index 01");

for(unsigned n=2;n<count;n++)
{
char namebuffer[16];
sprintf_s(namebuffer,"index %02u",n);
double position = m_positions[n] - base;
if (position > 0)
p_out.info_set(namebuffer,cuesheet_format_index_time(position));
else
p_out.info_remove(namebuffer);
}
}


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th July 2014 - 10:50