This is my code that sets bPolyAvailable to true if appropriate. However, on
the Tungsten 21 it comes up with true. I've changed the code based on Tom
Frauenhofer's suggestions. What am I missing? Do I need to do a device check
for the Zire21 and set it to false?
// globals
Boolean bPolyAvailable = false;
void Function(void)
{
UInt32 version;
Err err;
err = FtrGet(sysFileCSoundMgr, sndFtrIDVersion, &version);
// if(err != ftrErrNoSuchFeature) {
if(err == errNone) {
if(version == sndMgrVersionNum) {
bPolyAvailable = true;
}
}
// account for Palm Tungsten T not having the Streaming Sound feature
if(bPolyAvailable == false) {
if(SysGetTrapAddress(sysTrapSndStreamCreate) !=
SysGetTrapAddress(sysTrapSysUnimplemented)) {
bPolyAvailable = true;
}
}
if(bPolyAvailable == false)
return;
// do more stuff
}
Thanks,
Mike
--- Tom Frauenhofer <[EMAIL PROTECTED]> wrote:
> Here's the routine I used that worked (told me the Zire21 doesn't have
> sampled sound...) - used this to test the Zire 21 a few weeks ago - biggest
> difference is how we check for errors on the FtrGet - no hangs here...
>
> (This was taken from either a PalmSource or PalmOne site to include
> handling for Tungsten T - I don't claim authorship, merely creative reuse ;)
> )
>
> static Boolean IsStreamingSoundAvailable(void)
> {
> UInt32 version;
> Err result;
>
> UInt32 companyID;
> UInt32 deviceID;
>
> // check for sound manager feature
> result = FtrGet(sysFileCSoundMgr, sndFtrIDVersion, &version);
> if (result == errNone)
> return true;
>
> // check for Tungsten T
> FtrGet(sysFtrCreator, sysFtrNumOEMCompanyID, &companyID);
> FtrGet(sysFtrCreator, sysFtrNumOEMDeviceID, &deviceID);
> if ((companyID == 'Palm') && (deviceID == 'Frg1'))
> return true;
>
> // failed
> return false;
> }
>
>
>
> At 03:00 AM 11/7/2003, Mike McCollister <[EMAIL PROTECTED]> wrote:
> >Ben,
> >
> >Thanks. Now why does the Zire 21 return a true with this code?
> >
> >bSampledSound = false;
> >err = FtrGet(sysFileCSoundMgr, sndFtrIDVersion, &version)
> >if(err != ftrErrNoSuchFeature)
> > if(version == sndMgrVersionNum)
> > bSampleSound = true;
> >
> >Was it an oversite by palmOne? If so, what do I need to check for then?
> >
> >Thanks,
> >
> >Mike
> >
> >--- Ben Combee <[EMAIL PROTECTED]> wrote:
> > > At 12:21 PM 11/6/2003, Mike McCollister wrote:
> > > >Does the Zire 21 support sampled sound?
> > >
> > > Reports on this forum from a few weeks ago indicate that the Zire 21
> > > doesn't support sampled sound.
> > >
> > > --
> > > Ben Combee <[EMAIL PROTECTED]>
> > > CodeWarrior for Palm OS technical lead
> > > Palm OS programming help @ www.palmoswerks.com
> > >
> > >
>
> ----
> Tom Frauenhofer, [EMAIL PROTECTED]
> http://www.beret.com
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/support/forums/
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/