int mmPrinti(struct ModemStream *modem, int num) {
	#ifdef ARDUINO
		return modem->stream->print(num);
	#endif
	#ifdef LINUX
		char buff[32]; //potentially dangerous if integers can be represented with more than 32 chars...
		sprintf(buff, "%i", num);
		mmPrint(modem, buff);
		//return fprintf(modem->out, "%d", num);
	#endif
	#ifdef _WIN32
		char buff[32]; //potentially dangerous if integers can be represented with more than 32 chars...
		sprintf_s(buff, "%i", num);
		mmPrint(modem, buff);
	#endif
}
Exemple #2
0
	IMaxModSound* MaxMod_CreateSound( int channels, int bits, int samplerate, int size, void* samples, int flags ) {
		mmPrint("MaxMod_CreateSound ",size);
		IMaxModSound* snd = new IMaxModSound;
		snd->CHANNELS     = channels;
		snd->BITS         = bits;
		snd->SAMPLERATE   = samplerate;
		snd->SIZE         = size;
		snd->AUDIOBUFFER  = (char*)samples;
		snd->STATUS       = 0;
		snd->SetStatus( 0 );
		if(flags&1) snd->LOOP = 1;
		return snd;
	}
//function for sending commands piecewise
void mmSendCommand(struct ModemInterface* interf, FlashStringHelper cmd) {
	mmPrint(interf->modem, cmd);
}
//function for sending commands piecewise
void mmSendCommand(struct ModemInterface* interf, char* cmd) {
	mmPrint(interf->modem, cmd);
}
Exemple #5
0
IMaxModSound::~IMaxModSound(){
	mmPrint("~IMaxModSound");
	delete AUDIOBUFFER;
	delete AudioWrite_Mutex;
	AUDIOBUFFER=NULL;
}