Build error in libflac\stream_decoder.c in VS2012 64bit builds


#1

Hi,

I'm building an AAX plugin and in VS2012 64bit builds I get this error:

\jucelibrarycode\modules\juce_audio_formats\codecs\flac\libflac\stream_decoder.c(2735): error C2664: 'juce::FlacNamespace::FLAC__bool (juce::FlacNamespace::FLAC__BitReader *,int [],unsigned int,unsigned int)' : cannot convert parameter 2 from 'juce::FlacNamespace::FLAC__int32 *' to 'int []' (..\..\JuceLibraryCode\modules\juce_audio_formats\juce_audio_formats.cpp)

I do not get this error on 32bit builds, and I don't get the error in VS2008 in at all. We want to use VS2012 because IntroJucer doesn't create x64 configurations for VS2008.

Has anyone else run into this?

Thanks!

-
rundio


#2

I'm about to replace the FLAC implementation with a newer version anyway, so hopefully they'll have sorted this out..


#3

Would love to have MemoryMappedAudioFormatReader support added for FLAC

Thanks,

Rail


#4

I doubt whether that's even possible - the memory-mapping only really makes sense for formats where there's a 1:1 mapping between some bytes in the file and some sample values.


#5

It is possible, I know of at least 2 apps which stream FLAC based audio. This is for sample playback where you know the encoded FLAC file has a fixed block size.

Cheers,

Rail


#6

I didn't say you couldn't stream FLAC - of course that can be done. I just said that memory-mapping probably isn't an appropriate way to do it.


#7

What do you mean by stream? Sure you can FIFO compressed formats but I think the problem is the seek. Without a 1:1 mapping how do you know which parts of the file to map into memory?

To be honest though as FLAC is compressed why don't you just created a memory mapped file and map the whole thing? Then can you just create a MemoryInputStream to the MemoryMappedFile::getData() and read it as if it was in memory? You might run out of address space for large files but smallish ones should be ok? Or have I missed something here?


#8

Right, guess I was hoping with fixed block size data it could be added to the existing methods.

I was going to use a MemoryMappedFile and use that to read the file.

Thanks,

Rail


#9

Hi Dave,

Yeah, I just posted that (I guess at the same time as you were posting)…

By stream I mean don’t load the whole file into memory… You would pre-cache a small amount of data then load more as needed to keep up with playback.

Since the files have a fixed block size they should be seekable.

Thanks,

Rail