Changeset 1349 for portaudio/branches

Show
Ignore:
Timestamp:
02/21/08 11:07:31 (10 months ago)
Author:
jpgrayson
Message:

- Partial patch for NetBSD support.
-- Change DEVICE_NAME_BASE when building for NetBSD.
-- Only use SNDCTL_DSP_GETODELAY ioctl() if it is available.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • portaudio/branches/v19-devel/src/hostapi/oss/pa_unix_oss.c

    r1314 r1349  
    6666#ifdef HAVE_SYS_SOUNDCARD_H 
    6767# include <sys/soundcard.h> 
    68 # define DEVICE_NAME_BASE            "/dev/dsp" 
     68# ifdef __NetBSD__ 
     69#  define DEVICE_NAME_BASE           "/dev/audio" 
     70# else 
     71#  define DEVICE_NAME_BASE           "/dev/dsp" 
     72# endif 
    6973#elif defined(HAVE_LINUX_SOUNDCARD_H) 
    7074# include <linux/soundcard.h> 
     
    19711975    PaOssStream *stream = (PaOssStream*)s; 
    19721976    int delay = 0; 
    1973  
     1977#ifdef SNDCTL_DSP_GETODELAY 
    19741978    ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ), paUnanticipatedHostError ); 
     1979#endif 
    19751980    return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback ); 
    19761981