From 22c00ec584b413374ad5a2c119592acaba5e799e Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Sat, 26 Apr 2014 14:39:15 -0400 Subject: [PATCH] Added new setStreamTime function; Documentation updates for 4.1.1 release. --- Makefile.in | 2 +- RtAudio.cpp | 10 +++++++++- RtAudio.h | 10 +++++++++- configure.ac | 2 +- doc/doxygen/Doxyfile | 2 +- doc/doxygen/compiling.txt | 10 +++++----- doc/doxygen/tutorial.txt | 22 ++++++++++++++++------ doc/release.txt | 8 +++++++- librtaudio.pc.in | 2 +- 9 files changed, 50 insertions(+), 18 deletions(-) diff --git a/Makefile.in b/Makefile.in index 74d648d..89cacdc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,7 +9,7 @@ OBJECTS = RtAudio.o @objects@ LIBNAME = librtaudio STATIC = $(LIBNAME).a SHARED = @sharedlib@ -RELEASE = 4.1.0 +RELEASE = 4.1.1 MAJOR = 4 LIBRARIES = $(STATIC) $(SHARED) diff --git a/RtAudio.cpp b/RtAudio.cpp index 9f12016..af7d205 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -38,7 +38,7 @@ */ /************************************************************************/ -// RtAudio: Version 4.1.1pre +// RtAudio: Version 4.1.1 #include "RtAudio.h" #include @@ -404,6 +404,14 @@ double RtApi :: getStreamTime( void ) #endif } +void RtApi :: setStreamTime( double time ) +{ + verifyStream(); + + if ( time >= 0.0 ) + stream_.streamTime = time; +} + unsigned int RtApi :: getStreamSampleRate( void ) { verifyStream(); diff --git a/RtAudio.h b/RtAudio.h index b4e43e3..57d2c8d 100644 --- a/RtAudio.h +++ b/RtAudio.h @@ -45,7 +45,7 @@ #ifndef __RTAUDIO_H #define __RTAUDIO_H -#define RTAUDIO_VERSION "4.1.1pre" +#define RTAUDIO_VERSION "4.1.1" #include #include @@ -538,6 +538,12 @@ class RtAudio */ double getStreamTime( void ); + //! Set the stream time to a time in seconds greater than or equal to 0.0. + /*! + If a stream is not open, an RtAudioError (type = INVALID_USE) will be thrown. + */ + void setStreamTime( double time ); + //! Returns the internal stream latency in sample frames. /*! The stream latency refers to delay in audio input and/or output @@ -686,6 +692,7 @@ public: long getStreamLatency( void ); unsigned int getStreamSampleRate( void ); virtual double getStreamTime( void ); + virtual void setStreamTime( double time ); bool isStreamOpen( void ) const { return stream_.state != STREAM_CLOSED; } bool isStreamRunning( void ) const { return stream_.state == STREAM_RUNNING; } void showWarnings( bool value ) { showWarnings_ = value; } @@ -830,6 +837,7 @@ inline bool RtAudio :: isStreamRunning( void ) const throw() { return rtapi_->is inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); } inline unsigned int RtAudio :: getStreamSampleRate( void ) { return rtapi_->getStreamSampleRate(); } inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); } +inline void RtAudio :: setStreamTime( double time ) { return rtapi_->setStreamTime( time ); } inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); } // RtApi Subclass prototypes. diff --git a/configure.ac b/configure.ac index 6c169b6..fa45967 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(RtAudio, 4.0, gary@music.mcgill.ca, rtaudio) +AC_INIT(RtAudio, 4.1, gary@music.mcgill.ca, rtaudio) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(RtAudio.cpp) AC_CONFIG_FILES([rtaudio-config librtaudio.pc Makefile tests/Makefile]) diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index d7081b8..46d07db 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -32,7 +32,7 @@ PROJECT_NAME = RtAudio # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 4.1.0 +PROJECT_NUMBER = 4.1.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer diff --git a/doc/doxygen/compiling.txt b/doc/doxygen/compiling.txt index 3fa52cc..53a06f7 100644 --- a/doc/doxygen/compiling.txt +++ b/doc/doxygen/compiling.txt @@ -65,7 +65,7 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to RtApiDs __WINDOWS_DS__ dsound.lib (ver. 5.0 or higher), multithreaded - compiler specific + MinGW: g++ -Wall -D__WINDOWS_DS__ -o audioprobe audioprobe.cpp RtAudio.cpp -lole32 -lwinmm -ldsound Windows @@ -73,20 +73,20 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to RtApiAsio __WINDOWS_ASIO__ various ASIO header and source files - compiler specific + MinGW: g++ -Wall -D__WINDOWS_ASIO__ -Iinclude -o audioprobe audioprobe.cpp RtAudio.cpp asio.cpp asiolist.cpp asiodrivers.cpp iasiothiscallresolver.cpp -lole32 Windows WASAPI RtApiWasapi __WINDOWS_WASAPI__ - various ASIO header and source files - compiler specific ... not currently working with MingW compiler + MinGW: FunctionDiscoveryKeys_devpkey.h, lksuser, luuid, lwinmm, lole32 + MinGW: g++ -Wall -D__WINDOWS_WASAPI__ -Iinclude -o audioprobe audioprobe.cpp RtAudio.cpp -lole32 -lwinmm -lksuser -luuid

-The example compiler statements above could be used to compile the audioprobe.cpp example file, assuming that audioprobe.cpp, RtAudio.h and RtAudio.cpp all exist in the same directory. +The example compiler statements above could be used to compile the audioprobe.cpp example file, assuming that audioprobe.cpp, RtAudio.h, RtAudio.cpp and any other necessary files all exist in the same directory or the include directory. */ diff --git a/doc/doxygen/tutorial.txt b/doc/doxygen/tutorial.txt index fc1a226..04b77d9 100644 --- a/doc/doxygen/tutorial.txt +++ b/doc/doxygen/tutorial.txt @@ -15,12 +15,21 @@ RtAudio is a set of C++ classes that provide a common API (Application Programmi RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. See the \ref apinotes section for information specific to each of the supported audio APIs. -\section whatsnew Latest Updates (Version 4.1.0) +\section whatsnew Latest Updates (Version 4.1.1) -A minor API change was made. The RtError class was renamed RtAudioError and embedded directly in RtAudio.h. Thus, all references to RtError should be renamed to RtAudioError and the RtError.h file should be deleted. +Changes in this release include: -Other changes in this release include: +- updates to WASAPI API for MinGW compiling +- WASAPI bug fixes for audio INPUT mode (thanks to Marcus Tomlinson) +- DirectSound bug fix for INPUT mode +- Bug fixes in Core, Jack, ASIO and DS for internal draining in INPUT mode +- updates to test programs for default device specifiers +- CMake buildfile update for WASAPI +- new setStreamTime function +Changes in the previous 4.1.0 release included: + +- RtError class renamed RtAudioError and embedded in RtAudio.h (RtError.h deleted) - new support for the Windows WASAPI API (thanks to Marcus Tomlinson) - CMake support (thanks to Berkus Decker) - pulse audio update to support bufferFrames argument with audio input (thanks to Jonatan Wallmander) @@ -31,7 +40,7 @@ Other changes in this release include: \section download Download -Latest Release (10 April 2014): Version 4.1.0 +Latest Release (26 April 2014): Version 4.1.1 \section documentation Documentation Links @@ -46,8 +55,9 @@ Latest Release (10 April 2014): Bug Tracker (out of date) --# Possible Updates (out of date) -# RtAudio on GitHub */ + +-# Bug Tracker (out of date) +-# Possible Updates (out of date) diff --git a/doc/release.txt b/doc/release.txt index d43f697..9dc44a3 100644 --- a/doc/release.txt +++ b/doc/release.txt @@ -2,8 +2,14 @@ RtAudio - a set of C++ classes that provide a common API for realtime audio inpu By Gary P. Scavone, 2001-2014. -v4.1.1pre: (??) +v4.1.1: (26 April 2014) - updates to WASAPI API for MinGW compiling +- WASAPI bug fixes for audio INPUT mode +- DirectSound bug fix for INPUT mode +- Bug fixes in Core, Jack, ASIO and DS for internal draining in INPUT mode +- updates to test programs for default device specifiers +- CMake buildfile update for WASAPI +- new setStreamTime function v4.1.0: (10 April 2014) - RtError class renamed RtAudioError and embedded in RtAudio.h (RtError.h deleted) diff --git a/librtaudio.pc.in b/librtaudio.pc.in index f22a718..45c3f4e 100644 --- a/librtaudio.pc.in +++ b/librtaudio.pc.in @@ -5,7 +5,7 @@ includedir=${prefix}/include Name: librtaudio Description: RtAudio - a set of C++ classes that provide a common API for realtime audio input/output -Version: 4.1.0 +Version: 4.1.1 Requires: @req@ Libs: -L${libdir} -lrtaudio Libs.private: -lpthread