Skip to content

Commit c4aaa50

Browse files
committed
Merge branch 'development' into auxchanbtn
2 parents 91e1d53 + f9f7a9a commit c4aaa50

25 files changed

Lines changed: 5113 additions & 959 deletions

Builds/VisualStudio2013/Plugins/IntanRecordingController/IntanRecordingController.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<Filter>Source Files\rhythm-api</Filter>
6161
</ClInclude>
6262
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\USBThread.h">
63-
<Filter>Header Files</Filter>
63+
<Filter>Source Files</Filter>
6464
</ClInclude>
6565
</ItemGroup>
6666
</Project>

Source/Audio/AudioComponent.cpp

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,41 @@
2727

2828
AudioComponent::AudioComponent() : isPlaying(false)
2929
{
30-
// if this is nonempty, we got an error
31-
String error = deviceManager.initialise(0, // numInputChannelsNeeded
32-
2, // numOutputChannelsNeeded
33-
0, // *savedState (XmlElement)
34-
true, // selectDefaultDeviceOnFailure
35-
String::empty, // preferred device
36-
0); // preferred device setup options
37-
if (error != String::empty)
30+
bool initialized = false;
31+
while (!initialized)
3832
{
39-
String titleMessage = String("Audio device initialization error");
40-
String contentMessage = String("There was a problem initializing the audio device:\n" + error);
41-
// this uses a bool since there are only two options
42-
// also, omitting parameters works fine, even though the docs don't show defaults
43-
bool retryButtonClicked = AlertWindow::showOkCancelBox(AlertWindow::QuestionIcon,
44-
titleMessage,
45-
contentMessage,
46-
String("Retry"),
47-
String("Quit"));
48-
49-
if (retryButtonClicked)
33+
// if this is nonempty, we got an error
34+
String error = deviceManager.initialise(0, // numInputChannelsNeeded
35+
2, // numOutputChannelsNeeded
36+
0, // *savedState (XmlElement)
37+
true, // selectDefaultDeviceOnFailure
38+
String::empty, // preferred device
39+
0); // preferred device setup options
40+
41+
if (error == String::empty)
5042
{
51-
// as above
52-
error = deviceManager.initialise(0, 2, 0, true, String::empty, 0);
43+
initialized = true;
5344
}
54-
else // quit button clicked
45+
else
5546
{
56-
JUCEApplication::quit();
47+
String titleMessage = String("Audio device initialization error");
48+
String contentMessage = String("There was a problem initializing the audio device:\n" + error);
49+
// this uses a bool since there are only two options
50+
// also, omitting parameters works fine, even though the docs don't show defaults
51+
bool retryButtonClicked = AlertWindow::showOkCancelBox(AlertWindow::QuestionIcon,
52+
titleMessage,
53+
contentMessage,
54+
String("Retry"),
55+
String("Quit"));
56+
57+
if (!retryButtonClicked) // quit button clicked
58+
{
59+
JUCEApplication::quit();
60+
break;
61+
}
5762
}
5863
}
5964

60-
6165
AudioIODevice* aIOd = deviceManager.getCurrentAudioDevice();
6266

6367
// the error string doesn't tell you if there's no audio device found...

Source/Plugins/BasicSpikeDisplay/SpikeDisplayNode/SpikeDisplayCanvas.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,22 @@ void SpikeDisplayCanvas::refreshState()
123123

124124
void SpikeDisplayCanvas::resized()
125125
{
126-
viewport->setBounds(0,0,getWidth(),getHeight()-90);
126+
viewport->setBounds(0, 0, getWidth(), getHeight()-30); // leave space at bottom for buttons
127127

128128
spikeDisplay->setBounds(0,0,getWidth()-scrollBarThickness, spikeDisplay->getTotalHeight());
129129

130-
clearButton->setBounds(10, getHeight()-40, 100,20);
130+
clearButton->setBounds(10, getHeight()-25, 130, 20);
131131

132-
lockThresholdsButton->setBounds(130, getHeight()-40, 130,20);
132+
lockThresholdsButton->setBounds(10+130+10, getHeight()-25, 130, 20);
133133

134-
invertSpikesButton->setBounds(270, getHeight()-40, 130,20);
134+
invertSpikesButton->setBounds(10+130+10+130+10, getHeight()-25, 130, 20);
135135

136136
}
137137

138138
void SpikeDisplayCanvas::paint(Graphics& g)
139139
{
140140

141-
g.fillAll(Colours::darkgrey);
141+
g.fillAll(Colours::black);
142142

143143
}
144144

@@ -423,7 +423,7 @@ void SpikeDisplay::resized()
423423

424424
}
425425

426-
totalHeight = (int) maxHeight + 50;
426+
totalHeight = (int) maxHeight;
427427

428428
// std::cout << "New height = " << totalHeight << std::endl;
429429

Source/Plugins/ChannelMappingNode/ChannelMappingEditor.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,13 @@ void ChannelMappingEditor::refreshButtonLocations()
228228
button->setBounds(column*width, row*height, width, height);
229229
totalWidth = jmax(totalWidth, ++column*width);
230230

231-
if (column % 16 == 0)
231+
if (column == 1)
232232
{
233-
totalHeight = jmax(totalHeight, ++row*height);
233+
totalHeight = jmax(totalHeight, (row + 1)*height);
234+
}
235+
else if (column == 16)
236+
{
237+
row++;
234238
column = 0;
235239
}
236240
}

Source/Plugins/IntanRecordingController/OpenEphysLib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern "C" EXPORT int getPluginInfo(int index, Plugin::PluginInfo* info)
4949
case 0:
5050
info->type = Plugin::PLUGIN_TYPE_DATA_THREAD;
5151
info->dataThread.name = "Intan Rec. Controller";
52-
info->dataThread.creator = &createDataThread<RHD2000Thread>;
52+
info->dataThread.creator = &createDataThread<IntanRecordingController::RHD2000Thread>;
5353
break;
5454
default:
5555
return -1;

Source/Plugins/IntanRecordingController/RHD2000Editor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <cmath>
2626

2727
#include "RHD2000Thread.h"
28+
using namespace IntanRecordingController;
2829

2930
#ifdef WIN32
3031
#if (_MSC_VER < 1800) //round doesn't exist on MSVC prior to 2013 version

0 commit comments

Comments
 (0)