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(); } }
protected override void 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); if (pending_volume >= 0) { Volume = (ushort)pending_volume; } InstallPreferences(); ReplayGainEnabled = ReplayGainEnabledSchema.Get(); }
protected override void Initialize() { playbin = ElementFactory.Make("playbin", "the playbin"); next_track_set = new ManualResetEvent(false); audio_sink = new AudioSinkBin("audiobin"); playbin["audio-sink"] = audio_sink; if (audio_sink.VolumeNeedsSaving) { // Remember the volume from last time Volume = (ushort)PlayerEngineService.VolumeSchema.Get(); } visualization = new Visualization(audio_sink); playbin.AddNotification("volume", OnVolumeChanged); playbin.Bus.AddWatch(OnBusMessage); cdda_manager = new CddaManager(playbin); dvd_manager = new DvdManager(playbin); video_manager = new VideoManager(playbin); video_manager.PrepareWindow += OnVideoPrepareWindow; video_manager.Initialize(); dvd_manager.FindNavigation(playbin); OnStateChanged(PlayerState.Ready); InstallPreferences(); audio_sink.ReplayGainEnabled = ReplayGainEnabledSchema.Get(); GaplessEnabled = GaplessEnabledSchema.Get(); }
private void InstallPreferences() { PreferenceService service = ServiceManager.Get <PreferenceService> (); if (service == null) { return; } replaygain_preference = service["general"]["misc"].Add(new SchemaPreference <bool> (ReplayGainEnabledSchema, Catalog.GetString("_Enable ReplayGain correction"), Catalog.GetString("For tracks that have ReplayGain data, automatically scale (normalize) playback volume"), delegate { ReplayGainEnabled = ReplayGainEnabledSchema.Get(); } )); gapless_preference = service["general"]["misc"].Add(new SchemaPreference <bool> (GaplessEnabledSchema, Catalog.GetString("Enable _gapless playback"), Catalog.GetString("Eliminate the small playback gap on track change. Useful for concept albums and classical music"), delegate { GaplessEnabled = GaplessEnabledSchema.Get(); } )); }
protected override void Initialize() { base.Initialize(); InstallPreferences(); audio_sink.ReplayGainEnabled = ReplayGainEnabledSchema.Get(); }
private void InstallPreferences() { PreferenceService service = ServiceManager.Get <PreferenceService> (); if (service == null) { return; } replaygain_preference = service["general"]["misc"].Add(new SchemaPreference <bool> (ReplayGainEnabledSchema, Catalog.GetString("_Enable ReplayGain correction"), Catalog.GetString("For tracks that have ReplayGain data, automatically scale (normalize) playback volume"), delegate { audio_sink.ReplayGainEnabled = ReplayGainEnabledSchema.Get(); } )); }