[Stk] RtAudioFormat and static at output
David Michael
david at unnature.net
Wed, 26 Mar 2008 09:03:36 -0400
Hello
I wonder if someone can help me out.
I have an STK/RtAudio based application running under Ubuntu Server
7.1(ALSA) on a Pico-ITX board, and thus the VIA VT82xx chip.
The only problem is that the audio sounds like static (and only on one
channel, the other is silent) even though the app does not complain at
compilation nor at runtime. What makes this especially odd is that
using "aplay" to play a soundfile does not suffer from this problem.
It plays fine like so.
$ aplay public/soundfiles/chimes.wav
Playing WAVE 'public/soundfiles/chimes.wav' : Signed 16 bit Little
Endian, Rate 44100 Hz, Stereo
Additionally, I can connect a USB soundcard, and everything works
swimmingly - I suppose this is to be expected.
What am I doing wrong??
Is the RtAudioFormat incorrect?
I am using the following to determine format:
RtAudioFormat format = ( sizeof(StkFloat) == 8 ) ? RTAUDIO_FLOAT64 :
RTAUDIO_FLOAT32;
Does this have to do with duplex channels input and output channels
registering for the soundcard?
Any help would be much appreciated
Best
David
PS - it is still possible that the problem has to do with the ALSA
driver, but since I am able to use aplay successfully, I thought maybe
no...
Here is the dump of the probe.cpp application - the soundcards as
RtAudio sees them:
Device Name = hw:HDA VIA VT82xx,0
Probe Status = Successful
Output Channels = 2
Input Channels = 2
Duplex Channels = 2
This is the default output device.
This is the default input device.
Natively supported data formats:
16-bit int
32-bit int
Supported sample rates = 44100 48000 88200 96000 176400 192000
Device Name = hw:HDA VIA VT82xx,1
Probe Status = Successful
Output Channels = 2
Input Channels = 2
Duplex Channels = 2
This is NOT the default output device.
This is NOT the default input device.
Natively supported data formats:
16-bit int
32-bit int
Supported sample rates = 44100 48000 88200 96000 176400 192000
Here is the attached USB Audio Device dump that works:
Device Name = hw:USB Audio Device,0
Probe Status = Successful
Output Channels = 2
Input Channels = 0
Duplex Channels = 0
This is NOT the default output device.
This is NOT the default input device.
Natively supported data formats:
16-bit int
Supported sample rates = 48000