Example #1
0
 void _auGraph_RenderCallback(object sender, AudioGraphEventArgs e)
 {
     // is Post Render ?
     if ((e.ActionFlags & AudioUnit.AudioUnitRenderActionFlags.kAudioUnitRenderAction_PostRender) != 0)
     {
         /*
          * if (_isRecording)
          * {
          *  // reading buffer
          *  _extAudioFile.WriteAsync(e.NumberFrames, e.Data);
          * }*/
     }
 }
Example #2
0
        static int renderCallback(IntPtr inRefCon,
					  ref AudioUnitRenderActionFlags _ioActionFlags,
					  ref AudioTimeStamp _inTimeStamp,
					  int _inBusNumber,
					  int _inNumberFrames,
					  AudioBufferList _ioData)
        {
            // getting audiounit instance
            var handler = GCHandle.FromIntPtr(inRefCon);
            var inst = (AUGraph)handler.Target;

            // invoke event handler with an argument
            if (inst.RenderCallback != null){
                var args = new AudioGraphEventArgs(
                    _ioActionFlags,
                    _inTimeStamp,
                    _inBusNumber,
                    _inNumberFrames,
                    _ioData);
                inst.RenderCallback(inst, args);
            }

            return 0; // noerror
        }
Example #3
0
#pragma warning disable 0612
        void HandleRenderCallback(object sender, AudioGraphEventArgs e)
        {
            graphRenderCallbackCount++;
        }