Solved

Sound Problem version 2.0

Posted on 2004-09-16
8
210 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

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…
Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

756 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