diff options
| author | Comment <tim@gray.(none)> | 2013-04-17 21:55:04 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-04-17 21:55:04 +0100 |
| commit | bd728800f22d6086ef1c901d7a212d655640c97c (patch) | |
| tree | 3393675cf2b544b2e7b9385ac6c80e05c5aa6e29 /rotord/rotor.h | |
| parent | 66d5eec509cf1a5b376f4111b12dc9f31fe968a0 (diff) | |
interleave audio
Diffstat (limited to 'rotord/rotor.h')
| -rwxr-xr-x | rotord/rotor.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h index af1bb72..bedf936 100755 --- a/rotord/rotor.h +++ b/rotord/rotor.h @@ -382,17 +382,18 @@ namespace Rotor { Testcard* clone(map<string,string> &_settings) { return new Testcard(_settings);}; Image *get_output(const Frame_spec &frame){ if (image->setup(frame.w,frame.h)) { - //create testcard - float ws=(255.0f/frame.w); - float hs=(255.0f/frame.h); - for (int i=0;i<frame.h;i++){ - for (int j=0;j<frame.w;j++){ - image->RGBdata[(i*frame.w+j)*3]=(uint8_t)(i*hs); - image->RGBdata[((i*frame.w+j)*3)+1]=(uint8_t)(j*ws); - image->RGBdata[((i*frame.w+j)*3)+2]=(uint8_t)(0); - image->Adata[i*frame.w+j]=(uint8_t)255; - image->Zdata[i*frame.w+j]=(uint16_t)512; //1.0 in fixed point 8.8 bits - } + + } + //always create testcard + float ws=(255.0f/frame.w); + float hs=(255.0f/frame.h); + for (int i=0;i<frame.h;i++){ + for (int j=0;j<frame.w;j++){ + image->RGBdata[(i*frame.w+j)*3]=(uint8_t)((int)((i+(frame.time*25.0f)*hs))%255); + image->RGBdata[((i*frame.w+j)*3)+1]=(uint8_t)((int)((j+(frame.time*100.0f)*hs))%255); + image->RGBdata[((i*frame.w+j)*3)+2]=(uint8_t)(0); + image->Adata[i*frame.w+j]=(uint8_t)255; + image->Zdata[i*frame.w+j]=(uint16_t)512; //1.0 in fixed point 8.8 bits } } return image; |
