NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Porting an OSS application


no one has a hint about ioctl() parameters? I bet here there are persons that eat them for breakfast....

I'd be happy to get this software working on NetBSD, since it is already packaged for our "cousin" BSD's and Linux.


On 05/02/12 12:42, Riccardo Mottola wrote:

I am trying to port the gnustep audio player to NetBSD with its OSS backend. It is known to work on OpenBSD and on Linux using oss. I am on NetBSD 6.99

When I compile it, I get:
OSS.m: In function '-[OSS _setRateAndChannels]':
OSS.m:111:37: error: macro "ioctl" requires 3 arguments, but only 2 given
OSS.m:111:39: warning: comparison between pointer and integer
gmake[4]: *** [obj/OSS.obj/OSS.m.o] Error 1

the offending line is:

if (ioctl (dspFd, SNDCTL_DSP_RESET) == -1)

Why the error? the argument number is variadic and it compiles on the abovementioned platforms (as well as FreeBSD and others). It is such also in the examples you find aorund on the net.

Somebody writes it that way:
ioctl (dspFd, SNDCTL_DSP_RESET, 0)

This way it compiles on NetBSD. i wonder though if it is correct and work and if it affect other platforms.

It compies then, but when running it will say:

2012-05-02 12:33:22.237 Cynthiune[19288] error preparing output for 1 channels at a rate of 22050

And no sound :(


Home | Main Index | Thread Index | Old Index