mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 03:11:10 +00:00
Implements tests for commit 4e13b23f16
Covers the normalized audio cache with integration tests for the cache paths, the coordinator, the reader lease, the reservation, the lease stream, the output size tracker and the startup initializer, and unit tests for the playback format catalog and the transcoding toolchain status, with fixtures for the index DTOs and the transcoding settings. Makes the array based asynchronous overloads of the lease stream adapt to the memory based overloads of the inner stream.
This commit is contained in:
1 parent
cf3855ec12
commit
d61a114d80
13 files changed
+3011
-2
No files matched your search
+4
-2
@@ -96,7 +96,8 @@ internal sealed class TranscodingCacheLeaseStream : Stream
|
||||
/// <returns>The number of bytes read.</returns>
|
||||
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||
{
|
||||
return _innerStream.ReadAsync(buffer, offset, count, cancellationToken);
|
||||
// The memory based overload is the one the inner stream should implement, so the array overload only adapts to it.
|
||||
return _innerStream.ReadAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -160,7 +161,8 @@ internal sealed class TranscodingCacheLeaseStream : Stream
|
||||
/// <returns>A task that represents the asynchronous write operation.</returns>
|
||||
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||
{
|
||||
return _innerStream.WriteAsync(buffer, offset, count, cancellationToken);
|
||||
// The memory based overload is the one the inner stream should implement, so the array overload only adapts to it.
|
||||
return _innerStream.WriteAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user