Skip to content

Commit 357e2c4

Browse files
committed
File Reader fixes
1 parent 5c018ec commit 357e2c4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Source/Processors/FileReader/BinaryFileSource/BinaryFileSource.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ void BinaryFileSource::fillRecordInfo()
7878
String sampleNumbersFilename;
7979
String channelStatesFilename;
8080

81+
int majorVersion = guiVersion.substring(0, 1).getIntValue();
8182
int minorVersion = guiVersion.substring (2, 3).getIntValue();
8283

83-
if (minorVersion < 6)
84+
if (minorVersion < 6 && majorVersion == 0)
8485
{
8586
sampleNumbersFilename = "timestamps.npy";
8687
channelStatesFilename = "channel_states.npy";
@@ -208,8 +209,9 @@ void BinaryFileSource::fillRecordInfo()
208209
LOGD ("TTL found");
209210

210211
File channelStatesFile = m_rootPath.getChildFile ("events").getChildFile (streamName).getChildFile (channelStatesFilename);
212+
LOGD ("Channel States File: ", channelStatesFile.getFullPathName());
211213
std::unique_ptr<MemoryMappedFile> channelStatesFileMap (new MemoryMappedFile (channelStatesFile, MemoryMappedFile::readOnly));
212-
214+
jassert (channelStatesFileMap.get() != nullptr);
213215
streamName = streamName.substring (0, streamName.lastIndexOf ("/TTL"));
214216

215217
EventInfo eventInfo;

Source/Processors/FileReader/FileReaderEditor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ void FileReaderEditor::fileDragEnter (const StringArray& files, int x, int y)
166166

167167
void FileReaderEditor::filesDropped (const StringArray& files, int x, int y)
168168
{
169-
//TODO: Use parameter
170-
//setFile (files[0]);
169+
fileReader->getParameter ("selected_file")->setNextValue (files[0]);
171170

172171
m_isFileDragAndDropActive = false;
173172
repaint();

0 commit comments

Comments
 (0)