Update of /cvsroot/pure-data/pd/portaudio/pa_unix_oss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26116/pa_unix_oss
Added Files: pa_unix_oss.c Log Message: these files have been removed by mistake, they are necessary for portaudio support
--- NEW FILE: pa_unix_oss.c --- /* * $Id: pa_unix_oss.c,v 1.6.2.27 2006/02/21 19:13:56 bjornroche Exp $ * PortAudio Portable Real-Time Audio Library * Latest Version at: http://www.portaudio.com * OSS implementation by: * Douglas Repetto * Phil Burk * Dominic Mazzoni * Arve Knudsen * * Based on the Open Source API proposed by Ross Bencina * Copyright (c) 1999-2002 Ross Bencina, Phil Burk * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, [...1882 lines suppressed...] audio_buf_info info;
if( ioctl( stream->capture->fd, SNDCTL_DSP_GETISPACE, &info ) < 0 ) return paUnanticipatedHostError; return info.fragments * stream->capture->hostFrames; }
/* TODO: Compute number of allocated bytes somewhere else, can we use ODELAY with capture */ static signed long GetStreamWriteAvailable( PaStream* s ) { PaOssStream *stream = (PaOssStream*)s; int delay = 0;
if( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ) < 0 ) return paUnanticipatedHostError;
return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback ); }