/// <summary> /// Set all filters on the equalizer to zero gain. /// Calls the <see cref="EqualizerChanged"/> event handler. /// </summary> public void ZeroOutEqualizer() { if (CurrentFile == null) { return; } // turn of write-through until the last filter has been updated CurrentFile.WriteThrough = false; // set gain to zero for all filters SortedList <double, Filter> filters = CurrentFile.ReadFilters(); for (int i = 0; i < filters.Count; i++) { KeyValuePair <double, Filter> pair = filters.ElementAt(i); pair.Value.Gain = 0; } // enable write-through and save CurrentFile.WriteThrough = true; CurrentFile.ForceSave(); }