Solved

Sound Problem version 2.0

Posted on 2004-09-16
8
207 Views
Last Modified: 2013-12-27
Hello again,

My attempt at using sound has come to an abrupt halt.

I have the following script:

sndCmd.cmd = sndCmdFreqDurationAmp;
sndCmd.param1 = 1500;
sndCmd.param2 = 400;
sndCmd.param3 = sndMaxAmp;
SndDoCmd(NULL, &sndCmd, true);
                                    
sndCmd.cmd = sndCmdFreqDurationAmp;
sndCmd.param1 = 1200;
sndCmd.param2 = 400;
sndCmd.param3 = sndMaxAmp;
SndDoCmd(NULL, &sndCmd, true);

I am just trying to make a simple chime similar to a door chime. This works perfectly well in POSE, I get DingDong as expected but on an m505 I get DongDing.
What mysterious Palm secret am I missing here.

Any help very much appreciated.

Barry
                  
0
Comment
Question by:bravotango
  • 3
  • 3
  • 2
8 Comments
 
LVL 6

Expert Comment

by:vadim_ti
Comment Utility
try to change your SndDoCmd to synchronous

SndDoCmd(NULL, &sndCmd, false);
0
 

Author Comment

by:bravotango
Comment Utility
Thanks vadim ti, yes I forgot to say I had already tried that and it made no difference. I should also add that I reversed the two parts of the script and got what I wanted but that is really not satisfactory as it is covering up something which is inherently wrong. Maybe the Palm OS is just full of bugs!

Cheers
0
 
LVL 6

Expert Comment

by:vadim_ti
Comment Utility
palm os is not full of bugs
what programming environment you use?
0
 

Author Comment

by:bravotango
Comment Utility
Using code warrior 9.2 on Windows Xp. I have to admit that the above script runs fine on Emulator but I think it is slower so that's why it works. It's a strange result.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 6

Accepted Solution

by:
msjammu earned 250 total points
Comment Utility
bravotango,

I tested your code with POSE as well as with my Palm Tungsten W, and Palm m125, On both devices it gives same sequence of Tone as it is on POSE, May be this is some other problem in your code that is causing this on your system. The behavior of device and POSE can be different in some situations, one main deference can be of speed.

The sound sequence on device should be assumed as actual sound sequence in your case because ultimately the program is going to run on device. Nevertheless, I wonder at the same time about the behavior on POSE.

On more thing I suggest you to try to clear all doubts is, create a new application and insert this code fragment in this application as I did, if there is some problem in other part of your code that is causing this, this code should behave proper on new fresh application.

Regards,
Manpreet
0
 
LVL 6

Expert Comment

by:msjammu
Comment Utility
One more thing I would like to share with all is that following two statements makes no difference at all bacuase last parameter is not implemented on Palm yet.

SndDoCmd(NULL, &sndCmd, true);
SndDoCmd(NULL, &sndCmd, false);

>>>I should also add that I reversed the two parts of the script and got what I wanted but that is really not satisfactory as it is covering up something which is inherently wrong.

You are right Barry, We should never cover up any error by folowing an approach like this.
>>>Maybe the Palm OS is just full of bugs!
Palm is not full of Bugs. Yes, this is true that, this OS is still evolving and had to offer many easier ways to do things.

When I started programming on that OS I had same problems. One thing of personal experience I share here about palm is, this OS is highly unforgiving. If you did a little mistake in some other part of your code, this may work for some time but starts giving errors suddenly, or may be in some other part (a type of chain reaction I call it) . You may not simply figure it out easily.

Best wishes,

Manpreet
0
 

Author Comment

by:bravotango
Comment Utility
Hi msjammu,

I accept your answer as being correct and as usual spot on. The error was somewhere else in the code. I changed a few things which had nothing to do with this problem and now it works perfectly on POSE and on the device so I must apologize for wasting everybody's time.

I must get out of the habit of blaming Palm OS everytime something does not work as expected.

Cheers for now,

bravotango
0
 
LVL 6

Expert Comment

by:msjammu
Comment Utility
Barry:

Its nothing about appologize for wasting everybody's time. But now everybody who reads this thread will be a littlebit caring when dealing with sounds.

Thanks & Regards
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running. Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detec…
I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now