Skip to main content

Topic: TAK DirectShow Filter (Read 31784 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
TAK DirectShow Filter
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/

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

  • Destroid
  • [*][*][*][*][*]
TAK DirectShow Filter
Reply #1
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.
  • Last Edit: 21 September, 2009, 10:50:17 AM by Destroid
"Something bothering you, Mister Spock?"

TAK DirectShow Filter
Reply #2
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.

  • Destroid
  • [*][*][*][*][*]
TAK DirectShow Filter
Reply #3
Nice! Works without those .DLL's.

(I can't wait to try the TAK .FLT you mentioned a while back  )
"Something bothering you, Mister Spock?"

TAK DirectShow Filter
Reply #4
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?

TAK DirectShow Filter
Reply #5
There's only one problem I encountered. It doesn't play tak files with unicode filename.

  • Destroid
  • [*][*][*][*][*]
TAK DirectShow Filter
Reply #6
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:
"Something bothering you, Mister Spock?"

TAK DirectShow Filter
Reply #7
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.

  • twistedddx
  • [*]
TAK DirectShow Filter
Reply #8
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);

TAK DirectShow Filter
Reply #9
[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/

  • TBeck
  • [*][*][*][*][*]
  • Developer
TAK DirectShow Filter
Reply #10
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

  • Zarggg
  • [*][*][*][*][*]
TAK DirectShow Filter
Reply #11
Ah, was that the problem? I'll be so happy once that's fixed.

TAK DirectShow Filter
Reply #12
dsfTAKSource v 0.0.1.2 is out (http://liviocavallo.altervista.org/)

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

v 0.0.1.2 (25.09.2009)

  • Partially rewritten STR_Converter helper functions to return better error codes and to throw standard exceptions on filename conversion errors so that DirechShow players can detect and report correctly.
  • Checked and updated every error code returned and every exception thrown by functions, for correct error detection and reporting by DirechShow players (checked WMP11 and MPC 6.4.9.1).
  • Fixed a subtle bug (a multi-thread sync error really...) discovered in Microsoft DirectShow SDK's CSourceStream Base Class and relative documentation, which causates a deadlock when failing to create a filter's working thread.
v 0.0.1.1 (21.09.2009)

  • Removed MSVCP90.DLL and MSVCR90.DLL dependencies - libraries are now statically linked.
v 0.0.1.0 (21.09.2009)

  • First release.

TAK DirectShow Filter
Reply #13
Code has been updated (http://liviocavallo.altervista.org/)
dsfTAKSource 0.0.1.3 is now supporting UNICODE.

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

v 0.0.1.3 (25.09.2009)

  • Added UNICODE files support. Now dsfTAKSource supports takStreamIoInterface too, so file I/O is done by native Windows functions (supporting UNICODE), no more using tak_SSD_Create_FromFile (ASCII aonly).
Please let me know if it works for you.


TAK DirectShow Filter
Reply #14
It works great  Thank you very much for adding unicode support.

  • twistedddx
  • [*]
TAK DirectShow Filter
Reply #15
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)
  • Last Edit: 27 September, 2009, 09:58:51 AM by twistedddx

TAK DirectShow Filter
Reply #16
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]
  • Last Edit: 27 September, 2009, 06:33:54 PM by HorsePower73

  • johnsonlam
  • [*][*][*]
TAK DirectShow Filter
Reply #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.
  • Last Edit: 01 October, 2009, 10:56:26 AM by johnsonlam
Hong Kong - International Joke Center (after 1997-06-30)

  • watercolor
  • [*][*][*]
TAK DirectShow Filter
Reply #18
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.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
TAK DirectShow Filter
Reply #19
Run 32-bit command line and type Install.bat there.

TAK DirectShow Filter
Reply #20
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

  • watercolor
  • [*][*][*]
TAK DirectShow Filter
Reply #21
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.

  • Spiridon
  • [*]
TAK DirectShow Filter
Reply #22
TAK
Sampling rate: 96Khz
Resolution: 24bits

Incorrect playback speed (slower)

TAK DirectShow Filter
Reply #23
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/
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...
  • Last Edit: 11 May, 2010, 05:28:33 AM by HorsePower73

  • Spiridon
  • [*]
TAK DirectShow Filter
Reply #24
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/
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.