Skip to main content
Topic: foo_input_tak (Read 208163 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_input_tak

Reply #175
At the time when I originally wrote the plugin, the TAK decoder did not support this feature. I do not know whether it does now.


Multichannel support was added in 2.2.0. The changes are described in SDK\Source\takStream.pas (and AFAIK nowhere else).

Code: [Select]
  New types:

    - TtakAudioFormatEx replaces TtakAudioFormat.

  New functions:
      ...
    - takAudioFormat_GetWaveExtensibleSpeakerMask ()

The text of this function is also availabe in takStream.pas

foo_input_tak

Reply #176
Well, if that function is exported from the tak_deco_lib.dll it is possible to access it from foo_input_tak. Of course, it will be necessary to add the declaration of the function to the C/C++ header files and either update the import library (or access the function dynamically to keep support for older versions of tak_deco_lib.dll).

foo_input_tak

Reply #177
Well, if that function is exported from the tak_deco_lib.dll it is possible to access it from foo_input_tak. Of course, it will be necessary to add the declaration of the function to the C/C++ header files and either update the import library (or access the function dynamically to keep support for older versions of tak_deco_lib.dll).


Does it mean that you don't want to do it yourself?    I think 'll try to make such plugin then.

And, anybody knows the difference between tak_SSD_GetStreamInfo() and tak_SSD_GetStreamInfo_V22() ? TBeck, do you read the thread ?

foo_input_tak

Reply #178
Does it mean that you don't want to do it yourself?    I think 'll try to make such plugin then.
It means real life interference keeps me from doing it. You're welcome, if you want to give it a try.  Remember that you don't need to start from scratch, although you should probably ask kode54 for the most recent source code, since he did the last update.

foo_input_tak

Reply #179
    [/li]
And, anybody knows the difference between tak_SSD_GetStreamInfo() and tak_SSD_GetStreamInfo_V22() ? TBeck, do you read the thread ?

Just played around on it a bit.
Difference between them seems the version of StreamInfo structure (V10 or V22), and V22 structure has extended info including speaker assignment.
All of these information are written takStream.pas, but since TtakAudioFormatEx and Ttak_str_StreamInfo_V22 are not present in the public C header, you have to create C/C++ decls yourself like the following:

Code: [Select]
struct TtakAudioFormatEx: public TtakAudioFormat {
    TtakBool  HasExtension;
    TtakInt32 ValidBitsPerSample;
    TtakBool  HasSpeakerAssignment;
    char SpeakerAssignment[16];
};

struct Ttak_str_StreamInfo_V22 {
    Ttak_str_EncoderInfo Encoder;
    Ttak_str_SizeInfo    Sizes;
    TtakAudioFormatEx    Audio;
};

TAK_API TtakResult tak_SSD_GetStreamInfo_V22(TtakSeekableStreamDecoder ADecoder,
                                             Ttak_str_StreamInfo_V22 * AInfo);


foo_input_tak

Reply #180
Sources: [obsolete file removed]
Based on foo_input_tak from kode54 which is based on foosion's code.

Does anybody want to verify it?


foo_input_tak

Reply #182
OK, here it is (marked as beta just in case)

[obsolete file removed]


foo_input_tak

Reply #184
Fixed the attachment name (was fb2k_component, should be fb2k-component), which was the fault of the forum software, which I have also patched.

foo_input_tak

Reply #185
Has the function used to access the MD5 hash (stored when the file is encoded with the -md5 switch) been documented yet? I'd love to be able to access the hash from within fb2k's Properties dialog, like you can with FLAC.

foo_input_tak

Reply #186
AFAIK no, but I use it anyway. MD5 is available already.

foo_input_tak

Reply #187
Found a bug, please update: [attachment=7414:foo_inpu...nput_tak.fb2k-component]
sources: [attachment=7436:foo_inpu...6_beta_2.rar]

foo_input_tak

Reply #188
Has the function used to access the MD5 hash (stored when the file is encoded with the -md5 switch) been documented yet? I'd love to be able to access the hash from within fb2k's Properties dialog, like you can with FLAC.

In Pascal (tak_deco_lib) the function is implemented as:

Code: [Select]
function tak_SSD_GetMD5 (    ADecoder : TtakSeekableStreamDecoder;
                         var AMD5     : Ttak_str_MetaMd5) : TtakResult; cdecl;

begin
  if ADecoder = Nil then
    Result := tak_res_InvalidParameter
  else
    Result := TSeekableStreamDecoder (ADecoder).GetMD5 (AMD5);
end;


Ttak_str_MetaMd5 is defined in "takStream.pas".

I really would like to update the SDK and the library, but unfortunately i am short of time these days.

 

foo_input_tak

Reply #189
Any information about new tak_Cpu_* flags? It seems that new constants were added, probably (that's only my guess):

Code: [Select]
enum tak_Cpu {
  tak_Cpu_None  = 0x0000,
  tak_Cpu_Asm   = 0x0001,
  tak_Cpu_MMX   = 0x0002,
  tak_Cpu_SSE   = 0x0004,

  tak_Cpu_SSE2  = 0x0008,
  tak_Cpu_SSE3  = 0x0010,
  tak_Cpu_SSSE3 = 0x0020,

  tak_Cpu_Any   = 0x003F,
};

beta3: now tak_deco_lib will use SSE2 and newer instructions, if available.

foo_input_tak

Reply #190
Simple question - where should I place tak_deco_lib.dll - inside "components" subdirectory or inside "foobar2000" main directory? Different versions of this component show that 2 different locations... Older version from foosion's website contains deco_lib in main directory and input_tak in subdirectory, newer versions have both files just in zip/fb2k-component file without any directories inside...

foo_input_tak

Reply #191
you shouldn't be placing files anywhere. use the preferences>components page to install it. (or you can even double click .fb2k-component files in explorer if you have a standard foobar install - as opposed to portable)

foo_input_tak

Reply #192
I install and update nearly all my components manually. Thus my question is still open

foo_input_tak

Reply #193
It's placed in the user-components\foo_input_tak folder.

foo_input_tak

Reply #194
Hmmm... so I assume that if I install everything manually to "Program Files\foobar2000\components" folder, then both files should be placed there, and ANY of them should be placed in just "Program Files\foobar2000" folder ?

foo_input_tak

Reply #195
Simple question - where should I place tak_deco_lib.dll - inside "components" subdirectory or inside "foobar2000" main directory? Different versions of this component show that 2 different locations... Older version from foosion's website contains deco_lib in main directory and input_tak in subdirectory, newer versions have both files just in zip/fb2k-component file without any directories inside...


Old foobar2000 could only load components from the "components" directory in the installation dir. With that version the components themselves couldn't find their dependency dll files from anywhere but system search path and the executable dir where foobar2000.exe was located. Back then components also required manual installation so foosion packaged his to be as easy to install as possible.
Many things have changed since those days and such requirements no longer apply. You can still place the tak_deco.dll in the main dir and foo_input_tak.dll in the components dir or you can place them both in components dir or in a subdir under components dir or even in the main program dir. Though I wouldn't recommend doing that. Component loading rules from the install dir may be changed in the future and you would have much easier time if you didn't try to fight against system. You could install these components simply by dragging and dropping dropping the archive over the Components page in Preferences or by double clicking the file in Explorer. And as an added bonus you could automatically update the ones hosted on foobar2000.org with a click of a button.

foo_input_tak

Reply #196
Thanks for so clear answer. I am doing this mostly because of my old habits with foobar versions from 0.8 to 0.9. Other thing is that anyone using my PC (currently just my wife) can use all benefits of my configuration - all inputs, outputs, visualisations, DSP effects etc. One update (of one directory) lets all users use the same, latest versions of all components. I don't have to care about any "missing functionalities" or one configuration less stable than other because of differences in installed components. In the past (good old doorm times) my PC was used regularily by my 2 room mates and "Guest" account was enabled and lso used. That was 4 users including me, so updating just one directory was easier than updating it everywhere... Other thing is that it was easier to create SFX RAR file "reinstallation distribution" with all my components extracting just to Program Files dir, rather than to user dir. Such .rar works OK for all M$ systems and all language versions in Win XP just because it omits usernames and localised application data directories (under XP).  But maybe I really should change it? You know, habit is our second nature...

foo_input_tak

Reply #197
Any information about new tak_Cpu_* flags? It seems that new constants were added, probably (that's only my guess):

Code: [Select]
enum tak_Cpu {
  tak_Cpu_None  = 0x0000,
  tak_Cpu_Asm   = 0x0001,
  tak_Cpu_MMX   = 0x0002,
  tak_Cpu_SSE   = 0x0004,

  tak_Cpu_SSE2  = 0x0008,
  tak_Cpu_SSE3  = 0x0010,
  tak_Cpu_SSSE3 = 0x0020,

  tak_Cpu_Any   = 0x002F,
};

Exactly.

beta3: now tak_deco_lib will use SSE2 and newer instructions, if available.

Cool!

foo_input_tak

Reply #198
beta3: now tak_deco_lib will use SSE2 and newer instructions, if available.

You're awesome, lvqcl!

In Pascal (tak_deco_lib) the function is implemented as:

Ttak_str_MetaMd5 is defined in "takStream.pas".

I really would like to update the SDK and the library, but unfortunately i am short of time these days.

Cool; I guess lvqcl would be able to implement the thing now, as the current implementation (lines 514–520 of tak_lib_cpp) doesn't seem to work. Don't ask me why, though; I've no idea where TMD5State and get_MD5() come from.

foo_input_tak

Reply #199
it's already implemented. you'll see it on the properties tab of the properties dialog assuming you used the -md5 parameter when encoding.

 
SimplePortal 1.0.0 RC1 © 2008-2019