Re: Sound Control, Input Fields

Ben Anderson ((no email))
Fri, 25 Feb 94 18:05:35 gmt

> 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.
>
use the shell or the process command to fire off:
"play -v X mysound" (or whatever the syntax for play is)

- I haven't had any probs with the -v option using it like this.

if you construct the command in Metacard first then you can vary the sound
level. But this won't allow you to change the volume in the middle of
playing the sound. Some folks here hacked a metacard front end to the Sparc
audiotool but to directly control the device they had to resort to a C
interface between the two. I think it got a bit messy. lots of fun.
>
> 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.
>
>Use the Auto Tab property for that.
>
or use the returnInField message to catch the <CR> and do with it what you will.

Ben.

******************************************************************************
"Because it's there."
Ben Anderson _______________________
LUTCHI Research Centre |
Department of Computer Studies ________/}
University of Technology ---/ ||
Loughborough ---------/ || __ ||
Leicestershire | () (oo) ()
UK. | \\_(--)_//
tel: +44 (0)509 263171 ext 4617 |||\\ ______ | \--/ |
fax: +44 (0)509 211585 or 610815 / \----- \ \ /
email: B.Anderson@lut.ac.uk | \ \ \ /
{ \ \ ||O||O
and for you WWWebsters: | \ \| \| \o
http://pipkin.lut.ac.uk \_\\ __________\_)/ /\
\ \------>_______// \