audio.out.samplerate = srate;
double quality = ghb_settings_get_double(asettings, "AudioTrackQuality");
if (ghb_settings_get_boolean(asettings, "AudioTrackQualityEnable") &&
- quality >= 0)
+ quality != -1)
{
audio.out.quality = quality;
audio.out.bitrate = -1;
{
hb_error( "encvorbis: vorbis_encode_setup_managed failed.\n" );
*job->die = 1;
- return 0;
+ return -1;
}
}
- else if( audio->config.out.quality >= 0 )
+ else if( audio->config.out.quality != -1 )
{
if( vorbis_encode_setup_vbr( &pv->vi, pv->out_discrete_channels,
audio->config.out.samplerate, audio->config.out.quality ) )
{
hb_error( "encvorbis: vorbis_encode_setup_vbr failed.\n" );
*job->die = 1;
- return 0;
+ return -1;
}
}
{
hb_error( "encvorbis: vorbis_encode_ctl( ratemanage2_set ) OR vorbis_encode_setup_init failed.\n" );
*job->die = 1;
- return 0;
+ return -1;
}
/* add a comment */
hb_log( " + encoder: %s", hb_audio_encoders[j].human_readable_name );
if( audio->config.out.bitrate > 0 )
hb_log( " + bitrate: %d kbps, samplerate: %d Hz", audio->config.out.bitrate, audio->config.out.samplerate );
- else if( audio->config.out.quality >= 0 )
+ else if( audio->config.out.quality != -1 )
hb_log( " + quality: %.2f, samplerate: %d Hz", audio->config.out.quality, audio->config.out.samplerate );
else if( audio->config.out.samplerate > 0 )
hb_log( " + samplerate: %d Hz", audio->config.out.samplerate );
}
/* sense-check the requested quality */
- if( audio->config.out.quality >= 0 )
+ if( audio->config.out.quality != -1 )
{
float best_quality = hb_get_best_audio_quality(
audio->config.out.codec, audio->config.out.quality );
}
/* sense-check the requested bitrate */
- if( audio->config.out.quality < 0 )
+ if( audio->config.out.quality == -1 )
{
if( audio->config.out.bitrate <= 0 )
{