Audio "clicks"

I’m using the QNX Audio manager to play WAV files and am hearing
“clicks”/noise at the start and ending of each file. I’ve read
something about this somewhere, but can’t remember where at the
moment.

Do I have to do something in a certain order to avoid hearing
the noisy click sound?

Thanks in advance,
Barry


__| _ \ _ | Barry Robertson
_
\ | | | Software Consultant Phone: 972-758-9349
| __ < | Software dfInc. Fax: 972-964-7524
___/ _| __| brobertson@SoftwareRemodeling.com

Barry Robertson wrote:

Actually, it’s only at the ending of audio samples that it
clicks with noise. Ideas?

QNX 4 ? Try the -A option to Audio.


To succeed in this world it is not enough to be stupid; you must also be
well-mannered. - Voltaire

Actually, it’s only at the ending of audio samples that it
clicks with noise. Ideas?

-Barry


Barry Robertson wrote:

I’m using the QNX Audio manager to play WAV files and am hearing
“clicks”/noise at the start and ending of each file. I’ve read
something about this somewhere, but can’t remember where at the
moment.

Do I have to do something in a certain order to avoid hearing
the noisy click sound?

Thanks in advance,
Barry


__| _ \ _ | Barry Robertson
_
\ | | | Software Consultant Phone: 972-758-9349
| __ < | Software Remodeling, Inc. Fax: 972-964-7524
___/ _| __| brobertson@SoftwareRemodeling.com

Yes, Qnx 4.25 or so… I tried the -A option. It introduced
pretty long delays between my request, and audio happening.
Audio was no longer audible, but was running because of status
information I print out.

I’m cranking up Audio with just “Audio sb &” after pnpconfig’ing
the card in /etc/config/sysinit

Somewhere I found “vplay.c” and compiled it. It plays the
audio without the click, but it’s just a command line program.
I’m doing something that responds to requests for files to be
played from other processes.

I’m opening /dev/audio at start-up. Should I close it and
reopen it or something. I’d rather not have to manually
mute the audio to get rid of the click. I was setting
the sample rate, channels, bits per channel each time, but
moved it to the init code (I’m using files with the same
properties) and it didn’t help.

Nice try though,
Barry


Rennie Allen wrote:

Barry Robertson wrote:

Actually, it’s only at the ending of audio samples that it
clicks with noise. Ideas?

QNX 4 ? Try the -A option to Audio.


To succeed in this world it is not enough to be stupid; you must also be
well-mannered. - Voltaire


__| _ \ _ | Barry Robertson
_
\ | | | Software Consultant Phone: 972-758-9349
| __ < | Software Remodeling, Inc. Fax: 972-964-7524
___/ _| __| brobertson@SoftwareRemodeling.com

Barry Robertson wrote:

Somewhere I found “vplay.c” and compiled it. It plays the
audio without the click, but it’s just a command line program.
I’m doing something that responds to requests for files to be
played from other processes.

Is vplay.c doing a flush on the audio fd before it closes it ?


To succeed in this world it is not enough to be stupid; you must also be
well-mannered. - Voltaire

On Thu, 27 Jul 2000 15:57:53 -0500, Barry Robertson
<brobertson@SoftwareRemodeling.com> wrote:

Actually, it’s only at the ending of audio samples that it
clicks with noise. Ideas?

FWIW,

My memory of what causes this click is that the sound file
doesn’t end at 0 so the the output DAC of the sound board is left
holding a DC level out to the speaker, when the file is closed, the
output is set to 0 causing a jump in the speaker cone.

If this is the cause of the problems, you could simply make sure the
sound files you were sending ended at a zero crossing. or faded to
0 in volume… you could either doctor the wave files or the player…

You can find the format or .wav files (and a lot more) here:
http://www.wotsit.org/search.asp?page=9&s=music

Bill



-Barry


Barry Robertson wrote:

I’m using the QNX Audio manager to play WAV files and am hearing
“clicks”/noise at the start and ending of each file. I’ve read
something about this somewhere, but can’t remember where at the
moment.

Do I have to do something in a certain order to avoid hearing
the noisy click sound?

Thanks in advance,
Barry


__| _ \ _ | Barry Robertson
_
\ | | | Software Consultant Phone: 972-758-9349
| __ < | Software Remodeling, Inc. Fax: 972-964-7524
___/ _| __| > brobertson@SoftwareRemodeling.com

Thank you everyone.

I’m writing 4k buffers to the sound card. This is fine, but
when the buffer’s not full, it’s loaded with zeroes at the
tail end. If I only send out part of the buffer, the click
goes away. I had to put in a call to SOUND_SYNC ioctl to get
the partial buffer out. It has a side-effect of playing part
of the audio after a short delay at the end, but no click.
Otherwise, the last fragment of the file comes out with the
next new sound.

Any ideas on the brief delay? If the sound file were you counting
to 10, it’d be like you counted from 1 to 9, held your breath for
a 1/2 second or so, and then said 10. No click, though.

Thank you very much for your help everyone.
Barry


“William M. Derby Jr.” wrote:

On Thu, 27 Jul 2000 15:57:53 -0500, Barry Robertson
brobertson@SoftwareRemodeling.com> > wrote:


Actually, it’s only at the ending of audio samples that it
clicks with noise. Ideas?

FWIW,

My memory of what causes this click is that the sound file
doesn’t end at 0 so the the output DAC of the sound board is left
holding a DC level out to the speaker, when the file is closed, the
output is set to 0 causing a jump in the speaker cone.

If this is the cause of the problems, you could simply make sure the
sound files you were sending ended at a zero crossing. or faded to
0 in volume… you could either doctor the wave files or the player…

You can find the format or .wav files (and a lot more) here:
http://www.wotsit.org/search.asp?page=9&s=music

Bill


__| _ \ _ | Barry Robertson
_
\ | | | Software Consultant Phone: 972-758-9349
| __ < | Software Remodeling, Inc. Fax: 972-964-7524
___/ _| __| brobertson@SoftwareRemodeling.com

Did you try the ALSA 2 drivers for audio off quics
/usr/free/qnx4/multimedia?

Jim


“Barry Robertson” <brobertson@SoftwareRemodeling.com> wrote in message
news:3980A107.737FD7B@SoftwareRemodeling.com

I’m using the QNX Audio manager to play WAV files and am hearing
“clicks”/noise at the start and ending of each file. I’ve read
something about this somewhere, but can’t remember where at the
moment.

Do I have to do something in a certain order to avoid hearing
the noisy click sound?

Thanks in advance,
Barry


__| _ \ _ | Barry Robertson
_
\ | | | Software Consultant Phone: 972-758-9349
| __ < | Software dfInc. Fax: 972-964-7524
___/ _| __| > brobertson@SoftwareRemodeling.com

If you put the zeros at the end, you might be causing
the click as in:

XXXXX XXX
X X X X ← Click
X X X X
X X X XXXXXXXXXXXXXXXXXXXXXXXXXXX
X X
X X
XXXX



\

Mitchell Schoenbrun --------- maschoen@pobox.com