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

**URL:** <https://forum.juce.com/t/help-mp3-mpeg-1-layer-3-and-mpc-musepack-sv8-decoders/4819>\
**Category:** General JUCE discussion\
**Created:** [February 1, 2010, 4:23pm UTC](https://forum.juce.com/t/help-mp3-mpeg-1-layer-3-and-mpc-musepack-sv8-decoders/4819 "2010-02-01T16:23:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yosvaniscc](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yosvaniscc](https://forum.juce.com/u/yosvaniscc)\
**Post date:** [February 1, 2010, 4:23pm UTC](https://forum.juce.com/t/help-mp3-mpeg-1-layer-3-and-mpc-musepack-sv8-decoders/4819/1 "2010-02-01T16:23:50Z")

</div>

error in MADAudioFormat.cpp (juce ver.1.50) sample [http://www.pisem.net/download.php/?file=:juce:Decodemo.7z&host=arlen.pisem.net/flashcard](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.

---

<div class="post-metadata">

**Author:** ![ptomaine](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ptomaine/32/245_2.png) [@ptomaine](https://forum.juce.com/u/ptomaine)\
**Post date:** [February 2, 2010, 9:45pm UTC](https://forum.juce.com/t/help-mp3-mpeg-1-layer-3-and-mpc-musepack-sv8-decoders/4819/2 "2010-02-02T21:45:17Z")

</div>

[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](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. 🙂

---

<div class="post-metadata">

**Author:** ![yosvaniscc](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yosvaniscc](https://forum.juce.com/u/yosvaniscc)\
**Post date:** [February 3, 2010, 5:52pm UTC](https://forum.juce.com/t/help-mp3-mpeg-1-layer-3-and-mpc-musepack-sv8-decoders/4819/3 "2010-02-03T17:52:57Z")

</div>

thanks Ptomaine, and resolved to.

solution:

replace in MADAudioFormat.cpp Line 94

```auto

```

by

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

replace in MPCAudioFormat.cpp Line 47

```auto

```

by

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

Note: Juce 1.50 in setAudioCallback renamed by addAudioCallback
