Skip to content

Commit a2724cb

Browse files
committed
Merge branch 'master' into gh-pages
2 parents 476825d + 2c6a404 commit a2724cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/Media/Sources/AudioExtrasSource.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ private short[] GetPcmSampleFromReader(BinaryReader binaryReader, AudioSamplingR
539539

540540
if (binaryReader?.BaseStream?.CanRead == true)
541541
{
542-
int sampleRate = (inputSampleRate == AudioSamplingRatesEnum.Rate8KHz) ? 8000 : 16000;
542+
int sampleRate = (int)inputSampleRate;
543543
int sampleSize = sampleRate / 1000 * _audioSamplePeriodMilliseconds;
544544
short[] pcm = new short[sampleSize];
545545

@@ -598,9 +598,9 @@ public void Close()
598598
}
599599
}
600600

601-
if(_musicStreamReader != null)
601+
if (_musicStreamReader != null)
602602
{
603-
lock(_musicStreamReader)
603+
lock (_musicStreamReader)
604604
{
605605
_musicStreamReader.Close();
606606
}

0 commit comments

Comments
 (0)