Commit c8ecca96 authored by Kevin Whitaker's avatar Kevin Whitaker

Disable replaygain until I can figure out why it's causing problems.

parent bc183449
......@@ -193,7 +193,6 @@ void GroovePlayerMgr::grooveEventLoop()
int trackCount = sqlSession.query<int>("select count(fingerprint) from tracks");
transaction.commit();
//Wait until at least 3 tracks are in DB to prevent nothing to vote on.
if(trackCount < 3)
{
......@@ -228,11 +227,13 @@ void GroovePlayerMgr::grooveEventLoop()
if(!player) {return;}
currentPlayer = player;
currentRPG = groove_loudness_detector_create();
groove_loudness_detector_attach(currentRPG,playlist);
currentRPG->disable_album = 1;
currentRPG->info_queue_size = 1;
groove_playlist_insert(playlist, groove_file_open(selectedTrack.trackPath.c_str()),1.0,1.0,nullptr);
//Now boostrap player with initial data
//groove_loudness_detector_attach(currentRPG,playlist);
groove_player_attach(player, playlist);
groove_playlist_play(playlist);
......@@ -276,13 +277,13 @@ void GroovePlayerMgr::grooveEventLoop()
);
Wt::log("info") << "Track playing changed to: " << currentTrack.trackName;
//Make sure gain is suggested
struct GrooveLoudnessDetectorInfo info;
groove_loudness_detector_info_get(currentRPG,&info,1);
struct GroovePlaylistItem* item;
groove_player_position(currentPlayer,&item,nullptr);
groove_playlist_set_item_gain(currentPlaylist, item, clamp_rg(-18.0 - info.loudness));
groove_playlist_set_item_peak(currentPlaylist, item, info.peak);
Wt::log("info") << "Gain being set to:" << clamp_rg(-18.0 - info.loudness) << " and peak to:" << info.peak;
// struct GrooveLoudnessDetectorInfo info;
// groove_loudness_detector_info_get(currentRPG,&info,1);
// struct GroovePlaylistItem* item;
// groove_player_position(currentPlayer,&item,nullptr);
// groove_playlist_set_item_gain(currentPlaylist, item, clamp_rg(-18.0 - info.loudness));
// groove_playlist_set_item_peak(currentPlaylist, item, info.peak);
// Wt::log("info") << "Gain being set to:" << clamp_rg(-18.0 - info.loudness) << " and peak to:" << info.peak;
}
else if(event.eventType == VOTING_ENDED)
{
......@@ -536,7 +537,7 @@ void GroovePlayerMgr::grooveEventLoop()
currentPlayer = nullptr;
groove_player_detach(player);
groove_player_destroy(player);
groove_loudness_detector_detach(currentRPG);
//groove_loudness_detector_detach(currentRPG);
groove_loudness_detector_destroy(currentRPG);
groove_playlist_destroy(playlist);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment