VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Why the Sound Output?  (Read 2301 times)

Pita

  • Vectorian
  • ****
  • Posts: 1338
Why the Sound Output?
« on: September 18, 2007, 10:48:23 pm »

If I play a sound from the command line or by a cron job I get an output either on the terminal or from the cron job a message is send to a mail box.

@~:$ .growl

Input Filename : /home/peter/sound/growl.wav
Sample Size    : 8-bits
Sample Encoding: unsigned
Channels       : 1
Sample Rate    : 22050

Time: 00:01.53 [00:00.00] of 00:01.53 ( 100.0%) Output Buffer:  33.73K

Since I have quarter hourly chimes and half hourly time announcement I had to put a block in order that the mail box will not fill up uselessly.

Why this sound output and how can it be stopped?

If I recall right it started with one of the 2.6 kernels.

Regards
Logged

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
Re: Why the Sound Output?
« Reply #1 on: September 19, 2007, 12:05:08 am »

I'm not sure what you use to play the wavefile, but "aplay" never sent me a mail.

How's about you post us the "growl" script?

Logged
Most music on my soundcloud page was arranged in programs running on VL.

Pita

  • Vectorian
  • ****
  • Posts: 1338
Re: Why the Sound Output?
« Reply #2 on: September 19, 2007, 01:20:11 am »

I'm not sure what you use to play the wavefile, but "aplay" never sent me a mail.

How's about you post us the "growl" script?


I am using play not aplay to play .wav files.

Now using aplay I get:
 aplay growl.wav
Playing WAVE 'growl.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono

That's quite a bit shorter. Will see if it still ill send a message to a mail box.

Regards
Logged

lagagnon

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1922
Re: Why the Sound Output?
« Reply #3 on: September 19, 2007, 07:50:41 am »

If I play a sound from the command line or by a cron job I get an output either on the terminal or from the cron job a message is send to a mail box.

I doubt very much play or aplay will send you a message. But a cron job will (from "man crontab": "It is also common to redirect output to a log file.  If you  do not,  and  the command generates output on stdout or stderr, the result will be mailed to the user in question".)

So the way around that is to write your cron job something like this:

0 4 1 jan * date >>/home/username/mycronlog.txt 2>&1
Logged
"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
Re: Why the Sound Output?
« Reply #4 on: September 19, 2007, 10:00:35 am »

I doubt very much play or aplay will send you a message. But a cron job will (from "man crontab": "It is also common to redirect output to a log file.  If you  do not,  and  the command generates output on stdout or stderr, the result will be mailed to the user in question".)
Ah, in that case you could also use "aplay -q growl.wav", which will suppress any messages. Works for play as well.
Logged
Most music on my soundcloud page was arranged in programs running on VL.

Pita

  • Vectorian
  • ****
  • Posts: 1338
Re: Why the Sound Output?
« Reply #5 on: September 19, 2007, 06:12:15 pm »

Thanks a lot headacher & lagagnon. There is no end to learning in Linux. Newbie for ever and ever.

BTW "aplay" cannot play the au files from the program saytime since apparently it cannot read the type which is ul ?? and works fine with "play". play -t ul saytime
Logged

saulgoode

  • Vectorite
  • ***
  • Posts: 340
Re: Why the Sound Output?
« Reply #6 on: September 19, 2007, 11:36:46 pm »

BTW "aplay" cannot play the au files from the program saytime since apparently it cannot read the type which is ul ?? and works fine with "play". play -t ul saytime

APLAY worked for me if I piped the output from SAYTIME:

saytime | aplay -f MU_LAW

Logged
A complex system that works is invariably found to have evolved from a simple system that works.

Pita

  • Vectorian
  • ****
  • Posts: 1338
Re: Why the Sound Output?
« Reply #7 on: September 20, 2007, 12:35:49 am »

BTW "aplay" cannot play the au files from the program saytime since apparently it cannot read the type which is ul ?? and works fine with "play". play -t ul saytime

APLAY worked for me if I piped the output from SAYTIME:

saytime | aplay -f MU_LAW

You are right. It needs this -f flack to MU_LAW which I did not know.
Thanks!

Logged