[PD-cvs] pd/portaudio_v18/pa_asio Callback_adaptation_.pdf,1.1.1.1,1.2 Pa_ASIO.pdf,1.1.1.1,1.2 pa_asio.cpp,1.2,1.3
Miller Puckette
millerpuckette at users.sourceforge.net
Mon Sep 6 22:20:31 CEST 2004
- Previous message: [PD-cvs] pd/portaudio_v18/docs index.html,1.1.1.1,1.2 pa_tut_mac_osx.html,1.1.1.1,1.2 portaudio_icmc2001.pdf,1.1.1.1,1.2
- Next message: [PD-cvs] pd/portaudio_v18/pa_beos PlaybackNode.cc,1.2,1.3 PlaybackNode.h,1.2,1.3 pa_beos_mk.cc,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pure-data/pd/portaudio_v18/pa_asio
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9652/portaudio_v18/pa_asio
Modified Files:
Callback_adaptation_.pdf Pa_ASIO.pdf pa_asio.cpp
Log Message:
checking in version 0.38test5.
Oops, I realize I forgot some more nice files, will add them and re-commit.
Index: pa_asio.cpp
===================================================================
RCS file: /cvsroot/pure-data/pd/portaudio_v18/pa_asio/pa_asio.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pa_asio.cpp 22 Feb 2004 16:21:30 -0000 1.2
--- pa_asio.cpp 6 Sep 2004 20:20:29 -0000 1.3
***************
*** 67,72 ****
30-06-03 The audio callback was not protected against reentrancy : some drivers (like the Hoontech DSP24) seems to cause this behaviour
that corrupted the buffer adapdation state and finally caused crashes. The reentrancy state is now checked in bufferSwitchTimeInfo : S Letz
!
! TO DO :
- Check Pa_StopSteam and Pa_AbortStream
--- 67,75 ----
30-06-03 The audio callback was not protected against reentrancy : some drivers (like the Hoontech DSP24) seems to cause this behaviour
that corrupted the buffer adapdation state and finally caused crashes. The reentrancy state is now checked in bufferSwitchTimeInfo : S Letz
! 17-07-03 Correct bug in Pa_ASIO_Convert_Inter_Output : parameter past_InputSampleFormat was used instead of past_OutputSampleFormat : J Maillard, S Letz
! 25-07-03 Use of atomic operations for reenterCounter management on Windows, need to be implemented on MacOS9 : S Letz
! 14-08-03 OutTime value in the audio callback was not updated correctly : S Letz
!
! TO DO :
- Check Pa_StopSteam and Pa_AbortStream
***************
*** 159,163 ****
ASIOCallbacks pahsc_asioCallbacks;
-
int32 pahsc_userInputBufferFrameOffset; // Position in Input user buffer
--- 162,165 ----
***************
*** 302,306 ****
#endif
-
static bool Pa_ASIO_loadAsioDriver(char *name)
{
--- 304,307 ----
***************
*** 312,316 ****
-
// Utilities for alignement buffer size computation
static int PGCD (int a, int b) {return (b == 0) ? a : PGCD (b,a%b);}
--- 313,316 ----
***************
*** 575,580 ****
sNumDevices++;
}
!
! }
}
}
--- 575,579 ----
sNumDevices++;
}
! }
}
}
***************
*** 669,672 ****
--- 668,682 ----
}
+ //----------------------------------------------------------------------------------
+ // Atomic increment and decrement operations
+ #if MAC
+ /* need to be implemented on Mac */
+ inline long Pa_AtomicIncrement(long* v) {return ++(*v);}
+ inline long Pa_AtomicDecrement(long* v) {return --(*v);}
+ #elif WINDOWS
+ inline long Pa_AtomicIncrement(long* v) {return InterlockedIncrement(v);}
+ inline long Pa_AtomicDecrement(long* v) {return InterlockedDecrement(v);}
+ #endif
+
//----------------------------------------------------------------------------------
***************
*** 726,732 ****
// Keep sample position
asioDriverInfo.pahsc_NumFramesDone = timeInfo->timeInfo.samplePosition.lo;
!
// Reentrancy control
! if( ++asioDriverInfo.reenterCount) {
asioDriverInfo.reenterError++;
DBUG(("bufferSwitchTimeInfo : reentrancy detection = %d\n", asioDriverInfo.reenterError));
--- 736,742 ----
// Keep sample position
asioDriverInfo.pahsc_NumFramesDone = timeInfo->timeInfo.samplePosition.lo;
!
// Reentrancy control
! if(Pa_AtomicIncrement(&asioDriverInfo.reenterCount)) {
asioDriverInfo.reenterError++;
DBUG(("bufferSwitchTimeInfo : reentrancy detection = %d\n", asioDriverInfo.reenterError));
***************
*** 752,756 ****
if (asioDriverInfo.pahsc_postOutput) ASIOOutputReady();
! }else {
/* CPU usage */
--- 762,766 ----
if (asioDriverInfo.pahsc_postOutput) ASIOOutputReady();
! }else{
/* CPU usage */
***************
*** 768,772 ****
}
! } while(asioDriverInfo.reenterCount--);
return 0L;
--- 778,782 ----
}
! } while(Pa_AtomicDecrement(&asioDriverInfo.reenterCount) >= 0);
return 0L;
***************
*** 1790,1793 ****
--- 1800,1805 ----
userResult = asioDriverInfo.past->past_Callback(past->past_InputBuffer, past->past_OutputBuffer,
past->past_FramesPerUserBuffer,past->past_FrameCount,past->past_UserData );
+
+ past->past_FrameCount += (PaTimestamp) past->past_FramesPerUserBuffer;
/* User callback has asked us to stop in the middle of the host buffer */
***************
*** 1862,1866 ****
asioDriverInfo.pahsc_userOutputBufferFrameOffset,
asioDriverInfo.pahsc_channelInfos[0].type,
! past->past_InputSampleFormat,
past->past_Flags,
index);
--- 1874,1878 ----
asioDriverInfo.pahsc_userOutputBufferFrameOffset,
asioDriverInfo.pahsc_channelInfos[0].type,
! past->past_OutputSampleFormat,
past->past_Flags,
index);
Index: Pa_ASIO.pdf
===================================================================
RCS file: /cvsroot/pure-data/pd/portaudio_v18/pa_asio/Pa_ASIO.pdf,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
Binary files /tmp/cvsOaso75 and /tmp/cvsPeqUw9 differ
Index: Callback_adaptation_.pdf
===================================================================
RCS file: /cvsroot/pure-data/pd/portaudio_v18/pa_asio/Callback_adaptation_.pdf,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
Binary files /tmp/cvs1scivd and /tmp/cvstZ84Zg differ
- Previous message: [PD-cvs] pd/portaudio_v18/docs index.html,1.1.1.1,1.2 pa_tut_mac_osx.html,1.1.1.1,1.2 portaudio_icmc2001.pdf,1.1.1.1,1.2
- Next message: [PD-cvs] pd/portaudio_v18/pa_beos PlaybackNode.cc,1.2,1.3 PlaybackNode.h,1.2,1.3 pa_beos_mk.cc,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pd-cvs
mailing list