Skip to content

Commit

Permalink
Revert "MT32: Avoid runtime abort due to non-POD object pass in MT32 …
Browse files Browse the repository at this point in the history
…Emulator."

This reverts commit f02fa14.
  • Loading branch information
Johannes Schickel committed Jul 10, 2014
1 parent a479c36 commit 8602e71
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 12 additions & 2 deletions audio/softsynth/mt32/Synth.cpp
Expand Up @@ -15,6 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

//#include <cerrno>
//#include <cmath>
//#include <cstdlib>
//#include <cstring>

#include "mt32emu.h"
#include "mmath.h"
#include "PartialManager.h"
Expand Down Expand Up @@ -94,6 +99,11 @@ void ReportHandler::showLCDMessage(const char *data) {
debug("\n");
}

void ReportHandler::printDebug(const char *fmt, va_list list) {
debug(fmt, list);
debug("\n");
}

void Synth::polyStateChanged(int partNum) {
reportHandler->onPolyStateChanged(partNum);
}
Expand All @@ -106,9 +116,9 @@ void Synth::printDebug(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
#if MT32EMU_DEBUG_SAMPLESTAMPS > 0
debug("[%u] ", renderedSampleCount);
reportHandler->printDebug("[%u] ", renderedSampleCount);
#endif
debug(fmt, ap);
reportHandler->printDebug(fmt, ap);
va_end(ap);
}

Expand Down
4 changes: 4 additions & 0 deletions audio/softsynth/mt32/Synth.h
Expand Up @@ -236,6 +236,10 @@ friend class Synth;
virtual ~ReportHandler() {}

protected:

// Callback for debug messages, in vprintf() format
virtual void printDebug(const char *fmt, va_list list);

// Callbacks for reporting various errors and information
virtual void onErrorControlROM() {}
virtual void onErrorPCMROM() {}
Expand Down

0 comments on commit 8602e71

Please sign in to comment.