Re: Opening Stereo 8-bit 8-K Audio Streams

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

 



Adam Sampson writes:
> A "FILE *" is not a file descriptor -- libc functions like fopen,
> fread, fprintf etc. work with FILE *s, and system calls like open,
> read and ioctl work with integer file descriptors. You can use the
> fileno function to get the file descriptor that the FILE * is using,
> so change "audio_fd" to "fileno(audio_fd)" in that ioctl call, and it
> should be a bit happier.

	Thank you.  I figured I was doing something dumb like
that and yes, I believe I have seen warnings pertaining to what
you are saying, here, so it makes lots of sense.
> 
> The compiler should be complaining about you converting a pointer to
> an integer when you compile that ioctl call as it currently stands;
> it's always a good idea to use the -Wall compiler flag and pay careful
> attention to the warnings it produces.

	Again, thanks.

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux