projects
/
rtaudio-cdist.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #47 from radarsat1/fix-version
[rtaudio-cdist.git]
/
RtAudio.cpp
diff --git
a/RtAudio.cpp
b/RtAudio.cpp
old mode 100755
(executable)
new mode 100644
(file)
index
6fe26d0
..
882fa0e
--- a/
RtAudio.cpp
+++ b/
RtAudio.cpp
@@
-10,7
+10,7
@@
RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/
\r
\r
RtAudio: realtime audio i/o C++ classes
\r
RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/
\r
\r
RtAudio: realtime audio i/o C++ classes
\r
- Copyright (c) 2001-201
4
Gary P. Scavone
\r
+ Copyright (c) 2001-201
6
Gary P. Scavone
\r
\r
Permission is hereby granted, free of charge, to any person
\r
obtaining a copy of this software and associated documentation files
\r
\r
Permission is hereby granted, free of charge, to any person
\r
obtaining a copy of this software and associated documentation files
\r
@@
-38,7
+38,7
@@
*/
\r
/************************************************************************/
\r
\r
*/
\r
/************************************************************************/
\r
\r
-// RtAudio: Version 4.1.
1
\r
+// RtAudio: Version 4.1.
2
\r
\r
#include "RtAudio.h"
\r
#include <iostream>
\r
\r
#include "RtAudio.h"
\r
#include <iostream>
\r
@@
-5158,10
+5158,10
@@
void RtApiWasapi::wasapiThread()
// if the callback buffer was pushed renderBuffer reset callbackPulled flag
\r
if ( callbackPushed ) {
\r
callbackPulled = false;
\r
// if the callback buffer was pushed renderBuffer reset callbackPulled flag
\r
if ( callbackPushed ) {
\r
callbackPulled = false;
\r
+ // tick stream time
\r
+ RtApi::tickStreamTime();
\r
}
\r
\r
}
\r
\r
- // tick stream time
\r
- RtApi::tickStreamTime();
\r
}
\r
\r
Exit:
\r
}
\r
\r
Exit:
\r
@@
-6438,6
+6438,7
@@
void RtApiDs :: callbackEvent()
if ( FAILED( result ) ) {
\r
errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current write position!";
\r
errorText_ = errorStream_.str();
\r
if ( FAILED( result ) ) {
\r
errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current write position!";
\r
errorText_ = errorStream_.str();
\r
+ MUTEX_UNLOCK( &stream_.mutex );
\r
error( RtAudioError::SYSTEM_ERROR );
\r
return;
\r
}
\r
error( RtAudioError::SYSTEM_ERROR );
\r
return;
\r
}
\r
@@
-8070,7
+8071,7
@@
static void *alsaCallbackHandler( void *ptr )
bool *isRunning = &info->isRunning;
\r
\r
#ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread)
\r
bool *isRunning = &info->isRunning;
\r
\r
#ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread)
\r
- if (
&
info->doRealtime ) {
\r
+ if ( info->doRealtime ) {
\r
pthread_t tID = pthread_self(); // ID of this thread
\r
sched_param prio = { info->priority }; // scheduling priority of thread
\r
pthread_setschedparam( tID, SCHED_RR, &prio );
\r
pthread_t tID = pthread_self(); // ID of this thread
\r
sched_param prio = { info->priority }; // scheduling priority of thread
\r
pthread_setschedparam( tID, SCHED_RR, &prio );
\r
@@
-8522,7
+8523,7
@@
bool RtApiPulse::probeDeviceOpen( unsigned int device, StreamMode mode,
}
\r
break;
\r
case OUTPUT:
\r
}
\r
break;
\r
case OUTPUT:
\r
- pah->s_play = pa_simple_new( NULL,
"RtAudio"
, PA_STREAM_PLAYBACK, NULL, "Playback", &ss, NULL, NULL, &error );
\r
+ pah->s_play = pa_simple_new( NULL,
streamName.c_str()
, PA_STREAM_PLAYBACK, NULL, "Playback", &ss, NULL, NULL, &error );
\r
if ( !pah->s_play ) {
\r
errorText_ = "RtApiPulse::probeDeviceOpen: error connecting output to PulseAudio server.";
\r
goto error;
\r
if ( !pah->s_play ) {
\r
errorText_ = "RtApiPulse::probeDeviceOpen: error connecting output to PulseAudio server.";
\r
goto error;
\r
@@
-10142,8
+10143,8
@@
void RtApi :: convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info
\r
void RtApi :: byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format )
\r
{
\r
\r
void RtApi :: byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format )
\r
{
\r
-
register
char val;
\r
-
register
char *ptr;
\r
+ char val;
\r
+ char *ptr;
\r
\r
ptr = buffer;
\r
if ( format == RTAUDIO_SINT16 ) {
\r
\r
ptr = buffer;
\r
if ( format == RTAUDIO_SINT16 ) {
\r