diff options
author | deva <deva> | 2006-08-16 23:49:23 +0000 |
---|---|---|
committer | deva <deva> | 2006-08-16 23:49:23 +0000 |
commit | 347b1d8ed3a4f780f3a5c0d57a04eab05ca517a2 (patch) | |
tree | dc21975923fb440c78ee4bbffc645a138071978f /server/liblame_wrapper.cc | |
parent | 6c07f9219bed6ccddc9b65ad40414cf0a9f7d633 (diff) |
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.
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); |