comparison src/flacng/tools.c @ 2991:2cdf6400594c

flacng: enable replaygain
author Teemu Torma <teemu@torma.org>
date Tue, 10 Feb 2009 23:56:41 +0100
parents f1b6f1b2cdb3
children 3b200cf6d1b7
comparison
equal deleted inserted replaced
2990:be86c72a06c9 2991:2cdf6400594c
398 info->replaygain.has_rg = TRUE; 398 info->replaygain.has_rg = TRUE;
399 } 399 }
400 400
401 _LEAVE; 401 _LEAVE;
402 } 402 }
403
404 /* --- */
405
406 ReplayGainInfo get_replay_gain(callback_info *info) {
407
408 ReplayGainInfo rg;
409
410 if (info->replaygain.has_rg) {
411 rg.track_gain = (info->replaygain.track_gain
412 ? atof(info->replaygain.track_gain)
413 : 0.0);
414 rg.track_peak = (info->replaygain.track_peak
415 ? atof(info->replaygain.track_peak)
416 : 0.0);
417 rg.album_gain = (info->replaygain.album_gain
418 ? atof(info->replaygain.album_gain)
419 : 0.0);
420 rg.album_peak = (info->replaygain.album_peak
421 ? atof(info->replaygain.album_peak)
422 : 0.0);
423 } else {
424 rg.track_gain = 0.0;
425 rg.track_peak = 0.0;
426 rg.album_gain = 0.0;
427 rg.album_peak = 0.0;
428 }
429
430 return rg;
431 }