Changeset 4855:a55e1c122d46 in roaraudio


Ignore:
Timestamp:
04/11/11 11:40:13 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

first set of changes for PA v.19

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/driver_portaudio.c

    r4708 r4855  
    33/* 
    44 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2011 
     5 *      Copyright (C) Hans-Kristian 'maister' Arntzen - 2010 
    56 * 
    67 *  This file is part of roard a part of RoarAudio, 
     
    3334#ifdef ROAR_HAVE_LIBPABLIO 
    3435 long flags = PABLIO_WRITE; 
    35 #elif defined(ROAR_HAVE_LIBPORTAUDIO_V0_19) 
     36#elif defined(ROAR_HAVE_PA19_VERSION_19) 
    3637 PaError err; 
    3738 PaStreamParameters params; 
    3839#endif 
     40 
     41 if ( fh != -1 ) 
     42  return -1; 
    3943 
    4044 switch (info->bits) { 
     
    105109 
    106110 return 0; 
    107 #elif defined(ROAR_HAVE_LIBPORTAUDIO_V0_19) 
     111#elif defined(ROAR_HAVE_PA19_VERSION_19) 
    108112 params.device                    = Pa_GetDefaultOutputDevice(); 
    109113 params.channelCount              = info->channels; 
     
    116120 
    117121 // Sets up blocking I/O stream. 
    118 #if 0 
    119122 err = Pa_OpenStream(&(self->stream), 
    120123                     NULL, 
     
    126129                     NULL 
    127130                    ); 
    128 #endif 
    129131 
    130132 if ( err != paNoError ) { 
     
    161163 
    162164 return 0; 
    163 #elif defined(ROAR_HAVE_LIBPORTAUDIO_V0_19) 
     165#elif defined(ROAR_HAVE_PA19_VERSION_19) 
    164166 if ( (self != NULL) && (self->stream != NULL) ) { 
    165167  Pa_StopStream(self->stream); 
     
    179181ssize_t driver_portaudio_write        (struct roar_vio_calls * vio, void *buf, size_t count) { 
    180182 struct driver_portaudio * self = vio->inst; 
     183#ifdef ROAR_HAVE_PA19_VERSION_19 
     184 size_t write_frames = count / self->framesize; 
     185 PaError err; 
     186#endif 
    181187 
    182188 ROAR_DBG("driver_portaudio_write(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned int)count); 
     
    186192 ROAR_DBG("driver_portaudio_write(vio=%p, buf=%p, count=%llu) = ? // PABLIO mode", vio, buf, (long long unsigned int)count); 
    187193 return WriteAudioStream(self->ostream, buf, count) * self->ostream->bytesPerFrame; 
    188 #elif defined(ROAR_HAVE_LIBPORTAUDIO_V0_19) 
    189  size_t write_frames = count / self->framesize; 
    190  PaError err; 
     194#elif defined(ROAR_HAVE_PA19_VERSION_19) 
    191195 
    192196 ROAR_DBG("driver_portaudio_write(vio=%p, buf=%p, size=%llu) = ?", vio, buf, (long long unsigned int)size); 
  • roard/include/driver_portaudio.h

    r4708 r4855  
    2727#define _DRIVER_PORTAUDIO_H_ 
    2828 
    29 //#undef ROAR_HAVE_LIBPABLIO 
    30 //#define ROAR_HAVE_LIBPORTAUDIO_V0_19 
    31  
    3229#ifdef ROAR_HAVE_LIBPORTAUDIO 
    33 #if defined(ROAR_HAVE_LIBPABLIO) || defined(ROAR_HAVE_LIBPORTAUDIO_V0_19) 
     30#if defined(ROAR_HAVE_LIBPABLIO) || defined(ROAR_HAVE_PA19_VERSION_19) 
    3431#define _DRIVER_PORTAUDIO_CAN_OPERATE 
    3532#endif 
     
    4138#ifdef ROAR_HAVE_LIBPABLIO 
    4239 PABLIO_Stream * ostream; 
    43 #elif defined(ROAR_HAVE_LIBPORTAUDIO_V0_19) 
     40#elif defined(ROAR_HAVE_PA19_VERSION_19) 
    4441 PaStream *stream; 
    4542 int framesize; 
Note: See TracChangeset for help on using the changeset viewer.