encoder/vorbis: default to quality 3
Don't require a quality or bitrate setting. If nothing is set, don't fail startup - just go with a good default. A quality setting of 3 is what "oggenc" defaults to as well.
This commit is contained in:
parent
31ab78ae8e
commit
aea37e46e3
2
NEWS
2
NEWS
@ -8,6 +8,8 @@ ver 0.20.12 (not yet released)
|
|||||||
- vorbis: fix Tremor support
|
- vorbis: fix Tremor support
|
||||||
* player
|
* player
|
||||||
- log message when decoder is too slow
|
- log message when decoder is too slow
|
||||||
|
* encoder
|
||||||
|
- vorbis: default to quality 3
|
||||||
* output
|
* output
|
||||||
- fix hanging playback with soxr resampler
|
- fix hanging playback with soxr resampler
|
||||||
|
|
||||||
|
@ -3068,8 +3068,8 @@ run</programlisting>
|
|||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
Sets the quality for VBR. -1 is the lowest quality,
|
Sets the quality for VBR. -1 is the lowest quality,
|
||||||
10 is the highest quality. Cannot be used with
|
10 is the highest quality. Defaults to 3. Cannot
|
||||||
<varname>bitrate</varname>.
|
be used with <varname>bitrate</varname>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
|
@ -62,7 +62,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class PreparedVorbisEncoder final : public PreparedEncoder {
|
class PreparedVorbisEncoder final : public PreparedEncoder {
|
||||||
float quality;
|
float quality = 3;
|
||||||
int bitrate;
|
int bitrate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -97,7 +97,7 @@ PreparedVorbisEncoder::PreparedVorbisEncoder(const ConfigBlock &block)
|
|||||||
|
|
||||||
value = block.GetBlockValue("bitrate");
|
value = block.GetBlockValue("bitrate");
|
||||||
if (value == nullptr)
|
if (value == nullptr)
|
||||||
throw std::runtime_error("neither bitrate nor quality defined");
|
return;
|
||||||
|
|
||||||
quality = -2.0;
|
quality = -2.0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user