cancel
Showing results for 
Search instead for 
Did you mean: 

send_sound

Jeff Stevko
Occasional Advisor

send_sound

HP-UX 11.11, running on a C3600.

I've got a curious problem, I'm trying to have this server in our data room play a sound, it does work from the console, but not from cron or remotely. I've been through the man pages without any success..

The command:
/opt/audio/bin/send_sound /opt/clok/hour.au -au


The error message generated:
Unable to open audio server. AOpenAudio returns NULL. status: 5. Exiting...
8 REPLIES
Steven Schweda
Honored Contributor

Re: send_sound

Never having tried to use the audio on my
C3700, I know nothing, but ...

> [...] I've been through the man pages [...]

All of them?

Around here, "man send_sound" does lead to
"man asecure":

[...]
DESCRIPTION

On Series 700 workstations, audio is secured so that only the user on the local workstation can
access audio. You use the asecure command to modify audio security. This command does not
apply to X stations; on an X station, access to audio is unrestricted.
[...]

which is, at least, suggestive.

What does this say on your system?:

/opt/audio/bin/asecure -l
Jeff Stevko
Occasional Advisor

Re: send_sound

BTDT, ran the asecure comands, no help... also been thru the aserver man pages. (It IS running) and the audio. (I had to configure the output to the jacks in the back, which did work...) Nothing is showing up in the syslog either...
Jeff Stevko
Occasional Advisor

Re: send_sound

# /opt/audio/bin/asecure -l
Access control disabled, any client can connect to Aserver from any host.
Priviledged user: root
host = localhost; user = ALL USERS
Steven Schweda
Honored Contributor

Re: send_sound

Around here, I don't seem to have an obvious
"Audio Control Panel", but in the CDE File
Manager, I can double-click on a ".wav" file,
and get a signal at the Line Out hole on the
back of my C3700. If I RSH from a different
system, and try something simple, I can get a
(similar but different) failure:

dy # time /opt/audio/bin/send_sound -wav knowall.wav
Unable to open audio server, AOpenAudio returns NULL, status: 18, Exiting...

real 0m36.028s [Long time -> no sound.]
user 0m0.020s
sys 0m0.010s

However, adding a "-server" option seems to
help:

dy # time /opt/audio/bin/send_sound -wav -server dy knowall.wav

real 0m0.967s [Short time -> sound ok.]
user 0m0.030s
sys 0m0.020s

Knowing where you are seems to be
unimportant, too:

dy # time /opt/audio/bin/send_sound -wav -server localhost knowall.wav

real 0m0.960s
user 0m0.030s
sys 0m0.020s

Unsetting DISPLAY also seems to work. As
above:

dy # echo $DISPLAY
alp-l.antinode.info:0.0
dy # time /opt/audio/bin/send_sound -wav knowall.wav
Unable to open audio server, AOpenAudio returns NULL, status: 18, Exiting...

real 0m36.028s
user 0m0.030s
sys 0m0.020s

But:

dy # unset DISPLAY
dy # echo $DISPLAY

dy # time /opt/audio/bin/send_sound -wav knowall.wav

real 0m1.091s
user 0m0.030s
sys 0m0.020s

I haven't tried "cron" (or a non-root user),
but what could go wrong?
Steven Schweda
Honored Contributor

Re: send_sound

> BTDT, [...]

Yeah, and if I were psychic, I might've known
that without any evidence.
Jeff Stevko
Occasional Advisor

Re: send_sound

You may have something there, I ran thru a few iterations of the command (now I know a few more ways it WON'T work) and then ran:
/opt/audio/bin/send_sound -server snochp1w -au /opt/clok/hour.au and it didn't return an error! I'll have to go back to the core to verify it did indeed play, or wait for someone to return looking confused...

Interesting I had to move the -au switch from after the sound file to before it...

Film at 11!
Steven Schweda
Honored Contributor

Re: send_sound

> Interesting I had to move the -au switch
> from after the sound file to before it...

According to:

http://docs.hp.com/en/B2355-60127/send_sound.1.html

it plays a file, but you don't actually
specify the file name on the command line,
so, as a syntax guide, it seems less than
perfect. Putting all the options (and their
arguments) ahead of the command arguments is
pretty common, however.

None of this stuff explicitly refers to the
X display, although the asecure page does
casually mention X.

> I'll have to go back to the core [...]

You need a co-located workstation with audio
_in_.
Jeff Stevko
Occasional Advisor

Re: send_sound

That finally did it, the "server" addition to the comand... Thanks for the info!