IPB

Welcome Guest ( Log In | Register )

SoX crashes when reading FLAC files (on Windows)
Ben Johnson
post Sep 8 2008, 05:48
Post #1





Group: Members
Posts: 6
Joined: 30-July 08
Member No.: 56479



Hello, everyone,

I have managed to compile SoX on Windows (Vista 32-bit) with support for LAME MP3, MAD MP3, FLAC, and OggVorbis. Everything works fine -- except for reading FLAC audio files.

I can write FLAC files just fine, but for whatever reason, reading FLAC files causes an Application Error: "The instruction at 0x76e83387 referenced memory at 0x00000014. The memory could not be written." I am accessing sox.exe on the Windows command prompt.

I compiled SoX using flac-1.2.1-devel-win with libFLAC.lib, which, of course, requires libFLAC.dll to be accessible when sox.exe is executed. I've tried compiling with older versions of FLAC and the result is the same.

Has anyone run into this type of thing before? Any insight would be much appreciated.

Thanks!
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Ben Johnson
post Sep 17 2008, 04:06
Post #2





Group: Members
Posts: 6
Joined: 30-July 08
Member No.: 56479



I solved this problem by compiling libFLAC.dll (by default, named libFLAC_dynamic.dll) from source. Originally, I had used the libFLAC.dll provided with the flac-1.2.1-devel-win package, because I was having trouble compiling (see next paragraph). I'm not entirely sure what the difference between the two files might be.

For anyone else who attempts to compile FLAC from source and runs into the error, "A tool returned an error code from 'Performing Custom Build Step'", have a look at the Output tab in Visual Studio. There is reference to nasmw.exe (the Nasm compiler), and in my case, it was necessary for me to download nasmw.exe (I obtained the file from http://code.google.com/p/ambraos/downloads...mp;can=2&q= ) and copy the file to the C:\Windows\System32 directory before attempting the build.

I ran into another error when compiling FLAC, given that "ogg_static.lib" was missing from the flac-1.2.1\obj\release directory. It was necessary to download the libogg source and compile to obtain ogg_static.lib. Once I had placed ogg_static.lib in the referenced directory, the build succeeded without issue, to yield the DLL that ultimately solved the crashing problem.

I intend to write an end-to-end tutorial for compiling SoX with FLAC, MP3, and OGG/vorbis support on Windows when time permits. Naturally, I'll be further compelled if others express an interest in the information smile.gif.
Go to the top of the page
+Quote Post

Posts in this topic


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: 25th July 2014 - 13:39