Help MP3 (MPEG 1 Layer 3) and MPC (Musepack (SV8)) decoders


#1

error in MADAudioFormat.cpp (juce ver.1.50) sample http://www.pisem.net/download.php/?file=:juce:Decodemo.7z&host=arlen.pisem.net/flashcard

line 338.
error: cannot allocate an object of type `MADAudioFormatReader’|

Note : in juce 1.46 ok.


#2

[quote=“yosvaniscc”]error in MADAudioFormat.cpp (juce ver.1.50) sample http://www.pisem.net/download.php/?file=:juce:Decodemo.7z&host=arlen.pisem.net/flashcard

line 338.
error: cannot allocate an object of type `MADAudioFormatReader’|

Note : in juce 1.46 ok.[/quote]

Hi!

Sure, Jules tends to change the JUCE API to make the framework better.

You have to follow the all error messages you get from the compiler. It says (MinGW GCC) that you cannot create an object of an abstract type. Moreover, it points you directly to the pure function that you have to implement - “virtual bool juce::AudioFormatReader::readSamples(int**, int, int, juce::int64, int)”.

So, just read carefully and you’ll get what you want. :slight_smile:


#3

thanks Ptomaine, and resolved to.

solution:

replace in MADAudioFormat.cpp Line 94

by

bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, int64 startSampleInFile, int numSamples)

replace in MPCAudioFormat.cpp Line 47

by

bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, int64 startSampleInFile, int numSamples)

Note: Juce 1.50 in setAudioCallback renamed by addAudioCallback