[Stk] audio glitches, drivers and being a beginner

Gary Scavone gary@ccrma.Stanford.EDU
Tue, 29 Mar 2005 09:45:55 -0500


--Apple-Mail-5-656369221
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	format=flowed

Hi Conor,

>  =A0I'm very new to STK but have managed to run the demo's app...
>  =A0However I find the audio when playing back glitches period...
>  =A0output from the score audible (quality is good but the gli...
>  =A0
>  Too many errors encountered; the rest of the message is ignored:
>  =A0pretty annoying). Is this due to the audio drivers? I have an echo
>  =A0Layla
>  =A024 soundcard as the default windows audio device. Should I then =
use
>  =A0Asio or Direct Sound inorder to run the Layla properly?

By default, the demo program is using the DirectSound API.  While the=20
ASIO API usually provides better performance, I wouldn't attempt to use=20=

it unless you have an ASIO driver from the soundcard manufacturer. =20
With DirectSound, you will probably have to "mess" with the audio=20
parameters to achieve more robust performance (this is typical with=20
Windoze).  You might try both increasing and decreasing the buffer size=20=

and the number of buffers parameters passed to the RtAudio instance.

>  =A0 I must say the fact that realtime scores were readily audible on =
the
>  =A0layla through msdev.net immediately was very promising. . I want =
to
>  =A0get into doing some audio dev and this looks perfect. I know this
>  =A0sounds like a total novice question but where do i query the OS as =
to
>  =A0how many audio drivers i have installed. I recently wiped the =
machine
>  =A0so i don't know where to check in the registry. the control panel
>  =A0"sound audio devices" section only displays options for the Layla =
and
>  =A0the onboard intel sound driver. I don't even think i have =
installed
>  =A0the default driver for the sound card that came on the laptop. =
would
>  =A0any of these make a difference my setup?

Using the driver provided by the manufacturer is a good idea.  The=20
"Control Panel" can provide some info about your soundcards ... also,=20
right-clicking on "My Computer" (or whatever that icon is in the top=20
left corner) and looking at the system properties could help.  The=20
RtAudio class can also probe your system but with the DirectSound API,=20=

there's not a lot of information.  Even if you have a multichannel=20
soundcard, DirectSound breaks it down into 2-channel pairs and reports=20=

those as separate devices.  I haven't had the energy to attempt to=20
combine these pairs into a single device from RtAudio's perspective=20
because I consider the DirectSound API to be broken and designed by=20
idiots.

>  =A0I find that when i set the identifiers for asio instead of default
>  =A0direct sound and include the asio src i get compile errors like:
>  =A0
>  =A0e:\forwind_dev\stk-4.2.0\include\Thread.h(62): error C2061: syntax
>  =A0error
>  =A0: identifier 'THREAD_FUNCTION'
>  =A0e:\forwind_dev\stk-4.2.0\src\Socket.cpp(61): error C2065:=20
> 'IPPROTO_TCP'
>  =A0: undeclared identifier
>  =A0e:\forwind_dev\stk-4.2.0\src\Socket.cpp(68): error C2065:=20
> 'TCP_NODELAY'
>  =A0: undeclared identifier
>  =A0
>  =A0and so on...
>  =A0alot macros undefined, where should i find these?
>  =A0When i try and compile in debug with the asio identifier and =
source
>  =A0included i get these type of compile errors

Those are socket macros.  I'm guessing that the __WINDOWS_ASIO__=20
preprocessor wasn't defined when you tried to compile.

--gary

--Apple-Mail-5-656369221
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=ISO-8859-1

Hi Conor,


<excerpt><fontfamily><param>Arial</param><smaller> =A0I'm very new to
STK but have managed to run the demo's app...</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0However I find the audio
when playing back glitches period...</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0output from the score
audible (quality is good but the gli...</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> Too many errors encountered;
the rest of the message is ignored:</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0pretty annoying). Is this
due to the audio drivers? I have an echo </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0Layla</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A024 soundcard as the default
windows audio device. Should I then use </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0Asio or Direct Sound
inorder to run the Layla properly?</smaller></fontfamily>

</excerpt>

By default, the demo program is using the DirectSound API.  While the
ASIO API usually provides better performance, I wouldn't attempt to
use it unless you have an ASIO driver from the soundcard manufacturer.=20=

With DirectSound, you will probably have to "mess" with the audio
parameters to achieve more robust performance (this is typical with
Windoze).  You might try both increasing and decreasing the buffer
size and the number of buffers parameters passed to the RtAudio
instance.


<excerpt><fontfamily><param>Arial</param><smaller> =A0 I must say the
fact that realtime scores were readily audible on =
the</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0layla through msdev.net
immediately was very promising. . I want to </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0get into doing some audio
dev and this looks perfect. I know this </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0sounds like a total novice
question but where do i query the OS as to </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0how many audio drivers i
have installed. I recently wiped the machine </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0so i don't know where to
check in the registry. the control panel </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0"sound audio devices"
section only displays options for the Layla and </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0the onboard intel sound
driver. I don't even think i have installed </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0the default driver for the
sound card that came on the laptop. would </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0any of these make a
difference my setup?</smaller></fontfamily>

</excerpt>

Using the driver provided by the manufacturer is a good idea.  The
"Control Panel" can provide some info about your soundcards ... also,
right-clicking on "My Computer" (or whatever that icon is in the top
left corner) and looking at the system properties could help.  The
RtAudio class can also probe your system but with the DirectSound API,
there's not a lot of information.  Even if you have a multichannel
soundcard, DirectSound breaks it down into 2-channel pairs and reports
those as separate devices.  I haven't had the energy to attempt to
combine these pairs into a single device from RtAudio's perspective
because I consider the DirectSound API to be broken and designed by
idiots.


<excerpt><fontfamily><param>Arial</param><smaller> =A0I find that when i
set the identifiers for asio instead of default </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0direct sound and include
the asio src i get compile errors like:</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>
=A0e:\forwind_dev\stk-4.2.0\include\Thread.h(62): error C2061: syntax =
</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0error</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0: identifier
'THREAD_FUNCTION'</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>
=A0e:\forwind_dev\stk-4.2.0\src\Socket.cpp(61): error C2065:
'IPPROTO_TCP'</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0: undeclared =
identifier</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>
=A0e:\forwind_dev\stk-4.2.0\src\Socket.cpp(68): error C2065:
'TCP_NODELAY'</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0: undeclared =
identifier</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0and so =
on...</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0alot macros undefined,
where should i find these?</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0When i try and compile in
debug with the asio identifier and source </smaller></fontfamily>

<fontfamily><param>Arial</param><smaller> =A0included i get these type
of compile errors</smaller></fontfamily>

</excerpt>

Those are socket macros.  I'm guessing that the __WINDOWS_ASIO__
preprocessor wasn't defined when you tried to compile.


--gary


--Apple-Mail-5-656369221--