Show
Ignore:
Timestamp:
10/26/02 02:04:26 (6 years ago)
Author:
rossbencina
Message:

added PaStreamCallbackFlags? type for callback flags

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pa_proposals/trunk/001-UnderflowOverflowHandling.html

    r4 r55  
    1818<P><A href="index.html">Enhancement Proposals Index</A>, 
    1919<A href="http://www.portaudio.com/">PortAudio Home Page</A></P> 
    20 <P>Updated: July 23, 2002 </P> 
     20<P>Updated: October 26, 2002 </P> 
    2121 
    2222<H4>Status</H4> 
     
    5454 
    5555<P> 
    56 A new parameter will be added to the Stream Callback Function that gives the status of the data as bit flags.  
     56A new parameter and corresponding type will be added to the Stream Callback Function that gives the status of the data as bit flags.  
    5757</P> 
    5858 
    5959<PRE> 
     60typedef unsigned long PaStreamCallbackFlags; 
     61 
    6062typedef int (PaStreamCallback)( 
    6163  void *inputBuffer, void *outputBuffer, 
    6264  unsigned long framesPerBuffer, 
    6365  PaTimestamp outTime,  
    64   unsigned long statusFlags, 
     66  PaStreamCallbackFlags statusFlags, 
    6567  void *userData ); 
    6668</PRE> 
     
    6971 
    7072<PRE> 
    71 #define paInputUnderflow&nbsp;&nbsp; (1&lt;&lt;0) /* Input data is all zeros because no real data is available. */  
    72 #define paInputOverflow    (1&lt;&lt;1) /* Input data was discarded by PortAudio */ 
    73 #define paOutputUnderflow  (1&lt;&lt;2) /* Output data was inserted by PortAudio because the callback is using too much CPU */ 
    74 #define paOutputOverflow   (1&lt;&lt;3) /* Output data will be discarded because no room is available. */</PRE> 
     73#define paInputUnderflow&nbsp;&nbsp; ((PaStreamCallbackFlags)0x01) /* Input data is all zeros because no real data is available. */  
     74#define paInputOverflow    ((PaStreamCallbackFlags)0x02) /* Input data was discarded by PortAudio */ 
     75#define paOutputUnderflow  ((PaStreamCallbackFlags)0x04) /* Output data was inserted by PortAudio because the callback is using too much CPU */ 
     76#define paOutputOverflow   ((PaStreamCallbackFlags)0x08) /* Output data will be discarded because no room is available. */</PRE> 
    7577 
    7678<P>New rules will govern when the Stream Callback is called:</P>