Commit 8f72913c authored by Martin Karlsson's avatar Martin Karlsson
Browse files

update

parent d3a347df
figure;
allAudio = [];
allAudioLeft = [];
allAudioRight = [];
lastLastIndex = 0;
lastIndex = 0;
count = 0;
while count < 10
while count < 50
p = bass.Audio();
if count == 0
fs = p.Audio.sampleRate;
end
pause(1)
pause(0.1)
lastIndex = p.Audio.lastFrameIndex;
diffIndex = lastIndex - lastLastIndex;
temp = cell2mat(p.Audio.left);
temp = temp(max(end-diffIndex+1,1):end);
allAudio = [allAudio; temp];
tempLeft = cell2mat(p.Audio.left);
tempLeft = tempLeft(max(end-diffIndex+1,1):end);
allAudioLeft = [allAudioLeft; tempLeft];
tempRight = cell2mat(p.Audio.right);
tempRight = tempRight(max(end-diffIndex+1,1):end);
allAudioRight = [allAudioRight; tempRight];
lastLastIndex = lastIndex;
count = count+1
end
\ No newline at end of file
plot(tempLeft);
set(gca,'ylim',[-2^16/2 2^16/2])
drawnow
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment