コード例 #1
0
        internal NativeR128Analyzer(uint channels, uint sampleRate, GroupToken groupToken)
        {
            Contract.Requires(channels > 0);
            Contract.Requires(groupToken != null);
            Contract.Ensures(_channels == channels);
            Contract.Ensures(_groupToken == groupToken);
            Contract.Ensures(_handle != null);
            Contract.Ensures(!_handle.IsInvalid);
            Contract.Ensures(_groupState != null);

            _channels   = channels;
            _groupToken = groupToken;
            _handle     = SafeNativeMethods.Initialize(channels, sampleRate, Mode.Global | Mode.SamplePeak);
            _groupState = _globalHandles.GetOrAdd(groupToken, new NativeR128GroupState());
            _groupState.Handles.Add(_handle);
        }
コード例 #2
0
 internal static extern Ebur128Error GetLoudness(NativeStateHandle handle, out double result);
コード例 #3
0
 internal static extern Ebur128Error GetSamplePeak(NativeStateHandle handle, uint channel, out double result);
コード例 #4
0
 internal static extern Ebur128Error AddFrames(NativeStateHandle handle, float[] source, UIntPtr count);