Hi there,
Trying to use maximilian as the sound generator for my iOS application, I cannot test in the iOS device simulator as explained here
I cannot test that so, I decided to test the sound engine differently by using maximilian and building for OSX.
I started from the emptyExample, included the correct ofxMaxim in addons virtual folder in XCode, linked Accelerate.framework too (read-that, I found it last night) but …
“call to fmod is ambiguous” … as shown on the picture
Just a guess: does interpConstants contain float:s? If so, I think the error is due to the fact that fmod is passed one float parameter (interpConstants[i]) and one double parameter (512.0). If that is the case, changing 512.0 to 512.0f should fix the problem.
(The cmath header file contains two overloaded versions of the fmod function, one that takes float:s and one that takes double:s, and the compiler must be able to select one of them based on the types of the arguments used.)
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofSoundStreamSetup(2,0,this, 44100, 512, 2); /* Call this last ! */
}
void testApp::audioOut(float *output, int bufferSize, int nChannels)
{
*output=mySine.sinewave(100);//simple as that!
}
testApp.h
#pragma once
#include "ofMain.h"
#include "maximilian.h"
class testApp : public ofBaseApp{
public:
void setup();
maxiOsc mySine;
void audioOut(float *output, int bufferSize, int nChannels);
};