Ejemplo n.º 1
0
        internal EqualizerBand(AudioEffect owner, int index)
        {
            Debug.Assert(owner != null);

            _owner = owner;
            _index = index;

            Log.Debug(PlayerLog.Tag, "frequency : " + Frequency + ", range : " + FrequencyRange);
        }
Ejemplo n.º 2
0
        internal EqualizerBand(AudioEffect owner, int index)
        {
            Debug.Assert(owner != null);

            _owner = owner;
            _index = index;

            Native.GetEqualizerBandFrequency(_owner.Player.Handle, _index, out var frequency).
            ThrowIfFailed(_owner.Player, "Failed to initialize equalizer band");

            Native.GetEqualizerBandFrequencyRange(_owner.Player.Handle, _index, out var range).
            ThrowIfFailed(_owner.Player, "Failed to initialize equalizer band");

            Frequency      = frequency;
            FrequencyRange = range;
            Log.Debug(PlayerLog.Tag, "frequency : " + frequency + ", range : " + range);
        }
Ejemplo n.º 3
0
        protected void Initialize()
        {
            if (_initialized)
            {
                throw new InvalidOperationException("It has already been initialized.");
            }

            if (Features.IsSupported(PlayerFeatures.AudioEffect))
            {
                _audioEffect = new AudioEffect(this);
            }

            RegisterEvents();

            _displaySettings = PlayerDisplaySettings.Create(this);

            _initialized = true;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Player"/> class.
        /// </summary>
        /// <since_tizen> 3 </since_tizen>
        public Player()
        {
            NativePlayer.Create(out _handle).ThrowIfFailed(null, "Failed to create player");

            Debug.Assert(_handle != null);

            if (Features.IsSupported(PlayerFeatures.AudioEffect))
            {
                _audioEffect = new AudioEffect(this);
            }

            if (Features.IsSupported(PlayerFeatures.RawVideo))
            {
                RegisterVideoFrameDecodedCallback();
            }

            DisplaySettings = PlayerDisplaySettings.Create(this);
        }