Hydrogenaudio Forums

Lossless Audio Compression => Lossless / Other Codecs => Topic started by: HorsePower73 on 2009-09-21 14:59:15

Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-21 14:59:15
I hope this is the right place for this post.

I wrote a DirectShow filter for TAK, called dsfTAKSource.
You can download it here: http://home.tele2.it/LivioCavallo/ (http://home.tele2.it/LivioCavallo/)

It's the first version, so please warn me of any problem.
This filter should allow any directshow player to open, decode and play .tak audio files.

Well, I hope you'll like it.

---
HorsePower73
Title: TAK DirectShow Filter
Post by: Destroid on 2009-09-21 15:35:07
On installation I get the error message:
Code: [Select]
RegSvr32 LoadLibrary("C:\WINNT\system32\dsfTAKSource.dll") failed - The specified module could not be found.
Checked the directory and file is indeed available. Maybe this is because I tried on machine using Windows 2000. Is there any Visual C dependencies?

edit: Yes, needed MSVCP90.DLL and MSVCR90.DLL.
Can play TAK files in Media Player Classic with seeking working ok.
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-21 17:22:11
Thanks for testing the filter.
effectively it is better to avoid additional dependencies. I removed that 2 dependencies and linked statically with CRT libs.
Version 0.0.1.1, now online, has not these dependencies.
Title: TAK DirectShow Filter
Post by: Destroid on 2009-09-21 17:49:49
Nice! Works without those .DLL's.

(I can't wait to try the TAK .FLT you mentioned a while back  )
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-21 18:01:35
Well, really that FLT filter is ready and working: I've been using it for some weeks...
I wrote a Nero input filter too.

The problem with Audition filters (FLT) and Nero filters is licensing policy: so far I have not had time to read thier licences and I do not know whether I can put such filters online.
Can someone help me about this?
Title: TAK DirectShow Filter
Post by: zombiewerewolf on 2009-09-21 18:03:53
There's only one problem I encountered. It doesn't play tak files with unicode filename.
Title: TAK DirectShow Filter
Post by: Destroid on 2009-09-21 22:19:10
The problem with Audition filters (FLT) and Nero filters is licensing policy: so far I have not had time to read thier licences and I do not know whether I can put such filters online.
Can someone help me about this?
I could not find any specifics, but it would appear that non-profit filters are ok. If you start making a retirement fund with plug-ins then that's different

Seriously, I have not heard of any restrictions on free plug-ins but that does not mean there is not a conflict between the different software licenses. All the different software license carp is very confusing and with all the patent suits going on it might be worth contacting the developers. :shrug:
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-22 12:20:50
Yes, I know.
The problem here is that tac_deco_lib does not accept UNICODE filenames.

<brainstorming mode on>
I could try to work around this problem rewriting part of the filter to use tac-deco_lib streaming interface instead of file functions.
But now I'm considering rewriting my filter as a parser filter with support to IAsyncReader, in next major version.
<brainstorming mode off>

Maybe I'll work on it.
Title: TAK DirectShow Filter
Post by: twistedddx on 2009-09-22 15:45:54
The problem here is that tac_deco_lib does not accept UNICODE filenames.


You can convert widechar to multibyte, I think TAK accept multibyte filenames? I never checked

If you use Visual Studio:
char mbMultiByteFilename[_MAX_PATH];
WideCharToMultiByte(CP_UTF8, 0, szWideCharFilename, -1, mbMultiByteFilename, _MAX_PATH, 0, 0);
tak_SSD_Create_FromFile (mbMultiByteFilename, &Options, NULL, NULL);
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-23 00:54:28
[Are these programming details in topic?]

<Programming details START>

WideCharToMultiByte is a system function accessible using Kernel32.lib starting from WinNT, it's not a VisualStudio exclusive.
Filename string conversion in dsfTAKSource is already done using WideCharToMultiByte.
Some unicode characters does not have any MB equivalent (this is a reason unicode exists!), so conversion is sometimes impossible.
Also using best_fit_conversion on conversion exception (with system default character, the '?' wilcard used in place of not convertible characters) tak_SSD_Create_FromFile cannot open the file.
<Programming details END>

I compiled a new dsfTAKSource build which returns a better error code on filename conversion error.
Now players should detect and report it in a better way.
I'll put last build on dsfTAKSource site.

P.S.: as some of you may have noticed, site has moved. Now it is here:
http://liviocavallo.altervista.org/ (http://liviocavallo.altervista.org/)
Title: TAK DirectShow Filter
Post by: TBeck on 2009-09-23 22:32:05
I wrote a DirectShow filter for TAK, called dsfTAKSource.
...
This filter should allow any directshow player to open, decode and play .tak audio files.

Wow, that's really cool!  Thank you very much!

i will try it as soon as i have a bit more time.

The problem here is that tac_deco_lib does not accept UNICODE filenames.

Yes, unfortunately. I will put it on my todo list.

  Thomas
Title: TAK DirectShow Filter
Post by: Zarggg on 2009-09-24 16:08:02
Ah, was that the problem? I'll be so happy once that's fixed.
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-25 16:35:09
dsfTAKSource v 0.0.1.2 is out (http://liviocavallo.altervista.org/ (http://liviocavallo.altervista.org/))

ChangeLog
------------------------------------------------------------------------------------

v 0.0.1.2 (25.09.2009)

v 0.0.1.1 (21.09.2009)

v 0.0.1.0 (21.09.2009)

Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-26 15:42:28
Code has been updated (http://liviocavallo.altervista.org/ (http://liviocavallo.altervista.org/))
dsfTAKSource 0.0.1.3 is now supporting UNICODE.

ChangeLog
----------------------------------------------------------------------------------------

v 0.0.1.3 (25.09.2009)

Please let me know if it works for you.

Title: TAK DirectShow Filter
Post by: zombiewerewolf on 2009-09-26 17:18:26
It works great  Thank you very much for adding unicode support.
Title: TAK DirectShow Filter
Post by: twistedddx on 2009-09-27 14:47:03
Some unicode characters does not have any MB equivalent (this is a reason unicode exists!), so conversion is sometimes impossible.


I thought UTF8 was full unicode for the sake of what people call "unicode" and is multibyte. What Chars dont convert? Widechar is just less efficient storage, handy that the char size is a constant but it offers no extra support over multibyte(UTF8). Normally problems only arise when the codepage non widechar things were encoded in is unknown and it has to be guessed.

Maybe TAK just doesnt support multibyte correctly? You really dont need widechar to support unicode!(more obvious when you realize widechar is really a Microsoft thing only, most everything else uses UTF8)
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2009-09-27 23:14:48
First: Tks for commenting.

<short answer begin>
YES, maybe you are right: I think tak_deco_lib doesnt support multibyte correctly; and
almost NO, maybe you are wrong: I think tak_deco_lib doesnt support multibyte at all.
<short answer end>

I naturally agree with you about MBCS, UNICODE and UTF-8 relationships. I agree with this too: it's a problem guessing code pages from unicode, and moreover I doubt that even so it would work due to FS implications.
It seems easier using tak_SSD_Create_FromStream.

Just note:
Code: [Select]
char fileName [MAX_PATH];
const wchar_t wFilename[] = L"C:\\TestFile_\x0107.tak";  // N.B.: \x0171 is 'ć'
WideCharToMultiByte(CP_UTF8, 0, wFilename, -1, fileName, MAX_PATH, 0, 0);

fileName will be "C:\TestFile_ć.tak", shown as char string, not MB, where 'Ä' is 0xc4 and '‡' is 0x87.

Using above code you'll get the right MB string, but passing it to tak_SSD_Create_FromFile you'll get an invalid stream decoder.
As tak docs say and as tak behaves, it really seems TAK wants a simple char (not MB) string.
Naturally using CP_ACP (current system Windows ANSI code page) does not help; on my system (Italy) it converts 'ć' to 'c' and tak_SSD_Create_FromFile won't find the file.
You can play with WC_NO_BEST_FIT_CHARS flag (leading to this substitution 'ć' -> '?') but tak_SSD_Create_FromFile refuses to open.[/size]
Title: TAK DirectShow Filter
Post by: johnsonlam on 2009-10-01 15:55:17
Thanks HorsePower73, though I didn't convert all my works to TAK yet, but thanks for your work.

UNICODE (usually refer to UTF-8) is a standard for OSX, and widely use on Windows, I have a Mac and I'm using it together with Windows, I got many Chinese and Japanese song name (and ID3v2 tag), can't live without it. Also it's time to get rid of the multiple standard (GB, BIG5, SHIFT-JIS, UHC) and everyone switch to UNICODE.

And I think Thomas already know many people around the world HAVE to use UNICODE, when TAK can take care the UTF-8 native, it'll be more popular.
Title: TAK DirectShow Filter
Post by: watercolor on 2010-05-02 08:27:25
Can I use this on Windows 7 x64?
I try Install.bat. but not success.
I saw RegSvr32 error popup.

by the way,I think mostly TAK audio file is using embedded cue sheet.
This mean I have to split TAK file to play some player with a track unit.
or, Is this support multi track TAK file?(e.g. CDImage.tak)

Sorry my poor english. thank you.
Title: TAK DirectShow Filter
Post by: lvqcl on 2010-05-02 09:47:53
Run 32-bit command line and type Install.bat there.
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2010-05-02 11:17:01
As lvqcl already said, it should work running install.bat from a 32bit command line.

About your second question I am not shure to fully understand, but the problem may be related to dsfTAKSource actually not supporting tagging
Title: TAK DirectShow Filter
Post by: watercolor on 2010-05-02 12:55:00
Run 32-bit command line and type Install.bat there.



As lvqcl already said, it should work running install.bat from a 32bit command line.


Thank you. now I playing TAK on WMP.

About your second question I am not shure to fully understand, but the problem may be related to dsfTAKSource actually not supporting tagging


I like multitrack audio file because of the speed of the file opening and the easiness of management.
However, I will have to do the decision to divide the audio file where two or more tunes are included.
Title: TAK DirectShow Filter
Post by: Spiridon on 2010-05-10 20:53:08
TAK
Sampling rate: 96Khz
Resolution: 24bits

Incorrect playback speed (slower)
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2010-05-11 10:25:16
Thanks for signaling.
Now ver 0.0.1.5 is online, fixing that bug.
You can download dsfTAKSource ver 0.0.1.5 here: http://www.liviocavallo.altervista.org/ (http://www.liviocavallo.altervista.org/)
Sample rates > 44.1 KHz now work correctly for me.
Please, can you confirm that?

Sorry for that, it was a simple, polite and bad cast... Just to remember again: avoid casts...
Title: TAK DirectShow Filter
Post by: Spiridon on 2010-05-11 23:26:30
Thanks for signaling.
Now ver 0.0.1.5 is online, fixing that bug.
You can download dsfTAKSource ver 0.0.1.5 here: http://www.liviocavallo.altervista.org/ (http://www.liviocavallo.altervista.org/)
Sample rates > 44.1 KHz now work correctly for me.
Please, can you confirm that?

Sorry for that, it was a simple, polite and bad cast... Just to remember again: avoid casts...


OK. Thanks.
Title: TAK DirectShow Filter
Post by: Spiridon on 2010-05-12 10:56:10
Sample rate: 192 Khz
Can't start playback.
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2010-05-15 11:12:55
Well. this seems a deeper (or wider) problem.
It does not seem to be a bug; it seems that freq above 96KHz require a different approach.
I should investigate, but really now I do not have time.
I hope next month.
Thanks for testing.
Title: TAK DirectShow Filter
Post by: Spiridon on 2010-05-25 14:19:52
Sample rate: 192 Khz
Can't start playback.


I don't have problem anymore.
To play these files (192 Khz), AC3Filter is needed.
AC3Filter -> System -> Use AC3Filter for -> Check PCM
Title: TAK DirectShow Filter
Post by: betaking on 2011-03-07 12:57:01
To:HorsePower73
TAK 2.1.0 Final is out,but I found that you made TAK DirectShow Source Filter based on TAK 2.0.0,can you make a new version base on TAK 2.1.0? Thanks!
Title: TAK DirectShow Filter
Post by: Destroid on 2011-03-07 21:18:09
I'm not sure any format changes occurred between version 2.0.0 and 2.1.0 that would interfere with decoding, you shouldn't have problems. However, if you do have issues you'll simply need to replace the tak_deco_lib.dll installed by the TAK DirectShow filter found in your "...\system32" folder with the updated DLL included with TAK 2.1.0.
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2011-03-18 08:39:26
Yes Destroid, you are right.  I'm busy, but I'll update the installation package.
Title: TAK DirectShow Filter
Post by: HorsePower73 on 2011-12-01 11:34:44
TAK DirectShow filter has been updated.
Now it's up to TAK version 2.2.0.
Now it installs and works correctly in Windows 64bit (tested with Windows7 64bit).

You can find it here:
dstTAKSource (0.0.1.6): http://liviocavallo.altervista.org/ (http://liviocavallo.altervista.org/)
Title: TAK DirectShow Filter
Post by: Nowings69 on 2011-12-01 13:18:14
I want to ask you one why dont you make a splitter?
I already replace tak_deco_lib.dll and try it

Title: TAK DirectShow Filter
Post by: HorsePower73 on 2011-12-01 23:06:07
I think I have not understood you question.
I could write a parser, but this requires a TAK file to have a shure sequnce of bytes at the beginning; I think this is not assured as TB can change file format in the future.
Please explain me your idea about the splitter.

Replace tak_deco_lib? To try what?
It's late night here, please be patient...
Title: TAK DirectShow Filter
Post by: Destroid on 2012-05-20 21:26:32
I had error using install.bat with registry entry  http://www.hydrogenaudio.org/forums/index....st&p=796016 (http://www.hydrogenaudio.org/forums/index.php?showtopic=95045&view=findpost&p=796016)

I had success with minor modification:
%systemroot%/system32/regedit.exe TAKRegistration.reg  ->  %systemroot%/regedit.exe TAKRegistration.reg
Title: TAK DirectShow Filter
Post by: TBeck on 2013-06-18 08:47:08
Better late than never... 

Thank you for the filter!

I was very glad about your (first) release. But i thought, i had to test the filter before adding it to my list of software with TAK support. Unfortunately i had no time and deceided to wait for user responses. Then i lost sight of it.

But finally i have managed to add it to the software list in TAK 2.3.0's readme.

  Thomas

SimplePortal 1.0.0 RC1 © 2008-2019