From f6e96edcc91bb761c6e7abb3a9ecae660d5d5edc Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Tue, 10 Oct 2006 20:00:33 +0000 Subject: Allow an ogg quality of -1 to be specified. git-svn-id: https://svn.musicpd.org/mpd/trunk@4893 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutputs/audioOutput_shout.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c index 2cf2ba624..8aa911ae4 100644 --- a/src/audioOutputs/audioOutput_shout.c +++ b/src/audioOutputs/audioOutput_shout.c @@ -81,7 +81,7 @@ static ShoutData *newShoutData(void) ret->tag = NULL; ret->tagToSend = 0; ret->bitrate = -1; - ret->quality = -1.0; + ret->quality = -2.0; ret->connAttempts = 0; ret->lastAttempt = 0; ret->audioFormat = NULL; @@ -177,9 +177,9 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) sd->quality = strtod(blockParam->value, &test); - if (*test != '\0' || sd->quality < 0.0 || sd->quality > 10.0) { + if (*test != '\0' || sd->quality < -1.0 || sd->quality > 10.0) { ERROR("shout quality \"%s\" is not a number in the " - "range 0-10, line %i\n", blockParam->value, + "range -1 to 10, line %i\n", blockParam->value, blockParam->line); exit(EXIT_FAILURE); } @@ -257,7 +257,7 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) shout_set_audio_info(sd->shoutConn, SHOUT_AI_SAMPLERATE, temp); - if (sd->quality >= 0) { + if (sd->quality >= -1.0) { snprintf(temp, sizeof(temp), "%2.2f", sd->quality); shout_set_audio_info(sd->shoutConn, SHOUT_AI_QUALITY, temp); @@ -418,7 +418,7 @@ static int initEncoder(ShoutData * sd) { vorbis_info_init(&(sd->vi)); - if (sd->quality >= 0) { + if (sd->quality >= -1.0) { if (0 != vorbis_encode_init_vbr(&(sd->vi), sd->audioFormat->channels, sd->audioFormat->sampleRate, -- cgit v1.2.3