Changeset 4855:a55e1c122d46 in roaraudio
- Timestamp:
- 04/11/11 11:40:13 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/driver_portaudio.c
r4708 r4855 3 3 /* 4 4 * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2011 5 * Copyright (C) Hans-Kristian 'maister' Arntzen - 2010 5 6 * 6 7 * This file is part of roard a part of RoarAudio, … … 33 34 #ifdef ROAR_HAVE_LIBPABLIO 34 35 long flags = PABLIO_WRITE; 35 #elif defined(ROAR_HAVE_ LIBPORTAUDIO_V0_19)36 #elif defined(ROAR_HAVE_PA19_VERSION_19) 36 37 PaError err; 37 38 PaStreamParameters params; 38 39 #endif 40 41 if ( fh != -1 ) 42 return -1; 39 43 40 44 switch (info->bits) { … … 105 109 106 110 return 0; 107 #elif defined(ROAR_HAVE_ LIBPORTAUDIO_V0_19)111 #elif defined(ROAR_HAVE_PA19_VERSION_19) 108 112 params.device = Pa_GetDefaultOutputDevice(); 109 113 params.channelCount = info->channels; … … 116 120 117 121 // Sets up blocking I/O stream. 118 #if 0119 122 err = Pa_OpenStream(&(self->stream), 120 123 NULL, … … 126 129 NULL 127 130 ); 128 #endif129 131 130 132 if ( err != paNoError ) { … … 161 163 162 164 return 0; 163 #elif defined(ROAR_HAVE_ LIBPORTAUDIO_V0_19)165 #elif defined(ROAR_HAVE_PA19_VERSION_19) 164 166 if ( (self != NULL) && (self->stream != NULL) ) { 165 167 Pa_StopStream(self->stream); … … 179 181 ssize_t driver_portaudio_write (struct roar_vio_calls * vio, void *buf, size_t count) { 180 182 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 181 187 182 188 ROAR_DBG("driver_portaudio_write(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned int)count); … … 186 192 ROAR_DBG("driver_portaudio_write(vio=%p, buf=%p, count=%llu) = ? // PABLIO mode", vio, buf, (long long unsigned int)count); 187 193 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) 191 195 192 196 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 27 27 #define _DRIVER_PORTAUDIO_H_ 28 28 29 //#undef ROAR_HAVE_LIBPABLIO30 //#define ROAR_HAVE_LIBPORTAUDIO_V0_1931 32 29 #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) 34 31 #define _DRIVER_PORTAUDIO_CAN_OPERATE 35 32 #endif … … 41 38 #ifdef ROAR_HAVE_LIBPABLIO 42 39 PABLIO_Stream * ostream; 43 #elif defined(ROAR_HAVE_ LIBPORTAUDIO_V0_19)40 #elif defined(ROAR_HAVE_PA19_VERSION_19) 44 41 PaStream *stream; 45 42 int framesize;
Note: See TracChangeset
for help on using the changeset viewer.