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

This commit is contained in:
Kevin Whitaker
2017-02-27 18:17:16 -05:00
parent bc183449a3
commit c8ecca96e9

View File

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