Skip to content

Commit df51b1d

Browse files
committed
Fixed auto-resampling in AudioPlayer by removing additional Resample node from AudioPlayer patch and applying additional factor to already in place resampling for speed adjustment. adds to #7027
1 parent 6ccfd0d commit df51b1d

File tree

5 files changed

+21
-127
lines changed

5 files changed

+21
-127
lines changed

VL.Audio.UI/deployment/VL.Audio.UI.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
33
<metadata>
44
<id>VL.Audio.UI</id>
5-
<version>1.9.6</version>
5+
<version>1.9.7</version>
66
<title>VL.Audio.UI</title>
77
<authors>vvvv</authors>
88
<owners>vvvv</owners>
@@ -11,8 +11,8 @@
1111
<description>Extension pack for VL.Audio that brings in UI's for driver configuration and more</description>
1212
<tags>VL</tags>
1313
<dependencies>
14-
<dependency id="VL.Audio" version="1.9.6" />
15-
<dependency id="VL.ImGui.Skia" version="2024.6.6" />
14+
<dependency id="VL.Audio" version="1.9.7" />
15+
<dependency id="VL.ImGui.Skia" version="2024.6.7" />
1616
</dependencies>
1717
<license type="expression">LGPL-3.0-only</license>
1818
<icon>icon\nugeticon.png</icon>

VL.Audio/VL.Audio.vl

Lines changed: 6 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Document xmlns:p="property" xmlns:r="reflection" Id="HTX4axw4uH5NDghqAqpe1F" LanguageVersion="2025.7.0-0020-ge83b1ec3a8" Version="0.128">
2+
<Document xmlns:p="property" xmlns:r="reflection" Id="HTX4axw4uH5NDghqAqpe1F" LanguageVersion="2025.7.0-0026-g22d1636d06" Version="0.128">
33
<Patch Id="Mj1seFpSbg5MtaCXVBGhJf">
44
<Canvas Id="ClqUpgLjNRdQbB5ajAF1ry" DefaultCategory="Audio" CanvasType="FullCategory">
55
<!--
@@ -1581,7 +1581,7 @@
15811581
</Node>
15821582
</Patch>
15831583
</Node>
1584-
<ControlPoint Id="JW5cS1SLCz5NN17Jpn6J0l" Bounds="102,1093" />
1584+
<ControlPoint Id="JW5cS1SLCz5NN17Jpn6J0l" Bounds="40,387" />
15851585
<ControlPoint Id="TmMsMZeT5uRPUFFzPHAjry" Bounds="699,848" />
15861586
<ControlPoint Id="QP3Ht4UXZ0BLagt7qUMunL" Bounds="913,848" />
15871587
<Node Bounds="414,461,65,19" Id="L22D78ZTIm7O64URZe8FVE">
@@ -1827,7 +1827,7 @@
18271827
</Node>
18281828
</Patch>
18291829
</Node>
1830-
<Node Bounds="179,418,75,26" Id="F3JDIsuC2CrPQMByCBZruA">
1830+
<Node Bounds="177,288,75,26" Id="F3JDIsuC2CrPQMByCBZruA">
18311831
<p:NodeReference LastCategoryFullName="VL.Audio.FileStreamSignal" LastDependency="VL.Audio.dll">
18321832
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
18331833
<Choice Kind="OperationCallFlag" Name="Dispose" />
@@ -1876,80 +1876,7 @@
18761876
<Pin Id="QCKJLHLeS1GNphyksBG6NR" Name="Value" Kind="InputPin" />
18771877
<Pin Id="SfRwB9zxKszLKtjpfM74Ry" Name="Output" Kind="StateOutputPin" />
18781878
</Node>
1879-
<Pad Id="MSpHL0dTsGmNOqBJCmyFND" Comment="Destination Rate is Engine Rate" Bounds="238,900,35,35" ShowValueBox="true" isIOBox="true" Value="True">
1880-
<p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
1881-
<Choice Kind="TypeFlag" Name="Boolean" />
1882-
<FullNameCategoryReference ID="Primitive" />
1883-
</p:TypeAnnotation>
1884-
<p:ValueBoxSettings>
1885-
<p:buttonmode p:Assembly="VL.UI.Forms" p:Type="VL.HDE.PatchEditor.Editors.ButtonModeEnum">Toggle</p:buttonmode>
1886-
</p:ValueBoxSettings>
1887-
</Pad>
1888-
<ControlPoint Id="STkaqP9JkfQM3LMMEZJbfF" Bounds="162,852" />
1889-
<Node Bounds="-42,796,83,19" Id="RqSmYZICdOkQaeduhTOiCY">
1890-
<p:NodeReference LastCategoryFullName="Audio" LastDependency="VL.Audio.vl">
1891-
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
1892-
<Choice Kind="ProcessAppFlag" Name="EngineSettings" />
1893-
</p:NodeReference>
1894-
<Pin Id="UBWaasjVLrnQMXFU3HiWmi" Name="Buffer Size" Kind="OutputPin" />
1895-
<Pin Id="H29AMMYDYAHNAYzRg7nprG" Name="Sample Rate" Kind="OutputPin" />
1896-
<Pin Id="HjAIPoDWgz1NKWKN2tSTI1" Name="Node Context" Kind="InputPin" IsHidden="true" />
1897-
</Node>
1898-
<Node Bounds="36,838,27,19" Id="D1D95ip8TcFMPvOAtnhWxe">
1899-
<p:NodeReference LastCategoryFullName="Math" LastDependency="VL.CoreLib.vl">
1900-
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
1901-
<Choice Kind="OperationCallFlag" Name="!=" />
1902-
</p:NodeReference>
1903-
<Pin Id="P1UghQGsd8FNpDwdIshUrf" Name="Input" Kind="InputPin" />
1904-
<Pin Id="HYAVYOA8qToLh3NvmP6TIO" Name="Input 2" Kind="InputPin" />
1905-
<Pin Id="VXaq6M28amqLA4W2CqwZlG" Name="Result" Kind="OutputPin" />
1906-
</Node>
1907-
<Node Bounds="36,878,175,136" Id="M8WcEk65bKSOBu83dbV90q">
1908-
<p:NodeReference LastCategoryFullName="Primitive" LastDependency="Builtin">
1909-
<Choice Kind="StatefulRegion" Name="Region (Stateful)" Fixed="true" />
1910-
<CategoryReference Kind="Category" Name="Primitive" />
1911-
<Choice Kind="ApplicationStatefulRegion" Name="If" />
1912-
</p:NodeReference>
1913-
<Pin Id="MnvOwA4JLo3MEN3FnGcwwc" Name="Condition" Kind="InputPin" />
1914-
<Patch Id="AsDa8WwHgsQNT64fFepRsf" ManuallySortedPins="true">
1915-
<Patch Id="M2kOVnPq1WmPtVD8EMCdHy" Name="Create" ManuallySortedPins="true" />
1916-
<Patch Id="MVUgJhqtDgrPiRgE1uXYWx" Name="Then" ManuallySortedPins="true" />
1917-
<Node Bounds="88,901,111,86" Id="SI8zH5vk0vrOq2uNVWd9hu">
1918-
<p:NodeReference LastCategoryFullName="Primitive" LastDependency="Builtin">
1919-
<Choice Kind="StatefulRegion" Name="Region (Stateful)" Fixed="true" />
1920-
<Choice Kind="ApplicationStatefulRegion" Name="ForEach" />
1921-
<CategoryReference Kind="Category" Name="Primitive" />
1922-
</p:NodeReference>
1923-
<Pin Id="PeXDrnSqZLQNwgJxzBwNCa" Name="Break" Kind="OutputPin" />
1924-
<ControlPoint Id="OFPI7Dj2SM3MCXKtoVyyG1" Bounds="102,907" Alignment="Top" />
1925-
<ControlPoint Id="LcVm6OSipcRQGskWHYzlpi" Bounds="102,981" Alignment="Bottom" />
1926-
<ControlPoint Id="StlF7H5ZCpwPLshR37Xlbn" Bounds="182,981" Alignment="Bottom" />
1927-
<Patch Id="ATXNeC6geJ7MPuQfPoDrDO" ManuallySortedPins="true">
1928-
<Patch Id="C3NIis8KJLPMSt9yf0ueV5" Name="Create" ManuallySortedPins="true" />
1929-
<Patch Id="FVmLhu25fqONAih0TqbI8i" Name="Update" ManuallySortedPins="true" />
1930-
<Patch Id="PcuF09LxWQBNgcDR5T0fh2" Name="Dispose" ManuallySortedPins="true" />
1931-
<Node Bounds="100,944,85,19" Id="KI8YCymynCjOw9SdjzwTIs">
1932-
<p:NodeReference LastCategoryFullName="Audio.Filter" LastDependency="VL.Audio.vl">
1933-
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
1934-
<Choice Kind="ProcessAppFlag" Name="Resample" />
1935-
</p:NodeReference>
1936-
<p:HelpFocus p:Assembly="VL.Lang" p:Type="VL.Model.HelpPriority">High</p:HelpFocus>
1937-
<Pin Id="AkwTP8AzwvDLUgcNhMzH1F" Name="Node Context" Kind="InputPin" IsHidden="true" />
1938-
<Pin Id="AuoyrjILlhuL9TCFtzLxxw" Name="Input" Kind="InputPin" />
1939-
<Pin Id="FNI0h4eBSQAPvIjel6dWo2" Name="Source Rate" Kind="InputPin" />
1940-
<Pin Id="ACLhJyKFHqHPykX4Fhztb6" Name="Destination Rate" Kind="InputPin" />
1941-
<Pin Id="DM3Pi8KZmNsM36AEOBQuOS" Name="Required Transition Band" Kind="InputPin" />
1942-
<Pin Id="IFggN5UnO9jLn0eZkonobH" Name="Destination Rate is Engine Rate" Kind="InputPin" />
1943-
<Pin Id="UP6JhjwyJqmMOclf34jeof" Name="Output" Kind="OutputPin" />
1944-
<Pin Id="OnJcuQPTeIAPuFv2umzeGM" Name="Latency" Kind="OutputPin" />
1945-
</Node>
1946-
</Patch>
1947-
</Node>
1948-
</Patch>
1949-
<ControlPoint Id="QKZWQ33Cjh8O6uXZzfbBLH" Bounds="102,884" Alignment="Top" />
1950-
<ControlPoint Id="MgNNdadELQILtWsYVn6maF" Bounds="102,1008" Alignment="Bottom" />
1951-
</Node>
1952-
<Node Bounds="101,1046,83,26" Id="AOc1QPdYWJRO5OQuHkVgCI">
1879+
<Node Bounds="39,340,83,26" Id="AOc1QPdYWJRO5OQuHkVgCI">
19531880
<p:NodeReference LastCategoryFullName="Collections.Spread" LastDependency="VL.CoreLib.vl">
19541881
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
19551882
<CategoryReference Kind="4026531840" Name="Spread" NeedsToBeDirectParent="true" />
@@ -2106,25 +2033,10 @@
21062033
<Pin Id="I3ArCv7YLMlNY71YQSRtwQ" Name="Channels" Kind="OutputPin" Bounds="943,698" />
21072034
<Pin Id="DyDCOpfznUgP9yFqsiPUFF" Name="Sample Rate" Kind="OutputPin" Bounds="1051,702" />
21082035
<Pin Id="VlZTTEaHq3fOePb1NDr7jc" Name="Original Format" Kind="OutputPin" Bounds="1151,694" />
2109-
<Pin Id="FvB0IIhDUYqM7z3LNzQiIJ" Name="Required Transition Band" Kind="InputPin" DefaultValue="3" Visibility="Optional" />
21102036
</Patch>
21112037
<Patch Id="TrVm0JxxUrePjFlJmhvCir" Name="Dispose" ParticipatingElements="F3JDIsuC2CrPQMByCBZruA" />
2112-
<Link Id="SmWk1M0IxDNM47yPgebN2t" Ids="MSpHL0dTsGmNOqBJCmyFND,IFggN5UnO9jLn0eZkonobH" />
2113-
<Link Id="ELKzwFBnTuiP2JpI1JAxxB" Ids="LEWRV6jlYN2NncrgkKyJXn,FNI0h4eBSQAPvIjel6dWo2" />
2114-
<Link Id="JzvvIpGQEMQLNOQ3PjWf53" Ids="STkaqP9JkfQM3LMMEZJbfF,DM3Pi8KZmNsM36AEOBQuOS" />
2115-
<Link Id="AXREcFSK0BLLQdahvo2NXT" Ids="FvB0IIhDUYqM7z3LNzQiIJ,STkaqP9JkfQM3LMMEZJbfF" IsHidden="true" />
2116-
<Link Id="HTsvA7jOFJtNDKZAKtxjuE" Ids="LEWRV6jlYN2NncrgkKyJXn,HYAVYOA8qToLh3NvmP6TIO" />
2117-
<Link Id="IXSbXXI91nMLDheqG1zI1Z" Ids="H29AMMYDYAHNAYzRg7nprG,P1UghQGsd8FNpDwdIshUrf" />
2118-
<Link Id="VSbiQMKLgtULa3wZVt99t8" Ids="UP6JhjwyJqmMOclf34jeof,LcVm6OSipcRQGskWHYzlpi" />
2119-
<Link Id="D7sf1XH435HQGzky56GRn3" Ids="OFPI7Dj2SM3MCXKtoVyyG1,AuoyrjILlhuL9TCFtzLxxw" />
2120-
<Link Id="J2bf85FcTAzLrc10saUJNn" Ids="OnJcuQPTeIAPuFv2umzeGM,StlF7H5ZCpwPLshR37Xlbn" />
2121-
<Link Id="PZlZG2emINLMKZB05IVfwK" Ids="VXaq6M28amqLA4W2CqwZlG,MnvOwA4JLo3MEN3FnGcwwc" />
2122-
<Link Id="BgcIv7swr92MMHpRRooRUV" Ids="QKZWQ33Cjh8O6uXZzfbBLH,MgNNdadELQILtWsYVn6maF" IsFeedback="true" />
2123-
<Link Id="PUba5zidnO2LScWHUXkHgF" Ids="GQ1eFVCbTZKM7p5IcaXXRz,QKZWQ33Cjh8O6uXZzfbBLH" />
2124-
<Link Id="SQp41L0P8bsNcbjotFlSDy" Ids="QKZWQ33Cjh8O6uXZzfbBLH,OFPI7Dj2SM3MCXKtoVyyG1" />
2125-
<Link Id="S9p3aRYgnNhPNLeLkh6jcF" Ids="LcVm6OSipcRQGskWHYzlpi,MgNNdadELQILtWsYVn6maF" />
2126-
<Link Id="EVPXun5oCT8LdbDsq1oNWI" Ids="MgNNdadELQILtWsYVn6maF,Pt3TVe0qNhfQIX2PCQr0dL" />
21272038
<Link Id="McABdZ6DC18O29BgIwMLyE" Ids="FzfJoaHTEyCMxhXdC2mKPR,JW5cS1SLCz5NN17Jpn6J0l" />
2039+
<Link Id="VOFNUFjeir4POnUPsdJdBW" Ids="GQ1eFVCbTZKM7p5IcaXXRz,Pt3TVe0qNhfQIX2PCQr0dL" />
21282040
</Patch>
21292041
</Node>
21302042
<!--
@@ -16636,7 +16548,7 @@
1663616548
<PlatformDependency Id="VuKJB0bRCwzOw8myrmblKI" Location="System.Runtime" />
1663716549
<PlatformDependency Id="Qp3HZOkgG5cQcuE59UUe1j" Location="System.IO" />
1663816550
<PlatformDependency Id="CCaadwXbjs6P0MKKXnqSCL" Location="System.IO.FileSystem" />
16639-
<NugetDependency Id="TDiqd3R8e2tOT8QIUqmyZg" Location="VL.CoreLib" Version="2025.7.0-0020-ge83b1ec3a8" />
16551+
<NugetDependency Id="TDiqd3R8e2tOT8QIUqmyZg" Location="VL.CoreLib" Version="2025.7.0-0026-g22d1636d06" />
1664016552
<NugetDependency Id="SFJUM3180QILdDPO5WTujk" Location="NAudio" Version="2.2.1" />
1664116553
<NugetDependency Id="AGQtLYjpCx7PhN4g8ZBcIN" Location="NAudio.Asio" Version="2.2.1" />
1664216554
<NugetDependency Id="OyQbpILJqvSQQ6uHg7eipM" Location="NAudio.Core" Version="2.2.1" />

VL.Audio/deployment/VL.Audio.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
33
<metadata>
44
<id>VL.Audio</id>
5-
<version>1.9.6</version>
5+
<version>1.9.7</version>
66
<title>VL.Audio</title>
77
<authors>NAudio, vvvv</authors>
88
<owners>vvvv</owners>

VL.Audio/help/Source/Reference AudioPlayer.vl

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Document xmlns:p="property" xmlns:r="reflection" Id="D7IBwO2zC8qQJwplUikxnZ" LanguageVersion="2025.7.0-0005-gfd21b8f14a" Version="0.128">
3-
<NugetDependency Id="Hmr7kILdlvPMagkfyf51Iz" Location="VL.CoreLib" Version="2025.7.0-0005-gfd21b8f14a" />
2+
<Document xmlns:p="property" xmlns:r="reflection" Id="D7IBwO2zC8qQJwplUikxnZ" LanguageVersion="2025.7.0-0026-g22d1636d06" Version="0.128">
3+
<NugetDependency Id="Hmr7kILdlvPMagkfyf51Iz" Location="VL.CoreLib" Version="2025.7.0-0026-g22d1636d06" />
44
<Patch Id="HaulhrPXkyCPeLW2mKcS3k">
55
<Canvas Id="KNuoeWiZ9dzNZrycJV80K9" DefaultCategory="Main" BordersChecked="false" CanvasType="FullCategory" />
66
<!--
@@ -55,7 +55,6 @@
5555
<Pin Id="BSfmocvz10COWnMG2v2UbT" Name="Channels" Kind="OutputPin" />
5656
<Pin Id="AJM47OGxetNLB58Huc07gJ" Name="Sample Rate" Kind="OutputPin" />
5757
<Pin Id="NSrhspMh9iDOMuQc9cwHWH" Name="Original Format" Kind="OutputPin" />
58-
<Pin Id="AJjSICoE5mXO2FSbbuk3Tw" Name="Required Transition Band" Kind="InputPin" IsHidden="true" />
5958
</Node>
6059
<Pad Id="AFhtajWa9EyOHDJs1skNrf" Comment="Play" Bounds="346,381,35,35" ShowValueBox="true" isIOBox="true" Value="True">
6160
<p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="CoreLibBasics.vl">
@@ -117,24 +116,6 @@
117116
<p:stringtype p:Assembly="VL.Core" p:Type="VL.Core.StringType">Comment</p:stringtype>
118117
</p:ValueBoxSettings>
119118
</Pad>
120-
<Pad Id="DJpKLpeOJAPOV7hum3C8tx" Bounds="594,351,189,19" ShowValueBox="true" isIOBox="true" Value="..\Utils\Reference Resample.vl">
121-
<p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
122-
<Choice Kind="TypeFlag" Name="String" />
123-
</p:TypeAnnotation>
124-
<p:ValueBoxSettings>
125-
<p:fontsize p:Type="Int32">9</p:fontsize>
126-
<p:stringtype p:Assembly="VL.Core" p:Type="VL.Core.StringType">Link</p:stringtype>
127-
</p:ValueBoxSettings>
128-
</Pad>
129-
<Pad Id="DoY7w5K5nnGPEaZJcGtMsF" Bounds="593,267,383,75" ShowValueBox="true" isIOBox="true" Value="In case the audio files sample rate does not match the engines current sample rate, automatic resampling is applied by the AudioPlayer node. In those cases the optional input &quot;Required Transition Band&quot; may be of interest, see:">
130-
<p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
131-
<Choice Kind="TypeFlag" Name="String" />
132-
</p:TypeAnnotation>
133-
<p:ValueBoxSettings>
134-
<p:fontsize p:Type="Int32">9</p:fontsize>
135-
<p:stringtype p:Assembly="VL.Core" p:Type="VL.Core.StringType">Comment</p:stringtype>
136-
</p:ValueBoxSettings>
137-
</Pad>
138119
</Canvas>
139120
<Patch Id="H7AXqgMBO7VM7Hjz3LIVIi" Name="Create" />
140121
<Patch Id="SAUdaIhMZdzNMFreYk25vB" Name="Update" />
@@ -157,6 +138,6 @@
157138
</Patch>
158139
</Node>
159140
</Patch>
160-
<NugetDependency Id="AOu5YShvTlxO1vA9BHtmEC" Location="VL.Skia" Version="2025.7.0-0005-gfd21b8f14a" />
141+
<NugetDependency Id="AOu5YShvTlxO1vA9BHtmEC" Location="VL.Skia" Version="2025.7.0-0026-g22d1636d06" />
161142
<NugetDependency Id="RFGyRrGfUbfP2xiT2T539W" Location="VL.Audio" Version="0.0.0.0" />
162143
</Document>

VL.Audio/src/Signals/Sources/FileStreamSignal.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ protected override void FillBuffers(float[][] buffer, int offset, int sampleCoun
5656
var channels = FAudioFile.WaveFormat.Channels;
5757
var blockAlign = FAudioFile.OriginalFileFormat.BlockAlign;
5858
int samplesToRead;
59-
if (Speed == 1.0)
59+
var speed = Speed * FAudioFile.WaveFormat.SampleRate / AudioService.Engine.Settings.SampleRate;
60+
if (speed == 1.0)
6061
{
6162
samplesToRead = sampleCount * channels;
6263
}
6364
else
6465
{
65-
var desiredSamples = sampleCount * channels * Speed;
66+
var desiredSamples = sampleCount * channels * speed;
6667
//ideal value
6768
samplesToRead = (int)Math.Truncate(desiredSamples);
6869
//can only read that much
@@ -102,18 +103,18 @@ protected override void FillBuffers(float[][] buffer, int offset, int sampleCoun
102103
//first read samples remaining to loopEnd
103104
var samplesToReadAtEndOfLoop = (int) Math.Min(samplesToRead, loopEndSample - currentSample);
104105
samplesRead = FAudioFile.Read(FFileBuffer, offset * channels, samplesToReadAtEndOfLoop);
105-
WriteFileBufferToOutputBuffer(buffer, 0, channels, samplesToReadAtEndOfLoop, samplesRead / channels);
106+
WriteFileBufferToOutputBuffer(buffer, 0, channels, samplesToReadAtEndOfLoop, sampleCount, speed);
106107

107108
//then make another read at the beginning of the loop
108109
var samplesToReadAtStartOfLoop = samplesToRead - samplesToReadAtEndOfLoop;
109110
FAudioFile.CurrentTime = LoopStartTime;
110111
samplesRead = FAudioFile.Read(FFileBuffer, offset * channels, samplesToReadAtStartOfLoop);
111-
WriteFileBufferToOutputBuffer(buffer, samplesToReadAtEndOfLoop, channels, samplesToReadAtEndOfLoop, samplesRead / channels);
112+
WriteFileBufferToOutputBuffer(buffer, samplesToReadAtEndOfLoop, channels, samplesToReadAtEndOfLoop, sampleCount, speed);
112113
}
113114
else
114115
{
115116
samplesRead = FAudioFile.Read(FFileBuffer, offset * channels, samplesToRead);
116-
WriteFileBufferToOutputBuffer(buffer, 0, channels, samplesToRead, sampleCount);
117+
WriteFileBufferToOutputBuffer(buffer, 0, channels, samplesToRead, sampleCount, speed);
117118
}
118119
}
119120
else//silence
@@ -125,9 +126,9 @@ protected override void FillBuffers(float[][] buffer, int offset, int sampleCoun
125126
}
126127
}
127128

128-
private void WriteFileBufferToOutputBuffer(float[][] buffer, int outputOffset, int channels, int samplesToRead, int sampleCount)
129+
private void WriteFileBufferToOutputBuffer(float[][] buffer, int outputOffset, int channels, int samplesToRead, int sampleCount, double speed)
129130
{
130-
if (Speed == 1.0)
131+
if (speed == 1.0)
131132
{
132133
//copy to output buffers
133134
for (int i = 0; i < channels; i++)

0 commit comments

Comments
 (0)