Esempio n. 1
0
        /// <summary>
        ///     Starts recording.
        /// </summary>
        /// <param name="freq">The sample rate to record at. </param>
        /// <param name="channels">The number of channels... 1 = mono, 2 = stereo, etc. </param>
        /// <param name="configs">Configures of recording.</param>
        /// <param name="period">
        ///     The period (in milliseconds) between calls to the callback function. The minimum period is 5ms,
        ///     the maximum is half the BASS_CONFIG_REC_BUFFER setting. If the period specified is outside this range, it is
        ///     automatically capped. The default is 100ms.
        /// </param>
        /// <returns>A record.</returns>
        public static Record Start(uint freq, uint channels, RecordInitializationConfig configs, ushort period)
        {
            Record result = new Record();

            result.SetHandle(
                RecordModule.RecordStartFunction.CheckResult(RecordModule.RecordStartFunction.Delegate(freq, channels,
                                                                                                       (uint)((uint)configs | period << 16), result.RecordHandler, IntPtr.Zero)));

            return(result);
        }
Esempio n. 2
0
        /// <summary>
        ///     Starts recording.
        /// </summary>
        /// <param name="freq">The sample rate to record at. </param>
        /// <param name="channels">The number of channels... 1 = mono, 2 = stereo, etc. </param>
        /// <param name="configs">Configures of recording.</param>
        /// <param name="period">
        ///     The period (in milliseconds) between calls to the callback function. The minimum period is 5ms,
        ///     the maximum is half the BASS_CONFIG_REC_BUFFER setting. If the period specified is outside this range, it is
        ///     automatically capped. The default is 100ms.
        /// </param>
        /// <returns>A record.</returns>
        public static Record Start(uint freq, uint channels, RecordInitializationConfig configs, ushort period)
        {
            Record result = new Record();

            result.SetHandle(
                RecordModule.RecordStartFunction.CheckResult(RecordModule.RecordStartFunction.Delegate(freq, channels,
                    (uint) ((uint) configs | period << 16), result.RecordHandler, IntPtr.Zero)));

            return result;
        }