Article View: comp.sys.amiga.tech
Article #7547Re: Simple Audio question
From: Ken Farinsky - CATS
Date: Mon, 17 Dec 1990 18:52
Date: Mon, 17 Dec 1990 18:52
40 lines
1864 bytes
1864 bytes
In article <8GG^X6$@rpi.edu> peck@ral.rpi.edu (Joseph Peck) writes:
>
>...how to correctly select an audio channel for playing a sound.
>
>I get warnings when I compile my program...I select the channel with:
>
>AIOptr->ioa_Request.io_Unit = #; /* where # is either 1,2,3 or 4. */
>
>Joe Peck peck@ral.rpi.edu
I'm not the audio expert, but I'll try to answer your questions.
Looking through the RKM (Libs&Devs) in the Audio Device section, I found:
p610: You specify the channel that you want to use by setting the
appropriate bits in the ioa_Request.io_Unit field...
from p615, it looks like the bits are set up as follows:
CHANNEL_0 (1<<0)
CHANNEL_1 (1<<1)
CHANNEL_2 (1<<2)
CHANNEL_3 (1<<3)
Also, from page 614: If the allocation succeeds, the audio device
will return the channels that you now own in the lower four bits
of the ioa_Request.io_Unit field...So I would guess that you don't
use numbers like 1,2,3 or 4.
So, even though the field is a pointer, you have to put bit values into
it. Try something like:
AIOptr->ioa_Request.io_Unit = (struct Unit *)(CHANNEL_0);
Also, remember to mask out any unused bits when checking the value of
this variable and to set unused bits to zero when setting this variable.
--
--
Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines
uucp: ken@cbmvax.commodore.com or ...{uunet,rutgers}!cbmvax!ken
bix: kfarinsky
Technical Details
Message-ID:
<16603@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!kenReferences:
<8GG^X6$@rpi.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!ken From: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Newsgroups: comp.sys.amiga.tech Subject: Re: Simple Audio question Message-ID: <16603@cbmvax.commodore.com> Date: 17 Dec 90 18:52:21 GMT References: <8GG^X6$@rpi.edu> Reply-To: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Organization: Commodore, West Chester, PA Lines: 40