Re: Sound Control, Input Fields

Scott Raney ((no email))
Fri, 25 Feb 94 13:55:55 MST

>
> I have two questions.
>
> The Help files say that 'playLoudness' is not yet supported. Does anyone
> know how to set the volume level for the audio tool on a Sun platform? It
> seems that the default is 50 on a scale of 0-100. I would like to set
> when I first begin my application, or at least progress towards having a
> sliding volume control. From the command line, I could use the -v option
> to set the volume, but MetaCard doesn't like it.

The only easy way to do this is to use Sun's audiotool to set the
volume. MetaCard doesn't change the gain setting when it plays, so
any settings you make using the tool will be used (this applies to all
platforms, though the name of the tool varies).

If you want to set the volume from a script, you'll need to write a
little 'C' program and either call it using shell() or make it an
external. There is some sample code for doing this in
/usr/demo/SOUND/src/gaintool on SPARC systems.

> The second question concerns a field that I am using for input. Is there
> a way to prevent the user from inputting a carriage return? I would like
> the entry to be contained to one line and not allow a <CR>, or at least
> cause the <CR> to signal an end to the input.

You can either set the field's autoTab property, or put an empty "on
returnInField" handler in the field, card or stack script.

> Suggestions on either would be greatly appreciated.
>
> Thanks.
>
> Brad
>
> --------------------------------------------------------------------------
> | Bradford Marx | D.A.M. -- Mothers Against Dyslexia |
> | marxb@bah.com | Support your local chapter! |
> --------------------------------------------------------------------------

-- 
***********************************************************************
* Scott Raney  303-447-3936            Remember: the better you look, *
* raney@metacard.com                   the more you'll see -- Lidia   *
***********************************************************************