Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Treść zadania.
- W oparciu o źródła programu Audio Codec Talk Through napisać program generujący sygnał
- akustyczny o kształcie i częstotliwości zadanej przez prowadzącego. Korzystając z narzędzia
- Plot wygenerować wykresy potwierdzające poprawność kształtu wygenerowanego sygnału.
- Kod programu.*/
- #include "Talkthrough.h"
- int hz = 48000;
- int freq = 500;
- // waga ~= hz/freq
- int waga = 96;
- int buf = 1000000;
- int buffor[240];
- int i;
- void Process_Data(void)
- {
- iChannel0LeftOut = buf;
- iChannel0RightOut = buf;
- iChannel1LeftOut = buf;
- iChannel1RightOut = buf;
- if(buf > 0)
- buf = buf - ( 1000000 / waga);
- else
- buf = 1000000;
- if (i < 240) {
- buffor[i] = buf;
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement