Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2018 04:56:33 +0100
From:      Goran =?utf-8?B?TWVracSH?= <meka@tilda.center>
To:        freebsd-multimedia@freebsd.org
Subject:   Playing to arbitrary channel
Message-ID:  <20180104035633.vp55wxjwaeidubix@thinker.my.domain>

next in thread | raw e-mail | index | archive | help

--dlwmhj4ffmsynde2
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Hello,

I know I can open all channels, set to zero ones I don't want to play
and set to something meaningfull those channels I want to be played. Is
there a better way of saying "I want one channel, but play it on
soundcard's channel 10"? If that is not possible, how can I get number
of channels? I tried this:


oss_audioinfo ai = {0, };
ai.dev = -1;
int fd = open(device, O_RDWR, 0);
ioctl(fd, SNDCTL_AUDIOINFO, &ai);
printf("%d\n", ai.max_channels);


I tried it on my laptop, and it works just fine, but I didn't test it
with virtual_oss. Is that appropriate call for virtual_oss, too?

Also, I don't understand SNDCTL_DSP_SETTRIGGER. I briefly looked at jack
using it, and it seams to me ioctl is set after every read or write.
I didn't get the impression I should do it more than once based on
http://manuals.opensound.com/developer/SNDCTL_DSP_SETTRIGGER.html. What
I want is that my read() and write() are in sync, and this ioctl looks
like the thing I'm looking for, but I'm not sure. I always thought read
and write are synced by driver, but I could be wrong. Can anyone tell me
how to properly use this call? Thanx!

Regards,
meka

--dlwmhj4ffmsynde2
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAlpNpe4ACgkQWj1Tknov
rLYvARAAhUny30LO0TpLYWvW0qBJJJAI719ahzxWFMu/XUAKg8wcuqEeZTJEW0Rr
P9PGAB1hBywHnF8XfTy54gtYixd9ymQj7QQ9AkE9Ren7k27VtCo73+ujXtsN9o5y
RHtKZfzSu31F8ALu9MA8XfPMSoNmPYBLbhY1RWwhvcMlzI6pwG/GUXQQ55UzInLE
ILiy8RAPU5/PZeioQudmAPRcCEG4VPLrvWZ7bf0NeNg1PRHSv6ejRj+Bkg8RhfP2
j9zoTknFgE6Asl67fOKD572yHSSPEIufatxcy/7IJHk3y1nTRSab5vu4LGHbgM1d
QDNZ+gHzyMQ+bwL98HVg2ToTHD0WQLDtojDe8bMyIch0LfxQFI9XQXoQt/B9A75S
/K3Xp0DrRNBiulSkkTMdzEgfom8VkFh5VsBu89rWey8+Qr+zR/WMUpQci+GAQWsb
qfeJ6HyflKC1SM/pyUzhum7vBroPC87yZErOYy5fAbSVUSAGYCOD3fp9poUJTyXY
tQUYmulxMCYSYi1TZSqDfVNNWJyUHHUASgz2/FNf+s9N7qgkGMrPXLGApdq1zbRA
bNhYZR5U8qW4XiWG0JXA5DOW0aFk461zpSPCE1454aWd+Ij/SJjrkeN/xCk3p3Iu
/3WgWhLQlYJ/+83KQIsz/hCP1MJVepOEAsqo08x7XBxSD2Dvr28=
=lKnB
-----END PGP SIGNATURE-----

--dlwmhj4ffmsynde2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180104035633.vp55wxjwaeidubix>