Показать сообщение отдельно
  #18  
Старый 24.12.2013, 19:28
lkz_07 lkz_07 вне форума
Новичок
 
Регистрация: 12.03.2011
Сообщения: 50
Репутация: 10
По умолчанию

В процедуре Generator:


Код:
    j: integer;
const  mass: array [0..2] of integer = (1000, -1000, 2000);


Код:
for j := 0 to Length(mass)-1 do begin

if mass[j] > 0 then begin
 OmegaC := 2*PI*Freq;
        for I := 0 to Size div 2 do begin
          t := I/44100 + tPred;
          PSmallInt(buf)^ := Round(Lev*sin(OmegaC*t));// ВОЗНИКАЕТ ОШИБКА
          Inc(PSmallInt(buf));
        end;
        tPred := t;
                    end;

if mass[j] < 0 then begin
       for I := 0 to Size-2 do begin
         PSmallInt(buf)^ := 0;
         Inc(PSmallInt(buf));
       end;
       tPred := 0;
       end;

if j = Length(mass)-1 then ServiceThread.Terminate;

                                 end;

Возникает ошибка
И как делать "задержки", которые в массиве?
Ответить с цитированием