diff options
Diffstat (limited to 'server/liblame_wrapper.cc')
-rw-r--r-- | server/liblame_wrapper.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/server/liblame_wrapper.cc b/server/liblame_wrapper.cc index 9bac35b..2ffd923 100644 --- a/server/liblame_wrapper.cc +++ b/server/liblame_wrapper.cc @@ -26,7 +26,7 @@ */ #include <config.h> #include "liblame_wrapper.h" -#include "miav_config.h" +#include "configuration.h" #include "info.h" LibLAMEWrapper::LibLAMEWrapper() @@ -45,9 +45,17 @@ LibLAMEWrapper::LibLAMEWrapper() // lame_set_num_samples(gfp, SAMPLES); // lame_set_num_samples(gfp, 0); - lame_set_quality(gfp, MIaV::config->readInt("mp3_quality")); + int quality; + if(MIaV::config->get("mp3_quality", &quality)) + MIaV::info->error("Could not read symbol [mp3_quality] from conf file!"); + + int bitrate; + if(MIaV::config->get("mp3_bitrate", &bitrate)) + MIaV::info->error("Could not read symbol [mp3_bitrate] from conf file!"); + + lame_set_quality(gfp, quality); lame_set_mode(gfp, STEREO); - lame_set_brate(gfp, MIaV::config->readInt("mp3_bitrate")); + lame_set_brate(gfp, bitrate); lame_set_strict_ISO(gfp, 1); |