Пример #1
0
        protected override void Initialize()
        {
            if (ServiceManager.Get <Banshee.GStreamer.Service> () == null)
            {
                var service = new Banshee.GStreamer.Service();
                ((IExtensionService)service).Initialize();
            }

            if (!bp_initialize_pipeline(handle))
            {
                bp_destroy(handle);
                handle = new HandleRef(this, IntPtr.Zero);
                throw new ApplicationException(Catalog.GetString("Could not initialize GStreamer library"));
            }

            OnStateChanged(PlayerState.Ready);

            InstallPreferences();
            ReplayGainEnabled = ReplayGainEnabledSchema.Get();
            GaplessEnabled    = GaplessEnabledSchema.Get();
            Log.InformationFormat("GStreamer version {0}, gapless: {1}, replaygain: {2}", gstreamer_version_string(), GaplessEnabled, ReplayGainEnabled);

            is_initialized = true;

            if (!bp_audiosink_has_volume(handle))
            {
                Volume = (ushort)PlayerEngineService.VolumeSchema.Get();
            }
        }
Пример #2
0
        protected override void Initialize ()
        {
            if (ServiceManager.Get<Banshee.GStreamer.Service> () == null) {
                var service = new Banshee.GStreamer.Service ();
                ((IExtensionService)service).Initialize ();
            }

            if (!bp_initialize_pipeline (handle)) {
                bp_destroy (handle);
                handle = new HandleRef (this, IntPtr.Zero);
                throw new ApplicationException (Catalog.GetString ("Could not initialize GStreamer library"));
            }

            OnStateChanged (PlayerState.Ready);

            InstallPreferences ();
            ReplayGainEnabled = ReplayGainEnabledSchema.Get ();
            GaplessEnabled = GaplessEnabledSchema.Get ();
            Log.InformationFormat ("GStreamer version {0}, gapless: {1}, replaygain: {2}", gstreamer_version_string (), GaplessEnabled, ReplayGainEnabled);

            is_initialized = true;

            if (!bp_audiosink_has_volume (handle)) {
                Volume = (ushort)PlayerEngineService.VolumeSchema.Get ();
            }
        }