]> Repos - portaudio/commitdiff
added implementation of PaHost_IsInitialized()
authorrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Wed, 17 Apr 2002 06:29:07 +0000 (06:29 +0000)
committerrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Wed, 17 Apr 2002 06:29:07 +0000 (06:29 +0000)
migrated PaHost_GetStreamRepresentation() from pa_win_wmme.c

pa_common/pa_lib.c

index 2c7c41c4466a352317b281c1f316b02610bd8293..1c6e82f811559f8f95e56636494ab5f070391aa7 100644 (file)
@@ -478,6 +478,17 @@ double Pa_GetCPULoad(  PortAudioStream* stream)
     return past->past_Usage;
 }
 
+/*************************************************************************/
+internalPortAudioStream* PaHost_GetStreamRepresentation( PortAudioStream *stream )
+{
+    internalPortAudioStream* result = (internalPortAudioStream*) stream;
+
+    if( result == NULL || result->past_Magic != PA_MAGIC )
+        return NULL;
+    else
+        return result;
+}
+
 /*************************************************************
 ** Calculate 2 LSB dither signal with a triangular distribution.
 ** Ranged properly for adding to a 32 bit integer prior to >>15.
@@ -754,6 +765,11 @@ PaError Pa_Terminate( void )
     return result;
 }
 
+int PaHost_IsInitialized()
+{
+    return gInitCount;
+}
+
 /*************************************************************************/
 PaError Pa_GetSampleSize( PaSampleFormat format )
 {