Sample program vplay.

Hi. We need to play wave files as part of our current project. To
support this, we’ve been using a customized version of vplay (found in
/usr/demo/src/audio/). All of the core logic remains untouched; the
only changes we made were to the interface. The resulting program,
called wavplay, works fine with some wave files, but not others. The
files it plays fine are 1 channel, 16 bit, 16000 sample wave files. It
does not work on 1 channel, 8 bit, 8000 sample wave files. By ‘not
work’, I mean that the wave file plays, but it sound garbled. Some
spots sound almost correct, but others are totally incomprehensible.
Just 'cat’ing the wave files to /dev/dsp has the same effect.

The obvious solution, of course, is to pass all of our 8-bit files
through a conversion program. This is undesirable, however, as we are
using a text-to-speech engine that produces the 8-bit files, and we do
not want to have to do anything to the resulting output. Does anyone
have any ideas on what the problem might be, or even where we could look
for a better/more robust wave-player program for QNX 4? Thanks.

Josh Hamacher
FAAC Incorporated

what card is it? this would be ab issue with the Audio driver itself and not
the vplay code…

the srcs indicate that the cards supported by Audio do support the mode you
require (and the ioctls to the driver are succeedingf) but the playback is incorrect.

i do not know of any easy way to get there without doing a conversion of the
wavefile. the rates are not too high so it should not be much overhead.

the qnx4 audio components are effectively plateaud… this is due to several
reasons, the biggest of which is the move to qnx-sound-archicteture in qnx neutrino
which is ‘loosely’ based on alsa 0.52. there are many implications at that
level which require the advanced services of the neutrino kernel (like threading
etc.)

i don’t have an answer for you on this… another option could be to find out
why your card doesn’t handle this bit size and sample rate correctly and try to
modify the Audio source…

Josh Hamacher <hamacher@faac.com> wrote:

Hi. We need to play wave files as part of our current project. To
support this, we’ve been using a customized version of vplay (found in
/usr/demo/src/audio/). All of the core logic remains untouched; the
only changes we made were to the interface. The resulting program,
called wavplay, works fine with some wave files, but not others. The
files it plays fine are 1 channel, 16 bit, 16000 sample wave files. It
does not work on 1 channel, 8 bit, 8000 sample wave files. By ‘not
work’, I mean that the wave file plays, but it sound garbled. Some
spots sound almost correct, but others are totally incomprehensible.
Just 'cat’ing the wave files to /dev/dsp has the same effect.

The obvious solution, of course, is to pass all of our 8-bit files
through a conversion program. This is undesirable, however, as we are
using a text-to-speech engine that produces the 8-bit files, and we do
not want to have to do anything to the resulting output. Does anyone
have any ideas on what the problem might be, or even where we could look
for a better/more robust wave-player program for QNX 4? Thanks.

Josh Hamacher
FAAC Incorporated


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

Thanks for the response. It turns out that this is a non-issue.
Someone else is doing the text-to-speech work, so when they told me the
wave files weren’t working, I assumed they had exhausted their options.
It turns out, however, that the text-to-speech engine can output 16-bit
wave files; these work fine, so that’s what we’re doing.

Josh Hamacher
FAAC Incorporated


Randy Martin wrote:

what card is it? this would be ab issue with the Audio driver itself and not
the vplay code…

the srcs indicate that the cards supported by Audio do support the mode you
require (and the ioctls to the driver are succeedingf) but the playback is incorrect.

i do not know of any easy way to get there without doing a conversion of the
wavefile. the rates are not too high so it should not be much overhead.

the qnx4 audio components are effectively plateaud… this is due to several
reasons, the biggest of which is the move to qnx-sound-archicteture in qnx neutrino
which is ‘loosely’ based on alsa 0.52. there are many implications at that
level which require the advanced services of the neutrino kernel (like threading
etc.)

i don’t have an answer for you on this… another option could be to find out
why your card doesn’t handle this bit size and sample rate correctly and try to
modify the Audio source…

Josh Hamacher <> hamacher@faac.com> > wrote:
Hi. We need to play wave files as part of our current project. To
support this, we’ve been using a customized version of vplay (found in
/usr/demo/src/audio/). All of the core logic remains untouched; the
only changes we made were to the interface. The resulting program,
called wavplay, works fine with some wave files, but not others. The
files it plays fine are 1 channel, 16 bit, 16000 sample wave files. It
does not work on 1 channel, 8 bit, 8000 sample wave files. By ‘not
work’, I mean that the wave file plays, but it sound garbled. Some
spots sound almost correct, but others are totally incomprehensible.
Just 'cat’ing the wave files to /dev/dsp has the same effect.

The obvious solution, of course, is to pass all of our 8-bit files
through a conversion program. This is undesirable, however, as we are
using a text-to-speech engine that produces the 8-bit files, and we do
not want to have to do anything to the resulting output. Does anyone
have any ideas on what the problem might be, or even where we could look
for a better/more robust wave-player program for QNX 4? Thanks.

Josh Hamacher
FAAC Incorporated


Randy Martin > randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems > www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579