From 347b1d8ed3a4f780f3a5c0d57a04eab05ca517a2 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 16 Aug 2006 23:49:23 +0000 Subject: Replaced the old MiavConfig class with the new Configuration class in all the the appropriate places. Crippled the MulticastConfiguration class. This must be rewritten to use the new configuration interface. --- server/liblame_wrapper.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'server/liblame_wrapper.cc') 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 #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); -- cgit v1.2.3