[Stk] RtAudioFormat and static at output
Gary Scavone
gary at ccrma.Stanford.EDU
Wed, 26 Mar 2008 09:26:41 -0400
Hi David,
Did you run the "configure" script before compiling STK? It sounds
like the endian flag was not set. I don't know the endianness of a
Pico-ITX board but the default STK configuration is big-endian. If
you are using a little-endian system, provide the __LITTLE_ENDIAN__
preprocessor flag to the compiler.
Regards,
--gary
On 26-Mar-08, at 9:03 AM, David Michael wrote:
> 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
> _______________________________________________
> Stk mailing list
> Stk@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk