<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 06.01.2010 2:03, Ivailo Karamanolev wrote:
<blockquote
cite="mid:c55151611001051503td23ef06r1ee8bba9052abd60@mail.gmail.com"
type="cite">
<pre wrap="">I managed to get around it. I used the stream functions and provided my own
callbacks for reading and writing. What's strange is that what I've done is
just copied the contents of read/write/seek/tell/eof callbacks from the
sources to my application and it works just fine, no glitches. When I use
the build-in implementation, it just crashes without any reason. It's not a
problem to stick with my own callbacks for reading, but fixing this issue
(if it's not just me) would be nice.
</pre>
</blockquote>
It might be the famous MSVCRT version mismatch bug.<br>
<blockquote
cite="mid:c55151611001051503td23ef06r1ee8bba9052abd60@mail.gmail.com"
type="cite">
<pre wrap="">
On Wed, Jan 6, 2010 at 12:38 AM, Erik de Castro Lopo
<<a class="moz-txt-link-abbreviated" href="mailto:mle+la@mega-nerd.com">mle+la@mega-nerd.com</a><a class="moz-txt-link-rfc2396E" href="mailto:mle%2Bla@mega-nerd.com"><mle%2Bla@mega-nerd.com></a>
</pre>
<blockquote type="cite">
<pre wrap="">wrote:
</pre>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">Ivailo Karamanolev wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I am currently learning the FLAC C API and had the code working with
FLAC__stream_decoder_init_file. However, since I'd need the Unicode
</pre>
</blockquote>
<pre wrap="">filename
</pre>
<blockquote type="cite">
<pre wrap="">support, I tried _wfopen_s in combination with
FLAC__stream_decoder_init_FILE, however I get a runtime crash as sonn as
</pre>
</blockquote>
<pre wrap="">I
</pre>
<blockquote type="cite">
<pre wrap="">call FLAC__stream_decoder_process_until_end_of_stream. The same code
(partially taken from the examples) is working perfectly with the
</pre>
</blockquote>
<pre wrap="">function
</pre>
<blockquote type="cite">
<pre wrap="">accepting filename and crashing with the one accepting FILE*. I have
</pre>
</blockquote>
<pre wrap="">tried
</pre>
<blockquote type="cite">
<pre wrap="">both compiling the library myself and using the precompiled
flac-1.2.1-devel-win. Can someone try if it is working for him (the
</pre>
</blockquote>
<pre wrap="">FILE*)
</pre>
<blockquote type="cite">
<pre wrap="">version and if yes - send back the source code?
I work in Windows 7 64bit, but I tried that also on a virtual Windows XP
</pre>
</blockquote>
<pre wrap="">and
</pre>
<blockquote type="cite">
<pre wrap="">it crashes there also.
</pre>
</blockquote>
<pre wrap="">
There is a whole bunch of weird stuff in windows, this is just another
instance.
If what you want to do is read/write FLAC files with windows UCS-16
filenames,
one option is to use libsndfile:
<a class="moz-txt-link-freetext" href="http://www.mega-nerd.com/libsndfile/">http://www.mega-nerd.com/libsndfile/</a>
which with version 1.0.21 has added this function:
/* The function sf_wchar_open() is Windows Only!
** Open a file passing in a Windows Unicode filename. Otherwise, this is
** the same as sf_open().
**
** In order for this to work, you need to do the following:
**
** #include <windows.h>
** #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
** #including <sndfile.h>
*/
#if ENABLE_SNDFILE_WINDOWS_PROTOTYPES
SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
#endif
There is a windows binary installer in the main web page (one for each of
32 and 64 bit windows).
The only downside to this is that libsndfile does not expose the all of
the features of the FLAC API to the user.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
<a class="moz-txt-link-freetext" href="http://www.mega-nerd.com/">http://www.mega-nerd.com/</a>
_______________________________________________
Flac-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Flac-dev@xiph.org">Flac-dev@xiph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.xiph.org/mailman/listinfo/flac-dev">http://lists.xiph.org/mailman/listinfo/flac-dev</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Flac-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Flac-dev@xiph.org">Flac-dev@xiph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.xiph.org/mailman/listinfo/flac-dev">http://lists.xiph.org/mailman/listinfo/flac-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>