Skip to main content

Topic: lossyWAV 1.3.0 Development Thread (Read 147744 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #75
At the command prompt enter "path" as a command. This will show you a list of the directories where Windows will look for executable files / dlls.

To append to this, you will need to use System Properties > Advanced Tab > Environment Variables and append the directory where your DLL is to the end of the path variable (either for your user or for the system) OR put a copy of the DLL into a directory that is already listed.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

lossyWAV 1.3.0 Development Thread
Reply #76
At the command prompt enter "path" as a command. This will show you a list of the directories where Windows will look for executable files / dlls.

To append to this, you will need to use System Properties > Advanced Tab > Environment Variables and append the directory where your DLL is to the end of the path variable (either for your user or for the system) OR put a copy of the DLL into a directory that is already listed.

The thing is that, at least on Windows, every program considers the directory that it is run from to be in the path.

Nevertheless, I've tried adding libfftw3-3.dll to C:\WINDOWS\system32 - to no avail. Yes, that directory is definitely in the path (I've double-checked), lots of things would go haywire if it weren't.
  • Last Edit: 03 June, 2010, 04:07:05 AM by doccolinni

  • halb27
  • [*][*][*][*][*]
lossyWAV 1.3.0 Development Thread
Reply #77
I tried and found the in the result line.

I use this bat-File (removed the --silent for internal/external testing) from foobar:

set path=%path%;c:\programme\flac
c:\programme\flac\lossyWAV_b122g.exe %1 %3 %4 %5 %6 %7 %8 %9 --below --silent
ren "%~N1.lwcdf.wav" "%~N2.lwcdf.wav"
rem c:\programme\flac\flac.exe -b 512 -l 6 -e -m -r 2 -f --totally-silent "%~N1.lossy.wav" -o"%~N2.flac"
c:\programme\flac\flac.exe -b 512 -8 -f --totally-silent "%~N1.lossy.wav" -o"%~N2.flac"
del "%~N1.lossy.wav"

So I locally set the path-variable to include my lossyWAV-folder (which is identical to the FLAC-folder in my case).

Adding -F double to the command line doesn't change things.
Even copying the dlls to C:\Windows\system32 which is natively in the path doesn't change things.
  • Last Edit: 03 June, 2010, 04:11:17 AM by halb27
lame3995o -Q1

lossyWAV 1.3.0 Development Thread
Reply #78
Adding -F double to the command line doesn't change things.
Even copying the dlls to C:\Windows\system32 which is natively in the path doesn't change things.

Something is screwed up about lossyWAV's checking for the DLLs. That's a good thing though, because otherwise I would never have found out that bug which happens when internal FFT procedures are used.



edit: I'm not sure how Nick got the latest version of lossyWAV to use the FFTW DLLs though... :-/
  • Last Edit: 03 June, 2010, 04:11:02 AM by doccolinni

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #79
Hmmmm.... Baffled now - I have my copy of the DLLs in "C:\UserData\Bin" and have appended that directory permanently to the path using the method mentioned above.

.... but what this seems to mean is that recent testing is flawed as we are not sure that the DLLs have been used, and there is a bug when using the internal routines.

As I said, I'll get a fix out as soon as I can - though probably not tonight as it's my son's birthday today so we're all going out for dinner.
  • Last Edit: 03 June, 2010, 04:15:49 AM by Nick.C
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

lossyWAV 1.3.0 Development Thread
Reply #80
Hmmmm.... Baffled now - I have my copy of the DLLs in "C:\UserData\Bin" and have appended that directory permanently to the path using the method mentioned above.

.... but what this seems to mean is that recent testing is flawed as we are not sure that the DLLs have been used, as there is a bug when using the internal routines.

As I said, I'll get a fix out as soon as I can - though probably not tonight as it's my son's birthday today so we're all going out for dinner.

No probs, take your time, I'm surprised you manage to devote this much time to this as it is.

I'll try to figure out if there is any way I can force lossyWAV to use the FFTW DLLs... This has me completely stumped.  Programs don't deliberately choose to not load a .dll that's right under their nose!

lossyWAV 1.3.0 Development Thread
Reply #81
Uh... I'm totally out of ideas... Maybe it's because my Windows are 64-bit? halb27, are your Windows 32-bit or 64-bit?

I am using 32-bit FFTW DLLs, so the files themselves are not the problem.

  • halb27
  • [*][*][*][*][*]
lossyWAV 1.3.0 Development Thread
Reply #82
I am using 32 bit-Windows (XP).
lame3995o -Q1

  • robert
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #83
Nevertheless, I've tried adding libfftw3-3.dll to C:\WINDOWS\system32 - to no avail. Yes, that directory is definitely in the path (I've double-checked), lots of things would go haywire if it weren't.

If you're on a 64 bit Windows, IIRC system32 is for 64bit DLLs. The 32bit ones should go into WOW64 folder. (But, I've no 64 bit Windows and I might be wrong, but that's what I remember)

lossyWAV 1.3.0 Development Thread
Reply #84
Nevertheless, I've tried adding libfftw3-3.dll to C:\WINDOWS\system32 - to no avail. Yes, that directory is definitely in the path (I've double-checked), lots of things would go haywire if it weren't.

If you're on a 64 bit Windows, IIRC system32 is for 64bit DLLs. The 32bit ones should go into WOW64 folder. (But, I've no 64 bit Windows and I might be wrong, but that's what I remember)

Directory C:\WINDOWS\system32 is in the path, so it's irrelevant.

  • robert
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #85
Directory C:\WINDOWS\system32 is in the path, so it's irrelevant.


Quote
The operating system uses the %SystemRoot%\system32 directory for its 64-bit library and executable files. This is done for backward compatibility reasons, as many legacy applications are hardcoded to use that path. When executing 32-bit applications, WoW64 transparently redirects 32-bit DLLs to %SystemRoot%\SysWOW64, which contains 32-bit libraries and executables. 32-bit applications are generally not aware that they are running on a 64-bit operating system.

There are two "Program Files" directories, both visible to both 32-bit and 64-bit applications.


Quoted from http://en.wikipedia.org/wiki/WoW64

lossyWAV 1.3.0 Development Thread
Reply #86
Directory C:\WINDOWS\system32 is in the path, so it's irrelevant.


Quote
The operating system uses the %SystemRoot%\system32 directory for its 64-bit library and executable files. This is done for backward compatibility reasons, as many legacy applications are hardcoded to use that path. When executing 32-bit applications, WoW64 transparently redirects 32-bit DLLs to %SystemRoot%\SysWOW64, which contains 32-bit libraries and executables. 32-bit applications are generally not aware that they are running on a 64-bit operating system.

There are two "Program Files" directories, both visible to both 32-bit and 64-bit applications.


Quoted from http://en.wikipedia.org/wiki/WoW64

That is done for backward compatibility reasons - if you put a 32-bit .dll in system32 it also works. I know, I've got 32-bit libraries in system32 and they work without any trouble.

  • robert
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #87
Hmmmm.... Baffled now - I have my copy of the DLLs in "C:\UserData\Bin" and have appended that directory permanently to the path using the method mentioned above.

.... but what this seems to mean is that recent testing is flawed as we are not sure that the DLLs have been used, and there is a bug when using the internal routines.

As I said, I'll get a fix out as soon as I can - though probably not tonight as it's my son's birthday today so we're all going out for dinner.

FYI, on my WinXP machine lossywav does find the libFFTW3-3.dll if present, the output files differ when the dll was found.

Code: [Select]
11:52:29,1659324	lossyWAV.exe	14872	QueryOpen	C:\dev\lossywav\libFFTW3-3.DLL	SUCCESS	CreationTime: 03.06.2010 11:05:19, LastAccessTime: 03.06.2010 11:52:22, LastWriteTime: 18.07.2009 07:08:10, ChangeTime: 03.06.2010 11:52:22, AllocationSize: 1.576.960, EndOfFile: 1.576.007, FileAttributes: A
11:52:29,1661517 lossyWAV.exe 14872 CreateFile C:\dev\lossywav\libFFTW3-3.DLL SUCCESS Desired Access: Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
11:52:29,1682698 lossyWAV.exe 14872 CreateFileMapping C:\dev\lossywav\libfftw3-3.dll SUCCESS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE
11:52:29,1682882 lossyWAV.exe 14872 QueryStandardInformationFile C:\dev\lossywav\libfftw3-3.dll SUCCESS AllocationSize: 1.576.960, EndOfFile: 1.576.007, NumberOfLinks: 1, DeletePending: False, Directory: False
11:52:29,1683061 lossyWAV.exe 14872 CreateFileMapping C:\dev\lossywav\libfftw3-3.dll SUCCESS SyncType: SyncTypeOther
11:52:29,1685210 lossyWAV.exe 14872 CreateFileMapping C:\dev\lossywav\libfftw3-3.dll SUCCESS SyncType: SyncTypeOther
11:52:29,1686866 lossyWAV.exe 14872 CloseFile C:\dev\lossywav\libfftw3-3.dll SUCCESS
11:52:29,1689900 lossyWAV.exe 14872 Load Image C:\dev\lossywav\libfftw3-3.dll SUCCESS Image Base: 0x70680000, Image Size: 0x155000
11:52:29,1690325 lossyWAV.exe 14872 ReadFile C:\dev\lossywav\libfftw3-3.dll SUCCESS Offset: 1.318.400, Length: 1.024, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
11:52:29,1692853 lossyWAV.exe 14872 ReadFile C:\dev\lossywav\libfftw3-3.dll SUCCESS Offset: 1.311.232, Length: 7.168, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
11:52:29,1694577 lossyWAV.exe 14872 RegOpenKey HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\libFFTW3-3.DLL NAME NOT FOUND Desired Access: Read
11:52:29,1695091 lossyWAV.exe 14872 ReadFile C:\dev\lossywav\libfftw3-3.dll SUCCESS Offset: 1.024, Length: 32.768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
11:52:29,1699552 lossyWAV.exe 14872 ReadFile C:\dev\lossywav\libfftw3-3.dll SUCCESS Offset: 1.180.672, Length: 31.232, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
11:52:29,1703955 lossyWAV.exe 14872 ReadFile C:\dev\lossywav\libfftw3-3.dll SUCCESS Offset: 1.294.848, Length: 16.384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
11:52:29,1706844 lossyWAV.exe 14872 ReadFile C:\dev\lossywav\libfftw3-3.dll SUCCESS Offset: 1.211.904, Length: 1.024, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
11:52:29,2111253 lossyWAV.exe 14872 QueryOpen C:\cvs\do-it-again.wav SUCCESS CreationTime: 01.11.2008 22:57:21, LastAccessTime: 03.06.2010 11:51:23, LastWriteTime: 29.09.2007 13:19:26, ChangeTime: 18.04.2009 17:55:47, AllocationSize: 58.736.640, EndOfFile: 58.736.540, FileAttributes: A
11:52:29,2113602 lossyWAV.exe 14872 QueryOpen C:\dev\lossywav\do-it-again.lossy.wav NAME NOT FOUND
11:52:29,2185863 lossyWAV.exe 14872 CreateFile C:\cvs\do-it-again.wav SUCCESS Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
11:52:29,2204513 lossyWAV.exe 14872 ReadFile C:\cvs\do-it-again.wav SUCCESS Offset: 0, Length: 8
11:52:29,2206038 lossyWAV.exe 14872 ReadFile C:\cvs\do-it-again.wav SUCCESS Offset: 8, Length: 4
11:52:29,2207047 lossyWAV.exe 14872 ReadFile C:\cvs\do-it-again.wav SUCCESS Offset: 12, Length: 8
11:52:29,2208008 lossyWAV.exe 14872 ReadFile C:\cvs\do-it-again.wav SUCCESS Offset: 20, Length: 16
11:52:29,2208972 lossyWAV.exe 14872 ReadFile C:\cvs\do-it-again.wav SUCCESS Offset: 36, Length: 8
11:52:29,2211229 lossyWAV.exe 14872 ReadFile C:\cvs\do-it-again.wav SUCCESS Offset: 44, Length: 131.072
11:52:29,2215774 lossyWAV.exe 14872 CreateFile C:\dev\lossywav\do-it-again.lossy.wav SUCCESS Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created
11:52:29,2219758 lossyWAV.exe 14872 CreateFile C:\dev\lossywav SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open For Backup, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
11:52:29,2230522 lossyWAV.exe 14872 CloseFile C:\dev\lossywav SUCCESS
11:52:29,2255388 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav SUCCESS Offset: 0, Length: 12
11:52:29,2257735 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav FAST IO DISALLOWED Offset: 12, Length: 24
11:52:29,2259190 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav SUCCESS Offset: 12, Length: 24
11:52:29,2260894 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav FAST IO DISALLOWED Offset: 36, Length: 66
11:52:29,2262308 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav SUCCESS Offset: 36, Length: 66
11:52:29,2264048 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav FAST IO DISALLOWED Offset: 102, Length: 8
11:52:29,2265456 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav SUCCESS Offset: 102, Length: 8
11:52:29,2874914 lossyWAV.exe 14872 ReadFile C:\cvs\do-it-again.wav SUCCESS Offset: 131.116, Length: 131.072
11:52:29,2895827 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav FAST IO DISALLOWED Offset: 110, Length: 131.072
11:52:29,2897305 lossyWAV.exe 14872 WriteFile C:\dev\lossywav\do-it-again.lossy.wav SUCCESS Offset: 110, Length: 131.072


  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #88
Robert,

Thanks for that confirmation - I'll get onto bug-hunting soon....

Nick.

[edit] bug was so simple - calculating a real FFT without taking half of the number of samples - oops....

lossyWAV beta 1.2.2h attached to post #1 in this thread. [/edit]
  • Last Edit: 03 June, 2010, 07:45:57 AM by Nick.C
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • robert
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #89
Nick, calling lossywav twice with the same input file, should it generate identical output files? If not, then my observation that it generated different output files is meaningless.

What can be seen from the above excerpt of ProcessMonitor log-text, lossywav finds libfftw3-3.dll and loads it too, but it seems to not use it:
%lossyWAV Warning% : libfftw3-3.dll not found, processing using internal FFT routines.



  • lvqcl
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #90
LossyWAV uses libfftw3-3.dll only if both libfftw3-3.dll and libfftw3f-3.dll are present.

(lossyWAV beta 1.2.2h).

  • robert
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #91
LossyWAV uses libfftw3-3.dll only if both libfftw3-3.dll and libfftw3f-3.dll are present.

(lossyWAV beta 1.2.2h).

Aha, OK.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #92
When lossyWAV starts, it checks for the existence of libfftw3-3.dll and libfftw3f-3.dll. If both are found then both are available. If no user preference is indicated then libfftw3-3.dll is used (double precision). If only libfftw3f-3.dll is found and no user preference is indicated then libfftw3f-3.dll is used (single precision). If neither are available or user preference is --fftw off then internal routines are used.

lossyWAV output should be identical for the same input data and parameters between multiple runs.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • lvqcl
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #93
lossyWAV uses internal routines if only libfftw3-3.dll is available. When I tell it to use double precision with --fftw D option, the program reports:

Quote
%lossyWAV Warning% : libfftw3-3.dll not found, processing using internal FFT routines.

although libfftw3-3.dll is in the same folder. Only when both libfftw3-3.dll and libfftw3f-3.dll are present, lossyWAV uses libfftw3-3.dll.
  • Last Edit: 03 June, 2010, 02:26:40 PM by lvqcl

  • robert
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #94
When lossyWAV starts, it checks for the existence of libfftw3-3.dll and libfftw3f-3.dll. If both are found then both are available. If no user preference is indicated then libfftw3-3.dll is used (double precision). If only libfftw3f-3.dll is found and no user preference is indicated then libfftw3f-3.dll is used (single precision). If neither are available or user preference is --fftw off then internal routines are used.

lossyWAV output should be identical for the same input data and parameters between multiple runs.

Well, in my case I had only libfftw3-3.dll in search path. In this case libfftw3-3.dll wasn't used at all, neither implicit nor explicit.

My WinMerge always tells me there is a difference in the binary files. I found out, the output contains a timestamp, which is different on the second run, naturally.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #95
Thanks again - something wrong, I think - I'll get back to bug-hunting....
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

lossyWAV 1.3.0 Development Thread
Reply #96
Only when both libfftw3-3.dll and libfftw3f-3.dll are present, lossyWAV uses libfftw3-3.dll.

That's a silly bug, but I can't say that something similar hasn't happened to me a couple of times when I wrote programs. 

I confirm - when both libfftw3-3.dll and libfftw3f-3.dll are present, lossyWAV reports "[D]" under results if no -F or --fftw preference is given, otherwise it reports "".
  • Last Edit: 03 June, 2010, 04:46:54 PM by doccolinni

lossyWAV 1.3.0 Development Thread
Reply #97
There's something strange about the noise added to "wheeee" with -Z -A in the latest version. Look at the waveform of the right channel of wheeee.lwcdf.wav at 5.43 seconds. That definitely seems to be too much noise:




I will see if I can hear the difference at that spot between the original and lossy wheeee.
  • Last Edit: 03 June, 2010, 04:59:19 PM by doccolinni

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.3.0 Development Thread
Reply #98
I think that I have cracked the logic for use of whichever FFT routines....

lossyWAV beta 1.2.2i attached to post #1 in this thread.

[edit] Well spotted - it looks like it may be one of the clicks talked about earlier - I will see if I can eradicate it.... [/edit]
  • Last Edit: 03 June, 2010, 05:09:33 PM by Nick.C
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

lossyWAV 1.3.0 Development Thread
Reply #99
A distinct click can easily be heard at 5.43 seconds in the right channel of wheeee.lossy.wav with -Z -A which is not present in the original, so it's not just a visual oddity when looking at the waveform.


edit:
Quote
[edit] Well spotted - it looks like it may be one of the clicks talked about earlier - I will see if I can eradicate it.... [/edit]

We're such a nice little machine, aren't we?
  • Last Edit: 03 June, 2010, 05:16:28 PM by doccolinni