Skip to content

Commit

Permalink
Release 5.03.2394.5
Browse files Browse the repository at this point in the history
  • Loading branch information
martin211 committed Feb 10, 2024
2 parents 8118d79 + c2071f0 commit a3ad963
Show file tree
Hide file tree
Showing 45 changed files with 567 additions and 151 deletions.
4 changes: 2 additions & 2 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
Expand Down Expand Up @@ -207,4 +207,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branches:
develop:
regex: ^develop
mode: ContinuousDeployment
tag: 'preview'
tag: 'alpha'
increment: None
prevent-increment-of-merged-branch-version: true
track-merge-target: false
Expand All @@ -28,4 +28,4 @@ branches:
prevent-increment-of-merged-branch-version: true
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
is-release-branch: true
25 changes: 19 additions & 6 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,16 @@ string BuildNumber
.Executes(() =>
{
NuGetTasks.NuGetRestore(c => c.SetTargetPath(Solution));
MSBuild(s => s
.SetProcessToolPath(MsBuildPath)
var settings = new MSBuildSettings();
if (!string.IsNullOrWhiteSpace(MsBuildPath))
settings = settings.SetProcessToolPath(MsBuildPath);
settings = settings
.SetTargetPath(Solution)
.SetTargets("Restore"));
.SetTargets("Restore");
MSBuild(settings);
});

Target Version => _ => _
Expand All @@ -160,6 +166,7 @@ string BuildNumber
GetVersion();
Log.Information("Version: {_version}", _version);
Log.Information("Build number: {ver}", _buildNumber);
var assemblyInfo = SourceDirectory / "AssemblyInfo.cs";
if (File.Exists(assemblyInfo))
{
Expand All @@ -184,8 +191,12 @@ string BuildNumber
.Triggers(UpdateBuildNumber)
.Executes(() =>
{
MSBuild(s => s
.SetProcessToolPath(MsBuildPath)
var settings = new MSBuildSettings();
if (!string.IsNullOrWhiteSpace(MsBuildPath))
settings = settings.SetProcessToolPath(MsBuildPath);
settings = settings
.SetTargetPath(Solution)
.SetTargets("Rebuild")
.SetConfiguration(GetConfiguration())
Expand All @@ -194,7 +205,9 @@ string BuildNumber
.SetInformationalVersion($"{_version}-{GitRepository.Commit}")
.SetMaxCpuCount(Environment.ProcessorCount)
.SetNodeReuse(IsLocalBuild)
.SetTargetPlatform(TargetPlatform));
.SetTargetPlatform(TargetPlatform);
MSBuild(settings);
});

private Configuration GetConfiguration()
Expand Down
7 changes: 7 additions & 0 deletions build_publish.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:; set -eo pipefail
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
:; ${SCRIPT_DIR}/build.sh "$@"
:; exit $?

@ECHO OFF
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %* Compile --MsBuildPath ''
50 changes: 50 additions & 0 deletions src/Plugins/dotnet_demo/Extension/ExtensionPlaybackQueue.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using AIMP.SDK;
using AIMP.SDK.Player.Extensions;
using AIMP.SDK.Player.Objects;
using AIMP.SDK.Playlist.Objects;

namespace DemoPlugin.Extension
{
public class ExtensionPlaybackQueue : IAimpExtensionPlaybackQueue
{
private readonly IAimpPlayer _player;

public ExtensionPlaybackQueue(IAimpPlayer player)
{
_player = player;
}

public AimpActionResult GetNext(object current, PlaybackQueueFlags flags, IAimpPlaybackQueueItem queueItem)
{
if (queueItem.PlaylistItem != null)
{
System.Diagnostics.Debugger.Break();
}

return new AimpActionResult(ActionResultType.OK);
}

public AimpActionResult GetPrev(object current, PlaybackQueueFlags flags, IAimpPlaybackQueueItem queueItem)
{
if (queueItem.PlaylistItem != null)
{
System.Diagnostics.Debugger.Break();
}

return new AimpActionResult(ActionResultType.OK);
}

public void OnSelect(IAimpPlaylistItem item, IAimpPlaybackQueueItem queueItem)
{
if (queueItem.PlaylistItem != null)
{
System.Diagnostics.Debugger.Break();
}
}

public AimpActionResult<PlaybackQueueInfo> GetInfo(IAimpPlaylistItem item)
{
return new AimpActionResult<PlaybackQueueInfo>(ActionResultType.OK);
}
}
}
2 changes: 1 addition & 1 deletion src/Plugins/dotnet_demo/PlayerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public PlayerForm(IAimpPlayer player, MessageHook coreMessage)

coreMessage.OnCoreMessage += (message, param1, param2) =>
{
System.Diagnostics.Debug.WriteLine($"message: {message}, param1: {(AimpCoreMessageType)param1}, param2: {param2}");
//System.Diagnostics.Debug.WriteLine($"message: {message}, param1: {(AimpCoreMessageType)param1}, param2: {param2}");
if (message == AimpCoreMessageType.EventPlayingFileInfo)
{
Expand Down
17 changes: 16 additions & 1 deletion src/Plugins/dotnet_demo/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace TestPlugin
using AIMP.SDK;
using AIMP.SDK.MenuManager;
using AIMP.SDK.Options;
using DemoPlugin.Extension;

public delegate ActionResultType HookMessage(AimpCoreMessageType message, int param1, IntPtr param2);

Expand Down Expand Up @@ -70,7 +71,11 @@ public override void Initialize()
TestWriteConfig();

var listner = new ExtensionPlaylistManagerListener();
Player.Core.RegisterExtension(listner);
var ext = new ExtensionPlaybackQueue(Player);

RegisterExtension(listner);
RegisterExtension(ext);


var result = Player.Core.CreateObject<IAimpMenuItem>();

Expand Down Expand Up @@ -189,5 +194,15 @@ private void TestReadConfig()
var strData = System.Text.Encoding.Default.GetString(buf);
}
}

private void RegisterExtension(IAimpExtension extension)
{
var res = Player.Core.RegisterExtension(extension);

if (res.ResultType != ActionResultType.OK)
{
System.Diagnostics.Debugger.Break();
}
}
}
}
2 changes: 2 additions & 0 deletions src/Plugins/dotnet_demo/dotnet_demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
<Compile Include="..\..\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<Compile Include="Extension\ExtensionPlaybackQueue.cs" />
<Compile Include="Logger.cs" />
<Compile Include="LoggerForm.cs">
<SubType>Form</SubType>
Expand Down Expand Up @@ -193,6 +194,7 @@
<Name>aimp_dotnet</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
Expand Down
2 changes: 2 additions & 0 deletions src/SDK/AIMP.SDK/AIMP.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@
<Compile Include="SDK\Player\Extensions\IAimpExtensionPlaybackQueue.cs" />
<Compile Include="SDK\Player\Extensions\IAimpExtensionPlaybackQueue2.cs" />
<Compile Include="SDK\Player\Extensions\IAimpExtensionWaveFormProvider.cs" />
<Compile Include="SDK\Player\Extensions\PlaybackQueueFlags.cs" />
<Compile Include="SDK\Player\Extensions\PlaybackQueueInfo.cs" />
<Compile Include="SDK\Player\IAimpServicePlaybackQueue2.cs" />
<Compile Include="SDK\Player\Objects\IAimpEqualizerBands.cs" />
<Compile Include="SDK\Player\Objects\IAimpEqualizerPreset.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public interface IAimpExtensionFileExpander : IAimpExtension
/// <param name="fileName">The real file name</param>
/// <param name="progressCallback">Progress callback <see cref="IAimpProgressCallback"/>.</param>
/// <returns>AimpActionResult&lt;IList&lt;IAimpVirtualFile&gt;&gt;.</returns>
AimpActionResult<IAimpObjectList<IAimpVirtualFile>> Expand(string fileName, IAimpProgressCallback progressCallback);
AimpActionResult<IList<IAimpVirtualFile>> Expand(string fileName, IAimpProgressCallback progressCallback);
}
}
4 changes: 2 additions & 2 deletions src/SDK/AIMP.SDK/SDK/FileManager/Objects/IAimpVirtualFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace AIMP.SDK.FileManager.Objects
/// <summary>
/// Interface provides information about virtual file.
/// </summary>
public interface IAimpVirtualFile
public interface IAimpVirtualFile : IAimpObject
{
/// <summary>
/// Gets or sets the index of virtual track in the set (if presented).
Expand Down Expand Up @@ -65,7 +65,7 @@ public interface IAimpVirtualFile
/// Gets the file info.
/// </summary>
/// <returns>AimpActionResult&lt;IAimpFileInfo&gt;.</returns>
AimpActionResult<IAimpFileInfo> GetFileInfo();
AimpActionResult GetFileInfo(IAimpFileInfo fileInfo);

/// <summary>
/// Check is the source exists.
Expand Down
3 changes: 3 additions & 0 deletions src/SDK/AIMP.SDK/SDK/MessageDispatcher/AimpMessages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// ReSharper disable InconsistentNaming
// ReSharper disable UnusedMember.Global

using System;

namespace AIMP.SDK.MessageDispatcher
{
/// <summary>
Expand Down Expand Up @@ -929,6 +931,7 @@ public enum AimpCoreMessageType
#endregion
}

[Flags]
public enum AimpMessage
{
EndOfQueue = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ public interface IAimpServiceMessageDispatcher : IAimpService
/// <returns>AimpActionResult.</returns>
AimpActionResult Send(AimpCoreMessageType message, int param1, ref IntPtr param2);

/// <summary>
/// Sends the specified message.
/// </summary>
/// <param name="message">The message <see cref="AimpCoreMessageType" />.</param>
/// <returns>AimpActionResult.</returns>
AimpActionResult Send(AimpCoreMessageType message);

/// <summary>
/// Sends the specified message.
/// </summary>
/// <param name="message">The message <see cref="AimpCoreMessageType" />.</param>
/// <param name="param1">The message direction <see cref="MessageDirectionType" />.</param>
/// <returns>AimpActionResult.</returns>
AimpActionResult Send(AimpCoreMessageType message, int param1);

/// <summary>
/// Registers the specified message.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,6 @@

namespace AIMP.SDK.Player.Extensions
{
/// <summary>
/// Enum PlaybackQueueFlags
/// </summary>
public enum PlaybackQueueFlags
{
/// <summary>
/// The start from beginning
/// </summary>
StartFromBeginning = 1,

/// <summary>
/// The start from cursor
/// </summary>
StartFromCursor = 2,

/// <summary>
/// The start from item
/// </summary>
StartFromItem = 3
}

/// <summary>
/// Interface IAimpExtensionPlaybackQueue
/// Implements the <see cref="AIMP.SDK.IAimpExtension" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@

namespace AIMP.SDK.Player.Extensions;

public class PlaybackQueueInfo
{
public int Position { get; }

public int Size { get; }
}

/// <summary>
/// Extends an abilities of the <see cref="IAimpExtensionPlaybackQueue"/>.
/// </summary>
Expand Down
22 changes: 22 additions & 0 deletions src/SDK/AIMP.SDK/SDK/Player/Extensions/PlaybackQueueFlags.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace AIMP.SDK.Player.Extensions;

/// <summary>
/// Enum PlaybackQueueFlags
/// </summary>
public enum PlaybackQueueFlags
{
/// <summary>
/// The start from beginning
/// </summary>
StartFromBeginning = 1,

/// <summary>
/// The start from cursor
/// </summary>
StartFromCursor = 2,

/// <summary>
/// The start from item
/// </summary>
StartFromItem = 3
}
8 changes: 8 additions & 0 deletions src/SDK/AIMP.SDK/SDK/Player/Extensions/PlaybackQueueInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace AIMP.SDK.Player.Extensions;

public class PlaybackQueueInfo
{
public int Position { get; }

public int Size { get; }
}
2 changes: 2 additions & 0 deletions src/SDK/AIMP.SDK/SDK/Player/Objects/IAimpPlaybackQueueItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ public interface IAimpPlaybackQueueItem
/// </summary>
/// <value>The playlist item.</value>
IAimpPlaylistItem PlaylistItem { get; set; }

double Offset { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/SDK/aimp_dotnet/AIMPSDK/AIMP400/apiFileManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class IAIMPVirtualFile: public IAIMPPropertyList
public:
virtual HRESULT WINAPI CreateStream(IAIMPStream **Stream) = 0;
virtual HRESULT WINAPI GetFileInfo(IAIMPFileInfo *Info) = 0;
virtual HRESULT WINAPI IsExists() = 0;
virtual boolean WINAPI IsExists() = 0;
virtual HRESULT WINAPI IsInSameStream(IAIMPVirtualFile *VirtualFile) = 0;
virtual HRESULT WINAPI Synchronize() = 0;
};
Expand Down
2 changes: 2 additions & 0 deletions src/SDK/aimp_dotnet/Aimp_DotNetPlugin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<ClCompile Include="SDK\FileManager\Extensions\InternalAimpExtensionFileFormat.cpp" />
<ClCompile Include="SDK\FileManager\Extensions\InternalAimpExtensionFileInfoProvider.cpp" />
<ClCompile Include="SDK\FileManager\Extensions\InternalAimpExtensionFileSystem.cpp" />
<ClCompile Include="SDK\FileManager\InternalAimpVirtualFile.cpp" />
<ClCompile Include="SDK\FileManager\Services\AimpServiceFileURI.cpp" />
<ClCompile Include="SDK\FileManager\Services\AimpServiceFileURI2.cpp" />
<ClCompile Include="SDK\Internet\AimpServiceConnectionSettings.cpp" />
Expand Down Expand Up @@ -198,6 +199,7 @@
<ClInclude Include="SDK\FileManager\AimpServiceFileStreaming.h" />
<ClInclude Include="SDK\FileManager\AimpServiceFileSystems.h" />
<ClInclude Include="SDK\FileManager\AimpVirtualFile.h" />
<ClInclude Include="SDK\FileManager\InternalAimpVirtualFile.h" />
<ClInclude Include="SDK\FileManager\Commands\AimpFileSystemCommandCopyToClipboard.h" />
<ClInclude Include="SDK\FileManager\Commands\AimpFileSystemCommandDelete.h" />
<ClInclude Include="SDK\FileManager\Commands\AimpFileSystemCommandDropSource.h" />
Expand Down
Loading

0 comments on commit a3ad963

Please sign in to comment.