Solved

Sound Problem version 2.0

Posted on 2004-09-16
8
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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 250 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

734 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