File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed
app/server/ruby/lib/sonicpi Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ module Util
56
56
@@current_uuid = nil
57
57
@@home_dir = nil
58
58
@@util_lock = Mutex . new
59
- @@raspberry_pi_1 = RUBY_PLATFORM . match ( /.*arm.*-linux.*/ ) && File . exist? ( '/proc/cpuinfo' ) && !( `cat /proc/cpuinfo | grep BCM2708` ) . empty?
60
59
@@raspberry_pi_2 = RUBY_PLATFORM . match ( /.*arm.*-linux.*/ ) && [ 'a01040' , 'a01041' , 'a22042' ] . include? ( `awk '/^Revision/ { print $3}' /proc/cpuinfo` . delete! ( "\n " ) )
61
60
@@raspberry_pi_3 = RUBY_PLATFORM . match ( /.*arm.*-linux.*/ ) && [ 'a02082' , 'a22082' , 'a32082' ] . include? ( `awk '/^Revision/ { print $3}' /proc/cpuinfo` . delete! ( "\n " ) )
62
61
@@raspberry_pi_3bplus = RUBY_PLATFORM . match ( /.*arm.*-linux.*/ ) && [ 'a020d3' ] . include? ( `awk '/^Revision/ { print $3}' /proc/cpuinfo` . delete! ( "\n " ) )
@@ -118,10 +117,6 @@ def raspberry_pi?
118
117
os == :raspberry
119
118
end
120
119
121
- def raspberry_pi_1?
122
- os == :raspberry && @@raspberry_pi_1
123
- end
124
-
125
120
def raspberry_pi_2?
126
121
os == :raspberry && @@raspberry_pi_2
127
122
end
@@ -195,17 +190,15 @@ def num_buffers_for_current_os
195
190
end
196
191
197
192
def num_audio_busses_for_current_os
198
- if os == :raspberry && @@raspberry_pi_1
199
- 64
200
- else
201
193
1024
202
- end
203
-
204
194
end
205
195
206
196
def default_sched_ahead_time
207
- if raspberry_pi_1?
208
- 1
197
+ if raspberry_pi_2?
198
+ 2
199
+ elsif raspberry_pi_3? or raspberry_pi_3bplus? \
200
+ or raspberry_pi_3_64? or raspberry_pi_3bplus_64?
201
+ 1.5
209
202
else
210
203
0.5
211
204
end
@@ -214,9 +207,7 @@ def default_sched_ahead_time
214
207
def host_platform_desc
215
208
case os
216
209
when :raspberry
217
- if raspberry_pi_1?
218
- "Raspberry Pi 1"
219
- elsif raspberry_pi_2?
210
+ if raspberry_pi_2?
220
211
"Raspberry Pi 2B"
221
212
elsif raspberry_pi_3?
222
213
"Raspberry Pi 3B"
@@ -260,11 +251,7 @@ def host_platform_desc
260
251
261
252
def default_control_delta
262
253
if raspberry_pi?
263
- if raspberry_pi_1?
264
- 0.02
265
- else
266
254
0.013
267
- end
268
255
else
269
256
0.005
270
257
end
You can’t perform that action at this time.
0 commit comments