Skip to content

Commit

Permalink
Endgame
Browse files Browse the repository at this point in the history
  • Loading branch information
VoidXH committed Apr 24, 2023
1 parent 280ef8d commit 29dffe9
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cavern.Format/Cavern.Format.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>1.6</Version>
<Version>2.0</Version>
<Authors>VoidX</Authors>
<Description>Audio format support of the Cavern spatial audio engine.</Description>
<Copyright>Copyright © Bence Sgánetz 2016-2023</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Cavern.Format/Common/TrackExtraVideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class TrackExtraVideo : TrackExtra {
public TrackExtraVideo() { }

/// <summary>
/// Parse video metadata from a Matroska track's video metadata node.
/// Parse video metadata from a track's video metadata node.
/// </summary>
internal TrackExtraVideo(Stream reader, MatroskaTree videoMeta) {
Width = (int)videoMeta.GetChildValue(reader, MatroskaTree.Segment_Tracks_TrackEntry_Video_PixelWidth);
Expand Down
21 changes: 21 additions & 0 deletions Cavern.Format/Container/Matroska/MatroskaTrackExtraVideo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.IO;

using Cavern.Format.Common;

namespace Cavern.Format.Container.Matroska {
/// <summary>
/// Video track metadata with fields that are only contained in Matroska files.
/// </summary>
public class MatroskaTrackExtraVideo : TrackExtraVideo {
/// <summary>
/// Elements that extend the track format, other than <see cref="TrackExtraVideo.PrivateData"/>.
/// This is not decoded, just transfered.
/// </summary>
public byte[] BlockAdditionMapping { get; set; }

/// <summary>
/// Parse video metadata from a Matroska track's video metadata node.
/// </summary>
internal MatroskaTrackExtraVideo(Stream reader, MatroskaTree videoMeta) : base(reader, videoMeta) { }
}
}
1 change: 1 addition & 0 deletions Cavern.Format/Container/Matroska/MatroskaTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ public byte[] GetRawData(Stream reader) {
Segment_Cluster_Timestamp = 0xE7,
Segment_Cues_CuePoint_CueTrackPositions_CueClusterPosition = 0xF1,
Segment_Cues_CuePoint_CueTrackPositions_CueTrack = 0xF7,
Segment_Tracks_TrackEntry_BlockAdditionMapping = 0x41E4,
Segment_Info_Duration = 0x4489,
Segment_Info_MuxingApp = 0x4D80,
Segment_SeekHead_Seek = 0x4DBB,
Expand Down
6 changes: 5 additions & 1 deletion Cavern.Format/Input/Container/MatroskaReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,18 @@ void ReadTracks(MatroskaTree tracklist) {
MatroskaTree data = source.GetChild(reader, MatroskaTree.Segment_Tracks_TrackEntry_Video);
if (data != null) {
MatroskaTree codecPrivate = source.GetChild(reader, MatroskaTree.Segment_Tracks_TrackEntry_CodecPrivate);
TrackExtraVideo extra = new TrackExtraVideo(reader, data);
MatroskaTrackExtraVideo extra = new MatroskaTrackExtraVideo(reader, data);
entry.Extra = extra;
extra.PrivateData = codecPrivate?.GetBytes(reader);

long defaultDuration = source.GetChildValue(reader, MatroskaTree.Segment_Tracks_TrackEntry_DefaultDuration);
if (defaultDuration != -1) {
extra.FrameRate = sToNs / defaultDuration;
}
MatroskaTree addition = source.GetChild(reader, MatroskaTree.Segment_Tracks_TrackEntry_BlockAdditionMapping);
if (addition != null) {
extra.BlockAdditionMapping = addition.GetBytes(reader);
}
} else {
data = source.GetChild(reader, MatroskaTree.Segment_Tracks_TrackEntry_Audio);
if (data != null) {
Expand Down
3 changes: 3 additions & 0 deletions Cavern.Format/Output/Container/MatroskaWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ void CreateSegmentTracks() {
tree.Write(MatroskaTree.Segment_Tracks_TrackEntry_Video_Colour_Range, (byte)videoInfo.ColorRange);
tree.CloseSequence();
}
if (videoInfo is MatroskaTrackExtraVideo matroskaVideoInfo && matroskaVideoInfo.BlockAdditionMapping != null) {
tree.Write(MatroskaTree.Segment_Tracks_TrackEntry_BlockAdditionMapping, matroskaVideoInfo.BlockAdditionMapping);
}
tree.CloseSequence();
tree.Write(MatroskaTree.Segment_Tracks_TrackEntry_CodecPrivate, videoInfo.PrivateData);
}
Expand Down
2 changes: 1 addition & 1 deletion Cavern.QuickEQ.Format/Cavern.QuickEQ.Format.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>1.6</Version>
<Version>2.0</Version>
<Authors>VoidX</Authors>
<Description>Software and hardware support for exporting calibrations made with Cavern QuickEQ.</Description>
<Copyright>Copyright © Bence Sgánetz 2016-2023</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Cavern.QuickEQ/Cavern.QuickEQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>1.6</Version>
<Version>2.0</Version>
<Authors>VoidX</Authors>
<Description>Measurement and equalization tools for the Cavern spatial audio engine.</Description>
<Copyright>Copyright © Bence Sgánetz 2016-2023</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Cavern/Cavern.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>1.6</Version>
<Version>2.0</Version>
<Authors>VoidX</Authors>
<Description>Object-based 3D audio rendering and (up)mixing engine.</Description>
<Copyright>Copyright © Bence Sgánetz 2016-2023</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Cavern/Listener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ float[] Frame() {
/// Version and creator information.
/// </summary>
/// <remarks>Hardcoded, because version reading is unsupported for .NET Standard projects</remarks>
const string info = "Cavern v1.6 by VoidX (cavern.sbence.hu)";
const string info = "Cavern v2.0 by VoidX (cavern.sbence.hu)";

/// <summary>
/// Default value of <see cref="MaximumSources"/>.
Expand Down
2 changes: 1 addition & 1 deletion CavernSamples/CavernizeGUI/Tools/UpdateCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static async void CheckForUpdate(DateTime lastCheck, Action onChecked) {
/// <summary>
/// The current revision number. If the received revision is newer, an &quot;update available&quot; message is shown.
/// </summary>
const int thisRevision = 4;
const int thisRevision = 5;

/// <summary>
/// The page where the new version can be downloaded.
Expand Down
2 changes: 1 addition & 1 deletion CavernUnity DLL/CavernUnity DLL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Version>1.5</Version>
<Version>2.0</Version>
<Authors>VoidX</Authors>
<Description>Unity wrappers for the Cavern spatial audio engine.</Description>
<Copyright>Copyright © Bence Sgánetz 2016-2023</Copyright>
Expand Down

0 comments on commit 29dffe9

Please sign in to comment.