Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Sound Problem version 2.0

Posted on 2004-09-16
8
Medium Priority
?
216 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
ID: 12082874
try to change your SndDoCmd to synchronous

SndDoCmd(NULL, &sndCmd, false);
0
 

Author Comment

by:bravotango
ID: 12083197
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
ID: 12083265
palm os is not full of bugs
what programming environment you use?
0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 

Author Comment

by:bravotango
ID: 12083632
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
 
LVL 6

Accepted Solution

by:
msjammu earned 1000 total points
ID: 12090491
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
ID: 12090521
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
ID: 12091136
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
ID: 12091161
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 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