IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
TAK DirectShow Filter, a filter to enable any DirectShow Player (i.e. WMP) to play .tak files
HorsePower73
post Sep 21 2009, 14:59
Post #1





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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
Go to the top of the page
+Quote Post
Destroid
post Sep 21 2009, 15:35
Post #2





Group: Members
Posts: 548
Joined: 4-June 02
Member No.: 2220



On installation I get the error message:
CODE
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.

This post has been edited by Destroid: Sep 21 2009, 15:50


--------------------
"Something bothering you, Mister Spock?"
Go to the top of the page
+Quote Post
HorsePower73
post Sep 21 2009, 17:22
Post #3





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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.
Go to the top of the page
+Quote Post
Destroid
post Sep 21 2009, 17:49
Post #4





Group: Members
Posts: 548
Joined: 4-June 02
Member No.: 2220



Nice! Works without those .DLL's.

(I can't wait to try the TAK .FLT you mentioned a while back wink.gif )


--------------------
"Something bothering you, Mister Spock?"
Go to the top of the page
+Quote Post
HorsePower73
post Sep 21 2009, 18:01
Post #5





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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?
Go to the top of the page
+Quote Post
zombiewerewolf
post Sep 21 2009, 18:03
Post #6





Group: Members
Posts: 119
Joined: 27-January 03
From: Perth, AU
Member No.: 4755



There's only one problem I encountered. It doesn't play tak files with unicode filename.
Go to the top of the page
+Quote Post
Destroid
post Sep 21 2009, 22:19
Post #7





Group: Members
Posts: 548
Joined: 4-June 02
Member No.: 2220



QUOTE (HorsePower73 @ Sep 21 2009, 17:01) *
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 wink.gif

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?"
Go to the top of the page
+Quote Post
HorsePower73
post Sep 22 2009, 12:20
Post #8





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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.
Go to the top of the page
+Quote Post
twistedddx
post Sep 22 2009, 15:45
Post #9





Group: Members
Posts: 37
Joined: 27-October 05
Member No.: 25383



QUOTE (HorsePower73 @ Sep 22 2009, 20:50) *
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 tongue.gif

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);
Go to the top of the page
+Quote Post
HorsePower73
post Sep 23 2009, 00:54
Post #10





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



[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/
Go to the top of the page
+Quote Post
TBeck
post Sep 23 2009, 22:32
Post #11


TAK Developer


Group: Developer
Posts: 1098
Joined: 1-April 06
Member No.: 29051



QUOTE (HorsePower73 @ Sep 21 2009, 15:59) *
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! ohmy.gif Thank you very much!

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

QUOTE (HorsePower73 @ Sep 22 2009, 13:20) *
The problem here is that tac_deco_lib does not accept UNICODE filenames.

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

Thomas
Go to the top of the page
+Quote Post
Zarggg
post Sep 24 2009, 16:08
Post #12





Group: Members
Posts: 552
Joined: 18-January 04
From: bethlehem.pa.us
Member No.: 11318



Ah, was that the problem? I'll be so happy once that's fixed. smile.gif
Go to the top of the page
+Quote Post
HorsePower73
post Sep 25 2009, 16:35
Post #13





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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.
Go to the top of the page
+Quote Post
HorsePower73
post Sep 26 2009, 15:42
Post #14





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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.

Go to the top of the page
+Quote Post
zombiewerewolf
post Sep 26 2009, 17:18
Post #15





Group: Members
Posts: 119
Joined: 27-January 03
From: Perth, AU
Member No.: 4755



It works great smile.gif Thank you very much for adding unicode support.
Go to the top of the page
+Quote Post
twistedddx
post Sep 27 2009, 14:47
Post #16





Group: Members
Posts: 37
Joined: 27-October 05
Member No.: 25383



QUOTE (HorsePower73 @ Sep 23 2009, 09:24) *
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)

This post has been edited by twistedddx: Sep 27 2009, 14:58
Go to the top of the page
+Quote Post
HorsePower73
post Sep 27 2009, 23:14
Post #17





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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
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.


This post has been edited by HorsePower73: Sep 27 2009, 23:33
Go to the top of the page
+Quote Post
johnsonlam
post Oct 1 2009, 15:55
Post #18





Group: Members
Posts: 226
Joined: 12-January 03
From: Kowloon, Hong Kong
Member No.: 4533



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.

This post has been edited by johnsonlam: Oct 1 2009, 15:56


--------------------
Hong Kong - International Joke Center (after 1997-06-30)
Go to the top of the page
+Quote Post
watercolor
post May 2 2010, 08:27
Post #19





Group: Members
Posts: 110
Joined: 5-February 09
Member No.: 66623



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.
Go to the top of the page
+Quote Post
lvqcl
post May 2 2010, 09:47
Post #20





Group: Developer
Posts: 3358
Joined: 2-December 07
Member No.: 49183



Run 32-bit command line and type Install.bat there.
Go to the top of the page
+Quote Post
HorsePower73
post May 2 2010, 11:17
Post #21





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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
Go to the top of the page
+Quote Post
watercolor
post May 2 2010, 12:55
Post #22





Group: Members
Posts: 110
Joined: 5-February 09
Member No.: 66623



QUOTE (lvqcl @ May 2 2010, 17:47) *
Run 32-bit command line and type Install.bat there.



QUOTE (HorsePower73 @ May 2 2010, 19:17) *
As lvqcl already said, it should work running install.bat from a 32bit command line.


Thank you. now I playing TAK on WMP.

QUOTE (HorsePower73 @ May 2 2010, 19:17) *
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.
Go to the top of the page
+Quote Post
Spiridon
post May 10 2010, 20:53
Post #23





Group: Members
Posts: 4
Joined: 10-May 10
Member No.: 80537



TAK
Sampling rate: 96Khz
Resolution: 24bits

Incorrect playback speed (slower)
Go to the top of the page
+Quote Post
HorsePower73
post May 11 2010, 10:25
Post #24





Group: Members
Posts: 19
Joined: 14-July 09
Member No.: 71477



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...

This post has been edited by HorsePower73: May 11 2010, 10:28
Go to the top of the page
+Quote Post
Spiridon
post May 11 2010, 23:26
Post #25





Group: Members
Posts: 4
Joined: 10-May 10
Member No.: 80537



QUOTE (HorsePower73 @ May 11 2010, 12:25) *
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.
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
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: 22nd August 2014 - 09:29