Newbee question array/delay » Media społecznościowe » Forum
Forum

Forum



ПоискПоиск   Users   Rejestracja   Wejście
Dzisiaj: 02.06.2025 - 19:09:09
Strony:  1  

Newbee question array/delay

Ogłoszenie

.
AutorWiadomość

DVB-T(2) INQUIRING

users




Statystyka:
Wiadomości: 22
Rejestracja: 18 maja 2015, 16:33

Hi all, I'm new in JS (do have c experience) and I'm pretty well started with the Wiki adaption of Michael "LOSER" Gruhn's 1st Ever Jesusonic Tutorial ... However, I do not completely understand the use of buffers/arrays for e.g delay ... The part in the example that is not clear to me, goes like this: @sample bufpos[0] = spl0 ; bufpos = bufpos + 1 ; bufpos > echolength ? bufpos = 0; spl0 = spl0 + bufpos[0] ; spl1 = spl0 ; I would guess that bufpos[0] is the first element of an array in which the value of spl0 is written. But what does the instruction "bufpos = bufpos + 1" do? In c it would mean that the pointer of the array is increased but here, I don't know. I'm confused because in the condition, it says "bufpos = 0" ... Thanks in advance!

---------------------
Wiadomość # 1 13.02.25 - 13:16:32
RE: Newbee question array/delay

wojciechowski

users




Statystyka:
Wiadomości: 2
Rejestracja: 29 wrz 2010, 19:38

The biggest barrier for me in understanding JS was how the array works. There is only one array/buffer. Only one. Code:

---------------------
Wiadomość # 2 13.02.25 - 13:25:22
RE: Newbee question array/delay

camio

users




Statystyka:
Wiadomości: 18
Rejestracja: 22 gru 2008, 11:04

You can actually use numeric constants as memory addresses too... Code:

---------------------
Kto w młodości głupim nie był, ten na starość nie zmądrzeje
Wiadomość # 3 13.02.25 - 13:29:30
RE: Newbee question array/delay

barosh3

users




Statystyka:
Wiadomości: 75
Rejestracja: 06 lis 2014, 19:31

0[index] is the same as mem[index] because mem, being undefined, is zero. Lotsa gotcha's in this package.

---------------------
Dystrybucją rozmaitych dodatków żywieniowych, bez wątpienia polepsza zdrowotność produktów spożywczych. Suplementy dzięki specyficznym właściwością całkowicie odmieniają sposoby żywienia, malując zdrową alternatywę dla ludzi preferujących odpowiedni styl życia. Znakomitej klasy odżywki, są kapitalnym uzupełnieniem diety, przez co zalecane żywienie, może być jednocześnie pyszne, jak i niedrogie. ZACHĘCAM do zdrowego żywienia!:)
Wiadomość # 4 13.02.25 - 13:40:26
RE: Newbee question array/delay

pitersid

users




Statystyka:
Wiadomości: 29
Rejestracja: 02 mar 2007, 19:20

OK, thanks a lot guys, it becomes more clear now! I've noticed that some new code that I've written has a stereo input but a mono output! I intended to use 2 arrays but did I understood correct that this is mapped to the same array? Here is some code: bufpos0[RecCtr] = spl0; bufpos1[RecCtr] = spl1; spl0 = bufpos0[PlayCtr] * volume; spl1 = bufpos1[PlayCtr] * volume; If it's the same array, I can understand why the output is mono ... Best regards, Guy

---------------------
Może to Twój urok... może to Photoshop...!?!
Wiadomość # 5 13.02.25 - 13:51:34
RE: Newbee question array/delay
Resume megui encode after crash? : Poprzedni temat
Strony:  1  

Administrator zabronił gościom odpowiadać na wiadomości! Aby się zarejestrować, kliknij link: rejestr


Uczestnicy