Hi,
We are trying to play midi files on Treo650 for one of our applications. Can
you please explain how you played midi files using SndPlaySmf? Am using
Codewarrior IDE. Also need to know how to add the midi resource into the pilrc
designer toolkit. Is there any restrictions in resource type ie; the .midi type.
The code we are trying with now is:
void Sounds()
{
{
SysLibLoad(sysFileTLibrary, hsFileSoundLib , &sslRef);
HsSndOpen ( sslRef ) ;
SndPtr soundP;
MemHandle recordH;
recordH = DmGetResource('data',2000);
soundP = (SndPtr) MemHandleLock(recordH);
//HsSndFormatPlay(sslRef,hsSndFormatMidi,hsSndCmdPlay,soundP,hsSndCmdFlags_yesWait);
SndPlaySmf (NULL, SndSmfCmdPlay, soundP, NULL, NULL, NULL, true);
HsSndClose ( sslRef ) ;
//MemHandleUnlock(recordH);
DmReleaseResource(recordH);
}
}
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/