Post Go back to editing

Problem with streaming

Category: Software
Product Number: 0
Software Version: LIBM2K
Hello everyone, I'm trying to stream with non cyclic mode, but every time I send samples this happens. Help please thank you.


clc;clear;close all;
fs_salida=7.5e3/10;
% Importar bibliotecas necesarias
import clib.libm2k.libm2k.*;
% -Iniciar y verificar conexión con el dispositivo
m2k = context.m2kOpen();
if clibIsNull(m2k)
clib.libm2k.libm2k.context.contextCloseAll();
m2k = context.m2kOpen();
end
if isempty(m2k)
error('Dispositivo desconectado');
end
% Calibrar el dispositivo
m2k.reset();
m2k.calibrateADC();
m2k.calibrateDAC();
% Configurar dispositivos de salida analógica
aout = m2k.getAnalogOut();
aout.setSampleRate(0, fs_salida);
aout.enableChannel(0, true);
aout.setCyclic(false);
aout.setKernelBuffersCount(0,64);
n=0:180*fs_salida-1;
f=(3e3)/10;
m= cos(2*pi*n*f/fs_salida);
n=fs_salida;
for i = 1:length(m)/fs_salida
indice_inicio = (i - 1) * n + 1;
tx= m(indice_inicio:indice_inicio + n - 1);
aout.push(0,tx)
end