mirror of
https://github.com/4sval/FModel.git
synced 2026-04-23 01:57:48 -05:00
fixed audio player not using the saved volume
This commit is contained in:
parent
b4551396b4
commit
9fdd2a866e
|
|
@ -58,8 +58,11 @@ namespace FModel.Discord
|
|||
|
||||
public static void Restore()
|
||||
{
|
||||
_client.SetPresence(_presence);
|
||||
_client.Invoke();
|
||||
if (_presence != null)
|
||||
{
|
||||
_client.SetPresence(_presence);
|
||||
_client.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SaveCurrentPresence() => _presence = _client.CurrentPresence;
|
||||
|
|
|
|||
|
|
@ -41,8 +41,10 @@ namespace FModel
|
|||
public const string Yellow = "#E5C07B";
|
||||
public const string Purple = "#C678DD";
|
||||
public const string Blue = "#61AFEF";
|
||||
public const string Discord = "#8B9BD4";
|
||||
public const string Green = "#98C379";
|
||||
public const string LightGray = "#BBBBBB";
|
||||
public const string DarkGray = "#9B9B9B";
|
||||
public const string White = "#EFEFEF";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
13
FModel/PakReader/Parsers/Objects/FFloatCurve.cs
Normal file
13
FModel/PakReader/Parsers/Objects/FFloatCurve.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
namespace PakReader.Parsers.Objects
|
||||
{
|
||||
public readonly struct FFloatCurve : IUStruct
|
||||
{
|
||||
/** Curve data for float. */
|
||||
public readonly FRichCurveKey[] FloatCurve; // actually FRichCurve
|
||||
|
||||
internal FFloatCurve(PackageReader reader)
|
||||
{
|
||||
FloatCurve = reader.ReadTArray(() => new FRichCurveKey(reader));
|
||||
}
|
||||
}
|
||||
}
|
||||
16
FModel/PakReader/Parsers/Objects/FRawCurveTracks.cs
Normal file
16
FModel/PakReader/Parsers/Objects/FRawCurveTracks.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
namespace PakReader.Parsers.Objects
|
||||
{
|
||||
public readonly struct FRawCurveTracks : IUStruct
|
||||
{
|
||||
public readonly FFloatCurve[] FloatCurves;
|
||||
public readonly FVectorCurve[] VectorCurves;
|
||||
public readonly FTransformCurve[] TransformCurves;
|
||||
|
||||
internal FRawCurveTracks(PackageReader reader)
|
||||
{
|
||||
FloatCurves = reader.ReadTArray(() => new FFloatCurve(reader));
|
||||
VectorCurves = reader.ReadTArray(() => new FVectorCurve(reader));
|
||||
TransformCurves = reader.ReadTArray(() => new FTransformCurve(reader));
|
||||
}
|
||||
}
|
||||
}
|
||||
13
FModel/PakReader/Parsers/Objects/FTransformCurve.cs
Normal file
13
FModel/PakReader/Parsers/Objects/FTransformCurve.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
namespace PakReader.Parsers.Objects
|
||||
{
|
||||
public readonly struct FTransformCurve : IUStruct
|
||||
{
|
||||
/** Curve data for each transform. */
|
||||
public readonly FVectorCurve TranslationCurve;
|
||||
|
||||
internal FTransformCurve(PackageReader reader)
|
||||
{
|
||||
TranslationCurve = new FVectorCurve(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
FModel/PakReader/Parsers/Objects/FVectorCurve.cs
Normal file
17
FModel/PakReader/Parsers/Objects/FVectorCurve.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
namespace PakReader.Parsers.Objects
|
||||
{
|
||||
public readonly struct FVectorCurve : IUStruct
|
||||
{
|
||||
/** Curve data for float. */
|
||||
public readonly FRichCurveKey[] FloatCurves; // actually FRichCurve
|
||||
|
||||
internal FVectorCurve(PackageReader reader)
|
||||
{
|
||||
FloatCurves = new FRichCurveKey[3];
|
||||
for (int i = 0; i < FloatCurves.Length; i++)
|
||||
{
|
||||
FloatCurves[i] = new FRichCurveKey(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -51,6 +51,7 @@ namespace PakReader.Parsers.Objects
|
|||
"VectorMaterialInput" => new FVectorMaterialInput(reader),
|
||||
"ColorMaterialInput" => new FColorMaterialInput(reader),
|
||||
"ExpressionInput" => new FMaterialInput(reader),
|
||||
//"RawCurveTracks" => new FRawCurveTracks(reader),
|
||||
_ => new UObject(reader, true),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
2
FModel/Properties/Resources.Designer.cs
generated
2
FModel/Properties/Resources.Designer.cs
generated
|
|
@ -770,7 +770,7 @@ namespace FModel.Properties {
|
|||
/// <summary>
|
||||
/// Recherche une chaîne localisée semblable à • Yanteh • Maiky
|
||||
///• FunGames • HYPEX
|
||||
///• Alexander.
|
||||
///• Alexander • Netu.
|
||||
/// </summary>
|
||||
public static string DonatorsFDetails {
|
||||
get {
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ It's now the most used free software to leak on Fortnite.</value>
|
|||
<data name="DonatorsFDetails" xml:space="preserve">
|
||||
<value>• Yanteh • Maiky
|
||||
• FunGames • HYPEX
|
||||
• Alexander</value>
|
||||
• Alexander • Netu</value>
|
||||
<comment>Do not translate</comment>
|
||||
</data>
|
||||
<data name="DownloadError" xml:space="preserve">
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
|
|
@ -95,18 +96,22 @@ namespace FModel.ViewModels.MenuItem
|
|||
};
|
||||
|
||||
customGoTos.Add(newDir);
|
||||
Properties.Settings.Default.CustomGoTos = JsonConvert.SerializeObject(MenuItems.customGoTos.Skip(2), Formatting.None);
|
||||
Properties.Settings.Default.CustomGoTos = JsonConvert.SerializeObject(customGoTos.Skip(2), Formatting.None);
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
// PLEASE DON'T USE THIS FOR BACKUP FILES
|
||||
// comment methods you don't use, thx
|
||||
public static bool AtLeastOnePak(this ObservableCollection<dynamic> o) => o.Any(x => !x.GetType().Equals(typeof(Separator)) && x.PakFile != null);
|
||||
public static IEnumerable<PakMenuItemViewModel> GetMenuItemWithPakFiles(this ObservableCollection<dynamic> o) => o.Where(x => !x.GetType().Equals(typeof(Separator)) && x.PakFile != null).Select(x => (PakMenuItemViewModel)x);
|
||||
public static int GetPakCount(this ObservableCollection<dynamic> o) => o.GetMenuItemWithPakFiles().Count();
|
||||
public static IEnumerable<PakFileReader> GetPakFileReaders(this ObservableCollection<dynamic> o) => o.GetMenuItemWithPakFiles().Select(x => x.PakFile);
|
||||
//public static IEnumerable<PakFileReader> GetStaticPakFileReaders(this ObservableCollection<dynamic> o) => o.GetPakFileReaders().Where(x => x.Info.EncryptionKeyGuid.Equals(new FGuid(0u, 0u, 0u, 0u)));
|
||||
public static IEnumerable<PakFileReader> GetDynamicPakFileReaders(this ObservableCollection<dynamic> o) => o.GetPakFileReaders().Where(x => !x.Info.EncryptionKeyGuid.Equals(new FGuid(0u, 0u, 0u, 0u)));
|
||||
public static bool AtLeastOnePak(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.Any(x => !x.GetType().Equals(typeof(Separator)) && x.PakFile != null));
|
||||
public static IEnumerable<PakMenuItemViewModel> GetMenuItemWithPakFiles(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.Where(x => !x.GetType().Equals(typeof(Separator)) && x.PakFile != null).Select(x => (PakMenuItemViewModel)x));
|
||||
public static int GetPakCount(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetMenuItemWithPakFiles().Count());
|
||||
public static IEnumerable<PakFileReader> GetPakFileReaders(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetMenuItemWithPakFiles().Select(x => x.PakFile));
|
||||
public static IEnumerable<PakFileReader> GetDynamicPakFileReaders(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetPakFileReaders().Where(x => !x.Info.EncryptionKeyGuid.Equals(new FGuid(0u, 0u, 0u, 0u))));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace FModel.ViewModels.SoundPlayer
|
|||
private string _content;
|
||||
private string _bytes;
|
||||
private string _duration;
|
||||
private float _volume = float.Parse(Properties.Settings.Default.AudioPlayerVolume, CultureInfo.InvariantCulture.NumberFormat);
|
||||
private float _volume = float.Parse(Properties.Settings.Default.AudioPlayerVolume);
|
||||
|
||||
public ObservableCollection<Device> Devices
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,8 +82,7 @@ namespace FModel.Windows.SoundPlayer
|
|||
|
||||
private void UpdateVolume(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (output.HasMedia)
|
||||
output.Volume = InputFileVm.inputFileViewModel.Volume;
|
||||
if (output.HasMedia) output.Volume = InputFileVm.inputFileViewModel.Volume;
|
||||
}
|
||||
|
||||
private void OnPlayPauseClick(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace FModel.Windows.SoundPlayer.Visualization
|
|||
}
|
||||
}
|
||||
|
||||
private float volume = InputFileVm.inputFileViewModel.Volume;
|
||||
private float volume = float.Parse(Properties.Settings.Default.AudioPlayerVolume);
|
||||
public float Volume
|
||||
{
|
||||
get { return _soundOut == null ? 0.0f : _soundOut.Volume; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user