Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Karan Goel
481-SoundBrain
Commits
ec1cb895
Commit
ec1cb895
authored
Mar 20, 2015
by
Max-Ferdinand Suffel
Browse files
fix
parent
5962d1eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
webapp/index.html
View file @
ec1cb895
...
...
@@ -192,7 +192,7 @@ var socket = io(EEG_SOCKET_SERVER);
socket
.
on
(
'
connection
'
,
function
()
{
socket
.
on
(
'
get-EEG
'
,
function
(
data
)
{
data
=
JSON
.
parse
(
data
);
console
.
log
(
data
.
toString
());
if
(
data
.
attention
>
0
&&
data
.
meditation
>
0
)
{
RefreshFrame
();
var
min_nbrPoints
=
48
;
...
...
@@ -233,7 +233,7 @@ window.onload = function () {
MIDI
.
programChange
(
2
,
89
);
MIDI
.
programChange
(
3
,
104
);
MIDI
.
programChange
(
4
,
1
);
RefreshFrame
();
// setInterval(RefreshFrame, 200);
},
callbackPCM
:
function
(
pcmBuffer
)
{
...
...
webapp/js/MIDI/Plugin.js
View file @
ec1cb895
...
...
@@ -199,7 +199,7 @@ if (window.AudioContext || window.webkitAudioContext) (function () {
// to hijack the raw PCM 16-bit audio data.
if
(
root
.
callbackPCM
)
{
if
(
!
ctx
.
audioProcessor
)
{
ctx
.
audioProcessor
=
ctx
.
createScriptProcessor
(
0
,
1
,
1
);
ctx
.
audioProcessor
=
ctx
.
createScriptProcessor
(
4096
,
1
,
1
);
ctx
.
audioProcessor
.
onaudioprocess
=
function
(
e
)
{
var
inputBuffer
=
e
.
inputBuffer
.
getChannelData
(
0
);
root
.
callbackPCM
(
inputBuffer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment