1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Tidied up some comments and usage of File::createOutputStream() and createInputStream()

This commit is contained in:
jules 2018-10-04 10:59:49 +01:00
parent 81e206f963
commit 302019dd43
13 changed files with 114 additions and 87 deletions

View file

@ -486,9 +486,7 @@ int OggVorbisAudioFormat::estimateOggFileQuality (const File& source)
{
if (auto* in = source.createInputStream())
{
std::unique_ptr<AudioFormatReader> r (createReaderFor (in, true));
if (r != nullptr)
if (auto r = std::unique_ptr<AudioFormatReader> (createReaderFor (in, true)))
{
auto lengthSecs = r->lengthInSamples / r->sampleRate;
auto approxBitsPerSecond = (int) (source.getSize() * 8 / lengthSecs);