Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sbashford committed Jul 17, 2019
1 parent b0e25b7 commit 0ebe0c4
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions src/main/main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,35 @@ int main() {
{".mov", ".avi", ".wav"}
};
MersenneTwisterRandomizer randomizer;
target_list::RandomizedTargetListFactory targetListFactory{&fileExtensions, &randomizer};
target_list::SubdirectoryTargetListReader targetListReader{&targetListFactory, &reader};
target_list::RandomizedTargetList fixedLevelTargetList{&fileExtensions, &randomizer};
target_list::RandomizedTargetListFactory targetListFactory{
&fileExtensions,
&randomizer
};
target_list::SubdirectoryTargetListReader targetListReader{
&targetListFactory,
&reader
};
target_list::RandomizedTargetList fixedLevelTargetList{
&fileExtensions,
&randomizer
};
auto subjectScreen = [[NSScreen screens] lastObject];
auto subjectScreenFrame = subjectScreen.frame;
auto subjectScreenOrigin = subjectScreenFrame.origin;
AvFoundationVideoPlayer videoPlayer{subjectScreen};
CoreAudioBufferedReader bufferedReader;
stimulus_players::AudioReaderImpl audioReader{&bufferedReader};
stimulus_players::TargetPlayerImpl targetPlayer{&videoPlayer, &audioReader};
stimulus_players::TargetPlayerImpl targetPlayer{
&videoPlayer,
&audioReader
};
AvFoundationAudioPlayer audioPlayer;
TimerImpl timer;
stimulus_players::MaskerPlayerImpl maskerPlayer{&audioPlayer, &audioReader, &timer};
stimulus_players::MaskerPlayerImpl maskerPlayer{
&audioPlayer,
&audioReader,
&timer
};
maskerPlayer.setFadeInOutSeconds(0.5);
FileWriter writer;
TimeStampImpl timeStamp;
Expand All @@ -253,7 +269,10 @@ int main() {
&responseEvaluator,
&randomizer
};
FixedLevelMethod fixedLevelMethod{&fixedLevelTargetList, &responseEvaluator};
FixedLevelMethod fixedLevelMethod{
&fixedLevelTargetList,
&responseEvaluator
};
RecognitionTestModel_Internal model_internal{
&targetPlayer,
&maskerPlayer,
Expand Down Expand Up @@ -287,6 +306,9 @@ int main() {
testSetupView.setTargetListDirectory(
"/Users/basset/Documents/Lalonde/Lalonde-coordinate-response/Seth Mars Attack"
);
testSetupView.setTrackSettingsFile(
"/Users/basset/Desktop/track-settings.txt"
);
CocoaExperimenterView experimenterView{testerContentFrame};
CocoaView view{testerWindowFrame};
view.addSubview(testSetupView.view());
Expand Down

0 comments on commit 0ebe0c4

Please sign in to comment.