Hello all,
I am looking for some advice on playing standard midifiles on Palm device. I 
am dynamically creating them within an application for playback immeadiately 
thereafter. I am going about it by using SndPlaySMF:

Prototype   Err SndPlaySmf (void* chanP, SndSmfCmdEnum cmd,
BytePtr smfP, SndSmfOptionsType* selP, SndSmfChanRangeType* chanRangeP, 
SndSmfCallbacksType* callbacksP, Boolean bNoWait)

Here is what I�ve attempted:

BytePtr smfP;

objsize = sizeof (MSTREAM[0]); //MSTREAM is a single-scripted array   
//where the Standard Midi File data is held.
Totalsize = (objsize*c);  //c is the total number of positions in the array

bufH = MemHandleNew(Totalsize); // bufh is a VoidHand.
buf = MemHandleLock(bufH);              // buf being the ptr to it.
MemMove(buf, (void *) MSTREAM,Totalsize);
//creating the correct size for the midi stream in memory.

smfP == buf; // is this alright ?

error = SndPlaySmf(NULL,sndSmfCmdPlay,smfP,NULL,NULL,NULL,bnoWait);
MemHandleUnlock(bufH);

At the moment I�m sorting out corruptions in the midifiles I have created, 
I�m just wondering if someone has experience of this (i.e. writing code for 
playing midifiles on Palm) could they let me know if I�m heading in the 
right direction please,

Many thanks,

Eoghan Looney
Interaction Design Centre,
University of Limerick,
Castletroy,
Co.Limerick.

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to