public SessionStatus GetSessionStatus() { var s = new WasapiIoSessionStatus(); if (!WasapiIO_GetSessionStatus(mId, out s)) { return(null); } return(new SessionStatus((StreamType)s.streamType, s.pcmDataSampleRate, s.deviceSampleRate, (SampleFormatType)s.deviceSampleFormat, s.deviceBytesPerFrame, s.deviceNumChannels, s.timePeriodHandledNanosec, s.bufferFrameNum)); }
private static extern bool WasapiIO_GetSessionStatus(int instanceId, out WasapiIoSessionStatus a);
WasapiIO_GetSessionStatus(int instanceId, out WasapiIoSessionStatus a);
public SessionStatus GetSessionStatus() { var s = new WasapiIoSessionStatus(); if (!WasapiIO_GetSessionStatus(mId, out s)) { return null; } return new SessionStatus((StreamType)s.streamType, s.pcmDataSampleRate, s.deviceSampleRate, (SampleFormatType)s.deviceSampleFormat, s.deviceBytesPerFrame, s.deviceNumChannels, s.timePeriodHandledNanosec, s.bufferFrameNum); }